Monday, 15 April 2019

Laravel Excel importer with OAuth login support

It been days I am posting something new a laravel repo with excel sheet importing function.

Actually we can customise the excel importer in any way  like any number of rows and columns.

And this repo also have Passport driven Oauth Login. Which can be used for Authentication on web and mobile platform. So please comment and share about the how it is. I will be sharing my github repo here so you can easily clone it from there and I have made the installation in read.me so follow it and make it run.

Github link for ExcelImporter

So I will like your guys feedback and comments and anybody can change as per their use and share it and use it.

Thanks for visiting and using it.

Below is the screenshot how does the interface looks.

1] Signup page.




 2] File importer page.
   
                                                                                                                                                                3] Imported Item List with Edit and Delete functionality. 




Monday, 17 September 2018

Basic Car insurance Calculator

It been days I have posted due to some down fall in my life but here I come to give you guys something cool to see and use on your website.

So its car insurance calculator just add amount , rate and no of installments and you will see the calculated stuff based on it with EMI brakedown. so below is the link for my github repo where i kept the code just clone it for use.

Github link for code for insurance calculator

Below is the demo screens of working protype
1] Landing URL
http://localhost/insly/insurance/insurance.php














2] Calculated result output


Wednesday, 21 December 2016

Program for detecting language of text from pdf in python using NLTK:

     In this code I have taken a dummy pdf and extracted the content and tried to detect the language  of the text. Since I have used the library called as nltk. I have used the approach of stopwords.
     Bascially stopwords are the words in every language which removing form the text will not effect the meaning of the text. So stopwords are the , but ,etc for english. I have used the similar approach for this. Please go through the below github link for downloading or viewing the code , instruction for the usage is also written in read.me file.


Thanks for reading it will keep posting interesting things. 

Monday, 5 January 2015

Multi - Threadded Web - Crawler using Jsoup in java

If anyone can improve this code it will be pleasure for me being a beginner i tried my best to develop that crawler.

package tes;
import java.io.IOException;
import java.util.HashSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;


public class Nam implements Runnable{
   
        private Thread t;
   private String threadName;
  
   Nam( String name){
       threadName = name;
       System.out.println("Creating " +  threadName );
   }
   public void run() {
  String crawlUrl = this.threadName;
   int i=0;
    HashSet<String> anchors = new HashSet<String>();
    try
    {
        Document doc = Jsoup.connect(crawlUrl).get();
        Elements hrefs = doc.select("a");
        for( Element e : hrefs)
        {
            String anchor = e.attr("href").trim();
            anchors.add(anchor);
            System.out.println(anchor);
        }
    }
    catch(IOException ex)
    {
        Logger.getLogger(Tes.class.getName()).log(Level.SEVERE,null,ex);
    }
   
    System.out.println("--------------------");
   
    for( String s:anchors)
    {
         System.out.println(s);
         i++;
    }
       System.out.println("No of Crawled URL::"+i);

}

  
  
   public void start ()
   {
      System.out.println("Starting " +  threadName );
      if (t == null)
      {
         t = new Thread (this, threadName);
         t.start ();
      }
   
}
}


package tes;

public class Tes {
    public static void main(String[] args) {
       
  
      Nam R1 = new Nam( "http://www.yepme.com/");
      R1.start();
     
      Nam R2 = new Nam( "http://www.jabong.com/");
      R2.start();
}
    }
 

Tuesday, 7 October 2014

Implementation of Live Search using Ajax,Jquery and PhP

<html>
<head>
<title>Search using Ajax</title>

 <script type=text/javascript src="https://code.jquery.com/jquery-git2.min.js">// necessary jquery source</script>
 <script>                                              //  Ajax jquery function for Live Search
        $(function(){
           $('.input').keyup(function(){
             var search = $('.input').val();
           
         $.post("s.php","post",{"search":search},function(data){
            $('.azam').html(data); 
            
          });
          });
          });
 </script>
</head>
 <body>
   <div class="azam">
  <form action=s.php method="post">
  <input type="text" name="search" class="input">
  <input type="submit" name="submit" value="search">
  </form>
 </div>
</body>
<?php
// Database Connection
mysql_connect("localhost","root","root");
mysql_select_db("Cake");
if($_POST['submit'])
{
//grab post data
$prod_form=$_POST['search'];


//extract data

$extract=mysql_query("SELECT username FROM users WHERE username LIKE '%$prod_form%'");


while($row=mysql_fetch_assoc($extract))
//displays the data of the database that satisfies 
{
echo "<br>";
echo $row['username'];
}

}   
?>


</html>

Tuesday, 30 September 2014

Program to copy the content of one file into another file in C

#include<stdio.h>

void main()
{
 FILE *f1,*f2,*f3;
 char fn[10],a[1000],buff[1000];
 int i,j;
     
  printf("Enter the file name::");
  gets(fn);
 
     f1 = fopen(fn,"w");
   printf("Enter the content of the File::");
     gets(a);
     fprintf(f1,"%s",a);
 fclose(f1);

    f2 = fopen(fn,"r");
    f3 = fopen("fat.txt","w");
     while( fgets(buff,1000,f2) != NULL )
        fprintf(f3,"%s",buff);
 fclose(f2);
 fclose(f3);
  printf("The content of the File::");
    f3 = fopen("fat.txt","r");
   while( fgets(a,1000,f3) != NULL )
     {
       printf("%s",a);  
     }
 printf("\n");
 fclose(f3);
}

Function getche() for linux user

#include <stdio.h>
#include <termios.h>
#include <unistd.h>


int getche(void)
{
    struct termios oldattr, newattr;
    int ch;
    tcgetattr( STDIN_FILENO, &oldattr );
    newattr = oldattr;
    newattr.c_lflag &= ~( ICANON );
    tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
    ch = getchar();
    tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
    return ch;
}