Most voted questions
150,413 questions
Sort by count of
-
5
votes2
answers1026
viewsHow to resolve "Typeerror: must be Unicode, not str" error in Python?
When backing up my database on Sqlite3, the Python interpreter returns the following message: Typeerror: must be Unicode, not str on the line f.write("%s\n" % linha), I couldn’t find a solution…
-
5
votes3
answers1590
viewsHow to add or subtract a digit in the Textbox via a button?
I want to add to a number in a TextBox generating a digit when the user clicks the " + " button and subtracts when he clicks the " - ". For example: the random number was 2. If I click on +, 3…
-
5
votes4
answers2064
viewsWhat are the main differences between Handler, Thread and Asynctask?
The Android documentation can end up being a little confusing for those who are starting to understand better what are the differences between a Handler, one Thread and a AsyncTask. Handlers sane…
-
5
votes2
answers1021
viewsHow to restrict access to routes in Angularjs?
How do I restrict access on some routes, and allow logged in users to access your content in Angulajs.
-
5
votes1
answer170
viewsEF is giving Timeout in a query that should be instantaneous
When I run the SQL generated by the direct EF on Sqlserver it runs with less than 1 second. When it runs through the timeout application it takes more than 30 seconds. I’ve seen a lot of this…
-
5
votes3
answers2406
viewsAccess content from another project in the same Solution
Here’s the thing: I have a Solution with two Projects, one Administrative and one Website, both using C# and MVC4. In the first project I save images and files in a folder Documents, and when…
-
5
votes2
answers813
viewsTreat Arithmeticexception in another method
I want to create a divide method (double a, double b) that has Try/catch to catch the Arithmetic Exception, returning an error message by System.out.println; as it is not in the main method, I do…
-
5
votes3
answers6933
viewsRotate matrix by 90º
I need to create a C algorithm to rotate a 10x10 matrix by 90 degrees, however I cannot use an auxiliary matrix for this. Simplifying what was asked to try to find some pattern and use it to solve…
-
5
votes3
answers4489
viewsLike "startar" a Node server?
I installed Node, created the environment variable (NODE_ENV) speed value. When I installed and configured, I printed out a arquivo.js with hellow world and it worked. Today, I want to start the…
-
5
votes2
answers361
viewsHow to Create a Bubble Plot
Anyone with experience in formulating this graph? I am very doubtful, especially in the diameter of the circles and in the placement of the variable of the X-axis. I am a doctoral student at UFPE…
-
5
votes1
answer408
viewsOperations on matrix with no defined size
I need to perform operations on a matrix that will be passed by parameter, the problem is that its size is not fixed so I do not know how to perform the loop to go through the end of a column or row…
-
5
votes2
answers7902
viewsHow to define the vector size dynamically in C?
In language C I can define a vector specifying the size for example int vet[3]; how can I set the size of vector dynamically, for example by asking the user to inform the size of the vector ?…
-
5
votes2
answers138
viewsMake jQuery-Tools Handle accompany a team
I use the jQuery-Tools to create a custom effect scroll in a div as in the following example: "use strict"; var id_label_ms = document.getElementById("count_label_ms"); var range =…
-
5
votes1
answer285
viewsFormatting decimal
I’m having a problem formatting decimals in my code in Objective-c, I would like to take advantage only 2 decimal places of my variable which is float. Ex: Value of the variable discount =…
-
5
votes1
answer775
viewsCatch event click inside iframe with jQuery
I’m using the Google Forms to do a satisfaction survey on a site. On this site I show a bar at the top, asking the user to participate. If he closes the message, a cookie is saved that expires in 24…
-
5
votes2
answers1321
viewsWhat are the differences between "type=button" and "type=Submit" in an input?
I have a simple Javascript code to add a string to a list ul: JS: function init() { var botao = document.getElementById("addButton"); botao.onclick = handleButtonClick; } function…
-
5
votes1
answer75
viewsIs it possible to hide a public method from the abstract class?
I have the following scenario: public abstract class ClasseA { public string[] MetodoC(string parametro, string nomeObjeto) { // ações metodo } } public class ClasseB : ClasseA { public string[]…
-
5
votes1
answer200
viewsGet widget without id
I have a div, and within it one canvas without id and other elements. <div id="itens"> ... <canvas></canvas> ... </div> How can I get the canvas using JQuery?…
-
5
votes2
answers189
viewsRegex - Operator "." - Meta character capture
Situation I’m conducting a survey with regex in a specific word inválido, but I decided to use inv.lido. Which I knew I had in the test string but didn’t return. Testing vr = var_dump pr = print_r…
-
5
votes1
answer283
viewsFill Combobox with Dapper
I’m using a component of combobox with the Dapper, but I’m not able to fill the combobox properly, follow code excerpt: LookUpEdit ctlControle = (LookUpEdit) pr_Controle; var parametro = new…
-
5
votes1
answer1630
viewsSaving a JSON in Database vs Relationship?
When I didn’t know much about the question of database structure and relationship between tables, I used to use JSON or comma-separated data in a given field of any table in the database. In fact, I…
-
5
votes2
answers1415
viewsAdjust Barcode Size Barbecue
I’m generating a barcode using the BBQ, but where I print the code is reduced or is the paper has dimensions 8 cm wide and the information I have to generate the barcode has 44 digits. I’ve tried…
-
5
votes3
answers1134
viewsHow to access the $Cope variable?
I wonder how I can access the contents of the variable scope in Angularjs? Theoretically I did everything "correct", ie declaring the variable in controller and assigning values in it: var app =…
-
5
votes1
answer6498
viewsHow to Build a Webservice to Synchronize Android and Mysql Sqlite Database
I built an android app that stores basic information about a contact in Sqlite: Name, Telephone, E-mail, Address among others. I searched a little and from what I understood, what I can do is use a…
-
5
votes1
answer442
viewsLabel with two lines in chartjs
Have that graph where use chartjs and would like to put a label with two lines, \n nor <br/> has worked.…
-
5
votes2
answers1905
viewsHow do I get the browser user’s language?
I have a website in 3 languages, EN, EN and ES. But on some distinct machines when accessing the site by the browser is directing to page on English. This happens because of the code below which I…
-
5
votes5
answers142
viewswhat is the best way to create elements?
for(var i=0; i< numTotalPerguntasDig; i++){ strInterface += "<ul>"+ "<li class=\"col-md-2 \">"+ " <button type=\"button\" class=\"btn btn-danger btn-info-bloco form-control\">"+…
-
5
votes4
answers456
viewsMemory allocation for pointers
I’ve been reading and studying on pointers and came across the following quote in a book: "Although it is possible to use them as vectors, pointers do not have their own memory. You can only use…
-
5
votes1
answer3246
viewsHow to define predefined types in Mysql?
In the site I’m developing I will, for example, a registration form where the user should define their gender in a combobox (male or female). The table users in the database will have all user…
-
5
votes4
answers9200
viewsQuery using like operator
In a query in the database I inform the keywords, the month and the year. I want to get the data according to the keywords, the month and the year. For example: the word school on date 2015-08. For…
sqlasked 9 years, 10 months ago André Nascimento 1,258 -
5
votes2
answers1301
viewsHow to expect everything to load before performing a function?
How can I delay a function, being that checkboxs are generated dynamically, in the conventional way in javascript, and only run after the whole page is rendered and the other Avascripts are…
javascriptasked 9 years, 10 months ago Marcello Infoweb 141 -
5
votes3
answers12860
viewsHow to fill left zeros in Python?
In php, I know we can fill a number with zeros through the printf Example: printf('%04s', 4); // Imprime: "0004" How could I do that in Python? When I try to do it the way above, the result is not…
-
5
votes3
answers605
viewsMetro style checkbox
I need to change my checkbox to be identical to the following image: should look like this when it is marked, when it is not marked, remove the whole edge and figure at the end. I did not enter code…
-
5
votes2
answers188
viewsIs there a jQuery selector that takes the html from its own tag and also the content?
Example: <div id="quadro" style="float:left"> <h1>Quadro de horários</h1> </div> If I use $("#quadro").html() I only get H1, but I want H1’s html and div’s own. I need…
-
5
votes1
answer1579
viewsProblem with log4j configuration
How do I configure the properties of log4j? In my application, I am receiving the following message: log4j:WARN No appenders could be found for logger (org.docx4j.jaxb.Context). log4j:WARN Please…
-
5
votes1
answer206
viewsDoubt with Codefirst Entityframework
I’m starting in Entity Framework and I have a question regarding Codefirst. Why I have to use as virtual some properties like the example below? [Table("Grupo")] public class Grupo { public int ID {…
-
5
votes2
answers4140
viewsCatch user city with IP
I need to take the city that the user is in at the time of access to the Control Panel of the Site. 'Cause I need this? I’m willing to block access to the control panel only for my client’s city,…
phpasked 9 years, 10 months ago Alexandro Zaleski 215 -
5
votes2
answers1919
viewsGoogle Maps with multiple markers coming from the database
I have a code where he takes the longitude and latitude of where you are and puts it on a map. I need to make this map show all the latitudes and longitudes of the database with markers at each of…
-
5
votes1
answer2773
views"The getPreventDefault() method should no longer be used. Instead, use defaultPrevented"
In some browsers, such as Google Chrome, always when "move" in some element of the page, the following message appears: Event.returnValue is deprecated. Please use the standard…
-
5
votes4
answers64762
viewsMysql installation socket error
I am unable to uninstall or make Mysql 5.5 work on my Ubuntu Linux 14.04.LTS, every time I try to access it, I get the following message: ERROR 2002 (HY000): Can’t connect to local Mysql server…
-
5
votes3
answers96
viewsDoubt how to use a Less class with RAZOR
I’m doing some research to implement a feature to make life easier when it comes to programming. It is possible to do this? We are using VS2013 with Razor. I have the following class Less:…
-
5
votes2
answers695
viewsPHP Matrix How to Fill
Guys want to fill this matrix. It works but when I try to put more than one result in the same line only the last one appears. How to fix? <h1>Mapa</h1> <?php $linha=0; $coluna=0;…
-
5
votes2
answers296
viewsHow to make a LINQ/lambda and consume it in the view?
I have an object called Radio: public class Radio { public int RadioId { get; set; } public string StreamUrl { get; set; } public bool Ativo { get; set; } public bool Mp3 { get; set; } } I’m doing a…
-
5
votes1
answer372
viewsData modeling via JPA and Hibernate
I’m doing a project with JPA regarding a quotation system and I’m having doubts on how to build the relationship between classes, and would like (if possible) some opinions. My project is a quote…
-
5
votes1
answer374
viewsIn Hibernate, whenever I change the Entity configuration, do I have to drop the tables in the database?
Example: I have the Person class below: @Entity public class Pessoa { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long idPessoa; private String nome; //getters e setters }…
hibernateasked 9 years, 11 months ago Tiago Ferezin 1,567 -
5
votes1
answer1081
viewsHow to call Procedure using Asp.net MVC with Entity Framework
In an application Asp.net mvc, using ADO.NET with Entity framework and mysql, I have a procedure, that returns a listing. CREATE PROCEDURE SP_CATEGORIAS() BEGIN select * from (select a.id,…
-
5
votes2
answers2885
viewsBlocked cross-origin request
Hello, I am trying to load a page from another application into a div of my application using the jQuery load but my application is not loading the page and shows the following error message:…
-
5
votes3
answers211
viewsHow could I improve the code?
Is there any way to improve this code? lista = [0,0,0,0,0] acuNota = 0 x = 0 arq = open("notas","w") while x <= 4: lista[x]= float(input("Insira uma nota por favor!")) acuNota = acuNota +…
-
5
votes3
answers747
viewsWorking with ID limit on large volumes
I have in mind some questions about large volumes of data on MYSQL, concerning the limit of ID. I will give as an example ID guy tinyint to simplify the explanation. In the example the field tinyint…
-
5
votes2
answers111
viewsCombining column value with Mysql
I am working on a report in Mysql where I need to show a percentage of several events that occurred with a group of entities. The structure of my table is as follows: | id | eventoA | eventoB |…