Thursday, 7 February 2019

WhatsApp will give Rs 1.8 crores to new Indian startups, Here is all you need to know

The "Startup India WhatsApp Grand Challenge" has been appraise growth in the entrepreneurial sector. Total prize money of Rs 1.8 crore is up for grabs.

Key Points:

  • The competition carries a total prize amount of Rs 1.8 crore for top 5 winners.
  • The competition invites ideas in various sectors such as healthcare, rural, economy, financial and more.
  • Registrations for the contest will be opened till March 10, 2019.
  • Over the last few years, WhatsApp has come across as more than just a messenger in India. The platform has been responsible for providing a local social network in the form of WhatsApp groups. 
  • The app has also been a platform to several growing businesses as well as help fuel new startups. To help with that, the company launched WhatsApp for Business that offered more business tools to aid startups as well as entrepreneurs. Now, the company has come with content that will help boost the entrepreneurial sector in India.
  • WhatsApp has launched the "Startup India WhatsApp Grand Challenge" in India. The contest has been organized to fuel growth in India's startup as well as the entrepreneurial sector. 
  • The competition carries a total prize amount of Rs 1.8 crore for top 5 winners.
  • The competition is open to all entrepreneurs and invites ideas in various sectors such as healthcare, rural, economy, financial and digital inclusion, education and citizen safety.
"Entrepreneurs with highly innovative ideas, business models that solve for a local India problem, making a large scale socio-economic impact, are invited to apply," WhatsApp said in a media release.
Registrations for the contest will be opened till March 10, 2019. 
The process for the selection has been listed below:
  1. The applications will be evaluated by an independent evaluation committee.
  2. Out of the selected ones, the 30 best ideas will be shortlisted for the subsequent round and on to 10 in the following round.
  3. The final 10 selected ideas will be invited to participate in the final round of the grand finale.
  4. At the end, the five winning ideas will receive a monetary prize of $50,000 (approximately Rs 35.6 lakhs) on May 24.
According to data provided by WhatsApp, the messenger platform has been known to help around 84 per cent of small and mid-tier businesses communicate in their field. Additionally, around 80 per cent of such businesses have found WhatsApp to help them grow.

 

Wednesday, 6 February 2019

WhatsApp struggles to protect us from fake news

The government has taken note of reports about spread of fake news, misinformation or disinformation on the Internet, Union Minister of State for Home Hansraj Ahir said.


New Delhi:

  • In the wake of the spread of fake news, the centre has directed the messaging platform WhatsApp to come out with effective solutions that can bring in accountability and facilitate enforcement of law against dissemination of wrong information.
  • Union Minister of State for Home Hansraj Ahir said in Lok Sabha that the government has taken note of reports about spread of fake news, misinformation or disinformation on the Internet, particularly using WhatsApp platform.
  • "Ministry of Electronics and Information Technology issued notices to WhatsApp conveying that they need to come out with effective solutions that can bring in accountability and facilitate enforcement of law in addition to labelling forwards and weeding out fake news," he said in a written reply to a question.
  • Mr Ahir said WhatsApp has conveyed that a number of steps have been taken by it to address the issue of fake news propagated using the platform.

COMMENT
"Meetings with law enforcement agencies and intermediaries are held on regular basis to strengthen the coordination framework for better enforcement of the law," he said.

 

Saturday, 15 December 2018

Auto check for update function for android app | android studio

If you are having an app on Google Play Store and you want that whenever you update the app on playstore and when the user opens the older version of app he/she will get a dialog that there is an Update available .
Each time the user will open the app he/she will get the same dialog until he/she updates the app.

Advantages:

This will inform the user as a notice that there is an update.

Users will have the latest version of app.
Automatically checks for update in the background.
There is also an option for mannual check and automatic check.




How to use:

Step-I
I have already create a class(AppUpdateChecker.java) to achieve this feature that will handle it automatically.

