Posts by Augusto Vasques • 15,321 points
571 posts
-
5
votes1
answer315
viewsA: Silverlight Lightswitch - [Noelements] Debug resource chains not available
Two information you have to keep in mind. What is status HTTP 202 and the second is $batch. What is HTTP status 202? According to the standard RFC 7231 HTTP status 202 means (my free translation):…
-
1
votes1
answer75
viewsA: (C#) Does the Code Not Save the information in the array (table)?
The problem is that the instance salas is the type List<Sala> and was being populated as if it were an instance of the vectorSala[]. There are two solutions to this problem. The first solution…
c#answered Augusto Vasques 15,321 -
2
votes1
answer257
viewsA: Recursiveness and Haskell
Less compact but works. potencia:: Int->Int->Int potencia x n |(n<0) = error "Expoente negativo." |(n==0) = 1 |(n==1) = x potencia x n = x * potencia x (n-1)…
-
8
votes3
answers12885
viewsA: How do you know what language a program was written in?
Corroborating the response of Maniero, in Windows environment there is no guaranteed way to know which language the executable was written in. What is an executable. An executable program or…
-
1
votes3
answers596
viewsA: How to put white/transparent background on png image with black background
Replace the excerpt from: png.Assign(bmp); png.SaveToFile(SavepictureDialog1.Filename); for: png.PixelFormat := pf32bit; png.Transparent := True; png.TransparentColor := clWhite; png.Assign(bmp);…
-
0
votes2
answers2094
viewsA: Open Python file only works with Windows folders in English
To get the folder path user in Windows or user in Unix/Linux use the path manipulation function expanduser (https://docs.os.path.html#os.path.expanduser) replacing the ~ by the user folder path.…
-
14
votes1
answer429
viewsA: How to identify the anti-standard TOCTOU? How to avoid/remove it?
TOCTOU is acronym for Time Thef CHeck to Time Thef Uif. It is a bug of the kind running condition caused between checking a condition and using the results of the check. How many your questions: How…
-
1
votes2
answers210
viewsA: Improve function performance that determines whether it is palindromic
My suggestion is this, first converts the String in a Array. Then reverse the Array. Lap String then make the comparison in uppercase letters. public bool éPalindromo(string entrada) { return…
-
1
votes2
answers3064
viewsA: Swap line break " n" for " r n" in Richtextbox
Make the change with one of the method overloads String.Replace When you need to change the line break: string TextoComQuebrasTrocadas = SeuRichTextBox.Text.Replace("\n","\r\n"); ̶o̶u̶ ̶d̶i̶r̶e̶t̶o̶…
-
2
votes2
answers303
viewsA: Swap background image from Asp . Net MVC page dynamically
Using Jquery put this script in _Layout.cshtml. <script> $(document).ready(function() { var i = Math.floor(Math.random() * 9) + 1; $("body").css("background-image", "url(/Background/Fundo (" +…
-
4
votes1
answer129
viewsA: How the XPATH contains function works
The function contains serves to inform if there is an element whose attribute contains a certain value. It is a logical function so returns only true or falseand is usually used as a parameter. The…
-
2
votes1
answer126
viewsA: Return of jquery autocomplete returning at top
Use the jquery function position $(".ui-autocomplete").position({ my: "left bottom", at: "left top", of: $("#produto"), collision: "flip flip" }); Place the following selector in CSS:…
-
2
votes1
answer50
viewsA: How to pass a decimal type variable to a string type sql command with decimal separator "."?
Use one of the method overloads Tostring. You can do: sql.Append($" Valor_Transacao = {Value.ToString(CultureInfo.InvariantCulture)}, "); or else: sql.Append($" Valor_Transacao =…
-
2
votes1
answer350
viewsA: Rename id with jquery
On the line $('#resultado_empresa_').attr('id', 'resultado_empresa_'+event.id); the selector $('#resultado_empresa_') selects all elements whose id is resultado_empresa_. Without having HTML you…
jqueryanswered Augusto Vasques 15,321 -
1
votes3
answers1236
viewsA: Calculate age by date of birth
There are some errors in your example. On the line idade = CInt((Date - datanasc) / 365) you’re using the class Date as if it were an instance. Another thing is that to get time intervals like…
visual-basic-6answered Augusto Vasques 15,321 -
2
votes1
answer78
viewsA: Finalizearray Example
To free the memory referenced by a vector use the method: http://docwiki.embarcadero.com/Libraries/Rio/en/System.FinalizeArray FinalizeArray(Titulosdelete, TypeInfo(Titulosdelete),…
-
1
votes1
answer114
viewsA: Load XML file stream in Xrrichtext
Use a Binary Writer as the method MemoryStream.Flush() performs no action(https://docs.microsoft.com/.../system.io.memorystream.flush) RichEditDocumentServer server = new RichEditDocumentServer();…
-
4
votes3
answers150
viewsA: Two equal programs providing different outputs
The problem is that expressions... a, b = b, a + b and a = b b = a + b ...are not equal and do not have the same result. In the first expression the value of a on the right side of the expression…
-
1
votes1
answer1298
viewsA: Error: Configuration system failed to boot
The problem is with this line <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />.She’s in the wrong file. This tag is not understood by the element’s Xmlschema…
-
4
votes2
answers1955
viewsA: How to insert HTML code into a textarea?
With <textarea> is not possible. I believe you are looking for a <div> editable: <div contenteditable="true"> Take the example: <div contenteditable="true">Primeira…
-
6
votes1
answer108
viewsQ: How to reflect on overloaded operators in C#?
My problem is this: I’m writing an interpreter and I need to perform dynamic operations between various types. For this use dynamic links provided by DLR consisting of a static object encapsulated…