Most voted questions
150,413 questions
Sort by count of
-
9
votes1
answer1656
viewsYoutube on Webview for Android app
Does anyone know how to view a Youtube video or any streaming video through a WebView? In the code below, there are three buttons. The first takes the user to the link he typed, the second is fixed…
-
9
votes2
answers3468
viewsBest route calculation algorithm
I’m doing a logging system that addresses the issue of routes/routing. Where I should choose the best route to travel. Initially I am only doing some tests and testing advanced algorithms, what I am…
-
9
votes3
answers1750
viewsSmooth element animation swing via CSS Transform
The concept being sought is the continuous motion on the X axis between a value and its negative representation: So far, this concept has a flaw, the animation is performed from 0 degrees to the…
-
9
votes3
answers4910
viewsSplit result equals zero in decimals
In division 1 by 3, my program is printing the following: number e' of 0.00 What is the error in the code? #include <stdio.h> int main(){ float numero; numero = 1/3; printf("o valor do numero…
-
9
votes2
answers286
viewsIs it good practice to always manage mistakes with exceptions?
I’m creating a game with Python 3.4 and Pygame, and I’m using the paradigm object-oriented. In my classes, especially in __init__, am full the type checkings, to prevent Runtime errors. For example,…
-
9
votes5
answers38995
viewsHow to disable (stop, remove, delete) git versioning from a repository
I cloned a Github repository in my directory, but it came full of commits, ie versioned. I wanted to restart it as a repository, from scratch, as I do? I’ve tried the remote: git reset (didn’t work…
-
9
votes2
answers3516
viewsWhat is the right way to authenticate to a REST API used by mobile applications?
Actually there are two questions (with the right to subquestions). Today I have an already implemented token generation engine (inherited from a web application) that I am using in my REST* API for…
-
9
votes5
answers6499
viewsSave the binary content of an image in the database
How do I get the bytecode of an image at upload time to be able to store it in the mysql blob field without the need to save the image to ftp?
-
9
votes3
answers1392
viewsHow to integrate Angularjs with common scripts?
My doubt started when I tried to use the Carousel twitter bootstrap inside an Angularjs project, it didn’t work at all. I found the angular-ui, solved my problem using this component, but my doubts…
-
9
votes0
answers898
viewsComment form does not appear in theme
I am creating a new theme for Wordpress and can not make appear the file comments form comments.php. The other related elements (already saved comments, amount of comments, etc.) usually appear, but…
-
9
votes2
answers1305
viewsCustomize javascript object comparison
How to determine which value javascript should use for logical operations on objects? I am creating a competency object that needs the following functionalities: Encapsulates the logic of creating a…
-
9
votes2
answers245
viewsConfused about the correct form of Inheritance in Javascript
I am studying ways to apply Object Orientation in Javascript. I realized that there are several ways to do Inheritance in Javascript. I did the one that I thought was simple and worked. But is it…
-
9
votes2
answers717
viewsReceive variable value without passing parameter
I have the following method: private string toCamelCase(string text) { text = string.Format("{0}{1}",text.Substring(0, 1).ToLower(),text.Substring(1)); return text; } To use it I need to call it…
-
9
votes3
answers4278
viewsCreate a class dynamically in C#
I have a class "Classea" and this has an attribute "Attribute" protected. public class ClasseA { protected string Atributo { get; set; } public int Codigo { get; set; } public ClasseA (int codigo) {…
c#asked 10 years, 2 months ago TortugaGonca 93 -
9
votes2
answers295
viewsOpencv haartraining - Out of memory
I have 30 positive images and 60 negative images. When I tried to run haartraining with 4GB of memory and Quadcore processor, I get this error message: OpenCV ERROR: Insufficient memory (Out of…
-
9
votes2
answers19079
viewsFind Scroll Position of a Particular Object
It is possible to know the position of the scroll of a given object through pure Jquery or Javascript? tried var posobj = $("#meuobjeto_id").scrollTop(); However, the obtained value is always 0. Any…
-
9
votes3
answers10114
viewsWhich JSON structure to use for large data volume without loss of performance?
I am thinking about using JSON in a project, because it is highly accepted and there are many libraries ready that encode and decode it in other objects (arrays, for example), but there is something…
-
9
votes1
answer871
viewsChange class template in Visual Studio
There is a way to configure Visual Studio to create classes with public? When creating a class by template, either by menu dropdown mouse over a class name not yet existing, or by adding a class in…
-
9
votes1
answer2567
views -
9
votes1
answer422
viewsObject-relational impedance difference
Basic questioning about Object-Relational impedance Mismatch, a topic I have little experience with. It really exists? (I’m sure you do; Martin Fowler and Ted Neward already talked about the…
-
9
votes3
answers1558
viewsLast folder of a directory
How do I get the last folder from a directory. Ex: C:\Program Files\Skype The last folder would be Skype.
-
9
votes2
answers3184
viewsblock "erasing" the screen for downtime
My application works as a guide for a professional illuminator, it works passively(responds via Bluetooth to user commands in your work tool) or offline where the user can operate it manually in…
-
9
votes3
answers388
viewsRefactoring of a java class
I have a Java class that contains 1756 lines (obviously not all code, has blank lines, many comments and some commented code in case it is needed in the future) I’m implementing the structure MVC…
-
9
votes1
answer84
viewsHow to use "and" on CSS3 selectors?
I am trying to select only inputs whose class starts with "btn_" and which also have type="button". Example: input[type="button"] **&&** [class^="btn_"] It is possible to do this?…
-
9
votes1
answer21547
viewsHow can one CSS style class inherit from another class?
I have a class circulo with various properties: source and shape, etc and I have another class circulo1 with the property size and color. I have to make several circles of different sizes with the…
-
9
votes2
answers2765
viewsWhat is the concept and how to implement an Anemic Domain Model?
I would like to resolve the following doubts about the Anemic Model: What is the The Anemic Domain Model? What are the differences of implementation of that model compared to Object-Oriented Model?…
-
9
votes1
answer383
viewsWhat are classes, how do you use them, and in Javascript?
I started studying programming and Javascript 3 months ago, but so far only in technique. However I realized that it makes it very easy to understand the concept of object orientation. I already…
-
9
votes3
answers563
viewsWhich application layer is aimed at processing the most extensive and complex business rules?
I’ve been reading some questions and answers about the MVC standard and I saw that they say that the treatment of business rules in the layer is correct Controller, such as: Check if a record…
-
9
votes1
answer619
viewsCalculate the number of elements with CSS
I’m making a numbered list of regressive counters using the counter-reset. Currently I put the number of items in the list manually: .faq { counter-reset:my-counter 2; } .faq dt { counter-increment:…
-
9
votes1
answer3553
viewsHow to use a Try catch inside another?
I need to write data into a database, and if it succeeds, then I will generate a .pdf with PHP. Even if I put one try catch in a part of the code and it gives the exception, still the rest of the…
-
9
votes4
answers1270
viewsHow to notify Web Api user with Signalr?
Upon receiving a post in an application Web Api need to notify a particular customer that a new record has been entered. This user will see this notification in a client application(javascript)…
-
9
votes1
answer216
viewsPointer variable is declared null, but member function performs normally
Below follows an example of the code I’m trying to execute. //main.cpp #include <iostream> using namespace std; class A{ public: A(){} ~A(){} void teste(){ cout << "Teste" << endl;…
-
9
votes1
answer14768
viewsHow to speed up Android Studio + Gradle?
I’m going through the hardest time using Android Studio due to the delay in the project compilation process. What settings improve performance of Android Studio + Gradle?
-
9
votes2
answers181
viewsDo not ask for credentials if user is not authenticated
I have a system with two sites in the same domain. The two sites are in separate folders of the same domain, more or less like this: http://renan/foo http://renan/bar The first site (let’s call it…
-
9
votes2
answers5295
viewsReduce the size of an APK file
It is possible to reduce the size of an APK file by changing the way it is compressed? It is known that an APK file is just a ZIP file, signed and aligned. However, I performed some tests, and if…
-
9
votes2
answers37795
viewsWhat does PSR mean?
Hello folks I recently found a term called PSR in the PHP area, but the topic was not very enlightening in defining the real meaning of the word PSR, I saw that it was related to the Object…
-
9
votes3
answers739
viewsCan a video accelerator card improve non-fiction performance?
To develop in Ruby on Rails, I use here a virtual machine of Virtualbox with Ubuntu Server 14.04 without graphical interface installed. I recently discovered a configuration that dramatically…
performanceasked 10 years, 4 months ago user7261 -
9
votes4
answers2358
viewsHow to count how many times a value appears in a table
How to count how many times a value appears in a table ? Example: <table id="table"> <tr> <td> 2 </td> </tr> <tr> <td> 6 </td> </tr> <tr>…
-
9
votes3
answers6948
viewsHow to crop an image to the center when uploading it
In the project here I want to display the images in a dynamic dimension square div where its maximum size is 240 x 240. Assuming a user uploads an image with rectangular dimension (ex: 500 x 280),…
-
9
votes3
answers25430
viewsSQL command to display specific records from the "id" field
Which SQL command would display the records where the field id were 22, 23, 25 and 27?
-
9
votes2
answers274
views -
9
votes1
answer5156
viewsWhat is the difference between @Inject and @EJB when injecting an EJB?
I have an EJB that relies on another EJB, so I’m going to use dependency injection to satisfy that dependency. My question is: what is the difference, advantage or disadvantage between @Inject and…
-
9
votes1
answer230
viewsWhat is the difference between pg_query and pg_execute?
I’m new to Postgre and I see pg_query and pg_execute in the application I’m working on, however I can’t see the difference between the two. I have to make an insertion and I’m not sure which to use.…
-
9
votes3
answers17316
viewsRun external application with Javascript
What code should I use to launch an external application from a computer from an HTML page? Another time I was told that this code would be in Javascript: var shwll = new ShellObject(); var…
-
9
votes8
answers6579
viewsCheck user browser in PHP
How do I check if the user is using the Internet Explorer browser, version 10 down, so I can display a message for him to update that before entering my site?
-
9
votes1
answer260
viewsDocumentation in XML
I develop a framework in PHP and would not like to comment on the code of the framework directly in the classes, for several reasons. So I wonder if there is an editor that reads the documentation…
-
9
votes4
answers2911
viewsEntity Foreign Key Framework
My domain: public class SBE_ST_CorpoDocente { public int Id { get; set; } public string Nome { get; set; } public virtual ICollection<SBE_ST_Curso> Cursos { get; set; } } public class…
-
9
votes3
answers407
viewsGenerate setters only in class constructor or generate outside constructor
In Java classes, it is common (At least in college I only see it that way) create private attributes and generate getters and setters for these attributes. But I read that you can do something a…
-
9
votes2
answers7414
viewsManipulating String in Java
I have a text inside a String. I will go through this String. Going through it I need to pick up every word it contains. I thought I’d use string.split(" "); but I need to treat "." ;" "," ":" "!"…
-
9
votes1
answer999
viewsHow to update data in real time?
Sites like Facebook, Twitter even this one we are now updating their data in real time, in the case of Facebook: when a user likes some post automatically the data on your screen is updated and so…
web-applicationasked 10 years, 6 months ago Gustavo Sales 176