Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer1523
viewsEffect of skirting a div’s edge, as if drawing "by hand"
I want to make an edge effect, that in the Hover of a square div, the edge is "drawn", comes out of the top left of the div, fills up to the top right, goes down doing the right side, returns to the…
-
5
votes2
answers569
viewsDOCTYPE declaration of HTML
By the standards of the W3C we must declare so: < ! DOCTYPE html >, however I saw on a site that they declared only this: < ! DOCTYPE >, the semantic value is lost or the browser reads…
-
5
votes2
answers2002
viewsWhat versions of the Android SDK should I have installed at least?
When I downloaded Android Studio and opened SDK Manager it shows some packages to be downloaded and installed. I saw that it has several versions of Android. My doubts are: Which of them are…
-
5
votes2
answers601
viewsHow to take the path of the open executable in C
How can I capture the path of the executable in C and place it inside a string?
-
5
votes2
answers4659
viewsComparing only the Datetime field date in C#
I only need to compare the date of two fields DateTime. DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0); if (aux.Equals(DateTime.Now)) { //Alguma ação... } In the code above, I need you to enter…
-
5
votes1
answer1136
viewsHow to block a range of Ips with php?
I have a function in php, but I wouldn’t like it to be run by people from a certain country, as I do for the php script to block a range of Ips? Example, block the US IP range. You need to be able…
-
5
votes1
answer850
viewsHow to encode and decode Base64 strings in C?
I need to encode (and decode) a JSON to be transmitted from the Web to a microcontroller. The JSON that I am sending is encrypted with the AES 128, but the cyphertext It contains non-printable…
-
5
votes2
answers1642
viewsHow do you convert an Enum guy into a list?
Is there any way to convert a Enum in List? public enum TiposHospedagem { Casa = 1, Hotel = 2, Pousada = 3, CasaCampo = 4 } I’m trying to run the enum and add to the list, but the foreach does not…
-
5
votes3
answers148
viewsVariable is not updated in constructor
I’m learning OO and venturing into PHP, only I came across something that I think in theory should work, but in practice does not work. <?php class Users{ public $name; public $idade; public…
-
5
votes1
answer707
viewsNotification icon in Android 5.0
I’m creating a push notification system with firebase in my project. The code that generates the push is like this: notificationBuilder = new NotificationCompat.Builder(this)…
-
5
votes1
answer699
viewsHow does MVVM actually work?
How does MVVM actually work? What are the responsibilities of Viewmodel and Model? I’m implementing a standard project MVVM some time ago, but now some questions have arisen about the. Where to…
-
5
votes2
answers379
viewsHandle 404 error without using Try/catch
I have the following code snippet that makes an HTTP request, only that sometimes the URL does not work, then will be launched an exception by framework. HttpWebRequest request =…
-
5
votes2
answers1524
viewsCondition on Join or Where?
Is there any difference if I use: select * from a left join b on a.id = b.id and b.id2=1 where ... or select * from a left join b on a.id = b.id where b.id2=1 Sent on: Fri ? The first SQL returned…
-
5
votes2
answers1014
viewsHow can we get the execution time of a script?
You’re reading the question here Compared to Datetime class, the date function is more performative? and did some tests with the answer by Daniel Omine, but I got results that didn’t seem at all…
-
5
votes1
answer356
viewsHow to change the template(visual) of an Asp net mvc5 page according to user
Here’s the thing, I need to read a property that returns me 1,2,3... and with it I determine what kind of visual the page will have, template01,template02... how I would do this using areas, and…
-
5
votes1
answer566
viewsBecause my program does not generate CSV in UTF-8 that can be read correctly by Excel, but Notepad generates
I have generated files .CSV in javascript, in UTF-8, but not read with the correct encoding in Microsoft Excel (generating invalid characters instead of accents, as if you were reading ISO 8859-1 or…
-
5
votes1
answer155
viewsHow to modify/evolve a distributed Infinispan cache "hot" without losing entries?
Context I have a cluster with some nodes of the Jboss EAP 6.4. Applications in this node cluster share a cache embedded mode infinispan with UDP synchronous distribution (Jgroups):…
-
5
votes2
answers6328
viewsHow to view HTML code?
How can I display my code HTML? I have a field where the user can change his nick by putting colors, and I want to display the code used as a hint to the user. My code: <pre> <code>…
-
5
votes1
answer812
viewsHow to send special characters from CMD to a file?
I want to send the character > to a file via CMD but I’m not getting. The following example illustrates my difficulty: echo casa > cidade > Estado >Arquivo.txt In the above example you…
-
5
votes2
answers7910
viewsRead text file and play the content in positions in an array!
I’m not sure I can read a file .txt and store your data in different positions in one array. The file is saved as follows: city=A(100,80); city=B(160,70); city=C(110,50); city=D(140,120);…
-
5
votes2
answers418
viewsHow to reverse FILTER_SANITIZE_SPECIAL_CHARS
Guys I took a variable and converted her using the FILTER_SANITIZE_SPECIAL_CHARS. Example: filter_var ("hug' o", FILTER_SANITIZE_SPECIAL_CHARS); The result: hugD' o How do I reverse this?…
phpasked 8 years, 2 months ago Hugo Borges 5,294 -
5
votes1
answer537
viewschange output type to currency
I have a code that gives me two columns, Expense and Total, what I can not get is that in the output of the totals it gives me in currency format (R $ 1,000,00). the code is this: SELECT nome_evento…
mysqlasked 8 years, 2 months ago Roberto Gomes 455 -
5
votes3
answers1017
viewsIs there a limit or restriction on variable name sizes?
When I started programming they said it was good practice to abbreviate variable names to shorten their size. However, I have recently researched and seen that this concept has changed. And today in…
javascriptasked 8 years, 2 months ago alan 1,908 -
5
votes1
answer933
viewsFile . exe in Visual Studio 2015
How do I generate an executable running on any machine without . Net installed? The one in the briefcase bin/debug does not serve because he needs the . Net to run.
-
5
votes2
answers1280
viewsThe location obtained by getLastLocation() always returns null
I’m making several attempts, but I can’t get the current location of a user using the Location API. I am running the following example: public class MainActivity extends AppCompatActivity implements…
-
5
votes1
answer58
viewsProblem in Jquery code
Hi, guys. I’m doing this: A system where the user can shuffle the order of the images. Click the button and randomly they change places. So far so good, the problem is that when I get back and play…
javascriptasked 8 years, 2 months ago Alex 55 -
5
votes4
answers354
viewsHow to put Nextel mask in an <input> with Javascript?
I’d like to put a mask on a <input> waiting for the format Nextel: <input type="text" name="nextel"> The problem that according to the website the format of Nextel is this: Urban: 2…
-
5
votes1
answer625
viewsHow to update fields with fields from another table?
I’m not able to update one table with another’s select. I have a table mdl_user which contains several columns and created another users_sg to copy some columns. I copied with INSERT INTO users_sg…
-
5
votes3
answers421
viewsQuery with conditions in SQL SERVER
Follow the tables below with my question I have a problem, where I make a filter in which I need to get the posts that have the column post_parent of the post table with value other than 0, and also…
-
5
votes1
answer12952
viewsGenerate all combinations given a python list
I’ve searched far enough and found nowhere exactly what I want. What I want is, given a list of characters, generate all possible combinations from size x to size y. Example: 0.1.2 and order size…
pythonasked 8 years, 2 months ago Júlio César 53 -
5
votes1
answer2775
viewsLoad Combobox from a List<>
I’m trying to load items into one ComboBox from a List<>, worked out however, later I would need to get the code referring to the selected item, but it is not working. The code to load the…
-
5
votes4
answers18339
viewsJavascript customize confirm, replace text button "ok" and "Cancel", run function only if clicked on ok
How can I customize confirm, replacing the button text OK and Cancel? I also wanted to run the function only if you click OK. Follows down the code without success yet <script> function…
javascriptasked 8 years, 2 months ago Vitor Marques Lourenço 617 -
5
votes5
answers7434
viewsremoving part of a string with php
I have a variable with the following link: https://www.youtube.com/embed/z1n34sRv1-A I need to remove everything that comes before the embed, or need the following id: z1n34sRv1-A How can I do this…
phpasked 8 years, 2 months ago Hugo Borges 5,294 -
5
votes1
answer73
viewsTimeout when using httr:POST()
Expensive, I’m trying to hold a conference of records at CREA-RS website, but every time this giving the following error: Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached…
-
5
votes1
answer353
viewsHow to deserialize a list with items of type { "key": "value" }?
I need to deserialize a JSON, but I can’t map the enumerated object. Follows the JSON: { "list": [ { "1": "Bola" }, { "2": "Quadrado" }, { "3": "Retangulo" } ], "code": 0, "success": true } My…
-
5
votes1
answer349
viewsDoes Task.Run always start a new Thread?
When executing a list of tasks initiated through Task.Run, it is ensured that each one is executed in a different Thread? When reading the documentation, it seems to me that this is the default…
-
5
votes1
answer469
viewsWhich HTTP methods use payload?
I am doing a monitoring for the services of my company and I need this information to proceed.
-
5
votes2
answers3336
viewsHow to drag an element freely on the page with pure javascript?
I wonder how to move an element on the page freely with javascript without frameworks, it would just drag and drop in any corner of the page
javascriptasked 8 years, 2 months ago Tales Breno 369 -
5
votes1
answer7321
viewsHow to pick attributes from an option field with jQuery
I have the following code: <select name='exemplo' id='exemplo'> <option value='1' class='teste' dado='a'>1</option> <option value='2' class='teste' dado='b'>4</option>…
jqueryasked 8 years, 2 months ago Amanda Lima 3,428 -
5
votes2
answers5579
viewsHow to take only the number after the comma
When I do the 162/11 calculation, the result obtained is 14,72727272727273. But when I use the code System.out.printf("%.1f", teste);, the number is displayed 14,8. I’d like a way to keep just the 8…
javaasked 8 years, 2 months ago Lucas Caresia 2,663 -
5
votes1
answer399
viewsIs there any way to define a max-height of an element equal to the window size, with pure CSS?
I have a sidebar, which can contain n items in a listing. My sidebar’s kind of like this: In my source code, I defined the following css to work: .sidebar { max-height: 400px; overflow-y: auto; }…
-
5
votes1
answer3400
viewsHow to create . BAT to rename multiple files into multiple folders by inserting date and time of creation?
Someone knows how to create .bat to rename multiple files into multiple folders by inserting date and time of creation, not the current date? Example: Nome Data e hora de Criação SCP Dados.mdb…
batchasked 8 years, 2 months ago Augusto Vasconcelos 59 -
5
votes2
answers1476
viewsTransforming Multidimensional Array into One-Dimensional
How to turn this array into PHP: array:6 [ 0 => array:1 [ "EF1A" => "00001" ] 1 => array:1 [ "EF2A" => "00001" ] 2 => array:1 [ "EF3A" => "00003" ] 3 => array:1 [ "EF4A" =>…
phpasked 8 years, 2 months ago Amanda Lima 3,428 -
5
votes7
answers11400
viewsHow to validate phone in php
I’m trying to validate the phone number, both landline and mobile, and I’m trying to do so no matter how the user writes: 11965453789 (11)965453789 (11) 965453789 (11) 96545-3789 It will always save…
-
5
votes1
answer438
viewsHow to implement timeout in recv() in socket. h
I’m wondering if there’s any function to put a timeout together with recv() using Socket.h. Code example: // Variaveis UINT in_socket_handler; struct sockaddr_in server; // Cria o Socket…
-
5
votes0
answers8377
viewsLaravel 5 - Timezone Wrong Time
I switched the Timezone 'timezone' => 'America/Sao_Paulo', but not getting the GMT +3, which is the one in Brasilia. You have to trade something else somewhere else, off app.php?…
-
5
votes1
answer838
viewsHow to get a CSS attribute from a tag?
Hello, I need a help. I would like to know how to get values from an html tag using javascript. such as: take the marginLeft value of an image that was determined by a css file. I hope I’ve been…
-
5
votes1
answer127
viewsSVG mosaic comic style
I’m developing a comic style layout and wanted help to create a svg. in the case the last comic is similar to the photo placed from the DC commics (from Batman). Somebody help me create this last…
-
5
votes2
answers3166
viewsHow to get the current path of a . sh script?
On Linux-based systems whenever I need to use the following command: #!/bin/bash BASEDIR=$(dirname "$0") echo $BASEDIR But I read in different places that $(dirname "$0") not supported by Mac OS X…
-
5
votes1
answer776
viewsAllocation Space for Mysql Fields
First I create the model in my application, then the Entity Framework generates the SQL for the table creation. The first statement generates a column with the type varchar(20), the second generates…