Posts by Marconi • 17,287 points
267 posts
-
2
votes4
answers5242
viewsA: What is the priority of HTML? "id" or "class"?
The answers are already very good, but studying about I found an examples that can easily discover the predominance W3C has devised a way to calculate the specificity of selectors. To understand…
-
7
votes3
answers12428
viewsQ: What’s the difference between Cast and Convert?
In a Transact-SQL (Ramalho Series) book it is said: CAST AND CONVERT It implicitly converts one expression of data types to another. CAST is synonymous with CONVERT. What do you mean by CAST is…
-
5
votes3
answers6709
viewsA: Is it possible to have more than one Primary key in a table?
Can’t have more than one PK in the same table. Use Constraints (Constraints), in your problem use the constraint UNIQUE, which will ensure that all values in your column are different. UNIQUE The…
-
9
votes3
answers2048
viewsA: What is the function of the toString() method?
toString public String toString() Returns a textual representation of the Object. The result must be a concise but informative representation that is easy for a person to read. It is recommended…
-
5
votes1
answer1341
viewsQ: How can I list all invalid emails?
I ended up finding something like this due to the lack of validation that we didn’t have. teste@cliente calteste5@calteste5 calteste6@calteste6 vava@ius Pablo Fernandes xxx eduardostubbert 123456…
-
14
votes1
answer16891
viewsQ: What does COLLATE LATIN1_GENERAL_CS_AI do?
I’m asking this question because I came across this reply by @Sorack; I didn’t understand what influence COLLATE LATIN1_GENERAL_CS_AI had the result, I’ve seen some answers here on Stackoverflow and…
-
3
votes3
answers1052
viewsA: How to filter a list type Ienumerable<> through another Ienumerable<>?
I understood that based on a IEnumerable you want to filter into another. With the method Any you will get what you want, add to the method Filtramundo: IEnumerable<Mundo> filtered = mundo…
-
17
votes3
answers5013
viewsA: What is the difference between using Object.toString() and String.valueOf()?
Oracle documentation if the argument is null, then a string Equal to "null"; otherwise, the value of obj.toString() is returned. Translation: If the argument is null, then we have a string equal to…
-
4
votes2
answers728
viewsA: Field size takes total defined value?
Yes the size is dynamic. VARCHAR only considers the space used by the column and not the total storage of the column. This is not to say that you should add high values in a field, that is, it is…
-
4
votes2
answers159
viewsQ: What’s the point of continuing flow control?
I found this code explaining the flow control continue. string [] nomes = new string[] { "Macoratti", "Miriam", "Pedro"}; foreach (string nome in nomes) { if (nome == "Miriam") continue;…
-
8
votes4
answers14426
viewsA: What is the difference between "margin: 0 auto;" and "margin: auto;"?
When you put: margin: 0 auto; You are setting margins esquerda e direita of the element to auto and the upper and lower margins to 0. When you say: margin: auto; You are adding to the margin element…
-
4
votes3
answers799
viewsA: How to sort by the relevance of Like?
How about using Case When in the Order By? select * from MinhaTabela WHERE texto LIKE '%car%' order by case when texto like 'car%' then 0 else 1 end Sort text in ascending order where to start with…
-
10
votes8
answers2184
viewsA: How to know all possible combinations of 0 and 1 in Java?
While using for (int i = 0; i < 256; i++) { int mask = 256; while (mask > 0) { if ((mask & i) == 0) { System.out.print("0"); } else { System.out.print("1"); } mask = mask >> 1; } }…
-
9
votes1
answer2140
viewsA: How to remove spaces leaving only one?
Do so: declare @texto varchar(MAX) set @texto = '1 tigre, 2 tigres, 3 tigres' set @texto = replace(replace(replace(@texto,' ','<>'),'><',''),'<>',' ') select @texto Exit: 1 tiger,…
-
29
votes2
answers48751
viewsQ: What are Begin, Commit and Rollback transactions?
What are Begin, Commit, and Rollback Transactions? And how to use them? Example in practice will help a lot in understanding.
-
11
votes1
answer173
viewsQ: Constant is really useful?
Why would I use a constant instead of a variable? In addition to readability, there is another gain in using a constant? I can’t make a difference that makes me use a constant instead of a variable.…
-
9
votes1
answer7662
viewsA: How to break the line by passing the size of the div?
I understood that there is no line break because there are no spaces. Use the property word-wrap and set the value break-word, this will force a line break as soon as the text reaches the limits of…
-
4
votes1
answer163
viewsA: Webworker and Async - What is the difference and when to use it?
Both are somewhat similar. Asynchronous functions are only possible when used with one of the following options: Settimeout Setinterval Xmlhttprequest Webworkers Webworkers are also part of this…
-
23
votes2
answers7627
viewsQ: What is the difference between Javascript and jQuery?
Think about the Jquery as a Framework JavaScript in order to optimize writing, the Ajax is a good example. In addition to easier writing, there is a difference between the two? What are the…
-
3
votes1
answer160
viewsA: I want that when passing the mouse for a Li, the result appears in the DIV
Use $('li > a') as selector in jQuery to catch the child(s) from li and use this and take the text from li that the mouse passed, it is quite simple. Behold: $('li > a').mouseover(function() {…
-
7
votes1
answer482
viewsA: Return last value inserted in table where value is not Identity?
There isn’t a T-Sql for that. You just use SCOPE_IDENTITY or IDENT_CURRENT as long as the column is Identity. I recommend the following readings: Best way to get Identity of inserted Row? It is…
-
0
votes2
answers354
viewsA: Navbar collapsing after selection?
From what I understand you want to "collapse" the menu after selecting some item, when the layout is on a smaller device. Just add the following jquery: $('.nav a').on('click', function(){…
-
1
votes1
answer130
viewsA: Rearranging product lists with Javascript?
As I explained in this reply the function sort accepts an optional parameter. I imagined a scenario where you would have a select with the options: "Recente", "Maior" e "Menor". Remembers enough…
-
0
votes2
answers286
viewsA: How to generate number without repetition with a pause button?
The setInterval Returns a range ID, and can be passed as a parameter in the function clearInterval(), if you want to stop your execution. See working: var stop; var contador = 0; function append(el)…
javascriptanswered Marconi 17,287 -
2
votes2
answers43536
viewsA: Error doing Insert - String or Binary data > would be truncated
You are trying to add a higher value than the column allows. RX_NUM in t_cmo_oit1980_leitura(table that receives the data) has a length varchar(6), and RX_NUM in t_cmo_planilha_leitura has a length…
-
20
votes2
answers9904
viewsQ: What is the difference between clustered index and nonclustered index?
Studying about found a example, and about clustered says: Primary Keys by default use a grouped Dice (clustered), that is, when conducting a consultation select * from myTable where IDColumn = 1 ,…
-
5
votes5
answers721
viewsQ: Element with different end size than width and height definition in CSS?
Code: div { width: 300px; height: 100px; border: 1px solid red; padding: 50px; } <div> Contéudo da div. </div> I would like to understand why while inspecting the div that’s in the code…
-
4
votes2
answers2249
viewsA: What is the purpose of the pseudo-elements "::before" and "::after"?
The pseudo-elements ::before e ::afterwork in the same way and work in partnership with a property called content. The estate content serves to insert dynamic HTML content. ::after…
-
2
votes4
answers12426
viewsA: How do I detect a mobile device in Javascript?
On the website Detect Mobile Browsers you can download code corresponding to several most famous and relevant languages on the market. Javascript code taken from the site. (function(a, b) { if…
-
16
votes1
answer880
viewsQ: How do >, + , ~ selectors work in CSS?
Selector + Takes the first element found after your declaration. div + p { font-size: 20px; } <div> </div> <p>Este é um paragrafo</p> <p>Este é outro…
-
4
votes1
answer264
viewsA: What is the difference between Lexical Scope and Dynamic Scope in Javascript?
Lexical Scoping(also called static scoping). window.onload = function fun() { var x = 5; function fun2() { console.log(x); } fun2(); }; fun2 is an internal function that is defined within fun() and…
javascriptanswered Marconi 17,287 -
2
votes2
answers735
viewsA: Is there a css selector that selects elements through your text?
Complement the @Artur only with CSS it is not possible to do this, according to the documentation. An alternative is to use Jquery, that can be done so: $("table tr td").filter(function (){ return…
-
3
votes2
answers735
viewsQ: Is there a css selector that selects elements through your text?
I want to add background the row of a table in which one of the columns is: Value 1. I tried with the pseudo-class contains and by innerHTML, but all without success. Code: table tr td…
-
1
votes3
answers684
viewsA: How to give Focus in a row by the contents of a td column?
I understand that you want to select the line for a value that is in a <td>. For the tests I’ve run on focusdid not work as expected(I did several tests unsuccessfully). An alternative is to…
-
7
votes1
answer400
viewsA: In Sass what is the difference between a mixin and a placeholder?
mixins Allow you to define styles that can be reused across the style sheet. Allows you to play rules CSS complete in a document Sass and even have arguments that allows you to produce a wide…
-
13
votes2
answers286
viewsA: What is the use of the varchar(0) column type?
According to the manual of MYSQL: Mysql allows you to create a type column VARCHAR(0). That is useful especially when you need to be compatible with systems which depend on the existence of the…
-
2
votes3
answers9803
viewsA: How to pick up values contained in a table?
It’s not ideal for you to put the same ID for several elements, as @Sergio explains in this reply. I modified your code and took the values using the querySelectorAll, would look like this:…
-
35
votes6
answers24229
viewsQ: What is the difference between padding and margin in CSS?
From what I understand I see a retreat from another element when defined the properties left, top, right e bottom. There is a difference between margin and padding in the CSS? An answer with…
-
13
votes2
answers34544
viewsA: How to get column names from a table in SQL Server?
Select INFORMATION_SCHEMA.COLUMNS asking for the column COLUMN_NAME. In INFORMATION_SCHEMA.COLUMNS you have information about all columns for all tables of a database schema. Query: SELECT…
-
9
votes2
answers34544
viewsQ: How to get column names from a table in SQL Server?
Table Languages: How to select the Column Names of this table? The result would be: "Ididiome", "Acronym", and "Language".…
-
18
votes3
answers66689
viewsA: How do I activate IIS in windows 10?
You can follow the steps: Press the key combination Windows + R to open an execution box and then type appwiz.cpl and press enter. Go on Enable or disable Windows features Tick the box Internet…
-
29
votes3
answers8073
viewsQ: How is the Global Unique Identifier (GUID) generated?
The Global Unique Identifier is generated so that no other will be generated equal, or will almost never have the same number. var unique = Guid.NewGuid().ToString(); Resultado:…
-
9
votes3
answers42294
viewsA: Select option from a select
From what I understand your problem is simpler than it seems. I understood that you want to select a option at value. Your missed you assign the month variable on value. See working: var mes = 8;…
-
18
votes2
answers429
viewsQ: What is CSS Aural?
The CSS we know formats the information delivered by HTML. This information can be anything for example: image, text, video, audio or any other element created, that is, the CSS formats the…
-
54
votes2
answers126902
viewsQ: What is the difference between $(Document). ready() and window.onload?
There is a difference between $(document).ready() e window.onload apart from one being Javascript and the other being jQuery? I see both events are triggered as soon as the GIFT (Document Object…
-
5
votes1
answer111
viewsA: Geolocation with Mobile Data
So, since you didn’t give details of your code, I’ll post an explanation at HTML5 which until recently read in the W3C documentation on geolocation. There are three popular ways to get your…
-
6
votes1
answer214
viewsA: How can I detect if the user of my site has my extension installed in Chrome/Moziilla
In that question has a very simple and functional code. The code below will try to load a cross-schema script from chrome-extension: // URL, in this case - the manifest file. You only need the…
-
6
votes2
answers277
viewsA: Difference Italic and emphasis in HTML?
The tag <em> has meaning emphasized. You should use it when you want to stress a particular thought or idea. Browsers usually make the text emphasized in italic; A reader may recite the text a…
-
6
votes3
answers21853
viewsA: How to select an option in <select> via text using jQuery?
:contains() Selector Select all elements containing the specified text. $("#animal option:contains(Boi)").attr('selected', true); <script…
-
6
votes1
answer1042
viewsA: What is ASP.NET’s Httphandler and Httpmodule?
In short: Httphandler is where the request is addressed. Httpmodule is a station along the way. For me better answer taken from the source below! The main and common objective of Httphandler and…