Posts by Pedreiro • 278 points
9 posts
-
1
votes3
answers906
viewsA: Create file with run permission
If this is something common to you, why don’t you create a command for it and save in your Path with their bin? Kind of: echo -e "#!"`which bash`"\ntouch \$1 && chmod +x \$1" > mkscript…
-
0
votes3
answers137
viewsA: Postgresql Query - How to do this?
If Col1 is ordered, as in the example, so is SQL Server: CREATE TABLE #tmp ( ID INT, Col2 INT, Col1 Varchar(1) ) insert into #tmp (ID, Col2, Col1) Values (11, 1, 'A'), (12, 2, 'D'), (13, 3, 'G'),…
-
8
votes2
answers1152
viewsQ: How to count words from a string ignoring prepositions?
Is there any service that does the recognition if a certain type of word is a preposition? I want to make a word ranking of a rss feeder, but ignoring prepositions. Ignoring words with less than N…
-
1
votes1
answer225
viewsA: Use Itemcommand in C# of a listview
I didn’t understand 100% the process of inserting a new item you are using, but apparently it seems to me that it would be enough that during this process you change the property LabelEdit for…
-
0
votes3
answers190
viewsA: Several tables that should represent a single entity
The architecture of the services must follow the same architecture of the entities and for this you must use the polymorphism of their service objects and encapsulate only what each one needs. In…
-
2
votes2
answers1042
viewsA: Collect information from system resources
There is a specific class for this type of performance measurement: PerformanceCounter (System.Diagnostics) - Msdn - Performancecouter Class…
-
1
votes3
answers844
viewsA: Comparison of >= and <= with strings
From what I understand, I believe you’re looking for the most readable solution. In that case it would declare the date format and make the comparison by the method DateTime.ParseExact: string…
-
2
votes2
answers428
viewsA: How to remove the option selected in multiple Comboboxes?
Assuming you have three combos in your form with the names of comboBox1, comboBox2, comboBox3. Make sure the code below meets you. Note that in the example I do not use the DataSource and so I have…
-
0
votes2
answers1506
viewsA: Compare date time with a timespan
Check the CAST of the variable p.DataFimAssitencia.Value, 'cause you must be getting a date and losing the team. A simple test with the values you passed shows that the output is as expected.…