Posts by Zignd • 6,741 points
68 posts
-
7
votes1
answer492
viewsQ: How do Visual Studio recognize the 'use Strict' directive?
Apparently Visual Studio does not recognize the directive 'use strict', because I typed the code below that assigns value to a variable that has not been declared (something prohibited in Strict…
-
38
votes2
answers1727
viewsQ: What is the function of the ~ (til) Javascript operator?
I tried to search for Google and SOEN, but I did not find any reference to the operator ~, I discovered that it exists because I was reading a book about Javascript and had an example using it, but…
-
3
votes4
answers6715
viewsA: How to call an external function without sending the 'self'?
In Python you can call a method or property from within a two-mode class, but first consider the following class: class Pessoa: def __init__(self, nome = "nenhum"): self.nome = nome def…
-
31
votes10
answers34548
viewsA: What is the difference between the == and === Javascript operators?
In Javascript there are two pairs of equal operators: === and !==, and the evil twins (evil Twins) == and != (as described in Javascript The Good Parts by Douglas Crockford). === and !== The first…
-
32
votes7
answers58283
viewsQ: Regular expression for e-mail validation
I am trying to create a regular expression to validate any e-mail, I wrote the expression below, but it is not working as expected: var parse_email = /^[a-z0-9.]+@[a-z0-9]+\.[a-z]+\.([a-z]+)?$/i;…
-
108
votes4
answers48488
viewsQ: Where should I put a Javascript code in an HTML document?
Where Javascript code should be placed in an HTML document: in the element <head> or <body>? At the beginning or end of each one? Is there any difference in performance or any other…
-
42
votes3
answers3888
viewsQ: Why is using global variables not good practice?
I’m reading a Javascript book called "Javascript The Good Parts" and in it at various times the author says that one should not use global variables because they are of "evil". Why are they…
-
38
votes8
answers14487
viewsQ: How to create a copy of an object in Javascript?
I have an object called cachorro and would like to create and store a copy of that object. As objects, vectors, functions and regular expressions are considered objects I cannot make a copy just by…
-
7
votes2
answers340
viewsQ: ASP.NET pages continue to run after page changes?
The method Response.Redirect has a parameter in one of its overloads called endResponse that when true indicates that the current page must be completed after redirecting. Does this mean that when I…
-
1
votes2
answers1187
viewsQ: How to edit data from a Table after postback in ASP.NET?
I have a Table in a Web Form in ASP.NET and just below in the same form I added a Textbox in which you fill the fields to add a new line to the Table. The insersion part in the table works very…
-
16
votes4
answers8320
viewsQ: What is the difference between client-side and server-side code in web development?
I’m studying ASP.NET through a book called Professional: ASP.NET 4.5 in C# and VB and at various times the author talks about code client-side and server-side, would like to know the difference.…
-
19
votes4
answers1648
viewsQ: How to create a user interface with the same style that was used in Visual Studio, Office 2013, Github for Windows, etc?
I would like to know how to create UI as used by Visual Studio, Office 2013, Github for Windows, etc. I searched the internet and found a theme for WPF called Cosmopolitan Theme, but noting some…
-
4
votes1
answer256
viewsQ: How to make a Help equivalent to Microsoft Help Viewer, but in Visual Studio 2012/2013?
I wanted to do a Help for a commercial automation system that I created, that was in the style of Winrar help, and that was offline. But apparently according to the article Microsoft Help Viewer on…
-
8
votes2
answers2353
viewsQ: How to get the integer value of one of the constants of an Enum?
I have an Enum (enumeration) calling Notas and need to obtain the integer corresponding to one of its constants. public enum Nota { Otimo = 5, MuitoBom = 4, Bom = 3, Regular = 2, Ruim = 1,…
-
6
votes2
answers2353
viewsA: How to get the integer value of one of the constants of an Enum?
You can get the expected result by performing a explicit conversion (cast) since the data are of different types (Nota and int). Just use the converter/cast operator with the data type you want, in…
-
7
votes2
answers461
viewsQ: Writing conventions for ASP.NET controls
When you drag a control from Toolbox to a Web Form Visual Studio automatically adds an ID to this control consisting of its type with uppercase first letter and a number. This is the same pattern…
-
28
votes10
answers68840
viewsQ: How to make a <div> occupy the entire page width but leave a gap of a few pixels on each side in CSS?
I’m trying to make a header that should fill the entire page width, but leaving a 5px gap on each side. For example: | ::::::::::::::: | | ::::::::::::::: | In this case the Pipes are the maximum…
-
4
votes4
answers5177
viewsQ: How to handle vectors in a Mysql database?
I have a supermarket box application in which after the end of the sale need to insert a record with data related to this sale in a table, in this record must be included the code of the products…