Buy XRP & Sleep Well At Night

Hodor's XRP Blog

I’m sure you’ve seen it yourself already, if you’ve entered crypto:

The frazzled trader. stressed_trader

This person is iconic – a crypto trader that moves his money on a whim, hoping to catch a quick ride upwards from recent news, social media updates, or other rumors.  They are not serene individuals, and it’s apparent that the stress of following a market that never closes has taken its toll.

And I’m talking about individuals that do this full-time: What about the ordinary stock investor that has a regular 9-5 job?  Are they supposed to set aside their regular career just to follow crypto movements?

No.  To manage the stress of being “in crypto” while also pursuing their normal career, new investors will need to choose investments that allow them to continue with their normal life without being distracted by the temporary gyrations within the crypto industry.  I was one of those individuals…

View original post 3,428 more words

Advertisements

Do you want to Retire Early in India? A detailed guide with Excel calculator

a must read for today’s generation

Saving Habit

On the occasion of Dhanteras I’m re-posting my article from JagoInvestor. I’ll start writing regularly starting this Diwali month on the topics some of you wanted me to elaborate 🙂

  • How I discovered Early Retirement?
  • WHAT IS EARLY RETIREMENT?
  • My Alternative Early Retirement Plan for Indian conditions
  • The benefits of this alternative approach
  • FREEDOM: Free by Age 40 to do work you truly enjoy
  • SECURITY: Your retirement fund is actually a 25-year emergency fund!
  • LESS STRESS: Not having to worry about money running out
  • PRACTICE: Great Training for “full retirement”
  • 4 STRATEGIES TO INCREASE YOUR SAVINGS RATE
  • FAQ 1: If I’m saving first for my retirement what about saving for my child’s college expenses?
  • FAQ 2 : What about buying our own house?
  • FAQ 3: But we want to do extended travel frequently. That’s why we want to retire early and stop working!

View original post 4,194 more words

URL shortening in Django with bit.ly

Building an application which has features to invite people or maybe share some data through those “big” “lengthy” URL is a disgrace for a developer and is a things of past.

In python along with bit.ly,believe me it becomes lot much easy although I had to struggle to write the most crisp peace of code which code serve the purpose.

Following are the steps :

1.) Signup with bit.ly and navigate to http://dev.bitly.com/

2.) Click My Apps . Register your app and generate generic access token.

3.) Use following code snippet in your code to generate the shortened bit.ly in your code:

import urllib
import urllib2
import json


link = "http://www.example.com/foo/bar/zoo/hello/"
values = {'access_token' : BITLY_ACCESS_TOKEN,
          'longUrl'      : link}
url = "https://api-ssl.bitly.com/v3/shorten"

data = urllib.urlencode(values)
req = urllib2.Request(url,data)
response = (urllib2.urlopen(req).read()).replace('\/', '/')
bitly_url = (json.loads(response))['data']['url']
print bitly_url

You don’t need to create a whole new app in your  Django project just for shortening the URL.

But if you want the all the features of the bit.ly API, start by reading the documentation at dev.bitly.com/get_started.html, and then download the official python client.

Louis Van Gaal tactical philosophy

Have not read an article like this in ages…….complete logical maths involved and sheer brilliance of a visionist
People might call him arrogant but he is confident….
‪#‎GGMU‬

Defending With The Ball

‘The national coach (me) sees opportunities because he believes in vision and structure. When I say that, I mean MY vision, and my structure. Yes, that is arrogant. I bet you hear that more, that people find me arrogant. It does not bother me.  I am NOT arrogant. But I do believe in my vision. So the people who work in my organization have something to hold on to. That is what I believe in.’

Football dominance comes in cycles, and although the inability to keep hold of key players disrupted the progress and dominance Van Gaal was on the verge of achieving in Amsterdam, his Ajax team are widely regarded as one of the greatest teams to have played the game.

“Ajax are not just the team of the Nineties, they are approaching football Utopia. Their concept of the game is exquisite yet they have a physical superiority as…

View original post 1,736 more words

String vs StringBuffer in JAVA

