For those out there wondering why I am not posting anything, I want to say that have been very busy these days writing my thesis..
I will hand it in, on Friday..
God, bless my thesis! God, You are my last hope.. :)
Wednesday, February 28, 2007
Sunday, January 14, 2007
Fun
Ίσως επειδή έχω πιει λίγο παραπάνω, ίσως επειδή δεν έχω τίποτε τρελό σε σχέση με τα κομπιούτερς και τους αριθμούς να γράψω, αποφάσισα να το ρίξω λίγο στο Α.Μ.Α.Ν.
Ακολουθούν επιλογές..
Μακράν το καλύτερο, ΟΤΕ...
Louka!
A8hnaikes pinakides
gunaikes sto timoni
logikh..
Xasame ton Pappou
Ακολουθούν επιλογές..
Μακράν το καλύτερο, ΟΤΕ...
Louka!
A8hnaikes pinakides
gunaikes sto timoni
logikh..
Xasame ton Pappou
Thursday, January 04, 2007
Response.Redirect and ThreadAbortException
Response.Redirect..
That's the method that made me anxious and nervous and pissed off..
When you have a web page(main.aspx) and you want to go to another(second.aspx), you most often use
Response.Redirect("second.aspx");
at the code of main.aspx.
Until one day your project doesn't work and you get a ThreadAbortException.
You cannot imagine the reason, unless you spend some time on the net(or read it here in advance;) ).
The problem is that Response.Redirect(url), calls the Response.End internally, which terminates the thread of the main page from the call stack. That results in this exception.
The best practice, is to use the Response.Redirect(url, false) instead of Response.Redirect(url). False, is a boolean that defines that the thread of the main page should continue to be executed and not terminated.
That's all.. Just one more parameter :)
more info here and here.
That's the method that made me anxious and nervous and pissed off..
When you have a web page(main.aspx) and you want to go to another(second.aspx), you most often use
Response.Redirect("second.aspx");
at the code of main.aspx.
Until one day your project doesn't work and you get a ThreadAbortException.
You cannot imagine the reason, unless you spend some time on the net(or read it here in advance;) ).
The problem is that Response.Redirect(url), calls the Response.End internally, which terminates the thread of the main page from the call stack. That results in this exception.
The best practice, is to use the Response.Redirect(url, false) instead of Response.Redirect(url). False, is a boolean that defines that the thread of the main page should continue to be executed and not terminated.
That's all.. Just one more parameter :)
more info here and here.
Friday, December 22, 2006
Found a job
I found a job!
I am working as software developer for EasyTime International.
I am not very good at describing, so I will let you watch a mini cartoon explaining the advantages of the use of EasyTime services.
The EasyTime software is already up and running, but it is in old asp. Now, the company decided to transfer the whole project into .Net. In order to do that, we will implement everything from the scratch. That will allow us to create a more flexible and solid system, follow and implement the requested by the customers features, have a better understanding of the total project.
One of the disadvantages of the old system is that it couldn't afford a company with more than 50 employees. With the new implementation we are going to overcome this limitation. This is very important bacause very large companies have already shown interest to the new version, before even installing the new server ;)
The company used to aim at Scandinavian customers, but lately has set up goals for Germany and England, and we are always seeking for opportunities anywhere.
I am working as software developer for EasyTime International.
I am not very good at describing, so I will let you watch a mini cartoon explaining the advantages of the use of EasyTime services.
The EasyTime software is already up and running, but it is in old asp. Now, the company decided to transfer the whole project into .Net. In order to do that, we will implement everything from the scratch. That will allow us to create a more flexible and solid system, follow and implement the requested by the customers features, have a better understanding of the total project.
One of the disadvantages of the old system is that it couldn't afford a company with more than 50 employees. With the new implementation we are going to overcome this limitation. This is very important bacause very large companies have already shown interest to the new version, before even installing the new server ;)
The company used to aim at Scandinavian customers, but lately has set up goals for Germany and England, and we are always seeking for opportunities anywhere.
Monday, December 11, 2006
Πώς να κερδίσετε 200.000€..
Ο zkeramid έβαλε ένα quiz. Μπορείτε να πάτε στο blog του και να το διαβάσετε.
Εγώ θα δώσω ένα μικρό hint.
Η "πόρτα" στην πληροφορική, δεν έχει καμία σχέση με την πόρτα του σπιτιού. Αυτό που σας νοιάζει, είναι ότι η "πόρτα" στην πληροφορική έχει σχέση με τον τρόπο επικοινωνίας υπολογιστών σε δίκτυο ή διαδίκτυο.
Όταν μιλάμε για "άνοιγμα πόρτας", μιλάμε για ρυθμίσεις που κάνουμε στον υπολογιστή μας, ώστε να του δώσουμε την δυνατότητα να ενώνεται με κάποιους υπολογιστές, με κάποια συγκεκριμένα προγράμματα, να μην αφήνει άλλα προγράμματα να συνδεθούν σε αυτόν κτλ κτλ.. Για όλα αυτά, υπάρχει κάτι στον πίνακα ελέγχου.. Κάπου εκεί κρύβονται τα 200.000€
Εγώ θα δώσω ένα μικρό hint.
Η "πόρτα" στην πληροφορική, δεν έχει καμία σχέση με την πόρτα του σπιτιού. Αυτό που σας νοιάζει, είναι ότι η "πόρτα" στην πληροφορική έχει σχέση με τον τρόπο επικοινωνίας υπολογιστών σε δίκτυο ή διαδίκτυο.
Όταν μιλάμε για "άνοιγμα πόρτας", μιλάμε για ρυθμίσεις που κάνουμε στον υπολογιστή μας, ώστε να του δώσουμε την δυνατότητα να ενώνεται με κάποιους υπολογιστές, με κάποια συγκεκριμένα προγράμματα, να μην αφήνει άλλα προγράμματα να συνδεθούν σε αυτόν κτλ κτλ.. Για όλα αυτά, υπάρχει κάτι στον πίνακα ελέγχου.. Κάπου εκεί κρύβονται τα 200.000€
Thursday, November 30, 2006
Saturday, November 25, 2006
Hacker Puzzle
A friend told me about this Hacker Puzzle and I found it interesting enough to post it..
OK, it might/probably be very easy for people of our area,
but it's worth trying..
22 levels.. Good luck..
OK, it might/probably be very easy for people of our area,
but it's worth trying..
22 levels.. Good luck..
Wednesday, November 22, 2006
PocketPC application with WebService
After spending about 2 days of my life trying to create a PocketPC application that connects with a database through WebServices, I finally made it!
The main problem was that the articles/guides/how-tos that I found on the net, where misleading me instead of helping me. The reason is that some of them didn't mention to which versions they were referring to, and persuaded me to do things that I didn't have to.. So, if you are working with Visual Studio 2005 beta 2, there are some problems that I am not going to discuss. The same goes for VS 2003. What I am using and going to talk about, is Visual studio 2005 and PocketPC 2003 Emulator.
Below I am listing the steps you need to follow and the reason for each one of them. If you don't understand much, just follow the steps and ignore the reason :)
To start with, I need to have a webservice that contains at least a method that returns a Dataset. That dataset is supposed to be filled with a Table from a database.
Then I create a PocketPC project. I add as web reference the webservice to the PocketPC project and then I call the method.. Then I try to build.. Up to here, everything looks normal. But, there are several issues..
1st. The emulator doesn't have internet by default.
The problem is that the emulator considers the device being on hand and not on it's base. What you have to do, is go to Tools->Device Emulator Manager, select "PocketPC 2003 SE Emulator", right click and select Cradle. Now, the Pocket PC device is considered connected with the pc.
But, still that's not enough. You need to download a software the will allow the sharing of your internet connection with the the PocketPC Device (Emulator). This software is freely provided by microsoft, and it is called ActiveSync.
2nd. The Emulator even though is connected to internet, cannot access the webservice.
The problem is that the webservice is running at the localhost(your pc) and your pocketpc is trying to find it at its localhost(the pocket pc).. So, the problem is that both webservice and pocketpc are trying to communicate at localhost, but each one of them mean something different when they say localhost. To fix this, you should define at your pocketpc project, that the web reference that you are using is at your ip and not at localhost. That has to be done in two places. One is the properties of the web reference, and the other one is at reference.cs (at the constructor).
Then everything should work smoothly..
Hopefully :)
The main problem was that the articles/guides/how-tos that I found on the net, where misleading me instead of helping me. The reason is that some of them didn't mention to which versions they were referring to, and persuaded me to do things that I didn't have to.. So, if you are working with Visual Studio 2005 beta 2, there are some problems that I am not going to discuss. The same goes for VS 2003. What I am using and going to talk about, is Visual studio 2005 and PocketPC 2003 Emulator.
Below I am listing the steps you need to follow and the reason for each one of them. If you don't understand much, just follow the steps and ignore the reason :)
To start with, I need to have a webservice that contains at least a method that returns a Dataset. That dataset is supposed to be filled with a Table from a database.
Then I create a PocketPC project. I add as web reference the webservice to the PocketPC project and then I call the method.. Then I try to build.. Up to here, everything looks normal. But, there are several issues..
1st. The emulator doesn't have internet by default.
The problem is that the emulator considers the device being on hand and not on it's base. What you have to do, is go to Tools->Device Emulator Manager, select "PocketPC 2003 SE Emulator", right click and select Cradle. Now, the Pocket PC device is considered connected with the pc.
But, still that's not enough. You need to download a software the will allow the sharing of your internet connection with the the PocketPC Device (Emulator). This software is freely provided by microsoft, and it is called ActiveSync.
2nd. The Emulator even though is connected to internet, cannot access the webservice.
The problem is that the webservice is running at the localhost(your pc) and your pocketpc is trying to find it at its localhost(the pocket pc).. So, the problem is that both webservice and pocketpc are trying to communicate at localhost, but each one of them mean something different when they say localhost. To fix this, you should define at your pocketpc project, that the web reference that you are using is at your ip and not at localhost. That has to be done in two places. One is the properties of the web reference, and the other one is at reference.cs (at the constructor).
Then everything should work smoothly..
Hopefully :)
Tuesday, November 21, 2006
Get Date from DateTime in SQL Server 2005
Since I spent some time searching for that and I realized that it's not easy/fast to find the solution, I post it here.
Configuration.
SQL Server 2005 with a table that contains at least a DateTime column.
What you want to do, is to check a given date('21/11/2006') with the values of the DateTime column. The problem is that the column contains DateTime (which means Date and Time) data.
This problem could occur (occurred to me) when you implement a flight booking system. You have to save the flights with DateTime because you need the time as well, but when the user searches for flights, you need to create an sql command that checks the date entered by the user with the ones in the database, an ignore the time.
So, what I used is (almost) the sql below
I recommend you to read the msdn article about the Convert function in order to understand what it's parameters do..
Configuration.
SQL Server 2005 with a table that contains at least a DateTime column.
What you want to do, is to check a given date('21/11/2006') with the values of the DateTime column. The problem is that the column contains DateTime (which means Date and Time) data.
This problem could occur (occurred to me) when you implement a flight booking system. You have to save the flights with DateTime because you need the time as well, but when the user searches for flights, you need to create an sql command that checks the date entered by the user with the ones in the database, an ignore the time.
So, what I used is (almost) the sql below
string sql = "SELECT * FROM Flight where "+
"(CONVERT(char(10), DepartureTime, 103)='" + depDate + "')";
I recommend you to read the msdn article about the Convert function in order to understand what it's parameters do..
Monday, November 20, 2006
Je Vais Bien, Ne T`En Fais Pas
This is the next movie I am going to watch..
And that's only because of this..
And because it is French..
And that's only because of this..
And because it is French..
Sunday, November 19, 2006
html pre tag
As I was trying to create the previous post, I had a small problem. I couldn't copy-paste the code from Visual Studio to the blogger and keep the formating. The problem is that html do not keep the whitespaces, which are very important to make source code legible.
So, what I did, is that I copy-pasted the code, and wrapped it with a pre tag.
What pre tag does, is forcing the browser to preserve the format of your text.
A nice example and definition could be found here, and at the html source code of my previous post :)
So, what I did, is that I copy-pasted the code, and wrapped it with a pre tag.
What pre tag does, is forcing the browser to preserve the format of your text.
A nice example and definition could be found here, and at the html source code of my previous post :)
Saturday, November 18, 2006
A simple algorithm
After Lipis's comment on my previous post about the words with shuffled letters, I thought it might be nice to post a simple algorithm for that.
The C# method below takes as argument a string and returns a string that contains the same letters but only the first and the last are guaranteed to be at the right position.
With the definition I gave, this method is almost correct.
There are some known bugs but I didn't want to make the code difficult to grasp.
Now that the code is easy to understand, I can talk about the bugs and the solutions.
1. If the word is only a letter (such as 'a'), the method returns this letter twice.
The solution is to check the length of the word given. So after initializing loop variable, write:
if (loop == 0) return word;
2. There is a possibility that the word returned is the same with the one given.
As the length of the word increases, this possibility becomes smaller. But for 4-letter words, it's 50%. What one could do, is to check if the word about to return, is the same with the one provided, and loop until they are different.
The C# method below takes as argument a string and returns a string that contains the same letters but only the first and the last are guaranteed to be at the right position.
private string shuffle(string word)
{
Random rnd = new Random();
int index;
string temp = "";
int loop = word.Length - 1;
//loop the word without the first and last letters.
for (int i = 1; i < loop; i++)
{
//get an int from 1..word.Length-1.
index = rnd.Next(1,word.Length-1);
//add the char at this index to the temp.
temp = temp + word[index];
//delete the char at this index from word.
word = word.Remove(index, 1);
}
return word[0] + temp + word[word.Length-1];
}
With the definition I gave, this method is almost correct.
There are some known bugs but I didn't want to make the code difficult to grasp.
Now that the code is easy to understand, I can talk about the bugs and the solutions.
1. If the word is only a letter (such as 'a'), the method returns this letter twice.
The solution is to check the length of the word given. So after initializing loop variable, write:
if (loop == 0) return word;
2. There is a possibility that the word returned is the same with the one given.
As the length of the word increases, this possibility becomes smaller. But for 4-letter words, it's 50%. What one could do, is to check if the word about to return, is the same with the one provided, and loop until they are different.
Subscribe to:
Posts (Atom)
