Showing posts with label FUN. Show all posts
Showing posts with label FUN. Show all posts

Friday, September 19, 2014

Convert a property like file to a HashMap For Java with Regex in Python

I have a huge list of property like file. Now I need to convert this property like file to a HashMap in Java. Let's say my HashMap variable name is myHashMap. Recently I was playing with RegEx and Python. So I thought why not try to combine RegEx with Python to do this job! So, here's my solution.
NB: I've trimmed the property key and value.



To get the detail of the pattern go to RegEx101 and paste the below expression inside regular expression section.











AUTHOR:OBSCURE

Tuesday, November 6, 2012

Make them all glow, can you?


Instructions:
 Click on orbs arranged in a grid to make them all glow. Clicking on an orb 
changes its state from unlit to lit or lit to unlit along with the 
neighboring orbs. Turn on all the orbs to pass a level with as few moves 
as you can. There are 9 levels, each with more orbs than the previous one.
Two difficulty modes. In the easy mode, all orbs are unlit in the beginning 
and in the hard mode, some orbs are already lit to make things difficult 
for the player.
Author:
MUKTO SOFTWARE LTD.

Thursday, December 22, 2011

YOUTUBE-REWIND

[2011-THE YEAR IN REVIEW]



See what the world watched on YouTube in 2011 with YouTube Rewind.

You can goto YouTube Rewind timeline from here: YouTube-Rewind-2011

Wednesday, December 7, 2011

CARGO BRIDGE-2


Design a bridge that will allow you to safely move your cargo from one side to the other. You have a limited amount of money to build each bridge.

Saturday, September 18, 2010

যারা থিসিস করতে চান, তাদের প্রতি...........

দৃশ্য ১: বনের মধ্যে চমৎকার রৌদ্রোজ্জ্বল এক দিন। খরগোশটি তার নিজের গর্ত থেকে বের হয়ে কম্পিউটার চালু করে, মাইক্রোসফট ওয়ার্ড ওপেন করে, টাইপ করতে লাগল। হাঁটতে বেরিয়ে খরগোশকে দেখে পা টিপে টিপে তার কাছে আসল এক শেয়াল।

শেয়াল: [থাবা বের করে ধূর্ত হাসি দিয়ে] কী করছিস তুই?
খরগোশ: থিসিস লিখছি আমার, আগামী পরশু জমা দিতে হবে।
শেয়াল: [তাচ্ছিল্যভরে] অ! তা কীসের থিসিস?
খরগোশ: ওহ, আমার থিসিসের বিষয় হচ্ছে "খরগোশরা কীভাবে শেয়ালদের খায়!"
[বিশাল নিরবতা নেমে আসে কথোপকথনে]
শেয়াল: লিখলেই হলো! গুলতানির আর জায়গা পাস না। যেকোনো গাধাও জানে খরগোশরা কখনো শেয়াল খায় না।
খরগোশ: অবশ্যই খায়। আমি প্রমাণ দেখাচ্ছি, এসো আমার সাথে ।


খরগোশ ও শেয়াল খরগোশের গুহায় ঢুকে যায়। কয়েক মিনিট পর শুধু খরগোশ ফিরে আসে, তারপর আগের মতো ওয়ার্ডে লিখতে থাকে।

দৃশ্য ২: একটু পর গুহার কাছে আসে নেকড়ে। খরগোশের লেখা দেখে খুব কৌতূহল জাগে তার।
নেকড়ে: কী লিখছিস রে?
খরগোশ: "খরগোশরা কীভাবে নেকড়ে খায়", তার উপর একটা থিসিস করছি।
নেকড়ে: [অট্টহাসিতে ফেটে পড়তে পড়তে] এ রকম রাবিশ একটা জিনিস নিশ্চয়ই পাবলিশ করার চিন্তা করছিস না তুই! নাকি চিন্তা করছিস?
খরগোশ: রাবিশ না, আমার সাথে এসে দেখে যাও।

দুজনে ঢুকে পড়ে খরগোশের গর্তে, এবং আগের মতোই শুধু খরগোশ ফিরে আসে খানিক পর, মন দেয় থিসিস লেখায়।

দৃশ্য ৩: খরগোশের গুহা। এক কোণায় দেখা যায় শেয়ালের হাড়ের স্তুপ পড়ে আছে, অন্য কোণায় নেকড়ের হাড়ের স্তুপ। আরেক কোণায় বিশালদেহী এক সিংহ বসে বসে দাঁত খিলাচ্ছে।

নৈতিক শিক্ষা: থিসিসের বিষয়বস্তু হিসেব তুমি কী নির্ধারণ করেছ, তা কোনো ব্যাপার নয়। তথ্য-উপাত্তের জন্য কোন পদ্ধতি অবলম্বন করেছ, তাও কোনো ব্যাপার নয়। আসল ব্যাপার হলো,তোমার থিসিস সুপারভাইজর কে?

[সংগৃহীত, সূত্রঃ কৌতুক: থিসিস সুপারভাইজর - দ্যা ডেডলক -সামহোইয়ার-ইন-ব্লগ]