Most voted questions
150,413 questions
Sort by count of
-
8
votes2
answers749
viewsRendering error - class could not be found: android.support.v7.internal.app.Windowdecoractionbar
In my project Android Studio is giving a rendering problem in xml, giving the following error: Rendering Problems The following classes could not be found: -…
-
8
votes2
answers500
viewsHow to use Regular Expression correctly
I’m studying about the RegularExpression, But I don’t quite understand. In my Model the property CPF must be filled in by numbers only: [RegularExpression(@"[0-9]", ErrorMessage = "CPF deve conter…
-
8
votes2
answers708
viewsCode First and Calculated Fields
I have a class Pedido, which has a calculated field, which is the order value, composed of the sum of the items minus the discount. public class Pedido { public ICollection<PedidoItem> Itens {…
-
8
votes2
answers576
viewsNotice: "Possible Multiple enumeration of Ienumerable"
I was doing some operations where I use collections. In one of these I needed to take a break (range) of numbers and I did the following: var range = Enumerable.Range(0, 4); And then I tried to do…
-
8
votes1
answer4160
viewsSimulate click with jQuery after inserting link via jQuery
I have to open another tab with a link that is returned to from PHP to jQuery. I used window.open but he asks to release the popup and the client doesn’t like it at all. So I thought I’d do, when…
-
8
votes1
answer253
viewsHow can I record information with Arduino?
We are developing a reading system to check parameters of electrical pulses that are measured directly from the electrical network of a household, and for this to happen we need to read and archive…
arduinoasked 8 years, 11 months ago Pena Pintada 4,678 -
8
votes2
answers1988
viewsCSS Reset or Normalize?
I heard about the CSS reset and I am also aware of the Normalize CSS which is a kind of reset for browsers to render basic CSS in a standardized way. Looking for the best solution in CSS, I…
-
8
votes5
answers3991
viewsUpdate list after push Angularjs
I have a list with several data ($scope.messages), but only some data interest me. After loading this list I make a foreach and take only the data that interests me and give push in a new list. That…
-
8
votes1
answer69
viewsHow do serial numbers work in a system?
You know when you buy a game online and you get the CD-KEY, and then you open an app and you record that CD-KEY for you? Or else you bought your new Operating System and will register and insert a…
-
8
votes4
answers2145
viewsWhat technique do I use to keep a form field completed or selected after $_POST[]?
I am developing a real estate system and would like to ask how I can keep the data of a form such as inputs, selects and checkbox selected after giving a $_POST on the form. I don’t know how to…
-
8
votes2
answers174
viewsGrouped id rendering speed vs class
Some time ago I saw some CSS rendering tests using id be faster than rendering using class, due to the amount of id be often lower in the document than the number of classes (one of the tests you…
-
8
votes3
answers170
viewsCreate markup with predefined symbols
I didn’t know how to pick a specific title before my doubt, so it was that vague medium anyway. I’ve been trying to do the following for a while: Assuming I have the <p>: <p>Olá, $está…
-
8
votes1
answer206
viewsWhy do Dbms use their own paging when the operating system already has one?
I’m studying databases and I’ve come to the subject of replacing pages like LRU and MRU. The operating system already does this normally, because DB needs to make its own paging?
-
8
votes2
answers288
viewsDecimal home approximation in Javascript
What is the reason for the behavior below? Why not give 3.3? I am running Javascript in the console and is returning this result. Number(1.1) 1.1 Number(1.1) + Number(1.1) 2.2 Number(1.1) +…
javascriptasked 8 years, 11 months ago Paulo Henrique Queiroz 419 -
8
votes2
answers1059
viewsHow to create a csv from a database and data query
I was able to create a perfect . xls file, but . csv can’t follow the code I used to create . xls $dadosXls = ""; $dadosXls .= " <table border='1' >"; $dadosXls .= " <tr>"; $dadosXls .=…
-
8
votes1
answer454
viewsIs it correct to say that encapsulation aims at cohesion? Why?
Based on the statement below, follow my question: Cohesion and Coupling are very software engineering principles used. When we want to have a mature and sustainable architecture, we must take these…
-
8
votes1
answer1947
viewsHow to drag form without border?
I’m trying to implement a way to drag my form no edge while clicking and holding down the left mouse button on it, however I did not succeed. Below follows the example of my attempt at…
-
8
votes2
answers2267
viewsWhat is the __init__.py file for in python modules?
I’m starting to work deeper with Python and have noticed many projects with files __int__.py in folders, and are often blank. What is the purpose of these files?
pythonasked 8 years, 11 months ago Leo Ribeiro 581 -
8
votes1
answer173
viewsAddorupdate - use array as parameter
I’m doing tests with Entity Framework and I had a problem when placing a array as a parameter. Why when I assign the conversion of array in a function variable and directly in the method parameter…
-
8
votes1
answer2417
viewsSimulate boolean type in C
What is the most appropriate way to simulate the type bool in C? My teacher did it in a very simple way. #define bool int But I also found an excellent answer here (follows a copy of the code). //…
-
8
votes6
answers1481
viewsLog system losing data, how to use Threads?
Currently I have a medium level system where I need to record detailed log of everything that happens in the system, the Company that is divided into Departments does audit of everything that…
-
8
votes1
answer116
viewsHow to develop an independent frameworks application?
Recently, I can’t remember where, I saw an application structure in which the core of the application, that is, its main entities, business rules etc., resided among the dependencies of the project.…
software-architecture software-engineering softwareasked 8 years, 12 months ago Rodrigo Rigotti 12,139 -
8
votes4
answers2691
viewsReports with Asp.Net MVC
Hello, I would like to know some options of reports with Asp.Net MVC. I tried to use Reportviewer but it gets typed with the bank and not to use with objects. Would anyone have any suggestions?…
-
8
votes2
answers1098
viewsAngular POST with custom header and CORS
I need to perform a POST request using angular (http.post) and I need to pass to my API (.NET) in my header the access credentials (I’m using basic Authentication). Authorization:Basic…
c# angularjs asp.net-web-api http-headers cross-domainasked 8 years, 12 months ago Pedro Camara Junior 6,637 -
8
votes2
answers184
viewsHave images in the tables where they will be used or table with image repository?
It is good practice to create a table to record all images from a database, or I can create columns that save image information for each specific need? For example, let’s assume that I want to…
-
8
votes2
answers5038
viewsWhat is the difference between "/*" and "/**" comments in PHP?
I’ve always been curious about this, but since it never changed my life at all, I never sought to know. If there is a difference, what would be between these types of comments in PHP? /* Comentário…
phpasked 9 years ago Thyago ThySofT 1,091 -
8
votes4
answers542
viewsWhy use block using in ASP.NET MVC?
The block using {} works in the same way in both web applications and desktops in the sense of when we use it in controller? It is a good practice to declare it in the actions that there is contact…
-
8
votes3
answers941
viewsEncapsulation in Javascript
If I create a global Javascript variable, it can be easily accessed from the console: <script> var minhaVariavel = 0; <script> But if I create it like this: <script>…
javascriptasked 9 years ago Jedaias Rodrigues 6,718 -
8
votes2
answers9610
viewsPick current date from machine
I need that when you execute the code it takes the current system date and assign to a Date. Example: Date x = new Date(now);
-
8
votes1
answer140
viewsPremises for a testable software
Based on development in object-oriented language, what would be the premises for software to have robust testability (coverage and testing facility) ?
-
8
votes6
answers16160
viewsFormat 9 and 8 digit phone numbers
I want to format phone numbers for the following formats: (XX) XXXX - XXX = 11 2222 3333 But as some new numbers come with DD + 9 digits, for example: (XX) XXXXX - XXXX = 11 22222 3333 How to format…
-
8
votes3
answers1791
viewsIs there any way to convert a string to base 64 in javascript?
Is there any way to convert a string to base 64 in javascript? In PHP we can do so: base64_encode('stack overlow'); //c3RhY2sgb3Zlcmxvdw== How can I do this in javascript?…
-
8
votes2
answers878
viewsWhen to use list comprehension and not filter+lambda?
Good night, you guys. Studying here, I found the functions of List Comprehension and filter+lambda, but both seemed very similar to me on some points... When should I wear List Comprehension instead…
-
8
votes1
answer466
viewsUsing Sqlite on Android with Phonegap
Guys, I have a little problem... I’m making an application and I’m using the sqlite on android to save a copy of my database, so far it’s okay, is working, is copying the data the only problem I…
-
8
votes1
answer439
viewsWith doing an iterator/Generator in javascript?
In PHP, we have the Iterators and the Generator. Iterator example: $f = new FileSystemIterator(__DIR__); foreach($f as $file) { echo $file->getFilename(); } Example Generator: function…
-
8
votes2
answers193
viewsHow does a variable point to a pointer?
Reading this answer on pointers and arrays in C, there is the example below where the variable ptr points to the first element of this array. int array[42] = {42}; int *ptr = a; How this pointer…
-
8
votes2
answers1700
viewsSeparating integer by character
I have a vector of integers: int nums[10] = { 1234, 4761814, 9161451, 14357 }; I want to know how to separate these numbers, for example, the first element to turn an array like this: {1, 2, 3, 4}…
-
8
votes1
answer89
viewsHow do I extract values from an Expression?
Hello. It is possible to extract from an Expression which filters, arrays, etc were used in a query? Example: public class Program { class Produto { public int Id; public string Nome; public…
-
8
votes2
answers323
viewsWhat is the @ in a view and controller for?
I program in PHP and I’m starting to learn how to program in C# ASP.Net MVC, but I’m having some questions: What is the purpose of @ (arroba) both in controller how much in the view ? What are these…
-
8
votes3
answers477
viewsHow to use GIT connected to the server?
I’ve been looking for some time about how I could replace mine filezilla and I got some answers that it’s possible to use git as an intermediary so I can run my site/project according to what’s in…
-
8
votes1
answer374
viewsWhat is ADO.NET for C#?
I’m starting to learn about C# for web applications, and I wanted to know what ADO.NET is and what are the advantages of using it?
-
8
votes1
answer591
viewsChange the naming pattern of views that are generated by scaffold
I would like to change the nomenclature where scaffold generates views: Standard: Create.cshtml Delete.cshtml Details.cshtml Edit.cshtml Index.cshtml I want scaffolding to create that way:…
-
8
votes1
answer3372
viewsSql - Select first and last record
I have the following tables: CREATE TABLE tb_lote ( id_lote integer NOT NULL DEFAULT nextval('tb_lote_seq'::regclass), ds_lote character varying(255), CONSTRAINT pktb_lote PRIMARY KEY (id_lote) );…
-
8
votes1
answer11054
viewsStreamwriter Special Characters with Encoding.ASCII C#
I am writing in a file via Streamwriter using the encoding Encoding.ASCII. A situation has appeared where I need to write the letter "Ç". Only if I try to do that, the file leaves the character "?".…
-
8
votes1
answer1373
viewsHow to handle duplicate key error?
How do I handle duplicate key error? I need to display message to the user that the "Item is already registered" Something like that: try{ //tenta inserir no Banco de Dados…
-
8
votes3
answers576
viewsSession Limitation to Save Data
I have a query slow in Oracle to list all the accesses of a user, so I thought to record the result in a Session, the average of records returned is 600, it’s too much for a Session? Would there be…
-
8
votes1
answer716
viewsShould I extend from an abstract class or a concrete one?
When I need to extend a class, following the concept of Object Orientation, should I extend my code from an abstract class or an abstract class? What is the best practice to join?
-
8
votes1
answer497
viewsWhat is DNX really?
A long time ago I asked here what is the Runtime Environment, especially on the .NET. platform. It turns out that now . NET has DNX which is ". NET Execution Enviroment". In practice we use DNX to…
-
8
votes2
answers1714
viewsInvoking an object’s method - reflect
It is possible to invoke a method from the contents of a variable of type String? for (Object vlr : dados) { String metodo = "getCodigo()"; contato.setAttribute("codigo", vlr.metodo); }…
-
8
votes5
answers1153
viewsIf the image is large vertically, height: 100%, if it is large horizontally, width: 100%?
I have a question, as I do to insert images with different sizes inside a div, and if the image is too large vertically, it stays with height:100%, and if it is very large horizontally with…