Well I might be silly, but I had not run-up to this one yet. Until just now:
You cannot change the accessibility level of a class member by means of hiding when inheriting from a generic type.
Consider this example. A simple console application using two classes: MyList inherits from List<int> and My2ndList inherits from MyList. Generic type List<T> has a public method named Add that is not declared as virtual.
My intention was to completely hide the base implementation of the Add method in my derived class. In other words, let's assume that I want MyList class to not expose an Add method. What one would normally do in this case, would be to hide the method by using the new modifier and changing its access modifier from public to private like I tried to do in line 32 of the code snippet that follows.
Well. Guess what. This does not work if you are inheriting from a Generic Type. Try the code bellow then try to play around with the access modifiers in lines 32 and 47. Although I would normally assume that the code bellow would not even compile, it does!
1: using System;
2: using System.Collections.Generic;
3: using System.Text;
4:
5: namespace TestGenerics
6: {
7: class Program
8: {
9: static void Main(string[] args)
10: {
11: MyList myList = new MyList();
12: myList.Add(1);
13: myList.Add(2);
14: myList.Add(3);
15:
16: myList.Print();
17:
18: Console.WriteLine("Now the 2nd List");
19:
20: My2ndList my2ndList = new My2ndList();
21: my2ndList.Add(1);
22: my2ndList.Add(2);
23: my2ndList.Add(3);
24:
25: my2ndList.Print();
26: }
27:
28: }
29:
30: public class MyList : List<int>
31: {
32: new private void Add(int item)
33: {
34: item *= 10;
35: base.Add(item);
36: }
37:
38: public void Print()
39: {
40: foreach (int item in this)
41: Console.WriteLine(item.ToString());
42: }
43: }
44:
45: public class My2ndList : MyList
46: {
47: new private void Add(int item)
48: {
49: item *= 100;
50: base.Add(item);
51: }
52: }
53: }
So why am I posting about this?
Well... I didn't come across any comments on the subject on the Internet for the little I looked around and I thought it was an interesting thing to talk about.
If you know of any links discussing the subject and explaining the internals of the compiler or generics implementation in C#, then by all means please do leave a comment to this post.
If you'd like to copy/paste the code above then go get it here.
Ok! Here is a new thing I discovered yet again the hard way...
In short: Do not call Page.ClientScript.RegisterOnSubmitStatement after the Page Load event.
(What?!)
Well yes! It's not under all circumstances that you can notice the difference but it's there and it's major!
I do not really wan to describe this, so I 'll take you though it with an example:
Let's say you have an aspx page. The page has two controls in it. For simplicity lets make those controls UserControls. The controls are pretty simple: just a TextBox and a RequiredFieldValidator in each of them.
So there you have it:
Control A (let's call it OnSubmitControlA):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OnSubmitControlA.ascx.cs" Inherits="OnSubmitControlA" %>
<asp:TextBox ID="TextBox1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator" />
and the code file:
public partial class OnSubmitControlA : System.Web.UI.UserControl
{
protected override void OnPreRender(EventArgs e)
{
Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomething", "alert('This alert is registered by OnSubmitControlA');");
base.OnPreRender(e);
}
}
Control B (let's call it OnSubmitControlB):
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OnSubmitControlB.ascx.cs" Inherits="OnSubmitControlB" %>
<asp:TextBox ID="TextBox1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RequiredFieldValidator" />
and the code file:
public partial class OnSubmitControlB : System.Web.UI.UserControl
{
protected override void OnPreRender(EventArgs e)
{
Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomethingElse", "alert('This alert is registered by OnSubmitControlB');");
base.OnPreRender(e);
}
}
And finally the page itself:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OnSubmitTest.aspx.cs" Inherits="OnSubmitTest" %>
<%@ Register src="OnSubmitControlA.ascx" TagName="OnSubmitControlA" TagPrefix="uc1" %>
<%@ Register src="OnSubmitControlB.ascx" TagName="OnSubmitControlB" TagPrefix="uc2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<uc1:OnSubmitControlA ID="OnSubmitControlA1" runat="server" />
<uc2:OnSubmitControlB ID="OnSubmitControlB1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
</body>
</html>
(the codefile has nothing special in it...)
The page has of course a submit button so that we can submit and test it...
So! What we have here!?
- A Page,
- two controls that wan to access client-side code just before the page submits (for no particular reason)
- and at least a Validator Control that will fail validation at some point. (If we did not have a validator then I would not have a case here!)
Now go render the page an see the result. If you leave either TextBox empty and click on the submit button, you will notice that only the alert from the first control pop's up. The other registered script is never called....
Now go back and make a slight change. Move in both contols' codefile the call to Page.ClientScript.RegisterOnSubmitStatement from OnPreRender to OnLoad, like this:
public partial class OnSubmitControlA : System.Web.UI.UserControl
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomething", "alert('This alert is registered by OnSubmitControlA');");
}
protected override void OnPreRender(EventArgs e)
{
// Let's comment this out
// Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomething", "alert('This alert is registered by OnSubmitControlA');");
base.OnPreRender(e);
}
}
do the same on the other control:
public partial class OnSubmitControlB : System.Web.UI.UserControl
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomethingElse", "alert('This alert is registered by OnSubmitControlB');");
}
protected override void OnPreRender(EventArgs e)
{
// Let's comment this out also
// Page.ClientScript.RegisterOnSubmitStatement(this.GetType(), "DoingSomethingElse", "alert('This alert is registered by OnSubmitControlB');");
base.OnPreRender(e);
}
}
Done! Go back and render the page! Leave either TextBox empty and click submit... See??? Now both alerts pop up!!!
Why is that???
Well look at the source of the rendered page before and after the change to see what' going on:
Here is the script rendered when the call to RegisterOnSubmitStatement is placed in the OnPreRender event:
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
alert('This is registered by OnSubmitControlA');
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false)
return false;
alert('This is registered by OnSubmitControlB');
return true;
}
// -->
</script>
And here is the script rendered when the call to RegisterOnSubmitStatement is placed in the OnLoad event:
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
alert('This is registered by OnSubmitControlA');
alert('This is registered by OnSubmitControlB');
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false)
return false;
return true;
}
// -->
</script>
Got it?
If RegisterOnSubmitStatement is called after OnLoad, then the first time it's called the framework appends the statement that calls ValidatorOnSubmit() and returns false if it fails; (effectively blocking the rest of the script from executing). Subsequent calls of RegisterOnSubmitStatement (after OnLoad) are appended to the script generated by the first call (and get blocked by the effect I just described).
Instead, if all your calls to RegisterOnSubmitStatement come before the end of the OnLoad phase, then all registered scripts are appended to previously generated scripts before the eventual injection of the call to ValidatorOnSubmit().
Hoping for comments on this...
I discovered today (the hard way), that we can no longer use xsl:include and xsl:import elements in XSL Transformations for Windows SharePoint Services 3.0 XML WebParts.
Along with those msxml:script is also blocked.
I am going to investigate this further and see if there is an administrative way to bypass this security restriction. XSLT code reuse is a useful thing and I want to keep it as an option in some environments.
Anyhow...
I am including two relevant links I found on the web:
I would appreciate comments from people who know more on the subject.
Κάνω copy/paste από το http://www.innovation2006.gr/ τα αποτελέσματα της πρώτης φάσης του διαγωνισμού της OTEnet με στόχο να συλλέξω μερικά σχόλιά σας. Στον διαγωνισμό υποβλήθηκαν 2.622 προτάσεις, 48 από τις οποίες προκρίθηκαν στην Β' Φάση.
Όσοι πιστοί προσέλθετε!
(σ.σ: μια από τις προτάσεις που πέρασαν στην Β' φάση έχω υποβάλει κι εγώ μαζί με δύο φίλους/συνεργάτες και καθώς ο διαγωνισμός είναι σε εξέλιξη, θα είμαι λίγο φειδωλός στα δικά μου σχόλια).
Αποτελέσματα Α' Φάσης
Στην κατηγορία ''Εφευρετικότητα'' προκρίθηκαν 20 προτάσεις + 2 που ισοψήφησαν :
-
Εξατομικευμένη πληροφόρηση μέσω RSS και 'Collaborative Filtering'
-
Μέθοδος πληρωμής τελών κυκλοφορίας με τη χρήση προπληρωμένης κάρτας
-
De.dalici.usWeb: Καινοτόμα Υπηρεσία Παγκόσμιου Ιστού (Web Service) για την αποτελεσματικότερη ανάπτυξη του e-business στην Ελλάδα και στα νεοεισερχόμενα μέλη της Ευρωπαϊκής Ένωσης.
-
Αυτόματο Παρατηρητήριο Τιμών Πρατηρίων Υγρών Καυσίμων
-
Υποστήριξη χρηστών αστικών μέσων μαζικής μεταφοράς με διαδικτυακών υπηρεσιών μέσω κινητών τηλεφώνων.
-
News Monitoring - NeMo
-
Shopbot
-
Ανάπτυξη διαδικτυακής υπηρεσίας για τη διαχείριση και διάθεση χωρικής και αντικειμενοστραφούς πληροφορίας σε φορητές συσκευές.
-
Agoratherapy.eu/.gr/.com Ιδιωτικό Παρατηρητήριο τιμών
-
AllergyON: Ένα φορητό διαδικτυακό σύστημα υποβοήθησης ανθρώπων με αλλεργία
-
Δημιουργία portal με θέμα τον κινηματογράφο στο ασύρματο Internet
-
MashUp καθημερινότητας
-
e-ΚΕΠ (ΚΕΠ_to_the_Home)
-
Προϊόντα για ασφάλεια διαδικτύου και εφαρμογών
-
Τώρα επιτέλους έχεις την δύναμη να αλλάξεις τον πλανήτη!
-
uGlue
-
Δημιουργία Διεθνούς Μοναδικού Κωδικού Αναγνωρίσεως Πραγματικών Αντικειμένων (ISROIC = International Standard Real Object Identification Code) και ετικέτας σήμανσης αυτών.
-
RateIt
-
Meetme@Blue
-
ΠΡΟΓΡΑΜΜΑ “ΞΕΝΑΓΟΣ INTERNET”
-
ΚΙΝΗΤΟ ΤΗΛΕΦΩΝΟ (PDA)-ΗΛΕΚΤΡΟΚΑΡΔΙΟΓΡΑΦΟΣ ΜΕ ΔΥΝΑΤΟΤΗΤΑ ΑΣΥΡΜΑΤΗΣ ΕΥΡΥΖΩΝΙΚΗΣ ΑΠΟΣΤΟΛΗΣ ΤΩΝ ΔΕΔΟΜΕΝΩΝ ΜΕΣΩ ΔΙΚΤΥΩΝ ΚΙΝΗΤΗΣ ΤΗΛΕΦΩΝΙΑΣ ΣΕ ΚΕΝΤΡΟ ΕΠΕΙΓΟΥΣΑΣ ΠΡΟΝΟΣΟΚΟΜΕΙΑΚΗΣ ΦΡΟΝΤΙΔΑΣ.
-
PROMIS - PROactive Malware Identification System
Στην κατηγορία ''Επιχειρηματική Δραστηριότητα'' προκρίθηκαν 20 προτάσεις + 6 που ισοψήφησαν :
-
LowerCost - Λύσεις για μείωση κόστους της παροχής υπηρεσιών μέσω Internet
-
Μέθοδος διανομής διαφημίσεων στο internet από τους ISPs με βάση την γεωγραφική τοποθεσία των συνδρομητών τους.
-
Υπηρεσία e-Τηλεμετρίας για Δημόσιους και Αναπτυξιακούς Φορείς Παροχής Υπηρεσιών
-
www.eventUally.com: ΗΛΕΚΤΡΟΝΙΚΟ ΕΡΓΑΛΕΙΟ ΟΡΓΑΝΩΣΗΣ ΕΚΔΗΛΩΣΕΩΝ
-
myGarden
-
Εμπορική επιχείρηση διακίνησης «Κυματομορφικού (PCM) συστήματος», το οποίο διασφαλίζει την απόρρητη διαμεταγωγή ηχητικών δεδομένων (PCM) στο διαδίκτυο.
-
Εταιρεία Ανάπτυξης Ψηφιακών Παρατηρητηρίων Δια Βίου Μάθησης (Digital Observatories of Life Long Learning – DOL3)
-
Ηλεκτρονική αγορά (Travel e-Marketplace TeM-Β2Β) ταξιδιωτικών υπηρεσιών για επιχειρήσεις
-
ΥπερΚάρτα (HyperCard) – hypercard.gr
-
Εικονικές λίστες μουσικής (Virtual Playlists)
-
Οικολογική διάθεση περιττών αντικειμένων για το κοινωνικό όφελος.
-
Διαδικτυακό Σύστημα Βέλτιστης Διαχείρισης Ενέργειας και Ενεργειακών Πόρων
-
SHIPPING PORTAL COMPANY
-
«To WiDAC μέσα από το Internet» - Όταν το αξιόπιστο Hardware συναντά το πολυλειτουργικό Software στο Internet… τα πάντα είναι «υπό έλεγχο» και από οπουδήποτε…
-
Proximity marketing μέσω Wi-Fi hotspots
-
INTBrowser: Ο φυλλομετρητής που κρίνει και προτείνει
-
ΟΤΕΝΕΤ -Υπηρεσία Ψηφιακών Ενδείξεων. ή OTENET Web Based Meter Reading Co. για ξένες χώρες.
-
Προσομοίωση τεχνικών έργων και διαδραστική παρέμβαση των χρηστών σε αυτά μέσω internet
-
Greek rooms deals…Got game?
-
Αυτόματο σύστημα τηλεοπτικών μετρήσεων και δημοσκοπήσεων μέσω Διαδικτύου
-
Διαδικτυακή πώληση-τροποποίηση συμβολαίων ασφαλειών και άλλες επιχειρησιακές λειτουργίες
-
Δημιουργία εταιρίας παροχής υπηρεσιών υποστήριξης και εκπαίδευσης σχετικά με την ευχρηστία διαδικτύων τόπων και εφαρμογών
-
24ωρη παρακολούθηση της υγείας και της παραγωγής των ζώων κτηνοτροφικών μονάδων με χρήση του Internet
-
e-copyright.gr / Ελληνικος Δικτυακος τοπος κατοχυρωσης της Πνευματικης Ιδιοκτησιας
-
'Ενας για όλους, αλλά και ΟΛΟΙ ΓΙΑ ΕΝΑΝ!
-
Rent A Hand - Έυρεση συνεργατών (outsourcing)
Quick Tip:
CommunityServer 2.1 uses TinyMCE as a rich text editor. They use what appears to be a wrapper to TinyMCE: CommunityServer.Controls.Editor. As I am developing an application on top of CS 2.1 I am using the same rich text editor and encountered the following problem:
I was setting declaratively the Height Property of the Editor control, but it could not retain it's value after postbacks.
Look at the ASPX part:
<%@ Register Assembly="CommunityServer.Controls" Namespace="CommunityServer.Controls" TagPrefix="CS" %>
<CS:Editor ID="edtNotes" runat="server" Height="160px" />
So far so good but, after a postback the Editor control returned to its default height (messing-up my layout).
To make a long story short, it figured that something is wrong either with timing or with implementation. I mean that either the wrapper, or the wrapped control do not assign the value of Height before ViewState is saved, or they assign it to either a Property that is not saved in view state, or during an Event that fires before LoadViewState.
So what I did to work-around the issue was just disable ViewState in the Editor control.
<CS:Editor ID="edtNotes" runat="server" Height="160px" EnableViewState="false" />
The problem has gone away and that means that LoadViewState was overwriting my value.
I did not devote any time in looking further into this matter so I'm just posting this work-around, but if I do, I 'll let you know the details.
Situation:
You use SQL 2000 Reporting Services, to create a report (probably same applies for SQL 2005, but I have not tried it yet).
You report expects various parameters but the user does not need to specify all of them through the user interface. For example the value of a parameter (say ParamB) can be calculated based on the value of another parameter (say ParamA) that the user selects.
So, you want to hide ParamB from the user.
Solution:
In the Report Parameters Collection Editor select the parameter that you want to hide and clear its “Prompt” field. Then add a Default Value to it (either by using an expression or by using a query).
Quick Tip:
Notice that when you use a query to get the default value of the hidden parameter ParamB you can always pass to it the Value that the user selected for ParamA (or another parameter).
As I was developing applications for .Net Framework 1.0 and 1.1, I was building a couple of code libraries with features I found smart and useful for my apps.
Being an active member of dotNetZone.gr, (a Greek .net developer community often nicknamed DNZ), I recently decided to share some of that code with others in DNZ.
The idea was to do that while porting the code to .Net Framework 2.0 through Visual Studio 2005.
Now, what’s so funny about that?
First thing I wanted to share was my Wizard classes. I implemented them in the context of a web project and used to find them brilliant.
Using SourceSafe Ι started today pinning and branching code to a new VS 2005 solution that would contain the part of my libraries related to Wizards.
“Come on! Where is the funny part?” you would still ask!
Well I compiled it and got the following compile time errors:
- Error1: 'Wizard' is an ambiguous reference between 'System.Web.UI.WebControls.Wizard' and 'Softbone.Shared.Wizards.Wizard'
- Error 2: 'WizardStep' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStep' and 'Softbone.Shared.Wizards.WizardStep'
- Error 3 'WizardStepCollection' is an ambiguous reference between 'System.Web.UI.WebControls.WizardStepCollection' and 'Softbone.Shared.Wizards.WizardStepCollection'
(note: Softbone is brand name I am using, and Softbone.Shared is the namespace of the shared code library I am creating porting my code from .net framework 1.1 to 2.0).
Ooops!
Not only Microsoft implemented the same functionality as I did, but the just happened to have chosen the same class names as I did!
Well that, I thought was funny enough to mention…
So, it might be the case that my library is obsolete with the new version of the .Net Framework, but still, here is what is more interesting about it now than ever: I have to check my implementation against Microsoft’s one to see where mine falls short or even if I did some things that are better or smarter than Microsoft’s.
So I will be posting my code soon to my main blog and my .net blog in DNZ and keep you posted here, to see if I have more interesting or funny encounters during my Wizard Library porting to .Net Framework 2.0.
I ‘ll let you know….
Το site μου (www.rousso.gr) καθώς και το κύριο blog μου (blog.rousso.gr) θα είναι προσωρινά offline από την Παρασκευή 4 Νοεμβρίου το απόγευμα μέχρι το απόγευμα της Κυριακής 6 Νοεμβρίου λόγω μετακόμισης του Data Center που τα φιλοξενεί σε άλλο κτήριο.
Σύντροφοι, έχω φύγει....
Πάω να παντρευτώ (το Σάββατο 17 Σεπτέμβρη).... Και καπάκι ταξιδάκι (γεροί να είμαστε).
Τα λέμε ξανά τον άλλο μήνα...
Happy DNZing 2U all in the meantime...
Και μη νομίσετε... θα επανέλθω με περισσότερη όρεξη και περισσότερο χρόνο για computerάδικες τρελίτσες...
Talk 2 U all soon...
rousso
Remember my recent blog entry about Netscape 8 excitement???
Remember I told you that the good news was that you can switch to IE engine with a click from within Netscape 8?
Well… here is the first bad news:
- Go find a site with a textarea control to fill in.
- Then switch Netscape to use the IE engine.
- Try to enter text in the textarea field. While doing that, try
switching the active language (from Greek to English in my case). You
know; by pressing Alt-Shift.
- Well, there goes the focus out of the control! Unless you
pick up the mouse and move the focus back in, you will not be able to
continue typing from where you left off.
The “bug” does not appear in textboxes (<input type=text>). Just textareas (<textarea></textarea>)….
Try to participate on a forum (i.e: a CS based forum), where
you need toy change language frequently while you are typing… Hopeless…
Now I am wondering… Who’s “bug” is this Netscape’s or IE’s engine's???
We ‘ll see…
There are also a number of other issues I ran into from time to time
(most related to IE engine's usage by Netscape. For instance try to hit
the back button to return to a page with Greek Encoding. Page encoding
does not always get applied resulting in an unreadable page you need to
refresh. Probably this does not have to do with ISO-8859-7 (Greek) or
Windows-1253 (Greek also) encodings only.
So far, although cool, the ability of Netscape 8 to try to function
like IE (I suppose by using the browser control) is not that useful all
the time...
In my time -believe it or not– I ‘ve seen far more Java Apps crash than Windows Apps (when running on Windows of course)..
Nevertheless here is a little Java Application that not only never crashed on me but is also very useful:
It will scan your hard drive and tell you the size of every folder in very graphical colorful an useful way.
The guys who make it work mainly on Java UI design projects (with Swing), and probably built this app as an attraction to their cause.
It’s the best in its class (to my opinion). Go get it!
|
|
Since IE 4, my use of Netscape started to decline. After IE 5 I
hardly ever used Netscape Navigator. It was not even installed on my
computer. I just had it installed in a test machine to
verify DHTML compliance with it whenever needed.
Until today!
I downloaded and installed Netscape 8 and discovered that apart from
a nice browsing experience, Netscape now offers the ability to switch
to the IE engine whenever wanted or needed.
Well that’s it! I now have Firefox and IE all in one: Netscape 8.
I am still excited with it and use it all the time. If things change I ‘ll let you know!
Till then, I suggest you try it yourself…
Reading a recent post in dotNetZone.gr I decided to implement as a proof-of-concept an algorithm using regular expressions to convert a decimal numeral representing an amount of money, to a verbal from in Greek text.
So to make it more obvious the problem was to convert 1,234,567.89 Euros to the string "One Million, Two Hundred Thirty Four, Five Hundred Sixtyseven Euros and Eightynine Cents" (only that the text should be in Greek and not English as I typed here to make the concept clear for everyone).
The algorithm I came up with is not the best that I could do but is enough as a proof of concept. Do not be alarmed if it seems too long at first glance. It's just the code comments that make it so long.
So to find the algorithm:
“Καινούργιο μου καλάθι και που να σε κρεμάσω…” λένε στο χωριό μου….
Μαντέψτε τι αγόρασα σήμερα με 1200 ευρώπουλα….
Ένα Sony Vaio VGN-A297 XP…
Processor Intel Centrino Mobile 1.8 GHz
Memory 512MB DDR
Hard Drive 80GB
Graphics ATI Mobility Radeon 9700 64MB
Screen Size 17" TFT Wide Screen
Sound On Board Sound Blaster Compatible
Floppy Drive N
Other drive DVD-R/CD-RW writer combo
Modem Y
Network card Y
Other hardware Wireless LAN, BlueTooth, FireWire Port, 3 x USB
Operating system Windows XP Professional
Other software
Warranty 1 year return-to-base
Not bad for €1.200!
(Θα του βάλω άλλα 512 MB RAM βέβαια, αλλά πόσο να κάνουν;)
Έτσι θα έχω πλέον ένα φορητό σπίτι για το VS.NET και το VSS μου….
με ‘γειά μου!
Προβληματίζομαι όμως…
Θέλω να βάλω Windows 2003 Server αλλά δεν μπορώ να το πάρω εύκολα απόφαση…
Για development με βολεύει πολύ αλλά έχω δύο drawbacks: δεν θα παίζουν τα “καλούδια” της Sony (που δεν ξέρω ακόμα να μου είναι απαραίτητα) και επίσης άμα με πιάσει σε κανένα ταξίδι να παίξω κανένα παιχνιδάκι (ένα Rome Total War ας πούμε) ή όποτε θελήσω να το χρησιμοποιήσω εν είδη media center στο σπίτι, δεν θα είναι το κατάλληλότερο για τη δουλειά…
Άσε που θα γκρινιάζει και η Sony αν μου προκύψει θέμα εγκύησης (ω μη γέννητω)..
Οπότε προς το παρόν το σκέφτομαι… Μάλλον όμως θα το κρατήσω μερικές μέρες με το XP κι αφού το τσεκάρω ότι δουλεύει θα του βάλω το Win 2003 Server με το εταιρικό VLK και βλέπουμε… Θα το αποφασίσω στην πράξη αφού δεν μπορώ στη θεωρία…
Περιέργεια…
Όποιος ξέρει τι συμβολίζει αυτό και που μου ήρθε να το βάλω σαν avatar… ας αφήσει ένα comment σ΄αυτό το post…
και στα αγγλικά:
—
I use the symbol depicted above as an avatar in DNZ. If you know where this symbol comes from or what it means please leave a comment to this post…
Just curious…
Για να μην χαθούν στα βάθη του χρόνου και της λήθης αποφάσισα να βάλω εδώ links σε κάποια posts που έχω κάνει στο forum του DNZ που ενώ θεωρώ σημαντικά, δεν έχω προς το παρόν πάρει κάποια απάντηση.
Για δείτε τα και έχετε το νου σας… Επαναλαμβάνω ότι θεωρώ ότι έχουν ενδιαφέρον…
Here is a solution for an issue I run into today.
Issue:
In VS.NET 2003 I tried to use the "Copy Project" feature to copy (deploy) the files required to run a web application to another web server. Nevertheless I got an error saying (more or less): ..."error occurred while copying the project" ... "Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services".
Context:
I was evaluating Community Server 1.1 and I had a full source installation on my Windows XP workstation altering bits and pieces to customize the application. I had previously installed a binary installation of the same product to my Windows 2003 Web Server.
Reactions:
First I made sure ASP.NET was running on my remote web server. Just to be on the safe side I even run aspnet_regiis -i, but it did not fix the problem. I had never encountered an issue like that so I googled for it. I found similar problems but all had solutions I had already tried with no luck. So mine had to be different.
Solution:
I figured out what was wrong when I tried to find out what my VS.NET was doing on my workstation to determine the ASP.NET version on my remote web server. It turned out that VS.NET did an HTTP request to
http://MyRemoteWebSrver/MyApplication/get_aspx_ver.aspx.
This file (an actual ASPX page named get_aspx_ver.aspx) does not exist so the server returns the well known "resource not found" error page. But ASP.NET in that default error page, returns the .NET Framework version information which is in turn used by VS.NET to verify version information. Silly but true!
Now! The problem was that Community Server by default had defined Custom Error Pages. So suddenly it occurred to me and here is what I did to solve the problem:
I went to my remote web server, and added the following lines to the web.config of my application:
<location path="get_aspx_ver.aspx">
<system.web>
<customErrors mode="Off" />
</system.web>
</location>
Solved!
P.S: I also added the same lines to the web.config in my workstation since I was about to overwrite the web.config on the server. Remember I was originally trying to copy the files needed to run the project from my workstation to the web server using Copy Project feature of VS.NET.
I run into an issue today regarding Community Server 1.1 (CS 1.1).
I changed the default language in communityServer.config from en-US to el-GR, only to get a runtime error.
The change:
<Core defaultLanguage="el-GR" … >
The error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Source Error:
Line 49: message = FindControl("Message") as Literal; Line 50: if(message != null) Line 51: message.Text = string.Format(ResourceManager.GetString("DisplayUserWelcome_AlternateUserWelcome"), CSContext.Current.SiteSettings.SiteName);
|
Source File: C:\Documents and Settings\rousso\My Documents\Visual Studio Projects\CS\1.1\50615src\src\Controls\User\AnonymousUserControl.cs Line: 51
Stack Trace:
[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.] System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) +1232 System.String.Format(IFormatProvider provider, String format, Object[] args) +65 System.String.Format(String format, Object arg0) +47 CommunityServer.Controls.AnonymousUserControl.AttachChildControls() CommunityServer.Controls.TemplatedWebControl.CreateChildControls() System.Web.UI.Control.EnsureChildControls() +100 ... System.Web.UI.Control.PreRenderRecursiveInternal() +125 System.Web.UI.Page.ProcessRequestMain() +1499
|
After meddling around a a little bit I pin pointed the problem to a translation error.
I turns out that the Greek language resource files located in /Languages/el-GR/Resources.xml were not properly (if at all) converted to reflect changes in code between version 1.0 and 1.1 of CS.
This line was the problem:
<resource name="DisplayUserWelcome_AlternateUserWelcome">Καλώς ορίσατε στο {0} {1}</resource>
There, two String.Format arguments are obviously expected. On the other hand, line 51 of AnonymousUserControl.cs, only passes one (see source error above).
Removing the second placeholder from the format string solves the problem:
<resource name="DisplayUserWelcome_AlternateUserWelcome">Καλώς ορίσατε στο {0}</resource>
The same stands for fr-FR (French) language resources I checked. Probably for others too.
If you can read Greek see my relevant posts in dotnetzone.gr. Also if you are looking to solve the same problem for the Greek (Hellenic) language see these posts in dotnetzone.gr where you can get the corrected translation for Greek text and buttons (it is attached to the post).
The problem seemed to be the name of my blog…
as soon as I manually changed the name in dasBlog’s site.Config from ‘rousso’s .net blog’ to plain ‘rousso’, CS blog accepted my crossposts…
solved!
I wanted to test w.Bloggar and BlogJet today for posting in a CS 1.1 blog. MetaBlogAPI comes as a separate download from CS 1.1 so I tried to find and get it. Believe me I had a real hard time!
After an hour or so of googling around for it, a friend from dotnetzone.gr finally pointed me to it.
Here it is:
http://www.telligentsystems.com/Solutions/license.aspx?File=cs_1.1_metablog
If you need it, go get it…
The other versions found in various posts in communityserver.org/forums are usually older versions and will just give you a "Method not found: System.Collections.ArrayList COmmunityServer.Blogs.Components.Weblogs.GetWebLogs(CommunityServer.ComponentsUser, Boolean, Boolean, Boolean). (EGetRecentError)" error message.
I wish they had a more standard place for it on the web than just a form post…
I seem to have a problem cross-posting from dasBlog…
Can’t figure it out yet…
This is a “hello world” (test) posting to my new blog via BlogJet!
How about that?!
Next posting is going to be a cross-posting test from my main blog….
—-
This is an edit with blogJet. If you read this line, then edits with blogJet work!
Incredible article on Javascript!
I have been programming Object Oriented languages for a very long time (since OO Turbo-Pascal in late 80’s). The truth is that I myself had probably misunderstood JavaScript. Why? Two sets of reasons: a) all those reasons described in the article mentioned bellow, b) as a result of a I devoted no time in studying it.
Well, better late than never: From now on I am going to think twice when I need a piece of functionality on the client.
Do read this article by Douglas Crockford:
JavaScript - The World's Most Misunderstood Programming Language
P.S. Don’t miss in the article above the link to the code for inheritance in JavaScript. I am not going thought the cons of JavaScript here but in the pros compare it to inheritance models supported by C# and Java.
BTW: What do you think of multiple inheritance. We used to be able to use it in the C++ days (C++ is still around but anyway). Do you miss it in C# or Java? (I mean multiple inheritance of classes not interfaces i.e. class c inherits class a and class b. In C# and Java you can inherit form max one class and implement as many interfaces as required. But of course interfaces do not include base implementations…).
Also: Can you give me your best example where you really missed multiple inheritance?