Posts by Jedaias Rodrigues • 6,718 points
226 posts
-
0
votes1
answer743
viewsQ: Work with C#image
I have two images: At runtime, I need to join the two images together. You can determine the position of the doll on the ladder. Both images are on disk. The result would be images like these in…
-
3
votes1
answer1498
viewsQ: Asp.Net MVC Project in Medium-Trust
I have a project on Asp.Net MVC using . NET Framework 4.5, but my host is shared and has a security policy that only allows Medium-Trust (save Locaweb). When publishing the application, even by…
-
3
votes2
answers125
viewsQ: Implementing relationship in C#
I have the following classes: The code is like this: public class Mae { public string Nome {get; set;} public List<Filho> Filhos {get; set;} } public class Filho { public string Nome {get;…
-
6
votes1
answer130
viewsQ: Time difference in Linq
I am using Entity Framework, and I have a condition that has not worked very well: .Where(x => ((DateTime.Now - (x.DataInicio.Value == null ? DateTime.Now : x.DataInicio.Value)).TotalMinutes)…
-
0
votes1
answer151
viewsQ: Javascript Check Box
I’m doing maintenance on a system, and I found the following code: $(".MinhaClass").die(); $(".MinhaClass").live('click', function () { // Código } .MinhaClass refers to a list of checkbox. I was…
-
6
votes1
answer1262
viewsQ: How to change filename for download?
I am generating a PDF file and use HTML5 to display it on the screen: $("#conteudo-pdf").append('<object data="' + meuData + '" type="application/pdf" style="width: 100%; height:…
-
8
votes3
answers941
viewsQ: Encapsulation in Javascript
If I create a global Javascript variable, it can be easily accessed from the console: <script> var minhaVariavel = 0; <script> But if I create it like this: <script>…
javascriptasked Jedaias Rodrigues 6,718 -
3
votes1
answer104
viewsQ: OR in Join using Linq
I have the following tables: Tabela1 Tabela2 Tabela3 Tabela4 +----+-----------+ +----+-----------+------+------+ +----+-----------+------+------+ +----+-----------+ | Id | Descricao | | Id |…
-
1
votes3
answers2741
viewsA: Send Javascript Array to Controller via POST
It worked by following the hint of these answers: Answer1 Answer2 Answer3 Using: jQuery.ajaxSettings.traditional = true; The problem is that the settings are global. If you want something different…
-
2
votes3
answers2741
viewsQ: Send Javascript Array to Controller via POST
I’m trying to send a Array of int of JavaScript to the Controller via POST. See my array: console.debug(itens); Array [ 1, 2 ] I’m trying to send it this way: $.post('@Url.Action("MinhaAction",…
-
5
votes2
answers607
viewsA: Resource on an Enum
I tried to get the best of both worlds: Second Response First Response So I was able to solve the problem as follows: From licking a static method to return the Resource of all items. namespace…
-
4
votes1
answer578
viewsQ: Ckeditor font size
I’m using Ckeditor and would like to personalize my editor. When opened, by default it would already come with Arial font size 20 for example. In my research (amid several others, and others, and…
-
3
votes3
answers339
viewsQ: Connection to the bank is open in static method?
I have the following static class available for the entire application: public static class MinhaClasse { public static void Salvar(Item meuItem) { using (MeuEntities db = new MeuEntities()) {…
-
1
votes2
answers777
viewsQ: C# Regular expression for string and Guid validation
(1). I would like to validate a string by checking that it only has {[a-z], [A-Z], [0-9], '-'} if(minhaString.ContemApenas({[a-z], [A-Z], [0-9], '-'}) == true) { // Minha string é válida! } (2). I…
-
3
votes1
answer2202
viewsQ: How to implement token to reset password?
I have an Asp.Net MVC project that I created without template (from scratch even). I would like to implement a password recovery function, but I’m not sure where to start. What method is used to…
-
4
votes1
answer156
viewsQ: How to get Timezone?
I have the following code: var minhaData = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, meuTimeZone); Case meuTimeZone = "E. South America Standard Time"; then the value returned to…
-
6
votes4
answers231
viewsQ: Jquery find in tree
I have the following context: <div class='pai' id='item'> <div class='form'> <div class='filho' id='item1'> <div class='filho' id='item3'> </div> </div> <div…
-
5
votes3
answers221
viewsA: C++ challenge, helps with logic
Well, we have three variables in that context: y is the value to be discovered, i is likely to be an informed value for the calculation and n would be the amount of times the calculation should be…
c++answered Jedaias Rodrigues 6,718 -
4
votes1
answer4227
viewsA: Removing part of a string - C#
One option is to use Split. string url = "www.google.com/teste"; string resultado = url.Split('/')[0]; Or better than that, use the Substring. string resultado = url.Substring(0,url.IndexOf('/'));…
-
5
votes1
answer1418
viewsQ: What is the correct way to use Bcrypt?
I’m trying to give my system a satisfactory level of security. In my researches I found several functions that create hashs for passwords, but among all of them, I saw the most recommended were…
-
4
votes1
answer185
viewsQ: Set using matrix in c#
I have the following matrix: a d k m s j e r t c f p I put such a matrix in an array as follows: char[,] matriz = new char[3,4]; matriz[0,0] = 'a'; matriz[0,1] = 'd'; matriz[0,2] = 'k'; matriz[0,3]…
-
7
votes1
answer182
viewsQ: Is it possible to use MD6 in C#?
Speaking of hash, it is possible to use MD6 in C#? Someone would have an example of the use in a simple string? In my research I found nothing very objective.
-
5
votes2
answers2359
viewsQ: Password encryption
I have an Asp.Net MVC project and would like to securely store users' passwords in the bank. The goal is to create something that cannot be easily decrypted in a few hours of brute force on a PC (I…
-
10
votes2
answers433
viewsQ: Keep data between sessions
I have an ASP.Netet MVC project where I file a report that requires quite resource of the machine in question of processing. I have a Action that generates and another that returns the report data…
-
3
votes2
answers8705
viewsQ: Compare items from different tables
I have two tables: Pessoa1 Pessoa2 +----+--------+ +----+--------+ | Id | Nome | | Id | Nome | +----+--------+ +----+--------+ | 1 | Maria | | 3 | Maria | | 2 | João | | 4 | João | +----+--------+ |…
-
-3
votes2
answers712
viewsQ: Select separated by semicolon to xls
I have the following code: var cmd = @"SELECT mt.Id + ';' + mt.Nome + ';' + mt.Cidade AS Resultado FROM MinhaTable mt"; var objectContext = ((IObjectContextAdapter)db).ObjectContext; var result =…
-
0
votes1
answer2210
viewsQ: Order by with Union
I have the following tables: Pessoa1 Id | Nome | Cidade 1 | José |São Paulo 2 | Maria |Rio de Janeiro Pessoa2 Id | Nome | Cidade 1 | Pedro |Belo Horizonte 2 | Ana |Vitória I have the following…
-
2
votes3
answers1053
viewsQ: How to update with SQL Server count?
I have the following table: Nome | Posicao Item1 | NULL Item2 | NULL Item3 | NULL I’d like her to be like this: Nome | Posicao Item1 | 1 Item2 | 2 Item3 | 3 The ordering criterion is Name…
-
1
votes1
answer82
viewsQ: Destroy tag javascript
I have an Asp.Net MVC project structured as follows: On the page Home there are several links to others Actions and Controllers, and they return a PartialView that assembles all the content into one…
-
2
votes1
answer321
viewsQ: Send UTC Datetime Javascript to C#
I have an ASP.Net MVC project as follows: In my view I have a Javascript variable that keeps a date: var hoje = new Date(); In my controller have a action which receives via AJAX the value of the…
-
1
votes1
answer306
viewsA: Url.Action with routevalues and objects
It worked by sending with the router, it was like this: @Url.Action("ActionName", "ControllerName", new { area = "AreaName", parametroName = "parametroValue" })
-
1
votes1
answer306
viewsQ: Url.Action with routevalues and objects
I have the following Url.Action: @Url.Action("ActionName", "ControllerName", new { area = "AreaName" }) I also need to send some objects to this action through this Url.Action, how could I do that?…
-
1
votes2
answers535
viewsA: How to access Action in another Controller via Ajax?
After the @Joaopaulo tip in the comments I managed perfectly using: $.post('../Area1/MeuControllerArea1/MinhaActionArea1') Another option (which I have chosen) can be made with Urlhelper.Action…
-
4
votes2
answers535
viewsQ: How to access Action in another Controller via Ajax?
I have an Aspnet MVC project structured as follows: Projeto L Areas L Area1 L Controllers L MeuControllerArea1Controller.cs Views Area2 L Controllers L MeuControllerArea2Controller.cs Views L…
-
2
votes1
answer560
viewsQ: Text inside circle with canvas
I’m starting in canvas and despite very good documents by the web, specific questions arise. For example, I’d like to put a number inside a circle, but I’ve only got the number, not the circle. I…
-
8
votes3
answers1242
viewsQ: LINQ with Where condition using variable
I have the following table: USUARIO Nome | Idade João | 21 Maria | 18 I want to do in only one consultation return all users, or return only users of specific age based on a C variable#. Also by…
-
2
votes1
answer81
viewsQ: Form with two destinations
I have the following form: @using (Ajax.BeginForm("minhaAction", "meuController", new AjaxOptions() { HttpMethod = "POST", OnFailure = "alert('Erro!')", OnSuccess = "TrabalharResultado" }, new { id…
-
11
votes3
answers1611
viewsQ: Dynamic property name in Javascript
I have the following code: var nomePropriedade = "Propriedade1"; var meuObjeto = { "nome" : "valor" } I would like the property name of meuObjeto received the variable value nomePropriedade. Thus,…
-
1
votes2
answers861
viewsA: Accent with Javascript Resource
I managed using an interesting alternative: In my alert I used the method Raw of HTML Helper and worked perfectly. alert('@Html.Raw(Resources.MSG_SESSAO_EXPIRADA)');…
-
1
votes2
answers861
viewsQ: Accent with Javascript Resource
I have an Asp.Net MVC project where I use Source, but I’m having problems with accentuating other special characters. Example: I have the following Resource: Name | Value MSG_SESSAO_EXPIRADA |…
-
0
votes1
answer319
viewsA: property with Crystal Reports Objects List
There was no way to use Objects this way. The way was to create a new property for each one with a Id, so in Cristal Reports I can make a link between them. public class objeto1 { public int Id…
-
0
votes1
answer483
viewsA: Image in Crystal Reports
Well, I figured out the problem. Everything is perfect! Except for one thing... The Setdatasource method does not accept this object, in my case I used a list despite being only an image.…
-
0
votes1
answer76
viewsA: Chartjs to Kendo-ui
Well, trial and error. Doubt #1: I haven’t made it yet. Doubt No 2: Just use valueAxis.majorGridLines.color. The code would look like this: valueAxis: { min: 0, max: 10, majorUnit: 1, visible:…
-
0
votes1
answer76
viewsQ: Chartjs to Kendo-ui
I’m changing from the Chartjs to the Kendo-ui. (My company has the license) I’m having some trouble customizing the Radar Chart I’m trying to use. 1) Remove lines that divide the graph. The cross…
-
5
votes1
answer200
viewsQ: Get widget without id
I have a div, and within it one canvas without id and other elements. <div id="itens"> ... <canvas></canvas> ... </div> How can I get the canvas using JQuery?…
-
0
votes1
answer483
viewsQ: Image in Crystal Reports
I am using Crystal Reports in my Asp.Net MVC project. In Database Fields in Crystal Reports in my Visual Studio, I connected a C# class instead of going to the Database. This is the class: public…
-
3
votes1
answer1144
viewsQ: Resize Canvas Chart
I’m using Chartjs and I have a radar graph. See the code below: Also have that fiddle. var radarChartData = { labels: ["Item1", "Item2", "Item3", "Item4"], datasets: [ { label: "Linha1", fillColor:…
-
1
votes1
answer319
viewsQ: property with Crystal Reports Objects List
I have the following classes: public class objeto1 { public string Descricao {get;set;} public List<objeto2> Objeto2 {get;set} } public class objeto2 { public string Descricao {get;set} public…
-
5
votes1
answer442
viewsQ: Label with two lines in chartjs
Have that graph where use chartjs and would like to put a label with two lines, \n nor <br/> has worked.…
-
2
votes2
answers257
viewsA: Simulate browser without HTML5 support
I’m using IE11 and despite the regrets has the best tool I could find so far. In their Tools for Developers (F12) the tab is available Emulation , and on the option Document mode some versions are…