Posts

Showing posts from 2019

Confidence

In doing each work you need confidence. Confident person makes their work easily and if it's less or over both is dangerous. Confidence comes with experience, knowledge, study, talent. Achievement and goals are focus by confidence. Life makes easy to live with full strength. 

आठवण

शाळेत सोडवलेली मराठीची प्रश्नपत्रिका, आज उगाचच खुप वर्षांनी आठवली! शाळा तर कधीचीच संपलीय, पण, परीक्षेची धडधड मात्रं तशीच राहीलीय!! "शब्दांचे अर्थ लिहा" म्हटल्यावर, अचूक अर्थ आठवायचेत! आता अर्थही बदललेत आणि, शब्दही अनोळखी झालेत!! "समानार्थी, विरुद्धार्थी शब्द", गुण हमखास मिळायचेत! आता समानार्थी भाव, विरुद्धार्थी बनलेत, अन अर्थांचे अनर्थ झालेत!! "गाळलेल्या जागा भरा", हा प्रश्नं पैकीच्या पैकी गुण देणारा! प्रश्नपत्रिकेतल्या सगळ्याच, गाळलेल्या जागा भरल्यात! आयुष्यातल्या काही जागा मात्रं, आजही रिकाम्याच राहील्यात!! पेपरातल्या "जोड्या जुळवा", क्षणार्धात जुळायच्यात! पण नात्यांच्या जोड्या, कधी जुळल्यात,तर कधी, जुळता जुळता फसल्यात! "एका वाक्यातल्या उत्तरा"नं पाच मिनिटात, पाच गुण मिळवून दिलेत! आयुष्यातले काही सोप्पे प्रश्नं, आजही तिथेच तटस्थ उभे आहेत, एकाच जागी...उत्तराची वाट बघत.. "संदर्भासहीत स्पष्टीकरण" लिहिताच, पाच पैकी साडेतीन गुण मिळायचेच! आता स्पष्टीकरण देता देता, बरेचसे संदर्भ मागे पडलेत!! "कवितेच्या ओळी पुर्ण" करणं, अग...

Calendar of 2020

Image
One page calender 2020

Hindi thoughts messages

हालात सिखाते है बाते सुनना और सहना वरना हर शख़्स फ़ितरत से बादशाह ही होता है।  जिस झूठ पर आपने भरोसा किया.....वही आपका सत्य होता है ! वक्त उतना ही देना चाहिए किसी को जितनी जरूरत हो..... वरना...ना आपकी कदर होती है,ना आपके वक्त की..! जिन्दगी का बहुत बडा रहस्य है की,हम जानते है हम किसके लिए जी रहे है...लेकिन ये कभी नहीं जान पाते,की हमारे लिए कौन जी रहा है !! "छाते"और "दिमाग" की उपयोगिता तभी है जब दोनों खुले हों...वरना दोनों बोझ ही है...!! "निंदा" से घबराकर अपने "लक्ष्य" को ना छोड़े क्योंकि "लक्ष्य" मिलते ही निंदा करने वालों की "राय" बदल जाती है... गलती कबूल करने और गुनाह छोड़ने में कभी देर ना करें......!क्योकिं सफर जितना लम्बा होगा वापसी उतनी मुश्किल हो जायेगी...!! ज़िंदगी ऐसे जियो की ख़ुद को पसंद आ जाए..... दुनिया वालों की पसंद तो पल भर में बदलती हैं.!!! कभी पत्थर की ठोकर से भी आती नहीं खरोंच.....कभी एक ज़रा सी बात से इन्सान बिखर जाता है. जब जज़्बात दिमाग को शिकस्त देने लगे.....तब सब कुछ हालात पर छोड़ देना चाहिए! एक मैं हूँ,ख़ुद क...

Marathi thoughts messages for good morning

*प्रेम असं दयावं....* *की घेणाऱ्याची ओंजळ अपुरी पडावी....* *मैत्री अशी असावी...* *की स्वाता:च भान नसावं...!!!* *आयुष्य असं जगावं* *की मृत्युनेही म्हणावं......* *तू जग अजुन ,मी येईन नंतर...!!!* *चूक नसतानासुध्दा निव्वळ वाद टाळण्याकरिता मागितलेली माफी, जीवनातील संयमाचं एक मोठं उदाहरण ठरतं..!* *जीवनात संयम राखला तर आपले अस्तिव कुणीच संपवू शकत नाही..!!*                 *परमेश्वर सर्वांभुती आहे... फक्त तो आहे याची आठवण प्रत्येक कृती करताना  ठेवली तर चांगल आणि फक्त चांगलच कर्म घडेल..*   *शुभ सकाळ*

Quotes by Ratan Tata

