Posts by Felipe Assunção • 1,202 points
71 posts
-
0
votes2
answers3488
viewsA: How to change the href of a link dynamically?
Follows a solution body { font-family: Helvetica; color: rgb(85, 85, 85); } /* backgroud color */ h1 { font-size: 24px; font-weight: normal; margin: 0.4em 0; } .container { width: 100%; margin: 0…
-
1
votes1
answer293
viewsA: What are the best practices with implementation of Dryioc, Fluentvalidation and Lazy?
I think I understand your doubt, to do what you want it would be enough to let the following classes change: Program: class Program { static void Main(string[] args) { Console.WriteLine("cliente1");…
-
0
votes2
answers495
viewsA: How to adjust a div to fit across the screen if there isn’t enough content to do so
Using a structure see the reference below, it will work... html, body { height: 100%; width: 100%; } .container { width: 100%; height: 100%; } .sidebar { width: 25%; height: 100%; background: gray;…
-
-1
votes2
answers465
viewsA: jquery.validate.js does not work without form-group (Bootstrap)
Simple, the jquery.validade positions the elements using position:absolute therefore for a coherent functioning it will be necessary that it is enclosed in an element with position:relative. To…
-
1
votes1
answer673
viewsA: How to perform line breaking of a String within a cell in Excel with VB.NET?
For such just replace where you are adding the <br /> for Environment.NewLine Example: Dim nome_cidade As String = string.Format("São Paulo {0} Guarulhos {0} Campinas", Environment.NewLine)…
-
2
votes2
answers146
viewsA: Declaration of `var as object field
It is not possible to expose a local variable outside its scope, it will be necessary to use a typed property ex: // Poderá ser acessado por qualquer parte do sistema. public…
-
0
votes2
answers145
viewsA: Fetch array position from a given term without using the 'inArray' function
You could do using the underscore.js see example below: var array = ['ABC', 'ABCD', 'ABCDE']; var search = "ABCD"; var results = _.filter(array, function(value) { return value.indexOf(search) != -1;…
-
2
votes2
answers1133
viewsA: How to set maxDate on datepicker to seven days after the selected date?
Here’s a way to do what you want, I’ve also added some variables for you to parameterize the minimum number of days the customer could stay. $(function() { // Limite de dias após a data inicial,…
-
0
votes2
answers456
viewsA: col-Md-6 is not working on MVC
Simple, the boostrap grid has classes for desktops and Mixed displays but the feature used to identify the media is width, its display is outside the standard sizes of a desktop so the grid…
-
0
votes1
answer594
viewsA: Linq + Lambda, sub-query, distinct and not in, how to improve this query
I wrote this query by Tablet, so maybe there are basic syntax errors which you can easily adapt. Here is an example of a query using left Join: var clientes = (from cliente in db.Clientes join…
-
2
votes1
answer304
viewsA: I need help with Jquery and/or JS for dependent Drop Down Menu
Basically you made some basic javascript errors, follow them below: $( "option", "#diaPeriodo" ).remove() // foi substituido por $("#diaPeriodo").empty(); $(#diaPeriodo).html = ("<option…
-
1
votes1
answer70
viewsA: Table standardization
To establish active round simply use the following code: // Estabelece que que a rodada atual é a décima rodada var inRodada = 10; var $rodadas = $('.rodadas .rodada').removeClass('active'); // O -1…
-
2
votes5
answers1538
viewsA: How to run an event once?
Follows a solution: $(function() { $('div').on('mouseenter', function() { $('h1').html('Mouse Dentro'); }) .on('mouseleave', function() { $('h1').html('Mouse Fora'); // Remove os eventos de…
jqueryanswered Felipe Assunção 1,202 -
1
votes2
answers785
viewsA: Selectize.js with Tags, reload key and value in edit form
To solve this problem you will need to make a fix using the method onInitialize the solution is not beautiful, but solves this deficiency of the library: $(this).selectize({ plugins:…
-
1
votes1
answer886
viewsA: How to disable and enable the . Click() function of a span when I click on another span using on() off()
Follows a solution $(function() { var $buttons = $('#btn-aluno,#btn-familiar'); var $input = $('.new-step-email-aluno, .new-step-email-familiar'); $buttons.on('click', function(e) { var $self =…
-
3
votes1
answer925
viewsA: problems with jQuery-Mask-Plugin
I recommend using the plugin jQuery maskMoney , this plugin will allow you to do exactly what you want in a simple and equivalent way. Follow an example: $(function() { $("input").maskMoney({…
-
7
votes1
answer164
viewsA: How to move characters with mouse?
An example of a line of reasoning to be used, $(function() { var $location = $('#location'); var $move = $('#target > span'); var $area = $('#area'); var Localizacao = function (e) { var x =…
-
2
votes2
answers1104
viewsA: Regex string javascript
There is no way to do it using a single expression since this would imply adding a specific replace for each accent incidence. It follows a function exemplifying one of the means of doing it: //…
-
2
votes3
answers392
viewsA: Asp Net MVC pass connection string to access layer
Follows a solution using the Singleton Design Pattern using System; // Exemplo singleton public sealed class ConnectionStringManager { #region Singleton design pattern properties private static…
asp.net-mvcanswered Felipe Assunção 1,202 -
1
votes1
answer155
viewsA: Using Dynamic Connection String in Asp.Net Webforms and Windows Forms
If you access the folder of your web application you will see that the file config.settings is not in the application directory. This is because references to other projects are copied to the folder…
-
1
votes3
answers109
viewsA: Execute code only if the user is not in the tab
In fact the $.focus has for purpose to detect when the user is and not when it left, you must utilize the features $.focusout or $.blur: $(window) .focusout(function() { }) .blur(function() { });…
-
6
votes3
answers53541
viewsA: How does the DAO Standard work?
TL;DR The DAO or DAL Standard is nothing more than part of the architectural concept Three-Tier(three Layers in Portuguese) this programming model aims to distinguish the layers of presentation,…
-
1
votes3
answers394
viewsA: Data Range Search in SQL
Just in your select you specify and format the output with the desired pattern example: SELECT id_venda, DATE_FORMAT(data_venda,'%d-%m-%Y'), valor_venda, id_cliente FROM venda The downside is that…
mysqlanswered Felipe Assunção 1,202 -
4
votes2
answers1259
viewsA: How to escape the percentage character (%) in the LIKE?
Just use the character between brackets ex: Value sought 75% WHERE MinhaColuna LIKE '75[%]' Works on the vast majority of`s DBMS available on the market.…
-
1
votes2
answers793
viewsA: Save XML from a List
Follows in attachment the solution to your problem, it is valid to emphasize that not to return an exception to the folder where the XML will be written must actually exist. using System; using…
-
0
votes1
answer201
viewsA: How to work with the $http service of Angularjs synchronously?
Unfortunately the Angular does not have a helper for requests síncronas, if you consult the source code of the angular directly I its repository consulting line 77 you can verify that in the opening…
-
0
votes2
answers119
viewsA: How to avoid the spread of the toggleClass method in the click event
Follow a solution to do what you want. $(document).ready(function() { var $descritions = $('div[id*="z-in-"] .mapDesc'); var $buttons = $('div[id*="z-in-"] a'); var $rotates = $('img.rotate'); var…
-
-2
votes2
answers613
viewsA: The referenced component "System.Core" was not found?
Unfortunately there is no solution, namespace System.Core is only available from the version 3.5 framework, either you upgrade to version 3.5 or you will have to provide other means of doing what…
c#answered Felipe Assunção 1,202 -
0
votes1
answer124
viewsA: Doubt replace javascript function
Both are regex instructions, considering the code you provided yourself they are being used to replace the unwanted html content of certain strings. /</g Its purpose is to identify the effects of…
-
0
votes2
answers527
viewsA: Precision problem in Geolocation maps V3
Simple, the current cell phones are provided with GPS devices (Global Position System) which enable the software to obtain an accurate position of the individual. On a computer where in most cases…
-
1
votes2
answers1306
viewsA: Remove the edge of an image when clicked
Simple, Outline is not from the image but from the link that surrounds it, the code below solves your problem; a:active, a:selected, a:visited { border: none; outline: none; }…
-
2
votes1
answer100
viewsA: jquery . Animate() does not animate my div
Simple, just add a relative position in the div you want to animate, there being no specified position attribute the top,bottom,left and right properties become redundant so your animation didn’t…
-
2
votes1
answer2392
viewsA: Why doesn’t my Owl Carousel work? What am I installing wrong?
Simple, you were with 2 jQuery files and order of the inverted dependencies, follow the functional solution: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8">…
-
2
votes1
answer477
viewsA: Count characters from an input ignoring the maskedinput
You must use the complete helper of the plugin Masked input, this helper allows you to run a function when the mask is filled properly, follows a solution: $("#cep").mask( "99999-999", { completed:…
-
0
votes2
answers189
viewsA: Asp.Net Dropdownlist tooltip or title with JS
Just use the following instruction: $("select[name*='ddlDescricao']") .prop('title', $("select[name*='ddlDescricao'] option:selected").text()); The selector was made using the contains attribute…
-
1
votes1
answer58
viewsA: Doubt with textbox
To TextBox is configured as Multiline? if yes just do this; txtBoxLog.Text += "Realizando inserção..\n"; The attribution command += concatenates the current content with the previous content.…
-
1
votes1
answer1022
viewsA: Pass text from a textbox via parameter in onclick
Follow a very simplistic way of doing what you want var baseUri = 'http://urldoseusite.com/?' function ValidaSim() { var uri = baseUri + "parametro1=" + $('#txtValid').val(); alert(uri); // Remover…
-
1
votes2
answers813
viewsA: How to prevent the page from opening outside an iframe?
Unfortunately there will always be ways to circumvent this type of lock mainly with the use of javascript however for laymen the simple validation would be enough. function IsFrame () { try { return…
-
2
votes2
answers86
viewsA: Model, relationship with Dataannotations
Just specify which relationship key by following the example below; public class Boleto { public int BoletoId { get; set; } public string Email { get; set; } public int IDC { get; set; }…
-
3
votes2
answers4704
viewsA: Count elements within a parent div separately
A brief description of the selectors jQuery, when you define a selector Jquery scans the DOM and groups all the results of the respective query, in your code example you used the following query;…
-
1
votes2
answers828
viewsA: Get Json properties name
Follow one of the ways to do what you seek: var json = { "Ficha": [{ "nome": "nome", "sobrenome": "sobrenome", "idade": "idade", "endereco": "endereco", "empresa": "empresa", "telefones": [{…
-
0
votes2
answers649
viewsA: Why css is not working
Follow a solution, your code was poorly structured, without looking arrogant it seems that you are not yet familiar with HTML/CSS so I recommend you to a deep research in the technologies.…
-
0
votes1
answer33
viewsA: EF Code First alter default Initial Catalog
Test with the following Connection String: <add name="VitecStore" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=VitecStore;database=VitecStore;Integrated Security=True"…
asp.net-mvcanswered Felipe Assunção 1,202 -
2
votes1
answer277
viewsA: C# Windows Forms Web Services
Consuming Webservices in Applications WindowsForms To consume a webservices (considering that they are provided by the .net framework) you must follow the following steps: Right click on…
-
1
votes2
answers115
viewsA: Change in json File Format
Add the code snippet below to your file WebApiConfig.cs: var json = config.Formatters.JsonFormatter; json.SerializerSettings.PreserveReferencesHandling =…
-
2
votes2
answers168
viewsA: Retrieving the name of a boot on Swift
This will require checking the property sender.tag and use the button to identify which button is being fired.
swiftanswered Felipe Assunção 1,202 -
1
votes1
answer50
viewsA: Is it possible to change the json file format?
Follows a solution: return Request.CreateResponse(HttpStatusCode.OK, new { $id = 1, venda = listar.ToArray() } ); PS: Posted from the cell phone so I can’t test the syntax but that’s basically it…
-
4
votes1
answer298
viewsA: When to use distributed database?
Distributed Databases The concept Distributed Database basically consists of keeping separate instances of a database running simultaneously. There are several ways to distribute a database and…
databaseanswered Felipe Assunção 1,202 -
8
votes1
answer1925
viewsA: How do I get first and first names in Javascript?
Below is a solution: function dicalogin(nomecompleto) { nomecompleto = nomecompleto.replace(/\s(de|da|dos|das)\s/g, ' '); // Remove os de,da, dos,das. var iniciais = nomecompleto.match(/\b(\w)/gi);…
javascriptanswered Felipe Assunção 1,202 -
1
votes1
answer44
viewsA: Problem in a dropdown
You need to specify that your list is a IEnumerable Example: @Html.DropDownList("Diocese", (IEnumerable<SelectListItem>)ViewBag.Dioceses, "--Escolha uma diocese--", htmlAttributes: new {…