Posts by Dorathoto • 7,426 points
252 posts
-
1
votes2
answers67
viewsA: Cache Redis on Azure
Unfortunately the Azure Cache Redis (Paas) service still has some limitations like: Import only premium layer; Impossible to downgrade the layer, after putting in a Premium for import, will always…
windows-azureanswered Dorathoto 7,426 -
-1
votes2
answers67
viewsQ: Cache Redis on Azure
I hired the cache service Azure Cache Redis, but to import the current database I had to migrate it to Premium P1, after importing I tried to return to the C0, impossible, the Azure Cache Redis only…
windows-azureasked Dorathoto 7,426 -
4
votes1
answer84
viewsQ: Create customizable parameter for Application Insights
In a Webforms project (C# - .NET 4.6.2) I am using telemetry Application Insights from Azure, I would like to send a custom parameter for statistics. Basically, I want to send Clientid to telemetry,…
-
1
votes5
answers1463
viewsA: Beginner in Python, Else and Elif
Just to complement the answer, the correct code would be: idade = int(input("Insira sua idade:")) if idade<=0: print("Sua idade nao pode ser 0 ou menos de zero") elif idade<18: print("voce…
-
1
votes3
answers1971
viewsA: Calling javascript function from within a Classic ASP block
Is not possible. ASP Classic is interpreted by the server and sent the already processed html to the client. Javascript is processed only in the client. It would be possible to do the opposite…
-
1
votes1
answer177
viewsQ: Escrenvendo on the Async Island
How to make a Console program, while it processes some task it execute a writing on the console (like a counter) asynchronous? independent. In other words, he will be writing independently of other…
-
-2
votes3
answers150
viewsA: Database modeling, when it is possible to denormalize
A conclusion I’ve come to: When denormalizing or not modeling? By default normalization is always a path that we should follow, in this my project was clear that it seemed one of the rare cases that…
-
1
votes1
answer195
viewsQ: how to create index order desc through Dataannotations
I need to create an index in my model, but I need it to be decreasing Like I’m doing: [Index("Ix_PrecoConsultData", IsUnique = false, Order = 1)] public DateTime DataCadastro { get; set; } It…
-
3
votes3
answers150
viewsQ: Database modeling, when it is possible to denormalize
I’m modeling a database (MSSQL) and a question has arisen. In every business rule of the clients the data is visualized vertically ex: Product, Original Price, Concurrent Price 01, Concurrent Price…
-
0
votes1
answer46
viewsQ: Scheduler for Azure
Does anyone know if I can make a simple console program that will do some SQL Insert and put it to run on the Azure scheduler? (whether it’s the free one or the paid one…
-
9
votes6
answers17379
viewsA: How to improve reading performance of a SQL Server database?
I’ll put an answer to complement, Use SSD It is interesting to check the cache plan of the queries, to know if this query is cached or not. Otherwise I also recommend SSD, makes an absurd difference…
-
1
votes1
answer54
viewsQ: Displayname does not work in relationship
have a model: public class TalaoCode : ITalaoCode { [Key] public int TalaoCodeId { get; set; } [DisplayName("Equipe")] public int EquipeId { get; set; } [DisplayName("Equipe")] public virtual Equipe…
-
1
votes1
answer52
viewsA: doubt about performance
Merge and Minify Extremely recommended to join Css and JS as little as possible. Browsers can make 6-8 requests per second, the more files you have, the block you download. After joining CSS’s and…
-
1
votes1
answer1712
viewsA: Top corner responsive image - Bootstrap
I don’t think this is necessary bootstrap, can do with 3 CSS lines See working: https://fiddle.jshell.net/9vcbx8tz/ <div class="LogoSuperior"> <img src="imagem.jpg"> </div>…
-
1
votes2
answers134
viewsA: Database server in Azure
Correct when you have access to the SQL machine is to run the DTU calculator so you can estimate the size of the SQL to be hired. OBS: imagining that it is SQL on Azure service. DTU calculator…
-
2
votes2
answers2295
viewsA: How to find CSS images and styles that are not used on a website?
To complement and update the response, other plugins Helion plugin import the Helion plugin to your website https://github.com/geuis/helium-css <script type="text/javascript" src="helium.js"…
-
4
votes2
answers56
viewsA: Why is it that when I delete or edit the record from table x it is also removed from table y?
It’s called Cascade Delete and is a standard behavior of the Entity Framework. You can also put some general rules, and not just specific for each model. Ex: protected override void…
-
1
votes1
answer87
viewsQ: Find the first tag after a class name and change it with jquery
I’d like to identify the first class='active' in my html and after adding a value in the element class <ul> but only the first <ul> My HTML <aside class="navigation"> <nav>…
-
0
votes1
answer597
viewsQ: run Task.Whenall wait and then run back
I’m trying to make a console program, run a task, wait and run again and continue in this cycle endlessly. In theory it would place the function within a While(true) infinite loop, but as the…
-
1
votes1
answer27
viewsA: Webclientdownloadfiletaskasync file in use, even with Dispose
the problem was for some reason my function of generating random name was not so random: public string GerarNomeJPG(int _size) { var random = new Random((int)DateTime.Now.Ticks); var builder = new…
-
0
votes2
answers441
viewsA: System.Data.Sqlclient.Sqlexception: Conversion failed when Converting the varchar value to int
This error is that you are converting some string value to int and this is not possible. You think you would receive something like "01", do the above query directly in SQL and see the result q it…
-
1
votes1
answer27
viewsQ: Webclientdownloadfiletaskasync file in use, even with Dispose
I am downloading 10 images at the same time async way, However in the 2nd photo usually the error that the image is in use. The process can not access the file because it is being used by Another…
-
1
votes1
answer44
viewsQ: Download Async + Copy = Copying image 0 bytes
I am simultaneously downloading several photos, and also need to make the copy to a certain folder. What happens is that it makes the copy before finishing the download. public static async Task…
-
5
votes2
answers1906
viewsQ: await Task.Whenall how to run multiple processes?
I am trying to create several task (async) they will perform the following logic: Parse an Html based on a received url with Htmlagilitypack Return a product model after parse Insert the Product…
-
1
votes1
answer82
viewsQ: Task em await Task.Whenall New transaction is not allowed because there are other threads running in the Session
I’m doing a show Console, where he basically performs these 4 procedures Recovers a IEnumerable<_Url> Make a stop on those urls Inserts to the Database Mark this _Url as read (processed) so it…
-
7
votes3
answers190
viewsQ: Console, Windows Forms or MVC what’s the fastest for heavy loads?
I’m developing a program that will basically have the following cycle: Database query(some milliseconds) For each record will perform the following process: Início | Parse de um XML web (alguns…
-
20
votes3
answers2015
viewsQ: What is the difference between async, multithreading, parallelism and competition?
What is the difference between async, multithreading, etc..? They depend on the amount of processor cores? If I do a program in Visual Basic and open 33 instances of it, would it be running in…
-
3
votes1
answer438
viewsQ: Storing multiple values of an Enum in the database
I wish I could save several options of an Enum (day of the week) something like 1,3,5 (Monday, Wednesday, Friday) As modeling described here. I created a model public class Horario { [Key] public…
-
1
votes1
answer79
viewsQ: calling Enum for value
I created an Enum: public enum EnumTipoBoleto { VazioErro=0, ConfigInicial = 1, Mensalidade = 2, Outros =3, DifMensal =4 } Now in some places I have the number and want to convert to Enum var…
-
1
votes1
answer102
viewsA: Redirect users not indexed Asp.net
To redirect pages that will be authenticated using the attribute [Authorize] just configure your web.config for that reason. Web.Config <system.web> <authentication mode="Forms">…
-
2
votes3
answers2308
viewsA: Format double output with dot instead of comma
Utilize String.Format and also force with the Globalization <%# string.Format(new System.Globalization.CultureInfo("en-US"), "{0:D}", Eval("Latitude")) %>…
-
2
votes2
answers85
viewsQ: Modeling of Models 1 to n
I’m modeling a system for academies. I created 2 models, Modality public class Modalidade { [Key] public int ModalidadeId { get; set; } [MaxLength(200)] public string Nome { get; set; }…
-
3
votes1
answer492
viewsQ: Creating Models that derive Identityuser or use the Aspnetusers table
I am developing management software for my gym. I have Students, Teachers and system users. I installed the Identity. I created a model calling for Aluno who inherits from the IdentityUser public…
-
3
votes2
answers2116
viewsQ: Real-time Google Maps Update
I’m using the Google map to show objects in real time. I did a function in Javascript which is updated every 3 seconds and in this it updates the marked ones in the Google map. Something like:…
-
2
votes1
answer925
viewsQ: Date-place on @Html.Editorfor
I have a model property that I will keep DateTime: [DataType(DataType.DateTime)] [DisplayFormat(ApplyFormatInEditMode = false, DataFormatString = "{0:yyyy-MM-ddThh:mm:ssZ}")] public DateTime…
-
3
votes1
answer82
viewsQ: Is it bad practice to cache an entire Model on IIS?
In an application I use sixteen times a code like var cliente = db.Clientes.Find(id); So that’s why I created a controller that returns me: [OutputCache(Duration = (10 * 60 * 60), VaryByParam =…
-
1
votes1
answer34
viewsQ: @Html.Action in _Shared error when sending a Viewmodel by Controller
In my _Shared have a Partialview calling for _rodape.cshtml but now she will need to receive a Viewmodel which will have various data. Like I don’t want to create a Action in each Controller, I…
-
1
votes1
answer158
viewsQ: .Orderby dynamically in Lambda
I have a field int called OrdemDosProdutosDestaque where I store products order preference (My customer choosing and storing in the database). ex: 1=Aleatório 2=Preço 3=Referência 4=Categoria etc..…
-
4
votes1
answer87
views -
0
votes3
answers290
viewsQ: How to change text of <Legend> without knowing the id?
I have a tag <legend>texto</legend> that I don’t have Id and can have several on one page, I would like to change based on the ID of the previous div ex: <div id="div1teste">…
-
2
votes2
answers1182
viewsQ: Upload Json to Google Maps
I am drawing a Poligono on the google map, I managed, but as it is big it got a very repetitive code that I would like to isolate in one . json but could not. I tried to do something simple with…
-
5
votes4
answers5492
viewsA: Difference between two dates, ignoring weekend - working days only
I ended up making this code that works really well, I hope I can help other people. public static int GetDifDias(DateTime initialDate, DateTime finalDate) { var days = 0; var daysCount = 0; days =…
-
5
votes4
answers5492
viewsQ: Difference between two dates, ignoring weekend - working days only
I was looking for something similar, but unfortunately I found nothing. I found this solution that helped me a lot but is in Java. How to calculate the difference between two dates by ignoring…
-
2
votes1
answer1134
viewsA: Selectlist with Viewbag
failed to put the field that will appear, you just put the ID, change the line: ViewBag.ID = new SelectList(setores, "setorNome"); for ViewBag.ID = new SelectList(setores, "setorID","setorNome"); If…
-
1
votes1
answer82
viewsA: Add inline CSS to image using Tiny MCE
In Tinymce.ini add the following code: image_dimensions: false, image_class_list: [ {title: 'Responsive', value: 'img-responsive'} ] You can also try using some extra plugins from it like:…
-
3
votes1
answer1242
views -
5
votes1
answer3690
viewsQ: Prevent line breaking (encavalating) in col-Md bootstrap
I am doing a grid that will appear some products, up to 3 per line, in mobile 1 per line, the problem is that the height varies and from there on the monitors it 'encavala' one over the other.…
-
0
votes1
answer148
viewsQ: Fluent API Zero-to-one Relationship 0-1 - Bringing Results From Another Relationship
I’m trying to make the relationship between my Cliente and the CieloToken, tried with Fluent API and Data Annotation, I mixed them together and it didn’t work. In fact it executes, but even if the…
-
7
votes1
answer265
viewsQ: How to make ASP.NET MVC skins
How would make skins in MVC? where the client(user) could choose the skin (would change CSS, html, images, etc)? OBS¹: The Skin would be for all pages and each customer can have only 1 single skin.…
-
0
votes4
answers8648
viewsQ: Remove space and break string lines
I’m making a Webapi that generates an XML, this XML is read several times a day, so in the first run it serializes all my XML and saves it to disk, and during 24h it reads from disk instead of…