« first day (656 days earlier)      last day (4307 days later) » 

12:00 AM
@SleeperSmith I'm re-writing it in MVC
Or at least I'm going to try. I'm a DBA not a .NET programmer
 
From what I've seen so far. People who doesn't understand WebForm makes a horrendous mess at it. People who doesn't understand MVC tend to not make such a horrendous mess. It's still a mess, but the execution path is a lot more linear.
MVC is good fun. I write everything in MVC.
 
I've done the SportsStore tutorial from APress Pro ASP.NET MVC 3 Framework book. The first time going WTF?! quite a few times. The second time pretty much just skimming it. So I think I have an 'okay' handle on it. Just nervous that the next time I create a new project in VS it's for real!
Right now what I'm trying to get my head around is creating the domain model. Everything I've read says that's the most important part, and the most difficult
 
Well, one other consideration is LightSwitch, since you are a DBA. Even if you not going to use it, it's worth a glance. Basically it generates a complete web app from a DB Schema without having to write a single line of code. I see a lot of sense in that thing.
 
Thing is... There is no DB schema. It's always been done on a paper form... I know, it's 2012 and it's still done on a paper form???? WTF!
 
ROFL
Just a word of advise, this sort of project can sometimes turn into nightmare if you dunno how to say no.
at start it's just an inocent "paper form -> electronic form"
then "oh can we have approval"
"oh can we have permission"
"Oh can we have notification"
 
12:10 AM
I'm a DBA. I know how to say No 8]
 
"oh can we have report"
lol
the list grows on and on and on... (yeah been there few too many times >.>)
 
For right now. There is no scope creep (guess that really does exist). I've only agreed to write the thing so they can enter the inspection online and have 5 different reports. Period. Any additional functionality is going to require a check/cash/deposit in my account
 
lol. good luck. and have fun with mvc. Really think it's the best thing ever happened to asp.net. Working with sharepoint/aspx makes me want to kill myself.
 
I love the MVC framework. Just wish I knew more about it... Right now I have to take care of my Dad at nights so I don't even have much time to research it. Thankfully work has been great and allows me to spend time on my books/tutorials during work
 
12:33 AM
Hows everyone doing
 
Just bought 4 books... so I'm doing GREAT! :)
 
;)
Im waiting for some fried rice, oh yeah!
 
I'm cooking beer brats :P
 
oh darn, that actually sounds pretty good.
so, those 4 books. What topic/s
 
C# of course :)
 
12:37 AM
nicee!
 
Is one of them, the rest are from the same publisher
 
That one looks pretty good, hmm
maybe i will get a copy, good topics!
 
I want to find another MVC one but haven't found anything that looks good... yet...
 
I may get flame for this but i will ask anyways ;) i consider myself, probably an intermediate programmer. I've taken courses, practiced on my own over and over again with various languages (C++, VB, C#, PHP, JAVA) but i never seem to get past a certain point.. It seems to me that i stop, move to another languange when i start to get comfortable with a language.... I dont know, i feel that i'm not getting anywhere lol..
ive been doing this on and off since 2004
go figure lol
 
I'm the same way and I've been doing this since 1996. Though I have been a DBA since 1997 I dabble in all languages I find interesting
I'm actually thinking of trying to get back to programming and drop being a DBA
 
12:43 AM
the deal is, i dont feel like i know any of them good enough to apply for a position. Maybe im just chicken lol!
 
I'm good at recognizing patterns so I always end up getting sucked into DBA positions. But frankly being a DBA is boring... it's the pay that keeps me coming back
God I LOVE Amazon! My Wife is a HUGE reader so we have the prime membership and I'm getting 4 Programming books for 110 bucks and no shipping costs. 110 bucks would buy you 2 books at the bookstore
I actually think I'm going to try and read the 4 that I got before I try to tackle C# In Depth by the C# God...
 
Amazon is great Grixxly, do you have the Prime memebership?
membership*
LOL
u said it right there , thats what happens when i dont read the whole paragraph!
 
My Wife does. She linked my account so I get it too
 
Its tempting to go for overnight shipping for just $4.00
 
It is, but I'm still in the middle of the book I'm on now, so no point. I couldn't get to them anyway
 
12:58 AM
Yeah good point
bit off topic, i managed to get my hands on the Nexus 7, loving this device! its one heck of a tablet.
 
Since I've started this MVC C# stuff I have let my SQL reading go to crap... and get this... I don't feel bad about it lol
 
haha ;) lol
 
I cant remember the name of it, but the new windows tablet that's supposed to be coming out, with the full kernel... ME WANT!!!! :)
 
Surface ;)
 
YES!
 
