Posts by Edvaldo Farias • 717 points
40 posts
-
0
votes1
answer50
viewsA: Uncaught Referenceerror: openNav is not defined at Htmlspanelement.onclick (index.html:1)
No Javascript nas functions openNav and closeNav, you already looking for the id with the name page, but this element does not exist, the element with the similar name I found was the name_page.…
htmlanswered Edvaldo Farias 717 -
0
votes2
answers89
viewsA: Balancing parentheses, how to check if they are in the correct position?
A script possibility for your scenario int abertos = 0; parens = parens.replaceAll("[^()]", ""); if(parens.length() % 2 != 0) return false; //Caso não seja um valor par também será falso e não…
javaanswered Edvaldo Farias 717 -
1
votes1
answer99
viewsA: What is the difference between ng new and ng generate application?
ng new - creates a new angular solution from scratch, with a project inside and its dependencies and its required files, like angular.json and so on. already the ng generation application or simply…
-
1
votes1
answer139
viewsA: Unit tests with Nunit in function with Jsonresult type return
You’d have to do it that way: [TestFixture] public class CandidatoControllerTestChangePassword { [Test] public void TestChangeValidPassword() { var controller = new CandidatoController(); var result…
-
1
votes1
answer166
viewsA: Updating only uploaded properties - Entity Framework
What do you have to do in this case, in the API you get the ID of the object you want to update right? Then you would have to do the following steps, I will create a scenario here. This is your…
-
0
votes2
answers139
viewsA: Form Validation
Put the upload out of for, after validating all fields, if the Valid variable is true, it send. $("#contact-form").submit(function(){ event.preventDefault(); var dados = $(this).serialize(); var…
-
0
votes2
answers350
viewsA: Calculate total sales of the Java store
This code solves your problem by creating a Product Maps list public static void main(String[] args) { Scanner input = new Scanner(System.in); Map<String, double> map = new HashMap<String,…
javaanswered Edvaldo Farias 717 -
1
votes1
answer95
viewsQ: Better options to SESSION?
I have always heard many people say that SESSION is not performative and that it was not advisable to use SESSION in applications . NET, but so far I haven’t found anything I can use in place of…
-
0
votes2
answers28661
viewsA: Is there an API to send a message via Whatsapp using PHP?
There is no official API for sending or receiving Whatsapp message for any language. You can even find something unofficial, but there is no guarantee that will work forever, because Whatsapp works…
-
3
votes4
answers650
viewsA: In production environment should errors be disabled?
It is recommended that it be disabled, not even an error should be exposed to the user, because failure in your system may end up being demonstrated, errors should be handled in the application and…
-
0
votes3
answers1870
viewsA: What is metadata for HTML documents?
I don’t know what metadata means. And I’d like to know what is metadata in relation to HTML documents? Very briefly, the metadata is used to expose relevant information on your site in a public way…
-
3
votes5
answers8944
viewsA: What is an SDK?
SDK stands for Software Development Kit (or Software Developers Kit - software development package). It is this package that allows programmers to develop applications to run on a specific platform…
-
2
votes2
answers396
viewsA: fill array to generate json javascript
You are overwriting the dice because you are playing in the same position as the variable Try this: var array_fotos = new Array(); array_fotos[0] = { "id": 1, "foto": imgName, "tamanho":…
arrayanswered Edvaldo Farias 717 -
0
votes2
answers2141
viewsA: UPDATE in multiple tables with the same column?
You can do a Join Inner in your update so update multiple table at the same time. UPDATE TABELA1 SET A.Campo = 'Valor', B.Campo = 'Valor', C.Campo = 'Valor' FROM TABELA1 A INNER JOIN TABELA2 B on…
-
3
votes1
answer2479
viewsQ: Open Source E-commerce in ASP.NET
I know that in PHP there is a lot of e-commerce framework in the market today, but in ASP.NET, which framework exists today? What advantages and disadvantages of each? Is it worth using or building…
-
2
votes9
answers12142
viewsA: Search via ajax during input text ( autocomplete )
$(document).ready(function () { $('#termo_busca').keyup(function () { var termo = $(this).val(); var fazerAjax = true; for (var i = 0; i < listaFornecedores.length; i++) { //Lista de fornecedores…
-
0
votes2
answers54
viewsA: Adding value with Mysql
This way you can add all the SELECT together select id, sum(valor) from ( select id,valor from tabela_1 union all select id,valor from tabela_2 union all select id,valor from tabela_3 ) x group by…
mysqlanswered Edvaldo Farias 717 -
1
votes1
answer126
viewsA: Why are the padding and margin properties calculated in relation to the width of the parent element?
The padding and margin property will always use the width and height of the parent to perform the calculation. Example: If you use a padding: 50% you expect the 4 side to be the same size. If you…
cssanswered Edvaldo Farias 717 -
1
votes2
answers1216
viewsA: jQuery how to load a link in a div without refreshing the page?
There’s a typo here $(".conteudo")load(href + ".conteudo"); Missed a point after the $(".conteudo") this line has to stay like this: $(".conteudo").load(href + ".conteudo");…
-
0
votes2
answers111
viewsA: Problem of changing image using Javascript
cache: false Set this in your AJAX that eliminate the possibility of caching and will always do the search in Controller Action.
-
0
votes1
answer242
viewsA: How to return to the beginning of a C#Array
This should solve your problem, when you pop the index it goes back to zero. for (int i = 0; i < palavra.Length; i++){ //Pego Valor Dec. da palavra ASCIIP = (int)palavra[i], x = 1, y = 0, num =…
-
0
votes2
answers196
viewsA: Parameter arriving truncated way in Ajax request
This way you will pass the value as a string and concatenate with the parametroConsult, but you could do this in c# var valorCampo= $(this).attr('data-clipboard-text'); var content =…
-
2
votes3
answers1667
viewsA: Avoid duplicated list data
public ActionResult SelecaoMusico() { List<Musico> musicos = new List<Musico>(); Musico musico; List<Musica> musicas = db.Musicas.ToList(); var listaMusicasSemDuplicada =…
-
2
votes1
answer191
viewsA: How to show data from two tables in c#?
public class Contato { public String nome { get; set; } public String senha { get; set; } public String usuario { get; set; } ///<summary> /// Contém uma…
-
1
votes2
answers65
viewsA: Checking styles that are not being used on a website
There’s the one that’s really good, work in firefox https://addons.mozilla.org/nl/firefox/addon/css-usage/…
cssanswered Edvaldo Farias 717 -
0
votes3
answers71
viewsA: Catch the week correctly
Made in js Puro var dataHoje = new Date(); //Pegar a data atual var diaSemana = dataHoje.getDay(); //Pegar o dia da semana var diaSemana = 7 - dataHoje; //Quantidade de dias que faltam para terminar…
-
2
votes1
answer76
viewsA: Separate content from an RSS into two Ivs
$rss = new DOMDocument(); $rss->load('https://jovemnerd.com.br/nerdnews/feed/'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { …
-
0
votes3
answers548
viewsA: Save image to desktop with html2canvas
You will have to use the Filesaver.js library along with html2canvas.js to be able to save the file to the user’s machine, but still the browser will give the option of the user to choose the…
-
-1
votes2
answers447
viewsA: Return function Boolean via ajax
The problem is in your URL, this URL would not be valid in any scenario I can imagine, you should put the URL access to this ACTION in the controller. Here is an example of ajax with MVC…
-
0
votes3
answers289
viewsA: Select SELECT field with jquery
To search for a DOM tag via jQuery you just need to add the name of the jQuery search tag. Example: $('select').each(function(index, item) { alert($(this).find('option').length); }); the above code…
-
2
votes1
answer117
viewsA: Detect destkop & mobile
You need to put an exclamation mark (!) on if to reverse the condition, now check when it’s not mobile to redirect. Follows the code: <script type="text/javascript"> var url_desktop =…
-
1
votes2
answers376
viewsA: Span inside @Html.Actionlink
Use the @Url.Action it mounts the URL for you dynamically with the passed parameter. I prefer when creating link using the @Url.Action than the @Url.ActionLink because visually getting easier from…
-
0
votes1
answer1050
viewsA: Jquery - Photo Gallery by CATEGORY
You use Jquery to click on the 'button' that performs the filter, code example: $(document).ready(function(){ $(".portfolio-filter.text-center a[data-filter='.html']").click(); } in this example I…
-
0
votes2
answers1117
viewsA: Row complete the entire screen
I think that solves your problem <style> .header{ padding-bottom: 9px; border-bottom: 1px solid #eee; top: 0; position: absolute; width: 100%; left: 0; background-color: #ffcc00; height: 80px;…
-
2
votes1
answer1986
viewsQ: Get street address from latitude and longitude
It is possible to recover the address of an avenue or street, only with latitude and longitude? I know the reverse is possible, but I can find nothing like recovering the name of the avenue,…
google-mapsasked Edvaldo Farias 717 -
1
votes1
answer848
viewsA: Dynamic multiselect with bootstrap
http://jsfiddle.net/StephenEdmondson/TR49m/4/ You can do something like this!
jquery-ui-multiselectanswered Edvaldo Farias 717 -
2
votes1
answer167
viewsA: return rows of a 10-by-10 block query by looping this query?
<?php var $quantidadeRegistro = 5000; //quantiade registro no banco var $limit = 1000; var $offset = 0; var $select = ""; //criar os select no banco for($i = 1; $i <= $quantidadeRegistro ; $i…
-
1
votes1
answer49
viewsA: select block rows in block from a range of 10 in 10 by looping the query?
<?php var $quantidadeRegistro = 5000; //quantiade registro no banco var $limit = 1000; var $offset = 0; var $select = ""; //criar os select no banco for($i = 1; $i <= $quantidadeRegistro ; $i…
-
3
votes2
answers5016
viewsQ: Session C# how does it work?
What is the lifetime of an ASP.NET MVC Session, and how to find out how to find out the remaining time and how to add more time to Session (if possible)? There is another form of value guard that is…
-
2
votes1
answer86
viewsA: php running when giving F5 maintaining database connection
It is possible to lock the F5 button, test this code: http://jsfiddle.net/SpYk3/C85Hs/ this will lock the F5 button until you upgrade.…