Posts by Marconi • 17,287 points
267 posts
-
4
votes4
answers8175
viewsA: What is the opposite of the "None display"?
According to this answer in SO-EN display: none does not have an opposite as visibility:hidden(opposite visibility: visible). The display property, however, decides which Layout rules an element…
-
3
votes2
answers1404
viewsA: Split string into substrings and search for them in another
The CHARINDEX does not work for your problem, because it looks for occurrences in String. Words like "Rua Da", "RUA A" would fall into the same situation as the word "E". When "E" is assigned there…
sql-serveranswered Marconi 17,287 -
8
votes2
answers864
viewsA: Differences between Jagged Array and Multidimensional Array in c#?
To Jagged Array is a Matrix of Matrices, a int[][] is a matrix of int[]. Elements can contain different sizes and dimensions. Example: int [][] jagged = new int [3][]; jagged [0] = new int [2]{1,2};…
-
2
votes3
answers179
viewsA: Select the Controller name via Javascript
Use window.location.pathname to obtain the Url chain. Use Split("/") to split the URL. The first position indicates the dominio, followed by Controller and last Action. See the result of:…
-
12
votes2
answers7652
viewsQ: What is User Agent Stylesheets?
Studying on CSS I came across the term User Agent, or standard style sheets used by browsers in case of absence of style sheets. What is the User Agent? Each browser has one User Agent? Is there any…
-
21
votes2
answers868
viewsQ: What is the purpose of alt in a <img /> tag?
Studying on HTML5 I came across the property alt being used in tag <img />. Example: <img…
-
7
votes3
answers13327
viewsA: What is the difference between vertical and horizontal scaling?
Staggering Horizontal you add more machines into your resource pool while scheduling Vertical means you add more power (CPU, RAM) for an existing machine. In a Horizontal database is often based on…
-
4
votes2
answers833
viewsQ: Varchar or Datetime?
I always save my bank dates using the type datetime. When displaying these dates in an application, I do something like: select Convert(Varchar, GETDATE(),103) Data Upshot: 04/10/2016 I’d like to…
-
1
votes2
answers1304
viewsA: Catch event click on jQuery autocomplete value
You can use the event select. I made a test based on the example of the site itself Jquery-UI. Would look like this: $( function() { var availableTags = [ "ActionScript", "AppleScript", "Asp",…
-
4
votes5
answers498
viewsA: Capture Enter in IE using jQuery
Second that reply found in the So-En e.which does not work in the IE. An alternative is you use e.KeyCode and use keydown instead of keypress. Press run and you will see that Alert will show you the…
-
8
votes3
answers7332
viewsA: How to put scroll at the end of the div?
Add to Scrolltop the value of the property scrollHeight, scrollHeight returns the height. It would look like this in JS Puro: var objDiv = document.getElementById("scroll"); objDiv.scrollTop =…
-
1
votes3
answers3965
viewsA: Check the existence of Dice?
You can use a IF thus: If IndexProperty(Object_Id('MyTable'), 'MyIndex', 'IndexId') Is Null If there is an Indice will return the ID case will not return Null. Source: Soen…
-
2
votes1
answer191
viewsA: Load a Gridview with selected records
Use the Event Rowdatabound of Grid, it allows a line-to-line configuration. Just you get your Checkbox and mark it. My example was like this: protected void NomedoGridView_RowDataBound(object…
-
7
votes2
answers176
viewsA: Manipulating Javascript window.history
That is not possible. There are security issues involved by the fact that every website you visit could be viewed by all the other websites you have been on. An alterative to circumvent this, as…
javascriptanswered Marconi 17,287 -
4
votes1
answer698
viewsA: Javascript - Copy content from a <span> to clipboard by clicking a <button>
Behold: document.querySelector("button").onclick = function() { var element= document.getElementById('numerosx'); var range = document.createRange(); range.selectNode(element);…
javascriptanswered Marconi 17,287 -
4
votes1
answer4589
viewsA: How to know if the person is legal?
I used a function that returns the difference between the current year minus the proposed one which will return to age. See working: function getIdade(data) { var hoje = new Date(); var nascimento =…
-
14
votes7
answers68940
viewsA: How to make SELECT with ORDER BY and different criteria?
Use Case When. In my example only the registration with id 100 will be 1, then will be returned first. The other records always returned 2 which will occur a draw, which is worth the second…
-
2
votes1
answer2047
viewsA: Change time in sql server 2014
SQL Server uses by default the regional settings that are set in your Windows. You can only change your server configuration: Control Panel -> Region and Language -> Change Location ->…
-
6
votes1
answer427
viewsA: Search only the smallest number of each letter
You can use the function Minwith the function of aggregation Group By. I used the Script below for tests: CREATE TABLE [dbo].[TesteLetra]( [letra] [varchar](1) NULL, [numero] [int] NULL ) ON…
sql-serveranswered Marconi 17,287 -
10
votes2
answers931
viewsA: How to classify a table from A to Z?
I like the plugin tablesorter, and if you need more details or wanted to do something specific just give a tip in the documentation. Simple and easy and you don’t need to reinvent the wheel, see…
-
1
votes2
answers1228
viewsA: Replace NULL with string
Reply created as Requested @Marcelo. Try: SELECT COALESCE(convert(varchar,DATA,103) + ' ' + SUBSTRING(convert(varchar,DATA,114),0,6), '-')
sql-serveranswered Marconi 17,287 -
1
votes1
answer928
viewsA: When clicking on a select item, show input
You are confusing things. First that in your Function you are trying to get the input using the getElementById, and that for this to work you must add a idthe input or exchange the namefor id as I…
-
4
votes2
answers736
viewsA: Traverse an array without knowing its indices
That’s a Object, to read its properties do: var array = { x: "Primeiro Valor", y: "Segundo Valor", z: "Terceiro Valor" }; for (var prop in array) { console.log("propriedade: " + prop + " valor: " +…
-
1
votes3
answers4632
viewsA: Sqlserver Select in XML field
Researching about I ended up bumping into this question of SO-ENGLISH. I performed my test as follows: CREATE TABLE [dbo].[Teste_XML]( [xml] [varchar](max) NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]…
sql-server-2012answered Marconi 17,287 -
5
votes4
answers31555
viewsA: Remove special characters and accents in javascript
From what I understand in the comments you want to remove the accents and the special characters. Try removing the accents first and then removing the special characters. str = 'joão?'; str =…
-
1
votes1
answer228
viewsA: How to add 64 base image to the div background dynamically?
Through this question a solution given in the answer was. Add a class: .backgroundA { background-image: url("…
-
6
votes2
answers2097
viewsA: Make div appear when right-clicking mouse
In that reply from SO-EN has what you want. Use the event mousedown and make sure it was the right button that was triggered by the code if(e.button == 2) Jsfiddle. While I’m at it I’d change the…
-
3
votes1
answer737
viewsQ: How to create an application from scratch in ASP.NET MVC?
I’m studying about the Asp.Net MVC and here I already got a good base of how to start from scratch with Empty, as I haven’t found a good tutorial on how to start. My problem is this: I have this…
-
1
votes3
answers1705
viewsA: Fileupload without refresh on the page?
I managed using Ajax, I can’t remember where I got the tutorial more my code looked like this: HTML: <form role="form" id="commentForm"> <input type="file" id="uploadEditorImage"…
-
1
votes1
answer344
viewsA: Select2 display optgroup value and concatenated option
Here on this reply So-English deals with your problem, specifically in this one jsfiddle which I thought was the best, but only works with simple selection. With the help of the author of the…
-
1
votes1
answer289
viewsA: Hide menu by clicking out and exit js
Here in the W3schools has a good example. Note that when you hover the mouse over the image the function is called bigImgand when removed calls the function normalImg. function bigImg(x) {…
-
2
votes1
answer72
viewsA: Problems with array.Sort()
It cannot order correctly when it has uppercase and lowercase values. Then you just use the function toUpperCase()to put all the text in Maiúsculo and compare, or if you want to use…
javascriptanswered Marconi 17,287 -
4
votes1
answer3687
viewsA: How to align text in the center of a card?
I found this reply here at the SO-English. Just add text-center in your div. See the example of one of the responses applied to the button search.…
-
1
votes3
answers5377
viewsA: SELECT IN A RELATIONSHIP WITH SELF RELATIONSHIP(Verifying Conflicts)
Try: SELECT NomeD FROM DISCIPLINA d WHERE d.PreReqD IS NULL AND NOT EXISTS (SELECT 1 FROM DISCIPLINA d1 WHERE d1.PreReqD = d.CodD) See working on Sqlfiddle.…
-
3
votes1
answer2096
viewsA: Delete a specified line from a Datatable
You can do it like this: table.Rows[indice].Delete(); table.AcceptChanges();
-
1
votes1
answer208
viewsA: PHP and Highcharts, doubt list series
Deducing that your array is like this:[{name:'Corrida', dados:"50"},{name:'Corrida', dados:"60"},{name:'Ataque',dados:"51"}] the idea would be to put it in format: [{name:'Corrida', dados: [50,60]},…
-
9
votes4
answers8543
viewsA: Ordering an array of objects by date
I adapted that reply your need, you can create your own function and pass it as function parameter sort. See Working. var objeto = [ { data : new Date('11-30-2015'), nome: 'Marconi',…
javascriptanswered Marconi 17,287 -
8
votes5
answers19374
viewsA: How to check if a field of type text or ntext is null or empty?
You can use datalength(Notes)=0 or Notes like ''. SELECT Subject, Notes from DocumentNotes where Notes is null or Notes like ' ' Ou SELECT Subject, Notes from DocumentNotes where Notes is null or…
-
1
votes2
answers1360
viewsA: Viewer for PDF with jquery
I created a link pointing to a pfd and used the option target="_blank" to open in a new tab. Try: <a href="https://gradcollege.okstate.edu/sites/default/files/PDF_linking.pdf"…
-
33
votes4
answers5507
viewsQ: Why are NULL values not selected?
When making a select, I noticed that the data with field NULL are not recovered using the operator<>. Why does this happen? NULL is equal to a char N? See that in the query below only the…
-
5
votes5
answers34006
viewsA: How to return the last record of an array with Javascript or jQuery?
Another way would also be using the function pop. It removes the last element of the vector and returns it. I don’t know if it would be recommended in your case. See working here. var vetor1 = new…
-
1
votes2
answers790
viewsA: Select the country and bring the state
We’re missing a select to receive the cities. See that in the way populateCountries you pass the city and state id. Add the HTML: <select id="state" name="state"> <option…
-
1
votes2
answers782
viewsA: How to make space in the checkboxlist text created dimanically
Following the answer on the link here . You can create a Css .test tr input { margin-right: 30px; } And add to your checkboxlist via Cssclass. <asp:CheckBoxList ID="cblEscolhaDaOpcao"…
-
2
votes2
answers1325
viewsA: Master page in HTML
Your error occurs due to missing Jquery reference. Just include the reference that can be made via Cdn, <script…
-
3
votes1
answer5847
viewsQ: How to play a youtube video in an iframe? Refused to display '' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'
I’m trying to play a youtube video on my website using iframe and is generating me the error that is in the title of the question. HTML: <div class="video-container"> <iframe…
-
9
votes5
answers10525
viewsA: Show every day between two dates
From what I understand in your question the date 30/07/2015 would not enter, and the result would be: 01/07/2015 02/07/2015 03/07/2015 04/07/2015 05/07/2015 Follows code that picks up the date and…
-
10
votes2
answers1094
viewsQ: What does content:" f0ed" mean?
I am developing a site from a ready template, when inspecting element and check which image to swap found the Css as follows. .fa-cloud-download:before { content:"\f0ed" } What does that mean Css?…
-
2
votes3
answers3015
views -
2
votes1
answer102
viewsA: Problems with passing values Asp.net C#
Deducing that your column LOGIN_REDE is varchar you should include the quotes in @LOGIN to make the comparison between varchars. When you move the Query to the bank it will be executed like this:…
-
2
votes1
answer701
viewsA: Disable class when closing modal
I made an example here and everything works normal. Follow my example. $(function () { $('#modalDialog').on('hidden.bs.modal', function () { $("#modalDialog").removeClass("modal-lg");…