Most voted questions
150,413 questions
Sort by count of
-
9
votes2
answers6568
views"placeholder" of "textarea" does not appear
I have a textarea with a placeholder which according to the documentation (English) is perfectly valid and should work: Example in Jsfiddle Part of the form <?php /* Apenas o código referente à…
-
9
votes2
answers3152
viewsBuild generation in the Maven project
I would like to generate a Java build using Maven, where the generated file name . jar was the same number as the last revision of the SVN repository. Example: My last build generated has the…
-
9
votes1
answer5564
viewsHow to change PDF source generated by iReport?
I created a report using iReport and changed the source of the text to a custom font here in the company. The report is viewed using the iReport viewer itself and works smoothly with the source I…
-
9
votes3
answers763
viewsHow to list the results of a regex search in a directory?
I have a directory with some C#files. In these files there are several SQL query codes. I need to list all SELECT commands in these files using Powershell. The commands start with SELECT and end…
-
9
votes4
answers11030
viewsEdit directly via FTP with Sublime Text
I want to work via FTP with Sublime Text 2. I don’t just want to connect via FTP and transfer files, but rather, edit the file, and when saving it, it sends directly to the server, via FTP. So, as…
-
9
votes3
answers14251
viewsSelect elements containing a particular "date" attribute
On the page there are several elements with attributes data. To avoid going around adding CSS classes to the elements, making page code denser, I would like to select elements by attribute name…
-
9
votes2
answers952
viewsAuthentication with two different tables
I need to do two authentications, one for clients another for administrators, so I have to have two instance of auth; how to do this in Laravel, where I have a client table and another for…
-
9
votes2
answers1038
viewsHow to use databases in Cakephp without complying with naming conventions?
Cakephp has conventions for naming tables, classes, etc., such as having columns username and password for tables that save users. In my current situation, I have tables that do not obey these…
-
9
votes2
answers747
viewsWebmethod is not called (fired) through the Pagemethod
I’m having trouble firing one WebMethod in a project created in Visual Studio 2013 (Webforms Application). If I create a project, for example, in Visual Studio 2008 and migrate to Visual Studio…
-
9
votes2
answers495
viewsParse error given when checking variables with the Empty() function
I have a little problem in my PHP when I step over a variable to check separated by comma it generates a parse error. Look at my code below: if (isset($_POST['btnCriaTempo'])){ $ordem =…
-
9
votes1
answer378
viewsFront End Access on the server
Usually we put the Back End on the server and the Front End on the local machine. Is there any problem (maybe of performance) in leaving a copy of the FE on the server for each user and putting only…
ms-accessasked 11 years ago Regis Santos 1,574 -
9
votes3
answers995
views -
9
votes7
answers7922
viewsConvert an array of floats to integer
Suppose the following: import numpy as np a = np.array ( [1.1, 2.2, 3.3] ) How to convert this array to int without having to iterate each element or using another array? Why do: b = int(a) Gives an…
-
9
votes2
answers2594
viewsWhat does it mean and how does an Enum work with the [Flags] attribute?
I was seeing how the class works FileInfo and came across an Enum: [Serializable] [ComVisible(true)] [Flags] public enum FileAttributes { ReadOnly = 1, Hidden = 2, System = 4, Directory = 16,…
-
9
votes2
answers282
viewsIs there a way to save types not listed in Settings.Default?
In a Windows Forms application I can create configuration properties. However there is the type List<T> or Dictionary<TKey, TValue>. By clicking on "Browse" and searching on mscorelib…
-
9
votes1
answer584
viewsDifference in Indice Unique and Unique Constraint usage in Informix?
I would like to know the behavior/differences between a Indice Unique and Unique Constraints to the Informix ?
-
9
votes6
answers3652
viewsHow to detect page encoding with PHP?
I wanted to create a function that saved the data in the database encoding correct (my bank is UTF-8) according to the encoding detected. Is there a native PHP function to do this? Is there any…
-
9
votes2
answers4388
viewsHow to create an LLL based on a dynamic structure?
I’m trying to expedite processes since several times we need generate reports in Alvs. The idea is to get the metadata of a structure ( Field Name, Domain, Descriptive ) and thus generate the…
-
9
votes1
answer4345
viewsHow to sort a list of tuples by the nth element?
I have a list of fashion tuples: [(0, 1), (2, 3), (4, -5), (6, -3)] I want to sort that list by the second value of each tuple (i.e., in case we would [(4, -5), (6, -3), (0, 1), (2, 3)]. How to do…
-
9
votes2
answers531
viewsAssociation with scope in Ruby on Rails
I have a Ruby on Rails application in which I have licenses, items that can be licensed, and a table that lists the two (Which items do you have in the license?). Analogously to items in a shopping…
-
9
votes2
answers960
viewsHow to save a cascade collection in nhibernate without putting circular reference?
Always when I try to save an object with a data collection mapped as HasMany I have to put a circular reference so that Nhibernate can save this object in cascade. For example I have the following…
-
9
votes2
answers1058
viewsHow to configure HTTP authentication with Jboss?
I would like to protect my entire site with user and password, I saw that it is possible to do this using HTTP authentication, but I would like to know how to do this in Jboss.
-
9
votes4
answers1446
viewsLoad file to current directory when running irb
It is possible to call irb by passing a library to be loaded as parameter (required): irb -r date But this does not work if I want to load a file in the directory where the command runs: irb -r…
-
9
votes2
answers1137
viewsHow to use a module in Angularjs?
I have the following code in Angularjs but I have the error: Error: [$injector:unpr] Unknown Provider: Authenticationprovider <- Authentication My code is this: app js. angular.module('app')…
-
8
votes1
answer110
viewsWhy, in C, is a statically declared array name not an lvalue?
Why, in C, the name of a statically declared array is not a lvalue? A lvalue is an expression that can appear on the left side of an assignment statement. It is an expression that represents a…
-
8
votes1
answer290
viewsWhat is the relationship of Conway’s Law with software systems?
I was reading about the conway law. However, I still cannot understand it and its relationship with the structure of the systems. The provision of the law is as follows:: Any Organization that…
-
8
votes1
answer93
viewsC# init equals private set?
I was reading about the new implementations on C# 9 and came across the init, init-only-setters: Starting with C# 9.0, you can create init accessors Instead of set accessors for properties and…
c#asked 3 years, 10 months ago Ricardo Pontual 21,129 -
8
votes3
answers190
viewsHow to get the index of the first positive element in a list?
I am looking for a solution to a very simple problem. I need to get the first element of a list greater than or equal to zero. I was able to do this with the following function: def…
-
8
votes0
answers77
viewsWhat is a Memory Model?
Reading the Wikipedia article in English discovered that Java was the first popular language to have a memory model in the presence of well-defined threads, followed by C++11. Reading the article in…
-
8
votes1
answer215
viewsWhat is IEEE 754?
Here on the site, we have several examples of questions that talk about "problems" related to float or double, generally about the inaccuracy of the values returned in calculations, as these below:…
terminologyasked 4 years ago Wallace Maxters 102,340 -
8
votes2
answers141
viewsWhat is the difference between the functions Rand, mt_rand, random_int?
To generate random numbers with PHP, there are some functions. Among them rand, and mt_rand. Until recently, I used the mt_rand, 'cause as the documentation says, she’s a "improved random number…
-
8
votes2
answers334
viewsWhat is a Murmurhash?
I saw that is being programmed for next version of PHP 8.1 the implementation of Murmurhash. I had never heard of it. I would like to know what it is.…
hashasked 4 years, 1 month ago Wallace Maxters 102,340 -
8
votes1
answer141
viewsWhat are the differences between "String" and "str" in Rust?
I know there are (apparently) two main types of string in Rust: str, which, as far as I can tell, is a primitive type; String, which, as far as I know, is part of the standard library std of…
-
8
votes1
answer147
viewsWhat is the equivalent of Python’s dir function in Javascript?
I was looking for a javascript function equivalent to the function dir python. In Python, if I want to see all methods associated with a given object, just pass the function dir directly to…
-
8
votes2
answers171
viewsIs there a way to execute a single command as an administrator (other than the entire program)?
Did not want to run the entire program with administrator privilege, for security reasons and for convenience. However I need to execute a command: exec.Command(`cmd`, `/c`, `CheckNetIsolation.exe`,…
-
8
votes2
answers139
viewsWhat is the default (Object) for in C#?
Sometimes I come across the keyword default in the C#: object obj = default(object); string str = default(string); int number = default(int); What good is? In which scenario can I apply this?…
-
8
votes2
answers1355
viewsWhat is SSL Pinning?
I was recently watching a video that briefly mentioned the term "SSL Pinning" to describe a measure (understood by me as security) to establish a more secure and probably encrypted communication…
-
8
votes3
answers6191
viewsThe operand of a 'delete' Operator must be optional
I’m having trouble understanding why it is not possible to apply delete user.password in the code below Terminal return: The operand of a 'delete' Operator must be optional. My code: import {…
typescriptasked 4 years, 3 months ago Bruno Ferreira 129 -
8
votes1
answer97
viewsLinux Shell Script - Difference between $(()) and (())
I’m studying shell script and learned to use $(()) and (()) to make calculations. I understood the difference: while $(()) serves to make a calculation and return the result of it, (()) serves to…
-
8
votes1
answer147
viewsHow to use a predefined interpolation in Javascript
I was reading in ES6 documentation about interpolation (or Template strings) and saw that I can create "escaped templates", as in the example below: class InvalidParamError extends Error { static…
-
8
votes3
answers149
viewsWhat is data modeling (data Modeling)?
What is data modeling (data Modeling)? In what context is it used? At what time of development it should begin to be done? Does it relate to object orientation? One opposes or complements the other?…
-
8
votes2
answers337
viewsHow do "for in, for of, foreach" loops traverse the array?
I’ve always used the loop for in which it differentiates a little from the mentioned loops, but the question is how these loops travel the array as, for example, the loop for usually follows these…
-
8
votes2
answers146
viewsWhat is Function.prototype.call() for?
I get confused in using the method call(). It serves to call a function, inherit the parameters of a function or the properties? Another question of mine is in relation to the keyword this passed as…
-
8
votes1
answer661
viewsHow to show the Date object with the Timezone it was created in Javascript?
I have the following doubt, when I create an object Date with the following string: var teste = new Date("2020-06-03T12:05:03-05:00"); So I created an object Date who says they are 12:05:03 with a…
-
8
votes1
answer213
viewsWhat is the difference between data structures and abstract types of data?
I looked in some books and some Internet pages, but I couldn’t get a clear answer.
-
8
votes1
answer178
viewsPython 64 bits have advantage?
What is the advantage of using 64-bit Python over 32-bit Python? It would be performance?
-
8
votes1
answer642
viewsHow do I hold an action key until I release the key
In video game games the action displayed when pressing a key is smooth, continuous and immediate. However when implementing a routine that animates a character according to the key pressed using the…
-
8
votes2
answers196
viewsWhy do I need to use an application server with Django?
Why it is necessary and what is the advantage of using an application server, such as Gunicorn, in a production environment? It would be possible to use only Django talking directly to the server,…
-
8
votes1
answer186
viewsHow to filter multiple items within an array
I have the following JSON: { "Empresas": [{ "Name": "DIST", "Portais": [{ "title": "PRD", "tags": ["PRD", "DIST1"] },{ "title": "HIST", "tags": ["PCP", "DIST2", "DIST3"] }] }, {"Name": "LUZ",…
-
8
votes1
answer380
viewsHow to remove the background of an image using Watershed on android?
I’m developing an app that classifies images of wounds. For this, I need to highlight the region of interest of the background to facilitate the work of the classification algorithm. The user uses…