Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer1195
viewsHow to adjust the printing of an HTML in two columns?
Dear colleagues, I’m developing a PHP program with zend Framework2. In this program I have generate a stylized PDF containing the header, body and footer (I am using DOMPDF). The basic structure of…
-
5
votes2
answers459
viewsRepresent relationships in json
What is the right way or best practice to represent the relationships of a json resource? As an example, I have tables contrato, representante and empresa and relationships contract N:1…
jsonasked 7 years, 7 months ago Fernando Zabin 707 -
5
votes2
answers406
viewsTolist vs Typed Tolist
I was reviewing some methods of an ASP.NET MVC project and found some cases where it is used only .ToList() and others in which it is used .ToList<type>() (where type is an object type used in…
-
5
votes1
answer789
viewsUse Ienumerable or Icollection?
I want to create a 1 x N mapping using the Fluent API of Entity Framework, something like: a shopping cart has several products. In my class stroller, I have a navigation Property, which is a…
-
5
votes2
answers4183
viewsHow to discover a collation of a table or database using an SQL query?
I can visualize the collation of certain table or bank perfectly by Phpmyadmin. But if I did not dispose of this aforementioned tool, as I could do to discover the collation by manually doing an SQL…
-
5
votes2
answers262
viewsHow secure is my code, with private variables?
class Conta(object): def __init__(self, numero_conta, nome_titular='anonimo'): self.__nome_titular = nome_titular self.__numero_conta = numero_conta self.__saldo = 0.00 def getNomeTitular(self):…
-
5
votes1
answer525
viewsLUA, Separate string with numbers in a table!
I have a code rescue system, in case I would put something like this in a text file: HFGD65,{2454,2454},1,1 would be: CODE to redeem -- string {items} -- items within the table in numbers points --…
-
5
votes1
answer1280
viewsWhat is Reactphp , is it worth using?
I wonder what the Reactphp. I couldn’t find any material explaining what it is and what its goal is. I’d like to know what it’s for and if it’s worth using.…
phpasked 7 years, 7 months ago Jefferson Mello Olynyki 864 -
5
votes2
answers214
viewsHow to get the result of the gdialog menu selection in the Shell Script variable?
I’m creating a script simple learning where the user should: Enter number that will be saved in the NUM1 variable Enter a second number that will be saved in the NUM2 variable Choose from the menu…
-
5
votes3
answers715
viewsCalculation of incorrect multiplication
For some reason when performing the multiple calculation by a floating value PHP always returns me the wrong value. Example: echo ((33 * 0.8) - 26.4); result: 3.5527136788005E-15 But the expected…
phpasked 7 years, 7 months ago Jeferson Assis 2,719 -
5
votes3
answers171
viewsIs it safe to create an object pointer in the stack indirectly?
My class has a method that returns a pointer to itself, and at some point I use the following : void classequalquer::metodo() { ClasseA * ponteiro = ClasseA().getThis(); //usa o ponteiro nesse…
-
5
votes1
answer3305
viewsHow do I uncheck the previous radio button after selecting another one?
I have five radio button, of these five one is "marked", as I do to unmark the radio button that I clicked after clicking on another? Example: <fieldset>…
-
5
votes2
answers726
viewsHow to rename the database (Rdata) in R?
I have the following situation: I need to merge two banks. The name of both the database files are: banco2.RData and banco2_2.rdata However, when I open the banks in the R they have the same name:…
-
5
votes3
answers134
viewsWhy do libraries use "! function_exists('function')" always when there is a statement of a function?
I’ve used several PHP libraries and realized that they always use the same statement, whenever there is a declaration of a new function. if (! function_exists('funcao')) { function funcao($arg) { }…
-
5
votes5
answers7965
viewsSome way to get the price of the dollar
Do you know of any api or other way in php to get the price of the dollar? I just need the price of the dollar for the real one. I’ve tried these two api’s, but the two are off the air.…
-
5
votes2
answers800
viewsHow to convert numbers into categories in R
In my database, I have a Variable TP_CorRaca with the values 0, 1, 2, 3, 4, 5. Each number corresponds to a color. Example: 0 - White 1 - black 2 - brown ... I want to make that match to use the…
rasked 7 years, 7 months ago André Oliveira 376 -
5
votes2
answers1047
viewsDifference of ' ' and ` `
I am reading ng-book 2 on Angular 2 and in one of the exercises a doubt arose. When setting up my component first code does not display the values title and link on the console, but the second works…
-
5
votes2
answers658
viewsAsk and store user permission to use full-screen?
Apps usually asks for permission to use Smartphone features like microphone, camera... I wonder if it is possible to do the same on a page so that the Fullscreen mode is activated automatically…
-
5
votes1
answer555
viewsSome questions about socket
I’m taking a look at an example of microsoft itself and I’m having some doubts. Example taken from this link: https://msdn.microsoft.com/pt-br/library/bew39x2a(v=vs.110). aspx Let’s imagine a chat…
-
5
votes1
answer423
viewsWhat is the hash generation algorithm that Laravel uses?
By default Laravel already comes with a pre-ready authentication system, however, someone would know tell me what the algorithm is default that this framework use for generation of hash and what…
-
5
votes2
answers1001
viewsHow to debug shell script in linux?
I’m new to linux, and I’m learning shell script and my question is this:. When I want to debug something in PHP for example, I put a breakpoint in the code and run the same with the debug on, I…
-
5
votes3
answers307
viewsIgnored line of code
The line marked with /*ISSO AQUI*/ is being ignored, ie the name for the second employee is not read, only the last name. import java.util.Scanner; public class EmployeeTest { public static void…
-
5
votes1
answer649
viewsHow to use LIKE in bindValue?
How to use the operator %, to the bindValue(), in query down below: $sql = 'SELECT * FROM nfe WHERE (cliente LIKE :cliente OR :cliente_ IS NULL)';…
-
5
votes1
answer1683
viewsHow to identify and avoid memory Leak in . NET?
I know CLR has tools like Garbage Collection, responsible for memory management in .NET. One of the functions of the garbage collector, GC, is to avoid unnecessary memory consumption. Even with the…
-
5
votes1
answer4783
viewsHow do I make an infinite loop without bursting the memory?
I’m trying to make a program that requests on a DDE server, so I need to collect the data every 0.1 sec. But with each iteration of the program the computer memory increases and at the end for the…
-
5
votes2
answers559
viewsRegular Expression for password
I’m trying to do a strong javascript password check. Initially I want to check if in the string there is the occurrence of 02 numbers in the following conditions: "12vvv": two consecutive numbers or…
-
5
votes2
answers6502
viewsExtensions . pyc . pyd . Pyo in Python
Since there are certain extensions .pyc, .pyd, .pyo besides the .py in Python, what are the main differences between them? What each one represents?…
-
5
votes2
answers33940
viewsHow to hide sidebar and vertical bar with CSS
I would like to hide these two bars (Vertical and Horizontal), I have configured my . css file with the settings below, but they are not working: @charset "UTF-8"; section#conteudo{ width: 1000px;…
-
5
votes2
answers115
viewsBecause Chr() is vulnerable to "cache-timing" attack and pack() is not?
Out of curiosity I am looking for and slow many things about cryptography and also looking for some libraries in pure PHP, such as Sodium_compat, for the sole reason that I understand much more of…
-
5
votes1
answer5050
viewsList of figures/tables in the abntex2 model
Hello, I’m using the abntex2 model for theses. I put the figures and tables indexed by the chapter. However, now I would like there to be a space between the figures/tables of the same chapter.…
-
5
votes2
answers169
viewstranslate GPL when distributing softtware in Brazil
As I intend to distribute some utilities of mine, I have these doubts: The English version of the GPL is valid in non-English-speaking countries ? I need to translate the GPL by including it in my…
-
5
votes1
answer1315
viewsDynamically create buttons
I’m making a screen where register some users. On this screen, I have a ScrollView with a Gridlayout inside, with 2 columns. Each column has 1 button, which when clicking, opens a link, in this…
-
5
votes2
answers252
views -
5
votes1
answer1651
viewsHow can I only extract PID from a process?
My idea is to create a simple script that can search the PID of a process and kill it for example. This is what I have done so far but has the problem that when running ps the PID will not be…
-
5
votes1
answer21967
viewsWhat is . in <form action="." method="post">?
I’m starting in Django and making some changes in code already written by someone. I realized that in form instead of the usual "/action page" to which the data will be submitted, such as in this…
-
5
votes1
answer2525
viewsHow to convert utf-8 text to ANSI. Delphi 2006
How to convert text utf-8 for ANSI. The words they use "~" and "´" are coming out wrong, see for example the use of the word "PREPARATION" coming out: "PREPARES 플O" when generating file .CSV using…
-
5
votes5
answers13183
viewsPython - NIM game
Enunciation You must write a program in the Python language, version 3, which will allow a "victim" to play the NIM against the computer. The computer, of course, must follow the winning strategy…
pythonasked 7 years, 8 months ago Mário Rodeghiero 389 -
5
votes1
answer58
viewsHow does a historical debugger work?
A historical debugger, or Historical Debugger, is able to collect key data from a debugging session, such as locals/autos (in the case of Intellitrace), exceptions and events of the session. I…
-
5
votes1
answer125
viewsTake the previous value with a condition on R
I have a single key base made of two other repeating variables, CNPJ and date. I need to do some sum and division accounts with the previous date values for each CNPJ. If there is no previous date…
-
5
votes1
answer239
viewsHow to configure Entity Framework Mapping 1:N using inheritance
I have two classes: Pessoa and Usuario. The class Usuario inherits class properties and methods Pessoa. I am using the Entity Framework and I believe is doing the mapping wrong. That’s why the…
-
5
votes1
answer270
viewsConsume entity repository directly from the application layer
I have a scenario where I need to search for a list of Active Employees with Entity Framework and display them on the screen (I need to convert to Dtos before displaying - what I do through the…
-
5
votes1
answer4065
viewsPython, clone the lists
Be the code below: def modif1(lista): lista = [4,5,6] lista = [1,2,3] modif1(lista) print(lista) #resultado: [1,2,3] def modif2(lista): lista[0] = 4 lista[1] = 5 lista[2] = 6 lista = [1,2,3]…
-
5
votes2
answers2603
views -
5
votes1
answer135
viewsWhen and why use the Obsolete attribute?
At least in the projects I’ve worked on, I see no point in using the attribute Obsolete in methods that are no longer used. What I do, and I see people doing is removing or commenting on codes that…
-
5
votes1
answer257
viewsEntity Framework Async Performance
I am implementing an asynchronous webapi, and have tested two ways to return the value with EF6. The 1st form was using Tolistasync(), and the 2nd form was using Task. The 2nd form has a much better…
-
5
votes2
answers1943
viewsUsing AND inside an INNER JOIN can?
I wonder if it is possible to use AND within a INNER JOIN, example: SELECT * FROM tab1 INNER JOIN tab2 ON tab2.id2 = tab1.id1 AND tab2.camp1 = 'valor' INNER JOIN tab3 ON tab3.id3 = tab2.id2; I gave…
-
5
votes1
answer637
viewsHow is a "struct" organized in memory?
How access to struct? Can I put members in the order I want? How does the compiler know which part of the memory to access? What would this look like? struct { char ch1; short s; char ch2; long long…
-
5
votes1
answer901
viewsStore password in database
I have an application that needs to store passwords and get them again, this is not just for login check because the stored passwords will be used to provide access to another system (there is no…
-
5
votes2
answers226
viewsWhich . NET should I use?
I will start the development of a program with C# using Winforms (Basic Calendar with Mysql) and it is my question which framework utilise. This program can be made available on other computers and…
-
5
votes2
answers1770
viewsDifference between the types of buttons
What is the difference between the following components ? <button type="button">Click Me!</button> <asp:button ID="cmdAvancar" runat="server" >Click Me!</asp:button>…