Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer1013
viewsPress "Guide" to search the site?
Recently I went to the site of Sopt by Google Chrome and I came across an interesting feature that is the "Tab to Search" (Omnibox). In short, by typing the address of a website and pressing the…
google-chromeasked 7 years, 10 months ago Randrade 21,612 -
7
votes1
answer126
viewsWhy are the padding and margin properties calculated in relation to the width of the parent element?
The declared percentage values are calculated, for the four sides, relative to the width (width) of the parent element. See the following HTML: <div class="pai"> <div…
cssasked 7 years, 10 months ago Filipe Moraes 8,737 -
7
votes2
answers3863
viewsDisable HTML5 Video Download Button
After updating Opera and Chrome, using the tag video started to appear the video download option, as below: Does anyone know how to disable this? I am using the following code: <video width="800"…
-
7
votes2
answers38101
viewsChecking if value exists in an array via search field
In pure javascript I can use indexOf(), something like that: var chaves = ['wmv','3gp','mp4','mp3','avi']; if(chaves.indexOf("avi") != -1) { alert("Ok!"); } But in the case of a search ground I’m…
-
7
votes3
answers815
viewsIn PHP are all variables declared global?
In C# there is the concept of local variables, see the example below: if (true) { int valor = 10; } else { valor = 5; } Console.Write(valor); The above code returns an error saying that the variable…
-
7
votes2
answers5722
viewsWhat is the difference between Wait() and Sleep()?
The meaning of the two words seems very similar. What’s the difference between wait() and sleep()? When to use each?
-
7
votes2
answers512
viewsSort Datetime field only by Date part
I have a property of an entity that’s like DateTime? and in SQL Server is of the type datetime also. I need to make a query that sorts by date, but without considering the time, because in this…
-
7
votes2
answers312
viewsHow to check an object type attribute in Javascript?
I get the following object: obj = { fernando: { nome: 'Fernando', idade: 21 }, tiago: { nome: 'tiago', idade: NaN }, total: 2 } As you can see, I receive an object where each attribute can be…
javascriptasked 7 years, 10 months ago fernandoocf 1,095 -
7
votes1
answer307
viewsConvert Excel (.xls) to (.htm)?
I made a system for a school, where from the Excel file, where are stored all school newsletters, I export to .htm, where it generates some files with this extension and from there I can cut the…
-
7
votes1
answer2011
viewsCascadetype.ALL doesn’t work. Am I using it wrong?
In my code, I have the classes Author and Book, with the relationship Many To One, as below: Java author. import javax.persistence.CascadeType; import javax.persistence.Column; import…
-
7
votes3
answers2700
viewsJS - Object array for array arrays
How do I convert an array of objects to an array of arrays in javascript? I did so, but returns an array of objects var items1 = new Array(); $.map(objResposta, function(value,index) { teste = new…
-
7
votes2
answers413
viewsHow do I return a particular character from a text?
How do I return a particular character from a text? For example: text = "Eu sou vegano" How do I detect the 5th letter of text? If anyone would help me, I’d be grateful.…
luaasked 7 years, 10 months ago arthurgps2 411 -
7
votes2
answers4162
viewsIdentify and retrieve PUT and DELETE variables
I’m developing a solution for API, I can currently identify the method by: $_SERVER['REQUEST_METHOD'] How can I get the variables PUT and DELETE? As in the GET and POST i use: $_POST; $_GET; When…
-
7
votes2
answers1078
viewsRender subtitles in video with ffmpeg?
I have some subtitle files that are separate from their respective videos, and I would like to join them using the code below: ffmpeg -i videoSemLegenda.mp4 -i legenda.vtt -c copy -c:s mov_text…
-
7
votes2
answers701
viewsWhat would be DSN?
Whenever I see someone preparing some configuration for database, I see appearing the term DSN. I see it happening in the parameters of PDO (class to connect to PHP Database). Example: $dsn =…
-
7
votes3
answers403
viewsBest practices in Javascript variable declaration
In the MDN Variables section we have the following statement: For that Reason, it is Recommended to Always declare variables at the top of their Scope (the top of global code and the top of Function…
-
7
votes3
answers1368
viewsHow to make a burger menu open from right to left?
I have a menu hamburguer which opens from left to right however, I would like it to open backwards, from right to left, as I do this? Next down my code: /* * Open the drawer when the menu ison is…
-
7
votes1
answer88
viewsHow to list the synopsis of classes?
I started to venture into python and am making program that lists class properties. I use obj well.dic, help(obj), and dir(obj). Someone knows if there is a command that lists the synopses of the…
-
7
votes1
answer740
viewsSqlite and Mysql synchronization
I have an application in which I have a database using Sqlite and an external service using Mysql. Basically it’s a task application, where I can create a task in mode offline. When the user has…
-
7
votes1
answer223
viewshow to center tabs of a Tabbedpane?
I have been doing some research, but I did not find it. I would like to know, how to center the tabs of a Tabbedpane. They always start from the left, but since they are only two tabs, I wanted them…
-
7
votes1
answer77
viewsIn the Web context what is a proxy?
How to work with this technology and what its use on the day of a web application is in the case of client or server ? Use cases can be in any language, just for understanding its functioning.…
-
7
votes3
answers312
viewsTransform a string into multiple substrings whose contents are between apostrophes
I am creating a program in C# that reads a text file and one of the lines of that file has the following format: 'Column 1' 'Column 2' 'Column 3' I want to turn that line into one array of strings…
-
7
votes2
answers3172
viewsHow to add Card Mask?
I’m having a problem to re-adapt this function in JS. function mcc(v){ v=v.replace(/\D/g,""); v=v.replace(/^(\d{4})(\d)/g,"$1 $2"); v=v.replace(/^(\d{4})\s(\d{4})(\d)/g,"$1 $2 $3");…
-
7
votes1
answer2009
views"Incorrect datetime" value in Mysql
Hello, I’m trying to enter dates in the format dd/mm/Y in two jTextField, in MYSQL, however I get an error message only for the first field: Incorrect datetime value: '01/01/2016' for function…
mysqlasked 7 years, 11 months ago Claudio Pedra 83 -
7
votes3
answers89
viewsHow to parse a string array for a multidimensional array?
I have the following array: Array ( [0] => MemTotal: 4060964 kB [1] => MemFree: 3630320 kB [2] => MemAvailable: 3789472 kB [3] => Buffers: 93040 kB [4] => SwapCached: 0 [6] =>…
phpasked 7 years, 11 months ago Fábio Jânio 3,407 -
7
votes1
answer353
viewsHow does the syntax of Tagged template strings: fn`text ${10} text`work?
One of the novelties of ES6 are strings template. How this new syntax applied to functions works? For example, what does this code? applyStyle ` #minhaDiv { background-color: ${'#ccf'}; width:…
-
7
votes1
answer514
viewsIs there any project organization standard for C++?
In Java and Actionscript3.0 we use namespaces based by directory path, I see much use of namespace, but are not based on the "location" path of the class in the folder. I searched a lot if there was…
-
7
votes1
answer8641
viewsError in Assembly reference
I am trying to add a reference to my project, but when I add and run the project it presents this error: Unable to load file or Assembly 'Waitwindow', Version=1.0.6164.26027, Culture=neutral,…
c#asked 7 years, 11 months ago Jeremias Santos 189 -
7
votes2
answers293
viewsHow to destroy a $Scope. $watch?
I have the following $scope.$watch in the controller of a directive I created: var interval; $scope.$watch('active', function () { if ($scope.active == true) { interval = $interval(function () { if…
angularjsasked 7 years, 11 months ago Wallace Maxters 102,340 -
7
votes3
answers7194
viewsWhat is a method " __contruct()"?
I am starting studies on POO, and came across the following method: <?php class ShopProduct { public $title = "default product"; public $producerMainName = "main name"; public $producerFirstName…
-
7
votes3
answers1883
viewsBind Javascript
I wrote this code as a study for understanding bind. I create a method on an object and try to call it by changing Scope to another object. let car = { sound: 'Vrrrrummm', startEngine: function() {…
javascriptasked 7 years, 11 months ago Felipe Coelho 569 -
7
votes1
answer235
viewsPlot 3D figures for list data
I have a list a with three matrices and one vector v with any three frequencies (positive reals), these matrices form triangles through a function I created pplot. I wish to add vector information v…
-
7
votes2
answers544
viewsdot width index 100%
In CSS you can do an index equal to Word by picking 100% of the container width and using dots to separate the "title" from the "page number"? Type: Introduction - - - - - - - - - - - - - - - - - -…
cssasked 7 years, 11 months ago Nilson Rodrigues 83 -
7
votes3
answers2556
viewsHow to join multiple lists in a matrix
How would a way to merge two lists into one matrix, where each column of the matrix represents one of these lists. Example: a = ["Laranja", "Maçã", "Uva"] b = [40, 50, 2, 45, 56] Expected result: x…
-
7
votes3
answers189
viewsIs it better to have a kind of exception for each case or a more general exception?
A project from my college was asked to create a class called RepositorioException which is a subclass of Exception to be used for handling exceptions in repository classes, where:…
-
7
votes2
answers2119
viewsWhat is it, Trigger?
I was looking about triggers on this site, but found no question about triggers and then: What are Triggers? When to use a Trigger? How to use a Trigger? What are the uses and applicability of…
databaseasked 7 years, 11 months ago Igor Contini 663 -
7
votes1
answer13017
viewsTuples in a database
I know what a Python tuple is but not in a database, so follow the question: What is a tuple in the database context?
-
7
votes1
answer131
viewsHow to dynamically insert into an Std::array?
I’m migrating from C to C++ language, and I want to stop using traditional C language means, like the C vector. It is possible using the std::array insert elements dynamically as in std::vector?…
-
7
votes1
answer275
viewsWhat is the purpose of while(*variable) and if(!*variable) in the statements "while" and "if"?
In Code Review there is a implementation of a simply chained list that I am using. However, in the reply of one of the users, he made some modifications to the list, and had a particular…
-
7
votes1
answer316
viewsproblem in resize.js function
I’m having a problem not being able to send the original name of my images for the database it is stopping in my function reside.js more precisely where is this stretch _this.output(canvas,…
-
7
votes1
answer827
viewsCopy a numpy.array without modifying the original
Given a numpy.array as the next: r = np.arange(36) r.resize(6, 6) Which results in: array([[ 0, 1, 2, 3, 4, 5], [ 6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17], [18, 19, 20, 21, 22, 23], [24, 25,…
-
7
votes2
answers174
viewsDoubt in recursive function
When I put: return n * fatqua(n-1) the program returns the expected result that is 24. But when I put: return n * fatqua(--1) the result of the program is 0. I’m not getting the logic of this…
-
7
votes5
answers7032
viewsHow to return the sum of numbers of an array with indices of value greater than or equal to 2
I have the following array: array[0,2,0,0]; I need to create a function that only adds indexes with a value greater than or equal to two, as I should proceed? In this example you must return me 2;…
-
7
votes2
answers8300
viewsHow to create a toggle on and toggle off button?
I have seen that in some registers, they are using the button a lot toggle. Someone would know how to do it?…
-
7
votes2
answers6930
viewsWhy doesn’t my image appear when running the app?
I have the following xml code in Android Studio: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" xmlns:app =…
-
7
votes1
answer764
viewsStructure/Organization Project C#
I have a project that I am developing in layers, so far I have the following: Access to data, presentation, business and transfer objects. The doubt is as follows: Example: I have one form to…
-
7
votes1
answer20447
viewsProblem with facebook API
On the site, I’m using the facebook API to login, only when I try to login through the facebook button appears this message: Unable to load URL: The domain of that URL is not included in the…
-
7
votes1
answer1097
viewsWhat is the Milestone field on the github for?
In the issue edition of github there is a field called Milestone. I would like to know what it’s for and what is that date and percentage that appears on the side.
githubasked 8 years ago Danilo Silva 307 -
7
votes1
answer182
viewsHow to improve this algorithm?
The goal of my algorithm is to make the user train division: he will have to hit 10 times in a row the quotient whole (that is, without decimal places) and the rest of the division. I made this…
-
7
votes2
answers658
viewsWhat does a class diagram contain?
The title is a kind of stupid question, because the name of the diagram already answers. But yesterday this question came to mind when a professor of Analysis and Software Projects asked the whole…