AppUpdateChecker.java
 
 package com.programmingdesire;  
 import android.app.Activity;  
 import android.app.ProgressDialog;  
 import android.content.DialogInterface;  
 import android.content.Intent;  
 import android.content.pm.PackageInfo;  
 import android.content.pm.PackageManager;  
 import android.net.Uri;  
 import android.os.AsyncTask;  
 import android.support.v7.app.AlertDialog;  
 import android.widget.Toast;  
 import org.jsoup.Jsoup;  
 public class AppUpdateChecker {  
   private Activity activity;  
   public AppUpdateChecker(Activity activity) {  
     this.activity = activity;  
   }  
   //current version of app installed in the device  
   private String getCurrentVersion(){  
     PackageManager pm = activity.getPackageManager();  
     PackageInfo pInfo = null;  
     try {  
       pInfo = pm.getPackageInfo(activity.getPackageName(),0);  
     } catch (PackageManager.NameNotFoundException e1) {  
       e1.printStackTrace();  
     }  
     return pInfo.versionName;  
   }  
   private class GetLatestVersion extends AsyncTask<String, String, String> {  
     private String latestVersion;  
     private ProgressDialog progressDialog;  
     private boolean manualCheck;  
     GetLatestVersion(boolean manualCheck) {  
       this.manualCheck = manualCheck;  
     }  
     @Override  
     protected void onPostExecute(String s) {  
       super.onPostExecute(s);  
       if (manualCheck)  
       {  
         if (progressDialog!=null)  
         {  
           if (progressDialog.isShowing())  
           {  
             progressDialog.dismiss();  
           }  
         }  
       }  
       String currentVersion = getCurrentVersion();  
       //If the versions are not the same  
       if(!currentVersion.equals(latestVersion)&&latestVersion!=null){  
         final AlertDialog.Builder builder = new AlertDialog.Builder(activity);  
         builder.setTitle("An Update is Available");  
         builder.setMessage("Its better to update now");  
         builder.setPositiveButton("Update", new DialogInterface.OnClickListener() {  
           @Override  
           public void onClick(DialogInterface dialog, int which) {  
             //Click button action  
             activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+activity.getPackageName())));  
             dialog.dismiss();  
           }  
         });  
         builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {  
           @Override  
           public void onClick(DialogInterface dialog, int which) {  
             //Cancel button action  
           }  
         });  
         builder.setCancelable(false);  
         builder.show();  
       }else {  
         if (manualCheck) {  
           Toast.makeText(activity, "No Update Available", Toast.LENGTH_SHORT).show();  
         }  
       }  
     }  
     @Override  
     protected void onPreExecute() {  
       super.onPreExecute();  
       if (manualCheck) {  
         progressDialog=new ProgressDialog(activity);  
         progressDialog.setMessage("Checking For Update.....");  
         progressDialog.setCancelable(false);  
         progressDialog.show();  
       }  
     }  
     @Override  
     protected String doInBackground(String... params) {  
       try {  
         //It retrieves the latest version by scraping the content of current version from play store at runtime  
         latestVersion = Jsoup.connect("https://play.google.com/store/apps/details?id=" + activity.getPackageName() + "&hl=it")  
             .timeout(30000)  
             .userAgent("Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6")  
             .referrer("http://www.google.com")  
             .get()  
             .select(".hAyfc .htlgb")  
             .get(7)  
             .ownText();  
         return latestVersion;  
       } catch (Exception e) {  
         return latestVersion;  
       }  
     }  
   }  
   public void checkForUpdate(boolean manualCheck)  
   {  
     new GetLatestVersion(manualCheck).execute();  
   }  
 }  

Step-II
Add a library to your build.gradle(App level) file.

   implementation 'org.jsoup:jsoup:1.10.2'  

Step-III
The last step is to copy that class and then write two lines of code.


 AppUpdateChecker appUpdateChecker=new AppUpdateChecker(this);  //pass the activity in constructure
 appUpdateChecker.checkForUpdate(false); //mannual check false here

Lets understand what is manual check

If manual check is true then
Manual check will be on a button click this will show the dialog as "Checking for update"



If manual  check is false then
Checking for update will be performed in the background and finally a dialog will be visible if there is any update.


If user will click on update it will open your app in playstore to update your app.

Thats all.

