Sip
Members-
Posts
8,324 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Gallery
Everything posted by Sip
-
quote:Originally posted by Garo:[With recursive calls to a subroutine? If yes then you need to be careful with stack overflows. No, not recursive. But instead of computing x^n then mutiplying with an, then computing x^(n-1), multiplying with an-1 and adding to previous value etc, just computing an * x, add the next a, *x, add next a, *x (like a simple loop). It's called "Horner's method of polynomial evaluation" and it basically requires n multiplications and n additions. The other naive method, requires n multiplications just to find x^n !!!
-
Everytime someone says the word "romantic" I immediately think pink butterflies, red roses, dark chocolate, VW Bugs, rainbows, cute midget riding a big bicycle pulling a white pony, lots of colorful baloons, confetti falling from the sky, and fireworks in the background. Then I get very sick almost the point of throwing up, since I don't like any of those things. Well, maybe seeing a midget riding a big bicycle pulling a white pony would be cool but the others ... http://zr2.cs.ucla.edu/Sip/zr2/barf.gif These western interpretations of "romantic", "love", blah blah blah make me sick ... I just don't think all this ever-lasting love (the one true love, love at first sight, etc etc) crap between a man and a woman, a man and a man, a woman and a woman, a man and a donkey, is true. It is something that society teaches us (from a very young age). How old were you when you were first told you have to get married? How old were you when you were first told you are going to fall in love with someone special? Do you even remember? It seems like that type of stuff is just drilled into the heads of childeren as they grow up ... It is something we expect and believe and that's why it sometimes happens. Let's not confuse attraction and love ... I don't think this modern concept of Love (and all the romantic stuff that are usually associated with it) existed before organized religeon and modern societies started insisting that it is the way things have to be. Just look at ancient Rome, Greece, and writings from long long ago ... you almost never see this modern concept of love between a man and a woman in any of those scriptures. The bond always existed as purely a matter of practicality ... man the provider and protector, woman in charge of raising the young. So I have no idea what the words (love, romance, etc) mean! Basically, I just don't think any particular type of social behavior is encoded in the genes. There are definitely biological behavior and needs that take over at different parts of life, but the rest is all in the mind and different from person to person. I admit, I am not a literature or history person or an expert on the subject by any means but that's just my feeling about the whole thing. Not saying I don't like the way things are now but it is not in the human nature as many claim it to be (calling it natural). It is definitely learned behavior in my opinion... therefore everyone will have a different interpretation and view on the subject On second thought, maybe I should stick to 1's and 0's [ March 03, 2002, 09:24 PM: Message edited by: Sip ]
-
Very nice Garo Computer (or calculator) math is often very different than pure math! This is because inside your computing device, you only have a fixed amount of "bits" to represent numbers. In pure math, precision is infinite. This is what gets many brilliant scientists in trouble ... they don't realize that you really can't trust what the computer is telling you as the answer to your calculations! The answers can often be very very wrong. The above are just examples of "range" errors. As Garo said, with 16-bit numbers, you can only represent 65536 different things. That means you can have numbers between -32768 ... 32767 (including 0). When you add 30000 and 35546, your numbers "wrap around" and you end up at +10 !!! Same way with 8-bit numbers. With 8 bits, you can only represent 256 things, that means numbers from 0 to 255. When you add 150+150 you should have 300 but that result "wraps around" and you end up at 44 !!! There are a whole bunch of other problems when you do "floating point" calculations (i.e. involving fractions). If interested, I can explain more (maybe in the computer section ) For example, if you are trying to evaluate an n-degree polynomial with cooeficients a0 ... an: an x^n + an-1 x^(n-1) + ... a2 x^2 + a1 x + a0 You could either write a program which just does that (as above) or you could do: (((((an * x) + an-1)*x + ...) + a2)*x + a1) * x + a0 In pure math, they are both equivalent but in computers, the second one will be much much much more accurate than the first one! Not to mention that the second one will be much much faster than the first one (if anyone can say the reason for both, I'll be impressed ) So computer math is very different than pure math ... it's definitely much more fun in my opinion but I am sure there are people that will disagree.
-
I know it is a very strange problem to figure out and there is probably no way anyone would even think about it without the hint (computer program) So the big hint is this ... if you compile and run this program, you will get the answers I said above (30000+35546=10 and 150+150=44) : code:#include int main() { short a=30000, b=35546; unsigned char c=150+150; cout << 30000 << " + " << 35546 << " = " << a+b << endl; cout << 150 << " + " << 150 << " = " << (int)c << endl; return 0; }
-
De vor hima garoona, yekek amenov: Garoon Garoon Garoon e, Siroon Siroon Siroon e, ed ko sev sev ...
-
quote:Originally posted by PandukhT:atlist it has matching colors it's not my car it was on Ebay i was going to bid on it, i might bid on it that depends on haw many beer i have tonight are you going to join us tonight ? What's up tonight? Did I miss something? I have been at UCLA for the past 35 hours with a 2 hour nap on my chair! In the past 70 hours I have probably had about 4 or 5 hours of sleep ... man I feel good right now ... but I'll probably sleep all Saturday !!! Graduate life is very strange ... there are weeks that I don't do much and then there are weeks that there is sooo much happening I forget to eat, sleep, shower, and sometimes even to go to bathroom By the way, you may want to check out This bad boy ... the way SUVs are going, we'll probably see those in LA soon.
-
quote:Originally posted by PandukhT: http://images.andale.com/f2/115/106/3722704/1013578520502_PassIsoRear45.jpg Hey by the way, I just noticed that your nice classic landcruiser was parked on a handicap spot ... you may want to move it before you get a ticket http://zr2.cs.ucla.edu/Sip/zr2/roflmao.gif [ March 01, 2002, 04:30 PM: Message edited by: Sip ]
-
Those old Landcruisers are awesome! Actually the new ones are also good except that they are soooo fricking expensive About the Sequoia, I have read a lot of articles about it. The general concensus is that it is a Toyota so you can expect a good quality vehicle It is not particularly suited for off roading and "4-wheeling" due to its very "mushy" suspension and limited wheel travel ... i.e. off-road, it would be very easy to lift one of the wheels into the air! Also, they have a lot of sophisticated electronics that take the control away from the driver. But that probably makes it very easy to drive on the streets and use the 4x4 feature for snow/ice conditions. But I have always been a Chevy man myself By the way, Azat, they don't say what happens to rear passengers! I wouldn't want to be sitting at the back of that thing when it starts to collapse like that!!!!
-
Sweet car Now only if they could apply the same technology to THIS ONE.
-
quote:Originally posted by Juggernaut: quote:do you believe in the evolution theory?I'll answer this question, I dont believe in it for 2 reasons: 1. I am Christian, and it clearly states in the Bible (and for that matter all other Holy Books), that God created the living (and man in the original form)... I don't mean any disrespect and I don't think I have ANY of the answers ... but how can the "christians" and the "church" still go on about the creation of man in the beginning while it is fairly obvious that dinosaurs existed before man? I am not saying evolution, mutation, or whatever else is a good explanation but clearly that simplistic view of things is not ture. Unless you think that dinosaurs NEVER existed in which case we have a much deeper problem to discuss I like the ideas in the Bible ... I like the idea of man being created by this amazing force called God ... but it just doesn't seem realistic that it all happened in an instant (or seven days or whatever) and "in the beginning". Don't you think that it is time we start to think about the "ideas" in the bible rather than try to play games with the words and the sentences like so many have done in the past? The thing is that I really like Chrsitianity and christian beliefs ... it's just that the "church" makes it very hard for me to consider myself a member just because of insisting on some technicalities which don't seem to fit anything that I consider "reality" Note: the "YOU" is a genenric you in the above and is not directed to anyone in specific
-
Welcome to the board Edita! What? No choice for 36? If the sister is 3 times as old as the brother, and the brother is 12, then she must be 36 Ok, at times like this, when I come up with an answer and the answer is NOT one of the choices, I just guess on a test ... I usually pick B since I know everyone else picks C ... so in this case, I am going to guess 20 ... did I get it? did I get it? [ February 28, 2002, 09:30 PM: Message edited by: Sip ]
-
Ok since we have this new forum, and we don't want to exclude the non-geeks ... here's a philosophical question about computers that doesn't need any special computer expertise to answer (but it is not an easy question) ... So what is the definition of intelligence? A few decades ago, when someone was really good in chess, he was considered "smart" and "intelligent". A child that showed special chess abilities, would be considered a "genius" ... But now, as many of you probably know, computers can beat the best human chess players ... does this mean computers are "smart" or have intelligence? If yes, do you think computers will ever be more intelligent than their human creators? How can that be possible? How can we make something better than ourself? If we make something better than us, we would have to understand ourself completely ... in order to understand ourself, we would need to have more intelligence than we have ... so do you see the paradox I am running into or am I just way off ? If not (if you think computers are not intelligent), why did that old definition of "smart" change for computers?
-
Arturs demand -=- Should KazZa remove her Signature -=-
Sip replied to MosJan's topic in Gender Issues
Let's see ... Kazza's signature or Arthur .... Kazza's signature or Arthur ... Kazza's signature or Arthur ... hmmmm that's a though one So I am trying to think what is really wrong with that signature? ????? Is it just the Hashish thing or the hashish thing and the sex thing? What? And even if she removes the signature, it still doesn't change the fact that that's the way she believes so is Arthur saying we should kick Kazzaa out because she thinks a certain way? or is he saying that she should lie or hide what she believes ... In any case, I don't think Arthur has any valid grounds for demanding that the signature be removed unless he is asking that kazzaa be removed ... and obviously removing Kazzaa just because she thinks a certain way is NOT OK. -
quote:Originally posted by Azat:
-
I wish I had known movses jan ... I already got it off ebay a couple of days ago ... I went with the Nikon 885. It was either that or the Canon S30 (or maybe even the S40 which is the same as s30 but 4.1 Mega pix instead of 3.3). The Nikon has a lot of controls that let you mess with the picture it takes so that's why I went with it ... plus I like their lenses although I am not a pro photographer by any means!!! I was also looking at Sony DSC-P5 but decided not to bother with memory stick ... I am sticking with compact flash for now.
-
Ah thanks! That makes me feel much better ... believe it or not I was thinking that the S40 may be faster ... I can't wait for it to get here! I had an older one DC240 (Kodak) so I have been very used to digital cameras ... that one was stolen a few weeks ago (long story) but it was time for a new one
-
quote:Originally posted by PandukhT: ... when your selling something $150+$150 = $400 + TAX when your baying something $150 + $150 = $200 tax included ... http://zr2.cs.ucla.edu/Sip/zr2/roflmao.gif Oh man! That is so funny. I totally forgot about the Movses math! I was trying to buy a digital camera the other day online and this guy (some store in new york) tells me to call them on the phone ... I call, I am almost ready to buy when he says ... "oh by the way, the battery and charger are extra! $150" ... I was like what the hell are you talking about? This camera comes with a battery and charger from the factory ... so he tells me "Oh, you want the USA kit, that's extra!" That was when I hung up the phone ... I was so angry I was laughing at myself
-
Azat's math: 2+2=5 for extremely large values of 2 Harut's math: 150 + 150 = 44 Harut (or anyone else) do you know why? It is not trivial to figure it out so I'll give you a hint, that I can write a program which will prove the above is true Also, why: 30000 + 35546 = 10 ?
-
quote:Originally posted by Azat: ... How do you like that title Sip? I bet you looked at it thinking that I had a sample code or something like that. Very creative! But the first thing I thought was wow, Harut is moving along REALLY fast !!! ... but then I saw that you had started the thread. Very interesting I must say ... But I still prefer the centralized java approach: ( <--There is my favorite smily again) http://zr2.cs.ucla.edu/Sip/zr2/coffee.jpg
-
quote:Originally posted by ARTURian: "Think twice talk once!" Arthur, do you realize that with that signature you are implying that we are dumb and can't think straight the first time? I am Armenian and I don't need to think twice. I get it right the first time. Now if you were an English guy, saying that type of stuff to English people, it would be ok. Note: See how rediculous the above sounded? Now read your own post again ... For your info, I am being silly so feel free to ignore me as well. However, I think there was a point to what I said.
-
http://my.yahoo.com (different for each person)www.google.comwww.zr2.comhttp://www.armenians.com/forumshopping.yahoo.comwww.ebay.com
-
quote:Originally posted by ARTURian: We worship God! We worship God, who through his son Jesus Christ sent his message in holy Bible. Simple as that. Wow, I didn't know Jesus wrote the bible. Could he even write? (not joking with this question ... I actually would like to know). quote:Originally posted by ARTURian: Look millions and millions of people were idiots and only Hagarag is the one who reveiled the truth. lol ... By the way, Arthur, I am 100% with Hagarag on this one. So that makes at least 2 against all the millions you are talking about. I am sure there are more of us
-
Harut jan, I just wrote this code which I think does what you are asking. Just copy-paste it code into a text file, call it something like list.frm, and open and run it in VB. It basically lets you add items to a list, and then select either the next item or the previous item. Is this the "select" you are asking about? code:VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 1890 ClientLeft = 60 ClientTop = 345 ClientWidth = 3210 LinkTopic = "Form1" ScaleHeight = 1890 ScaleWidth = 3210 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command3 Caption = "Select Prev" Height = 495 Index = 0 Left = 1680 TabIndex = 3 Top = 1320 Width = 1455 End Begin VB.CommandButton Command2 Caption = "Select Next" Height = 495 Left = 1680 TabIndex = 2 Top = 720 Width = 1455 End Begin VB.CommandButton Command1 Caption = "Add Items" Height = 495 Left = 1680 TabIndex = 1 Top = 120 Width = 1455 End Begin VB.ListBox List1 Height = 1620 Left = 120 TabIndex = 0 Top = 120 Width = 1455 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() newItem$ = "Item " + Str(List1.ListCount + 1) List1.AddItem (newItem$) End Sub Private Sub Command2_Click() If List1.ListCount > 0 Then sel = List1.ListIndex sel = sel + 1 If sel >= List1.ListCount Then sel = 0 List1.Selected(sel) = True End If End Sub Private Sub Command3_Click(Index As Integer) If List1.ListCount > 0 Then sel = List1.ListIndex sel = sel - 1 If sel < 0 Then sel = List1.ListCount - 1 List1.Selected(sel) = True End If End Sub
-
Welcome to the board Karapetyan! Nice thread you started quote:Originally posted by Azat:Oh by the way harut, for our third example we are going to improve the Windows XP kernal. Hope you do a good job on this one and learn from it. Does anyone have any idea how many lines of code the XP kernel has? Last I read was about NT 4.0 which had about 40 millions lines of code (everything combined) but I haven't seen any data about the kernel. They are also saying that the code base doubles every year so now they should be past the 100 million lines of code mark
-
quote:Originally posted by Harut: yesterday i picked up my books for coming term. two of which are "C++ How To Program" from Deitel & Deitel, and "Object-Oriented Programming Using C++" from Course Technology. i briefly went over the intros, and somewhere there it mentions that link. it says we can download a free copy of Borland C++ from there. i haven't checked it out yet. i'll do it now. but i don't understand one thing. does it matter which compiter i use? isn't C++ C++ whatever i use it with? i got Visual Studio 6. is it good or bad? That Dietel and Dietel book is excellent. That's also the same one UCLA uses to teach intro to C/C++. Visual Studio 6 is the best development environment ever made! Microsoft's C/C++ compiler is also very good. C and C++ should be the same as long as you stick to the ANSI standards. ANSI C is very well defined but C++ is still being changed. New features are being added and removed and some compilers may or may not support some features. However, almost all compilers support the basic stuff so your choice of compiler will not make a difference. The only thing is that don't confuse development environment and compiler. Visual Studio can make it seem like everything is integrated together but the complier is a separate program. Microsoft's 32-bit C/C++ compiler is called cl and you can use it to compile programs without using the Visual studio environment. Although most people will use the Visual C++ environment to work on their programs (somewhat like how you would work on a visual basic program). But at the end, CL is compiling your code into an executable. There are other compilers like GCC (gnu compiler) that I use a lot. But stick to Visual C++ since you already have it. It is very very good! (make sure you install the latest service packs from microsoft ... I think the latest is SP5. They fix a lot of bugs with the compiler). You can download Service Pack 5 from HERE (it's about 130MB) . [ February 22, 2002: Message edited by: Sip ]
