|
... and i think that's quite the purpose of the lounge...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hi
please suggest me
where to put Infopath Programming ques - for help
thanks
thanks
ss
|
|
|
|
|
Hello,
Disclaimer: I hope this is the right place to ask my questions; I didn't think this would quite fit in the lounge.
I am interested in submitting an article to the CodeProject. I have just finished the article and I have a couple questions before I submit it.
1. How do I make sure that the article stays on the CodeProject and no one else copies my work and says it is their own?
2. In top of the article I have put in my email (Step #1). Will my email be visible for other people/spambots to see? Or is it only used by the admin, editors, etc. of CodeProject?
3. Is my biography hard-coded into the article, or does it change when I change my biography in my personal settings?
Thanks,
Programmer2k4
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
Most recent blog post: March 24
|
|
|
|
|
1. You own copyright on your article so anyone else trying to repost your article is braching copyright.
2. No one else will see your email. We're very careful about that.
3. Your bio is taken from your profile - it's not part of the article and is updated whenever you update your profile bio.
cheers,
Chris Maunder
|
|
|
|
|
Programmer2k4 wrote:
How do I make sure that the article stays on the CodeProject and no one else copies my work and says it is their own?
As Chris said, you own the copyright. There is a copyright notice at the bottom of the page. However, it has been known on the odd occasion for someone's article to appear somewhere else. Vigilant CP members will often report to the author if they saw the article somewhere else to help fight copyright infringement. (It's a great community here!) And something I've started to do is to write at the bottom of the article exactly where you will find authorised versions of the article. For example, at the bottom of my most recent article (http://www.codeproject.com/cs/database/SqlInjectionAttacks.asp[^]) is a separate copyright notice and a list of sites where you will find the article. In this case it is here on Code Project, Scottish Developers and my blog. So, if a CP member recognises my work somewhere else they can see if I intended to publish it there or not.
Also, If I ever want to do anything with an article I find on Code Project I always ask the author permission through the article's message board and I always attribute other's work.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Just thought that it would be nice to see the search feature updated a bit. For example, when searching for articles, when I uncheck various languages at the top, results from those should not be included.
Here is an explanation of what I have encountered.
I'm working with Visual C++, so I don't want info about any of the other languages. I run a search for "radio button" and the first option that shows up is a C# article. What is the purpose of the language selection options if they aren't used?
|
|
|
|
|
What you are seeing are the articles in the book chapters section which are treated as 'general reading' and not attached to any specific category. This will be improved in the future.
cheers,
Chris Maunder
|
|
|
|
|
it would be cool to gave the forum posts in our own time , and i think you can doit without any server intervention.
you can provide a way to configure time zone in the profile , and then show the time acording using only client side script
servers would not feel a thing
|
|
|
|
|
Not to speak for Chris, but if you wrote and supplied the script to him I am sure it would get done faster. If you wait for Chris to write it he will just put it on his TODO list and we could be waiting awhile.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
OK then... here it is:
<br />
function ConvertTZ(msgDate)<br />
{<br />
date = new Date(msgDate);<br />
date.setHours(date.getHours()-serverTZ+userTZ);
<br />
d = date.getDate();<br />
m = (date.getMonth()+1);<br />
h = date.getHours();<br />
m = date.getMinutes();<br />
<br />
sDate = ((h<10)?"0"+h:h)+":"+((m<10)?"0"+m:m)+" "+((d<10)?"0"+d:d)+"-"+((m<10)?"0"+m:m)+"-"+date.getFullYear(); <br />
document.write(sDate);<br />
}
and this can be called like this
<td><br />
<script>ConvertTZ("<%=Now%>")</script><br />
</td>
it can be tested here : http://xwega.com/codeproject/timezone.asp[^]
will Chris see this post?
|
|
|
|
|
It would be cool to somehow determine time zone from IP addres or browser settings... or something.
Just a thought.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Close, but not quite. I am sure it is just typos but what is m supposed to be, month or minute? Also the month is displayed as three letters, not a two digit number. Also I agree with David, you should get the local timezone from the local machine, not from the user's profile. Just one less thing for the server to do.
[edit]
Also, not all time zones are full hours off of UTC. Newfoundland is -3.5.
[/edit]
[edit2]
Do not forget about daylight savings.
This is going to be more difficult then spending two minutes to slap together a small script. But keep working at it, it is avery good idea.
[/edit2]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
the first "bug's" are solved
look here http://xwega.com/codeproject/timezone.asp[^]
PJ Arends wrote:
Also, not all time zones are full hours off of UTC. Newfoundland is -3.5.
i think this is done also , because now i'm usin the get getTimezoneOffset() that return the value in minutes and calculating the correct time using minutes instead of hours
PJ Arends wrote:
Do not forget about daylight savings
Any idea on how to calculate this?
|
|
|
|
|
I dont need to think of time zones or even daylight saving...
All i need is to get the date diff from server and client and apply that date diff to the date in question.
function ConvertTime(svrdate,anydate)<br />
{<br />
clientDate = new Date();<br />
serverDate = new Date(svrdate);<br />
date = new Date(anydate);<br />
<br />
datediff = (clientDate.valueOf()-serverDate.valueOf())/1000/60;
date.setMinutes(date.getMinutes()+datediff);
<br />
h = date.getHours();<br />
n = date.getMinutes();<br />
sTime = h+":"+((n<10)?"0"+n:n)+" ";<br />
sDate = new String(date.toUTCString());<br />
sDate = sDate.substr(5,6); <br />
sDate+=" '"+(String(date.getFullYear()).substr(2,2));<br />
sTime+=sDate;<br />
document.write(sTime);<br />
}<br />
<br />
<script>ConvertTime("<%=Now%>","03-25-2005 17:06")</script>
http://xwega.com/codeproject/timezone.asp[^]
|
|
|
|
|
Looks good, but make sure you test it with a bunch of different dates (ie over new years, leap years, etc) to make sure all the bugs are out. Then maybe email it directly to Chris and see if he wants to go through the effort of integrating it.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Wow, looks very good. I appreciate the effort you put into this
Nish
|
|
|
|
|
thank you.
Very nice to ear it.
Any chance this end up on the CodeProject boards some day?
|
|
|
|
|
Max Santos wrote:
you can provide a way to configure time zone in the profile
That already exists, in fact Chris put that setting there just for the purpose you suggest. But since I see you're working on some script, I wanted to point out that the user's time zone is already available.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
done !
i have reworked the script. thing is done, can you give it a try?.
I dont need to think of time zones or even daylight saving...
All i need is to get the date diff from server and client and apply that date diff to the date in question.
<br />
function ConvertTime(svrdate,anydate)<br />
{<br />
clientDate = new Date();<br />
serverDate = new Date(svrdate);<br />
date = new Date(anydate);<br />
<br />
datediff = (clientDate.valueOf()-serverDate.valueOf())/1000/60;
date.setMinutes(date.getMinutes()+datediff);
<br />
d = date.getDate();<br />
m = date.getMonth()+1;<br />
h = date.getHours();<br />
n = date.getMinutes();<br />
sTime = h+":"+((n<10)?"0"+n:n)+" ";<br />
sDate = new String(date.toUTCString());<br />
sDate = sDate.substr(5,6); <br />
sDate+=" '"+(String(date.getFullYear()).substr(2,2));<br />
sTime+=sDate;<br />
document.write(sTime);<br />
}<br />
<br />
<script>ConvertTime("<%=Now%>","03-25-2005 17:06")</script>
http://xwega.com/codeproject/timezone.asp[^]
|
|
|
|
|
The timezone is already inplace in the profile but updating the timestamp everywhere in the site where a time is displayed hasn't been done because there are other items I feel a more important.
It's far, far easier simply to calculate an offset based on the reader's timezone and the server's timezone and then do
DateTime RelativeDate = AbsoluteDate.AddHours(Offset);
return RelativeDate.ToShortTimeString();
cheers,
Chris Maunder
|
|
|
|
|
i started to make a script using timezons ,but a very big problem came up (lightsaving).
Chris Maunder wrote:
simply to calculate an offset based on the reader's
yes it is , but you can do it all on the client side, less for the servers to do.
and in case you did not take a look at my previus posts on this thread here it is:
and one optimization can be made:
istead of sending the servertime to the function everytime , you can declare it inside the fuction, avoiding to much calls to "Now" on the server.
function ConvertTime(svrdate,anydate)<br />
{<br />
clientDate = new Date();<br />
serverDate = new Date(svrdate);<br />
date = new Date(anydate);<br />
<br />
datediff = (clientDate.valueOf()-serverDate.valueOf())/1000/60;
date.setMinutes(date.getMinutes()+datediff);
<br />
h = date.getHours();<br />
n = date.getMinutes();<br />
sTime = h+":"+((n<10)?"0"+n:n)+" ";<br />
sDate = new String(date.toUTCString());<br />
sDate = sDate.substr(5,6); <br />
sDate+=" '"+(String(date.getFullYear()).substr(2,2));<br />
sTime+=sDate;<br />
document.write(sTime);<br />
}<br />
<br />
<script>ConvertTime("<%=Now%>","03-25-2005 17:06")</script>
it works:
http://xwega.com/codeproject/timezone.asp[^]
|
|
|
|
|
Why not displaying the server clock with javascript?
There could be multiple settings, e.g. a digital clock or analog clock.
Don't try it, just do it!
|
|
|
|
|
Heyas Chris and all the SiteBuilders,
Is there anyway to put the Currently Online count on the front page?
Just a thought
Thanks,
John
|
|
|
|
|
Open the forum and have a look at top right, then you will see it
Don't try it, just do it!
|
|
|
|
|
Okay CodeProject - I want:
coffee cups with the cool little alien guy (CLAG(tm)... gal? hard to
tell
I want some decent hats with the CLAG.
I want some t-shirts - quality t-shirts - with the CLAG and some
kind of catchy phrase. For example, I have a t-shirt from
Code Warrior - "Blood, Sweat, and Code."
Did I miss something on the web site?
C. Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
|
|
|
|