Posts by Marcus Vinicius • 4,826 points
139 posts
-
1
votes1
answer46
viewsA: Buttons, panels and other shapes in the CONSOLE
There are no such libraries or projects for.NET Console applications. That’s because it doesn’t make much sense to have a button on a console, since there is a Windows Forms (or even the WPF), in…
-
8
votes3
answers1436
viewsA: Information when Hovering Mouse in Photo
Option 1: The plugin jQuery Capty, does exactly what you need, only you will need jQuery. Here’s the code link on Github: https://github.com/wbotelhos/capty And a demo:…
-
3
votes1
answer275
viewsA: Why use the Ienumerable?
The IEnumerable<SelectListItem> is the type expected by the second parameter of all overloads of the extension method DropDownListFor, but Viewbag is a dynamic object - at compile time there…
-
0
votes1
answer1017
viewsA: How to display an ASP HTML code on a Label by sending by Code-Behind(C#) - ASP.NET
You’re confusing some core ASP.NET concepts here. When you declare a tag <asp:LinkButton runat="server" />, this tag is interpreted by the ASP.NET engine and an equivalent Html is generated…
-
6
votes4
answers11586
viewsA: Text that you type little by little?
Alternative: var texto = "Hello World!!!"; var result; var count = 0; function digitar() { result = document.getElementById("result"); window.setTimeout(function() { inserir(texto[count]) }, 200); }…
-
1
votes3
answers1480
viewsA: Weight mask
You can directly use jQuery for this if you are not using dynamically generated fields: $('.peso').keyup(function () { var v = this.value, integer = v.split('.')[0]; v = v.replace(/\D/, ""); v =…
-
3
votes4
answers4483
viewsA: Extract decimal part of a decimal
It is possible to get the decimal part as an integer in the form you expect, without using Strings, using the Math.Floor as follows: counting how many decimal places there are in the resulting…
c#answered Marcus Vinicius 4,826 -
2
votes1
answer4742
viewsA: Error runat=server when inserting a button into the form
With the ASP.Net Webforms, all server controls (runat="server") should be within a tag <form runat="server">. To solve your problem, insert your page content into a <form…
-
23
votes3
answers32528
viewsA: Selected date comparison with current JS date
You can convert your date from String for Date and compare with the operator: var strData = "28/02/2015"; var partesData = strData.split("/"); var data = new Date(partesData[2], partesData[1] - 1,…
javascriptanswered Marcus Vinicius 4,826 -
2
votes2
answers53
viewsA: Check if directory is a repository with Libgit2sharp (C#)
You can use: Repository.IsValid(dir); The source code of the class Repository is here Freely translating the text of the method documentation, we have the following: Checks whether the parameter…
-
1
votes1
answer542
viewsA: How to know which is the first and last element with Jquery?
You can use the methods last and first $(".elemento").first(); // primeiro elemento $(".elemento").last(); // último elemento
-
5
votes2
answers2501
viewsA: How to style only an excerpt of a text?
Use a span and a CSS class: .destaque { font-weight: bold; color: #009933; } <p>A <span class="destaque">ferramenta é 100% online</span>, desenvolvida com as mais modernas…
-
12
votes3
answers23957
viewsA: Calculate values in real R$
If you are using modern browsers, use toLocaleString: var formato = { minimumFractionDigits: 2 , style: 'currency', currency: 'BRL' } $("#totalEntrada").append($entrada.toLocaleString('pt-BR',…
javascriptanswered Marcus Vinicius 4,826 -
2
votes1
answer513
viewsA: What’s the best way to get information to View?
One solution for your case, which needs to load the image with both Ajax and Postback, is to use two different methods: one that returns the bytes of the image the way you were already doing and the…
-
2
votes2
answers109
viewsA: Array of string elements
You can use the function .each concatenating the HTML of the element into a variable: var $localidades = $("<td style='white-space: nowrap;'>Sto.amaro</td><td style='white-space:…
-
1
votes2
answers86
viewsA: How to take the file path and insert it into a table?
With excel it is possible to accomplish what you need with the following VBA code: Option Explicit Sub ListarArquivos() Dim objFSO As Object Dim objTopFolder As Object Dim strTopFolderName As String…
-
3
votes2
answers142
viewsA: Taking data from a url
I advise you to use the Google API directly. The following code snippet (using jQuery for Ajax request) gets the latitude and longitude of an address passed by parameter:…
-
1
votes1
answer624
viewsA: How to only validate fields that are visible?
Option 1 - Pure Javascript I created the following function, which takes into account display: none and visibility: hidden: function estaVisivel(elm){ var estaVisivel = (elm.offsetWidth > 0…
-
3
votes1
answer2014
viewsA: How to put 2 elements concatenated with variable in a selector with jQuery?
You got the id, so you have to use the '#' selector: var to = $(".meunome").attr("id"); var from = $(".amigonome").attr("id"); $('#' + to + ', #' + from).append(...);…
-
2
votes2
answers1434
viewsA: Obtaining the number of dependents of an official
You did not specify what does not work, but I suggest changing your query to use the clause JOIN (LEFT JOIN in that case because an official may not have dependents). SELECT d.*, f.* FROM…
-
3
votes1
answer4973
viewsA: What is the difference between the relationship with "identification" and the relationship with "non-identification"?(Mysql Workbench)
Relationships with and without identification are concepts of MER (Entity Relationship Model). In practice, a relationship identifying is the one that is represented by a foreign key that is part of…
-
1
votes1
answer175
viewsA: How to create two classes with the same methods, even though one of them is not`Partial`?
You are confusing some concepts here. The class is declared as NotInheritable means that no class can inherit from her (abstract in C#). Inheritance is a basic concept of Object-Oriented Programming…
-
0
votes2
answers83
viewsA: How to deal with <ul>
There are some semantic errors in your code and duplicate id’s. I advise to give a studied in HTML and CSS. But here’s a way to get closer to what you expect: HTML - change the part of the button to…
-
8
votes3
answers812
viewsQ: jQuery is still "necessary"?
I have recently wondered about the real need to still use jQuery in new web projects. I know that he was, until recently, the best means (and for many cases the only one) of manipulating HTML…
-
2
votes2
answers269
viewsA: Could not resolve this Reference. Could not locate the Assembly "Mysql.Data"
The following solutions have been tested in Sharpdevelop 5, but in the Visual Studio 2012/2013 is very similar: Option 1 - Nuget Double-click References and then in Manage Packages: In the window…
-
1
votes1
answer141
viewsA: Enable Javascript within a Fancybox
The assignment of events with on jQuery is indicated to add events to dynamically created elements. The best place to understand about the on is in the own documentation from jQuery Here are…
-
2
votes1
answer235
viewsA: Search without having to SUBMIT
You can assign a function to the eventp KeyUp textbox: $("#fn").keyup(function() { if($(this).val().length >= 3) // só começa a pesquisa após digitar três caracteres showValues(); }); I added a…
-
2
votes1
answer495
viewsA: Webbrowser with input type file
I managed to accomplish what you need with help of that question in the Stack Overflow in English. The secret lies in the use of Task with Delay: Create an asynchronous task to grab the controls and…
-
3
votes1
answer187
viewsA: Simple doubt with Jquery, smooth effect
You can get this effect by changing the CSS and using the fadeToggle: $(document).ready(function(){ $(".btn-nav").click(function(){ $(".nav ul").fadeToggle("slow", "linear"); }); }); .nav ul {…
jqueryanswered Marcus Vinicius 4,826 -
3
votes1
answer115
viewsA: Progress within a Task
Using the method Invoke it is possible to accomplish what you want: private void button1_Click(object sender, EventArgs e) { Task task = new Task(Processar); task.Start(); } public void Processar()…
-
6
votes2
answers4326
viewsA: Proxy connection: HTTP 407 Proxy authentication Required
I usually set proxy with . NET as follows: I create a class that inherits from Iwebproxy: namespace MinhaEmpresa.MeuProduto.Web.Proxy { public class MyProxy : IWebProxy { public ICredentials…
-
2
votes3
answers685
viewsA: Doubt with Getdate()?
You should disregard the hours to make this comparison. So: DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) A tip is to create a function for this, to make the code clearer: CREATE FUNCTION truncate_date…
-
1
votes1
answer114
viewsA: MTA Thread Attribute affects in Thread
I will leave an answer that meets your need, but using another approach. If your need is to read HTML content from a page on the web, you will find it very difficult to do this using Webbroser…
-
0
votes1
answer99
viewsA: Automatically select field
You can retrieve the children’s items from select and iterate for them by selecting the one who has the text sought: Dim htmlElm As HtmlElement =…
-
1
votes1
answer239
viewsA: How to pick up a clicked multidimensional checkbox
Why not use classes? $('.grupo').click(function() { var $this = $(this); var is_unique = $this.data('unique'); var is_checked = $this.is(':checked'); var grupo = $this.data('group'); if(is_unique ==…
-
1
votes1
answer347
viewsA: Window.onbeforeunload in Firefox
Unfortunately, nay it is possible to overwrite the default message in Firefox. The event beforeunload uses an internal browser method to stop closing/browsing. In the function assigned to the event,…
jqueryanswered Marcus Vinicius 4,826 -
3
votes1
answer4831
viewsA: Show and hide form fields of the radio type
You can do something like this, using Javascript only: function tipoPessoaSel() { var pf = document.getElementById("opt-pf").checked; if (pf) { document.getElementById("pf").style.display = "block";…
-
1
votes2
answers3387
viewsA: Finish a process programmatically
The following code terminates the process with PID 9812, for example: Process p = Process.GetProcessById(9812); p.Kill();
c#answered Marcus Vinicius 4,826 -
1
votes1
answer386
viewsA: I am unable to open a byte array extracted from the database!
The problem is because you are not recording the file contents properly. By your code, the property Annex class Anexobll is of the type byte[]. At the point in the code you create the SQL string…