1:00 AM
i know, it looks very nice!
veryy nice
So this may be a silly and possibly not easy to answer question lol -- When do you know your ready?? I mean, i'm coding, i can do applications perfectly fine and they work fine.. They may not be the best method of accomplishing the task but they run lol. In the real world, when they ask you to work on a project will they look down on you if you research syntax? For example, if i can't seem to remember how to write up a recursive function, will that be consider a sin :P?
 
1:15 AM
@Intrus Every single person I know that is in IT is grateful that google doesn't charge by the search. If it works; you are ready.
 
@Grixxly Lol! Thanks Grixxly
 
The only people that remember every syntax are aliens. So yes, Jon Skeet is an alien
 
is Jon Skeet a big star on this forum?
 
oh boy
 
Hi guys. I had to join the room now to ask you one thing.
 
1:22 AM
lol okay
i'll answer everything
 
Do you guys know a way to create a report and print out of that report without crystal ?
Unfortunately SAP hasn't released crystal for vs2012
 
yeah you want to use that thingamabob
@Andredseixas doesn't love me anymore :(
 
@Steve Who said that ? I still love you. No homo.
But... do you know any tool for vs 2012 to make a report and be able to print or maybe save the file?
 
i have a response to that, but i dont want to get flagged :(
i don't know, i've never done it before. i'm guessing you already tried googling it
 
The best I could get was PDFSharp. And I wasn't happy with the result.
 
1:27 AM
and crystal reports doesn't work on vs2012?
 
No, SAP hasn't release a version compatible.
And I'm not wiling to use 2010 just to have a headache using crystal
 
oh
you program in abap?
 
No. But SAP bought Crystal Reports
Ops
 
oh really
i didn't know that lol
man i'm bored
 
And I'm going to sleep now.
22:39 now
 
1:40 AM
gnight man
 
1:56 AM
hi guys
 
are these chats for also asking questions? or just idling
i have a list and objects in it. i want to call the constructor, if the objectis removed from the list.(the object has a few forms, they need to be killed (my constructor would do that))
 
@huanson Both.
 
@k
@kendalfrey with beep function. cool
 
@huanson The constructor is only called when creating a new object.
 
2:01 AM
sry, i mean destructor
 
No, you don't want to call the destructor.
 
sounds weired for me
how can i kill the form?
 
As a rule of thumb, destructors should only be called when you have unmanaged resources to clean up. For example, handles obtained from Win32 API calls.
Instead, you probably want the IDisposable pattern.
 
wait, i check that
 
You call Dispose when you are done with the object, and perform appropriate cleanup in there.
I'm looking for a good resource on code coverage in unit tests. Does anyone know of a good site/blog?
 
2:06 AM
i need to tell the object, that im done with it?
 
Yes.
If you don't, it won't know when to clean up.
 
so thats the trick
then its the same constellation like now
i thought that there are maybe callbacks
(im a rails developer, there is for everything a callback and a nice rails-way)
 
You could do it with callbacks, but that would just be nasty.
 
i can make an internal timer in the object and check if it still has something to observe, if not, it knows by hisself that its dead.
is that a good way?
 
The garbage collector will handle clean up of managed objects
you only really need to worry if you're using something unmanaged
 
2:09 AM
i just want to close the form :)
 
Probably not. You should notify the object.
 
winforms?
 
ofc form.close. but how to call the form.close.
2 variants:
the instance checks itself if it should kill his form
or
while its removed out of the list, i tell the instance to kill the form
 
Are you using the List<T> class?
 