Quotes by Ratan Tata : 1. Ups and downs in life are very important to keep us going, because a straight line even in an E.C.G means we are not alive. 2. Take the stones people throw at you. And use them to build a monument. 3. I don't believe in taking right decisions. I take decisions and then make them right. 4. If you want to walk fast, walk alone. But if you want to walk far, walk together. 5. I don't believe in taking right decisions, I take decisions and make them right. 6. Power and wealth are not two of my main stakes. 7. None can destroy iron, but its own rust can. Likewise none can destroy a person but his own mindset can. 8. The day I am not able to fly will be a sad day for me. 9. Don't be serious, enjoy life as it comes.

Study quotes:

Study quotes:  1. "We do not need to proselytise either by our speech or by our writing. We can only do so really with our lives. Let our lives be open books for all to study." - - Mahatma Gandhi 2. "Japan's very interesting. Some people think it copies things. I don't think that anymore. I think what they do is reinvent things. They will get something that's already been invented and study it until they thoroughly understand it. In some cases, they understand it better than the original inventor." --Steve Jobs 3. "The study of mathematics, like the Nile, begins in minuteness but ends in magnificence." - - Charles Caleb Colton 4. "To know oneself is to study oneself in action with another person." - - Bruce Lee

Strength quotes

Strength quotes: 1. “Strength does not come from winning. Your struggles develop your strengths. When you go through hardships and decide not to surrender, that is strength.” -- Arnold Schwarzenegger 2. “There are better starters than me but I’m a strong finisher.” --Usain Bolt 3. "If four things are followed - having a great aim, acquiring knowledge, hard work, and perseverance - then anything can be achieved." -- A. P. J. Abdul Kalam 4."Crush your individuality first. Shake off the dreams of personal comfort. Then start to work. Inch by inch you shall have to proceed. It needs courage, perseverance and very strong determination. No difficulties and no hardships shall discourage you. No failure and betrayals shall dishearten you. No travails (!) imposed upon you shall snuff out the revolutionary will in you. Through the ordeal of sufferings and sacrifice you shall come out victorious. And these individual victories shall be the valuable assets of the revolution...

Motivational quotes:

Motivational quotes: 1. Well done is better than well said. 2. Life is 10% what happens to you and 90% how you react to it. 3. With the new day comes new strength and new thoughts. 4.The world is full of magical things patiently waiting for our wits to grow sharper. 5.The good life is one inspired by love and guided by knowledge.

Motivation words

1. Your time will come, keep trying. 2. Sometimes not getting what do you want is a perfect stroke of luck. The best things may wait for you. 3. Never give up, try to find opportunities and all possible options and the best got clicked. 4. Silently assess your strength and weakness write down your options and try everything . 5. Make yourself ready for opportunities.

Happy birthday message in hindi

दुआ है की कामयाबी के हर सिखर पे आप का नाम होगा, आपके हर कदम पर दुनिया का सलाम होगा, हिम्मत से मुश्किलों का समाना करना हमारी दुआ है की वक़्त भी एक दिन आपका गुलाम होगा...!! शुभ जन्मदिन की मुबारक बाद ज़िंदगी की कुछ खास दुआए लेलो हमसे जन्मदिन पर कुछ नजराने ले लो हमसे भर दे रंग जो तेरे जीवन के पलो में….. आज वो हसी मुबारक बाद ले लो हमसे हँसते रहे आप करोड़ों के बीच, लीखते रहे आप लाखोँ के बीच, रोशन रहे आप हज़ारों के बीच, जैसे  सूरज है इतने सितारों के बीच, जनम दिन की ढेर सारी बधाई । जीवन के रास्ते हमेशा गुलज़ार रहे, चेहरे पर आपके सदा ही मुस्कान रहे, देता है दिल ये दुआ आपके ज़िन्दगी में आपके हर दिन, खुशियों की बौछार हो।

Happy birthday message in marathi

शिखरे उत्कर्षाची सर तुम्ही करीत रहावी…. कधी वळून पाहता आमची शुभेच्छा स्मरावी…. तुमच्या इच्छा आकांक्षांचा वेलू गगनाला भिडू दे…. तुमच्या जीवनात सर्वकाही मनासारखे घडू दे…. तुला दीर्घायुष्य लाभो ही इच्छा…. वाढदिवसाच्या खूप खूप शुभेच्छा तुला तुझ्या आयुष्यात सुख, आनंद व यश लाभो, तुझे जीवन हे उमलत्या फुलासारखे फुलून जावो, त्याचा सुगंध तुझ्या सर्व जीवनात दरवळत राहो, हीच तुझ्या वाढदिवसानिमित्त ईश्वरचरणी प्रार्थना !  आयुष्यात हवं ते सारं काही मिळालं तरी या प्राप्तीचा मोहोत्सव करताना हवी असतात… काही आपली माणसं ! आपण सगळेच एकमेकांशी इतके जोडले गेलोय कि कोणतंही अंतर आपल्याला एकमेकांपासून दुरावू शकत नाही.. आजच्या या वाढदिवसानिमित्त म्हणूनच, आपल्या नात्याचं आणि या वाढदिवसाचं सेलिब्रेशन करावसं वाटतंय… Many Many Happy Returns Of the Day.

