Most voted questions
150,413 questions
Sort by count of
-
5
votes4
answers1684
viewsDynamically check which attributes of a Model have been changed?
I am developing an ASP.NET MVC 4 application and need to save the log of each change made in a Model object. Is there any native method or implementation already known to do this? Example: public…
-
5
votes1
answer419
viewsProblems using Java classes in Oracle Database
I’m having trouble using classes Java a little "complex" in the Oracle. When I use a simple class, as an example below: CREATE JAVA SOURCE NAMED "Welcome" AS public class Welcome { public static…
-
5
votes1
answer1036
viewsTranslate datepicker Kendo UI with Angularjs
I need to translate the Kendo date Picker for English, I already insert the i18n file into my html but it didn’t work, I did the same at angular and it worked with angular my html <head>…
-
5
votes3
answers2101
viewsHow to put transition in a dropdown of a menu?
I currently use the following code: $("#menu").find('li').hover(function () { $(this).children('ul').clearQueue().slideDown(600); $(this).children('a').children('ul').clearQueue().show(0); },…
jqueryasked 10 years, 2 months ago Alexandre Lopes 2,769 -
5
votes1
answer841
viewsProblem Dropdown menu bootstrap
I have my dropdown menu But I always have to give 2 clicks for him to open the menu, I would like on the first click it already opens... You could have had him without the element <a? that’s my…
-
5
votes2
answers572
viewsPrimarykey, Foreignkey and Unique With JPA
I have the following situation: Student Entity (id and other) Entity Evaluation (id and others) Entity Notaavaliacaoaluno (avaliacaoId, alunoId) I want to transform the attributes valuedId, alunoId…
-
5
votes1
answer529
viewsHow to remove json xml encapsulation returned by Webservice
I created the following method: [WebService(Namespace = "http://myDomain.com.br/PublicacaoService")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]…
-
5
votes1
answer844
viewsFormat date and time and list according to current date
This application has two tables: Students and Occurrences. To show the occurrences I can calmly... Only now I’ve come up with a new business rule: show occurrences by date. So basically it would be…
-
5
votes1
answer141
viewsError of logic?
I have the following code: mãe(ana, eva). mãe(eva, noé). mãe(bia, raí). mãe(bia, clô). mãe(bia, ary). mãe(lia, gal). pai(ivo, eva). pai(raí, noé). pai(gil, raí). pai(gil, clô). pai(gil, ary).…
prologasked 10 years, 2 months ago Wellington Viana 196 -
5
votes4
answers3838
viewsHow to run a PHP function in the background?
I’m using the cPanel API to add dynamically parked domains. So far so good, send the required data via jQuery.post() only that this process takes a little to be completed, about 1 minute. Have some…
-
5
votes3
answers10379
viewsHow to create web payment system using PHP
I would like to create an e-commerce, but I do not have much knowledge about it. And I still have the following question. How to create a payment system via boleto or card, is there any framework or…
-
5
votes2
answers15380
viewsopen new php window
On the site I have several advertising banners. When I click on a banner, I am redirected to a page that counts clicks on the banner. After this count I am redirected to the page before the banner…
-
5
votes2
answers148
viewsDetect when a form is sent
How could I detect when a form is sent with pure Javascript? It would be the equivalent of this in jQuery $('#form').submit(function(event){ alert('Meu callback'); event.preventDefault(); }); I was…
javascriptasked 10 years, 2 months ago waghcwb 1,915 -
5
votes2
answers938
viewsI have a multi-language site, in the matter of SEO which is better: Using Subdomains or Directories?
I am creating a site with several languages (Portuguese, Spanish, English). On the question of SEO what is the most correct way to use? Subdomains ( pt.meusite.com ) or Directories ( meusite.com/pt…
seoasked 10 years, 2 months ago Alexandre Lopes 2,769 -
5
votes1
answer7442
viewsWarning when trying session_start(); PHP
Does anyone know what this Warning might be? Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at *caminho*) in *caminho* on…
-
5
votes1
answer161
views"unveil" folder in GIT
I had an altered file in the vendor folder that was in gitignore, then I gave a message and I didn’t read it :( and gave a git -f add . and forced to add the file that was in gitignore, so he added…
gitasked 10 years, 2 months ago Daniel Lemes 661 -
5
votes2
answers12256
viewsModal within a modal
I have a modal that opens on another modal, as I would not allow this modal that is open on the other modal not to close when I click off it. Note: I am using bootstrap, I tried using…
-
5
votes4
answers1387
viewsHow do I know if it’s a tablet or a smartphone?
How do I know I’m working on one tablet or a smartphone with the Android API? Nowadays resolutions, dpi are almost the same thing between tablets and smartphones and it gets complicated to know…
-
5
votes4
answers186
viewsDropdown menu opens partially
I have a dropdown menu using twitter-bootstrap 3 and it is inside a <li class="media">, then each <li> has a dropdown with some actions, it happens when as the height of the <li>…
-
5
votes1
answer155
viewsOptimized approach of checking if there is a certain entry in Windows hosts file
I have a Java web application with Applets that access services on the web. These services are accessed through a specific hostname (example: services.webapp.com.br) configured in the application.…
-
5
votes3
answers1130
viewsAccess negative index from an array
BUG? I was building a library for Arrays treatment and came across the following situation: When including a value to a negative index within my Array, this index does not appear when using some…
-
5
votes1
answer2096
viewsAlgorithm for cutting plane
I don’t know if this is the best place to ask this question, but I searched the Internet a lot for some algorithm for cutting plan - that informing the dimensions of the pieces it shows the best…
-
5
votes3
answers8755
viewsWhat is the best way to replace a character in a given String position?
I need to replace a character at a certain String position(). Example - Swap character[21] with 'X': String Original = 01078989469150999134B B 2116456 Modified String = 01078989469150999134B X…
-
5
votes2
answers579
viewsLive video playback using websocket
I would like to stream a video that is in my database (Mysql) and would like to know if it is possible to play live media content using websocket, and if it is how I could build? I have in mind that…
-
5
votes1
answer704
viewsDatetime field view in View without part of Hours
With the code below I am recovering the Datetime with time past the date, what I would not like. cursos.Data = DateTime.Parse(collection["Data"]); I tried to format using substring inside…
-
5
votes2
answers144
viewsJavascript object return syntax
Using the Chrome console I used the following code (valid): function foo() { return { prop: "some value" }; } when the syntax style is changed is no longer valid ({ played to next line): function…
-
5
votes2
answers426
viewsPHP: elements with and without explicit keys in the same array
I’m trying to figure out a better or cleaner way to do something like this in PHP: // Isto será passado como argumento de uma função... $params = array('Nome', 'Idade', 'Mail' =>…
-
5
votes1
answer2687
viewsWhat is simple association in object orientation?
When I asked here on composition and aggregation I was thinking that any association between two objects fell into these categories (not counting inheritance). But then in the answer I saw that…
oopasked 10 years, 3 months ago SomeDeveloper 18,074 -
5
votes3
answers1021
viewsIterated inline functions
In several articles, I read that adding an inline function within an iteration(while,for) generates an unnecessary consumption of system resources. Write down: #include <iostream> inline int…
c++asked 10 years, 3 months ago Weslley C X Sardinha 1,427 -
5
votes1
answer888
viewsPHP (setcookie) vs header (header )
I see some frameworks, CMS and the like, writing cookies directly in PHP with setcookie and others stock to send us headers at the end of the run. I wanted to know how to create a pattern for the…
-
5
votes1
answer120
viewsIs it possible to call the Internal (no visibility operator) method from a class inherited from another package?
Problem I’m trying to create some extra behaviors in some native Android components. For that I am creating a class above the Android component and rewriting some situations I intend to have a…
-
5
votes1
answer862
viewsJavascript Startup of Objects
I’m new to Javascript, and I’m using a framework Restangular written with Angularjs for HTTPS requests. I’m having a hard time initializing a literal object, with the following structure:…
-
5
votes1
answer323
viewsHow to get SHA1 from a String in Swift?
I know there’s an object SHA1 but I’m still learning the syntax, so, my beginner question is, given a simple string: var greeting = "Hello!" How to get SHA1 from greeting in Swift?…
-
5
votes1
answer2819
viewsMinimum bits required to represent a natural number
What is the most performative way to find the minimum number of bits needed to represent a natural number (i.e. no signal) in Javascript? There is a way to do without using loops? The code below for…
-
5
votes1
answer3583
viewsHow to apply a style to two different elements using :Hover?
Considering: HTML <div id="div1"> <p>Elemento 1</p> </div> <div id="div2"> <p>Elemento 2</p> </div> How can I use the :hover in the div1 to change…
-
5
votes3
answers339
viewsWhy is ':' used in queries?
I was looking at a php script and noticed that every time SQL query was written, this "operator". A part of the code $sql = "INSERT INTO categorias (nome) VALUES(:nome)"; $stmt = DB::prepare($sql);…
-
5
votes2
answers16197
viewsHow to print a javascript variable inside an html tag?
How to print a javascript variable inside an html tag? <script> (function() { var PORCENTAGEM = '25%'; })(); </script> <div class="progress progress-striped active"> <div…
-
5
votes1
answer12035
viewsOperation of the Spring Framework @Transactional
1 - The Spring documentation describes the use of @Transactional Spring in the business rule classes(ProdutosService for example) there is some special reason to use this annotation in these classes…
-
5
votes1
answer356
viewsConfiguring Vagrant for Small Teams
I have a small team of developers PHP and I want to set up their development environment using Vagrant. However, I have some doubts. How I provide a Vagrant configuration for other developers to…
-
5
votes2
answers1037
viewsUse "ping" on a Python site
In Windows CMD it is possible to use the command ping to take the IP of certain websites, for example: ping www.facebook.com.br Is there any way to do something similar using Python 3.4?…
-
5
votes1
answer3992
viewsHow to perform a method in a given time?
I need that at certain programmed hours, a method is executed even if the user is outside the application.So I searched I will have to use services? I didn’t quite understand how to program time, I…
-
5
votes1
answer1863
viewsDifference between using the main element versus a div with role="main"?
Thinking in terms of accessibility, described by WAI-ARIA, you need to define the element with the main content of the page with role="main", in order to improve the accessibility of the page for…
-
5
votes3
answers456
viewsInfinite object?
I ended up doing something that made me curious: I created a Cao class to follow: public class Cao { String nomeDoCao = null; Cao caes = new Cao(); public void setName(String name) { nomeDoCao =…
-
5
votes3
answers279
viewsHow to test whether an instance is dynamic or static?
Say you access an object you don’t know how it was created and you want to know if it was instantiated as new \Acme\Foo() or if it was just returned \Acme\Foo; What is the most practical test ?…
-
5
votes1
answer230
viewsPHP says that two equal strings have different lengths
I want to compare two strings but something unusual happens. I have the code: <?php $char = 'Á'; var_dump('Á'); var_dump($char); The variable $char receives 'A' and the result is as follows.…
-
5
votes1
answer235
viewsWhat is the difference between the + and - signal in Objective-C
I wanted to know the difference in the time of creating a method using the "+" and "-"? And also when to use and why to use, I usually only use the "-", but I don’t know how to use the method with…
-
5
votes2
answers1174
viewsInstantiating an Object with a different reference
I’m learning polymorphism in Java, but I’m having some doubts. public class Animal { int numPatas; public void fazerBarulho() { // Código do Método } public void comportamento() { // Código do…
-
5
votes3
answers51028
viewsRegex - Special Character Removal C#
Regex.Replace. is a great solution to remove accentuation. Now I just can’t do the removal of a character type, I have a string that receives the text "1° General Place", string has the character…
-
5
votes2
answers1470
viewsWhat is the real meaning of using ε-transitions in NFA?
Well, I still don’t understand the logic of using ε-transitions in NFA, what is the real meaning? Jump from state without making a reading? For example, given the regex: a* NFA: DFA:…
automataasked 10 years, 3 months ago Victor Martins 798 -
5
votes1
answer772
viewsWhat does the crossDomain:false parameter in Ajax mean?
I’m implementing an image upload web application on Ajax and there is the parameter crossDomain:false in an example finding. What is the function of this parameter?