Posts by jbrunoxd • 775 points
29 posts
-
1
votes2
answers68
viewsA: How to leave menu item with different background color permanently
I believe that as in your CSS all rules are from Ids, only other ID rules at the end of the file or using by attribute style would override CSS rules: <li class="active"…
-
1
votes1
answer238
viewsA: PHP cannot process heavy files
Yes, with 1 million lines it is already necessary to do the operations per stream line by line, the main modification would be the following lines: //abrir com fopen ou invés do file() $ler =…
-
2
votes1
answer54
viewsA: Display first image of a dynamic table in php
Even with the reply of the comment, I will leave just below another example of code with greater organization: <div class="lista-prod col-lg-12 "> <?php $verificaQuery =…
-
6
votes2
answers289
viewsQ: Numbers with zero start in Javascript
I’m having a confusing problem, where I send a number 000214 by AJAX to a controller PHP, and there he arrives with result 140. I gave a simple console.log(000214); and the result in JS itself was…
-
1
votes1
answer923
viewsA: Identify connection type 3g, 4g and/or Wifi
First add this tag to the project manifest to allow access to connection status <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission> Then create…
android-studioanswered jbrunoxd 775 -
4
votes1
answer1307
viewsQ: Rename all files in a folder to random names
I need a command to rename all the files in a folder to a random name, which keep the same file extension and preferably with numbers, what I got so far was this: forfiles /P c:\teste\ /c "cmd /c…
-
4
votes1
answer107
viewsQ: Meaning of the operator?
What is the function of by one !! in an if for example? know what ! by itself reverses the value of a boolean result, but tested the !! and nothing changed in the result, example: $teste = true;…
-
0
votes2
answers409
viewsA: Implement Drawing Google Maps
it is necessary to enable the Google maps Drawing library by calling it by the url with the parameter libraries=drawing: https://maps.googleapis.com/maps/api/js?libraries=drawing so the options will…
-
3
votes1
answer1258
viewsA: Add Caption to a Map via googlemaps API
I think it’s important to have an example here, below: google.maps.event.addDomListener(window, "load", function () { var map = new google.maps.Map(document.getElementById("map_div"), { center: new…
javascriptanswered jbrunoxd 775 -
0
votes2
answers1708
viewsA: how to create a youtube video in full screen with back button?
In this way the video opens in another window, occupying all the space of the same, so if the user wants to return to the site is just close it, I do not think there is method of automatically open…
-
1
votes3
answers248
viewsA: How to take the value of an inputtext and generate an IMG URL
has a solution like this, with jquery: $('#botao').click(function () { var num = $('#num').val(); $('#img').attr('src', "https://localhost/sig/_downloadFoto?parametro2=Alunos/" + num + ".jpg"); })…
-
0
votes3
answers2079
viewsA: Array value with highest occurrence
Best solution I could find: var arr = [1, 2, 3, 4, 5, 2, 2, 3]; var qtd = arr.reduce(function(acc,e){acc[e] = (e in acc ? acc[e]+1 : 1); return acc}, {}); qtd['2']; //3…
javascriptanswered jbrunoxd 775 -
1
votes2
answers588
viewsA: Automatically select text
The solution of Sanction undoubtedly seems better, but as I was already making one too, follows below the code, in this is possible to take any <p> from the page for example, but it has some…
-
0
votes2
answers87
viewsA: Help with concatenating
Try using escape characters like \' to first get the value of the variable and make it a string username: "\'"+ variavel +"\'",
-
1
votes1
answer136
viewsA: Recover Symfony action data in Ajax
good, by ajax recommend doing so: include the JMS serialize by the Command and install "require": { "jms/serializer-bundle": "^1.1" }, use JMS to serialize to JSON the entity and return the answer…
-
7
votes1
answer80
viewsA: Input with the date of the respective day, without being able to be edited
You can assign a variable with the current date in the input value, and mark it as readonly so it is not edited. <input class="cinza" readonly type="date" value="{{data| date:'dd-MMM-yyyy'}}">…
-
2
votes15
answers4487
viewsA: Determine if all digits are equal
A PHP response, useful to check that Cpf contains all the same numbers $digitos = 11111111111; $todosIguais = true; foreach(str_split($digitos) as $num){ foreach(str_split($digitos) as $num2){…
-
3
votes1
answer815
viewsA: How to save <textarea> in HTML?
Using the Local Storage of HTML5 you can save textarea text locally, so even though you close the file the values will be there. Code: <!DOCTYPE html> <html> <body>…
-
1
votes1
answer109
viewsQ: problem with Dynamic proxies ASP . NET MVC
Could someone explain me a method not to pick up the proxies from the Dbcontext and yes the real objects? Following a case: public ActionResult PegarItem(int anuncio, String remetente, int…
-
1
votes2
answers1889
views -
0
votes1
answer25
viewsA: symfony2 more than one security voter for one Bundle
the problem was because it did not need to be called post_voter, I was wrong in the tutorial security.access.state_voter: class: AppBundle\Security\Authorization\Voter\StateVoter public: false tags:…
-
3
votes3
answers283
viewsA: remove dynamic div with jQuery counter
in onclick pass the id of the field as parameter: onclick="remover('campos_<?php echo $contador; ?>')" and in the remove function use remove() in the field id: function remover(campo) {…
-
1
votes2
answers88
viewsA: Remove undesirable margin below image
you can let the text height be the same as the image by adding height: 225px; See working. *{margin:0;padding:0;} .container{ width:700px; } .image img{ margin-right:15px; float:left; width: 300px;…
-
3
votes3
answers2845
viewsA: Image to byte[]
Code public byte[] imageToByteArray(System.Drawing.Image imageIn) { using (var ms = new MemoryStream()) { imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif); //aqui voce troca o formato de…
-
1
votes3
answers701
viewsA: How to prevent Microsoft Outlook from creating a blue link in the html where it is written www.algo.com
you can link between the tag <pre> <pre><a href="http://www.empresa.com.br" class="link">www.empresa.com.br</a></pre> but by css would be more dynamic in the end, as…
-
0
votes1
answer25
viewsQ: symfony2 more than one security voter for one Bundle
I’m having trouble creating more than one voter for each class the idea is to have a voter for each class to be able to realize access security to it, the first voter worked but the second ever…
-
2
votes1
answer1655
viewsA: Pass a value in link type button through the url to be last in another page with javascript or php
very simply in php: <a href="minhapagina.php?foo=bar"></a> <?php $foo = $_GET['foo']; // 'bar'; ?>
-
2
votes2
answers10368
viewsA: Show and hide input for javascript search field
You can use an Eventlistener: document.getElementById("pesquisa").addEventListener("blur", myFunction); function myFunction() { document.getElementById("pesquisa").style.display = "none"; }…
-
2
votes1
answer1754
viewsQ: How to translate Summary errors Asp . net validation error messages?
I can’t find a file that brings me the error message strings to be translated, the Annotation are well, only those that bring more complex errors, such as Passwords must have at least one Digit…