Resignation letter format

Resignation letter format: Name : Organization : Employee Code : Branch : I would like to inform you that I am resigning from my position as _______ on deputation for XYZ company name, at location/ branch name, due to my personal and family reason.  Due to my personal reason I am requesting you to relieve me on mention the date. Thank you for the support and the opportunities that you have provided me during year. I have truly enjoyed my tenure with XYZ company name, and am more than grateful for the encouragement you have given me in pursuing my professional and personal growth objectives. If I can be of any assistance during this transition in order to facilitate the seamless passing of my responsibilities to my successor, please let me know. I would be glad to help however I can. Have a great day ahead. Best Regards,

Acceptance of offer letter format

Acceptance of offer letter:                 It was wonderful to speak with you on the phone about the Designation __________ role at XYZ Company. I'm thrilled to formally accept this job offer.                I'm looking forward to working with you, and the rest of the senior management team at XYZ, on charting a new direction for marketing strategy.            As we discussed, my start date will be ______, with an annual / monthly salary of ________ .            I'm looking forward to seeing you next day.            Please let me know if there is any paperwork or additional information you need from me beforehand, or if there is any documentation I should bring along on my first day.            I'm always available on email, but feel free to call if that's more convenient Mobi...

Happy new year 2020 shayari wishes

“इस साल आपके घर खुशियों की हो धमाल, दौलत की ना हो कमी आप हो जाए मालामाल, मुस्कुराते रहो ऐसा हो सबका हाल, तहे दिल से मुबारक हो आपको नया साल 20 20।" “सबके दिलों में हो सबके लिए प्यार; आने वाला हर दिन लाए खुशियों का त्यौहार, इस उम्मीद के साथ आओ भूलके सारे गम, न्यू इयर को हम सब करें वेलकम।” नए साल 2020 कि शुभकामनाये ।

Python isinstance()

In Python isinstance() : isinstance()  The Python isinstance() function is used to check whether the object or variable is an instance of the specified class type or data type. The isinstance() syntax and parameter: isinstance(object, classinfo) The isinstance() function checks if the object argument is an instance or subclass of classinfo class argument. isinstance Parameters: The isinstance() takes two arguments, and both are mandatory. object:  The object/instance or variable to check. The object can be any class object or any variable name. classinfo:  Class info is type name, class name or tuple of types and classes. For example, int, str, list, dict, or any user-created class. Return Value from isinstance(): If an object or variable is of a specified type, then isinstance() return true otherwise false. example: marks = 71 result = isinstance(marks, int) if result :   print("Yes! given variable is an instance of type int") else: ...

Happy New Year 2020

Image
In this new year,your every wish and may God fill you with lots of happiness, With these prayers, Happy New Year to you. Happy new year full of new expectations, Congratulations on this trick of happiness. All your dreams are complete this year Wishing you a very happy year. Happy New Year 2020.

Write an assembly program for 8085 microprocessor to find greatest between two numbers

Write an assembly program for 8085 microprocessor to find greatest between two numbers Program: MVI B, 30H MVI C, 40H MOV A, B CMP C JZ EQU  JC GRT  OUT PORT1  HLT EQU: MVI A, 01H  OUT PORT1  HLT GRT: MOV A, C  OUT PORT1  HLT

Write an assembly program for 8085 microprocessor to multiply a number by 8

Write an assembly program for 8085 microprocessor to multiply a number by 8 Program: MVI A, 30H RRC RRC RRC OUT PORT1 HLT

Write a program for 8085 microprocessor to arrange first 10 numbers from memory address 3000H in an ascending order.

Write a program for 8085 microprocessor to arrange first 10 numbers from memory address 3000H in an ascending order. Answer:  MVI B, 09                  :"Initialize counter"      START                       :"LXI H, 3000H: Initialize memory pointer" MVI C, 09H               :"Initialize counter 2" BACK: MOV A, M   :"Get the number" INX H                        :"Increment memory pointer" CMP M                      :"Compare number with next number" JC SKIP                     :"If less, don’t interchange" JZ SKIP                     :"If equal, don’t interchange" MOV D, M MOV M, ...

To be happy:

To be happy: Always be happy you keep yourself happy by doing the right thing you what to do. Happiness is the feeling of getting joy in what you are doing. A smile keeps you happy which can make your life ,always smile on your face is not easy way there may be downs where you need to keep yourself strong mentally as well as physically. Make a habit to be always happy with a smile on your face.Think that what will be the last of all this id death which everyone will face ,some may face before you some after you ,so why to worry enjoy your life. After your death how will you can be happy as life is once. Birthday is always wished Happy birthday so make every day your birthday which will make your everyday happy i.e. Happy Everyday. To keep yourself happy depends on how much time you want to be as if you think about yourself it will make only you happy for sometime but if you help others to make their life happy it will make you happy for lifetime.

Python program to check if a string is palindrome or not

