Posts by Ricardo • 5,680 points
191 posts
-
1
votes1
answer141
viewsA: How to get the url for this Json (java android)
You can use that library There’d be something close: public String getTranslation(String json){ JSONObject data = new JSONObject(json); return…
-
1
votes1
answer236
viewsA: How to use in @Html.Checkbox?
Changing less possible is just you play the } down... This meets? And welcome to Stackoverflow :)…
-
0
votes1
answer60
viewsQ: Why is Jobscheduler running without the cell phone is charging?
I made an application using the class Jobscheduler that has now come in the Lolipop api. I won’t go into detail about the structure of the application because it is running and working properly. My…
-
2
votes1
answer88
viewsQ: How to handle multiple parameters not required on a route
I have the following wheel on an Asp.net mvc control: [Route("video/categoria/{categoria}/{page?}/{sort?}")] The three parameters are: categoria, filters the video category, page? is the pagination…
-
2
votes1
answer2531
viewsA: Open Database in format . DB
Use that program here, DB Browser for Sqlite. Including in their demo image is showing a file . db open. If you cannot change the file to . txt and open in the notepad, some unencrypted files will…
-
1
votes3
answers2032
viewsA: How to relate tables in Mysql to more than one entity?
There is no reason not to have two tables, your customer will also be your supplier or vice versa? I believe not, and even if it happens I don’t think it would happen more than 10 times... Starting…
-
1
votes1
answer223
viewsA: SQL Query Shows All Records
The problem is that its variable Id_OrdemServico has the same column name in the table pecas_ordem_servico So the database is understanding that your SQL is like this: select * from…
-
3
votes1
answer667
viewsA: "Trace" no (VBA/Excel), how do I get the name of a subroutine?
A few years ago I had the curiosity to make a mistake treatment like this as soon as the package came out . Net, until today I hope some function wants to allow this, the answer is that it is not…
-
1
votes1
answer58
viewsA: Parameter that controls camera brightness on android
Using these camera parameters: setWhiteBalance() The value that this method receives can be found in getWhiteBalance () setExposureCompensation() The value that method receives must be a valid value…
-
0
votes1
answer5456
viewsA: Connection of the Database to the 000webhost
The right way to connect is like this: <?php $servername = "Localhost"; ***/* LETRA INICIAL MAUIUSCULA*/*** $username = "username"; $password = "password"; // Create connection $conn = new…
-
1
votes3
answers5404
viewsA: How to create an array with Object from an SQL query
To connect to Mysql database: <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check…
-
1
votes1
answer960
viewsA: Is it possible to use a "SOMARPRODUTO" to calculate values in various spreadsheets?
It is possible yes. Just start writing the form, and when you want the value of another file (it has to be open) just click on a cell of it, automatically it will do the reference. It’s practically…
-
2
votes1
answer1843
viewsA: Tempdata C# doubt with MVC
Come on, I don’t understand 100% what you want... I’ll try: I know Tempdata has his "life" held until he is used in View. However, if I do it in two different controllers, the same identified from…
-
1
votes2
answers331
viewsA: How to implement a "slim" controller
I’d do it this way: Using annotation validation even you solve all the problems of information coming wrong from view. Using Try catch you handle all unexpected errors, being able to create…
-
1
votes4
answers750
viewsA: How to limit the resources used by the system?
Using this tutorial you will be able to separate this processing. Will consume the feature of the machine, but will not lock the machine, still via be able to calculate percentage, count processing,…
-
3
votes2
answers2019
viewsA: Error while running project in Visual Studio 2015
The path to the archive FileListAbsolute.txt has more than 260 characters. c:\pasta\pasta\pasta\obj\x86\Debug\NomeDoProjecto.View.csproj.FileListAbsolute.txt Try to make him use that file somewhere…
-
3
votes1
answer493
viewsA: How to get processing data and memory from Windows system in Java?
I believe this class can help you get all the data you want. OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();…
-
3
votes1
answer7204
viewsA: How to generate an XML file from a PHP form?
Follows the code: <?php #versao do encoding xml $dom = new DOMDocument("1.0", "ISO-8859-1"); #retirar os espacos em branco $dom->preserveWhiteSpace = false; #gerar o codigo…
-
8
votes1
answer355
viewsA: Detect when user presses ENTER
Do like, you check if the shift is tight. $(document).on('keyup', '.comment-textarea', function(event) { if (event.which == 13) { if(event.shiftKey){ console.log('Quebra de linha'); }else{…
-
3
votes2
answers5064
viewsA: How to use the name of a cell of the Excel spreadsheet in VBA, not to indicate row and column?
I believe that’s what you want: You take a Range, because the name is not a primary key. Then you run all the returns from it. Sub Test() Dim r As Range Dim cell As Range Set r = Range("Something")…
-
-1
votes2
answers576
viewsA: Convert Json to XML
This code below will generate an XML without cuts, I made a Fiddler for you with the code: WebClient web = new WebClient(); var value =…
-
0
votes1
answer91
viewsA: Why is giving error in this PHP to write an XML?
This error is because you are trying to move a Node inside yourself. Here you go an explanation of a question like yours. I hope I’ve helped. UPDATING: Take a look at line 17 and 18 of your code. I…
-
2
votes1
answer86
viewsA: Jsonconvert returns Exception in Xmlnode
You need to have a root element in your Json to turn it into XML. Look at this example: string json = @"{ 2 '?xml': { 3 '@version': '1.0', 4 '@standalone': 'no' 5 }, 6 'root': { 7 'person': [ 8 { 9…
-
3
votes3
answers654
viewsA: How to loop inside an image folder and resize them?
To take the images from a folder and loop it would be something like this: $dir = "/var/www/img/*.jpg"; //pega todas as imagens do tipo jpg e coloca dentro de uma array com nome $images $images =…
-
2
votes1
answer688
viewsA: How to publish an MVC 5 site?
I have exactly your infrastructure. Configures as FTP. So for www.meusite.com.br to respond on index you have to configure, which is a default setting... so I believe you have no problem. With this…
asp.net-mvcanswered Ricardo 5,680 -
0
votes1
answer133
viewsA: Data insertion error in Sqlserver + Delphi
The problem is foreign key, you are trying to include a record that depends on a foreign key, but the table of this key does not have the record. By the key name of your message you can try to…
-
2
votes1
answer74
viewsQ: Adding Rich Snippet in multiple Ivs
I am making a page that presents data of a person. At the beginning of it there is the name and a text, at the end there is the address, email, etc. I’m using Rich Snippet, but all the examples I…
-
6
votes1
answer149
viewsQ: Why does OFF SET slow down SQL?
I have the following SQL, generated by Entity Framework 6. SELECT [Project1].[C1] AS [C1], [Project1].[ID] AS [ID], [Project1].[CAMPO1] AS [CAMPO1], [Project1].[CAMPO2] AS [CAMPO2],…
-
2
votes1
answer59
viewsQ: Search form does not execute controller method
I have the following form: <form role="search" method="get" id="search-form" name="search-form" action="/video/pesquisa"> <div class="cover-pursuit-btn"> <button type="submit"…
-
3
votes1
answer531
viewsA: Serialize/Deserializar Datetime
If you change the type of the two properties of your class to DateTimeOffset you will be in debug that at the end of the value it will be with -2, when decenrialize the object and look at the same…
-
1
votes2
answers1205
viewsA: @Html.Actionlink and Url.Action are not taking the route of the controller annotation
After many tests I found the solution. The problem is that the @Request.QueryString["categoria"] returns null, with this the category object of the constructor receives null and with this it…
-
1
votes2
answers1205
viewsQ: @Html.Actionlink and Url.Action are not taking the route of the controller annotation
I have the following method in control: [Route("video/categoria/{categoria}/{page?}/{sort?}")] public async Task<ActionResult> Index(string categoria, int? page, string sort) { ... } My…
-
0
votes0
answers57
viewsQ: How to get a piece of the Asp.net URL mvc5
I have the following URL: http://localhost:59278/video/categoria/desenho I’m trying to use the Url.Action to mount a URL that is based on the value of the current URL. I need to take the amount…
-
3
votes1
answer1209
viewsQ: How do I use @Html.Actionlink to create links to a multi-trace route?
I’d like to use @Html.Actionlink to create the following link: http://localhost:59278/video/categoria/new-movies/3 Being that my control is: [Route("video/categoria/new-movies/{page?}")] public…
-
4
votes1
answer67
viewsQ: How to separate a fixed route from a variable route with Asp.net mvc5
I have a control that manages videos. I’m trying to make these two methods: [Route("video/categoria/{categoria}")] public async Task<ActionResult> Index(string categoria) { }…
-
1
votes3
answers321
viewsA: Pass List as LINQ expression parameter
Do it like this: void cargarDados(Int32 disc) { List turmas = db.GetCollection("turma").FindAll().ToList(); var query = (from t in turmas where t.COD_DISCIPLINA == disc select new { t.RA…
-
-1
votes2
answers69
viewsA: How to use SQLITE Runintransactionasync
A suggestion I saw here is to make this way: INSERT INTO 'tablename' SELECT 'data1' AS 'column1', 'data2' AS 'column2' UNION ALL SELECT 'data1', 'data2' UNION ALL SELECT 'data1', 'data2' UNION ALL…
-
2
votes2
answers1102
views -
2
votes1
answer472
viewsA: Format mask for Timestamp attribute
Try without the tt in the mask. string test ="08:00:00"; TimeSpan ts = TimeSpan.Parse(test); Console.Write(ts.ToString(@"hh\:mm")); I made a Fiddle for you, I think it will suit you.…
-
2
votes1
answer1235
viewsA: how to select Count using Linq C#
Make an array of integer values: var arraynota = new int[] { 9, 10}; var arraynota = (from q in db.QUALIFICACAOs join a in db.ATENDIMENTOes on q.ID_QUALIFICACAO equals a.ID_QUALIFICACAO where…
-
2
votes1
answer965
viewsQ: How to upload a file at the same time as sending an Asp.net mvc 5 form
I already have a form that makes a registration, I want to add an extra field in it where the user will upload a photo, I want to do everything in the same Ubmit. My VM Vmdominiocreate: public class…
-
0
votes2
answers306
viewsA: <httpErrors> does not work
I found the problem: You said put <customErrors mode="Off" /> inside </system.web> I can’t explain exactly why this, maybe one treatment breaks the other, but in my case.…
-
1
votes1
answer65
viewsQ: How to put a form in the _Layout view?
I’m trying to make a website with support for two languages. First test I did was to put this code inside a view common, the index of my control Home. Worked perfectly. When I put the same code in a…
-
1
votes1
answer311
viewsQ: :before does not work as it should
I bought a CSS and am trying to apply on my site, the Cass I bought has a validation scheme in the form where it circles the form with a red line and puts an X inside the text box. I’ll put an image…
-
1
votes2
answers306
viewsQ: <httpErrors> does not work
I’m trying to make a mistake handling with this setting: <system.webServer> <modules> <remove name="FormsAuthentication"/> </modules> <httpErrors errorMode="Custom"…
-
1
votes2
answers15582
viewsQ: Why does the background-image url search for the image inside the Content folder?
I have a CSS like this: #hero { height: 100%; background-image: url("~/img/bg-img.jpg"); background-position: top center; padding: 0; overflow: hidden; } When I rotate, the image does not appear,…
-
4
votes1
answer1852
viewsQ: How to use @Html.Validationmessagefor to change the text box class
I bought a bootstrap template, the validation of the controls is done by a class that leaves the controls red. This would be the classes form-group has-error Only that I never used this way, I’m…
-
2
votes2
answers5346
viewsQ: Automappermappingexception: Missing type map Configuration or Unsupported Mapping
I’m using the library Automapper to map my Viewmodels. I own my class Dbdominio: public class DBDominio { [Key] [Column("ID")] public long id { get; set; } [Required] [StringLength(128)]…
-
2
votes1
answer233
viewsA: How to test an Asp.net mvc controler using Moq and Entity Framework 6
I didn’t have to mockar nothing to get the result I wanted. I just took the amount that was already in the result and I didn’t know. (That’s beside the point) I put a different way of mocking the…
-
5
votes1
answer233
viewsQ: How to test an Asp.net mvc controler using Moq and Entity Framework 6
My controller: [Authorize] public class DominioController : Controller { private IDominioDB _db; public DominioController(IDominioDB db) { _db = db; } // GET: Dominio public async…