public class PokerTable {
private PokerTableHud HUD; // this is my form popsup
class PokerTableList : IList<PokerTable> {

private List<PokerTable> _list = new List<PokerTable>();
//....runtime
PokerTableList PokerTables = new PokerTableList()
 
2:15 AM
if you're implementing IList
 
A custom list? Perfect. This means you know when an item is being removed, regardless of how it's removed.
 
PokerTables.remove(table)
 
in the Remove Function, close the form
then remove it
 
in the list i have



public void RemoveClosedTables() {
_list.RemoveAll(TableActivePredicate);
}

private static bool TableActivePredicate(PokerTable table) {
return !table.HasHandle;
}
 
So, in your Remove function, call Dispose on your PokerTable.
 
2:15 AM
PokerTables.RemoveClosedTables(); // kill dead tables
 
You will also need to make PokerTable implement IDisposable.
 
so in the predicate function i kill it?
 
Close your form in Dispose.
You don't need to ask the table if it's active. You just need to tell it when it is deactivated.
 
private static bool TableActivePredicate(PokerTable table) {
if(!table.HasHandle) {
table.dispose();
return true;
}
return false;
}
taht would work?
i will try
 
I think something like this would be better:
 
2:18 AM
public void Dispose() {
HUD.Close();
}

nothing else to do with the form?
 
// In the PokerTable class
public void Remove(PokerTable item)
{
    _list.Remove(item);
    item.Dispose();
}
And that dispose method looks correct.
You don't need any of that predicate stuff.
 
i can also make it in the HasHandle.

public bool HasHandle {
get {
try {
Graphics.FromHwnd(handle);
return true;
} catch {
HasHandle = false;
return false;
}
}
private set { has_handle = value; }
}
the catchblock checks if the handle to the table is still active. so there i could bring in the dispose method.
 
What is your HasHandle used for?
 
HasHandle checks if the widow, which is observed, is still active
(its a window of a foreign application)
 
You should never need to check that.
You should activate the window at the start, and destroy it in Dispose.
 
2:21 AM
works :D
no, i need to check that
 
Or are you letting the user close the window manually?
 
yes
i am building a tool to observe pokertables, for onlinepokerplayers
 
And what should happen when they do?
 
if they close the pokertable, my observer is closed too
 
Removed from the list?
 
2:22 AM
yip
 
Hmm. So, naively, we close the window, which removes it from the list, which tries to close it again, causing an exception.
 
its working
no exception
 
So, your question is answered?
 
Graphics.FromHwnd(handle);
thats throws an exception, if the user closed the pokertable
but then i know that i need to close the observer
yes it is
working good
 
Good. Go forth and conquer.
 
2:25 AM
thanks a lot!
@kendalfrey :)
 
Good night everyone.
 
2:42 AM
or a better idea is:
the form itself checks, if the observer still has something to observe ?
or is that crap idea :D
when i create the observer, and the observer creates the form, then the observer give the form an refernce of itself, so the form can check data from the belonging observer and the observer dont need to do everything
now i killed my PC :D
need to restard
re
 
3:43 AM
now i crashed my aplication. good job
 
4:11 AM
my observer creates an own FileSystemWatcher.
to create an observer, it takes >1second. without the filesystemwatcher its <10ms
so if i start my programm and there are 20 observers to create, my programm almost crash.

why is the filesystemwatcher so superslow to initialize? can i tune it up?

my old way was: one filesystemwatcher and depending on the changed file, tell the observer that its file was changed
should i switch back?
 
hi guys
need help with regex
string input = @"@str is a #str is a [str] is a &str";
Regex re = new Regex(@"[@&#\[]*str\b", RegexOptions.IgnoreCase | RegexOptions.Compiled);
string newString = re.Replace(input, "my string");
basically replacing @str is a #str is a [str] is a &str to my string is a my string is a my string is a my string
but im unable to replace ']' character
tried this string pattern = @"[@&#[]]*str\b" ; but nothing
 
\]
 
i tried..no effect
string input = @"@str is a #str is a [str] is a &str";

string pattern = @"[@&#\[\]]*str\b" ;
Regex re = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
string newString = re.Replace(input, "my string");
 
wait. you application gets "@str is a #str is a [str] is a &str"
and what should it replace?
 
yes right
with 'my string'
 
4:19 AM
so he is replacing nothing, cuz "my string" doent match
 
no input is input = @"@str is a #str is a [str] is a &str";
 
and replace is ?
 
replace is 'mystring'
 
string newstring = Regex.Replace(input, @"[a-zA-Z \$\']", "");

thats how i use the replacer
what outcome do you expact?
 
i get output as - my string is a my string is a my string] is a my string
 
4:22 AM
you want to replace all @&#[]str with your input
 
notice in output ']' is not replaced
yes exactly
 
i will test. wait
 
sure
 
the regex is wrong
you just match \] in front of str
not after str
wait a sec
string pattern = @"([@&#[]])*str([]])*";
thats working
pls escape it, the chat here is killing escapes
 
ah wait
confused
 
4:31 AM
nothing to confuse
you tested it?
you check just for the chars in front of str but you also have str] which is unchecked
 
can u put % whr slashes are needed
 
wait
string pattern = @"([@&#\[\]])*str([\]])*";
there you go
 
nice that works
thanks a lot
one more thing :D
what it i want any words to be replaced
[a-zA-z] will work instead on str ?
becos like 'str' i have few other strings .. str1,str2 etc but special chars remain same
special chars @#$%[]{}
 
well, again please
you want to make a replacer?
 
same as above
but i have number of 'str' ..i dont want to write a pattern for all
 
4:40 AM
for sure its possible
 
@str1 #str1 etc
 
instead of str
(str|str1|str2)+
should work
thats an or operator for that rule, and the + says it needs to be there once
string pattern = @"([@&#\[\]])+(str|str2|asd|asd)+([\]])*";
try that
 
