Posts by Ulysses Alves • 2,165 points
86 posts
-
0
votes2
answers745
viewsA: How to concatenate Strings into a Linq query
Add a new Select after the GroupBy concatenating the string you need: dataGridFiscalizacoes.ItemsSource = fiscalizacoesBaixadas.Distinct().GroupBy(x => x.Id).Select(y => new { Id =…
-
3
votes2
answers2245
viewsA: How to capture Alert message using web browser controler?
Perhaps the best alternative for you is to use the Selenium Web Driver With it you can manipulate the browser and have access to all DOM elements, allowing you to simulate a user browsing the site,…
-
0
votes4
answers1973
viewsA: How to make a list item show/hide a DIV when clicked?
With jQuery: var lista = $("#conteudo ul"); lista.click(function() { var indiceDoItem = lista.index(this); // Oculta ou mostra a empresa correspondente. $(".source li").eq(indiceDoItem).toogle();…
-
1
votes4
answers1315
viewsA: How to group code and add existing amounts in text files with C#?
Using Filehelpers this looks like it won’t be too complicated. Class of the layout of records containing the code and the quantity: public class Registro { [FieldFixedLength(6)] public int Codigo…
-
4
votes2
answers2346
viewsA: Generate txt file according to the predefined layout in c#
The library Filehelpers does exactly what you need. With it you can set file layouts by size and position. In your specific case, after importing the Filehelpers in your project, you would implement…
-
-1
votes2
answers479
viewsA: How to make a dynamic meta descripition in Angularjs?
<html ng-app="app"> <title ng-bind="metaservice.metaTitle()">Test</title> <meta name="description" content="{{ metaservice.metaDescription() }}" /> <meta…
-
1
votes1
answer454
viewsA: Use javascript to get CSS rules from an external stylesheet
As explained by Jordan M Alperin, The only real solution to this problem is to load your CSS into CORS (Cross Origin Resource Sharing) mode. Through an xmlHTTPRequest CORS you load the CSS from an…
-
4
votes2
answers630
viewsA: Automatically add link protector to server links
With Javascript native as follows: var links = document.getElementsByTagName("a"); for (i = 0; i < links.length; i++) { var link = links[i]; var urlProtegida =…
-
4
votes1
answer303
viewsA: Code block freezing and does not release Exception
It may be that the code is crashing on some internal library exception, but it does not show the error due to this exception being handled by the library itself or due to it waiting for some…
c#answered Ulysses Alves 2,165 -
0
votes3
answers1771
viewsA: How to confirm that the page has left?
Change the tag <a href="teste2.php" onclick="this.name = 1" id="a" name="0">teste2</a> so that the event onclick only change the link name if the user confirms that they really want to…
-
1
votes2
answers803
viewsA: ASP.NET MVC 5 runs on IIS 7.5 Windows Server 2008?
Try the following solutions: Install the Hotfix KB 980368 on the server on which the IIS is installed If Hotfix does not work, use the settings below: <system.webServer> <modules>…
-
0
votes2
answers181
viewsA: visual studio sql error
Maybe it’s an error in your connection string "Server=.\\SQLEXPRESS;Database=teste; Integrated Security = true" Ensure that SQL Server Express Edition is installed and the database test exist on…
-
0
votes2
answers412
viewsA: Error Saving EF Changes
When the exception pops into Visual Studio, click View Detail.... A window will open in which you can expand the node Inner Exception.…
-
0
votes2
answers906
viewsA: How to send email through an HTML page?
Use the element a informing on the attribute href email details such as subject (subject), recipient (mailto:) and body of the message (body). Blank spaces separating each word in the subject and…
-
1
votes1
answer556
viewsA: How to use the value of an HTML field within code Behind C#?
Inform a name for the element, and then in code-Behind use Request.Form["nomeDoElemento"] to obtain it. For example, if Javascript code creates an element <input type="text" name="nomeDoCliente"…
-
1
votes1
answer209
viewsA: Show more than one dropdown column value C#
My suggestion is that by instantiating each dropDownListItem in new ListItem(newName, localidade) you pass to the item’s value field not only the locale, but also the user ID, concatenated with the…
-
4
votes2
answers1261
viewsA: Detect extended click, javascript
According to the answer to this question in English "Listen to mouse hold Event on website?", you need to pass a parameter to the events mousedown and mouseup so that you can identify if the event…
javascriptanswered Ulysses Alves 2,165 -
0
votes2
answers180
viewsA: Problem in fixed layout creation
One strategy you can use in this case is to dynamically fix the height and width of the page so that they are always equal to the height and width of the device’s screen, respectively. To do this,…
-
0
votes5
answers554
viewsA: Error passing URL as parameter... Joeblogs & Htmlagilitypack
The line of code string conteudo = resultat.DocumentNode.SelectNodes("//*[contains(@class,'entry-content')]")[0].InnerHtml; apparently you can’t find the div entry-content on the page. Make sure…
-
0
votes4
answers646
viewsA: Perform function by clicking except on specific item with jQuery
$(".teste").find(".link").click(function() { return true; });
-
2
votes4
answers18668
viewsA: Javascript money format with Angularjs and jQuery
Ideally you should not apply the format in the model, but rather in the view, ie in HTML code. To apply value formatting Angularjs offers the concept of filter, which you indicate in HTML along with…
-
0
votes4
answers791
viewsA: Taking data via ajax
If your intention was to take the action set in the first internal div of the selected menu, then just replace the snippet var acao = $(this).attr('href'); for var acao =…
-
3
votes1
answer25659
viewsA: How to put a background image?
Inferring through your import <link rel="stylesheet" type="text/css" href="style/style.css">, the style file is in the folder style. However, the images are in another folder: img. It turns…
-
3
votes2
answers2330
viewsA: Registration lock
First you need to ensure the following two prerequisites for the registry lock to work: The storage engine of your table must be configured to Innodb. Your record lock query must be executed after…
mysqlanswered Ulysses Alves 2,165 -
15
votes6
answers13840
viewsA: What good is a builder?
A constructor serves to instantiate objects of the class in which this constructor was defined. Initialization of objects via constructors is necessary to avoid null reference error when using…
-
0
votes1
answer305
viewsA: How to configure which folder the software should be installed/updated in?
Right click on your installation project in Solution Explorer and choose "View -> File System". Select "Application Folder" from the window you opened. In the "Properties Pane" area of Visual…
-
1
votes1
answer955
viewsA: Edit field within a list in Asp.net MVC
For the field to be an editable checkbox, try replacing @Html.DisplayFor(modelItem => item.Aprovado) for @Html.EditorFor(modelItem => item.Aprovado). Displayfor is for presentation only, while…
-
8
votes2
answers2820
viewsA: What’s the difference between @import of css and html Link?
In theory, the only difference between them is that @import is the mechanism CSS to include a stylesheet and <link> is the HTML engine to do the same. However, each browser manipulates them in…
-
5
votes3
answers2830
viewsA: Extract data from txt file to use in autocomplete
The following code generates the Cbos vector with exactly the same structure as the example you presented in the question, and then adds this vector as the autocomplete data source.…
-
0
votes1
answer305
viewsA: String para Date
As @Guilherme Lautert said in the comment, in both cases returns the same value, just presenting it differently. What changes is only the time zone that was used, and GMT-0200 indicates two hours…
-
0
votes3
answers1158
viewsA: 'NT ANONYMOUS LOGON AUTHORITY' failure in SQL Server 2012 on remote server
Have you checked whether the remote database server allows external access to the IP in which your application is hosted? Generally database servers limit external access, making it necessary for…
-
0
votes2
answers1450
viewsA: Send Model Razor with $Ajax Serialized Controller
You are using JSON.stringify, so actually you are not sending an object to the server, you are sending a string. Remove JSON.stringify so that your data is sent as JSON and not as a string: data:…
-
4
votes2
answers917
viewsA: Amount of a given character contained in a Stringbuilder
Using Linq you can get the amount of characters that are asterisked as follows: StringBuilder builder = new StringBuilder("12**********3*4*"); // É necessário usar ToString() para evitar chamar…
-
0
votes5
answers508
viewsA: Query error with WHERE AND COUNT on Oracle. "SQL command not properly ended"
Try reversing the order of your query to something similar to the following: INSERT INTO TB_CLASSIFICACAO_UG (SELECT COD_CLASSIFICACAO_UG, TXT_DESCRICAO, IND_ATIVO FROM TB_CLASSIFICACAO_UG WHERE…
-
1
votes3
answers968
viewsA: How to run Url.Content via Client?
Use the pseudo element text so that the Razor engine can consider C# expressions within Javascript code. In your case, try as follows: <text> $("#element").html('<img…
-
-2
votes4
answers1759
viewsA: How do I make all items in a menu equal in size regardless of quantity?
Why not try dynamically using jQuery? For example, you can get the number of list items at runtime and divide the total width by that value by assigning the result to the width of each item in your…