Posts by vmontanheiro • 947 points
44 posts
-
0
votes2
answers93
viewsA: Regular expression by string index
Wow, are you into the grep? It has a flag called (value = false), if it is false it returns the indexes, if true it returns the selected elements of x; Don’t worry about setting the flag, by default…
-
0
votes2
answers189
viewsA: JSON.stringfy of large objects with Angular 8
I have two tips, you can delete using the javascript delete property: delete Object.municipio.name; or using the lib lodash: $ Yarn add lodash import _ from lodash; object.municipio…
-
1
votes2
answers780
viewsA: What are these specific purpose registers?
Dude, each of these recorders has a purpose in memory management, in the description of each one it already says what they are, to see in practice you can find illustrative images on the internet,…
architecture-computersanswered vmontanheiro 947 -
1
votes1
answer375
viewsA: Insert data into Sqlite
Friend, is that you are not using Websql, although she use Sqlite under the cloths, Websql is an integrated HTML API, so I saw, you added a lib from Sqlite, to use Websql you do not need it, just be…
-
1
votes2
answers1667
viewsA: Can I enter records in Sqlite using Phonegap?
That’s right, Phonegrap(Cordova) is a framework where you can develop your cross-Platform applications using javascript, html and css. The connection to the database can be done by javascript…
apache-cordovaanswered vmontanheiro 947 -
1
votes1
answer265
viewsA: Insert into table and then click using Jquery
Try to use it like this $('#tabelaChat').on('click','tr', function(e){ alert("Teste"); return false; });
-
0
votes1
answer577
viewsQ: Critical section problems in concurrent programming
I am implementing in C++ a system with threads using semaphores. I am with a doubt, if I treat the progress situation, I will guarantee 100% that my implementation will not occur no impasse? Or I…
-
7
votes5
answers3666
viewsA: How do I know the last commit to move the same file as my commit?
Friend you can use git log <arquivo> and to make git understand and follow the file. git log --follow <arquivo> You can go through the branch. git log --follow outro_branch --…
gitanswered vmontanheiro 947 -
2
votes3
answers10282
viewsA: How to navigate a children and a div with Javascript?
Try it this way document.getElementById('paicasas').children[i].style.backgroundColor = "#FFF";
-
4
votes4
answers4670
viewsA: Select string at random
Try using this function // Determia as letras que poderão estar presente nas chaves String letras = "ABCDEFGHIJKLMNOPQRSTUVYWXZ"; Random random = new Random(); String armazenaChaves = ""; int index…
-
2
votes1
answer1517
viewsA: Passing variable to modal
You can add this to your Success $(".modal-body p").html("Usuário foi desativado com Sucesso!"); using your array $(".modal-body p").html(resposta[1]);…
-
4
votes4
answers584
viewsA: How to verify the efficiency of these 2 functions in C++?
On Windows #include <stdio.h> #include <windows.h> int main() { int i, j; int inicio, final, tmili; inicio = GetTickCount(); /* Substitua o for a seguir pelo trecho de código cujo tempo…
-
19
votes1
answer10842
viewsA: Changing remote path in Git
You can both remove git remote remove origin add another git remote add origin git://suaUrl how much to change git remote set-url origin git://suaUrl…
-
-1
votes2
answers314
viewsA: Is it possible to insert jQuery Validate in PHP?
In this case, I recommend to treat these validations before arriving in PHP with own plugin you suggested, because if you leave to validate in PHP, you will have to write HTML code in PHP code to…
-
3
votes2
answers4732
viewsA: How to automatically adjust a Jframe to the screen size?
Try to do that Toolkit kit = Toolkit.getDefaultToolkit(); Dimension tamTela = kit.getScreenSize(); //Pega largura e altura da tela int larg = tamTela.width; int alt = tamTela.height; /* larg x 0.7;…
-
0
votes3
answers136
viewsA: Saving Selected HTML PHP
If I understand, I think you want this: <?php header("content-type: text/html; charset=utf-8"); $cursos=array('JAVA','PHP','Python'); ?> </html> <select value="teste"> <option…
-
1
votes1
answer561
viewsA: Error in SQL Server and JSP connection
Try this, using the microsoft driver String usuario = "seuUsuario"; String senha = "suaSenha"; String url = "jdbc:sqlserver://seuHost:1433;databaseName=seuBanco" + ";user=" + usuario + ";password="…
-
0
votes2
answers217
viewsA: Problems with date format
Friend you can as much as convert it using javascript, from the current format to the form of the server. function converterData(dataString){ split = dataString.split('/'); return novadata =…
-
1
votes1
answer458
viewsA: get current url of a java network
I didn’t understand it very well, but this takes all the hosts of a lan public void checkHosts(String subnet){ int timeout=1000; for (int i=1;i<254;i++){ String host=subnet + "." + i; if…
javaanswered vmontanheiro 947 -
0
votes2
answers1490
viewsA: How to clear inputs after performing an ajax request?
Try it this way if(json.length < 1){ $(nomeProduto).empty(); } ou if(!json.nomeProduto){ $(nomeProduto).empty(); }
-
0
votes2
answers11484
viewsA: How to make a dynamic form?
Boy, to make this more dynamic you would have to write more code. But the elements could be removed from your html. But when I’m going to do something like I need dynamic id. I do it like this:…
-
2
votes1
answer337
viewsA: Modify <title> with Angularjs through a form
Use the ng-model <title>{{title}}</title> <!-- define-pageTitle --> <div id="shareContent"> <p class="subtitle-app mt30">{{title}}</p> <form onsubmit="return…
-
1
votes1
answer909
viewsA: How does buffer work using printf and scanf?
Hello friend the problem is that when reading a string with more than one word (with spaces) it stops to read by storing only the first word. An example would be the string "My house", if we use the…
-
3
votes2
answers463
viewsA: How to compare an inserted sentence with existing ones in the comic returning the probability of being similar?
The strcasecmp function compares two strings without case differentiation. $var1 = 'A'; $var2 = 'a'; //comparacao case insensitive if(strcasecmp($var1, $var2) == 0) { echo $var1.' (igual) '.$var2;…
-
1
votes1
answer88
viewsA: How to define my Primary Key?
//Swift class Foo: RLMObject { dynamic var id = 0 override class func primaryKey() -> String { return "id" } } //Core data [https://stackoverflow.com/questions/901640/core-data-primary-key]…
-
1
votes1
answer401
viewsA: How to pick words and save in a string?
If I understand, I think that’s it. // instantiation String val = new String(token.getPOSTag()); // declaration and instantiation (more practical) String val = token.getPOSTag(); But if your…
-
2
votes7
answers39327
viewsA: How to create input masks with Javascript?
Uses regular expression! function mascararTel(v){ v=v.replace(/\D/g,""); v=v.replace(/^(\d{2})(\d)/g,"($1) $2"); v=v.replace(/(\d)(\d{4})$/,"$1-$2"); return v; }…
javascriptanswered vmontanheiro 947 -
1
votes2
answers3432
viewsA: How to pass Javascript array for PHP variable
Add this function within your calculation method. enviarViaAjax(){ var dados = "&datasvenc=" + datasvenc; //Aqui você passa o array e as demais variáveis var xmlhttp; //Requisita o ajax if…
-
3
votes2
answers185
viewsA: Automatically creating input limiting to 5
Try the following, add a date attribute to your button. <button type="button" data-index="0" style="cursor: pointer;" onclick="removerCampos(this);">-</button> function…
-
1
votes4
answers522
viewsA: AJAX does not pass values to PHP
Friend you need to put the & xmlHttp.send("&acao=" + acao);
-
0
votes3
answers3234
viewsA: Picking up IP LAN for sending with ajax
From what I’ve seen your application wants to get its own local ip via JAVA? public static String pegaIpLocal() { String s=""; try { InetAddress in = InetAddress.getLocalHost(); s =…
-
0
votes2
answers3463
viewsA: Attach elements to the footer of the div
Quietly you can do it there with a div and a basic CSS. But if you want to produce more and with a nice and responsive design. I suggest you take a look at bootstrap 3.I’ve been working a lot with…
cssanswered vmontanheiro 947 -
0
votes3
answers319
viewsA: Search for information by content and not by array position
you can use the split function. Follow the example: <!DOCTYPE html> <html> <body> <% myString=Split("Como eu faço para separar uma string em várias strings?") for each x in…
-
1
votes1
answer482
viewsA: Fill a jquery combobox
I’m not sure what you want. But I’ll show you two options, either by taking the value of the selected text from the combo, or by passing the value of the option to retrieve the text.…
-
3
votes2
answers81
viewsA: Reorder HTML structure via jQuery
Friend you can use the function append jQuery. For example: $(".chosen-choices").append("<li class='search-choice'><span>1 MÊS GRÁTIS</span><a class='search-choice-close'…
-
0
votes2
answers85
viewsA: Rescue 2 arrays with Angularjs
In case it would look like this : [ [{"id":"9","id_produto":"1","forma":"Alface","valor":"1.00","id_lanche":"3","qtd_max":"1"}], [{"id":"41","name":"dd","value":""}],…
-
2
votes4
answers3211
viewsA: How to do strstr() in jquery
Yes, you will need to create a function. <script type="text/javascript"> var chave = /vai/; var string = "Como vai Amancio"; var resultado = string.search(chave); if(resultado != -1){…
jqueryanswered vmontanheiro 947 -
1
votes1
answer123
viewsA: Input pasting on Radios
Hello, I saw you are using the bootstrap. If it is version 3 you can do so ho. 1- Thus the radios are above the input <div class="form-group"> <label class="col-lg-2…
-
1
votes1
answer132
viewsA: Successful message when finishing uploading images
$('#fileupload').fileupload({ dataType: 'json', autoUpload: true, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, maxFileSize: 5000000, // 5 MB // Enable image resizing, except for Android and Opera,…
jqueryanswered vmontanheiro 947 -
0
votes2
answers85
viewsA: Rescue 2 arrays with Angularjs
You can use the params option of the $http method. app.controller('recipedetails', ['$scope','$http', function ($scope,$http) { $http({ url: "app/querys/receita_item.php", method: "GET", params:…
-
1
votes3
answers220
viewsA: Select "Cancel" in Alert by default
Friend this is not possible with javascript. In this case I suggest you create your own popup. Bootstrap offers cool and simple alerts to be implemented. http://getbootstrap.com/javascript/…
javascriptanswered vmontanheiro 947 -
0
votes3
answers384
viewsA: Multilojas Different Checkouts
is as yes!! The user offers several payment modules, for example voip, pay insurance , paypal and among others. Suppose you want to use "pay insurance" to finalize the payments of both stores, you…
magentoanswered vmontanheiro 947 -
0
votes2
answers542
viewsA: jQuery Flipster "Uncaught Typeerror: Undefined is not a Function"
For nothing. But to do this you do not need to search all "li". If I understand, I think you want to do this. $(".flipster").flipster({ style: 'carousel', enableTouch: true, start: 0,…
jqueryanswered vmontanheiro 947 -
0
votes2
answers542
viewsA: jQuery Flipster "Uncaught Typeerror: Undefined is not a Function"
Hello, the problem happens when the constructor picks up the next "li" and they have already been swept, so the function each will not be defined. The problem can be solved like this.…
jqueryanswered vmontanheiro 947