Posts by Julio Borges • 3,178 points
91 posts
-
4
votes1
answer4402
viewsA: Create C#Folders
To create the directories, just create the last directory that the other levels are created automatically, you can use the method Directory.CreateDirectory(), as shown below: using System; using…
-
2
votes1
answer261
viewsA: C#,SQL,SQLITE How to return SQL command from an action
I believe that your intention is to log the query, so I suggest the following implementation: public string ExecutarManipulacao(CommandType commandType, string SQL) { SQLiteConnection sqlConnection…
-
3
votes2
answers155
viewsA: Observablecollection does not Binding
Probably the problem is the encapsulation of the _os property: public ObservableCollection<Model.OSModel> _os { get; private set; } As the method set is private, the Binding that is performed…
-
5
votes1
answer230
viewsA: C# - Error after changing from 32 to 64bit
Did you develop your components in a separate project (class Library)? If yes, libraries should be placed as Anycpu, only executables should be compiled as 32 or 64 bits. If you haven’t put the…
c#answered Julio Borges 3,178 -
1
votes3
answers124
viewsA: Take the name textview in repetition loop
You can use the property Controls form and run a Line to pick up the controls with the desired name. List<TextBox> textBoxes = this.Controls.OfType<TextBox>() .Where(ctrl =>…
-
6
votes1
answer90
viewsA: Visual Studio or Eclipse Code Review Rule
You can use the #if DEBUG operator for this, as demonstrated in the Microsoft documentation: https://msdn.microsoft.com/pt-br/library/4y6tbswk.aspx It is not necessary to define the DEBUG variable,…
-
1
votes1
answer436
viewsA: Check Available Space on SD Card on Android 5.1.1
I found the solution in Stackoverflow in English: https://stackoverflow.com/questions/7251793/android-absolute-location-of-external-sd-card/23744167#23744167 So I changed the method and the way I…
-
2
votes1
answer436
viewsQ: Check Available Space on SD Card on Android 5.1.1
I need to check the amount of space available on memory card, currently using this method for checking: public static float megabytesAvailable() { File f = Environment.getExternalStorageDirectory()…
-
3
votes1
answer1558
viewsA: BUG in Android Studio
I once had this problem and solved with this link from Stackoverflow in English: https://stackoverflow.com/questions/32024954/cache-properties-the-system-cannot-find-the-file-specified Access the…
android-studioanswered Julio Borges 3,178 -
5
votes2
answers652
viewsA: Android apps, what are the advantages and disadvantages of the tools?
Jedaias, I will respond based on my knowledge and what I have already developed with each technology. I believe that more people in the community can contribute to this question. I see that this…
-
4
votes2
answers708
viewsA: Code First and Calculated Fields
Unfortunately, what you want can’t be done this way, because when running a Where in the context items returns a Icollection, and in this case the data will only be brought to the application when…
-
0
votes1
answer83
viewsA: I cannot send values to Webservice . NET
Try to change the line envelope.dotNet = false; for envelope.dotNet = true; Check that the data type generated in the webservice is correct for a correct conversion when bringing the return data; I…
-
2
votes1
answer1137
viewsA: Update in Visual Studio database
In cmd7, vc does not use any parameter. OleDbCommand cmd7 = new OleDbCommand("UPDATE Item SET id_produto = (SELECT MAX(id) FROM Produto)", connect); More vc adds value to the product id_parameter:…
-
10
votes1
answer1033
viewsA: Get index back to front
Use the Lastindexof(string): string texto = "Stackoverflow em Português"; Console.WriteLine(texto.LastIndexOf(" ")); Output: 16…
-
1
votes2
answers306
viewsA: Splash Screen in Windows Form C#
Your problem needs more detail to be solved, another thing I always do when strange build problems like the one described is to follow the following steps: Check the references of third-party…
-
5
votes2
answers5645
viewsA: Remove special characters and spaces from a string?
As predicted by @Maniero, I will show the method using Regex.Replace.() replacing everything in one row, feel free to choose how you want to work: string strTexto = "(12) 3456-7890"; strTexto =…
-
5
votes1
answer923
viewsQ: Tips to improve the performance of an ASP.NET MVC site
I attended Devday 2015 and had the opportunity to participate in the Roberta Arcoverde about the architecture of Stackoverflow. I found her approach on the issue of performance interesting,…
-
3
votes2
answers2823
viewsA: How to send notification without opening the application
The ideal is to use a service using an Intentservice that checks from time to time the need to display the notification, is simple and practical. When I used my app I checked data on a Webapi to…
androidanswered Julio Borges 3,178 -
5
votes4
answers542
viewsA: Why use block using in ASP.NET MVC?
When you use the instruction using, you are telling the compiler that the resource you are using will no longer be used after the key has been closed, this ensures that the object went to the…
-
0
votes2
answers123
viewsA: Some errors on Android
The answer from @Jose Vieira Neto is also valid, but I believe the problem lies in some layout XML or even strings, Dimensions or something like that. This must be causing error in generating the…
-
6
votes4
answers595
viewsA: How to create a variable where to access its properties via string?
You can use indexers as an example of the Microsoft documentation itself (https://msdn.microsoft.com/pt-br/library/2549tw02.aspx): class Program { static void Main(string[] args) { List<Casa>…
-
0
votes2
answers109
viewsA: Questions about Fluent API relationship for EF 5
Probably your context is configured with the Lazyloading (Lazy loading) enabled. Lazyloading is used for loading related entities only when we call the mapped property. In the case of MVC this does…
-
3
votes1
answer177
viewsA: Query using LINQ and Generics C#
I believe you can not do this dynamic search using a String to get the column that will be searched. The ideal is to use the resources Expression, Func and Generics. public virtual…
-
8
votes3
answers261
viewsA: What is the advantage of using the Set<> method?
The choice between using the method Dbcontext.Set or the object Dbset instantiated in Context depends on the use and how you work with the context. The method DbContext.Set<T> returns using…
-
0
votes1
answer115
viewsA: Entity Framework and WCF navigational property
You tried to remove the virtual of the navigation property, when using the virtual, indicates that we are performing with Lazy Loading enabled. It is not very logical to use this concept in web…
-
1
votes1
answer1426
viewsA: C# App.config - Change BD address at installation time
In my applications the login screen has a Combobox where it selects between connections registered in the app.config. Next to Combobox I have a button that gives access to a screen where the person…
-
1
votes2
answers6765
viewsQ: How to create a REST service with PHP and Mysql and . htaccess
I am developing a small project, where some information should be stored in a Mysql database that is hosted in a PHP hosting, I was wondering if there is a way to develop a REST service to insert…
-
7
votes2
answers8444
viewsA: Pass generic list as parameter
You can use Generics: In a method the syntax is the following: public void FacaAlgo<T>(List<T> lista){} For a Voce class uses something like: public class Classe<T> { public void…
-
1
votes1
answer178
viewsA: Delay in the first call WCF service
The first execution usually takes longer, because when calling for the first time the WCF Channel Factory is instantiated and prepared for communication and this operation consumes considerable…
-
2
votes3
answers172
viewsA: Operator '+' can’t be Applied to operands of types 'decimal' and 'double' - Ncalc
There is no problem with the lib Ncalc, the question is that one method returns Decimal and the other returns Double. The compiler . NET does not allow operations between these two object types due…
-
0
votes1
answer428
viewsA: Fileupload returning the same file from several selected files
Use the Inputstreamdo uploadedFile object property, according to microsoft documentation this property exposes a Stream of the uploaded file, so we can use a Binaryreader to read the file bytes. if…
-
1
votes2
answers1423
viewsA: How to Put a Word File in Windows Form C#
You could use the Sandcastle to create . chm files and use the System.Windows.Forms.Help.Showhelp to open this CHM file; See an example of this Stackoverflow question in English:…
c#answered Julio Borges 3,178 -
0
votes2
answers1405
viewsA: How to remove unused Resources?
You can use the Resharper of Jetbrains, but the process is not fully automated. 1- Access the Resources.Designer.Cs class 2- Within this class there will be a Property for each resource of your…
-
2
votes1
answer163
viewsA: Doubt filter with Line, ASP NET MVC
I simulated your code in Linqpad with Lists and Enumerable and it worked correctly, probably the problem is because your query (var Criticas = from a in Db.Criticas select a;)returns a Iqueryable…
-
4
votes1
answer3472
viewsA: Unable to connect to remote server - When consuming C#webservice
The problem should be Timeout, try to configure the Timeout keys in the key bindings of the client software configuration file. <basicHttpBinding> <binding name="WebServiceSoap"…
-
6
votes2
answers3494
viewsQ: ASP NET MVC Include Url Parameter on all pages
I have an ASP NET MVC application that is multi-client and multi-user, IE, it is prepared to be used by multiple customers and each client can have multiple users. Initially the login form has the…
-
3
votes2
answers863
viewsA: Div to organize checkbox
You must be using Bootstrap, so you must use Bootstrap’s own Grid system to do the organizing work, see the link http://getbootstrap.com/examples/grid/ <div class="col-sm-9"> <div…
-
3
votes1
answer752
viewsA: How to trace routes in a C# Windows Forms application from latitude and longitude
This implementation you demonstrated may even work, only it opens the user’s browser with the mapped route. This way you don’t have a desirable control of the implementations and makes it a little…
-
2
votes1
answer519
viewsA: How to block editing of a record when it is edited by another C#user
If you’re using the Entity Framework, use Data Annotation [Concurrencycheck], which the context itself will help you handle the competition, check on…
-
2
votes1
answer170
viewsA: For the movement of a picturebox c# windows
Only with these lines of code is kind of hard to deduce, but I believe you have to test the Width of the form before making the Picturebox drive private void imagemPictureBox_MouseDown(object…
-
2
votes1
answer111
viewsA: How to delete data from one table related to another
In your entity classes, in the navigation objects, just use Data Annotation [Required], as in the example below: public class Produto { public int Id { get; set; } public string Nome { get; set; }…