Enable Dashboard in OS X El Capitan

So when you start your os you will see no dashboard there don’t panic it is disabled by default.
Just go to System Preference -> Mission Control you will see off beside Dashboard. From the drop down menu you can choose either As Space or As overlay. As Space is the old way to show the dashboard so an extra desktop screen will be added in the left most side. As overlay means it will appear as overlay so you can use either keyboard shortcut or hot corners which you can choose by clicking the button Hot Corners. When you will hover your mouse pointer in the hot corners the dashboard will appear.

Enjoy 🙂

View Animation vs Property Animation in Android

Sometimes we need to animate some view in our application. Here is a sample code for translate a view over x axis from its location.


Button bt;
bt = (Button) findViewById(R.id.bt);
bt.setOnClickListener(this);

TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 300, Animation.RELATIVE_TO_SELF, Animation.RELATIVE_TO_SELF);
animation.setDuration(1000);
animation.setFillAfter(true);
bt.setAnimation(animation);

But the problem of this code is if you want to click this button after animate you can not, why lets read the documentation from android developer site

disadvantage of the view animation system is that it only modified where the View was drawn, and not the actual View itself. For instance, if you animated a button to move across the screen, the button draws correctly, but the actual location where you can click the button does not change, so you have to implement your own logic to handle this.

more

To solve this issue we will use ObjectAnimator class to animate our view.


ObjectAnimator animXNext = ObjectAnimator.ofFloat(bt, "translationX", Animation.RELATIVE_TO_SELF, 300);
animXNext.setDuration(1000);
animXNext.start();

Now you can click on the button. Enjoy 🙂

Work on progress

Hello everyone.

Today i am gonna talk about my new upcoming projects.

1. oblivion

Well by using the python programme you can determine total lines of any file. The main goal of the project is that, i wanted to know how many lines of code i wrote so far.

#!/usr/bin/env python
# beta
# Lisence Under GPL2
# Author: S.Mahbub-Uz-Zaman
import fnmatch
import os
def count_lines(filePath):
f = open(filePath)
lines = sum(1 for line in f)
f.close()
return lines
def main():
sum = 0
for root, dirnames, filenames in os.walk('.'):
#if root.split(os.path.sep)[-1] == "Dropbox":
#print "dropbox"
#continue
for filename in fnmatch.filter(filenames, '*.java'):
sum += count_lines(os.path.join(root, filename))
print 'whhhhat ',sum
if __name__ == '__main__':
main()

view raw
oblivion.py
hosted with ❤ by GitHub

2. Tech History

I am gonna put small description of tech giants like IBM, Google, Apple etc.

// Compiled by: S.Mahbub-Uz-Zamanm

// https://mahbubzaman.wordpress.com/

# International Business Machines (IBM) (Big Blue)

Founder(s): Thomas J. Watson Charles and Ranlett Flint
Founded: June 16, 1911, Endicott, New York, U.S.

source:
http://en.wikipedia.org/wiki/IBM

# Microsoft

Founder(s): Bill Gates and Paul Allen
Founded: April 4, 1975, Albuquerque, New Mexico, U.S.

Mou icon

It’s the 1970s. At work, we rely on typewriters. If we need to copy a document, we likely use a mimeograph or carbon paper. Few have heard of microcomputers, but two young computer enthusiasts, Bill Gates and Paul Allen, see that personal computing is a path to the future.

In 1975, Gates and Allen form a partnership called Microsoft. Like most start-ups, Microsoft begins small, but has a huge vision—a computer on every desktop and in every home. During the next years, Microsoft begins to change the ways we work.

In June 1980, Gates and Allen hire Gates’ former Harvard classmate Steve Ballmer to help run the company. The next month, IBM approaches Microsoft about a project code-named “Chess.” In response, Microsoft focuses on a new operating system—the software that manages, or runs, the computer hardware and also serves to bridge the gap between the computer hardware and programs, such as a word processor. It’s the foundation on which computer programs can run. They name their new operating system “MS‑DOS.”

When the IBM PC running MS‑DOS ships in 1981, it introduces a whole new language to the general public. Typing “C:” and various cryptic commands gradually becomes part of daily work. People discover the backslash (\) key.

MS‑DOS is effective, but also proves difficult to understand for many people. There has to be a better way to build an operating system.

Geek trivia: MS‑DOS stands for Microsoft Disk Operating System.

source:
http://windows.microsoft.com/en-us/windows/history#T1=era0

# Apple

Founder(s): Steve Jobs, Steve Wozniak, and Ronald Wayne
Founded: April 1, 1976, Cupertino, California

The Apple I personal computer kit, a computer single handedly designed by Wozniak. The kits were hand-built by Wozniak John Sculley became CEO of Apple on April 8, 1983, a position he held until leaving in 1993

source:
http://en.wikipedia.org/wiki/Apple_Inc.
http://en.wikipedia.org/wiki/John_Sculley

# Oracle Corporation

Founder(s): Larry Ellison, Bob Miner, Ed Oates
Founded: June 16, 1977, Santa Clara, California, U.S.

source:
http://en.wikipedia.org/wiki/Oracle_Corporation

# Cisco

Founder(s): Leonard Bosack and Sandy Lerner
Founded: 1984, San Francisco, California, U.S.

source:
http://en.wikipedia.org/wiki/Cisco_Systems

# Paypal

Founder(s): Ken Howery, Max Levchin, Elon Musk, Luke Nosek and Peter Thiel
Founded: June 1998, Palo Alto, California

source:
http://en.wikipedia.org/wiki/PayPal

