I got new wireless router, and I wanted to make sure I can use machine names to ping other computers on the network. In my setup, I have windows, linux and macosx machines, and I was never able to really ping them by name on local wireless network. That is really an annoying thing, so... I decided to resolve it.
My new setup:
1. DD-WRT enabled router.
2. I setup DNS server to serve local network, and to expand local names by specifying additonal options:
local=/local/
expand-hosts
This almost worked... i.e. I was able to ping Windows machine from all three, I was able to ping MacOSX from all three machines, but Windows was unable to ping Linux.
After trying to figure out what is wrong I learned that you have to install samba, as nmbd is actually responsible with registering Linux with Windows.
I hope you will find this helpful.
Monday, August 31, 2009
See your linux box on your wireless network
Posted by
Ivica Ceraj
at
4:36 PM
0
comments
Labels: local network, lookup, nslookup, ping, ubuntu, windows
Tuesday, July 21, 2009
Java Native Font Viewer
Hi,
I just published a Java Applet that allows you to see how text looks when displayed using native fonts in various sizes.
The reason behind developing this applet is to experiment with ability to customize Swing application with better looking fonts that fonts used by default L&F.
Wednesday, April 1, 2009
How to create incremental project builder in Eclipse?
I wanted to build incremental project builder in Eclipse today.
There is nothing on the top level of the "New Project" wizard to indicate how to build it. Quick search on the web didn't yield any usable result so, I guess posting a short post about it may be useful.
One builds incremental project builder by selecting "Plug-in development" and after 2-3 steps one is able to select among:
- Hello World
- Hello World Command
- Plug-in with a multi-page editor
- Plug-in with a popup menu
- Plug-in with a property page
- Plug-in with a view
- Plug-in with an editor
- Plug-in with an incremental project builder
- Plug-in with sample help content.
Selecting incremental project builder adds sample project builder, project nature, problem marker and popup menu action - so all the things I need.
Cool!
Sunday, December 14, 2008
Toner refill kit recommended
My home laster printer (Samsung ML-1710) really needed a new toner. After a bit of comparison, I figured, I'll give a try to toner refill kits.
I got a Universal refill kit #6. It is a breeze to replace, but look at the instructions first. On Samsung's toner you need to drill the hole on the right, pour some toner in and put a cap on.
Happy printing.
Seagate date code
Last week my Seagate hard drive broke. It had weird date code on it. I figured that on the internet there has to be a place where someone posted how to decrypt this 5 digit number.
After a bit of search I have found PDF explaining it, but I noticed I could not find a on-line calculator. Given that calculation is not hard to do, but still not intuitive for human to calculate I wrote a little calc that solves that problem for myself and anyone who is wandering what the date is (this may be important to figure out if your drive is under warranty).
So, here is Seagate date code calculator.
Enjoy.
Friday, October 17, 2008
jflvlib-0.1 released
JFlvLib is a library that allows writing of Flash Videos (FLV format).
To use library user instantiates Capture instance using CaptureFactory class.
Capture c = CaptureFactory.getCapturer( os , new Dimension(xx , yy) ) ;
Capture interface provides 2 methods:
// generates new frame in compatible format for writing frame
BufferedImage newFrame();
// writes a frame to FLV stream
void writeFrame( BufferedImage image , int timestamp ) throws IOException;
At this stage library implements video only, SCREENVIDEO_CODEC and it generates only key frames. This is good for producting videos but they are larger than they need to be.
That's it.
TODO:
Optimize FLV creation writing not only keyframes but also interframes.
Implement other codecs (JPEG, H263, ...)
Add audio support
Example:
package edu.mit.star.flvexample;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import edu.mit.star.flv.Capture;
import edu.mit.star.flv.CaptureFactory;
public class Main
{
public static void main(String[] args)
{
try
{
OutputStream os = new java.io.FileOutputStream( "z:\\temp\\test.flv" );
int xx = 256 ;
int yy = 512 ;
Capture c = CaptureFactory.getCapturer( os , new Dimension(xx , yy) ) ;
int time = 0 ;
while( time < 5000 )
{
BufferedImage image = c.newFrame() ;
image.getGraphics().drawOval(0, 0, xx*time/5000, yy*time/5000);
image.flush();
c.writeFrame(image, time);
time += 250;
System.out.println( "Generating " + time + " ms frame.");
}
os.close();
}
catch( IOException ex )
{
ex.printStackTrace();
}
}
}
Thursday, March 20, 2008
Getting UNIX process ID in Java
We encountered a need to kill process spawned by Runtime.getRuntime().exec() in java in a bit friendlier way than Process.destroy() provides for. To do this, easiest way is to execute "kill -number PID".
Process ID is not available as part of the interface, and below is outlined hack to get that information:
public class test
{
public static void main( String[] str )
{
try
{
Runtime r = Runtime.getRuntime() ;
Process p = r.exec( "sleep 200" ) ;
java.lang.reflect.Method m = p.getClass().getDeclaredMethod( "ac cess$100" , new Class[] { p.getClass() } ) ;
m.setAccessible(true);
Object ret = m.invoke( p , new Object[] { p } ) ;
System.out.println( "process ID " + ret ) ;
System.out.println( "Press Ctrl-Z and ps to confirm" ) ;
Thread.sleep( 100000 ) ;
}
catch( Exception e )
{
e.printStackTrace() ;
}
System.exit(1);
}
}