@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12



Comments:

<0> no it's not.
<1> trunc'ed
<1> ;P
<1> ki9a, were you talking to me?
<0> abs(Trunc(time1) - Trunc(Time2)) would be better ihmo
<1> ki9a, that's what i tried to say... anyway, without trunc'ing, you'll get fractional days, which can be good in some circumstances...
<1> also... truncing the answer can be just as well
<0> 9 PM yesterday
<0> - 12 PM today
<0> abs() = 0
<1> if you trunc? ;P
<1> try round() then ;P
<1> Abs(0.4 - 1.5) = 1.1 ... trunc(1.1) = 1
<0> 9 PM is .8 or so; 12 PM today = 1.5
<1> Abs(0.7 - 1.5) = 0.8 ... trunc(0.8) = 0
<1> but round(0.8) would yield 1



<2> What about 11pm to 1am? :)
<1> ;P
<1> need to convert to 24h clock in order to understand ;P
<1> 11pm = 23:00; while 1am = 01:00
<1> right?
<2> yeah. 2 hour difference.
<2> So, round would yield 0, even though its actross 2 different days
<0> abs(Trunc(x) - trunc(y))
<0> that's the only thing that works properly.
<1> one hour = 1 day / 24 hours = 0.041666666 day...
<1> 0.041666666 * 23 = 0.958333318
<2> yeah, its * 23.99999999999999999999999999999999999
<2> And so on. :)
<1> hehe
<1> 0.958333318 - 0.041666666 = 0.916666652
<1> or 91.6% of a day ;P
<1> nooo
<1> 100-91.6 ;P
<1> **** this... see ya later
<1> ;P
<3> http://www.logitech.com/index.cfm/products/details/US/EN,CRID=1969,parentcrid=925,scrid=925,CONTENTID=10966
<2> Somoene was on here a few months ago bitching about granola ingredients, who was that? :)
<4> hey
<5> hello, I've got here Delphi 2005, and I'm using DBGrid to display stuff, I've tried autosize for columns, but it did not work as expected. What I would like to do is somehow make the column DBGrid1.Columns[0].Width:= to longest text width in columns[0] , tips?
<2> I'm going to fall asleep now.
<6> I have AThing.AProperty, where AProperty is a variant. I need to index on the value of the varient in a case..of statement, how would I do that?
<7> cast it to int ?
<2> Cast it to an integer.
<7> slow Drk, too slow :P
<2> If its not an int, then do a series of ifs. case only works on ordinal data types.
<2> Mith: Bite me. :)
<5> WOW http://delphi.about.com/od/usedbvcl/l/aa050404a.htm found it !
<7> no thanks, I don't know whereyou've been
<2> No place horribly fun lately. :/
<6> I tried: case Integer(AThing.AProperty) of, and it compiles but then generates an exception saying Access Violation on ntdll.RtlConvertULongToLargeInteger
<6> and highlights the case..of line
<2> VarToInt, I think.
<3> anyone played with toolsapi? (D7) excpt Vibes
<6> Drk`Angel do you know what unit that is in, I searched the BDS2006 help without avail as well as simply trying unit Variants;
<2> ncaller: Look up variant functions in the help. Its entirely possible I completely biffed it.
<4> there is no vartoint
<4> there is a varastype or vartotype, but why do you need it anyway? It already works without those functions
<2> VarToBlah handles nulls gracefully, usually.
<8> I'm making my own little simple msn clone just for fun. Can anyone tell me where I can find good help on SSL or a SSL VLC?
<9> how can I use a function that has argument var Buffer; Count : Integer.. if I have a String. I know this is a stupid question. I need to study buffers etc
<3> var Bufer : ?
<9> oh its PChar
<3> pchar(string)
<9> Nick2: actual I'm wrong. I was look at something else.. var Buffer is a Void Type
<10> kinda
<10> for something like "Read(buffer, size) ?
<9> Rahly: yes and Write(buffer, size)
<10> write is easy, read is a little harder because you have to allocate memory first
<11> hello whores
<2> Gettings, cumdumpster.
<9> hi Blade^
<11> Drk: only for you ;)
<2> cause I'm that good.
<10> .Write(MyString[1], Length(MyString));
<3> gdb, I suggest you to use pchars not strings
<12> what i have to do to make delphi add inside the exe, the resources of external dlls that the exe depend?



<10> i suggest you not use pchar, too archaic
<3> what would you recommend Rahly, a tmemorystream?
<10> huh?
<10> i suggest strings, thats one of delphis strong points
<10> ref counted and length based
<3> i never tought delphi's strong with strings
<2> And can be directly cast to and from PChar when needed.
<3> memory manager is not the best part of delphi. but I may be wrong of course
<10> i don't care what you tought, whatever that means
<2> I suspect 'thought'
<10> oh
<10> i was thinking maybe he ment taught
<10> Nick2: what does the memory manager have to do with it
<10> using PChars you'd use the same memory manager
<3> I can allocate a fixed size to a pchar; for a string it's always a memory realocation
<10> huh?
<10> mystring := mystring + 'a'; is not always a memory reallocation
<10> and you can allocated a fixed size to a string as well
<10> and it'll still be ref counted and length size
<3> yes, I know that still don't think it's widely spread
<10> for delphi and c++ it is
<3> actually the point is that you're trying to prove that you know ****
<10> haha, whatever you say
<3> hence I don't really care :)
<2> I must have missed something.
<10> he can't make a point Drk`Angel, so he resorts to typical abuse
<10> like any troll or newb
<9> well I appreciate both comments. didn't mean to cause controversy
<10> np gdb
<3> gdb, don't bother
<2> gdb: Rahly knows what he's talking about. NIck2 is an unknown source, but its not looking too bringt.
<10> gdb: use strings, they are very easy to use, and you don't have to worry about cleanup
<2> bright*
<10> its a + on all counts
<10> thats why C++ has strings
<2> I was so ****ing happy when I stopped using C. Yay Strings.
<10> it also handles any memory copying because they are copy-on-write strings
<10> lol yeah
<9> Rahly: What about a TStream to a String ?
<10> considering C doesn't have strings
<2> Exactly.
<2> That would be the main point of the joy. :)
<10> hehe yeah
<10> gdb: pre allocate what you think you might need
<10> i use this method
<2> Use SetLength.
<10> SetLength(MyString, 1024); SetLength(MyString, MyStream.Read(MyString[1], Length(MyString)));
<10> you can change the preallocation size as needed
<4> There also is a TStringStream
<2> I use strings as buffers to API calls. Stupid to waste time allocating, tracking, and deallocating pchar buffers.
<10> that too, but i don't think that handles binary data
<10> Drk`Angel: me too, amen
<10> since strings can hold NUL chars, its all the better
<10> or dynamic arrays
<13> Drk: You say I can use a string with GetComputername() ?
<13> Dam I did char arrays for like ... 8 years ...
<10> hehe
<10> yeah
<2> Dunno if you're kidding or not, but yeah, you can use strings for just about everything. :)
<13> I'm not kidding, but I guess I never tried using strings because all I know about winAPI is adapted from C++ examples
<11> you can't use them to represent exotic matter
<10> GetComputerName(@MyName[1], Length(MyName)); or GetComputerName(PChar(MyName), Length(MyName));
<2> Use SetLength frist to set the string size to whatever buffer size you want.
<10> SetLength(MyName, MAX_COMPUTERNAME_LENGTH+1);
<10> i wish there were polymorphic strings though
<2> I have no idea what you're looking for there, but I'm going to go with blaming that on lack of sleep.
<10> ones that can contain different types of string automatically, a little similar to C# strings
<10> ones that can hold UTF-8 data or UTF-16, or ANSI, and its all treated the same
<10> at least on the programmers end
<14> hi guys.
<14> just taking a short break.
<10> hey dayna
<11> afaik .NET strings are UTF-16


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #delphi
or
Go to some related logs:

#visualbasic
kickle cubicle youtube
youtube + onresize + flash
#sex
dextroamphetimine is meth?
crasy talk
#murder
#politics
#stocks
#windows



Home  |  disclaimer  |  contact  |  submit quotes