Dinesh_dev

Dinesh_dev

Member Since 1 Year Ago

Experience Points
780
Total
Experience

4,220 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
4
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
780 XP
Dec
08
1 day ago
Activity icon

Started a new Conversation Progressive Web Application

Can in laravel ,it is possible to make progressive web application.

If yes, can provide some code tutorial.

Aug
17
3 months ago
Activity icon

Replied to Write To File Till It Reaches 10mb Sizes

answer to 2 question is this

<?php



ini_set('max_execution_time', '0');
function variabletype($param)
{
    $param = trim($param);

    if(preg_match('/^\d+$/',$param)){
        return 'integer';
    }

    if(strpos($param, '.')){
        return 'real numbers';
    }

    // $paramg.matches(".*[a-zA-Z0-9.*")
    if(preg_match('/[a-zA-Z][0-9]/', $param)){
        return 'alphanumeric';
    }

    if(!preg_match('/^\d+$/',$param)){
        return 'alphabetical strings';
    }


}

// $myfile = fopen("new_file.txt", "r") or die("Unable to open file!");
$myfile = fopen("new_file.txt", "r") or die("Unable to open file!");
$handle = fread($myfile,filesize("new_file.txt"));

$stringarray = explode(',', $handle);

array_pop($stringarray);

foreach ($stringarray as $key => $value) {
    echo $value.' - '.variabletype($value).'<br>';
}

Activity icon

Replied to Write To File Till It Reaches 10mb Sizes

function randomString($param) {
   $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
   $randomString = '';
   for ($i = 0; $i < $param; $i++) {
       $index = rand(0, strlen($characters) - 1);
       $randomString .= $characters[$index];
   }
   //for adding random number of white spaces..
   $length = strlen($randomString)+mt_rand(1,9);
   //adding random white spaces in string.
   return str_pad($randomString, $length, ' ', STR_PAD_BOTH);
}

$my_file = 'new_file.txt';
$handle = fopen($my_file, 'a') or die('Cannot open file:  '.$my_file);

// 10485760
while(filesize($my_file)<10485760)
{
    ini_set('max_execution_time', '0');
   $integer = mt_rand(10,1000000);
   //generate real interger
   $realinteger = $integer/1000;

   $alphainteger = mt_rand(1,10);

   //generate alphanumeric value...
   $alphanumeric = md5($alphainteger);
   //generate alphabets
   $alphastring = randomString($alphainteger);

   $data = $integer.','.$realinteger.','.$alphastring.','.$alphanumeric.',';

   fwrite($handle, $data);
   //for clearing size, to read update the filesize.
   clearstatcache();
}
fclose($handle);
Aug
11
3 months ago
Activity icon

Started a new Conversation Write To File Till It Reaches 10mb Sizes

I want to store random objects in a single file, each object will be separated by a ",". These are the 4 objects: alphabetical strings, real numbers, integers, alphanumerics. The alphanumerics should contain a random number of spaces before and after it (not exceeding 10 spaces).

e.g hisadfnnasd, 126263, assfdgsga12348fas, 13123.123, lizierdjfklaasf, 123192u3kjwekhf, 89181811238,122,

  1. Create a program that will read the generated file above and print to the console the object and its type. Spaces before and after the alphanumeric object must be stripped.

Sample output:

youruasdifafasd - alphabetical strings 127371237 - integer asdfka12348fas - alphanumeric 13123.123 - real numbers asjdfklasdjfklaasf - alphabetical strings 123192u3kjwekhf - alphanumeric