Python program to check if a string is palindrome or not Answer: my_str = 'Madam' my_str = my_str.casefold() rev_str = reversed(my_str) if list(my_str) == list(rev_str):    print("The string is a palindrome.") else:    print("The string is not a palindrome.") Output: The string is a palindrome.

C++ code to implement Sierpinski Triangle using Graphics

C++ code to implement Sierpinski Triangle using Graphics   #include   #include   #include     #define Y 900 #define X 1600 void triangle(float x, float y,               float h, int colorVal) {     setcolor(colorVal % 15 + 1);       for (float delta = 0; delta > -5; delta -= 1) {         line(x - (h + delta) / sqrt(3),              y - (h + delta) / 3,              x + (h + delta) / sqrt(3),              y - (h + delta) / 3);         line(x - (h + delta) / sqrt(3),              y - (h + delta) / 3,              x,              y + 2 * (h + delta) / 3);         line(x,             ...

Python program to sort alphabetically the words form a string provided by the user

Python program to sort alphabetically the words form a string provided by the user Answer: my_str = input("Enter a string: ") words = my_str.split() words.sort() print("The sorted words are:") for word in words: print(word) Output: Enter a string: Hello this Is an Example The sorted words are: Example Hello Is an this

C++ program to implement Selection Sort

C++ program to implement Selection Sort: #include using namespace std; void swap(int &a, int &b) {         int temp;    temp = a;    a = b;    b = temp; } void display(int *array, int size) {    for(int i = 0; i       cout << array[i] << " ";    cout << endl; } void selectionSort(int *array, int size) {    int i, j, k;    for(i = 0; i    {       k = i;        for(j = i+1; j          if(array[j] < array[k])             k = j;             swap(array[i], array[k]);    } } int main() {    int n;    cout << "Enter the number of elements: ";    cin >> n;    int arr[n];             cout << "...

C++ program to implement Bubble Sort.

C++ program to implement Bubble Sort. #include using namespace std; void BubbleSort (int arr[], int n) { int i, j; for (i = 0; i < n; ++i) { for (j = 0; j < n-i-1; ++j) { if (arr[j] > arr[j+1]) { arr[j] = arr[j]+arr[j+1]; arr[j+1] = arr[j]-arr[j + 1]; arr[j] = arr[j]-arr[j + 1]; } } } } int main() { int n, i; cout<<"\nEnter the number of data element to be sorted: "; cin>>n; int arr[n]; for(i = 0; i < n; i++) { cout<<"Enter element "< cin>>arr[i]; } BubbleSort(arr, n);   cout<<"\nSorted Data "; for (i = 0; i < n; i++)         cout<<"->"< return 0; }

Program in python to demonstrate star pattern after 180 degree rotation

Program in python to demonstrate star pattern after 180 degree rotation Answer: def pypart2(n):           k = 2*n - 2       for i in range(0, n):                 for j in range(0, k):             print(end=" ")                   k = k - 2                 for j in range(0, i+1):                             print("* ", end="")                 print("\r") n = 5 pypart2(n) Output:             *          * *       * * *    * * * * * * * * * 

Program in python to demonstrate star pattern printing triangle

Program in python to demonstrate star pattern printing triangle    Answer: def triangle(n): k = 2*n - 2      for i in range(0, n):               for j in range(0, k):             print(end=" ")                     k = k - 1                       for j in range(0, i+1):                                 print("* ", end="")                     print("\r") n = 5 triangle(n) Output:     *    * *   * * *  * * * * * * * * * 

Wish you a merry Christmas

Image
Wish you a Merry Christmas and a Happy New Year. 

Happy Christmas

Image
Merry Christmas😄🎄🎁❄🎅

Merry Christmas greetings

Image
“Christmas season is the time of sharing. Start sharing LOVE and HOPE to your FAMILY. Eventually, the Love you have shared will also be imparted to everyone in your society. Let LOVE fill the air. Merry Christmas to you and your family!”

23 December,Happy Farmers Day!

The National Farmers Day in India is also known as Kisan Divas in Hindi. Farmer's Day is celebrated every year on 23 December, on the birthday of the 5th Prime Minister of India, Choudhary Charan Singh, also a farmer's leader, who introduced many policies to improve the lives of the Indian farmers. It is celebrated by organizing various programs, debates, seminars, quiz competitions, discussions, workshops, exhibitions, essays writing competitions and functions. Farmers are backbone of a country and you can’t stand straight if your backbone is broken. The life of a farmer is very tough as he works very hard day and night in all seasons for us. Happy Farmers Day!

National Mathematics Day.

Image
The Indian government declared 22 December to be National Mathematics Day. This was announced by Prime Minister Manmohan Singh on 26 February 2012 at Madras University, during the inaugural ceremony of the celebrations to mark the 125th anniversary of the birth of the Indian mathematical genius Srinivasa Ramanujan (22 Dec 1887 -26 Apr 1920). On this occasion Singh also announced that 2012 would be celebrated as the National Mathematics Year. Srinivasa Iyengar Ramanujan was born on December 22, 1887 in the present day Tamil Nadu, India. He is one of the most recognised Indian mathematicians although he had almost no formal training in pure mathematics. He is known for mathematical analysis, number theory, infinite series, and continued fractions, including solutions to mathematical problems considered to be unsolvable.

