Most voted questions
150,413 questions
Sort by count of
-
4
votes2
answers92
viewsHow to use Gtkmm-3 and standard input together?
I want to make a program with Gtk that reads data from the standard input and interprets making drawings in a DrawingArea. The concept is simple, but I came across a problem: after I called…
-
4
votes2
answers211
viewsDisplays hexadecimal value in cmd.exe
I’m trying to show the sharp letter 'is' on cmd.exe through the hexadecimal, but the printf() only shows the value of the character itself. I’m trying the following: unsigned char eh = 0x82;…
-
4
votes1
answer1875
viewsConvert encoding CP850 to UTF8
I have a BD Paradox that returns me the following string after a query in a table of the sector that a certain worker is: Manutenþòo Elútrica. Actually it should be Electrical Maintenance. I need to…
-
4
votes1
answer487
viewsHow to make div s colapsáveis open without the buttons of the other div s descend?
I’m making a portfolio gallery, based on Bootstrap so it’s responsive. So I have a set of thumbnails that will match a work that should be aligned: By clicking on them open a collapsible DIV. I…
-
4
votes2
answers1170
viewsWhy does the Gravity attribute of the Linearlayout.Layoutparams object not work like the View setGravity() method?
Problem I’m working on a UI library for android, where I set the layout parameters (height, width, weight and gravity) dynamically via code, in an object LinearLayout.LayoutParams but the attribute…
-
4
votes3
answers1665
viewsTest automation on web pages
I would like the indication of tools to record the data entry on the page. I have already used the Selenium IDE, Selenium Web Driver. I saw that there is the iMacros. I am programming in JSF, Java…
-
4
votes2
answers3494
viewsHow to change the text of the OK button of Alert?
People I need an Alert with the "Confirm" button instead of the "OK" button. how do I do that?
-
4
votes3
answers29445
viewsHow to check if the String is null or blank in Java / Android
I went through this problem implementing a simple library of database queries sqlite in android and would like to share the solution with the community, I believe it will be useful since I have…
-
4
votes3
answers192
viewsHow to write an array post in current Intel - input file
Next guys, I’m adapting a file upload system to php. All the bulk has already been created, Insert and update and such, but in the middle of the logic needing a conditional to check if the input…
-
4
votes2
answers17667
viewsHow to send string variables as parameter to call Ajax?
The following Ajax call would send PHP the parameters corresponding to the form that called the function: var foo = "bar"; var bar = "foo"; function register(){ $.ajax({ method: "post", url:…
-
4
votes2
answers2087
viewsHow to pass arguments to a PHP script via command line?
I have a script PHP which receives arguments as follows: script.php -f "valor". How do I make PHP pass this argument via command line?
-
4
votes2
answers11327
viewsIframe view of PDF
It’s been a while since I’ve been looking for how to view PDF files in an iframe or div on the page itself, instead of opening in a new one and using Adobe Reader. Only the problem is that the files…
-
4
votes4
answers182
viewsError javascript if
I’m not able to make a condition with if for example: asd=true; if(asd=='true'){ alert('funcionou'); } but it seems that somehow it is not getting into the if…
-
4
votes2
answers241
viewsPopular programmatically x data manually
You can popular one-component data on .NET using Visual Studio interface (Select Datasource...). From the point of view of popular performance data via code is faster than manualmentr?…
-
4
votes2
answers97
viewsSubtracting matrices with different arguments
We can subtract two matrices (or two vectors) that were written with different commands? Example: x<-array(1:4,c(4,1,1)) y<-cbind(c(1:4)) x-y "Error> non-conformable objects" This means…
-
4
votes2
answers6494
viewsHow to create inverse matrix in R
To get the inverse of an array, we can use different R commands solve(), ginv(), etc, however, when trying to use these commands, an error occurs where we think the problem should be because there…
-
4
votes1
answer941
viewsHow to create invertible random matrices in R
One of the ways to find the estimator using the method of least ordinary squares is by generating random matrices, given by the formula: B = (X’ X)^-1 X’Y Where Y = a+bx+cw+u, being x and w random…
-
4
votes5
answers1944
viewsPHP MVC - Adding CSS, Images etc
Hello, in my application I am having problems when I will add a css file, image or any other file that is frontend, because when I will include I need to set the whole directory of the same, for…
-
4
votes2
answers134
viewsHow to use Logicexception from PHP?
I’m studying the handling of errors in PHP, and already know how to use Exception, but I was in doubt about the LogicException, what is its purpose? And how to use it correctly?…
-
4
votes1
answer1766
viewsMount URL without the Action or Controller name or both
Who has experience in and-Commerce, you know what I’m going to ask. Normally, when we create a route, and we call our Action related to that route, the URL is mounted like this:…
asp.net-mvc-5asked 10 years, 7 months ago pnet 14,727 -
4
votes2
answers2690
viewsEF 6, Fluent Api mapping in inheritance classes
I am training in class mapping for the Entity Framework using the Fluent API and I have some questions. The first is as follows: Map a Foreign key with attributes would be like this: public int…
-
4
votes5
answers2024
viewsReplace If/Else with Case javascript
I would like to replace if/Else with Case because I believe it will be better for understanding the code since it will be a little long, but I cannot access the Array that will have the conditions…
-
4
votes1
answer207
viewsCalls Many to Many in template
I would like to know how to make a template call to a field Many to Many of the models. Follows code: Models class Projeto(models.Model): professor_participante = models.ManyToManyField(Servidor,…
djangoasked 10 years, 8 months ago user2701678 41 -
4
votes2
answers461
viewsQMYSQL driver not Loaded Qtcreator
I am trying to connect to the database with Qtcreator as follows: this->db = QSqlDatabase::addDatabase("QMYSQL"); this->db.setHostName("localhost"); this->db.setDatabaseName("Pessoa");…
-
4
votes1
answer702
viewsHow to find the server port that answered the request
I’m using the http-proxy to create a load Speak in Nodejs, this module has the event proxy.on('proxyRes', function (res) { .. }); Within this event, I would like to grab the server port that…
-
4
votes1
answer934
viewsError: Registering ? instead of special character only using browser
I am having a problem at the time of saving the data in my ORACLE database. When using my application to fill in the fields and register a string, the special characters as accents for example are…
-
4
votes1
answer1144
viewsResize components when enlarging window
How can I resize the components inside the QWidget when enlarging the window? Example of how it looks:…
-
4
votes2
answers3675
viewsUse jQuery function only on @media screen and (max-width:960px)
We know that there are @media queries. They work with CSS. But I need to do it with Javascript. I need bxSlider to work only on @media screen and (max-width:960px).…
-
4
votes2
answers260
viewsThreads with size set via code
I have a system that at certain times uses more than a thousand threads simultaneous and unfortunately accurate run in environment 32-bits. For default, the Delphi allocates 1kb for each thread new,…
-
4
votes3
answers529
views403 Forbidden when saving data from a form
I have a field in the form that allows html tags. If you insert the following line into the field and submit the form, it returns error 403 Forbidden: <span style="display:…
-
4
votes2
answers9582
viewsPosition of blocks in Bootstrap
Hello, I’m trying to make a template in bootstrap (due to its responsiveness) but I’m stuck in a situation that I can’t find output without using javascript (which would be bad in my case). I need…
-
4
votes2
answers666
viewsView in Django does not return Httpresponse object
I am doing a simple CRUD in Django for learning purposes. However, I am having a problem. When creating a view to add data to a schedule, the server returns the following error: The view…
-
4
votes1
answer640
viewsPassing parameters to the as_json method
I am trying to pass parameters to the as_json method (overwriting the method) in my model. Because only with the date that comes from the user can I return my result. According to this past date I…
-
4
votes3
answers869
viewsTime measurement in Windows
I would like to know how best to measure the running time of a programme in C++. I found several solutions on the internet, each with an approach. Suggestions?
-
4
votes3
answers992
viewsReturn only the newest record of each author
I have a table with the following fields: id, texto, autor_id, data I need the records to be grouped by autor_id (because it has several texts with the same author) and return me in ascending order…
-
4
votes1
answer4398
viewsHow to configure Context not to put table name in plural?
I am in an ASP.net MVC 5 application, configuring a class DbContext. When the EF generates the database, the tables referring to the application objects are getting names in the plural. For example:…
-
4
votes2
answers4403
viewsMargin breaking layout in Bootstrap
I’m trying to make a Row with nested Rows but with a spacing between them, without the spacing the layout gets beauty, but when adding the margin the layout breaks! What I’m trying to do: The result…
-
4
votes2
answers195
viewsCarrierwave - destroy object only after it has been deleted from my storage
Carrierwave only deletes the 'mounted' file after the object in the database has been removed: after_commit :remove_avatar! :on => :destroy https://github.com/carrierwaveuploader/carrierwave I am…
-
4
votes1
answer713
viewsHyperlink in a Dbgrid field
I am making a small internal software to research extensions in my company. In addition to the extensions I also put an email field in the database as can be seen below: My purpose is to click on…
-
4
votes3
answers3627
viewsHow to Lock a Responsive Page in Portrait(Picture)?
Is there any solution to display the web page always in Portrait(portrait) on mobile devices, even if the user turns to Landscape(landscape) mode? That is, always leave locked in Portrait.
-
4
votes1
answer483
viewsScope of variables within $.getJSON
The variable role receives a new value in each Loop, when she’s inside the $.getJSON it takes the second value of the array and changes no more. There are two console.log(); in the code, I put their…
-
4
votes2
answers537
viewsHow to avoid calling the function
I have in my systems a call for a function of javascript and it always worked. It’s a function to display/hide an image by loading to the user. The problem is that sometimes I have to call this…
-
4
votes2
answers252
viewsInterpret and direct with URL that after domain contains a hash
I am creating a rule for interpreting addresses that after the domain begin with # followed by numbers or followed by letters whose rule should only be read if there is no file or directory matching…
-
4
votes5
answers8743
viewsCenter a form vertically
I have the following screen and I can’t vertically center this form below on the screen. I define how position: absolute; and I add the top:20% and does not move! Follows my html: <header>…
-
4
votes2
answers405
viewsHow to make a constant object in Javascript
How do I declare a constant object in Javascript? For example: /* meu código */ object_teste = {valor:5} /* console navegador */ object_teste.valor=10; console.log(object_teste.valor) // aqui ele me…
-
4
votes3
answers3112
viewsHow to check if a file exists in several different folders?
I need a PHP script that checks if a file exists in a folder, if it doesn’t exist it checks in the next one and so on... I don’t play much with PHP so I’m a little lost. I’ve tried to do with switch…
-
4
votes2
answers263
viewsLooping an array to always choose the next value
I have an array of users and need to make a looping between them. It will work like this, every time someone makes a request on the page, I need to be recorded in the database the next user of what…
-
4
votes1
answer336
viewsWidth of element with position: Absolute (box-Sizing: border-box)
Important: I’m using Twitter Bootstrap, so everything is with box-sizing: border-box. The difficulty is this: I have an element with absolute positioning. I want its width to be equal to that of the…
-
4
votes3
answers6755
viewsHow do I receive the $_GET value of a URL in Codeigniter
I am sending a value get through a link for example: <a href="/admin/editar_user/5">Editar</a> And there in the method of my controller calling the view I get: public function…
-
4
votes4
answers1101
viewsHow to check with javascript/jquery which object(s) is(is) triggering a scroll bar on the page?
I would like to build a verification script, because it is often difficult to find why the page is scrolling, especially when we use some responsive framework that has a lot of css code and a lot of…