Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer272
viewsFill in a collection type property
Good personal evening how to fill a collection property using this type of structure in a class: public class Order { public string orderNumber {get; set; } public DateTime orderDate {get; set; }…
-
7
votes1
answer15160
viewsA potentially dangerous value Request.Form has been detected in the client
I’m having trouble sending this type of input in the input field: &&&&%$&#_(@)(#_!**@#)24 R87R XDHNSIFN 89Q7201784 Dangerous Resquest.Form Error occurs. Error message: Controller…
-
7
votes2
answers4418
viewsWhat does it mean to create an object with that asterisk?
Although I knew programming for a reasonable time, learning C++ with QT, I came across something I hadn’t seen in other languages. I noticed that some objects (not all) need to be created with an…
-
7
votes2
answers11472
viewsJust grab a div from another page via jQuery
Grab content from another page by javascript or jquery On another question I wanted to know how to get content from a page. In this I wanted through this code to catch only one <div> instead…
-
7
votes2
answers1287
viewsConvert Base16 string (Hexadecimal) to Base10 (Decimal)
I have the following string "615769EF", hexadecimal. How to convert it to base10 and let the result be the string "01633118703" ?
-
7
votes2
answers718
viewsHow do I add two strings in C#?
I have a method that will take two strings and return the sum of them in string format. I use string because there will be +-30 digit numbers. I’m having trouble converting to add. :/
-
7
votes1
answer480
viewsMerge CSV with Python
I have a collection of dozens of CSV files. Most of them share the same fields, but some have unique fields. I want to merge them, using Python into a single CSV file with a global cabling that…
-
7
votes2
answers3134
viewscalculate difference between two dates in months on the R
How do I calculate the difference between two dates in months on the R? Suppose the two dates: x <- as.Date("2014-01-07") y <- as.Date("2015-03-17") I can easily calculate in seconds, minutes,…
-
7
votes1
answer2796
viewsWhat are Macros and how to use them?
So far during my C programming course, the only contact I had with macros came from standard libraries and not really knowing what was going on when calling these macros. I would like to know…
-
7
votes2
answers8059
viewsRun Windows Prompt commands and save the output in a text file
I have a program that launches a command of Prompt windows. I want to copy the output of this command and save to a text file. Example: The command is ipconfig and I want the output to be copied to…
-
7
votes2
answers1353
viewsWhat can the Model do to validate the MVC?
In an MVC project developed in PHP, I should validate what in model and what in controller? Hash of passwords I’m doing in the method set of the classes model. Certain validations that are not…
-
7
votes0
answers73
viewsHow did Microsoft manage to customize the title style of the tab?
Looking at the new Microsoft page for Windows 10, at least in Ubuntu 14 / Chrome 43, I realized that the font size of the tab was larger than the source of the other open tabs. In Firefox 38, this…
-
7
votes1
answer97
viewssetInterval does not repeat
I’m trying to solve the following problem: On my page, the setInterval does not repeat, I tried several ways, until simplify in the mode below to see if it would work, but even so it does not…
javascriptasked 9 years, 4 months ago Diego Sousa 103 -
7
votes1
answer5553
viewsjava.lang.Illegalargumentexception error in Hibernate when working with Enum
Take a look at the error message: jun 02, 2015 5:23:57 PM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute ADVERTÊNCIA: /WEB-INF/template/pedidos/CapaPedido.xhtml @29,99…
-
7
votes1
answer82
viewsIs it possible to know at what point the script reaches the memory peak?
It is possible to know at what point the script reaches the memory peak? I have a PHP script that at the end shows this result: Usage: 380.515625Kb Peak: 393.5859375Kb Real: 512kb Example: <?php…
-
7
votes3
answers438
viewsHow to make a standalone script using Global.asa
I’m looking to run a script that records information into the database every 24 hours. I’m not the server administrator, so I don’t have access to Scheduled Tasks, I read in some articles that I can…
-
7
votes1
answer1024
viewsQuery user data logged in Windows Authentication
In my application I use the authentication mode="Windows" as a form of authentication. This way, I can know the user name, referring to the field in AD and the domain of the same using…
-
7
votes1
answer382
viewsDatagridview VB Celulas Editaveis
Hello, I have a Datagridview that is populated by a Bindingsource and when I load the data I can’t edit the Cells with value, only when I load the empty Datagridview, I tried to use…
vb.netasked 9 years, 5 months ago Hebert Lima 987 -
7
votes5
answers26037
viewsAccentuation in the JSON
I have accentuation problems when printing JSON. If I use characters like ã, õ, ô, ç, some codes appear. I do not know if it influences, but the column is with Collation "utf8_general_ci". php…
-
7
votes2
answers6238
viewsHow to know if the file is being used by another process before trying to read
My system does N jobs on top of a list of files, eventually I get this exception: System.IO.Ioexception: Process cannot access file 'C: XXXXXX xxxx.xxx' because it is being used by another process.…
-
7
votes2
answers213
viewsHeroku deploy with Bower-Rails
I have the gem 'bower-rails' installed in my application but when deploying I have the following error: I added the gem rails_12factor I’m using the buildpack: heroku buildpacks:set…
-
7
votes2
answers160
viewsPrevent Insertion of Zalgo Text in Inputs
I have a Aplicação Web that has user registration, I would like to know how to prevent the user send as name, email (registration data) a Zalgo Text. Example of Zalgo Text: T̃͟͏̧̟͓̯̘͓͙͔o̤̫͋ͯͫ̂…
-
7
votes2
answers521
viewsHow to serve files with access control in Django?
When studying Django, the typical way to handle uploading files was to create a folder media on the server - establishing a MEDIA_ROOT and a MEDIA_URL in the settings.py - where any uploaded file…
-
7
votes1
answer307
viewsProblem with Unity 5 3D Development
I’m developing a game using the Unity 5 and when executing (give play in the game), the following error appears and I am not able to understand it, I think it has to do with some process denied, but…
unity3dasked 9 years, 5 months ago Ticiano Vasconcelos 113 -
7
votes1
answer569
viewsBlock redirect of extensions and folders with . htaccess
I’m trying to create a redirect with htaccess and I got it in the following way: <ifModule mod_rewrite.c> RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d…
htaccessasked 9 years, 5 months ago rafaeloliveira 419 -
7
votes1
answer1504
viewsHow to publish a . EXE secure, other than through Click Once . Net
My scenario is composed as follows: I have applications, which are configured according to each customer, are apps sold in bulk, I have a support system, which automates this configuration and…
-
7
votes2
answers739
viewsProblems with Hibernate Lazy
Friends, all good? I have a problem that is the famous: org.hibernate.Lazyinitializationexception:. I know this is because the session has been closed and Hibernate can’t connect to make the selects…
-
7
votes1
answer481
viewsPopulate aggregate class from datatable using a Dataset with LINQ C#
I’m having trouble filling an aggregate class in C#. Is it possible using LINQ? Does anyone have any example of how to solve this problem using the return of a DataTable or DataSet? public class…
-
7
votes2
answers313
viewsAccess variable based elements
I need to assign the value to a label, example: xrLabel1.text = "teste", but as I have several Labels where changes only the number at the end example: xrLabel1.text = "teste"; xrLabel2.text =…
-
7
votes2
answers4428
viewsTable to record history record (Best way)?
I am doubtful what would be the best way to create a table so that each action of a record is saved thus creating a history of it. I have the following table, but I don’t know if it’s the best.…
-
7
votes2
answers31518
viewsPicking the first characters of a string
How I replace a string in Javascript? I’m taking the name of the page. var str = window.location.pathname; The name of the url is "/checkout/9/finalizacao" I want to change to "/checkout/" In the…
javascriptasked 9 years, 5 months ago Felipe Jorge 1,479 -
7
votes1
answer1357
viewsProblem placing multiple data from a list in a report
Good morning guys, this is a somewhat complicated question to explain, so I will do my best to make the question clear. I have a list <UnimedLote>. In this list I have several data, among…
-
7
votes3
answers1117
viewsHow to use Gesturedetector?
I would like a practical example for this method, because I want you to detect left motion run a command and if you go right run another command. Searching the net I found this code seems to be…
-
7
votes1
answer341
viewsFunction Expression vs Function declaration
What is the definition for Function Expression and Function declaration? What are the main advantages of one in relation to the other?
-
7
votes3
answers3334
viewsClose Windows popup in Java (Selenium Webdriver)
I am testing a site in java and need to close a Window pop-up, the problem is that I tried to use Selenium to close it and I could not. Is there any simple way to close it using JAVA? You don’t need…
-
7
votes2
answers1770
viewsObject filter disregarding accents in Angularjs with Ionic
Fala galera, I’d like to do a filter on the Angularjs that overlooks the accents. This filter is applied on top of a list of objects that have a name property for example that we filter on top of…
-
7
votes2
answers4016
viewsPays to migrate from Swing to Javafx?
Currently most of my applications are made with Swing. I’ve done 2 small projects web with JSF+Primefaces+Hibernate. My question is this:: It pays to quit Swing and study Javafx, or it’s better to…
-
7
votes1
answer6657
viewsWhat is attr_accessor in Ruby?
I’m learning Ruby on Rails and in the content I am studying I could not understand well what is the attr_accessor and how it works.…
-
7
votes1
answer128
viewsIs there any way to optimize this code?
How to optimize this code to make it faster? if (strpos($qt, "blood") !== FALSE){ if (preg_match("/^blood (?<blood>.+)$/", $qt, $match)){ switch ($match['blood']) { case "a+": $result = "A+";…
-
7
votes2
answers5978
viewsBest practices when presenting Android loading screen
The best known and widespread approach to show the user that a request to the network is happening and make it wait until the end of this, has been through the use of the component ProgressDialog.…
-
7
votes3
answers23448
viewsFooter "glued" at the bottom of the page and responsive (variable height - using bootstrap)
I’ve been following similar issues here on stackoverflow and other web sites, in addition to tutorials on the internet, but the vast majority of solutions do not work as I need, or even are…
-
7
votes1
answer5624
viewsChange selected item color - select > option
I got the following select. It is possible to change his blue color to one I want to apply, red for example?…
-
7
votes2
answers15219
viewsGrab the file extension
Hi, I tried to use the pathinfo() but I guess I didn’t use it the right way, I’d like to know how to use. $arquivo_up = $_FILES['arquivo']['name']; $extensao = pathinfo($arquivo_up); $extensao =…
-
7
votes2
answers538
viewsWhy omit the PHP closing tag?
Every good book of good practice and wiki starts with this "rule" but no one offers good reasons. What good reasons to ignore the closing tag ?> of PHP?
phpasked 9 years, 5 months ago Paulo Costa 3,976 -
7
votes1
answer2048
viewsSimple form by Django
If I have in mine model a class usuario, a phones and a class manager, who are one to one, so: class Usuario(models.Model): login = models.CharField(max_length=50, unique=True) senha =…
-
7
votes3
answers300
viewsRecover groups of a regular expression in Perl
I am running this regular expression to separate the digits of a version: ([\d]+)+ As you can see in this example, it works well enough to cover my needs. However, I have to add this treatment in a…
-
7
votes1
answer609
viewsHow to compare "set" images in Imagebuttons?
Personal how do I compare whether the drawable image "set" in an Imagebutton is equal to null for example, or the other Image contained in another Imagebutton? ImageButton q1 = (ImageButton)…
-
7
votes2
answers2210
viewsPHP on linux or windows
Explanation: I know it’s a controversial question, but I’m not an old man of programming and I have knowledge of linux, but I never chose it because I use C# from time to time and in my college they…
-
7
votes2
answers207
viewsRegular expression start, end
I have two regular expressions: $exp1 = '/^abc.*\_20150430.txt$/' $exp2 = '/^def.*\_20150430.txt$/' Must return true for archives started by abc in the first and def in the second. In the two…
-
7
votes2
answers1066
viewsListview or Gridview in Windows Forms
I’m studying about Windows Forms Aplication. I made a tutorial where Listview is used to display the data of a query according to the parameters passed. But I noticed that you also have Gridview for…