Posts by Jedaias Rodrigues • 6,718 points
226 posts
-
2
votes1
answer382
viewsQ: Begintransaction vs Transactionscope
I was analyzing that answer and the doubt arose: What’s the difference between BeginTransaction and the TransactionScope? Are there specific situations for each one? What are their advantages and…
-
2
votes1
answer774
viewsQ: Transaction with multiple queries
I was visualizing that question, and to try to answer I decided to perform some tests where I could see the following problem: When conducting multiple queries to the Database via Entity Framework…
-
5
votes1
answer762
viewsQ: How does Sqlbulkcopy work?
I’m using in my class project SqlBulkCopy to mass input data. Everything has worked perfectly, but in recommending this to my co-workers, despite proving the efficiency, questioned about the…
-
6
votes1
answer288
viewsQ: Error using Entity Framework Bulkinsert
I have an Asp.Net MVC project in . Net Framework 4.0 with Entity Framework 5.0, where I added the Bulkinsert-ef5, but in the following excerpt error occurs: using (MeuEntities context = new…
-
10
votes2
answers367
viewsQ: Difference between . NET Framework for Entity Framework
I have an Asp.Net MVC project that when clicking properties the following information is displayed: When opening the file packages.config I could see that other information: After all, what exactly…
-
3
votes2
answers3686
viewsQ: Download file via Ajax
In my Asp.Net MVC 4 project, I have a View with a button and the following script: <input type="button" value="Teste" id="baixarArquivo" /> <script> (function () {…
-
3
votes2
answers940
viewsQ: File import and read
I have an Asp.Net MVC project with Entity Framework 4 and SQL Server, where there is a Action who receives via POST an archive csv. Taking into account the use of memory, processing time and…
-
1
votes0
answers973
viewsQ: A transport-level error has occurred when Receiving Results from the server
I have an app Asp.Net MVC 4 (with Entity Framework and SQL Server) that works normally on my application server, but now I had to work with redundancy and load balance with two new servers for the…
-
0
votes3
answers857
viewsQ: Invalid Pointer
I have a project in Asp.Net MVC with Entity Framework 4.5, I created clean, but by trying to create a View I receive the following message: Error : There was an error running the Selected code…
visual-studioasked Jedaias Rodrigues 6,718 -
1
votes1
answer191
viewsQ: Select td based on text
I have a table where I want to select the td's that contain certain text. I have tried options such as: console.log($("#minhaTabela").find("td[value='A']"));…
-
0
votes2
answers139
viewsQ: Jquery Show does not work in td
I have the following code snippet: $(".item2").hide(); $("#show").chick(function(){ $(".item2").show(); }); <script…
-
0
votes2
answers76
viewsQ: Change backgroud from one class to another event
I have the following code: .line-item:hover td { background-color: yellow; } .item-text:focus + .line-item td { background-color: red !important; } <table border="1"> <tr…
-
1
votes1
answer725
viewsQ: Border Radius in table with border Collapse
I have the following code: table { border-collapse: collapse; } .item1, .item2, .item3 { border-top:1pt solid black; border-bottom:1pt solid black; } .item1 { border-left:1pt solid black;…
-
1
votes2
answers1320
viewsQ: How to eliminate white space between columns?
I have the following table: <table> <tr> <td style="border-top:1pt solid black">A</td> <td style="border-top:1pt solid black">B</td> </tr> </table>…
-
3
votes2
answers149
viewsQ: Why don’t these Ivs line up?
I have the following code snippet: .content-all{ height: 100%; width: 100%; background-color: yellow; } .content-descriptions{ height:120px; width: 1020px; background-color: green; }…
-
7
votes3
answers1360
viewsQ: Faster way to access properties in a C#list
I have a project that works with a large volume of data, and I need to optimize it to bring results of some calculations in a considerably small time. I know that I have several aspects to take into…
-
0
votes0
answers464
viewsQ: How to load Partialview via Javascript
I have an Asp.Net MVC project where there is a method that returns a PartialView: [HttpPost] public ActionResult MinhaAction(int param1, int param2) { // ... // Código // ...…
-
1
votes1
answer76
viewsA: Function cannot be used in a given scope
To solve my problem it was necessary to modify the library. The same was as follows: /* * Developed by Justin Mead * ©2011 MeadMiracle * www.meadmiracle.com / [email protected] * Version 1.3 *…
javascriptanswered Jedaias Rodrigues 6,718 -
7
votes2
answers2701
viewsQ: Which is more secure: Session or cookie?
Thinking about security guard, what is the best option to keep the user logged in an ASP.NET MVC application, the cookie or the Session?
-
1
votes0
answers104
viewsQ: Crystal Reports - RTF vs HTML
I am generating several reports with Crystal Reports, and as I could notice there are basically two ways to interpret formatted text (RTF and HTML). Taking into consideration the different styles,…
-
2
votes1
answer735
viewsQ: How to convert HTML to RTF?
I have an Asp.Net MVC project where I would like to convert an HTML string to RTF in Controller. I’ve tried the following ways: Source 1 using(var webBrowser = new WebBrowser()){…
-
3
votes1
answer61
viewsQ: Get values from Arraysegment
By creating a ArraySegment, would like to get the new array created, but when using: meuSegmento.Array; the array original is returned and not the created segment. string[] meuArray = {"stack",…
-
3
votes2
answers1790
viewsQ: Data Search with Entity Framework
I have a project in Asp.Net MVC where I need to work with a large volume of data. To get them from the Database (Microsoft SQL Server) using Entity Framework 4 I know basically three ways: first…
-
11
votes2
answers121
viewsQ: Is there an alternative to Removeat()?
I am using Entity Framework in an ASP.NET MVC project where I have a simple list of strings and need to remove only the first item. I used the following command: minhaLista.RemoveAt(0); Well, but…
-
3
votes1
answer76
viewsQ: Function cannot be used in a given scope
I’m using the following library: jQuery-Dual-Listbox. I made a simple modification to the code creating a function that allowed working with the selected elements. Function name: afterChanges Follow…
javascriptasked Jedaias Rodrigues 6,718 -
2
votes1
answer196
viewsQ: Objectdisposedexception
I have the following code snippet: var nivel = 1; List<meuObjeto> meusObjetos = new List<meuObjeto>(); using(var objectContext = ((IObjectContextAdapter)db).ObjectContext) { var cmd =…
-
2
votes2
answers652
viewsQ: Android apps, what are the advantages and disadvantages of the tools?
Between creating native apps, using HTML, CSS and Javascript together with Phonegap, or C# with the help of Mono, what are the advantages and disadvantages and which context best applies?…
-
22
votes3
answers11209
viewsQ: Difference between Any, Contains and Exists
What’s the difference between Any, Contains and Exists? What is the appropriate context for each of them? (Examples of use) What are the advantages and disadvantages?…
-
3
votes2
answers10482
viewsA: Doubt about "Error Converting data type varchar to float"
Editing Warning: This response may leave your code vulnerable to SQL Injection, use that other answer. Well, let’s go in pieces... In his enclosure WHERE you are using simple quotes for fields that…
-
3
votes1
answer2730
viewsA: Pass data from an HTML table to the ASP.NET MVC controller
I may still be a young man padawan, but I would definitely use Json. Well, first you need to quickly restructure your table, adding a class for example, to be able to get your data easier.…
-
21
votes6
answers502
viewsQ: Empty semicolon doesn’t make a mistake?
I was working on a project and unintentionally bumped into the semicolon that ended up being inserted well after a if. I was intrigued because Visual Studio did not point out as an error, and when…
-
3
votes2
answers1086
viewsQ: How to reference an external library?
I have a project in Asp.Net MVC where I would like to add some new libraries. They are available for download as .dll, but are also available on Manage Nuget Packages. What is the best way to add…
-
7
votes1
answer280
viewsQ: How to read data in Json on the server?
I have an Asp.Net MVC project and I’m trying to repurpose an Action that returns Json within the server, but I’m unable to work with Json returns in C#. I’m doing research, but I haven’t found…
-
8
votes1
answer240
viewsQ: Download server memory image
I have an Asp.Net MVC project where I have an image in memory and would like to download it. See an excerpt from the code: Image imagem = default(Image); using (Bitmap b = new Bitmap(bitmapWidth,…
-
4
votes2
answers987
viewsA: How to transform HTML into an image on the server?
I got a big help with that link, and I realized I was using the wrong library. I had downloaded the DLL, put it in a folder in the project and added a reference. But it didn’t work very well so I…
-
5
votes2
answers987
viewsQ: How to transform HTML into an image on the server?
I have an Asp.Net MVC project with . Net Framework 4 in Visual Studio, where I need to transform a string with HTML code into image on the server side. I’ve been trying to use that library, but I’m…
-
12
votes4
answers750
viewsQ: How to limit the resources used by the system?
I have a loop loop that makes several iterations and has in its scope calculations that require a lot of processing. The problem is that when executing the code snippet, the use of the processor…
-
4
votes2
answers1169
viewsQ: Remove HTML tags
In terms of efficiency and performance, which of these codes is the best option to remove HTML tags in a string? Option 1: string ss = "<b><i>The tag is about to be…
-
3
votes1
answer74
viewsA: Adding Rich Snippet in multiple Ivs
In fact what you’re trying to use is the Microdata. Rich Snippets is when using the Microdata through specific information in the HTML structure to make search engines "understand" the content of…
-
5
votes2
answers126
viewsA: Edit MVC with Foreign Key
Well, just keep doing as you are. Sending the ViewBag with the SelectList for View Create Books, but in this case you will already send a selected value. By creating a SelectList, it is possible to…
-
9
votes1
answer1033
viewsQ: Get index back to front
Imagine I have the following string: string texto = "Stackoverflow em Português"; If I want to know the index of the first space, just: int index = texto.IndexOf(" "); But in this case I have two…
-
5
votes1
answer49
viewsQ: Is it possible to enable light Bulbs in Visual Studio?
It is possible to use light Bulbs no Visual Studio 2013 Ultimate Update 5 ? How to enable the resource?…
visual-studioasked Jedaias Rodrigues 6,718 -
3
votes1
answer72
viewsQ: Get character index based on Width
I have the following method to calculate the width of a text: public float GetWidthOfString(string str, Font font, int bitmapWidth, int bitmapHeight) { Bitmap objBitmap = default(Bitmap); Graphics…
-
0
votes1
answer225
viewsA: Colors in subreport
That was the problem: For Sub Relatório have been inserted into the footnote section, then RecordNumber = 1, because the footer will be "executed" only once in the Main Report, and for some reason…
crystal-reportsanswered Jedaias Rodrigues 6,718 -
0
votes1
answer225
viewsQ: Colors in subreport
I’m using Crystal Reports to generate a report. This has a Report sub, where I need to add a color function to a section. I did it this way: In the sub Report. Right click on the section >…
crystal-reportsasked Jedaias Rodrigues 6,718 -
10
votes1
answer216
viewsA: Undefined error using replace()
Well, when writing nome["$1"], you’re passing a string as index of your array, and as the position does not exist, undefined is returned to you by default. This means that the value is undefined.…
-
0
votes2
answers166
viewsA: How to use Measurestring method?
Just create the following method: private float GetWidthOfString(string str, Font font, int bitmapWidth, int bitmapHeight) { Bitmap objBitmap = default(Bitmap); Graphics objGraphics =…
-
1
votes1
answer800
viewsA: Transparent image and background color
Well, the following code solved the problem: FileStream fs = new FileStream(@"\path\imagem1.png", FileMode.Open, FileAccess.Read); Image image = Image.FromStream(fs); fs.Close(); var imageHeight =…
-
1
votes1
answer800
viewsQ: Transparent image and background color
I have the following code: FileStream fs = new FileStream(@"\path\imagem1.png", FileMode.Open, FileAccess.Read); Image image = Image.FromStream(fs); fs.Close(); Bitmap b = new Bitmap(image);…
-
1
votes2
answers166
viewsQ: How to use Measurestring method?
I have the following code: var font = new Font("Arial", 50); var texto = "Meu texto"; var res = Graphics.MeasureString(texto, font); // Está linha não funciona. When compiling the following error is…