Posts by Good Bye Blue sky • 956 points
37 posts
-
1
votes4
answers3686
viewsA: How to get javascript/jquery array content?
Your array is not an object JQuery, so it doesn’t work on each(). Convert it to an object JQuery and the same will work: let arrayIDs = []; arrayIDs.push({ "id_produto_itens": 1 }, {…
-
0
votes3
answers307
viewsA: Equivalent to javascript wrap
Something like that would work: function wrapHTML (element, wrapperElement) { //Aqui você define seu wrapper let wrapper = wrapperElement || document.createElement('div'); //Colocando um id só para…
-
1
votes3
answers923
viewsA: window.showModalDialog does not work on Google Chrome, is there anything equivalent?
The function window.showModalDialog became absoleta not only in Chrome (v.43) but also in Firefox (v.56). Inclusive, reading the specification function, will probably become obsolete in more…
-
2
votes1
answer468
viewsQ: How to declare "nullable" parameters in an Oracle database?
I need my process to accept null values in some parameters of type Number. How do I do this in PL/SQL? Currently: PROCEDURE SP_EDITAR_QUADRO( P_IDQUADRO IN NUMBER, P_IDFUNC IN NUMBER, P_IDTRAB IN…
-
2
votes1
answer185
viewsA: Why does this @Html.Dropdownlistfor not accept htmlAttributes?
Try it this way: @Html.DropDownListFor(model => model.IdStatusRegistro, new SelectList(ViewBag.ListaSelectList, "Id", "Descricao"), htmlAttributes: attribs) Apparently it’s just an error in…
-
3
votes5
answers3132
viewsA: What is the difference between comparison operators on Oracle?
Giving a read on documentation, all these operators do the same thing. There is no difference between performance and or execution order. The following image shows the execution order, which appears…
-
8
votes2
answers7922
viewsA: What is and what is the utility of the DUAL table for Oracle?
Just complementing the response of Luiz Santos, giving comparative examples with other Dbms: In SQL Server or Mysql, when you want to select a value that is not contained in a specific table (such…
-
1
votes1
answer110
viewsA: Load page inside a div with Ajax
Yes this problem is because of the CORS settings, which is a protection against requests from other domains to your site, prohibiting them from displaying it on a iframe for example as a form of…
-
1
votes2
answers655
viewsA: Validation of fields from Razor forms
As stated in your question, if you already have the ID value, just make a comparison in Razor itself to decide how the field will be displayed: @if (Model.ID == 0) { @Html.LabelFor(m => m.Nome,…
-
1
votes1
answer769
viewsA: Run Action Post by Jquery ASP.NET MVC
The date Annotation ActionName is overwriting the name of your action DeleteConfirmed for Delete. Change that name on your call that should work. $('.btnExcluirSimPopover').on('click', function () {…
-
1
votes3
answers1286
viewsA: How to clear the value of an INPUT after selecting the radiobutton?
I recommend you separate your HTML and Javascript for legibility reasons. So you can do it this way: (function () { let radioButtons = document.querySelectorAll('.radio-limpar-inputs'); for (let i =…
-
0
votes3
answers2176
viewsA: Question how to increase input size according to div size using bootstrap
Try to put the div with the class form-group inside the size definition of the "columns" and the class row to define each "line" of the form. Would look like this: <div…
-
5
votes4
answers1255
viewsA: Converting Httppostedfilebase to byte[] : Exception_wasthrown
The MemoryStream creates an internal buffer with a predefined value, which only grows according to the demand of the past data. If the data you pass exceeds the size that has been pre-leased, is…
-
0
votes3
answers2065
viewsA: Link to call in phone numbers
How do you want the click to work on a input, and not in a anchor, I suggest creating a click event in your input, through javascript. Add the onclick property to the input:…
-
1
votes1
answer33
viewsA: Selection Using FROM TABLE
The scope of your second subselect (SELECT TEXTO1,DATA1,DATA2...) can’t "see" the field FERRAMENTA.IDFERRAMENTAS. Try to remove it and see if you get the expected result, as follows: SELECT…
-
0
votes2
answers328
viewsA: Show white space for Null value in Views
You can use the null propagation operator, available from the C# 6.0. Follow the example: @Model?.Quantidade Read more about this operator in the documentation:…
-
4
votes1
answer70
viewsA: Convert Json to Long type
Since Javascript is not a strongly typed language, I suggest you just convert your variable to a number, as follows: idEntidade = Number(localStorage.getItem("idEntidade"));…
-
2
votes1
answer217
viewsA: ASP.NET MVC Actionlink outside the area
To indicate that you will not access a Controller from within their area, enter it as an empty parameter in the call: @Html.Action("ACTION","CONTROLLER", new { area = "" })…
asp.net-mvcanswered Good Bye Blue sky 956 -
4
votes3
answers266
viewsA: Send what is being typed from one input to another in real time
You can do as follows, using regex to filter the special characters $('#input1').on('change keyup', function () { $('#input2').val($(this).val().replace(/[^a-zA-Z0-9]/g, '')); }); <script…
-
1
votes0
answers250
viewsQ: Difference in using clause using within namespace
There is some difference in performance / execution / compilation of C# code when using clauses using inside the namespace? Basically what I want to know is if there is a difference (beyond…
-
4
votes2
answers461
viewsQ: What is the Riot.js?
I was reading about some frameworks and libraries for front-end UI development and came across the Riot.js. Giving a quick read on page of the library (in English), I concluded superficially that…
-
1
votes0
answers29
viewsQ: What is the difference between Document.getElementById and "element ID"?
I was curious to discover that it is possible to recover an HTML element using its ID as a Javascript variable. Then the question arose to me: what is the difference between document.getElementById…
-
1
votes2
answers408
viewsA: C# returns an HTML string
You can use the Html.Raw() so that there is no HTML encoding in the string. Would look like this: <input type="text" class="famo-input famo-text-10" name="cost"…
-
0
votes4
answers1005
viewsA: Convert Int to bool
In C#, you cannot compare integers with booleans. Its property is boolean, so you should compare it only with values true or false. In your case, the comparison should be made as follows:: if…
-
1
votes1
answer76
viewsA: Error in SCROLL function inside Onclick
From what I’ve read, the function scroll being called does not correspond to his authorship but to the function scroll window., receiving different parameters, causing this error in Chrome. Try to…
-
0
votes3
answers547
viewsA: Display value of an Indice array in an Alert
Apparently your idea of how to display the value is not wrong, just fix the syntax. var a = []; a[0] = 'Carro'; alert(a[0]); In case the array is inside a loop: var a = []; a[0] = 'Carro'; for (i =…
javascriptanswered Good Bye Blue sky 956 -
-1
votes3
answers752
viewsA: String with JS Function Name
Can be used eval(), although not recommended for safety reasons. According to the MDN: The Eval() method evaluates Javascript code represented as a string. With your example: var func =…
javascriptanswered Good Bye Blue sky 956 -
1
votes2
answers176
viewsA: Use Google Oauth2 without going through the google login page
It is not possible, the use of Oauth is exactly to allow login through another service. The user of your application will log in to the service that allows Oauth and this service will inform you…
-
2
votes1
answer237
viewsA: Calling variable object from a string
There is a way to instantiate objects from strings, using the Activator.CreateInstance. Ex: var DE = $"Origem.{Arq.Origem.Empresa}.{Arq.Origem.Sistema}+{Arq.Origem.Tabela}"…
c#answered Good Bye Blue sky 956 -
1
votes2
answers5698
viewsA: Select parent element with javascript (no Jquery)
Use the property parentNode Ex: document.getElementById('filho').parentNode
-
0
votes2
answers322
viewsA: Read and edit a specific word in a string (c#)
You can use String.Replace. Ex: public static void Main() { String s = new String('a', 3); Console.WriteLine("The initial string: '{0}'", s); s = s.Replace('a', 'b').Replace('b', 'c').Replace('c',…
c#answered Good Bye Blue sky 956 -
-1
votes2
answers168
viewsA: How can I see last deleted database database database database
Yes, it is possible. With the SELECT below, given example, you can get all logs related to the DROP’s of your base, as beginning of the query, the type of operation and other transaction Ids, all of…
-
1
votes1
answer130
viewsA: Hiddenfor - Submit loses value the first time
You are having this problem because you are trying to change a form value after firing the "Onbegin". According to the MSDN: The Javascript Function is called by ASP.NET MVC after the Httprequest…
-
1
votes2
answers624
viewsA: When using optional parameters above overloading and vice versa?
The use of optional parameters delegate to function logic how the internal operations will be made, not letting the function call decide what will be the behavior and use of these parameters. In a…
-
1
votes3
answers948
viewsA: Logout com Identity
The helper @Html.ActionLink generates an HTML element <a> - anchovy. The requisitions made from it are of the type GET, not enabling the action that has type POST be executed. Try to change…
-
1
votes1
answer334
viewsA: How to disable XHR messages finished loading in production
Actually, this function is from the Chrome console, not Angular 4. To disable it, open Developer tools in the console tab, click the options (gear) and uncheck the option LogXMLHttpRequests.…
-
2
votes1
answer793
viewsA: Return Oracle Timestamp
Unfortunately there is no native Oracle function to get Unix datetime from a date. The solution would be to do the calculation yourself, from the date of Unix epoch (01/01/1970). Follow example:…