Most voted questions
150,413 questions
Sort by count of
-
7
votes1
answer2073
viewsHow to transfer data from one javascript file to another on different pages?
I have a simple website with two HTML pages each with a linked Javascript code: Front Page: <!DOCTYPE html> <html> <body> <script src="primeiraPagina.js"></script>…
javascriptasked 9 years ago André N. Darcie 145 -
7
votes2
answers9136
viewsCreate static Selectlist and pass a selected item to the View
I’m having a question about how to send my selectList "status" to my View EditarUsuario. I created my list with the following items: var list = new SelectList(new[] { new{ID="2",Name="Selecione"},…
-
7
votes2
answers260
viewsIs there any difference between an infinite loop with for and while?
In PHP, it is possible to generate a loop infinity with while simply passing the parameter true. Example: while (true) { echo "Ao infinito e além"; } It is also possible to generate this through…
-
7
votes1
answer153
views -
7
votes4
answers989
viewsRead input value type file doubt
A question, why does it work: $("input[type='file']")[0].files[0] and that’s not? $("input[type='file']").files[0] // TypeError: $(...).files is undefined…
-
7
votes2
answers4071
views -
7
votes2
answers1186
viewsProblem connecting Mysql in Python 3.4
I just installed my virtual environment, installed Pymysql and created a project, however, when trying to start an APP python manage.py startapp nome, the following problem arose: Error loading…
-
7
votes1
answer218
viewsExtender plugin jQuery
I’m working on a project that uses the library X-Editable with Bootstrap 3. Throughout the page are several instances of the plugin, however, there was a need for some instances to have a different…
-
7
votes2
answers7184
viewsHow to set a token in the header?
Well I use jwt to generate a token only that the example I was following didn’t show exactly how to paste the token into the application header. Would anyone know how? Note: I am using the express.…
-
7
votes1
answer396
viewsTesting with digital certificates
I wonder if anyone knows a way to test with digital certificates. I have the following situation, my system works normally with digital certificates. However when the configured certificate expires…
-
7
votes1
answer638
viewsRecovering list values from python lists
I have tried several things and I still can not grasp what the problem of my code, is a simple code. With numpy i place txt values in the array of arrays and want to make some copies to two other…
-
7
votes1
answer702
viewsUse a void function as a parameter of another
Let’s assume that I need one function to perform to a certain point, call another, do some action, call another function, do one more action and finish executing. Whereas the called functions…
-
7
votes3
answers1222
viewsOpen Form2 side by side with Form1 simultaneously and close or minimize both simultaneously
I need to open 2 forms simultaneously next to each other and then when I close or minimize any of them, the 2 be closed/minimized simultaneously. I looked for some idea on several sites and all I…
-
7
votes1
answer3337
viewsSend data to controller via Json
I am trying to send via Ajax some data from my form. In this form, I have fields inputs normal and a list of vendors I previously selected via checkbox. Follow screen: I am creating the JSON object…
-
7
votes4
answers658
viewsHow to test the condition on a vector?
I have to make a program that reads a text, where each first letter of each word in the text is replaced by a character (*). I cannot compile correctly, I believe the problem is in my condition…
-
7
votes1
answer1164
viewsDropdown containing image on the right
I am using Bootstrap to make a bar at the top of the page, and I have a problem: What I need is to open the dropdown, have a list of options, and an image next to it that always has the same size of…
-
7
votes1
answer5408
views -
7
votes3
answers121
viewsHow to avoid connection from stopping the application?
I have an Android app that sends data to a server via wireless, by sending changes from Activity B to A. It turns out that when the connection is weak the application stops and gives the error…
-
7
votes2
answers330
viewsDynamic allocation and runtime of functions
When we use any of the dynamic allocation functions in C (malloc, calloc, realloc, etc.), within a function that is called by main, will the memory remain allocated at the end of the execution of…
-
7
votes5
answers34006
viewsHow to return the last record of an array with Javascript or jQuery?
I’m making a custom search filter where the user can select the brand and product features and I return their id. But I wanted to return only the last record of mine arrays where they contain all…
-
7
votes2
answers1310
viewsIs there any way to transfer Mysql data directly to an Excel table?
Is there any way to transfer all data from the database to a table in Excel? It can be with any language.
-
7
votes1
answer182
viewsIs it possible to use MD6 in C#?
Speaking of hash, it is possible to use MD6 in C#? Someone would have an example of the use in a simple string? In my research I found nothing very objective.
-
7
votes2
answers5391
viewsHow to update an item from a generic list?
I am trying to change the name and email of a particular item in the list below, but I couldn’t find another way to remove the item from the list and add it again updated. There is another way to…
-
7
votes3
answers22225
viewsHow to compile a. java file using the Ubuntu terminal
I am a beginner user and I need to compile a. java file using the Ubuntu terminal, how to proceed?
-
7
votes6
answers18836
viewsRemoving Titlebar from the android app
I’m starting on android, and know very little! I’m developing slowly and with each change I save the apk and see it running on my phone. I noticed that there is a bar in the app with the name of the…
-
7
votes3
answers1492
viewsWhile repeating structure to recalculate in C
I solved this exercise below and thought about putting a structure while repeat, for the person to calculate again. But when I put’s' to return and calculate again, the exercise sums up the values…
-
7
votes1
answer1032
viewsBasic difference between Abstract Factory and Factory?
I was taking a look at Manual for PHP and saw an example of implementing the standard Factory. Example: class Exemplo { // Método Factory parametrizado public static function factory($type) { if…
pattern-designasked 9 years, 1 month ago Wallace Maxters 102,340 -
7
votes2
answers104
viewsHow to resolve duplicate PHP object?
I have 2 objects with different values, but when I save it saved as a single object. Example of how I’m using: class Objeto { private $Nome; public function setNome($Nome){ $this->Nome = $Nome; }…
-
7
votes1
answer393
viewsAjax function does not pass the Success
My function calling my web service var email = document.getElementById("email").value var senha = document.getElementById("senha").value $.ajax({ url:…
-
7
votes1
answer726
viewsHow to insert returned value into form fields with jQuery?
Accurate, after consulting in BD insert returned values into fields of a form, as I will use these fields to make a change to the BD, the call to search is working correctly and is configured this…
-
7
votes2
answers548
viewsMemory error when entering millions of records using Entity Framework
I am using the Entity Framework to Insert and Update Thousands of Records. At first it was slow, but after putting the code down it improved the speed. db.Configuration.AutoDetectChangesEnabled =…
-
7
votes2
answers585
viewsListing error in paginated search system
When I do the query I get the following result [imagem1] By clicking to go to page 2, I get the following result [imagem2] That is, on page "1" everything working with the total results displayed…
-
7
votes3
answers1691
viewsButton does not execute the Managedbean method
When I click the change or delete buttons, Managedbean methods are not executed. Anyone have any ideas? Some settings are missing on the buttons? Project: https://github.com/fercosmig/Forum…
-
7
votes2
answers1118
viewsTesting primes in C
I am trying to develop in C a program in which the user puts a sequence of numbers and the same should determine whether the numbers are primes or not. Just follow my code: #include <stdio.h>…
-
7
votes2
answers7090
viewsHow to definitely remove a project in Android Studio?
I would like to definitely remove a project from Android Studio, I notice that on the homepage below, if you have a selected project and press Delete, the project is removed from the list, but I…
-
7
votes3
answers49921
viewsConvert string number to PHP integer
I’m converting a string to an integer in PHP, but at the return of settype($variavel, "integer"), or (int)$variavel bring me a null value or equal to 1. Have another way to try the conversion? The…
-
7
votes3
answers27643
viewsGet checkbox values with javascript
I have the code below in HTML: <input type="checkbox" id="Pacote_i" name="Pacote" value="Pacote i" onClick="soma()"> <input type="checkbox" id="Pacote_ii" name="Pacote" value="Pacote ii"…
javascriptasked 9 years, 1 month ago user24136 -
7
votes3
answers27933
viewsPython str.replace() doubt
I have the following text:: 'box 1 is blue, box 10 is green, box 100 is empty' I want to replace 'box 1' with 'package 2', so I do: >>> texto = 'caixa 1 é azul, caixa 10 está verde, caixa…
-
7
votes1
answer598
viewsIs it correct to return a memory address in function?
I was asked to design a function that was called, open a file. txt and return the pointer of this file, ie return a memory address. However as I know memory is only temporarily allocated for…
-
7
votes3
answers119
viewsHow to remove a link from a string in Javascript?
How can I remove the link from a Javascript string? str = "hey olha isso http://google.com, legal né?" var test = str.description.replace(/.*?:///g, ""); Expected result: hey look at that, cool…
-
7
votes2
answers607
viewsResource on an Enum
I have a enum and would like to change the Description with Resource: public enum SystemArea { [Description("Gestor")] Gestor = 3, [Description("Administrador")] Administrador = 2,…
-
7
votes6
answers14101
viewsString Format with Javascript
Aiming at the String.Format from C#, which is very easy to use, I searched for something similar to be used in my Javascript codes. I found some rather problematic implementations, aiming at this, I…
-
7
votes4
answers1466
viewsHow best to pass values to attributes
I am studying object-oriented programming. I am very fascinated as this new world. But now a doubt has arisen. I believe you can help me. I’m doing a Person class, which has the attributes name, age…
-
7
votes1
answer11081
viewsRemove duplicate elements in Array
I’m getting an array by JSON, and using the array_unique to remove duplicated values, however, is displaying the following error: <b>Notice</b>: Array to string conversion in…
-
7
votes1
answer1843
viewsMultiple schemas in Laravel 5 database
Good afternoon guys, I am redoing a system and adopted the Laravel 5. In this system I have several schemas in the database and the solution I found was to work with a connection for each schema, as…
-
7
votes2
answers6202
viewsHow does the C++ layer work on the Web system?
I see that many complex web systems say in their "API" that they use C++ as the "lower" layer, I don’t know if the question is too wide, but briefly I believe it is possible to explain to me how…
-
7
votes1
answer366
viewsHow to fill an ontology from Java?
I am working with ontologies, and have an OWL file in which my ontology is already all defined, classes, properties Object, among others. I use Protegé 4.1 to fill these policies, creating the…
-
7
votes2
answers335
viewsHow to verify that the document markup is HTML5?
I am creating a plugin and need to know if the document is written in HTML5 or not. I thought I’d use the document.doctype, but I don’t know what to compare it to since I compare it to '<!DOCTYPE…
-
7
votes3
answers187
viewsOmitting Else is a good idea in some cases, right?
I ask myself this question every time I’m coding, because I always worry about leaving my code understandable to other programmers who will contemplate it - and myself, because maybe I won’t…
-
7
votes5
answers1500
viewsKeep displaying the date and time in the javascript browser
Hello. I want to display the date and time on the page. For this, I started doing the small test to display a countdown: var tempo=60; function session(time) { time=this.tempo; if (this.tempo>0)…
javascriptasked 9 years, 2 months ago André Nascimento 1,258