All Questions

1
answer

Filter in DropDown using C # MVC 4

I have a dropdown in my view that I fill in as follows: ViewBag.NfeStatus = EnumHelper .ListAll<NfeStatus>() .ToSelectList(x => x, x => x.Description()); My NfeStatus model is an enum: public enum NfeStatus {...
asked on 17.01.2017 / 12:33
1
answer

Constant is it really useful?

Why would I use a constant instead of a variable? Beyond readability, is there another gain in using a constant? I can not tell a difference that makes me use a constant instead of a variable.     
asked on 08.05.2017 / 19:37
3
answers

How to repeat columns up to "x" times

I have a column in my database with names, I write it on the screen, through this code: <html> <head> <title>Pagina Inicial</title> <meta charset="utf8"> <link rel="stylesheet" type=...
asked on 28.09.2015 / 01:04
2
answers

How to change the url of the "background" property?

I have this function that changes the src of an img: window.document.images['img'].src = n_src; <img src="" name="img"/> But I wanted to change the background url of the style: <div name="img" style="background: url()"></d...
asked on 12.10.2015 / 23:25
1
answer

How to make a layout template with angularjs?

I need a default template for all screens in my front-end application, how do I do this with angular-js? How are you?     
asked on 22.09.2015 / 14:37
2
answers

Run Windows Prompt commands and save the output to a text file

I have a program that launches a Windows Prompt command. I want to copy the output of this command and save it to a text file. Example: The command is ipconfig and I want the output to be copied to a file.     
asked on 08.06.2015 / 10:50
1
answer

A possibly dangerous value Request.Form was detected on the client

I have a problem when I send this type of input in the input field: &&&&%$&#_(@)(#_!**@#)24 R87R XDHNSIFN 89Q7201784 The Resquest.Form error occurs. Error Message: ControllerusingSystem;usingSystem.Collections.Gener...
asked on 19.06.2015 / 15:13
2
answers

How to read a JSON file without a server?

I'm developing a simple static website with html, css and javascript hosted in Dropbox, using javascript with the JQuery framework and trying to read a JSON file. var jqxhr = $.getJSON( "example.json", function() { console.log( "success" );...
asked on 12.10.2015 / 02:45
3
answers

How to sort elements of the DOM by jQuery?

Suppose I have the following list: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> I want all elements of even numbers to be ordered, so that the pairs are first, an...
asked on 11.08.2015 / 16:08
2
answers

How to compress images in PHP?

On my site, people can post messages and along with these messages an image (which is saved in a folder). I would like to know if there is any class or some means using PHP to compress these images without losing quality. Note: Extensions ac...
asked on 13.03.2015 / 20:02