Thanks for visiting, I will come with new code snippet.
Happy Coding.......





Save Your Friends Status - WhatsApp Status Saver App

Love your friend's status ? Hesitate to ask? you are on the right page.

Its been easy to grab the whatsapp status of your whatsapp contacts.

So here are the steps to save or share the status (Image or Video) of whatsApp.

1. Install  WhatsApp Status Saver App by ProgrammingDesire.com in your phone.


2. Open whatsApp and watch some status.

3.Come back to Status Saver and you will find the status there to download and share.



Directly open whatsapp from status saver . 


You can save status to your internal storage. 


You can directly share the status to whatsApp or any other social medial very easily by clicking on the share button. 

Now Enjoy the life with pride.









Sunday, 9 December 2018

How to insert images in C/ C++ using graphics(100% working)

Hello friends today we will learn how to insert images in  C++ language very easily using graphics.The things that are required for this work are listed here .....

1.Codeblocks compiler installed on your system:

Code::Blocks is a freeopen-source cross-platform IDE that supports multiple compilers including GCCClang and Visual C++. It is developed in C++ using wxWidgets as the GUI toolkit. Using a plugin architecture, its capabilities and features are defined by the provided plugins. Currently, Code::Blocks is oriented towards CC++, and Fortran. It has a custom build systemand optional Make support.(by wikipedia).

2.Graphics libraries should set up with codeblocks:

When we install codeblocks then there is no library and header file of graphics are given by the developers with it, so we have to configure these things manually.I come across a lots of videos on youtube to configure graphics in codeblocks and i found all the videos are just waste of time except one video and i learnt  from that video .It was a bit difficult for me to configure graphics in codeblocks.
This is why because i was getting the libraries and header file with bug.
So i thought to create a video on this topic on my own  :How to use graphics in codeblocks video






  If you did these two things then you can use this program or concept to insert images in C++ language using graphics in Codeblocks.
Here we go:
 #include<iostream>  
 #include<graphics.h>  
 int main()  
 {  
   initwindow(600,400,"Images");  
   readimagefile("image_name.jpg",0,0,600,400);  
   getch();  
   readimagefile("image_name.jpg",0,0,600,400);  
   getch();  
   return 0;  
 }  



Description of the program:


If you are using codeblocks to make programs in graphics mode then we can make the programs in only C++ because in the graphics.h header file there is reference to iostream and if we work in C language then it will not link and then we get error in header file graphics.h.



here we have used the two important predefinded functions of graphics they are....

  • initwindow():this function is used to initialise a new window or you can say a  new window
  • readimagefile():this is the function that is used to set images in our program.
readimagefile() takes five parameters the first parameter is the name of the image with extension of the image and the rest are the co-ordinates of the screen where to set.


Thanks for visiting ...we will come with new typical programs so stay connected.







How to insert image in c language in turboc IDE

Its been very interesting as well as difficult to work with graphics in c or c++ languages.
But it will be more interesting to work with image insertion in C or C++ language.