[a-zA-Z] wont work?
 
for sure its working
\w == a-zA-Z
 
it will stop at space?
@str is a #str .. \w replaces 'is' 'a' too ..
 
4:46 AM
\w stands for "word character", usually [A-Za-z0-9_]. Notice the inclusion of the underscore and digits.
ah ok
ya, capsel it again
 
hmm?
 
@"(([@&#[\]])+([A-Za-z])+([\]])*)"
check it
just brackets around again, for beeing one rule
shoudl work. untested
 
parse error
nested +
nope replaces 'is' 'a' too
 
@"(([@&#[\]])([A-Za-z])([\]])*)"
maybe?
wait, we do it wrong
@str is a #str is a [str] is a &str

the character+word should be replaced. we are doing it little bit wrong i thin
it must me
 
oh ok
 
4:51 AM
(([@#\[]+)([a-zA-Z])*(\])*)
how about that?
 
amazing
 
its easy. just spell lout to yourself what you want to do
 
u r great at regex
:)
 
you want to replace something, which starts sit @#[, followed by text, and can have an finishing ]
so thats the rule.
so now write it down
starts with @#[ => ([@#\\[)
followed by text=>([a-zA-Z])
and optional closing bracket=>([\\]])*
easy game ;)
 
hehe i will make it more complex
what if each 'word' has separte 'replacer'?
str replaced by my string
str1 replaced by mystringg
etc
 
5:00 AM
more regexxes
 
think will need capturing groups
 
yip
that would me cost also time, do develop that :P
and im pretty busy. sry bro
 
nah its ok :)
this will make a good question on SO :)
 
last 3 hours, i did 2 questions
and answered 5 minutes later by myself. lol
 
lol
 
5:17 AM
are you firm with c# and winapi?
 
 
1 hour later…
6:20 AM
not much im afraid
 
6:44 AM
anyone here?
help
i would like to pass in a mousemove event into my mutlithreading
how would i do that?
 
7:12 AM
@Andredseixas @Amitd
@Amitd , hello any one there
@All , crystal report load issue . any suggestions required
@Baboon crystal report load failure plz help
@Nican plz help crystal repot load failure
@E.LDunn , crystal report load failure issue
@huanson , crystal report load failure issue
 
@itechnician crystal report?
load
what happen??
 
@RyanFung More info?
 
 
2 hours later…
8:56 AM
hey, having a problem. I have a solution with multiple projects, but i want to use one app.config, log4net.config for all of them
so i dont need to keep 6 up to sync...
currently im having app.config and log4net.config in the startup project and "add existing file..., add as link"
to make them available to the other projects, but doesnt work :/
 
you don't need to do that
the only app.config really needed is the one in the project that makes the .exe
you can simply delete other app.config, they're useless anyway
 
9:12 AM
hi Guys
anyone know how about the implementation of .net polymorphism
virtual call...
 
 
1 hour later…
10:31 AM
@Baboon the reason why i need this is becuase, it will be a service which will run this in the end, but im debuging with an extra console application, and also the unit test project needs it to run
they all run separately depending on what i want to do
unit test, or debug with console, or actually run the service
 
10:57 AM
@user1033098 ??? explain more?
 
@user1033098 that's a very wide question: if you ask it like that it's obvious you didn't do any research beforehand
and nobody will answer you
 
@Baboon see my answer to your answer :)
 
11:14 AM
'sup, guyz :D
 
11:41 AM
what up @crazyname
 
I'm eating and waiting for my White Collar serie to download :)
and also I am looking for something in google before I ask here :)
 
haha word. i'm wrapping up a production deployment
good series.
 
what is p.d.? :)
 
p.d.?
where did you see that?
 
I am the newbiest newbie here :)
product deployment
is p.d. :)
 
11:43 AM
ah. you mean the production deployment that i'm doing?
 
yep
 
dev teams typically have several different environments. "dev", "qa", "staging", and "production"
where "production" is the live application
 
aaaaaaaaaaaa
now I get it :)
 
think of stackoverflow.com and the "production" environment where actual end users visit
 
I told you - I am newbie in c# dev and every term comes as in a foreign language :D
 
11:49 AM
no worries. everybody has to start somewhere!
 
yep..... but I jumped into the deep :)
 
hahah! good for you! i did the same thing
 
аnd you are at the P.D. stage while I search the internet for a solution :D
 
make no mistake about it. i still search the internet and use SO all the time!
 
I am affraid to ask in SO :)
that's why I have to charm the experienced developers here
:)
 
11:54 AM
SO = StackOverflow
hahaha indeed charming always helps!
 

« first day (656 days earlier)      last day (4307 days later) »