Monday, 27 July 2015

Firefox have trouble adding attachments to emails using Gmail

Try to set the Boolean pref network.http.spdy.enabled to false on the about:config page.

Sunday, 22 December 2013

Mac O2 Wireless Box IV not able to connect external harddrive

Mac O2 Wireless Box IV not able to connect external hard-drive

I was not able to connect to Thomson Wireless box IV which came with O2.

The final answer is

Open Terminal

type in

$
sudo sysctl -w net.smb.fs.kern_deprecatePreXPServers=0


Then Open the finder.

You can see O2 There

username ::  Administrator

password :: the password back of your box

Thanks to

(http://community.o2.co.uk/t5/Home-Broadband-Home-Phone/Mac-OSX-Lion-Samba-Stopped-Wireless-Box-IV-to-be-upgraded/td-p/206042/page/2)

Sunday, 15 December 2013

I was wondering how to see the performance of GPU in mac Lion OSX


I was wondering how to see the performance of GPU in mac Lion OSX



Mac Activity monitor in utilities see ditn get me more inforamtion.

Than downloaded atMonitor.  http://www.atpurpose.com/atMonitor/


If you want to release some ram, do a purge

$  purge

It works for me hope it helps others as well

Wednesday, 4 December 2013

Bitcoin Faucets

Here I am going to list the bit coin faucets which I have tried. You can drop in some bitcoins for me to text the working links


My Wallet

Bit coin    :: 195No4ADioPeXa5kL5H98y396EVpDfKSKf

Lite coin  ::


What is a Bitcoin faucet?


A faucet in the alternate currency world is basically a website that gives you a small amount of the coin for free, whether because of the advertising revenue they have on the site, various clicks they get, or because they are interested in promoting their crypto-currency & if someone has a stake in that crypto-currency then they are more likely to promote it. So then what is a Bitcoin faucet? A bitcoin faucet does every a faucet does except it gives you the crpyto-currency Bitcoin. Recently hitting a high of $395/bitcoin faucets now pay out more than ever. Bitcoin faucets are especially good for those with empty wallets whom want to see some coins in there - or those with a small number of coins. Check out the below links to get some free bitcoins!

1.Bitcoin Faucet 1

2.Bitcoin Faucet 2

3. Bitcoin Faucet 3

4.  Bitcoin Faucet4

5. Bitcoin Faucet 5

Friday, 18 January 2013

Resize the Ubuntu VDI



command to increase(resize) the virtual box, this command resize the current ubuntu.vdi to 20GB

>VBoxManage modifyhd ubuntu.vdi --resize 20480

Friday, 9 November 2012

sample mongodb

http://city81.blogspot.co.uk/2012/07/using-spring-data-to-access-mongodb.html


SpringMongoConfig.java



import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.document.mongodb.MongoTemplate;
import org.springframework.data.document.mongodb.config.AbstractMongoConfiguration;
import com.mongodb.Mongo;


@Configuration
public class SpringMongoConfig extends AbstractMongoConfiguration {

@Override
public @Bean Mongo mongo() throws Exception {

return new Mongo("localhost");
}

@Override
public @Bean MongoTemplate mongoTemplate() throws Exception {

return new MongoTemplate(mongo(),"blog","users");
}
}



MongoApp.java (Main)


import java.net.UnknownHostException;

import com.mongodb.BasicDBObject;

import com.mongodb.DB;

import com.mongodb.DBCollection;

import com.mongodb.DBCursor;

import com.mongodb.Mongo;

import com.mongodb.MongoException;

public class MongoApp {
public static void main(String[] args) throws UnknownHostException {
try {
// connect to mongoDB
Mongo mongo = new Mongo("localhost", 27017);
// if database doesn't exists, mongoDB will create it
DB db = mongo.getDB("blog");
// Get collection from MongoDB, database named "mydb"
// if collection doesn't exists, mongoDB will create it
DBCollection collection = db.getCollection("users");
// create a document to store attributes
BasicDBObject document = new BasicDBObject();
document.get("_id");
// save it into collection named "myCollection"
System.out.println( collection.find());


DBCursor cur = collection.find();
while(cur.hasNext()) {
    System.out.println(cur.next());
}
// search query


} catch (MongoException e) {

e.printStackTrace();

}

}

}


User.java


public class User {
private String id;
private String password;

public User(){};
public User(String id, String password) {
super();
this.id = id;
this.password = password;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}


/**
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

    @Override
public String toString() {
return "User [id=" + id + ", firstname=" + password"]";
}
}




pom.xml


Just change the groupID by your package name



<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId></groupId>
<artifactId>SpringExample</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>SpringMongoExample</name>
<url>http://maven.apache.org</url>

<repositories>
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>

<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>

<!-- mongodb java driver -->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.5.2</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.0.0.M2</version>
</dependency>

<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>

</project>





Thursday, 8 November 2012

A new site for tutorial on Java ...



Today I was browsing the http://java-champions.java.net/

I was going through one of the Java champion Lars Vogel is the founder and CEO of vogella GmbH


He has got very good tutorials for Java Based, Android based


http://www.vogella.com/tutorials.html

Hope this helps someone ...