Posts by Leonel Sanches da Silva • 88,623 points
2,010 posts
-
3
votes1
answer135
viewsA: Contesting banknote database structure
Depends on what you want. Create three tables (contestation, replica, treplica) This allows for the insertion of various contests, replicas and rejoinders for each note (which I believe is not your…
-
3
votes1
answer665
viewsA: Relationship in Rails, how to declare in Active Record?
Let’s use the following nomenclature: Shop: Business establishment Customerlink: Association between business establishment and customer Customer: Client In the Active Record, your relationship…
-
19
votes4
answers32009
viewsA: What is the most complete linux for programmers?
This question is quite broad, so I will brush the most used distributions and their characteristics. Linux Mint It is the distribution that has gained most adherents in the last two years. It is a…
linuxanswered Leonel Sanches da Silva 88,623 -
0
votes1
answer54
viewsA: Doubt in the execution of branches
After approval, a merge with Main. This will ensure that the modification will be passed on to the main development flow. In the same way as the first time, it will probably be necessary to resolve…
team-foundation-serveranswered Leonel Sanches da Silva 88,623 -
9
votes2
answers33836
viewsA: Vertical alignment of text with CSS
1. Aligning the text in the middle of the cell Create a div with the class vertical containing the text. Then use: .vertical { vertical-align: middle; display: table-cell; } 2. Rotating the Text…
-
1
votes1
answer285
viewsA: Asp.net Identity Good practice authorization
Depends on your goal. I agree to Pessoa and Usuário be separated if Pessoa don’t need to have a Usuário, or if a Pessoa possess several Usuários (2nd example). Otherwise, it is best to implement…
-
0
votes2
answers1323
viewsA: Create and Edit Onetomany with Viewmodel
As you are using the news fields within the View, the object within the Viewmodel needs to be initialized: public class NoticiaCategoriaVM { public Noticia Noticia { get; set; } public SelectList…
-
1
votes2
answers3428
viewsA: Take the value of an input type=text and play in a variable
Two ways: 1. Passing the entire model to the Controller [HttpPost] public ActionResult AcaoDoController(MeuModel meuModel) { ... } 2. Passing the Field name as Parameter [HttpPost] public…
-
1
votes3
answers408
viewsA: How to index and update a user comparison system?
Ideal for your case is to use a Trigger. In reply to his comment, a Stored Procedure is a set of stored SQL statements that can be executed through a simple call. They can receive parameters and…
-
3
votes1
answer1354
viewsA: Content tracker for external pages with PHP
You want to actually create a Web Crawler. There is a PHP library for creating Web Crawlers: http://phpcrawl.cuab.de/ Translating the example from the main website: <?php // Tempo de atuação do…
phpanswered Leonel Sanches da Silva 88,623 -
133
votes3
answers25811
viewsA: What are the differences between Git, SVN and CVS?
CVS It was one of the first version control systems to have alternative development streams and to allow free editing of text-only files between several people of the same team at the same time. The…
-
0
votes2
answers507
viewsA: Webclient request returns empty
Try using a HttpClient in place of WebClient: HttpClient client = new HttpClient(); Uri uri = new Uri("http://www.wiplay.com.br"); HttpResponseMessage response = await client.GetAsync(uri); if…
-
16
votes3
answers2308
viewsA: What HTTP status should I use for when a POST parameter is missing?
Opinions are divided. There is an equivalent question in the Stack Overflow in English, where people are divided between codes 400, 412 and 422:…
-
8
votes3
answers1601
viewsQ: Breadcrumb algorithm in ASP.NET MVC
I’m writing a system on Asp.net-mvc And the idea is that there’s a Breadcrumb on every canvas. With no ideas for a good algorithm, I created a Helper that returns a list of objects according to the…
-
2
votes2
answers787
viewsA: How to build a complete XML in T-SQL?
The most performative way to do this is by using the statement FOR XML('SuaTagRaiz'). I don’t know what your table looks like, but suppose a table of states (in my system, States). The sentence so:…
-
3
votes3
answers2237
viewsA: Construct string with special characters
Use: PdfPCell teste = new PdfPCell(new Phrase("<O meu texto>" + ((char)0x20AC).ToString(), fontetexto)); Edit The special character of this point you want is U+25CF, that is to say: PdfPCell…
-
7
votes6
answers5683
viewsA: Copy Wordpress database without using Phpmyadmin
WP-DB-Backup There is a Wordpress plugin that performs the backup, WP-DB-Backup, where we can read on the page of the same: WP-DB-Backup Allows you easily to backup your core Wordpress database…
-
2
votes3
answers579
viewsA: Delete . bashrc, . bash_profile and . profile files: what are the consequences?
These files configure the environment with user preferences. A priori, deleting these files does not affect the operating system, but can cause common executable commands not to be recognized.…
-
3
votes2
answers275
viewsA: Editing of captured fabrics for making manuals
There is not an ideal tool for this confection, but a set of tools. The Microsoft Word has the following resources: Draw rectangles around parts of the screen to highlight some function; Add arrows…
documentationanswered Leonel Sanches da Silva 88,623 -
2
votes3
answers949
viewsA: Scrypt, Bcrypt or anything else
It depends on your goal. There are a number of things to evaluate: Time for password breaking using brute force; Number of iterations to generate an encrypted string; Number of characters in your…
-
5
votes3
answers2713
viewsQ: ASP.NET MVC5 - Asynchronous Methods in Controller
I’m developing an MVC layer for an ASP.NET system written initially in Webforms. It does not use Entityframework, so a good part of the system I had to elaborate a home solution. In order to use the…
-
0
votes2
answers1847
viewsA: Change layout of a radioButtonList / checkBoxList Webforms to make it compatible with Bootstrap
Just follow the recommendation of the Bootstrap website itself, adding the classes in each tag. For Forms, the link is as follows: http://getbootstrap.com/css/#Forms I will use version 3.1.1 as an…
-
7
votes4
answers4043
viewsA: Best practices in using BD connections via Entity Framework
DbContext nay is a class thread-safe, then should not be used as static (what I imagine to be like a Singleton). The objects attached in this context are also not thread-safe, what can create…
-
2
votes5
answers1056
viewsA: How do I connect Windows Phone to an SQL Server?
Windows Phone isn’t exactly meant to connect to an instance of SQL Server because Microsoft doesn’t allow it itself. The correct thing would be for him to connect to a website that has a Web API…
-
8
votes3
answers711
viewsA: Extend classes with private constructor
Because this goes against the formal definition of protection methods of classical object orientation theory. If a member is private, it cannot be accessed by any class other than the class itself.…
-
6
votes6
answers11946
viewsA: Converting a string to int?
You can also implement the @Miguelangelo response in class extension form: namespace SeuProjeto.Extensions { public static class StringExtension { public static Nullable<int> ToInt(this String…
-
1
votes1
answer179
viewsA: Assembly structure in a project using the Pattern MVVM
This is done by callbacks and delegates, which is a chargeable function object. At some point you will have to fill this function object when instantiating your class ViewModel. I think the right…
-
1
votes3
answers1139
viewsA: Route to static pages in MVC
For the route to work properly, you would need to have a PaginasController, each method of this controller pointing to a page in your Views: namespace SeuProjeto.Controllers { public class…
-
0
votes3
answers212
viewsA: Problem with the Bundle
If your directory font is in the root, use so: @font-face { font-family: 'FontAwesome'; src: url('/font/fontawesome-webfont.eot?v=3.2.1'); ... }…
-
0
votes4
answers3223
viewsA: Generate xml through a class, even without value in the property
You can use the library XmlOutput. An XML written on it looks like this: XmlOutput xo = new XmlOutput() .XmlDeclaration() .Node("root").Within() .Node("user").Within()…
-
1
votes3
answers250
viewsA: Ideal environment IT sector
Yes. You can buy it here (in English): http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=362626&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D362626…
project-managementanswered Leonel Sanches da Silva 88,623 -
2
votes2
answers1138
viewsA: Netbeans - How to Generate a Jar with Dependencies without Maven
Additionally, you can add the dependent jars using the traditional method: File > Project Properties > Libraries > Run-Time Libraries
-
0
votes2
answers1138
viewsA: Netbeans - How to Generate a Jar with Dependencies without Maven
You can package the dependencies in the jar using Maven. The Netbeans website even has step-by-step: https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html…
-
2
votes2
answers612
viewsA: Distribution of DLL
Use the following command to register the DLL on the machine the file is not found on: regasm minhaDll.dll /tlb:minhaDll.tlb
-
22
votes4
answers60985
viewsA: Difference between :disabled and :readonly in HTML?
Disabled you cannot edit or get input value while processing the Form. Readonly you can at least take the value of the input in the Form processing. This is the basics. There are a few more nuances:…
htmlanswered Leonel Sanches da Silva 88,623 -
6
votes2
answers6308
viewsA: Optimize Mysql tables
According to the Mysql website, I translated what the command says OPTIMIZE TABLE: Use OPTIMIZE TABLE in these cases, depending on the type of table: After making a substantial amount of insertions,…
-
2
votes1
answer202
viewsA: Using Newrelic to monitor Java applications on Tomcat7
I don’t know if this is exactly the case with your application, but some browsers don’t send the information that Newrelic uses to build this graph. The link below has code snippets to send the…
-
3
votes4
answers1531
viewsA: List all Roles in Checkbox and mark the roles that the User has
Just complementing the answers: in MVC4 there are two classes and an attribute that implement authentication, user system and roles. They are they: MembershipProvider RoleProvider AuthorizeAttribute…
-
7
votes2
answers4341
viewsA: What are rvalues, lvalues, xvalues, glvalues and prvalues?
Let’s start by defining each one so that it becomes clearer: The C++ compiler divides the code into expressions to evaluate the syntax and semantics of everything used. These expressions are part of…
-
0
votes2
answers144
viewsA: Compare Dayofweek in an ASP MVC query
This error means that LINQ cannot interpret its expression in the execution. You have to calculate the day of the week out of the expression before and then pass this calculated value by variable.…
-
8
votes3
answers6710
viewsA: Checkboxlist on ASP.NET MVC
There is a package called MvcCheckBoxList (whose helper is called CheckBoxListFor): http://www.codeproject.com/Tips/613785/How-to-Use-CheckBoxListFor-With-ASP-NET-MVC-4 Examples of codes are on the…
-
1
votes3
answers1154
viewsA: How to verify if there is a specific value (string) in a list in C#?
@Html.DropDownList("MeuSelect", listaCentrosDeCustoEquipe.Select(option => new SelectListItem { Text = option.CodCentroCusto, Value = option.CodCentroCusto.ToString(), …
-
0
votes3
answers1069
viewsA: jQuery multiline highcharts
In your case (starting value and price), the chart could be mounted using this example. Using this Nuget package. Controller public ActionResult BasicBar() { Highcharts chart = new…
-
5
votes1
answer1265
viewsA: Good practices for Asp.Net MVC 4 - 5
If I understand your doubt, you will need to have two directories in your project: Controllers (will contain the business code for Cruds); Arquivos . Cs, one for each Model Views (Will display the…
-
0
votes2
answers758
viewsA: Eclipse Debugger does not advance on Android application
The times I’ve had this problem, it can be two things: The Eclipse window is out of focus. By clicking inside it the commands start working again; The Thread selected from the Debug perspective is…
-
3
votes5
answers462
viewsA: Internet Explorer, should I still be worried about him?
Not. They made a Javascript library that fixes the pattern problems of old versions of Internet Explorer, accessible through the link below: https://code.google.com/p/ie7-js/ Not only that, CSS…
-
12
votes3
answers6240
viewsA: What would be the best way to make a CRUD for a framework in the most generic way possible?
What you want, from what I understand, is to implement your own Framework with CRUD operations. I think that in this first step it is not necessary to use dependency injection control inversion.…
-
7
votes2
answers1468
viewsA: Entity Framework is saving duplicate values when saving entities with relationship N to N
This is because the context intuits that you are creating a new object. If you don’t need to load the categories, you can use hollow objects attached to the context just to save the new entity, more…
-
1
votes6
answers6055
viewsA: Part of the Label in Bold?
Use: SeuLabel.Font = New Font(SeuLabel.Font, FontStyle.Bold)
-
8
votes3
answers3827
viewsA: How to publish applications done in Node.js
There are some ways. The ones I know are: Using the package forever: https://www.npmjs.org/package/forever Using the supervisord + nodemon supervisord: http://supervisor/ (is not package of Node.js)…