I have already created the post to insert image in c/c++ in codeblocks IDE but now its time to achieve this using Turbo C++ IDE.

 Befor writing code we have to take care of  these points.
  • Create a  bmp(16 color Bitmap) image file using paint or any other image editor. 
  • paste that file into bin folder of turbo c where this program will be saved.
  • After pasting we will continue to write the below code.




 
 #include <alloc.h>  
   #include <conio.h>  
   #include <graphics.h>  
   #include <stdio.h>  
   #include <stdlib.h>  
   struct BMP  
   {  
    char Type[2];      //File type. Set to "BM".  
    unsigned long Size;   //Size in BYTES of the file.  
    unsigned long Reserved;   //Reserved. Set to zero.  
    unsigned long OffSet;  //Offset to the data.  
    unsigned long headsize; //Size of rest of header. Set to 40.  
    unsigned long Width;   //Width of bitmap in pixels.  
    unsigned long Height;   // Height of bitmap in pixels.  
    unsigned int Planes;  //Number of Planes. Set to 1.  
    unsigned int BitsPerPixel;    //Number of Bits per pixels.  
    unsigned long Compression;  //Compression. Usually set to 0.  
    unsigned long SizeImage; //Size in bytes of the bitmap.  
    unsigned long XPixelsPreMeter;   //Horizontal pixels per meter.  
    unsigned long YPixelsPreMeter;   //Vertical pixels per meter.  
    unsigned long ColorsUsed;  //Number of colors used.  
    unsigned long ColorsImportant; //Number of "important" colors.  
   };  
   int ShowBMP(int x, int y, char* FileName)  
   {  
     int b,a;  
     struct BMP Obj;  
     unsigned char* Datas;  
     int in=0;  
     unsigned char c=0;  
     FILE * fp;  
     fp = fopen(image.bmp,"rb"); //give filename of image with extension.  
     if(!fp){  
     printf("Error : Unable to open file ..");  
     exit(0);  
     }  
     fread(&Obj, sizeof(Obj), 1, fp);  
     if(Obj.BitsPerPixel!=4) // This isn't a 16 color bmp we can read;  
     {  
      fclose(fp);  
      printf("Error : File format not supported ..");  
      exit(0);  
     };  
     fseek(fp,Obj.OffSet,SEEK_SET);  
     Datas=(unsigned char*) calloc(Obj.Width/2+1, sizeof(unsigned char));  
     for(b=Obj.Height;b>=0;b--)  
     {  
      fread(Datas, sizeof(unsigned char), Obj.Width/2, fp);  
      c=0;  
      in=0;  
      for(a=0;a<=Obj.Width;a+=2)  
      {  
        c = (Datas[in] | 0x00) >>4;  
        putpixel(a+x,b+y,c);  
        c = (Datas[in] | 0xF0) & 0x0F;  
         putpixel(a+1+x,b+y,c);  
        in++;  
      }  
     }  
     free (Datas);  
     fclose(fp);  
     return 1;  
   }  
   void main()  
   {  
   int color;  
   int gd , gm ;  
   gd = VGA ; gm = VGAHI;  
   initgraph(&gd,&gm,"");  
   ShowBMP(0,0,"j.bmp"); /* Enter File Name Here */  
   getch();  
   closegraph();  
   }  

Now Run the code and you will get your image as output.
 
 

Thursday, 29 November 2018

AI helps in detecting water leackage

Scientists have developed an artificial intelligence (AI) technology that can detect even small leaks in pipes, and could potentially help municipal systems significantly reduce water losses.

The system designed by researchers at the University of Waterloo in Canada combines sophisticated signal processing techniques and AI software to identify telltale signs of leaks carried via sound in water pipes.

The acoustic signatures are recorded by hydrophone sensors that can be easily and inexpensively installed in existing fire hydrants without excavation or taking them out of service.

"This would allow cities to use their resources for maintenance and repairs much more effectively. They could be more proactive as opposed to reactive," said Roya Cody, a PhD candidate at Waterloo.

"Major problems such as burst pipes are revealed by pressure changes, volume fluctuations or water simply bubbling to the surface, but small leaks often go undetected for years," said Cody.

In addition to the economic costs of wasting treated water, chronic leaks can create health hazards, do damage to the foundations of structures and deteriorate over time.

"By catching small leaks early, we can prevent costly, destructive bursts later on," said Cody.

Researchers are now doing field tests with the hydrant sensors after reliably detecting leaks as small as 17 litres a minute in the lab.

They are also working on ways to pinpoint the location of leaks, which would allow municipalities to identify, prioritise and carry out repairs.

"Right now they react to situations by sending workers out when there is flooding or to inspect a particular pipe if it's due to be checked because of its age," Cody said.

The sensor technology works by pre-processing acoustic data using advanced signal processing techniques to highlight components associated with leaks.

That makes it possible for machine learning algorithms to identify leaks by distinguishing their signs from the many other sources of noise in a water distribution system.

WhatsApp will give Rs 1.8 crores to new Indian startups, Here is all you need to know

The "Startup India WhatsApp Grand Challenge" has been appraise growth in the entrepreneurial sector. Total prize money of Rs 1.8...