Write a python program to check if the number is an Armstrong number or not take input from the user

Write a python program to check if the number is an Armstrong number or not take input from the user num = int(input("Enter a number: ")) # initialize sum sum = 0 # find the sum of the cube of each digit temp = num while temp > 0:    digit = temp % 10    sum += digit ** 3    temp //= 10 # display the result if num == sum:    print(num,"is an Armstrong number") else:    print(num,"is not an Armstrong number") Output: Enter a number: 407 407 is an Armstrong number

Java Program to Check a Leap Year

Java Program to Check a Leap Year: public class LeapYear {     public static void main(String[] args) {         int year = 1900;         boolean leap = false;         if(year % 4 == 0)         {             if( year % 100 == 0)             {                 // year is divisible by 400, hence the year is a leap year                 if ( year % 400 == 0)                     leap = true;                 else                     leap = false;             }             else                 leap = true;   ...

Python program to Count Alphabets Digits and Special Characters in a String using for loop

# Python program to Count Alphabets Digits and Special Characters in a String using for loop string = input("Please Enter your Own String : ") alphabets = digits = special = 0 for i in range(len(string)):     if(string[i].isalpha()):         alphabets = alphabets + 1     elif(string[i].isdigit()):         digits = digits + 1     else:         special = special + 1         print("\nTotal Number of Alphabets in this String :  ", alphabets) print("Total Number of Digits in this String :  ", digits) print("Total Number of Special Characters in this String :  ", special)

Python program to make a simple calculator

#  Python program to make a simple calculator # This function adds two numbers def add(x, y):    return x + y # This function subtracts two numbers def subtract(x, y):    return x - y # This function multiplies two numbers def multiply(x, y):    return x * y # This function divides two numbers def divide(x, y):    return x / y print("Select operation.") print("1.Add") print("2.Subtract") print("3.Multiply") print("4.Divide") # Take input from the user choice = input("Enter choice(1/2/3/4): ") num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: ")) if choice == '1':    print(num1,"+",num2,"=", add(num1,num2)) elif choice == '2':    print(num1,"-",num2,"=", subtract(num1,num2)) elif choice == '3':    print(num1,"*",num2,"=", multiply(num1,num2)) elif choice == '...

Write C++ program to caulate height of Binary Tree from Inorder and Levelorder Traversals

Write C++ program to caulate height of Binary Tree from Inorder and Levelorder Traversals #include   using namespace std;   /* Function to find index of value     in the InOrder Traversal array */ int search(int arr[], int strt, int end, int value) {     for (int i = strt; i <= end; i++)         if (arr[i] == value)             return i;     return -1; }   // Function to calculate the height of the Binary Tree int getHeight(int in[], int level[], int start,               int end, int& height, int n) {       // Base Case     if (start > end)         return 0;       // Get index of current root in InOrder Traversal     int getIndex = search(in, start, end, level[0]);       if (getIndex == -1)         return 0; ...

Write a CPP program to find the minute at which the minute hand and hour hand coincide.

Write a CPP program to find the minute at which the minute hand and hour hand coincide. #include #include   using namespace std; void find_time(int h1) {   int theta = 30 * h1;   cout << "(" << (theta * 2) << "/"        << "11"        << ")"        << " minutes"; } int main()  {   int h1 = 3;    find_time(h1);    return 0; } Output : (180/11) minutes

Python program to check if year is a leap year or not

# Python program to check if year is a leap year or not #to check the year #year = 2020 #To get year (integer input) from the user year = int(input("Enter a year: ")) if (year % 4) == 0:    if (year % 100) == 0:        if (year % 400) == 0:            print("{0} is a leap year".format(year))        else:            print("{0} is not a leap year".format(year))    else:        print("{0} is a leap year".format(year)) else:    print("{0} is not a leap year".format(year)) Output: Enter a year: 2020 2020 2020 is a leap year

The Countries of the World and their Capitals(general knowledge question)

List of countries of the World and their Capitals: Afghanistan: Kabul Albania: Tirana Algeria: Algiers Andorra: Andorra la Vella Angola: Luanda Antigua and Barbuda: Saint John's Argentina: Buenos Aires Armenia: Yerevan Australia: Canberra Austria: Vienna Azerbaijan: Baku The Bahamas: Nassau Bahrain: Manama Bangladesh: Dhaka Barbados: Bridgetown Belarus: Minsk Belgium: Brussels Belize: Belmopan Benin: Porto-Novo Bhutan: Thimphu Bolivia: La Paz (administrative); Sucre (judicial) Bosnia and Herzegovina: Sarajevo Botswana: Gaborone Brazil: Brasilia Brunei: Bandar Seri Begawan Bulgaria: Sofia Burkina Faso: Ouagadougou Burundi: Gitega (changed from Bujumbura in December 2018) Cambodia: Phnom Penh Cameroon: Yaounde Canada: Ottawa Cape Verde: Praia Central African Republic: Bangui Chad: N'Djamena Chile: Santiago China: Beijing Colombia: Bogota Comoros: Moroni Congo, Republic of the: Brazzaville Congo, Democratic Republic of the: Kinshasa Costa...

Confirmation Box - onClick in javascript program

Confirmation Box - onClick in javascript program: <input id="confirm" type="button" value="Click me" onclick="confirm('Are you sure?');">

JavaScript program to print this page using onClick

Print this page on click in JavaScript program: <input id="print" type="button" value="Print this Page" onclick="window.print();">

Javascript program to display alert box on click

Alert box on click in javascript program: <input type="button" value="Click me" onclick="alert('Thanks for visiting my blog.....!');">

The multi threading concept in C++ with an example

The multi threading concept in C++ with an example: #include #include using namespace std; // function to be used in callable void func_dummy(int N)  {   for (int i = 0; i < N; i++) {   cout << "Thread 1 :: callable => function pointer\n";    }  }   // A callable object class thread_obj {  public:    void operator()(int n) {        for (int i = 0; i < n; i++)            cout << "Thread 2 :: callable => function object\n";    } }; int main() { // Define a Lambda Expression auto f = [](int n) {    for (int i = 0; i < n; i++)    cout << "Thread 3 :: callable => lambda expression\n";    }; //launch thread using function pointer as callable thread th1(func_dummy, 2); // launch thread using function object as callable thread th2(thread_obj(), 2); //launch thread using lambda ex...

Programming language : Ruby

Programming language : Ruby Ruby is an interpreted, high-level, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. Platform support Matsumoto originally did Ruby development on the 4.3BSD-based Sony NEWS-OS 3.x, but later migrated his work to SunOS 4.x, and finally to Linux. Ruby versions and implementations are available on many operating systems, such as Linux, BSD, Solaris, AIX, macOS, Windows, Windows Phone,[104] Windows CE, Symbian OS, BeOS, and IBM i. Features of Ruby: 1.Thoroughly object-oriented with inheritance, mixins and metaclasses 2.Dynamic typing and duck typing 3.Everything is an expression (even statements) and everything is executed imperatively (even declarations) 4.Succinct and flexible syntaxthat minimizes syntac...

Date and time java script program

<!DOCTYPE html> <title>Time and Date</title> <time id="msg"></time> <script>   document.getElementById("msg").innerHTML = new Date().toLocaleString(); </script>

JavaScript program to create a JavaScript object to show the current time

<!DOCTYPE html> <title>Current time</title> <time id="time"></time> <script language="javascript">   /*Create a JavaScript object for the current time,then extract the desired parts, then join them again in the desired format.*/   var currentTime = new Date(),       hours = currentTime.getHours(),       minutes = currentTime.getMinutes();       if (minutes < 10) {     minutes  = "0" + minutes;   }   var suffix = "AM"; if (hours >= 12) {     suffix = "PM";     hours = hours - 12; } if (hours == 0) { hours = 12; }   time = hours + ":" + minutes + " " + suffix;         // Output   document.getElementById("time").innerHTML = time; </script>

JavaScript program for multiplication table

<html> <head>   <title>Multiplication Table</title>   <script type="text/javascript">     var rows = prompt("How many rows for your multiplication table?");     var cols = prompt("How many columns for your multiplication table?");     if(rows == "" || rows == null)     rows = 10;     if(cols== "" || cols== null)     cols = 10;     createTable(rows, cols);     function createTable(rows, cols)     {       var j=1;       var output = "<table border='1' width='500' cellspacing='0'cellpadding='5'>";       for(i=1;i<=rows;i++)       {     output = output + "<tr>";         while(j<=cols)         {     output = output + "<td>" + i*j + "</td>";       j = j+1;    ...

C program solved practical slips of F.Y.B.Sc. Computer Science Laboratory Course I & II

C program solved practical slips of F.Y.B.Sc. Computer Science Laboratory Course I & II: Program no: 6 Title:To demonstrate the use of library functions #include #include #include void main() { int n,x; float s,c,l,sqr,expo; clrscr(); printf("\n Enter the number:"); scanf("%d",&n); do { printf("\n Select any of the following operations:"); printf("\n 1.Sine"); printf("\n 2.Cosine"); printf("\n 3.Log"); printf("\n 4.Exponential"); printf("\n 5.Squareroot"); printf("\n 6.Exit\t"); scanf("%d",&x); switch(x) { case 1:s=sin(n); printf("\n Sine= %f",s); break; case 2:c=cos(n); printf("\n Cosine= %f",c); break; case 3:l=log(n); printf("\n Log= %f",l); break; case 4:expo=exp(n); printf("\n Exponential= %f",expo); break; case 5:sqr=sqrt(n); printf("\n Squareroot= %f",sqr); break; case 6:break...

C solved practical slips of F.Y.B.Sc. Computer Science

C solved practical slips of F.Y.B.Sc. Computer Science: Program 1: Title:To demonstrate the use of data types and simple operators #include #include void main() { float fahr,cel=0,kel=0; clrscr(); printf(“\n Enter temperature in Fahrenheit:”); scanf(“%f”,&fahr); cel=((5.0/9)*(fahr-32)); kel=cel+273.15; printf(“\n Temperature in 1 elsius is %0.2f”,cel); printf(“\n Temperature in kelvin is %0.2f”,kel); getch(); } Output: Enter the temperature in Fahrenheit:50 Temperature in Celsius is 10.00 Temperature in Kelvin is 283.15 Program no: 2 Title:To demonstrate the use of if, if-else statements #include #include void main() { int year; clrscr(); printf(“\n Enter the year:”); scanf(“%d”,&year); if(year%4==0 && year%10!=0 || year%400==0) printf(“\n %d is leap year”,year); else printf(“\n %d is not leap year”,year); getch(); } Output: Enter the year:1994 1994 is not leap year Enter the year:2004 2004 is leap year Program no: ...

Study testing conditions: if, elif, else in python

Testing conditions: if, elif, else : In Python, we have the if, elif and the else statements for decision making to execute a certain line of codes if a condition is satisfied,and a different set of code in case it is not. This is the simplest example of a conditional statement. The syntax is: if(condition):       indented Statement Block The block of lines indented the same amount after the colon (:) will be executed whenever the condition is TRUE. For example, lets say you are recording the score for a certain course. The total score is 100, with 50 points for the theoretical work and 50 for practical. You want to display an error message or warning if the score exceeds 100. score_theory = 40 score_practical = 45 if(score_theory + score_practical > 100):     print("Invalid score. Please check the input.") The colon (:) is important because it separates the condition from the statements to be executed after the evaluation of the conditio...

Variables and objects in python

Learn variables and objects in python: In Python, values are stored in objects. If we do d = 10.0 a new object d is created. As we have given it a floating point value (10.0) the object is of type floating point. If we had defined d = 10, d would have been an integer object. In other programming languages, values are stored in variables. This is not exactly the same as an object, as an object has "methods", that means functions that belong to the object. There are many object types in Python. The most important to begin with are: Object type: Integer Type class name: int Description: Signed integer, 32 bit Example: a = 5 Object type: Float Type class name: float Description: Double precision floating point number, 64 bit Example:b = 3.14 Object type: Complex Type class name: complex Description: Complex number Example: c = 3 + 5j   c= complex(3,5) Object type: Character Type class name: chr Description:  Single byte character Example: d = ch...

A python program to ask the user for his name and greets him

Write a python program to ask the user for his name and greets him: Answer: s = raw_input("What is your name?") print "HELLO ", s Output: What is your name?Tom HELLO Tom

A python program to draw hexagon using Turtle Programming

Write a python program to draw hexagon using Turtle Programming : Answer: import turtle  polygon = turtle.Turtle()   num_sides = 6 side_length = 70 angle = 360.0 / num_sides    for i in range(num_sides):     polygon.forward(side_length)     polygon.right(angle)       turtle.done()

A python program to draw star using Turtle Programming

Write a python program to draw star using Turtle Programming : Answer: import turtle    star = turtle.Turtle()   for i in range(50):     star.forward(50)     star.right(144)       turtle.done()

A python program to draw square using Turtle Programming

Write a python program to draw square using Turtle Programming Answer: import turtle  skk = turtle.Turtle()   for i in range(4):     skk.forward(50)     skk.right(90)       turtle.done() 

Python program to demonstrate all stack operations using a doubly linked list

Write a python program to demonstrate all stack operations using a doubly linked list  : Answer: class Node:       def __init__(self, data):         self.data = data # Assign data         self.next = None # Initialize next as null         self.prev = None # Initialize prev as null                  class Stack:     # Function to initialize head      def __init__(self):         self.head = None     def push(self, data):           if self.head is None:             self.head = Node(data)         else:             new_node = Node(data)             self.head.prev = new_node             new_node.next = self.head     ...

Python program to create a list of tuples from given list having number and its cube in each tuple

Write a python program to create a list of tuples from given list having number and its cube in each tuple: Answer: list1 = [1, 2, 7, 8] res = [(val, pow(val, 3)) for val in list1] print(res) Output: [(1, 1), (2, 8), (7, 343), (8, 512)] 

Break bulk cargo

 Break bulk cargo :  Break bulk cargo is transported in bags, boxes, crates, drums, or barrels. Unit loads of items secured to a pallet or skid are also used, break bulk cargo or general cargo are goods that must be loaded individually, and not in inter-modal containers nor in bulk as with oil or grain. Ships that carry this sort of cargo are called general cargo ships. There are many sorts of break bulk cargo but among them are: Bagged cargo: Bagged cargo (e.g. coffee in sacks) is stowed on double dunned and kept clear of the ship's sides and bulk heads. Bags are kept away from pillars and stanchions by covering it with matting or waterproof paper. Baled goods: Baled goods are stowed on single dunnage at least 50 mm (1.97 in) thick. The bales must be clean with all the bands intact. Stained or oily bales are rejected. All fibers can absorb oil and are liable to spontaneous combustion. As a result, they are kept clear of any new paintwork. Bales close to the dec...

Cargo - Transportation - Mode of transport - Freight

Cargo meaning, goods carried on a ship, aircraft, or motor vehicle, which is the transportation of bulk cargo. Transportation is used for moving of people, animals, and other goods from one place to another. List of cargo types: 1. Break bulk cargo or General cargo 2. Bulk cargo (Bulk dry cargo) 3. Bulk liquid cargo 4. Container cargo 5. Neo-bulk cargo 6. Passenger cargo 7. Project cargo 8. Refrigerated cargo 9. Roll-on/roll-off cargo Break Bulk: Concerns cargo that is carried in drums, bags, pallets or boxes. Such ships are typically geared. Neo Bulk: Concerns cargo where each pre-packaged unit is accountable such as lumber (bundles), paper (rolls), steel and vehicles. Containerized: The growth of container shipping required the creation of a new general cargo category where the cargo is being carried in container load units. Liquid bulk: The majority of the liquid bulk being carried is petroleum LNG (Liquefied Natural Gas) represents an emerging segment. L...

Write a program in python to Find Reverse of a Number

Write a program in python to Find Reverse of a Number # Python Program - Find Reverse of a Number print("Enter 'x' for exit."); num = input("Enter any number: "); if num == 'x':     exit(); try:     number = int(num); except ValueError:     print("Please, enter a number..."); else:     rev = 0;     while number > 0:     rev = (rev*10) + number%10;     number //= 10;     print("Reverse of entered number =",rev);

Write a program in python to Calculate Circumference of Circle

Write a program in python to Calculate Circumference of Circle # Python Program - Calculate Circumference of Circle print("Enter 'x' for exit."); rad = input("Enter radius of circle: "); if rad == 'x':     exit(); else:     radius = float(rad);     circumference = 2*3.14*radius;     print("\n Circumference of Circle =",circumference);

Write a program in python to Calculate Perimeter of Square

Write a program in python to Calculate Perimeter of Square # Python Program - Calculate Perimeter of Square print("Enter 'x' for exit."); side = input("Enter side length of square: "); if side == 'x':     exit(); else:     slength = int(side);     perimeter = 4*slength;     print("\nPerimeter of Square =", perimeter);

Write a program in python to Calculate Area of Square

Write a program in python to Calculate Area of Square Answer: # Python Program - Calculate Area of Square print("Enter 'x' for exit."); side = input("Enter side length of Square: "); if side == 'x':     exit(); else:     side_length = int(side);     area_square = side_length*side_length;     print("\nArea of Square =",area_square);

Write a program in python to Calculate Area of Circle

Write a program in python to Calculate Area of Circle # Python Program - Calculate Area of Circle print("Enter 'x' for exit."); rad = input("Enter radius of circle: "); if rad == 'x':     exit(); else:     radius = float(rad);     area = 3.14 * radius * radius;     print("\nArea of Circle = %0.2f" %area);

Write a program in python to Calculate Area of Triangle

Write a program in python to Calculate Area of Triangle # Python Program - Calculate Area of Triangle print("Enter 'x' for exit."); side1 = input("Enter length of first side: "); if side1 == 'x':     exit(); else:     side2 = input("Enter length of second side: ");     side3 = input("Enter length of third side: ");     a = float(side1);     b = float(side2);     c = float(side3);     s = (a + b + c)/2;     area = (s*(s-a)*(s-b)*(s-c)) ** 0.5;     print("\nArea of Triangle = %0.2f" %area);

Write a program in python to Calculate Area of Rectangle

Write a program in python to Calculate Area of Rectangle # Python Program - Calculate Area of Rectangle print("Enter 'x' for exit."); leng = input("Enter length of Rectangle: "); if leng == 'x':     exit(); else:     brea = input("Enter breadth of Rectangle: ");     length = int(leng);     breadth = int(brea);     area = length*breadth;     print("\nArea of Rectangle =",area);

Write a Python Program Code to Print Floyd's Triangle

Write a Python Program Code to Print Floyd's Triangle Answer: # Python Program - Print Floyd Triangle print("Enter 'x' for exit.") ran = input("Upto how many line ? ") if ran == 'x':     exit(); else:     rang = int(ran)     k = 1     for i in range(1, rang+1):         for j in range(1, i+1):             print(k, end=" ")             k = k + 1         print()