Archive

Archive for November, 2010

sed: 1: file: extra characters at the end of l command

November 24th, 2010 1 comment

On *BSD you must use

sed -i '' -e 's/FIND/REPLACE/' file

Categories: Malo mešano Tags:

nano Command Manual

November 24th, 2010 Comments off

5 Nanorc Files

set undo
set historylog
set tabsize 4
set const

via nano Command Manual.

Categories: Linux Tags:

Java Proxy – Java Program to Access computers behind firewall

November 24th, 2010 Comments off
Categories: Java Tags:

Business support forums – HP Deskjet 1280 driver for Windows 7?

November 14th, 2010 Comments off

Do the following:

1. Go to Devices and printers on the Start Menu

2. Click in the button Add printer (in the tool bar)

3. Click on Add Local Printer, in the new window.

4. Use the settings: "Use an existing port: LPT1: (Printer Port)". And click on the Next button.

5. Choose the Manufacter: HP and printer: HP Deskjet 1220C. After that click on Next.

6. Now that you have the printer added, go to the Devices and Printers window, that you opened in the 1. and click with the right button in the printer that’ve added and click on Printer Properties.

7. Go to the Ports tab.

8. Select the port USB001 and click OK.

9. Now you can use the printer!!

via Business support forums – HP Deskjet 1280 driver for Windows 7?.

Categories: Malo mešano Tags:

Java: save any component as JPEG

November 11th, 2010 Comments off

public static void saveComponentAsJPEG(Component myComponent, String filename) {<br />
	&nbsp;&nbsp;&nbsp; Dimension size = myComponent.getSize();<br />
	&nbsp;&nbsp;&nbsp; BufferedImage myImage = <br />
	&nbsp;&nbsp;&nbsp; new BufferedImage(size.width, size.height,<br />
	&nbsp;&nbsp;&nbsp; BufferedImage.TYPE_INT_RGB);<br />
	&nbsp;&nbsp;&nbsp; Graphics2D g2 = myImage.createGraphics();<br />
	&nbsp;&nbsp;&nbsp; myComponent.paint(g2);<br />
	&nbsp;&nbsp;&nbsp; <br />
	&nbsp;&nbsp;&nbsp; <br />
	&nbsp;&nbsp;&nbsp; ImageSelection imgSel = new ImageSelection(myImage); <br />
	&nbsp;&nbsp;&nbsp; Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imgSel, null); <br />
	&nbsp;&nbsp;&nbsp; <br />
	&nbsp;&nbsp;&nbsp; try {<br />
	&nbsp;&nbsp;&nbsp; OutputStream out = new FileOutputStream(filename);<br />
	&nbsp;&nbsp;&nbsp; JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);<br />
	&nbsp;&nbsp;&nbsp; encoder.encode(myImage);<br />
	&nbsp;&nbsp;&nbsp; out.close();<br />
	&nbsp;&nbsp;&nbsp; } catch (Exception e) {<br />
	&nbsp;&nbsp;&nbsp; System.out.println(e); <br />
	&nbsp;&nbsp;&nbsp; }<br />
	} } 

Categories: Java Tags:

IE 8 cannot access any internet web pages [Solved]

November 11th, 2010 Comments off

Open IE

Tools tab > Internet Options > Advanced > Click Reset…

Finally:

Restart IE.

Other options are:

1) Uninstall the Network adapter

Open Device Manager > Expand Network Adapter > Right Click on your internet network adapter and Uninstall

Reboot

If it doesn’t work, try it again and then reinstall the driver. You may have to get the new driver from the device website.

2) Winsock and Tcp/Ip Fix

Start > Run > Type CMD > Type the following:

Reset TCP/IP stack to installation defaults, type: netsh int ip reset reset.log

Press Enter > Type the following:

Reset WINSOCK entries to installation defaults, type: netsh winsock reset catalog

Push Enter

3) Run sfc /scannow

Insert your XP disc

Start > Run > Type CMD > Type the following:

sfc /scannow

via IE 8 cannot access any internet web pages [Solved].

Categories: Malo mešano Tags:

Move the Users Directory in Windows 7

November 9th, 2010 Comments off

Move the Users Directory in Windows 7

via Move the Users Directory in Windows 7.

Categories: Malo mešano Tags:

How to copy/paste a line in nano editor

November 3rd, 2010 Comments off

Select – Copy – PasteSelect: ALT + M + ACopy: ALT + 6Paste: CTRL + U

via How to copy/paste a line in nano editor.

Categories: Malo mešano Tags:

How to get fixed ips in openvpn ? – Web Hosting Talk

November 2nd, 2010 Comments off

Each pair of ifconfig-push addresses represent the virtual client and server IP endpoints. They must be taken from successive /30 subnets in order to be compatible with Windows clients and the TAP-Win32 driver. Specifically, the last octet in the IP address of each endpoint pair must be taken from this set:PHP Code:

[ 1, 2] [ 5, 6] [ 9, 10] [ 13, 14] [ 17, 18]
	[ 21, 22] [ 25, 26] [ 29, 30] [ 33, 34] [ 37, 38]
	[ 41, 42] [ 45, 46] [ 49, 50] [ 53, 54] [ 57, 58]
	[ 61, 62] [ 65, 66] [ 69, 70] [ 73, 74] [ 77, 78]
	[ 81, 82] [ 85, 86] [ 89, 90] [ 93, 94] [ 97, 98]
	[101,102] [105,106] [109,110] [113,114] [117,118]
	[121,122] [125,126] [129,130] [133,134] [137,138]
	[141,142] [145,146] [149,150] [153,154] [157,158]
	[161,162] [165,166] [169,170] [173,174] [177,178]
	[181,182] [185,186] [189,190] [193,194] [197,198]
	[201,202] [205,206] [209,210] [213,214] [217,218]
	[221,222] [225,226] [229,230] [233,234] [237,238]
	[241,242] [245,246] [249,250] [253,254] 

via How to get fixed ips in openvpn ? – Web Hosting Talk.

Categories: Malo mešano Tags:
17138 pages viewed, 0 today
11135 visits, 0 today
FireStats icon Powered by FireStats