Thursday, May 23, 2024

Oracle SQL: Extracting text between two characters

I had similar kind of Requirement which was we have to display text only occurs in between colon and hypen (":" and "-") so I used below line which worked successfully 

    LTRIM(RTRIM(TRIM (BOTH ':' FROM REGEXP_SUBSTR({fieldname}, ':[^-]+'))))

Example line

**Computer, Internet & Software: Atlassian - Business Software**


then the ouctcome was

**Atlassian** 


this Formula i have used inside a saved search result in NetSuite Environment 

Wednesday, January 18, 2017

Convert Military time To AM/PM Format / 24 Hour Format To 12 Hour

/* Convert Military time To AM/PM Format */

function Convert24HourFormatTo12HourFormat(date) {
var d = new Date(date);
var hh = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
var dd = "AM";
var h = hh;
if (h >= 12) {
h = hh - 12;
dd = "PM";
}
if (h == 0) {
h = 12;
}
m = m < 10 ? "0" + m : m;

s = s < 10 ? "0" + s : s;

/* if you want 2 digit hours:
h = h<10 h:h="" p="">
var pattern = new RegExp("0?" + hh + ":" + m + ":" + s);

var replacement = h + ":" + m;
replacement += ":" + s;
replacement += " " + dd;

return date.replace(pattern, replacement);
}

Friday, November 20, 2015

Static Stop Watch logic for HTML

Saturday, July 18, 2015

These Posters Will Show You How Famous Start-Ups Were Conceived



Every great idea comes from a dream and all our dreams can come true, if we have the courage to pursue them. This goes for everything in life, including start-ups and business ideas. They all start the same way but only some make it to the top. 
These posters by Anna Vital on Scuttlebutt and they will tell you what it takes to be on the top.

Here is why most people choose to be entrepreneurs.


A lot of us feel the same way but end up doing nothing to change it. Just because you have never done anything exceptional does not mean you don't have it in you.

Not all of us did well in school. Honestly, it doesn't matter because school is not the only education. Here are people who dropped out to do what they did and were really good at it.


Here's a crash course you'll find useful:

So, here's how these guys made it big:








Feel motivated to start-up but unsure about where to start from?
Here are some tips.


If you have an idea and want to get started on it, start now. It is never too late to make the first step.


Give it your best!

 Source : http://www.scoopwhoop.com/inothernews/how-famous-start-ups-were-started/

9 TED Talks to inspire smart conversation

SmartConversation_fb-1200x627
No one really wants to talk about the weather. Inspired by TED Talks, here are some questions to start a better conversation in any situation.

“So, what’s your favorite word?”

Who to ask: The chatty person who’s sharing an outlet with you at the coffee shop
The basic idea: Dictionaries don’t compile themselves — linguistic sleuths called lexicographers do — and in order to keep the modern dictionary accurate and dynamic, they need be open to new words and formats. They also need your help.
Fun facts you’ll learn: How lexicography is like archaeology; why there’s no such thing as a “bad” word; and the definition of “erinaceous” (hint: it involves hedgehogs). Scoot to 3:58 for that.

“If you could choose a sixth sense, what would it be?”

When to ask: Around the dinner table, just before dessert
The basic idea: Human perception is limited to information our five senses are able to receive and process. But combining technology with biology, scientists are finding new ways to enhance our current senses — and even add new ones.
Fun facts you’ll learn: How scientists are using “peripheral devices” inspired by snakes, moles and fish to give humans new senses; the inner workings of a vest that lets people hear through touch. (Yes, you read that right. See it in action at the 11:45 mark.)

“Do you think you can tell when someone is telling you a lie?”

When to ask: At a late-night get-together
The basic idea: From inkblot tests to learning styles to the details of Milgram’s famous experiment, there are a number of famous psychology tidbits we think we know — but are actually wrong about.
Fun facts you’ll learn: Contrary to popular belief, men are not from Mars and women are not from Venus. Also — sorry to break it to you — listening to Mozart won’t make you smarter.

“Tell me about a time when you made an assumption — and were proven wrong.”

Who to ask: Your seatmate on a plane or long train trip
The basic idea: It’s easy to hold a narrow vision of a person or a whole culture. But everyone has a collection of layered, overlapping stories — no one is a single, simple meme.
Fun facts you’ll learn: Why the media’s focus on a “single story” about a place prevents true understanding; and what we can do to change — and broaden — the narrative.

“Are you optimistic about the world, or pessimistic — and what makes you feel that way?”

When to ask: Among old friends
The basic idea: Thanks to sensationalist news media, many people think the world is heading in the wrong direction. But reality doesn’t always align with our pessimistic perceptions. By changing the way we see information, we can rise above ignorance.
Fun facts you’ll learn: The many surprising pieces of evidence that show the world is getting better (and why chimps seem to have a better handle on this than we do). For a heartening stat on global vaccine rates that the media got wrong, click to 7:05.

“Do you think you are smarter than your parents?”

When to ask: At a family reunion picnic
The basic idea: Cognitive history shows that each generation scores higher on IQ tests than the one before. As the world around us has changed, so has our ability to process it and understand increasingly complex concepts.
Fun facts you’ll learn: The staggering difference in average IQ scores between generations; the “mental artillery” we have today that our grandparents didn’t; and the areas in which we still fall short. (Hint: flipping through a history textbook might be a good idea.)

“Did you ever wonder why humans cook our food, and other animals don’t?”

When to ask: While cooking with friends
The basic idea: For all the progress we’ve made in neuroscience, some basic questions about the human brain’s size and function have remained unanswered — until now.
Fun facts you’ll learn: The key difference between a human brain and a rat brain; the skill our ancestors developed that changed everything; and what neuroscientists achieved by making “brain soup.”

“If you had to choose between a roof over your head and your right to vote, which would you choose?”

Who to ask: Someone from a different background whom you want to understand a bit better
The basic idea: China’s rise to economic power is indisputable, and while Western leaders tend to fixate on clashing ideals, some emerging economies view China’s model as the one to emulate.
Fun facts you’ll learn: The political and economic values propelling China forward; why the West’s focus on liberty and democracy isn’t always applicable to reality; and what the could be championing instead.

“Ever notice how our dogs behave when they’re in packs?”

When to ask: At the dog park
The basic idea: The behavior of individual animals may seem simple and straightforward, but when these animals interact in groups, surprisingly complex patterns emerge.
Fun facts you’ll learn: How to create an example of complexity theory with Scottish terrier puppies.

Source : Taken from ted blog

Monday, June 29, 2015

15 Inspiring Quotes By Founders Of Start-Ups That Made It Big


Every once in a while, comes a product which changes the world. People flock towards these 'things', swear by it in their day to day activities. But how do these products get made? How does a man become a phenomenon overnight, by merely adding an 'i' in front of the phone? What ensues when their products become massive hits and the dollars start flowing in?
These 15 tycoons, who made things that shook the world, will roll out some of the most important words of wisdom, of your life. 

Your efforts are all you own, in this world. Give it your all.