SITUATION:In this present world,the performance of any application is very important and it’s then only when factors like RUNNING TIME and MEMORY occupied plays very critical role in deciding that factor.While working on one such deliverable i too came accross such condition where i need to read some million odd files and each containing some million odd records and do some operation on the data and overwrite or make a copy of the updated info and show to the user so i used STRINGS approach as any nooby will use and what i came accross was that it was taking almost like an hour to do it so i just being guided by seniors to use StringBuffer class instead of String.When i ran it after making the required changes it took only like 3-4 seconds which was like a miracle.Now that really makes a lot of difference and made me to get the details why did it happen and stuff and share it with everyone.

MECHANISM: So the reason why it happened was that String object is immutable whereas StringBuffer/StringBuilder objects are mutable.So what it means is that whenever u create any string object and assign any value on it and do any operation on it and try to update it,what it does is create a new String object and assign the updated value and doesnt assign it the previous one.So what was happening that for every file and every updation an object was being created in background so in all 1,000,000*1,000,000 many objects were created which was causing that much time to do whole process whereas what happens in StringBuffer is when u do any operation on an object then it will upadate it then and there only without taking any time

Finally, whats the difference between StringBuffer and StringBuilder?

StringBuffer and StringBuilder have the same methods with one difference and that’s of synchronization. StringBuffer is synchronized( which means it is thread safe and hence you can use it when you implement threads for your methods) whereas StringBuilder is not synchronized( which implies it isn’t thread safe).

So, if you aren’t going to use threading then use the StringBuilder class as it’ll be more efficient than StringBuffer due to the absence ofsynchronization.

TimeStamp

While working in college we dnt get much chance to deal with all the datatypes in sql or some of the importatnt ones which you get it corporate world while working on some projects.One such is TIMESTAMP which is really different from the normal DATE datatype and its format is like yyyy/MM/dd hh24:mi:ss.SSSSSS.

PROBLEM:  So the problem now is how to deal with this format coz it always use to give errors like: Error: ORA-01830: date format picture ends before converting entire input string or ORA-01843 “not a valid month” and ORA-01861 “literal does not match format string” .So the problem occur due to the SSSSSS part in the end.

SOLUTION: So i came accross many solutions on net of which the few are:

1.instead of using to_date and use to_timestamp('2010-12-14:09:56:53', 'YYYY-MM-DD:HH24:MI:SS')

2.to_date(?,’DD/MM/YYYY HH24:MI:SS’) -in place of ? just put the new entry that you want to insert.

and similarly like this many more but no one was of use so that encouraged me to share the solution with you.

The best way to is to take the substring of the new entry from 0 to indexof(.) so what you get is  yyyy/MM/dd HH24:MI:ss and just put it place and the compiler will take care of the rest .Hope it will be beneficial for you and you dont have to scroll through thousands of web pages and still unable to get the right solution to the problem.

Interview Q-Reverse string without reversing words of the string.

This was one of the string manipulation question that was asked to one of my friend in TECH ROUND 1 of CISCO INTERNSHIP HIRING PROCESS so thought of sharing with you guys and following the approach that i suggested him.

EXPLANATION:Basically if you are a given a string “hi friends how are you”.The output was suppose to be “you are how friends hi”.

APPROACH:The approach that I suggested to him was :

1.To reverse the words individually first without reversing the string.

2.Now reverse the whole string which will restore the reversed words to the original ones and reverse the string too and hence MISSION ACCOMPLISHED..:)

CODE:

void reverse(char *begin, char *end)
{
char temp;
while (begin < end)
{
temp = *begin;
*begin++ = *end;
*end– = temp;
}
}

void reverseWords(char *s)
{
char *word_begin = NULL;
char *temp = s;
while( *temp )                           //swapping the words
{
if (( word_begin == NULL ) && (*temp != ‘ ‘) )
{
word_begin=temp;
}
if(word_begin && ((*(temp+1) == ‘ ‘) || (*(temp+1) == ”)))
{
reverse(word_begin, temp);
word_begin = NULL;
}
temp++;
}
reverse(s, temp-1);
}