Posts by Omni • 6,077 points
132 posts
-
3
votes1
answer119
viewsA: C# Manualresetevent
In the event that the ManualResetEvent is being used as a signal flag so that the method Connect(...) return only after the link has been established. Given that it has the ManualResetEvent to block…
-
35
votes4
answers25411
viewsA: What is addiction injection?
This SOEN response deserves to be translated and left here as reference: How to explain addiction injection to a 5-year-old boy? When you go to the refrigerator (fridge, in pt_BR) to get something…
-
3
votes1
answer416
viewsA: Sslstream - Certificate
Yes you can use SSLStream even if it is not a web server, i.e, you can use it when establishing an TCP connection between a server and a client. You can generate your own certificate with Openssl…
-
3
votes1
answer210
viewsA: Object instantiation failure: only the first is created
Your problem is on this call: while (true) { socket = serverSocket.accept(); new Thread(new ListenerSocket(socket)).start(); } Not only serverSocket.accept() is a synchronous call as there is no…
-
2
votes1
answer3120
viewsA: Validate field in VBA
(the following reply relates to this editing) Assuming you are receiving data on TextBox can use the function Len to determine the size of a string: tamanhoEsperado = 9 ' Tamanho do número esperado…
-
1
votes1
answer154
viewsA: Connect VB6 to Msaccess
Your connection function should be: Private Sub conexao() Set T = creatobject("adodb.connection") Set c = creatobject("adodb.recordset") connString = microsoft.jet.oledb.4.0;datasource = " +…
-
1
votes1
answer54
viewsA: Add items to a dropdown control connected to a database
In his dropdownlist, change the property AppendDataBoundItems for True. The items you now add via Edit Items... will appear along with comic items.…
-
3
votes1
answer1373
viewsA: Get Headertext from a column in a Gridview
The following code returns the name of the cell column i (according to your comment //I need to get the column title value): string produ = GridView1.HeaderRow.Cells[i].Text; or an alternative form:…
-
4
votes2
answers1552
viewsA: Clause in with lambda
An alternative to the method in the @Gypsy: List<int> inteirosParaAchar = new List<int> { 1, 2, 3, 4 }; context.Where(i => inteirosParaAchar.Any(i1 => i1 == i)); For the reasons…
-
1
votes1
answer153
viewsA: Access denied when using MS Syncframework
Concerning the error Most likely IIS is trying to load one of the Syncframework libraries that is not installed on the server. Try installing/reinstalling redistributable on the server (x86/x64…
-
6
votes2
answers3113
viewsA: How to pick a random string from a list of strings?
If the collection where strings are accessible by You can always do: var rand = new Random(); // Caso seja um array var nextRandString = rand.Next(0, tamanhoArray -1); // Caso seja uma lista var…
-
3
votes1
answer93
viewsA: Call Variable for php file name
He’s missing a point before xls: $arquivo = 'Empresa Não Autorizada ' . $row[1] . '.xls';
-
3
votes1
answer7678
viewsA: How to make a function within a function return a vector?
In C it is not possible to pass an array directly as a result of a function. You will have to return a pointer to the created array. Example: int* DevolveArray() { int arrayExemplo[5]; return…
-
9
votes2
answers3065
viewsA: Mysql Nicknames in Inner Join
You can only use column references for your apelidos (alias) in the following clauses: GROUP BY ORDER BY HAVING (Mysql documentation) So in your case your query would have to reference the columns…
-
6
votes2
answers895
viewsA: Remove "/" from a Datetime.Toshortdatestring();
You can do it as follows: sb.Append(boleto.Boleto.DataVencimento.ToString("ddMMaaaa"); In this way, the ToString("...") format the date in the desired format and avoid manipulating strings already…
-
1
votes1
answer202
viewsA: Create a subroutine in VB6
Assuming you have a collection of letters you want to duplicate, a way to write the subroutine will be: Private Sub CommandButton1_Click() Dim alfabeto As New Collection ' Colecção que vai receber o…
visual-basic-6answered Omni 6,077 -
0
votes4
answers1399
viewsA: Databases for different customers
A solution to your problem is to assign each customer one connection string that points to the comic book that belongs to him. When the user enters, you can refer to connection string user and for…
-
1
votes1
answer54
viewsA: Method does not act as expected
The problem I found in your code was in the method AttCmbB(...). Accessing the Selecteditem property as it is, returns null because at this point the selection has not been made yet (we are inside…
-
0
votes3
answers335
viewsA: Repeater Onitemcommand event does not work
Add return false after the if no OnClientClick. That is to say: OnClientClick="if (!confirm('Confirma a exclusão desta imagem?')) return false;"> Edit: After several suggestions, the OP found…
-
5
votes5
answers1054
viewsA: Contains in Class List
With regard to . Contains() The method .Contains() of List<T> has a peculiarity that is to use the comparator returned by Equalitycomparer.default. According to the documentation: The Default…
-
10
votes4
answers2855
viewsA: How to merge multiple text files into one?
The error in your code is due to this condition: for (int i = 0; i <= stringArray.Count(); i++) should be for (int i = 0; i < stringArray.Count(); i++) As it is, in the last iteration, when i…
-
3
votes1
answer54
viewsA: Msbuild Multi-proc
Does the process running Msbuild have write permissions on this path? Try running as an administrator and see the result. Another reason may be that two projects are trying to write the same file…
team-foundation-serveranswered Omni 6,077 -
4
votes2
answers1331
viewsA: When to record logs in database?
(the question is somewhat broad and the answers will depend on the experience of each). If you have the opportunity, log in the comic book: Makes it easier to manipulate data; It is simple to clean…
-
11
votes5
answers2270
viewsA: Using unused affect performance?
They do not affect the performance of the program, but nevertheless may affect the performance of code analysis tools. In addition, leaving usings that are not being used increases the difficulty of…
-
6
votes2
answers1406
viewsA: Change registry key values Windows
Yes, it is possible. In C#: using (RegistryKey key = Registry.LocalMachine.OpenSubKey("oMeuCaminho")) { if (key != null) key.SetValue("nomeDaMinhaChave", "valorDaMinhaChave",…
-
7
votes1
answer623
viewsA: cloud9-Problem executing code
There is an error in your printf. It should be printf("O valor de num = %d e o valor seguinte = %d",num,num+1); As before, with %c, the printf would display the ASCII character corresponding to the…
-
8
votes1
answer17765
viewsA: Fill Data Grid View with object property
Its problem is due to the fact that Datagridview, when the Textbox is popular, invokes the . Tostring() method of the objects that make it popular. Hence the solution found consists of overriding .…
-
9
votes2
answers2225
viewsA: Compile string as code
A possible solution is to use Codedom. An example of how to use: public static void Main(string[] args) { var csc = new CSharpCodeProvider(); var parameters = new CompilerParameters(new[]…
-
2
votes4
answers4106
views -
4
votes1
answer473
viewsA: Dreamspark License - Can I use on more than one machine?
From what I understand of EULA can install on both computers since they are yours and are for academic purposes only. From what I understood in the continuation of the research, as in an MSDN…
-
3
votes1
answer280
viewsA: C# Union/Order by with LINQ and Performance
Query There are two possibilities. In the title refers to Union (that is, without repeated elements if they exist), so assuming the use of the operator the query would be: var classes =…
-
2
votes2
answers247
viewsA: Updating treeview
The answer may be somewhat vague but it seems that the problem may lie in the fact that WebTreeView.ClearTreeView(treeMenu.Nodes); not clean Treeview properly. Since items are added to Tree again,…