# Google

Founder(s): Larry Page and Sergey Brin
Founded: September 4, 1998, Menlo Park, California

In 1995 Larry Page and Sergey Brin meet at Stanford. Larry, 22, a U Michigan grad, is considering the school; Sergey, 21, is assigned to show him around.

In 1996 Larry and Sergey begin collaborating on a search engine called BackRub. BackRub operates on Stanford servers for more than a year—eventually taking up too much bandwidth.

In 1997 Google.com is registered as a domain on September 15. The name—a play on the word “googol,” a mathematical term for the number represented by the numeral 1 followed by 100 zeros—reflects Larry and Sergey’s mission to organize a seemingly infinite amount of information on the web.

source:
http://www.google.com/about/company/history/
http://en.wikipedia.org/wiki/Google

Wikipedia

Founder(s): Jimmy Wales, Larry Sanger
Founded: January 15, 2001

source:
http://en.wikipedia.org/wiki/Wikipedia

# Linkedin

Founder(s): Reid Hoffman, Allen Blue, Konstantin Guericke, Eric Ly and Jean-Luc Vaillant
Founded: 2003, Santa Monica, California

source:
http://en.wikipedia.org/wiki/LinkedIn

# Facebook

Founder(s): Mark Zuckerberg, Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes
Founded: February 4, 2004

source:
http://en.wikipedia.org/wiki/Facebook

# YouTube

Founder(s): Steve Chen, Chad Hurley, and Jawed Karim
Founded: February 14, 2005

source:
http://en.wikipedia.org/wiki/YouTube

# Twitter

Founder(s): Jack Dorsey, Noah Glass, Evan Williams, Edward Cramer and Biz Stone
Founded: March 21, 2006

source:
http://en.wikipedia.org/wiki/Twitter

view raw
tech_history.md
hosted with ❤ by GitHub

Enjoy 🙂

SQLite Keywords

Few days back i was working with an android project which requires database. So one of the table column name was match, but i was getting error for that. I searched on the net and found that it is a SQLite Keywords. Here is the list below

ABORT
ACTION
ADD
AFTER
ALL
ALTER
ANALYZE
AND
AS
ASC
ATTACH
AUTOINCREMENT
BEFORE
BEGIN
BETWEEN
BY
CASCADE
CASE
CAST
CHECK
COLLATE
COLUMN
COMMIT
CONFLICT
CONSTRAINT
CREATE
CROSS
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
DATABASE
DEFAULT
DEFERRABLE
DEFERRED
DELETE
DESC
DETACH
DISTINCT
DROP
EACH
ELSE
END
ESCAPE
EXCEPT
EXCLUSIVE
EXISTS
EXPLAIN
FAIL
FOR
FOREIGN
FROM
FULL
GLOB
GROUP
HAVING
IF
IGNORE
IMMEDIATE
IN
INDEX
INDEXED
INITIALLY
INNER
INSERT
INSTEAD
INTERSECT
INTO
IS
ISNULL
JOIN
KEY
LEFT
LIKE
LIMIT
MATCH
NATURAL
NO
NOT
NOTNULL
NULL
OF
OFFSET
ON
OR
ORDER
OUTER
PLAN
PRAGMA
PRIMARY
QUERY
RAISE
RECURSIVE
REFERENCES
REGEXP
REINDEX
RELEASE
RENAME
REPLACE
RESTRICT
RIGHT
ROLLBACK
ROW
SAVEPOINT
SELECT
SET
TABLE
TEMP
TEMPORARY
THEN
TO
TRANSACTION
TRIGGER
UNION
UNIQUE
UPDATE
USING
VACUUM
VALUES
VIEW
VIRTUAL
WHEN
WHERE
WITH
WITHOUT

source : http://www.sqlite.org/lang_keywords.html

WorldCup Football 2014 Android Application

We Just lunched our latest Android app on WorldCup 2014. Here are few reason how this app will increase your productivity and reduce your effort during this World Cup.

1. keep yourself updated with the most accurate schedule of every match,
2. Set reminder for your every favorite matches ,
3. App will detect your local time zone so just set the reminder and enjoy.
4. Live score updated

Our promotional flyer
world_cup

Play Store Link

img

Back in 2012 we started a small start-up called Rupantor (Transform). This is our 9th app, please support us on Facebook

Thanks, Enjoy 🙂

টার্মিনাল কমান্ড বাংলায় (Termianl Commands in Bangla)

Few days ago i wrote some code to execute terminal commands in Bangla.

Code

// Author Shouro and Mahbub
// 24 February, 2014
alias লিস্ট='ls'
alias ঢুকি='cd'
alias দেখ='vim'
alias কপি='cp'
alias মুছ='rm'
alias পুস্তিকাবানাও='mkdir'

For Mac

The following command will append the code in your .bash_profile file

$ echo alias ঢুকি='cd' >> .bash_profile

To see the changes

$ cat .bash_profile

Now try the bangla command in a new Terminal window

Video
https://www.youtube.com/watch?v=_uBdt6DcU5E

view raw
README.md
hosted with ❤ by GitHub

Video

Enjoy 🙂

Understanding Android Activity Lifecycle (Part Four)

1. when the user close the application forcefully
2. when Android it self destroy the Activity.
3. when user hits the back button

Unfortunately you can not distinguish between 1 and 2.

But you can do something when user clicks the back button since onPause() is called after onBackPressed(),
so you can put a flag in the onBackPressed(). That way you can distinguish how it landed here

onBackPressed() -> onPause() or

home button / multitask button -> onPause()

Enjoy 🙂