Most voted questions
150,413 questions
Sort by count of
-
6
votes5
answers32001
viewsJSON.parse error: Unexpected end of JSON input
I’m trying to get the answer to an xhr request: ... xhr.send(formData); var resposta = JSON.parse(xhr.responseText); console.log(resposta); ... Console shows this error: Uncaught SyntaxError:…
javascriptasked 7 years, 9 months ago Amanda Lima 3,428 -
6
votes2
answers1375
viewsAndroid Studio - No accent appears
Hello, I have a very strange error in Android Studio, suddenly it stopped accepting the accents in the string and comments, when I try to type for example "is" it shows only "a". I’ve tried…
-
6
votes1
answer75
views -
6
votes2
answers3168
viewsHow does the history Javascript object work?
I wonder if there is a limit of Urls to be recovered or not, he has access to the entire history ?
javascriptasked 7 years, 9 months ago MagicHat 12,262 -
6
votes1
answer242
viewsAre cloned objects not equal when comparing to Object.equals()?
I was doing some equality tests, and when comparing two objects, being a clone of the other, I noticed that the equals returns false, even though the objects are identical. The return should not be…
-
6
votes2
answers1536
viewsFormat Date Return with Date and Non-string Format
I’m trying to return a date that is recorded right in the bank (1986-04-30 17:02:00), I try to convert this date to appear only "30/04/1986", but no use. The most I can get back is Wed Apr 30…
-
6
votes3
answers218
viewsIs it possible to load alternative . css links in case the primary link is not working?
Not really a problem, but a question that can solve several of my problems. Let’s say I upload this CSS file to my website: <link href='http://host-1.com/style.css' rel='stylesheet'…
-
6
votes1
answer380
viewsWhy use two server-side languages on the same system?
Why I see many systems with two, up to three programming languages? When I see a system that migrates from one language to another, I even understand, but why do many maintain two or three…
-
6
votes1
answer476
viewsScope, nested functions, called functions
I’m studying that answer and I came across a doubt in a test that I am performing, follows : <script> function x(a1="a1"){ // "x" tem acesso a "a" var a2="a2"; console.log("Consele fx =" +…
javascriptasked 7 years, 9 months ago MagicHat 12,262 -
6
votes1
answer1950
viewsHow do I save a string of indefinite size to a structure?
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Ecoponto{ int codigo; int contentores[3]; char cidade[20]; char *rua; int nporta; }; int main(int argc, char**…
-
6
votes1
answer1377
viewsSelect multiple CSS classes with wildcard
I want to color all the classes in a grid I downloaded, the Flexbox. It has 12 columns, I want to do something like col-md-* and select everyone who uses this class to color.…
-
6
votes2
answers1351
viewsError "expects Parameter 1 to be mysqli, string Given in"
I am creating an Insert form for registration, but when I click on the button it is showing me error: Warning: mysqli_query() expects Parameter 1 to be mysqli, string Given in C: wamp64 www Beauty…
-
6
votes2
answers141
viewsHow do I make some image invisible in love2d?
How do I set the visibility of an image in Love2d? For example, make it 10%, 25% or 50% visible.
-
6
votes4
answers3460
viewsTake letters from name string
I need to take the first letter of the name and the first letter after the space, in case it would be like this: $string = 'Renan Rodrigues'; Expected result: 'RR'; How to do this ?…
phpasked 7 years, 9 months ago Renan Rodrigues 3,709 -
6
votes1
answer68
viewsAnimation div with Jquery does not recognize keys
<!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport"…
-
6
votes1
answer111
viewsIs it incorrect to change the arguments in an extended class in PHP?
It is incorrect (or "semantically incorrect") to change the arguments in an extended class in PHP? For example I created this class: class Bar { public function __construct($message, $code, $timer)…
-
6
votes1
answer1213
viewsInstall app made in Visual Studio on client machine
I created my first Windows Forms application and will install it on the client’s machine. How should I proceed? Just the .exe and the database?
-
6
votes1
answer4920
viewsIs there a difference between using "Return" or "Exit()" to terminate the "main()" function?
The function exit() closes the execution of the application immediately. The command return makes you quit the function, but when you’re inside the main() will exit the application, including the…
-
6
votes1
answer329
viewsHow to summarize a text within the <span>?
Well I have the following code: <span>TÍTULO CONTAINER TEXO TEXTO TEXO TEXTO</span> I need this span has been width: 100% and that has no line break, if the text is too large it has to…
cssasked 7 years, 10 months ago Hugo Borges 5,294 -
6
votes2
answers1025
viewsHow to disable/enable button(button) when input file is empty/selected?
So I have a simple image upload form that I leave disabled button. Wanted that when I select a photo or file in the input file, the button enable! <div id="botoes" class="clearfix"> <button…
-
6
votes3
answers324
views"Translate" query from Mysql to SQL Server 2012
What is the SQL Server 2012 query that corresponds to the next Mysql query? REPLACE INTO schedule SET jobname = "sqldump" , last_exec_date = NOW()…
-
6
votes2
answers760
viewsHow to hide half a piece of content
How do I do what is illustrated in the picture? Knowing that the content is not just text but buttons and other things from a website homepage!…
-
6
votes1
answer99
viewsHow to automatically add namespaces in Visual Basic?
When creating any class in C#, using Visual Studio, it automatically adds the namespace, as can be seen below: namespace Aplicacao.Modelo { class Cliente { } } In Visual Basic, he doesn’t do the…
-
6
votes1
answer265
viewsThe variable animacao of Controles has not been Assigned
I’m trying to get my character to walk in one Animation and stand in the other. In Animator, created a parameter of type float walk to make the exchange control between the animations as shown in…
-
6
votes2
answers3233
viewsHow to calculate parcels (R$) and fill in inputs?
I would like help to implement the plot calculation and fill/create inputs according to the number of plots. Code below and in https://jsfiddle.net/wnm3jhr7/: $(document).ready(function(e) {…
-
6
votes1
answer843
viewsDataannotations for checking between Start Time and End Time
I have two fields of type [Datatype(Datatype.Time)], being Start Date and End Date, and I cannot let the user enter the End Date less than the Start Date for the purpose of calculating hours worked.…
-
6
votes1
answer527
views -
6
votes1
answer100270
viewsHow to resolve Call to Undefined Function mysql_connect() error
I’m doing an IT inventory for registration and I want to connect to the database, but it’s giving this error: Fatal error: Uncaught Error: Call to Undefined Function mysql_connect() in C: xampp…
-
6
votes3
answers844
viewsSorting of object vectors
I am making an application that sorts an object vector. These objects are Cartesian points, defined in the following class: class CartesianPoint { private: int x; // Coordinate X of a pin or a wire…
-
6
votes0
answers252
viewsCreating a multi-level structure for components in Angularjs + ES6
I am creating a robust application using Angularjs on ES6 and I need to assemble a structure so that the logic of the application components is organized. Basically, my application works with…
-
6
votes3
answers482
viewsWhy does Angularjs default to # in the URL?
I have a question and I would like to know why Angular uses # at the url?
angularjsasked 7 years, 10 months ago Miguel Batista 2,812 -
6
votes1
answer3967
viewsDifference between var_dump and print_r
I have a simple and objective question: Always in my research around, I notice that some programmers use var_dump() and others use print_r (like me). What’s the difference between print_r() and…
var-dumpasked 7 years, 10 months ago Sr. André Baill 6,946 -
6
votes4
answers130
viewsHow to format this array?
I have the following array: $dados = array( '0' => array( 'id_assinante' => $id, 'nome' => 'Aluguel' ), '1' => array( 'id_assinante' => $id, 'nome' => 'Água' ), '2' => array(…
-
6
votes1
answer172
viewsCheck string Regex C#
I have a string that can only be composed by X capital and by -. Example : X-XX-XX or else X-X-X-XX-XXX. Where each - a group would be counted and each X one digit. Example 1: the string X-XX-XX has…
-
6
votes3
answers269
viewsI need to sort a list in order that seems unusual
I have a query and want to sort this query by the attribute code. I did it as follows: consulta.OrderBy(c => c.Codigo); Result obtained: 1.01 1.A 14.04 14.11 22.01 3.04 30.01 4.01 40.02 Expected…
-
6
votes1
answer86
viewsHow to save to a variable what is typed on the screen
I have a web page, and sometimes users press some numbers. However, I have a Reader by usb, I while reading a code it shows me automatically 7 numbers, as if I had typed them on the web page. How do…
javascriptasked 7 years, 10 months ago Gonçalo 2,525 -
6
votes2
answers1593
viewsWhat are the differences between normal jQuery and slim versions?
In the latest version of jQuery, 3.0, it was announced the version slim. What is the difference of this version slim for the regular jQuery 3.0 version?
jqueryasked 7 years, 10 months ago Munir Baarini 673 -
6
votes1
answer310
viewsIs it possible to have Java SE and Java EE on the same machine?
I can install Java SE and Java EE on the same machine?
-
6
votes4
answers8334
viewsHow to list all tables in a Sqlite database?
In Mysql, when I run the command SHOW TABLES I can see all tables present in a given database. And in the case of Sqlite? How can I do this?
-
6
votes1
answer607
viewsWhat are the "bind" and "bindTo" methods of an Closure for?
I was running some tests with anonymous functions in PHP. I already knew that the anonymous functions were an instance of an internal class called Closure. I ran a test to see if she had any…
phpasked 7 years, 10 months ago Wallace Maxters 102,340 -
6
votes0
answers180
viewsSpring Websocket multi user chat with sound
I’m trying to develop a real-time chat, with the following scenario. Online clerk Every user he meets is a conversation One to one An attendant sees all users on a list that he is attending. When he…
-
6
votes1
answer72
viewsDatabase on Android persists the information?
Does the database lose its information when closing the application? In this case it should be an online database?
-
6
votes2
answers1478
viewsHow to verify the existence of a folder?
To verify the existence of a folder with a C/C++ program, it looks for the directory, if it does not find the specified directory, it will make the decision to create it.
-
6
votes1
answer1312
viewsDoubt in substituting string Assembly (MIPS)
I have to make a code in Assembly mips requesting a sentence and if the sentence contains the character - is replaced by the character *. So far I’ve only managed to reach that code: .data buffer:…
-
6
votes1
answer180
viewsDIV TEXT Fixed only in DIV PAI space
Hello, I’d like to do the following. <div class="pai"> <div class="form"></div> <div class="text"></div> </div> I have a div FATHER And inside of it are two divs…
-
6
votes1
answer1353
viewsHow to return or extract more than one value from a function?
integerPower( int y ){ int base2; int base3; int base4; int total; base2 = pow( y , 2); base3 = pow( y, 3); base4 = pow( y, 4); When I call this function (I did not type return because that’s the…
-
6
votes1
answer4278
viewsHow to sign a PDF digitally in C#?
I need to digitally sign one PDF previously created. This PDF is being created through a Web Service who uses the Interop of Office to generate from a Template Office. I already have access to ICP…
-
6
votes2
answers119
viewsWhat’s going on in my C program?
I just have to add the lines but the values don’t make sense: Here the code: #include <stdio.h> #include <stdlib.h> int main (){ int matriz[6][6],i,h,somalinha[6]; for(i=0;i<=4;i++){…
-
6
votes1
answer775
viewsMandatory field rule should be on the backend or frontend?
I’m building an application where the backend is an API and the frontend is Angular2. In a user’s registration I do a validation in the API and if a required field is not filled in the API returns…
api validation encoding-style software-engineering angularasked 7 years, 10 months ago Diego Zanardo 3,301 -
6
votes4
answers2097
viewsPrint arraylist information on the screen
I have a ArrayList but I’m not being able to print the data on the screen. Follows class: public class Cachorro { private String Raca; private String cor; private String nome; private String…