Posts by cumpadi • 1,005 points
29 posts
-
3
votes1
answer159
viewsQ: Run an Attribute constructor
How do I call the constructor of an attribute before the constructor of the decorated class? For example, I have my attribute: using System; namespace T.WinForm { public class TesteAttribute :…
-
1
votes0
answers199
viewsQ: Npgsql - Entity Framework 6 Problem
I am finding problems to use Postgresql together with Entity Framework 6. When trying to fetch data from my repository I get the following message: The context cannot be used while the model is…
-
1
votes1
answer3299
viewsQ: How to leave Activity in full screen?
I have the following Activity: I would like to remove the bars that are highlighted by the yellow rectangle: I’ve tried changing Androidmanifest.xml by adding the following line, but the application…
-
0
votes1
answer167
viewsQ: How to use a UI kit (PSD) in an Android application?
Hello! I recently came across several UI kits for Android made in Photoshop (PSD). How do I use them in my application? For example, I have this kit:…
-
2
votes1
answer80
viewsQ: Filter by group and minimum value
I have the following table: ********************************* * IdPessoa * DataVen * Observ * * 10000000 * 01/01/15 * Teste1 * * 10000001 * 01/01/15 * Teste2 * * 10000000 * 01/01/12 * Teste3 * *…
-
1
votes1
answer384
viewsQ: Highlight link from current page
I am implementing a menu in the header of my page. As the user clicks on the buttons in this menu, the page is rendered just below. I would like to highlight in the menu the button referring to the…
-
6
votes2
answers328
viewsQ: Show white space for Null value in Views
When I send some value null for my view, and Razor tries to render the value, is returned a Exception. There is a way when the view receive a value null, render this as a blank space without having…
-
1
votes1
answer557
viewsQ: Return to previous view with data filled in
I have 3 View’s, a main (Index) containing fields to perform filters and a search button, another ,Gridindex (rendered inside the Index view), where records are demonstrated based on search filters,…
-
2
votes1
answer5336
viewsQ: Detecting colors or geometric shapes of an image
Is there a framework for detecting colors or geometric shapes within a static image, such as a . jpg? Preferably for C# or java Hypothetical scenario: The framework would identify that there are 3…
-
1
votes1
answer7134
viewsQ: Error: Multi-part identifier could not be associated
I’m trying to execute the following command: SELECT * FROM pendencia, cliente LEFT JOIN servico ON pendencia.id_pendencia = servico.id_pendencia LEFT JOIN cidade ON cliente.id_cidade =…
-
0
votes1
answer216
viewsQ: How to know if a function has been called by another form?
How to know if a function has been called by another form? For example: In my Form 1, I have a method that calls another form: private void btnFormulario2_Click(object sender, EventArgs e) {…
-
1
votes2
answers2761
viewsQ: Do not display null value (01/01/0001) of a Datetime in a Datagridview
My DataGridView has some fields DateTime worthwhile null (01/01/0001). How do I do not display these values, leaving the field blank? Currently: How I’d like you to stay: I’m using WindowsForm, C#…
-
5
votes1
answer486
viewsQ: How to extract the numerical part of a monetary value?
I have a string with the characters "R$ 1,000.60" and would like to extract only the characters "1,000.60". I tried using regular expression, but I couldn’t reach my goal. I got to this: string…
-
8
votes2
answers1879
viewsQ: What are the differences between background and foreground threads?
What are the differences between these two types of threads: background and foreground?
-
6
votes4
answers1593
viewsQ: Changing connectionStrings from the app.config physically in Runtime
In my app.config I have the following lines of code: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> </configSections> <connectionStrings>…
-
4
votes4
answers313
viewsQ: Changing a random string of characters using Stringbuilder
I have the following variables:: String mascara = "12****3*59**100*"; String numero = "12345768" There is a way to replace the asterisks of my variable mask by the values of my variable number?…
-
2
votes2
answers917
viewsQ: Amount of a given character contained in a Stringbuilder
I have a Stringbuilder with these values: 12********3*4*. There is a simple way to return the amount of asterisks without having to do a go over my Stringbuilder? I’m using C# with Net Framework 3.5…
-
6
votes4
answers3435
views -
3
votes2
answers4935
viewsQ: Sort List by decreasing values
I have an object Chromosome: public List<int> Rotas { get; set; } public int ValorFitness { get; set; } And I also have a list of that object List<Cromossomo>. I’d like to sort this list…
-
2
votes1
answer376
views -
6
votes2
answers895
viewsQ: Remove "/" from a Datetime.Toshortdatestring();
I am implementing a program using C# with . net 3.5 I have the following code: StringBuilder sb = new StringBuilder(); sb.Append(caminhoSalvarCobranca); sb.Append(@"\Boleto ");…
-
1
votes1
answer293
viewsQ: Update if value does not exist
I have these two tables in the database (SQL Server) Table Banks ID CODIGO NOME 1 246 Banco ABC Brasil S.A. 2 075 Banco ABN AMRO S.A. 3 025 Banco Alfa S.A. 4 001 Banco do Brasil S.A. Table Account…
-
6
votes2
answers2883
views -
1
votes3
answers2393
viewsQ: Xmldocument Exception: hexadecimal value 0x1a, is an invalid character
I have a project that reads an XML generated by another program in which I don’t have access to the source code. The problem is that the generated XML comes with a special character at the end, and…
-
5
votes4
answers3081
viewsQ: Limit number of characters per line
It is possible to limit the number of characters per line of a textbox multiline using Windows Forms C# and . Net 3.5?
-
2
votes1
answer987
views -
1
votes3
answers5780
viewsQ: Form opening another form within a splitcontainer
I have a main form divided by a splitcontaniner. When I click on a button panel1, a form is loaded into the panel2. private void btnCadastrarConta_Click(object sender, EventArgs e) {…
-
2
votes3
answers10204
viewsQ: How to put a value that is saved in the database in a combobox?
I am using C# Windows Forms with . NET 3.5. I’ve inserted all Federation states into the property items of my combobox. When I search for a record saved from my comic book, the combobox does not…
-
7
votes2
answers4107
viewsQ: Dictionary Search
I have the following Dictionary: public static Dictionary<string, string> ObterCodigo() { return new Dictionary<string, string> { {"18", "Teste"}, {"19", "Teste"}, {"02", "AAA"}, {"03",…