mark I thomas

Ranch Hand
+ Follow
since Apr 07, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mark I thomas

Bear Bibeault wrote:I would assume that you're handling login on the server, so it'd make the most sense to generate the cookie after the user has been authenticated. You are also protecting traffic with SSL, right?



yes, login should be handled on server after authenticating. OK, so I get it, should create cookies on server.
7 years ago

Bear Bibeault wrote:Cookies



Should cookies be generated directly on client side ? or generated from server side and pass to client in response ?

Could you give ay helpful link for sample ?

thanks
7 years ago
Some web site offers feature of "remember user id/pwd" so next time when you access the same web site, it automatically pre fill out the user id field and or password field for you. How is this kind feature implemented ? I am not talking about the auto-complete function here.
7 years ago

Tim McGuire wrote:

mark I thomas wrote:I already tested my code (by the way it was not from any google..). But I didn't feel 100% sure if I can overwrite an existing timeinMillion so I don't know if there is any potential problem -- and that's why I posted the question.

Tim's response started with "Not really..." puzzled me because I didn't know what that "not really.." menas so I was interested in hearing more from that part but unfortunately I didn't get any insight from him.

I thought when someone said "not really..." he must have something interesting in his mind and that's what I expected to hear and discuss with that person.

Tim's second email even confused me more --- It seems he was asking me "If you think there is no problem then why bother asking ?" Well, Most people believe they write the correct code but people still do code review in team, your peers may identify some potential issue that you don't see -- That's exactly why I posted that question.

I think I am very cool.


You are cooler than the other side of the pillow.

when you asked " I want to get a Calendar that is on the same day as "12345678L" but is at 6:00AM. Does this code achieve that ? "

I said "not exactly" because I wanted you to see that what you thought was 6:00 was actually 6:00:45. For my alarm clock in the morning, then this is good enough. For the mars lander, maybe not.

When you said the code worked for you anyway, it became funny because I had identified a potential issue but the requirements began shifting under us.




Technically if this was your thought you have some problem in understanding my question. I set hour and min so it prints as 6:00 AM -- It does not tell you what is the second because I didn't mention what would be the second I expect. You expected the second to be "0" but that's not what I said in my original question. So when you saw your real time second on your computer got printed out you thought there was some problem. This is like --- I said it it should print as Jan 1st, 2012 but I didn't say anything the hour of clock, somehow you assumed it should be 12AM and when you got a different hour from your clock you interpreted as something was wrong.

No matter if it is 6:00:45 or 6:00:43 or 6:00:23, they are ALL 6:00AM cosidering the hour and minute...
8 years ago

Tim McGuire wrote:

mark I thomas wrote:I already tested my code (by the way it was not from any google..). But I didn't feel 100% sure if I can overwrite an existing timeinMillion so I don't know if there is any potential problem -- and that's why I posted the question.

Tim's response started with "Not really..." puzzled me because I didn't know what that "not really.." menas so I was interested in hearing more from that part but unfortunately I didn't get any insight from him.

I thought when someone said "not really..." he must have something interesting in his mind and that's what I expected to hear and discuss with that person.

Tim's second email even confused me more --- It seems he was asking me "If you think there is no problem then why bother asking ?" Well, Most people believe they write the correct code but people still do code review in team, your peers may identify some potential issue that you don't see -- That's exactly why I posted that question.

I think I am very cool.


You are cooler than the other side of the pillow.

when you asked " I want to get a Calendar that is on the same day as "12345678L" but is at 6:00AM. Does this code achieve that ? "

I said "not exactly" because I wanted you to see that what you thought was 6:00 was actually 6:00:45. For my alarm clock in the morning, then this is good enough. For the mars lander, maybe not.

When you said the code worked for you anyway, it became funny because I had identified a potential issue but the requirements began shifting under us.




You should learn to understand when people say "with a given long timestamp, say 12345678L", that "say 12345678L" means "12345678L" is a hypothetic value. Just like I say "with a given city name, say ABCDE"... I will feel sorry for you if you really google map that city "ABCDE" but I still appreciate your effort though. --<End of Story>
8 years ago
When I posted my code and question, I said "with a given long timestamp, say 12345678L" this menas "12345678L" is a hypothetic value. In many cases, people post some pseudo code and if you run that it is not going to work. What I expected to discuss is if the idea works. the hypothetic value is too small so you get wrong results as it was on the same day of epoch.
8 years ago
I already tested my code (by the way it was not from any google..). But I didn't feel 100% sure if I can overwrite an existing timeinMillion so I don't know if there is any potential problem -- and that's why I posted the question.

Tim's response started with "Not really..." puzzled me because I didn't know what that "not really.." menas so I was interested in hearing more from that part but unfortunately I didn't get any insight from him.

I thought when someone said "not really..." he must have something interesting in his mind and that's what I expected to hear and discuss with that person.

Tim's second email even confused me more --- It seems he was asking me "If you think there is no problem then why bother asking ?" Well, Most people believe they write the correct code but people still do code review in team, your peers may identify some potential issue that you don't see -- That's exactly why I posted that question.

I think I am very cool.

8 years ago
Thanks Campbell. Still waiting to receive some meaningful response for the question I asked.
8 years ago

Tim McGuire wrote:if you say it is good enough, then it is good enough! How could I have a problem with that?



Well, Nobody forced you to give idea if you don't have one. If you have, please get to the point so we can understand you.
8 years ago
It worked fine for me. here is the sample code



The output is:

date = Tue Sep 04 06:00:47 EDT 2012

Since I didn't reset the "Second" so it copied whatever runtime second value over, but it is good enough for proof of concept.

Any problem ?
8 years ago


What I want to do is: Given a timestamp of Milliseconds (say 12345678L), I want to get a Calendar that is on the same day as "12345678L" but is at 6:00AM. Does this code achieve that ? I think so but want to hear from you.
8 years ago
private static String s = null;
static {

s="abc";

}

Which is loaded first ? a static variable or static block ?
8 years ago


Do I still have to do obj[0]= new MyObject(); and why ?
9 years ago
I forgot to mention -- My new job is a contractor job and they told me they have budget for 1 to 2 years.
9 years ago