Most voted questions
150,413 questions
Sort by count of
-
9
votes1
answer253
viewsWhat is it, Reason?
I recently heard of Reason, but I don’t know what it is, some call it a programming language, others a syntax powered by Ocaml, I know that it’s led by Facebook and that it’s very good for simple…
terminologyasked 7 years, 2 months ago Felipe Duarte 6,284 -
9
votes1
answer63630
viewsWhat is the function of getch(); and conio. h library?
What is the function for getch();? What’s the library for conio.h; what is the use? For example in a code like this: #include <stdio.h> #include <conio.h> int main() { printf("Hello…
casked 7 years, 2 months ago Tiago Gonçalves 141 -
9
votes2
answers31808
viewsThe difference between COALESCE and NVL
In Oracle when we have a table that has two campuses A and B, and in selection (select) we want to show B when A is null we have two commands that present us the solution: Coalesce Select…
-
9
votes3
answers8997
viewsLike saving and getting out on VIM?
I have a problem (I think it’s a problem) in the text editor of vim. When I create a file readme.md and then I take command vim readme.md, open the editor and then the problem begins. When I type…
vimasked 7 years, 2 months ago Matheus Macedo 135 -
9
votes1
answer983
viewsIs there any way to record the webcam through HTML5?
I know there’s a way (I’ve even used it on at least 5 systems I’ve developed) to open the webcam by HTML5 and capture a photo (I do it using the canvas). Example Camera Capture with Html5 But I had…
-
9
votes1
answer436
viewsHow and when to use "Labels" in Javascript?
In objects/JSON we use : for keys and values, for example: {x: 1} As discussed in How to use the two points in Javascript? However, I was working on a small script to try to detect the JSON format…
javascriptasked 7 years, 3 months ago Guilherme Nascimento 98,651 -
9
votes1
answer636
viewsWhat is the best way to login to the app via facebook and login to a Rest(spring boot) server?
I’m creating an app with React Turn on where I log into facebook and also have information of this user, created after login, on a Rest server that I developed with spring boot. As in the Rest…
-
9
votes4
answers865
viewsSplit a 16-digit number in PHP
Number: 9999999999999 Stay like this: 9999 9999 9999 9999 $num1 = "9999"; //parte 1 $num2 = "9999"; //parte 2 $num3 = "9999"; //parte 3 $num4 = "9999"; //parte 4 I would like to do this without…
phpasked 7 years, 3 months ago Wolf Prog. 91 -
9
votes3
answers291
viewsIs it correct to write CSS with Javascript?
I see a focus on javascript frameworks, to write the css directly in javascript, example... new Vue({ el : "#style", data : { ctn : { display: "flex", alignItems: "center", justifyContent: "center",…
-
9
votes1
answer667
viewsFirebird SQL and Union ALL without duplicating items
I have an appointment SQL searching in two table one leading and one of historical only when I run the query the values come duplicated I use UNION All because if I put the UNION or DISTINCT…
-
9
votes0
answers477
viewsHow to install and configure the Boost C++ library on Windows?
For some time I have been working hard to learn C and C++, I believe I already know enough to write a slightly more complex application using Sockets and Threads. Searching a little, I discovered…
-
9
votes4
answers351
viewsMeta Author does not embed on the site
Whenever I share a post from my site on my Facebook page, the name of the author appears on the news side. But this week, he stopped coming. I was researching and saw that it is problem with meta…
facebookasked 7 years, 3 months ago Felipe Viero Goulart 3,693 -
9
votes1
answer1020
viewsThe name of the dt_ultimo_access column was not found in this Resultset
I’m deploying a method passing an id parameter: @RequestMapping(method = RequestMethod.GET, value = "/entidadesUsuario/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public…
-
9
votes1
answer4493
viewsHow to make a "deep copy" in Python?
Let’s say I have the following code: class Foo: pass foo_list = [Foo() for _ in range(10)] How can I proceed to create a copy of foo_list without the references of both the list and the objects…
-
9
votes2
answers211
views -
9
votes1
answer3518
viewsPush git "Everything up-to-date " Data is not actually sent
I’m pushing to a repository in gitlab.com. I get the feedback: Warning: redirecting to https://gitlab.com/fellipesillvaoff/Dados_Agronomia.git/ Everything up-to-date In my mind, it worked. In…
-
9
votes4
answers1255
viewsConverting Httppostedfilebase to byte[] : Exception_wasthrown
Follows code: Controller (with post action): var file = Request.Files[0]; var bytes = ConvertTo.Bytes(file); Convertto class : public static byte[] Bytes(HttpPostedFileBase result) { var length =…
-
9
votes1
answer23344
viewsSQLSTATE 42000: Syntax error or access Violation: 1071 Specified key was Too long; max key length is 767 bytes with PHP
After I created the project with the command composer create-project --prefer-dist laravel/laravel laravel-scout I have been making the following changes to the archive .env DB_DATABASE=course…
-
9
votes1
answer1307
viewsWhat is the advantage of front-end frameworks like React?
I was talking to some friends and in the conversation they told me that frameworks like React would be mandatory for front end programming nowadays. I wanted to know your opinion on this, on why to…
-
9
votes2
answers745
viewsProblem with str_replace php
str_replace does not compare the whole string, only compares half the string. I have an associative array: $arrayFrutas = [ "banana" => f.banana, "bananaGrande" => f.banana_grande ]; There I…
phpasked 7 years, 4 months ago Lucas Lima 773 -
9
votes1
answer298
viewsReserved word include or "use" in PHP?
I saw somewhere that word reserved include in PHP should be used only in procedural programming, and that in object-oriented programming the word reserved should be chosen use. I haven’t found…
-
9
votes2
answers3537
viewsWhat is the function of the «??» operator (two questions) in PHP?
Analyzing a script PHP at a certain point I came across this line $valor = $_GET['id'] ?? 1; What is the interpretation of this code? What does it do?
-
9
votes3
answers46833
viewsHow to rename the column name SQL Table
I want to rename the column name via SQL. I am trying as follows: ALTER TABLE nomes_clientes RENAME COLUMN primeiro_nome TO nome, RENAME COLUMN segundo_nome TO sobrenome; But that way it’s not…
-
9
votes1
answer207
viewsWhat is the difference between String name = "test" and String S4 = new String("Peter");
What’s the difference of assigning a value to a variable by creating an object and assigning Unboxing at a direct value? String s4 = new String("nome"); String nome = "nome";…
-
9
votes1
answer690
viewsWhy is it better to use char[] than String for passwords?
Using Swing, the method getPassword() of JPasswordField returns a character array char[] instead of returning a String like the getText() (which by the way is discontinued). I should not use String…
-
9
votes1
answer597
viewsHow to calculate Shannon entropy based on HTTP header
Shannon’s entropy is given by the formula: Where Ti will be the data extracted from my network dump (dump.pcap). The end of an HTTP header on a normal connection is marked by \r\n\r\n: Example of an…
-
9
votes2
answers1789
viewsWhere does the Git pull point?
I was reading the Git documentation about pull and I got confused: So let’s create a hypothetical sequence: I cloned the repository I made a git branch which shows only the master. The command git…
gitasked 7 years, 5 months ago zwitterion 2,876 -
9
votes1
answer349
viewsIs unit testing a generic term? What types are there? And what ways to apply?
Unit testing is a generic term for any test of an independent part of a program? Or is it a exclusive term for object-oriented paradigms, with procedures already known? Every time I find any post…
-
9
votes2
answers18748
viewsconvert json to javascript array
How do I convert the following json in array: { '0': '{ "codBanco":"085","banco":"cecred","cedente":"Aluno…
-
9
votes3
answers40567
viewsWhat is the correct way to concatenate strings in Javascript?
I started learning Python and was told that I shouldn’t concatenate the strings with , but use the method .format(). And in Javascript it is correct to use + or , to concatenate the strings or there…
-
9
votes3
answers3392
views_ (underline) in consultation with LIKE
I’m making a query where I need to return all information from a given table, which contains "_R_" in the nomenclature. However, when using WHERE NM_CAMPAIGN LIKE '%_R_%' he returns me to other…
-
9
votes1
answer1343
viewsFullscreen Video on Android Webview
I have an application made on Android Studio using webview and runs a remote web application. The video is displayed perfectly on the webview. However, the option to fullscreen is not available in…
-
9
votes2
answers785
viewsArraylist versus List
Why in C# we should prefer to use the List instead of ArrayList?
-
9
votes1
answer420
viewsHow can I "postpone" the startup of a property?
There are situations where the property initialization is not possible to be made in the declaration, its value is only known later. An example of this is, on Android, references to views of a…
-
9
votes3
answers189
viewsWhat happens in the expression "$a+++(+$a)"?
I was playing with PHP to see if I could find something that sounded strange with the syntax, inspiring me in the question What happens in 1...1 in PHP?. I just came across the code: $a = 0;…
-
9
votes1
answer1028
viewsWhat is the maximum number of items I can put inside a List<T> in C#?
I have several questions of performance in my application. What is the maximum number of items I can within my List<T> and what is "acceptable" within good practice.
-
9
votes1
answer1654
viewsWhat is a cellular automaton?
What is the cellular automaton about? What kind of problem can it solve? It’s something equivalent to turing machines?
-
9
votes2
answers993
viewsIs there the equivalent of Andalso and Orelse in C#?
In VB.NET there are two interesting operators: the AndAlso and the OrElse. When used, the logical expression is not evaluated in full immediately. See the following example: If (Not Usuario Is…
-
9
votes1
answer1978
viewsHow to program in a modular way?
I am studying some concepts here and I want to see if I have the right ideas and also launch a(s) question(s). In modular programming (either structured or OOP) instead of my application being…
-
9
votes2
answers2136
viewsWeb API x Webservices
Web API was created to better replace a Webservice? If not, what is the exact difference between the two and when to use one or the other?
-
9
votes1
answer94
viewsWhy can Unboxing only be made for the type that was previously performed Boxing?
I’ve been searching for why there is Unboxing and Boxing, the answers I found say there is to value types have the same behaviour as Reference types, for example on non-generic lists ArrayList. So…
-
9
votes3
answers235
viewsWhy is it not possible to use comparison operators with Nan?
Nan - The global property Nan is a special value meaning Not-A-Number (not a number). The curious thing is that it is not possible to perform operations of comparison with this almost mystical…
-
9
votes1
answer219
viewsHow to read a file in Prism?
I was trying to read a file in Prisma but I can’t find the correct function: local arquivo = 'arquivo.txt' imprima(arquivo) On the moon, it would be something like local file = 'file.txt';…
prismaasked 7 years, 6 months ago Rafael Lemos 551 -
9
votes2
answers532
viewsWhat is the first programming language or technology used for dynamic pages?
I searched a lot on the subject, I read about the front-end story, like the beginning of the Javascript® (Mozilla/Netscape), but I was really curious about the back-end and I really can’t find…
httpasked 7 years, 7 months ago Guilherme Nascimento 98,651 -
9
votes5
answers1163
viewsPHP only connects to Mysql?
I’ve never seen PHP connect using other databases, like Oracle, for example. In Mysql, to connect, you use mysqli connect, what if it were in another? PHP is integratable with which database?…
-
9
votes3
answers9259
viewsTime difference between two dates with Javascript?
Hello. I have these two dates: var dtPartida = "20170620 11:20"; var dtChegada = "20170620 16:40"; And I need to figure out the difference in time between those dates that in the case and 5 hours…
-
9
votes1
answer292
viewsIs it possible to determine whether an array of bytes represents a pdf file that cannot be edited?
Context I have two steps in my service, uploading and downloading the file. When uploading to the service I receive the data through an array of ASCII bytes. This data is stored in a database. In…
-
9
votes3
answers977
viewsHow to know the size of an object in memory?
I’m not after a method/operator sizeof because I already understand that JAVA doesn’t have it, but I need some way to measure at least on average how much memory an object spends, even if it is…
-
9
votes1
answer1539
viewsWhy use VAR in PHP?
Why use VAR in php if we can already declare variables without VAR? We can do this: $teste then why do it? var $teste For example, it’s the same thing I do? class Caneta { var $modelo; var $cor; }…
-
9
votes2
answers1167
viewsForeach of C# vs Foreach() of EF6
Follows code: ForEach() of EF6: var result = ctx.Table.Where(x => x.User == "João").ToList(); result.ForEach(x => x.Read = true); ctx.SaveChanges(); foreach of the C#: var result =…