Monday, December 27, 2010
How to Group your Radio Buttons
First add your Radio Buttons to the panel and then select all radio buttons you want to group and set their buttonGroup property (choose the group name from the combo box).
How to add tabbed panel to Java Frame in Netbeans
Select tabbed pane, right click on it and then go to Add From Palette, and selecting another Panel(not tabbed panel again) from there to add another tab.
For renaming the tab righ click on it and choose Edit Text.
For renaming the tab righ click on it and choose Edit Text.
To change the tabs order you can simply right click on the panel and click on Change Order and then re-order the tabs order as you wish.
Saturday, December 25, 2010
AVG detects Chrome as a Trojan threat
The AVG 8.5 seems to have problem. Either update to AVG 9.0 or 2011 free versions (this error is mainly being observed in AVG 8.5) OR revert back virus definition of Avg to previous state.
Revert update to previous version :
Tools -> Advance setting -> Update
and use the Manage to revert ! After that try installing it !
Revert update to previous version :
Tools -> Advance setting -> Update
and use the Manage to revert ! After that try installing it !
Tuesday, December 14, 2010
Live Writer, a Multi weblog solution
You got several websites and you want to publish something with not much differences in all of them. Then Live Writer is the right tool for you. It lets you add different weblogs(from Wordpress, blogger, etc) and update them with couple of clicks. There are other solutions that can publish one post(exactly the same thing) on several weblogs, but they lack some WYSIWYG feature or they simply do not work with some of your weblogs(Wordpress in my case). I can recommend this MS tool for bloggers
Download Live Writer from here.
List of people available in one IRC chat channel
- List of people available in one IRC chat channel
/who
- Gives the real name of the given nickname/username
/who nickname
Wednesday, November 17, 2010
Learn how you can leverage design configurations in Flow Simulation, Solidworks
Intresting topic on SolidWorks about Simulation :
Thursday, November 11, 2010
Net use command in CMD
If you want to map a network drive from command prompt(cmd), you can write the following command :
net use (partition letter): \\server_name\share_name
Example : net use y: \\test_server\test_share
net use (partition letter): \\server_name\share_name
Example : net use y: \\test_server\test_share
Wednesday, November 10, 2010
Link(permalink) pages in wordpress to an external link
You want to redirect pages in your wordpress to an external link ? Now there is a plugin which let you do it :-) The good thing about this ability is that you can re-direct the menu items in your website to external links which was something that Wordpress always lacked.
The plugin name is "Page Liks To". You can download it from here, or simply search the name from your Wordpress control panel. The instruction is as follows :
Done! Now that post or page will point to the URL that you choose
Source : http://txfx.net/wordpress-plugins/page-links-to/
The plugin name is "Page Liks To". You can download it from here, or simply search the name from your Wordpress control panel. The instruction is as follows :
- Upload the page-links-to folder to your /wp-content/plugins/ directory
- Activate the “Page Links To” plugin in your WordPress administration interface
- Create (or edit) a page or a post to have a title of your choosing (leave the content blank)
- Down below, in the advanced section, find the Page Links To widget and add a URL of your choosing
- Optionally check the boxes to enable link opening in a new browser window, or 302 Moved Temporarily redirects
- Save the post or page
Done! Now that post or page will point to the URL that you choose
Source : http://txfx.net/wordpress-plugins/page-links-to/
Monday, November 08, 2010
Forward inline, Thunderbird
If the message you want to forward does not appear as inline in the message you are forwarding, then you need to change the following in Thunderbird Options :
Tools > Options > Composition > General tab, switch "As Attachment" to "Inline".
Tools > Options > Composition > General tab, switch "As Attachment" to "Inline".
Friday, October 22, 2010
Upgrade to Ubuntu 10.10 from Desktop version of Ubuntu 10.04
You want to upgradet to latest Ubuntu version(10.10) and you don't get it in your update menu(upgrade to Ubuntu 10.10), then you need to read the following :
Network Upgrade for Ubuntu Desktops (Recommended) :
Network Upgrade for Ubuntu Desktops (Recommended) :
- System -> Administration menu->Software Sources application
- Open Updates from the Software Sources application window
- Change the Release Upgrade drop down to "Normal Releases" and close the application
- Press Alt-F2 and type update-manager
- Click the Check button to check for new updates.
- If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete.
- A message will appear informing you of the availability of the new release.Click Upgrade.Follow the on-screen instructions.
Source : Ubuntu Community
Thursday, October 21, 2010
Can't find equal sign on Android keyboard
Nope, you are not blind. They managed to hide it on the 3rd page of your keyboard !!! Press the "?123"(12# in some keyboards) Symbol on the bottom Left(right in some local keyboards). Then Press "ALT"(my Norwegian local keyboard ALT button was "1/2") on the Left-hand side to bring up a new variety of symbols including the equal sign.
Tuesday, October 19, 2010
How to find an element in a List and return the index, Python
Check if value exist in a list, L ?
if value in L:
print "list contains", value
Returns the index, where value exist in List, L :
if value in L:
print "list contains", value
Returns the index, where value exist in List, L :
i = L.index(value)
Array of classes in Python
b = [bullet() for x in range(50)]
Reverse a string, Python
def reverseString(s):
"""Reverses a string given to it."""
return s[::-1]
"""Reverses a string given to it."""
return s[::-1]
Python string manipulation problem
In python string are immutable so if you want to just change a character in a string you get following error :
>>>> idx = 1
>>>> s1 = "pxthon"
>>>> s1[idx] = 'y'
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: object does not support item assignment
But you can always go for a way out which is not pretty and can lead to some problems if you are not careful, but works :
s1 = s1[0:idx] + 'y' + s1[idx+1:]
>>>> idx = 1
>>>> s1 = "pxthon"
>>>> s1[idx] = 'y'
> Traceback (most recent call last):
> File "
> TypeError: object does not support item assignment
But you can always go for a way out which is not pretty and can lead to some problems if you are not careful, but works :
s1 = s1[0:idx] + 'y' + s1[idx+1:]
How to append a dictionary in Python
groups = {'IRISH' : 'green', 'AMERICAN' : 'blue'}
# if you want to later add a new one, i.e., 'ITALIAN' : 'orange'
groups['ITALIAN'] = 'orange'
# if you want to later add a new one, i.e., 'ITALIAN' : 'orange'
groups['ITALIAN'] = 'orange'
Python for Java Programmers
If you are a Java programmer and need to learn python, try this link. It is pretty useful.
random function python
random.sample(100,2) -> returns 2 random numbers in range of 100 ...
Python tutorials, video
To learn more about Python you can visit ShowMeDo’s list of Python videoswhich contains 94 Python tutorials including almost 2-hours worth of tuition in the Python Newbies on XP series.
TSP & Python
Montgomery (ShowMeDo author) has started a very nice blog series on Solving the classic Travelling Salesman Problem (TSP) with Python.
So far there are 3 posts in the series:
- Tackling the travelling salesman problem: prologue – gives some background on John’s plans
- Tackling the travelling salesman problem: introduction – defines the TSP and ‘NP-Hard’-ness, discusses how to represent the problem in Python and looks at some of the evolutionary-programming tools that will be used in the solution
- Tackling the travelling salesman problem: hill-climbing – John introduces the concept of a ‘fitness landscape’, how a hill-climbing algorithm can traverse the landscape and how to write the hill-climber with Python
Subscribe to:
Posts (Atom)