Dinesh_dev

Dinesh_dev

Member Since 1 Year Ago

Experience Points 730
Experience Level 1

4,270 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.

17 Aug
13 hours ago

Dinesh_dev left a reply on 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';
    }


}

Dinesh_dev left a reply on 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);
11 Aug
6 days ago

Dinesh_dev 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

20 Feb
5 months ago

Dinesh_dev left a reply on How To Get Back Original File Code After Running Production Command In Laravel Mix

@TOKOIWESLEY - When run npm dev and check for error in console log , its show unminified code and point also where is error occur ,but it show all code in single file (in my app.js is mix file). It don't show like glup which is previously used in laravel 5, there in console you know that the code is from which file , but this is not happening laravel 5.4

25 Jan
6 months ago

Dinesh_dev left a reply on Insert Image With Laravel-Excel

@DONPUERTO - how to set 2 images

24 Jan
6 months ago

Dinesh_dev started a new conversation How To Get Back Original File Code After Running Production Command In Laravel Mix

Hi,

I added several file js and css file webpack.mix.js file

and then run npm run production.

after some error occur in js file, so i want to know how to which file is throwing that error. (like in laravel 5.1when we gulp watch, it show original file code).

15 Jan
7 months ago

Dinesh_dev left a reply on Uncaught ReferenceError: Require Is Not Defined Laravel 5.4.36

default app.js code


/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

Vue.component('example', require('./components/Example.vue'));

const app = new Vue({
    el: '#app'
});

the error pointing here

I also tried with deleting npm folder and installing new , still problem persist

14 Jan
7 months ago

Dinesh_dev started a new conversation Uncaught ReferenceError: Require Is Not Defined Laravel 5.4.36

Uncaught ReferenceError: require is not defined How to fix this? my node version is v10.15.0 my npm version is 6.4.1

I tried to fix npm broken packages by fix command, still its not fixing.

Can somebody tell me solution . Thanks in advance.

14 Mar
1 year ago

Dinesh_dev left a reply on Laravel Forces Use Of Constructer Like This '__construct'. Wondering Why?

@jcmargentina, bro read my post carefully , if it not clear tell me

I am saying I am using same php version for in both scenario, but it work in one and not work in other.

Old-style constructor worked when used library outside of Laravel framework.

When use this library inside Laravel framework, old-style constructor not work, Even though both use Same php version.

Dinesh_dev left a reply on Laravel Forces Use Of Constructer Like This '__construct'. Wondering Why?

@topvillas In both condition I am using same php version 5.6.8

Dinesh_dev started a new conversation Laravel Forces Use Of Constructer Like This '__construct'. Wondering Why?

I am using Laravel 5.1 and PHP version 5.6.8.

I am using Pchart library for server side graph creation. In this library ,class defined constructor in old style i.e function name same as class name. When I test this library outside Laravel this library work fine.(old-style constructor works.It get called).But when I used this libray inside Laravel the old-style constructor not called. Why this happing?

code of Library upto constructor

namespace App\Helpers\Pchart\lib; 
 class pPie
  {
       var $pChartObject;
       var $pDataObject;
       var $LabelPos = "" ;

   /* Class creator */
   function pPie($Object,$pDataObject)
    {
     //Control come here when used this library outside of laravel
     /* Cache the pChart object reference */
     $this->pChartObject = $Object;

     /* Cache the pData object reference */
     $this->pDataObject  = $pDataObject;
    }
   ............
}  

Can somebody tell me why this happing?