Wednesday, August 19, 2009
Using dates in CAML
To get this format in c# use:
SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Today).
Now you can use it:
string StartDateForCaml = SPUtility.CreateISO8601DateTimeFromSystemDateTime(StartDate);
spQuery.Query ="<Where><Eq><fieldref name="StartDate"><value type="DateTime">StartDateForCaml </value ></Eq></Where>";
Tuesday, August 18, 2009
Using linq to get all TextBoxes with text in your form
Usually I did foreach loop ....
But why don't use the linq ??
So this way you can do it using linq.
You can see in the code how to get TextBoxes with values collection .
IEnumerable query = from p in this.Controls.OfType() where p.Text!=string.Empty select p ;
foreach (TextBox curTextBox in query)
{
//do what you need to do
}
Monday, August 17, 2009
Quick Solutions and Dumb Bosses
So how to do it??
I really don't know and I really don't care about doing things quickly.
I'm just enjoy thinking . I'm thinking about the problem even if it's take a lot of time. I don't think that my company will fill for bankruptcy if I'll think another day.
So you need just enjoy solving problems and if you don't just change you 'solving problem pattern'!!!
Do it for achieve your goals, it will be best for your company too.
Sometimes I hear that "This proble must be solved in a hour!!".
And my answer is "NO PROBLEM" even in a half hour - and I really have a solution of problem in few minutes . Is it a good solution?? NO !! But Who cares - WE NEED TO SOLVE IT QUICKLY!!!
After a six month when the company waste already 100k dollar on this solution 'THEY GOT IT'!!
But the man that asked for a quick solution he's already a DUMB BIG BOSS and now he requires a new QUICK SOLUTION ....
So I'm giving him another quick solution , because I just enjoy thinking...
Sunday, August 16, 2009
Bluffing in computer industry
They equipped with best experts in NewTechnologyShit areas. I see these marketing people with their puppy experts say : "We can do it even faster that required "
"We have a lot of specialists that would write a best software for your company" etc.
I am really sure that a most of them didn't do a home work, even they don't know what they need exactly to develop........
It's look me like PREFLOP BLUFFING in poker - you don't know what cards have your opponent, you have just two cards (and I'm sure not a best hand at table) and you are going all in(what the matter with you).
I'm advicing to this manager just relax and 'call' . You can raise just if you have a really good hand or if you have a huge stack(I'm taking about big profitable companies).
So relax, buddy!!
How to win the lottery????
Hi all, it's my first post there(even first post ever) so I want that it would be a litle funny.A few weeks ago I saw behind bulding that I'm working in a big box with advertisement :
Guess what in the box and you can win a dream vacation
As person that never gained any prize in my entire life I was really curious what will be in the box, but how I can to guess???
On the 'Box' I've seen an Url of site that you need to enter for posting the guess. So I entered to the site - it was simple flash application with couple of textboxes and button 'Submit'. As a good programmer, obviously I had fiddler always opens when I'm working. The 'Fiddler' defines in it own site as 'Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet'. Ok let's check how 'Fiddler' can help us to win the lottery :
I filled all textboxes and clicked on submit after it I opened my good friend 'Fiddler'. You can't even to imagine how I was exciting when I saw in Headers section of 'Fiddler' the url that this flash site post al my details to. The url looks like this:'http://HostName/minisite/CarCompanyName/CarModel' (sorry that I can't publish real url ,I don't want to harm guys that developed this site) . So in the 'Url' I could see either car name and car model.