Most voted questions
150,413 questions
Sort by count of
-
7
votes3
answers1045
viewsFibonacci with parallel execution? Threads?
def recur_fibo(n): """Recursive function to print Fibonacci sequence""" if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-2)) This code makes the recursive Fibonacci "simple"...…
-
7
votes3
answers1297
viewsHow to delete the last record from a table?
I was using the following code in mysql: delete from aluno where id=(select MAX(id) from aluno); But the following error appears: Error Code: 1093. You can’t specify target table 'student' for…
-
7
votes1
answer259
viewsHide Divs with similar ID
I have several tags div with the similar id, they all start with cn-, example: <div id="cn-name">...</div> <div id="cn-email">...</div> <div…
-
7
votes1
answer768
viewsHow do I get the message/details with addeventlistener("error")?
When I define true in the parameter useCapture: addEventListener(type, listener[, useCapture]); I can catch any mistake, however I can’t get the details of error, see:…
-
7
votes1
answer6501
viewsSending email with Laravel 5.2
I’m having trouble emailing with Laravel 5.2. You’re returning this mistake to me: Expected response code 250 but got code "530", with message "530-5.5.1 Authentication Required. The archive .env is…
-
7
votes1
answer355
viewsHamiltonian cycle taking too long
I have to find out if there is Hamiltonian cycle in a giant graph (1000 vertices in the smallest instance and 5000 vertices in the largest). My initial idea was to backtrack, and in small instances,…
-
7
votes2
answers2251
viewsSizeof() or strlen()?
sizeof() or strlen()? What’s the difference in their use on char hands? which is more appropriate?
-
7
votes1
answer171
viewsElement Rotation With Arrow
As you see in this image, inside the dark gray ball is a number. It’s 100. That means the pointer has to hit 100. If it’s 0, it has to be in the middle of the pointer. The issue is that this value…
-
7
votes1
answer2514
viewsAccess to the shipment file boleto . NET
I am using the billet . NET to generate billets in my application. The ticket is generated, but how do I process the shipment file? This file is saved somewhere in the application? I took the…
c#asked 8 years, 3 months ago Raul Peres de Góes 103 -
7
votes1
answer4727
viewsHow to display asterisk in fields with required css?
I have a form with some required fields and some not. How can I automatically insert an asterisk on the label of each field with required through css? <div class="form-group col-md-4">…
-
7
votes2
answers455
viewsFont Responsiva
I’m making a theme for wordpress and put the font with the size of 5em what’s around 80px, but when I test on my cell phone with 320px wide, the font gets broken and ugly, I wanted something that…
-
7
votes2
answers616
viewsHow do I make my C++ programs multi-architecture (32 and 64 bit)?
Developing a native C++ application using Devcpp and the Mingw compiler, when running the application on another machine I noticed an error regarding the architecture, because my program only runs…
-
7
votes1
answer2093
viewsHow to display error while query?
I’m having the following problem, this query is not entering the data in the database: $inserir2 = mysqli_query($link, "INSERT INTO cliques (emailusuario, brasil, lucrobrasil, portugal,…
-
7
votes2
answers3200
viewsCode protection . NET
I have a C# application that I developed, it will be installed in several clients. The problem is that I have to protect the application code, because I performed some tests with the Ilspy…
-
7
votes1
answer2212
viewsAsynchronous function chaining alternatives
I need to perform 3 select. One in each table, and its precise result use in select remaining. In the original application, I do a lot of manipulations in the result of each query, which leaves a…
-
7
votes0
answers139
viewsOrganizing requirements using Visual Studio Online backlog
I recently started using Visual Studio Team Services, mainly for the availability of free Git private repositories. After a while I realized that it has several resources to manage requirements and…
visual-studio software-project project-management requirementsasked 8 years, 3 months ago SomeDeveloper 18,074 -
7
votes2
answers447
viewsHow to make a loop that compares string with a python float?
I’m assigning the value 1.5 the variable h, but it does not accept values of the type float and does not complete the code. h = (input("Informe sua altura: ")) # aqui ele recebe um elemento qualquer…
pythonasked 8 years, 3 months ago Adriano Souza 71 -
7
votes2
answers1425
viewsNameerror: name 'ana' is not defined
I am a beginner in python and I needed to make a program that would verify if a given word is palindromo. The program then would be: #encoding: utf-8 palavra = input ('Palavra: ') if palavra ==…
-
7
votes1
answer388
viewsParamiko Error Handling (Python)
Hello, I am mounting a script where the user will authenticate on a device, if everything goes well the code continues otherwise it shows an error message. I am using the Paramiko library to do the…
pythonasked 8 years, 3 months ago Cristhian Miguel 207 -
7
votes1
answer1742
viewsIs there a risk in using mysqli_insert_id?
Suppose a website with a relatively high flow. An X user inserts a record into the database at the same time as another Y user inserts another record. Whereas the procedure of this insertion of user…
-
7
votes1
answer297
viewsMulti Tenancy with Hibernate update schema
Hello I am with an application that uses multiple databases (multi-tenancy) using Hibernate. I wonder if anyone knows any way Hibernate can update the bank schema. I’ve already set the property…
-
7
votes1
answer1103
viewsAsp.Net MVC authentication using Formsauthentication
I am implementing authentication in my ASP.NET MVC application. I am using FormsAuthentication for this authentication of each user and for each logged in user 5 Sessions are assigned (Name,…
-
7
votes2
answers169
viewsRecursive code C++
I have the following iterative function: int getNumPastasColididas(int i){ int c = 0; for(int i = 0; i < size; i++) c += table[i].hasColided; return c; // c = 89832 } I tried to play the function…
-
7
votes1
answer1595
viewsIs it right to create my HTML tags?
I’m creating a website and I don’t really like adding classes and id’s because I think it makes HTML a little dirty. The system I am developing will not be indexed by the search engines, because it…
-
7
votes1
answer3557
viewsIs there a difference when merging two arrays with array_merge or with "+"?
I used to unite two arrays, in PHP, using the function array_merge: $arr3 = array_merge($arr1, $arr2); However, more recently I have seen unions of arrays with + (plus sign): $arr3 = $arr1 + $arr2;…
-
7
votes1
answer1294
viewsPhonetic search on SQL server
I need to implement phonetic search for Portuguese (br). Does anyone have any phonetic search solution in SQL Server with c#? The search should search inside a string using the SOUNDEX function or a…
-
7
votes1
answer1825
viewsHow to Identify and Count Prefabs Collision in Unity
I am developing a game for android on the platform Unity that is similar to the game Tetris, the difference that is geared to chemistry, and instead of descending the tetrominos will descend the…
-
7
votes1
answer1093
viewsHow does dynamic typing work in Python 3.x?
I am new to Python and a question came to me when solving exercise 1001 of Uri Online (read A and B, assign sum to X and print), when writing the following code, I received the concatenation: a =…
-
7
votes1
answer1322
viewsRemoval of random numbers in AVL tree
I have to implement an avl that gets 10,000 random numbers from 1 to 1000,000, right after that, I have to remove 1,000 random numbers, both taken from files. txt, I can enter normally, but when it…
-
7
votes4
answers492
viewsIn C# is it possible to use a local alias for class or namespace?
In languages like Python or PHP it is possible to use a local alias for classes or namespaces. PHP example: use Vendor\Package\ClassName as C; use Vendor\Package as P; $class = new C; $class = new…
-
7
votes1
answer392
viewsHow to use %<> % operator in R
What the operator means %<>% in r ? What is your difference from <- ? Under what circumstances can it be useful?
-
7
votes1
answer301
viewsWorkflow to revert dev branch changes to master
The branch dev is automatically merged to the master; this, for his time, there’s a deploy automatic application. The branch dev has some changes ahead of the branch master and will be disposed of.…
gitasked 8 years, 4 months ago Marcelo de Andrade 7,261 -
7
votes3
answers12017
viewsDifference between full and full binary tree
What is the difference between a full binary tree and a full binary tree?
-
7
votes1
answer792
viewsHow to change the shape of the button with an animation
I need to make a login screen and on the login button I have to change the format like this image I would like to know how it is done, thanks in advance.…
-
7
votes4
answers6154
viewsHow to get session cookie via javascript?
I need to make a script that when the user arrives at my utm via url, I must record a session cookie. This cookie will expire when the browser closes. Can anyone help me with this?
-
7
votes3
answers629
viewsEF6 + Postgresql - 22021: invalid byte Sequence for encoding "UTF8": 0xc9 0x52
I am trying to get data from a Postgresql database with Enconding SQL_ASCII, but in some records I get error message "22021: invalid byte Sequence for encoding "UTF8": 0xc9 0x52" I have tried to set…
-
7
votes3
answers1496
viewsWhy is it possible to define two or more methods with the same name in the same class in C#?
I’m starting my C# studies with ASP.NET MVC today. I’m still adapting to some things I’m not used to seeing, because I know languages like PHP, Python and Javascript. I realized that in a code that…
-
7
votes1
answer1040
viewsHow to restrict so that you do not set a longer date and then a shorter date using Calendar Restrict?
Good night! Here’s my problem: I’m making a screen that has two calendars: The program will return me a list that comprises the interval between two dates. One date is from the first calendar, and…
-
7
votes2
answers221
viewsMerge project when using the "Composer create-project" command
I have a project (a blog) based on Laravel/Laravel (note that this is the application and not the framework only), but I wish to send to my repository only the contents of the folders app/ and…
-
7
votes3
answers414
viewsHow to change the structure of a LINQ query at runtime?
I have the following example of a program that implements the EF (Entity Framework). The structure of the database and the application is defined as follows: Table Pessoa: Primary key field:…
-
7
votes2
answers534
viewsIs it possible to change the value of an annotation at runtime?
Considering the following annotation: @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface MinhaAnotacao { String valor(); } Defined in a class: @MinhaAnotacao(valor =…
-
7
votes1
answer2081
views -
7
votes1
answer99
viewsDoubt about using LEFT JOIN in mysql
I have the following problem: I have two tables. students and proof students have 10 students tests has 9 results (because one student missed) The union of the tables is given by the matricula…
-
7
votes1
answer87
viewsUse of predicate and lambda expression
I am studying WPF and the MVVM model by the following article : https://msdn.microsoft.com/en-us/magazine/dd419663.aspx In the implementation of the Icommand interface, the author defines the…
-
7
votes2
answers382
viewsWhat is the Microsoft Bot Framework?
I was sailing in the Microsoft Developer Network and visualized the Microsoft Bot Framework. I have two questions: What is Microsoft Bot Framework and what it’s for? Really the name is already very…
-
7
votes1
answer786
viewsFluent Nhibernate - Composite key mapping one to many
I’m having a problem mapping an entity through Fluent Nhibernate. I have a 1-N relation to the two tables in the bank having composite keys. When I try to list my entity User an error comes back,…
-
7
votes2
answers824
viewsHow to save two variables from a JS in php session?
I would like to know if there is a way to save these two following variables. Follows the code: <script type="text/javascript"> function opcao() { $(document).ready(function() { var empresa =…
-
7
votes3
answers11228
viewsHow to timer in Javascript
I need help to make a timer for a page, and it has to be different for every difficulty of a game, for example, for easy mode it has 1 minute, for intermediate it has 4 minutes, and for hard 8…
-
7
votes2
answers664
viewsWhat are the advantages of Parallel.Foreach in C#?
Working with C# I saw that we have the option to work with parallel.ForEach(). What is the advantage of working with her and not the foreach?
-
7
votes2
answers235
viewsHow to create a cross-platform app?
Come on and create a cool app, a system based on Console Application, written in Visual Basic.NET, in . NET Framework, ai you want port this application to other platforms, but without creating a…