|
My suggestion is that you remove this post and if you have a specific question, then put it in the red link above. At this point your post is going to be marked as spam by the morning.
|
|
|
|
|
Have you tried liquid nitrogen powered spam squashing technique?
|
|
|
|
|
|
This is from the article 'Good vibrations for the future of computing' in the news:
Quote: With each transistor consuming electrical current and generating heat even when not being actively switched, and with transistors approaching their physical limits of miniaturization and efficiency, the search is on for alternative technology that will eventually replace the electrical transistor and take computing into the future.
This may just be someone's piece of propaganda, but the quoted part has been untrue for more than 40 years now. Modern processors wold melt away if there would be a current even when the transistors don't switch. That technology is called CMOS where the transistors are switched in pairs. One closes while the other opens up. This way there is only a small and brief current during the switching process.
I am endeavoring, ma'am, to construct a mnemonic memory circuit using stone knives and bearskins.
|
|
|
|
|
I don't understand your use of the word "current".
|
|
|
|
|
A current is like a raisin, but the grape they come from (the Zante, or Corinth grape) is smaller - about 1\4 the size. Sultanas on the other hand come from a grape that doesn't darken when it dries.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Where does that leave prunes then?
|
|
|
|
|
But how much juice is consumed by a current?
... such stuff as dreams are made on
|
|
|
|
|
[^]
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
That's your tech gap manifest right there.
|
|
|
|
|
That is incorrect. CMOS circuits still consume current, even when they are not switching. It's commonly referred to as leakage, and is well understood. There are many sources of leakage in CMOS circuits, but the most common is subthreshold leakage. Generally speaking, this leakage gets worse as technology gets smaller, but - in recent years - has been mitigated against with fin-FET technologies.
|
|
|
|
|
I stand corrected. Thank you.
|
|
|
|
|
Ok, I swept leakage under the rug, but the lion's share goes to switching and multiplies with the frequency and the number of transistors. And that ends up entirely as heat we must get rid of.
I am endeavoring, ma'am, to construct a mnemonic memory circuit using stone knives and bearskins.
|
|
|
|
|
Quote: And that ends up entirely as heat and cat videos we must get rid of
FTFY
|
|
|
|
|
...exploring the msdb.dbo.sysschedules table in Sql Server, and one of the columns is called active_end_time of type int.
When I saw the definition, I assumed that it would represent the number of seconds in the day (from midnight). I was wrong (and surprised, bewildered, and downright annoyed) when presented with the reality of the situation.
The value returned was 235959 which far exceeds the number of seconds in a day (86400). In reality, it is a numeric representation of "23:59:59". WTF Microsoft!!!! What rocket scientist decided that this was a valid way to represent a time-of-freakin-day?!
Even worse, they don't use two-digit hours, so "30000" represents "3 am".
Also, "0" indicates midnight, so how do they represent 1 second past midnight? (I don't know because none of existing the job schedules have a time like that.)
EDIT =================
Out of curiosity, I added a job with a schedule that starts at 00:00:01, and the value stored in table is "1".
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 4-Oct-17 13:02pm.
|
|
|
|
|
John Simmons / outlaw programmer wrote: I assumed that it would represent the number of seconds in the day (from midnight) I would have, too. It's odd they chose the format they have, but at least it's ordinal and documented[^].
/ravi
|
|
|
|
|
I created an extension method to parse it...
public static class ExtendTimeSpan
{
public static TimeSpan ParseFromFormattedInt(int value)
{
return new TimeSpan(0).ParseFromFormattedInt(value);
}
public static TimeSpan ParseFromFormattedInt(this TimeSpan span, int value)
{
TimeSpan result = new TimeSpan(0);
string timeString = value.ToString();
string padding = new String('0', 6 - timeString.Length);
timeString = ((timeString.Length < 6) ? string.Concat(padding, timeString) : timeString).Insert(4, ":").Insert(2,":");
try
{
result = TimeSpan.ParseExact(timeString, "g", CultureInfo.CurrentCulture);
}
catch (Exception)
{
}
return result;
}
}
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
/ravi
|
|
|
|
|
No need to mess around with strings:
public static class ExtendTimeSpan
{
public static TimeSpan ParseFromFormattedInt(int value)
{
int hours = Math.DivRem(value, 10000, out value);
int minutes = Math.DivRem(value, 100, out value);
int seconds = value + minutes * 60 + hours * 3600;
return TimeSpan.FromSeconds(seconds);
}
public static TimeSpan ParseFromFormattedInt(this TimeSpan span, int value)
{
return ParseFromFormattedInt(value);
}
}
Or, in SQL (2012 or later):
SELECT
TIMEFROMPARTS(active_end_time / 10000, (active_end_time / 100) % 100, active_end_time % 100, 0, 0)
FROM
msdb.dbo.sysschedules
;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: Or, in SQL (2012 or later):
This is 2008R2... :/
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I knew a math way was possible. This can also be extended to the dates that are stored in the same fashion:
Given an int value of 99991231:
int year = Math.DivRem(value, 10000, out value);
int month = Math.DivRem(value, 100, out value);
int day = value;
return new DateTime(year, month, day);
would yield a datetime of 12/31/9999.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 5-Oct-17 8:53am.
|
|
|
|
|
As if integer time wasn't bad enough!
We do a lot of work with a Norwegian ERP system that stores dates like that. The UI validates the day and month, but doesn't validate the year. We regularly have to correct user input like 200171005 or 2011130 .
It's also allergic to Null in the database. If a date hasn't been entered, it's stored as 0 .
Fun times.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If 235959 represents 23:59:59 and the type is 'int', how would they have a two digit hour for 3 AM?
It seem reasonable that any time represented as a 6 character string without ":" delimiters, when converted to a 'int' would give the appropriate response.
So.. a time of 00:00:01, when stripped of delimiters would give 000001 and converted to an 'int' would give... 1.
So.. outside of the odd data type, what's the issue?
|
|
|
|
|
The issue is that it's an absurd way to represent the time.
They're using an int data type, so the number of seconds past midnight would have made more sense, because it requires the same amount of storage space to store 1 as it does to store 1000.
This means that in order to determine "the time", I had to write a method to parse the value instead of using
TimeSpan span = TimeSpan.FromSeconds(1);
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I feel your pain. I have spent a considerable amount of time trying to unravel a MySql database that someone else built. Various dates were stored as integers, decimal, string, in fact anything except the obvious DATE!
How do you know if a date value of 1216 represents 1st February 2016, 12th January 2006 or what?
Grrr!
We're philosophical about power outages here. A.C. come, A.C. go.
|
|
|
|
|