Free Flat Screens
Is this for real?
Daily Information Roadkill
In the St. Petersburg Times and the Salt Lake Tribune: "The leaders of the backlash may talk Christ, but they walk corporate," Frank writes. "Values may 'matter most' to voters, but they always take a back seat to the needs of money once the elections are won."
"Vote to stop abortion; receive a rollback in capital-gains taxes. Vote to make our country strong again; receive deindustrialization. Vote to screw those politically correct college professors; receive electricity deregulation."
The BBC's Science & Nature Surveys have a cool test to see if you can spot a fake smile
http://linuxmobile.sourceforge.net/ http://openfacts.berlios.de/index-en.phtml?title=Linux_bootable_USB_key_HOWTO http://www.goosee.com/puppy/flash-puppy.htm http://featherlinux.berlios.de/ http://damnsmalllinux.org/cgi-bin/forums/ikonboard.cgi?act=ST;f=11;t=21 http://damnsmalllinux.org/cgi-bin/forums/ikonboard.cgi?act=ST;f=11;t=79 http://www.toms.net/rb/
package com.mike; import java.net.*; import java.io.*; import java.util.*; /** * */ public class PrinterNews { static String rss=/*"http://slashdot.org/index.rss";//*/"http://rss.news.yahoo.com/rss/topstories"; static String printer=""; static int updateFrequency=30*1000*60; static int scrollDelay=300;//ms static String msg=""; static String blank=" "; static OutputStream out; static ArrayList headlines; static boolean nice=true;//otherwise, it locks the printer public static void main(String[] args){ try{ if(!init(args)) return; readHeadlines(); connect(); long startTime=new Date().getTime(); while(true){ scroll(); if(new Date().getTime()-startTime>updateFrequency){ readHeadlines(); startTime=new Date().getTime(); } } }catch(Exception e){ e.printStackTrace(); } } public static boolean init(String[] args){ if(args.length < 2){ usage(); return false; } for(int i=0; i<args.length; i=i+2){ System.out.println("param "+i+" ="+args[i]); String parm=args[i]; if(!parm.startsWith("-") || parm.length()!=2){ usage(); return false; } switch(parm.charAt(1)){ case 'p': printer=args[i+1]; System.out.println("set printer to "+printer); break; case 'u': rss=args[i+1]; System.out.println("set rss to "+rss); break; case 'f': try{ updateFrequency=Integer.parseInt(args[i+1])*1000*60; System.out.println("set frequency to "+updateFrequency); }catch(Exception e){ usage(); return false; } case 'd': try{ scrollDelay=Integer.parseInt(args[i+1]); System.out.println("set delay to "+scrollDelay); break; }catch(Exception e){ usage(); return false; } default: usage(); return false; } } return true; } public static void usage(){ System.out.println("\nUsage:\n"); System.out.println("java com.mike.PrinterNews -p printer"); System.out.println(" [-u rss_url] url of rss feed"); System.out.println(" [-f rssUpdateFrequency] minutes between rss refresh"); System.out.println(" [-d scrollDelayMS] ms between lcd update"); System.out.println("defaults to -u http://rss.news.yahoo.com/rss/topstories -f 30 -d 300"); System.out.println("NOTE: slashdot will blacklist you for -f<30 !\n"); } public static void connect() throws Exception{ Socket s = new Socket(printer, 9100); out =s.getOutputStream(); } public static void scroll() throws Exception{ for(Iterator it=headlines.iterator(); it.hasNext();){ sendMsg((String)(it.next())); if(nice){ out.flush(); out.close(); Thread.sleep(1000); connect(); } } } public static void sendMsg(String msg) throws Exception{ msg=blank+msg+blank; //OPMSG, RDYMSG, STMSG for(int i=0; i<msg.length(); i++){ byte[] b; if(msg.length()> i +15){ b=msg.substring(i, i+15).getBytes(); }else{ b=msg.substring(i).getBytes(); } out.write("\033%-12345X@PJL RDYMSG DISPLAY = \"".getBytes()); out.write(b); out.write("\"\r\n\033%-12345X\r\n".getBytes()); Thread.sleep(scrollDelay); } } public static void readHeadlines() throws Exception{ headlines= new ArrayList(); BufferedReader i = new BufferedReader(new InputStreamReader(new URL(rss).openStream())); while(true){ String nextLine=i.readLine(); if(nextLine==null) break; int start=nextLine.toLowerCase().indexOf("<description>");//<title> if(start!=-1) headlines.add(scrub(nextLine.substring(start+13, nextLine.indexOf("</")>start+13?nextLine.indexOf("</"):nextLine.length()))); //+7 } } private static String scrub(String s) throws Exception{ int start=s.indexOf("&"); int end=s.indexOf(";",start>0?start:0); if(start!= -1 && end != -1) return scrub(s.substring(0, start) +s.substring(end+1)); else return s; } }
I don't know why I couldn't find one out there, but anyway...
pipe a find to it to operate over a directory structure:
#!/bin/bash
fname=start
count=0
total=0
echo "getfile"
while [ "$fname" != "" ]
do
read fname
if [ -f $fname ]
then
count=`grep -v --count xyzzy $fname`
echo "$fname = $count"
let "total=total + count"
fi
done
echo "total= $total"
IntelliJ gets hosed on Fedora, and other 2.6 kernels:
If you add jar files to a project, they appear to imported correctly, but then aren't visible,
and browsing through them in the package explorer shows unnamed classes.
Workaround:
Close IntelliJ
Edit your idea.lax
in the bin directory,
find the lax.nl.java.option.additional
property, and append
-Didea.jars.nocopy=true
to the end of arguement list.
Then delete the contents of $intellij/system/jars
and $intellij/system/caches
Restart, and you may need to recreate your project.