A simple video player with my own play, pause, stop, forward, backward and play list functions. All these things are present in the windows media player and I want to hide them, in order to provide my own functionality.
This world is going to explode due to international politics, SOON.
hello to everybody
i have a class that it name is diver and another class that i called it time.driver has a property iset. i use entity framework for connect to my database.now i want to add an object time to time property of driver.=>add to Driver.time
but when i fill the time and i want to show it to the datagrid it show the count of time in datagrid .where is my problem
this is my query code.
<c#>
C#
stringvalue = DriverStatusGridView.Rows[DriverStatusGridView.CurrentRow.Index].Cells[2].Value.ToString();
var SearchTime = (from Search in Context.Drivers
where (Search.InternationalCode == value)
select Search.Time).ToList();
TimeGridView.DataSource = SearchTime;
I would like to know. Is it only me or your are also spending more time in config files than really writing code with .NET. I really hate this framework because of that.
It's not a framework that is made for developer with a good logical mind that like coding. To master this framework you need memory first and be able to manage the config files first.
For one day of development on my machine I need 3 days to configure everything on the production server. The code always works fine on my machine. I never get such problem with other languages.
Sounds interesting. I had never that problem. I'm working on a web application out for 5 years and made no changes to the config file for ages...
It's true that at the beginning I spend about 3 hours to fine tuning everything, but nothing since then...
You better get us into the details so we may spot the problem and help you out...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
I usually only set database information in the config file, the rest goes in the database.
I define it as key/value pairs, but also include "category" and/or machine/module information to be able to filter the necessary.
In addition you could add a "user" filter for settings that a user can change.
I also add a description on what the key/value pair is for.
my two cents.
PS: web services/WCF remain a major drag in this...
i'm write an listen connection (connection to Sql server database) application(APP):
if connection is not available (connection cable is unpluged or broken), my APP will sleep, until the connection is available,my APP will wake up and execute SLQ commands. if connection is broken again, my APP continue going to sleep until connection is available...
please explain for me or give me some key word about that problem.
thanks!
Note: i think i need to understand a listen mechanism that similar to mechanism of MessageQueue.Receive() method. but i still don't understand this mechanism
If I understood your question correctly, why not create a loop which would
- loop while connection is established or other wait end condition is met
- define proper timeout [^]
- try to open[^] the connection
- if not successful, sleep[^] for awhile
the first, thanks for your answer!
i think if we use while loop, the performance is not very high.
now i am reading Simple Network Status Monitor Example[^].
if you have any about this topic's document. please send to me!
thanks so much!
"the quick ${var1:a=b,c=d,e=f} brown fox ${var2:g=h,i=j,k=l}"
var1,var2 is a "variable"
a=b is considered a "parameter".
I can have any number of variables in the input string
I can have from 0 to any parameters (i.e. ${var1} is allowed)
My end result is I want to split as:
var1|a|b|c|d|e|f for the first match
var2|g|h|i|j|k|l for the 2nd match
The regex I'm using is:
\${([A-Za-z]+)(: ([A-Za-z]+)=([A-Za-z0-9]+)(,([A-Za-z]+)=([A-Za-z0-9]+))*)*} <=== NO SPACE after the colon (preventing smiley)
Right now I'm getting:
var1|a|b|e|f (and a few other groups I don't care about), but for discussion, the full split is: |var1|:a=b,c=d,e=f|a|b|,e=f|e|f
The problem is, it's grouping a&b and e&f, but its skipping c&d for some reason... if I add a 4th parameter, now it skips e&f too. I.e. it only shows the FIRST and LAST param.
Hmm... apparently, what I'm seeing is "expected" behavior. Standard regex behavior is to only keep the last group. I think that's insane and apparently so did the .Net folks as they have the only regex engine which keeps all capture groups. Thanks!
The .Net regex engine is "special" as it's the only regex engine in the known universe that doesn't throw away intermediate captures. If you look at the Group object that captured the last occurrence of the group in question, there is a Captures property. They give you the intermediate captures in that collection.
(aB)* will match aBaB, but it will only give you 1 aB. If you look in the Captures property, it'll give you the 2 you are after.
((aB)*) will match aBaB, but it will still only give you 1 aB. It will also give you aBaB which is not what you really want.