Posts by Leandro Angelo • 9,330 points
440 posts
-
1
votes1
answer89
viewsA: Instead of displaying text line by line display the whole text
Use the method ReadToEnd() and try to use using, when working with Stream and File, this will ensure the Dispose() of the object as soon as it is no longer allocated string texto = string.Empty;…
c#answered Leandro Angelo 9,330 -
2
votes1
answer88
viewsA: Jquery, exchanging images by clicking
If you have the reference of data-tab and will always respect the nomenclature and the interval between the number of the originals and the number that will be alternated, you can solve as follows:…
-
3
votes5
answers2803
viewsA: How to make CSS a paragraph with Capitular letter (Drop Caps)
Yes, just use the dial ::first-letter and apply the style you want. section p { vertical-align:text-top; } section p::first-letter{ font-size: 2rem; font-weight: bold; color: red; text-transform:…
-
6
votes2
answers130
viewsA: Display one item at a time with jQuery
You can use a foreach with a delay(), multiplying by the "index"... so I believe it will reach the desired effect. And the aspect of the effect you get playing with the values of the delay and the…
-
1
votes3
answers159
viewsA: Doubt how to capture the character’s animation in Unity
Free up the operator && instead of +, if it is only the W rotate the walk animation. And use the method GetKeyDown() to identify a key pressed if (Input.GetKeyDown(KeyCode.LeftShift)…
-
0
votes1
answer82
viewsA: Change form when typed
You can use the plugin mask from jquery, apply the mask only when the input value is numeric and remove it if you have input from some other character. $(document).ready(function() {…
htmlanswered Leandro Angelo 9,330 -
0
votes1
answer56
viewsA: Search forms
Just create a form with the action for https://google.com/search as the method GET and name their field of search as q. <form action="https://google.com/search" method="GET"> <input…
htmlanswered Leandro Angelo 9,330 -
0
votes1
answer26
viewsA: Image does not change when you click it, only in the text
Happens by the '.change' selector the event is being fired twice, when you click on the image it changes to the down arrow and in the sequence returns to the right... Change your selector to…
-
1
votes1
answer31
viewsA: Error calling method in code Behind
CidadeBLL.Instancedoes not have the method Listar() or has not been properly initialized.
-
1
votes4
answers3746
viewsA: Insert html file via javascript
Leave in your external file only the internal contents of <head> and use the <link rel="import" href=""> to make the include. <!DOCTYPE html> <html lang="en-US"> <head>…
-
0
votes1
answer37
viewsA: Data from the same table for different views?
If data traffic between the application server and the database is not a critical issue. What can be done is to create a ViewModel for each view in order to reduce data traffic between server and…
-
2
votes2
answers1161
viewsA: Show button when checking checkbox
If your goal is to display the button only when at least one checkbox is checked, you can do this only with javascript with the help of the method querySelector() with the query…
-
1
votes1
answer43
viewsA: Error using Telerik Radtreelist
Remove the Registry from Telerik.QuickStart, as well as all components of this prefix. According to Telerik itself they are only used for configuration and display on their live demo pages. Source…
-
2
votes1
answer104
viewsA: I click the button and do not add the div - C# Asp.Net
The attribute runat="server" should only be used for ASP.Net components, those where Markup starts with <asp: or any other tagprefix you have registered on your page. In this case the most…
-
2
votes1
answer164
viewsA: Image transition css and html
To give a more fluid aspect, since you are doing everything via Jquery... instead of setar display:none to the .icon you can use the methods of fade(). $(document).scroll(function() { var y =…
-
2
votes1
answer54
viewsA: How to make a label with behavior="scroll"?
You can emulate the behavior of <marquee> (which is now indicated as deprecated), in CSS with animation and translate(). .marquee { width: 100%; margin: 0 auto; white-space: nowrap;…
html5answered Leandro Angelo 9,330 -
2
votes1
answer52
viewsA: Set Space for text
You can compose your string by concatenating the first two parts, adding the spaces, taking a substring and adding the end. See the example below. @echo off setlocal set "espaco= " set "prefixo=Meu…
-
1
votes1
answer128
viewsA: Pass page html via GET Ajax
Via GET will not be possible, change your javascript and controller to work with post and use a Fileresult to download the file. function exportarExcel() { var html = $("body").html(); $.ajax({ url:…
-
0
votes2
answers226
viewsA: How to Insert a parameter from my system into an external URL
Create an action in your controller like RedirectResult [HttpGet] public RedirectResult RedirectTo(int id) { string location = GetLocation(id); return RedirectPermanent(location); } string url =…
-
1
votes1
answer72
viewsA: How to add a background with C#codes?
This is not possible, the most you can do is change the background color and there is a trick to change the whole background and not just the line, but it implies to run a Console.Clear(). class…
c#answered Leandro Angelo 9,330 -
0
votes1
answer59
viewsA: button to add a minute
The interval of your timer is wrong, if you want a synchronization with seconds, must match with that interval, as it is assigned in milliseconds and for your event Tick is fired every 1s (by…
-
0
votes1
answer76
viewsA: Parser error in my application
First you must confirm if the namespace is correct SoftwareSalgado.Paginas. Then you need to check if the class Fornecedor is a partial and is inheriting System.Web.UI.Page. Last but not least, it…
-
0
votes2
answers401
viewsA: Controller Dynamic Fields - ASP.NET MVC
I wouldn’t recommend you naming your inputs with the index together, particularly I would use the attribute data-contador for this... but following its code, could solve as follows. function…
-
1
votes1
answer602
viewsA: How to format a label using Stringformat in Xamarin Forms
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" …
-
2
votes2
answers608
viewsA: Select columns dynamically with Linq
Using the type dynamic, the class ExpandoObject that supports IDictionary<string, object> to add the properties at runtime... You can start your implementation with the example below. public…
-
1
votes4
answers85
viewsA: Printing the highest value variable
It follows another alternative, but it would be necessary to change its input structure to instead of variables mount an object and use them as properties of it. //convertendo a sua entrada em um…
javascriptanswered Leandro Angelo 9,330 -
0
votes1
answer57
viewsA: Error creating custom ASPNET MVC validation ( Client Side )
Your logic is a little wrong, you are not comparing the value with the declared filter and the condition is reversed. public class Idade : ValidationAttribute { private int _idadeMinima; public…
-
1
votes2
answers90
viewsA: Image Path Console Application VB.net
Whereas the root of your executable is in G:\projetolimpo\up_sgp-master\ you can use the method GetCurrentDirectory() and complement with rest of the way. Dim path = Directory.GetCurrentDirectory()…
vb.netanswered Leandro Angelo 9,330 -
0
votes1
answer52
viewsA: How can I break lines from an Errormessage of a Data Annotation?
If you are only displaying this validation in a web application you can use html tags for this: [Required(ErrorMessage = "Campo orbgiatório.")] [RegularExpression(…
c#answered Leandro Angelo 9,330 -
1
votes1
answer1053
viewsA: Using Selenium how to select two different elements that have the same ID?
Since the elements possess the same id, although this is wrong, instead of your XPath query for all elements that have id=login, //*[@id="login"], you can identify which type of element with this id…
-
0
votes2
answers1189
viewsA: Join several PDF files into one
Iterate between the posted files and add them to your list, although you allow each input to receive multiple files I think what would make more sense is to leave only one field with multiple…
-
3
votes2
answers220
viewsA: How to pass an attribute of the child class through the constructor to the mother class
From what I understand of your question, you wish to own a property Nome in your class Animal with the private Setter and want to assign its value through the child class constructor. You can use…
-
2
votes1
answer89
viewsA: xml being generated with encoding="utf-16"
This happens because of StringWriter which uses as standard the Enconding UTF-16. One is to make your own implementation solution, inheriting from Stringwriter and forcing the use of UTF-8 public…
c#answered Leandro Angelo 9,330 -
2
votes1
answer68
viewsA: Convert Json data (2018-09-20 15:58:38) to (20/09/2018 15:58:38)
You can use filter date <td>{{clientes.ReceivedDate | date: 'dd/mm/yyyy HH:mm:ss'}}</td> <td>{{clientes.Amount | currency:"R$" }}</td> Angularjs Filter Date Reference |…
angularanswered Leandro Angelo 9,330 -
1
votes1
answer65
viewsA: Replace text from a textbox when the user input the same textbox
Well you didn’t put your code, but in view of the behavior, it is possible to state that you are assigning the value passed on QueryString for your input txtEmail in the event of Page_Load(). And…
-
0
votes1
answer220
viewsA: Button created Dynamically does not fire Asp-action - core 2 MVC
This won’t work because you are writing a component of Razor, which should be interpreted on the server side before rendering the view, in your ready html and on the user screen. <button…
-
1
votes1
answer52
viewsA: How do I pass the value of the Tumb variable to my controller?
Post via Ajax poulando the expected object, or add an Hidden field that will store the value of Thumb and popule via JS View @using (Html.BeginForm("SalvarItenss", "Home", FormMethod.Post, new {…
-
1
votes3
answers121
viewsA: Dataannotations problem in string fields[]
If you want to validate a collection of values I would recommend you break and another object and put the validation in the element, see the example below [Display(Name = "E-mails")] public…
-
5
votes1
answer122
viewsA: Is there any way to use a "custom-attribute" as the value of a CSS property?
CSS can access custom Attributes values such as data-* through the method attr(), the problem is that it will always be interpreted as a string, which may have some utility, but ends up invalidating…
-
0
votes1
answer1309
viewsA: How to create dynamic input within form
See the example below that reproduces the behavior and some observations: there is no tag </br> name your variables with something that makes sense, don’t use x,y,z var CountProds = 1;…
-
2
votes2
answers542
viewsA: how to remove rows from a table?
Just remove the edges via css and by attributes cellpadding and cellspacing body { background-color: grey; } table { border: none; } <h1> Atributos zerados</h1> <table cellpadding="0"…
htmlanswered Leandro Angelo 9,330 -
6
votes5
answers4828
viewsA: With CSS is it possible to put 2 colors in 1 letter? Or half the text with a different color?
One more... h1 { font-family: sans-serif; font-size: 6rem; margin: .15em; background: -webkit-linear-gradient(left,blue 50%, red 50%); -webkit-background-clip: text; -webkit-text-fill-color:…
-
0
votes1
answer131
viewsA: Generate multiple PDFS via Itextsharp
You cannot send multiple files via HTTP Request/Response. You will need to make multiple requests or "package" your files at .zip, .rar, .cab and etc.
-
1
votes1
answer56
viewsA: Reordering Autoincrement in SQL
As discussed in the comments, you should not worry about this aesthetic issue of the identifier but rather about the integrity of the data. In the scenario where this Primary Key is not Foreign Key…
-
2
votes1
answer114
viewsA: Failed to get a file. txt to download
Good your practice does not make much sense and the persistence of content in a text file before the answer, which will be overwritten at each execution and only serves to bring you competition…
c#answered Leandro Angelo 9,330 -
0
votes1
answer114
viewsA: Wcf access via https
Modify your HttpBinding to configure security mode for Transport <bindings> <wsHttpBinding> <binding name="ServiceBinding1" maxReceivedMessageSize="2147483647"> <reliableSession…
-
4
votes2
answers103
viewsA: Httpstatuscode does not exist code 207, 208 and 226
Successful not only the range you present, it goes from 200 to 299, you can validate through the property IsSuccessStatusCode class HttpResponseMessage. HttpResponseMessage response = await…
-
1
votes1
answer53
viewsA: Parse URL image
If what you send is a byte[] and want to get it also from an external url, add this functionality to the method GetImageAsByteArray() or create a new specific. static byte[]…
-
0
votes2
answers234
viewsA: Pass two parameters at once to the controller - A parameter is in an Input Group
You can add an Hidden input to persist the cdLeito and its inputs need to display the attribute name for the values to be included in FormData and sent to the destination route <input…
-
1
votes1
answer57
viewsA: I have a method in Serverside validaNIF and want to call it through javascript (Clientside) to validate an Asp:textbox when it does Leave
Here you have two points with different solutions, if your problem is the imperviousness of the data after the postback of a control, this can be solved with the ViewState. Now, objectively on the…