Sunday, 17 April 2016

How to transfer and received file beagle bone to FTP server in fedora

 How to transfer and received file beagle bone to FTP server in        fedora

Server Side:
 
Step 1:In vsftpd.conf file (/etc/vsftpd/vsftpd.conf) editthis lines.

 anon_other_write_enable=YES
dirmessage_enable=YES
dirlist_enable=YES
no_anon_password=YES
file_open_mode=0777
guest_enable=YES
anon_upload_enable=YES


Step 2 : start service vsftpd (service vsftpd start)
Step 3: stop firewall (systemctl stop firewalld.service)
step 4: mount --bind /default directory/ /var/ftp

Client side: 

Step 1: stop firewall service

from ftplib import FTP

import os



flag = True



while(flag):

        os.system("ifconfig eth0 192.168.5.2")

        ftps = FTP('172.16.1.176')

        ftps.login('apcoer','12345678')



        print "Select an option for transfering files:\n1.Machine to BBB\n2. BBB to machine"

        print "3.FTP to BBB\n4.BBB to FTP\n5.Exit"

        choice = int(input())

        if choice == 1:

                mcip = raw_input("Enter the ip of machine from where the file is to be received: ")



                user = raw_input("Enter the user from  whom the file is to be received: ")

                filename = raw_input("Enter path of the file to be received: ")

                destpath = raw_input("Enter the path where the file is to be stored: ")

                os.system("scp "+user+"@"+mcip+":"+filename+" "+destpath)

                print "File received successfully"





        elif choice == 2:

                mcip = raw_input("Enter the ip of machine to send files to: ")

                user = raw_input("Enter the user to whom the file is to be sent: ")

                destpath = raw_input("Enter where the file should be stored on receiving machine: ")

                filename = raw_input("Enter the path to the file to be sent: ")

                os.system("scp "+filename+" "+user+"@"+mcip+":"+destpath)

                print "File successfully sent"



        elif choice == 3:

             ftps.retrlines('LIST')

                filename = raw_input("Enter the filename to be downloaded: ")

                ftps.retrlines('RETR '+filename, open(filename,"wb").write)

                print "File successfully downloaded"



        elif choice == 4:

                filename = raw_input("Enter the filename which is to be sent: ")
        print filename
                #ftps.storlines("STOR " + os.path.basename(filename), open(filename))
        ftps.storlines('STOR '+os.path.basename(filename), open(os.path.basename(filename),w"/var/ftp"))

                print "File successfully uploaded"



        else:

                flag = False

Monday, 8 February 2016

How to connect beaglebone

1)
[apcoer@localhost-localdomain ~]$ ssh root@192.168.7.2
The authenticity of host '192.168.7.2 (192.168.7.2)' can't be established.
ECDSA key fingerprint is c0:81:1a:f4:58:b9:51:15:00:df:ee:71:c4:d9:fd:54.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.7.2' (ECDSA) to the list of known hosts.
Debian GNU/Linux 7

BeagleBoard.org BeagleBone Debian Image 2014-04-23

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
Last login: Wed Apr 23 20:27:40 2014 from 192.168.7.1
root@beaglebone:~# vnc
-bash: vnc: command not found
root@beaglebone:~# vncserver

New 'X' desktop is beaglebone:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/beaglebone:1.log

root@beaglebone:~#

2) open remote desktop



Wednesday, 9 December 2015

Android: Using button and setting up on-click listener


  1. src/com/example/blackVwhite/mainactivity.java contains the code
  2. res/layout/activity_main.xml contains the layout 





  • program to Change the screen color to RGB i.e Red,Green & Blue using buttons


Android: Coming soon ...

android is almost similar to Java ...
no big fuzz, i could code it earlier but starting it right from the Scratch !

Sunday, 20 September 2015

JAVA: String to Star pattern


PS: my friend asked me to do this program and i have just proved that my l0gic was right! i haven't added the all the alphabets as it was time consuming but a string like F###-OFF does work! :P

Monday, 6 July 2015

Top games 2K15



 

Batman: Arkham Knight :-

The final game in the Arkham series, Arkham Knight is the first new-gen game in Rocksteady’s incredible foray into the Batman universe. It’s also the first time you can drive the Batmobile. It looks amazing, and makes me want to play through all the Arkham games again ahead of time.

 

http://cdn.overclock.net/c/c3/c37da9eb_2k-batman-wallpapers-10.jpeg 

 Bloodborne:-

  There aren’t many games on this list that pique my hype as much as Bloodbornethe spiritual successor to From Software’s Souls games. This time around, the game is set in a dark, Gothic world filled with shambling villagers and massive werewolves. The combat is fast and ferocious, and new gameplay elements such as randomly generated dungeons promise to greatly change up a familiar formula, while still keeping the same, distinctive sense of challenge and despair.

http://blogs-images.forbes.com/erikkain/files/2014/08/bloodborne_large_art-1152x720.jpg

 

Scalebound:- 

 Another Xbox One exclusive, I’m of the mind that you can’t really go wrong with Platinum Games, the developer responsible for games like Devil May Cry, Bayonetta, and Metal Gear Rising: Revengeance. This time around, action-game master Hideki Kamiya brings us a game world populated by massive dragons, and a fighting game that sounds little like his previous work. After the brilliant Bayonetta 2 and charming Wonderful 101, hype is basically a Platinum Games default setting. Scalebound looks very cool. 

 

http://vignette1.wikia.nocookie.net/platinumgames/images/1/1f/Scalebound_cover.png/revision/latest?cb=20140614174940 

 

 

 

 

 

 

Heroes of the Storm:-

It wasn’t going to be long until Blizzard entered the MOBA fray, and Heroes of the Storm is their stab at taking on Dota and League of Legends. Yet this 5v5 arena game isn’t just another Dota clone. Instead Blizzard have made a game that is vastly more accessible than your regular MOBA, whilst still tightly holding on to the core characteristics of the genre such as complex heroes and memorising skill sets. 

Heroes of the storm

PL-1 : All practicals group assignments

PL-1 : All group assignments