Tu Pyar Hai Kisi Aur Ka , Dil Hai Ke Manta Nahin



Let no one who loves be called unhappy. Even love unreturned has its rainbow




..


0 comments:

FOR BEGINNER GIT USAGE SOME USEFUL COMMANDS USING LINUX




WITH THE HELP OF GIT WE CAN VERY EASILY HANDLE OUR PROJECT AS WELL MAINTAIN IT VERSION CONTROL. SO HERE IS SOME USEFUL COMMANDS WHICH ARE VERY HELPFUL TO FOR US :
ONCE YOU COMPLETED YOUR WORK AFTER YOU SHOULD TRY THESE COMMANDS TO PUSH DATA ON THE SERVER.SO BACKUP WILL MAINTAIN ON THE SERVER OTHERWISE WE GET SOME PROBLEMS.

 WITH IN SIMPLE 10 STEPS YOU CAN COMMIT FILES

1) First Clone the remote repo into your local system with the help of this command.
git clone @:REPOPATH


2) How to check branch .Usually it will be *master by default.
git branch


3) How to check branch path
git branch -a | grep release


*4) Create and check out in another branch
 git checkout -b  


5) Check Status of your current branch
git status



6) How to add/modified and deleted file in current branch
 git add *


7) How to add/config user name and email
 git config -global user.name "sonydaman"
git config -global user.email "sonydaman@gmail.com"


8) How to commit your stage/index with message
git commit -a -m "YOUR BRANCH MESSAGE"

*9) How to push files on remote server
git push origin :

 10) Check Logs of all commits
git log


0 comments:

Rolling ball in space

MY FIRST GAME DEVELOPED
WANT TO PLAY JUST
PRESS W TO JUMP
MOVE FORWARD USING ARROW KEY


-->
SonyDaman

1 comments:

ENCRYPT DECRYPT IMAGE IN BASE 64 USING JAVA SCRIPT




These days usage of mobile api  generally we get image encoding in base 64 and we store in our data base directly.

While fetching some kind of issue facing like some images will be crashed and not loaded.Here is the solution for us.



1.) FIRSTLY HOW IS TO BE UPLOAD IMAGE IN TO SERVER 
AND ALSO STORED AND FETCHING IN BASE64 FORMAT IN MONGO DB

Try following example using server side
fs.readFile(req.files.fileName[0].path, function(err, data) {
   var base64data = new Buffer(data).toString('base64');
 //console.log(base64data)
 
 response.mongoDB.insertData(collection,{"image" : base64data},{},
      function(result)
        {    
          response.requestPage.renderPage(res,constant.fileUsageView,constant.rok, {"images" : result})
          
        });
 
 
  })


2)  I am using JADE template so this code looks like this 
Try following example using Try it option available at the top right corner of the below sample code box −
h2 Images
   each image, i in images
    img(src="data:image/jpeg;base64,#{image.image}" alt="#{image._id}")




JUST TRY IT VERY EASY TO USE ;)


0 comments: