Robert Morris of the NSA proposed the following problem:
What is the next series of numbers?
1 11 21 1211 111221 ...
Robert Morris of the NSA proposed the following problem:
What is the next series of numbers?
1 11 21 1211 111221 ...
It appears that Fedora core yum updating has been disabled. Perhaps this was done to try and minimize the impact on the servers, while users download the new release of Fedora Core 6?
Symptoms
# yum -y update Loading "installonlyn" plugin Setting up Update Process Setting up repositories core [1/3] Cannot find a valid baseurl for repo: core Error: Cannot find a valid baseurl for repo: core
Fix
Uncomment the baseurl setting. The following was done on my FC5 systems. It makes backups, using the extension .backup.
cd /etc/yum.repos.d/ perl -pi.backup -e "s/#baseurl/baseurl/" *
Now you should be good to go.
Well, my guess is S1(w) > S2(w), since with the simple string "aaaa" there are two occurrences of the substring "aaa". The first is from position 0 to position 2. The second is from position 1 to position 3. There is overlap.
Note it is impossible to have two occurrences of substring "abc" using any 4 characters. Therefore, more substrings of "aaa" can also be found in the 10 character string.
--W. Stekel
It's been said that Jesse Lauriston Livermore was the greatest stock market operator in history - the only operator who ever made and lost four stock market fortunes. He did it all on a ``small bankroll, a stock ticker and a telephone.''[1]
Jesse Livermore stock picking techniques are still applicable today. In fact, if you do a careful read, you'll see that some well-know authors have actually stolen his techniques. Livermore's techniques worked well for him, when he followed them. Unfortunately, he got emotionally wrapped up in the marketed and departed from his rules. He died by suicide in 1940.
Livermore had a number of rules: Never by on a tip alone; Stocks reaching new highs tend to go higher; Never trade in stocks under $15. Have an exit strategy before you buy, etc.
Stock Prices
There's a program stock.tar.gz that grabs current stock price data from yahoo finance. Below is an example usage getting the stock price for Redhat. By the way take a look at this price. It's starting to hit new highs, and it volume follows through on the new high it could be a good buy. Oh, first rule: Never buy on a tip alone.
$ stock rhat "RHAT",29.01,"3/3/2006","4:00pm",+0.76,28.10,29.28,28.00,3339778
This program[1] can do multiple stocks and or indexes as well. See the man page on the program for more help. The source is very simple using socket, bind, connect. It can easily be adjusted for scraping other pages, sending mail (you'll have to change the port), or other desired tasks.
Email Alerts
I use Gmail; but, but it's a custom setup with the local MTA (Postfix) and Fetchmail. The advantage here is being able to run any standard shell scripts for sending out mail, on your home system, where you might not have a dedicated IP address.
References
Xen is cooking up nice on Fedora Core 5. I didn't have any problem installing this on a Dell OptiPlex GX520, Pentium 4 (3.00 GHz), with 1G of RAM, Broadcom NetXtreme BCM5751 Gigabit Ethernet PCI Express, Linksys Gigabit Network Adapter (Model No. EG1032,rev 10).
It was actually only a matter of minutes before I had everything running, which I think is the best way to learn about Xen. That is, first have a running system with multiple guest systems. And, for each guest account have networking functional. One quick note, it certainly helps if you have 1G of RAM, so that each guest account can use the minimum default of 256MB. Take a look at the FC5 Xen Quick Start Instructions for how it's all done.
What's missing in these instructions is how to ssh into a guest xm and run kde remotely. I'll detail here what worked for me.
Xen and remote KDE
From the computer you are sitting at, with a monitor,keyboard and KDE or Gnome loaded and running, you'll connect via ssh to the Xen guest system. But before you can do this, walk through the step 1, with the computer in front of you.
Xlib: connection to ":1.0" refused by server Xlib: No protocol specified
To enable magic cookies from the shell, issue the following commands.
$ MCOOKIE=$(mcookie) $ xauth add $(hostname)/unix:1 MIT-MAGIC-COOKIE-1 $MCOOKIE $ xauth add localhost/unix:1 MIT-MAGIC-COOKIE-1 $MCOOKIE
$ xinit -- :1 vt12
$ ssh -Y -l root vm0.domain.com
$ startkde
I didn't have to change anything for KDE, but Gnome takes a few tweaks.
Reference
You may want to reference Linux Tips (TIP 195)
Now, in my opinion, it's instructive to look at the FC4 Xen Quick Start, and hack away the working Xen configuration. The FC4 documentation goes into the mechanics of the process.
"Higher Order Perl: transforming Programs with Programs", by Mark Jason Dominus.
Mark put a lot of time into this book, and it shows. It was 5 years in the making, with free versions passed out for review. Examples can be found here (scroll down the page) .
Mark plans to take the book public, in Wiki form.
I would agree that "writing functions that modify other functions" is a very powerful programming technique found in Lisp, Mathematica, Java, and C++ to name a few languages, but it's not generally associated with Perl. Well, Mark will open your eyes here. The book is fun to read. It has depth; however, it is not written like a text book. Compare it to hacking with friends rather than sitting in a CS class.
That's it. The leap second was added. You'll see it in your logs.
Dec 31 18:59:59 squeezel kernel: Clock: inserting leap second 23:59:60 UTC Dec 31 18:59:59 livingroom kernel: Clock: inserting leap second 23:59:60 UTC
The last time we had a leap second was 1998. This is exciting! We're going to have another one.
For me this will occur Dec 31, 7:00pm EST. Unlike the New Year, the whole planet experiences this transition at once, when the UTC clock ticks 23:59:60.
Below, is what the last leap second looked like in 1998
Date Time TAI NTP Leap NTP Seconds 1. Dec 31 98 23:59:59 31 01 3,124,137,599 2. Dec 31 98 23:59:60 31 01 3,124,137,600 3. Jan 01 98 00:00:00 32 00 3,124,137,600 4. Jan 01 99 00:00:01 33 00 3,124,137,601
By the way, this is the 23rd leap second. Yes, I know what you're thinking. The number 23 is interesting because it's the first intersection of Pi and e.
Pi = 3.141592653589793-23-84 e = 2.718281828459045-23-53
Also, the earth is tilted at 23.5 degrees...hmm there's that number again. Ramsey Theory? Maybe, probably.
Wouldn't it be nice to have all the network interfaces, in modern C++, for Linux, Windows, OS X and Solaris?
asio is under review for Boost inclusion, with SSL support and the future possibility for rawsockets.
It is a good C++ learning execise reviewing this library. There is active discussion now on the developers mailing list.
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!