davy_yg

davy_yg

Jakarta

Member Since 1 Year Ago

Experience Points 56,320
Experience
Level
Lessons Completed 317
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

11 Dec
2 days ago

davy_yg left a reply on Pop Up Box With Javascript

I check it but still do not understand it.

Will this works:

<script>
     $(document).ready(function(){

        alert("Success");

     }

     </script>   

It should loads on the beginning of the page.

davy_yg started a new conversation Pop Up Box With Javascript

How to create pop up box with javascript?

mentions "Your CV has been accepted".

10 Dec
3 days ago

davy_yg left a reply on PHP Query

I cannot understand why select.php is being processed.

form.php

<form method="post" action="select.php">

When I load form.php the error appears.

Notice: Undefined variable: nama in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: jenis_kelamin in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: tanggal_lahir in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

davy_yg left a reply on PHP Query

I still wonder where I get the undefined variable?

davy_yg left a reply on PHP Query

Then I get this error:

1

Notice: Undefined variable: nama in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: jenis_kelamin in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: tanggal_lahir in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: nohp in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: email in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: alamat in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: provinsi in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: kota in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: zip in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: status_nikah in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: jumlah_tanggungan in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: agama in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: file_attachment in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

Notice: Undefined variable: cover_letter in C:\xampp\htdocs\website_ids\IDS\select.php on line 49

simpan - gagal 

I wonder why undefined variable since the variables are the columns name in the database.

davy_yg left a reply on Video Tutorial

How to fix the error? Thanks in advance.

davy_yg started a new conversation PHP Query

Hello,

This is PHP.

Help me understand this code:

if($selectDB == true){
    $query = "INSERT INTO recruitment 
            (ID, nama, jenis_kelamin, tanggal_lahir, nohp, email, alamat, provinsi, kota, zip, status_nikah, jumlah_tanggungan, agama, file_attachment, cover_letter)
          VALUES (NULL, '$nama', '$jenis_kelamin', '$tanggal_lahir', '$nohp', '$email', '$alamat', '$provinsi', '$kota', '$zip', '$status_nikah','$jumlah_tanggungan','$agama','$file_attachment', '$cover_letter');";

        // "INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
        // VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');";


    $simpan = mysqli_query($connect, $query);
    echo "save - ".$simpan;

    if(!$simpan){
        echo 'failed';
    }else{
            echo 'success';
    }
}

I wonder why $simpan = '' ?

1simpan - failed?

What did I do wrong?

05 Dec
1 week ago

davy_yg left a reply on Cron Job

          • cd /var/www/html/ids-api/releases/6/ && php artisan schedule:run >> /dev/null 2>&1

davy_yg started a new conversation Cron Job

Hello,

I would like to send cron job auto email scheduler in the server. This is the script. I wonder why it does not work out.

Crontab –e
_ _ _ _ * php /path/to/artisan schedule:run >> /dev/null 2>&1
03 Dec
1 week ago

davy_yg left a reply on Video Tutorial

This is the error:

Loading failed for the with source “https://player.vimeo.com/api/player.js”. 1:1:1 Modal "login-modal" has scrollable flag set to true but height is not "auto" (100%) vendor.js:1:315196 Modal "join-modal" has scrollable flag set to true but height is not "auto" (100%) vendor.js:1:315196 Modal "search-modal" has scrollable flag set to true but height is not "auto" (100%)

davy_yg left a reply on Hide And Show Arrow

The hide and show expanded already works.

Only the hide and show arrow does not works.

davy_yg left a reply on Hide And Show Arrow

I don't know how to use the css transform rotate property.

This script shows arrow from font awesome one of them arrow right and the other arrow down.

    <span id="arrow"><i class="fa fa-angle-right"></i></span>
    <span id="arrowd"><i class="fa fa-angle-down"></i></span>

davy_yg started a new conversation Hide And Show Arrow

How hide and show arrow? This is my script:

<div id="Pages">    
    <li class="nav-item {{ (Request::segment(1) == 'dashboard') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="#expanded" data-toggle="collapse" class="collapsed">
        
        <i class="fa fa-table"></i>
        <span class="nav-link-text">Dashboard</span>
        
        <span id="arrow"><i class="fa fa-angle-right"></i></span>
        <span id="arrowd"><i class="fa fa-angle-down"></i></span>
        
      </a>
    </li>
    </div>

    <div id="expanded">        
      
    <li class="nav-item-sub {{ (Request::segment(1) == 'dashboard-thxh') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="{{ url('/dashboard-thxh') }}">            
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Dashboard TRX Harian</span>
      </a>
    </li>

    <li class="nav-item-sub {{ (Request::segment(1) == 'dashboard-thxhpromo') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="{{ url('/dashboard-thxhpromo') }}">
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Dashboard TRXH PROMO</span>
      </a>
    </li>
    </div>  

...

$( "#Pages" ).click(function(e) {

    if(!$('#Pages').hasClass('expanded')) {
        $('#Pages').addClass('expanded');

        $("#expanded").css("margin-left","40px");
    
        $('#arrow').show();
        $('#arrowd').hide();       
  
  } else {
    
    $('#Pages').removeClass('expanded');        
      
        $('#arrow').hide();
        $('#arrowd').show(); 
  }

In this case, both arrow still showing. I am unable to hide and show particular arrow.

02 Dec
1 week ago

davy_yg started a new conversation Edit Privileges: User Account 'solusipay'@'%' - Database Ids

When I try to add the password to my existing user in my phpmyadmin.

Edit privileges: User account 'solusipay'@'%' - Database ids
The selected user was not found in the privilege table.

SQL query: Edit Edit

GRANT ALL PRIVILEGES ON  `ids`.* TO 'solusipay'@'%' WITH GRANT OPTION;

MySQL said: Documentation
#1133 - Can't find any matching row in the user table

I wonder why?

davy_yg left a reply on View [view.name] Not Found

This is when I click submit --> save schedule.

30 Nov
1 week ago

davy_yg left a reply on View [view.name] Not Found

I try this and it does not works out:

<form id="myForm" action="{{ ($data != '') ? url('/edit-schedule') : url('/save-repeated') }}" method="post" enctype="multipart/form-data">

The routes has a long list:

I just gives you the schedules routes:

// Schedule
    Route::post('/save-schedule','[email protected]');
    Route::post('/edit-schedule', '[email protected]');
    Route::get('/edit-schedule/{id}', '[email protected]');
    Route::get('/delete-schedule/{id}', '[email protected]');

    Route::post('/save-repeated', '[email protected]');

davy_yg left a reply on View [view.name] Not Found

I try what you adviced and it does not work out (the last two comments).

davy_yg started a new conversation Video Tutorial

Hello,

I would like to know why I cannot view the video: http://www.advance-web-studio.com/download/laracast.png

Thanks in advance.

davy_yg left a reply on View [view.name] Not Found

web.php

Route::post('/save-repeated', '[email protected]');

davy_yg started a new conversation View [view.name] Not Found

Hello,

I wonder what's wrong with this:

View [view.name] not found.

add_repeated.blade.php

<form id="myForm" action="{{ ($data != "") ? url('/edit-schedule') : url('/save-repeated') }}" method="post" enctype="multipart/form-data">
                @csrf
                <input type="hidden" name="scheduleId" value="{{ ($data) ? $data->id : "" }}" />
                
                <b>Schedule</b>
                
                <div class="form-group">
                
                </div>

                <input type="hidden" name="scheduleId" value="{{ ($data) ? $data->id : "" }}" />
                <div class="form-group">

                    <label style="font-weight:500">Select Day</label>
                   <!-- <form action="/action_page.php">-->
                        <select class="form" name="day">
                        <option value="1">Senin</option>
                        <option value="2">Selasa</option>
                        <option value="3">Rabu</option>
                        <option value="4">Kamis</option>
                        <option value="5">Jumat</option>
                        <option value="6">Sabtu</option>
                        <option value="7">Minggu</option>
                        </select>
                    <!--</form>-->
                    
                </div>
                <div class="form-group">
                    <label style="font-weight:500">Select Time</label>
                    <input name="time" class="timepicker" type="text" placeholder="" value="{{ ($data) ? $data->time : old('time') }}">

                </div><!-- class="timepicker" -->
                <!-- value="{{ ($data) ? $data->time : old('time') }}" -->
                    <?php echo $data->time; ?>
                
                Select Recipient<br><br>

                <a href='#' id='select-all'>select all</a>
                <a href='#' id='deselect-all'>deselect all</a><br><br>
                <select name="select[]" id='public-methods' multiple='multiple'>
                      <?php     
                        if($data) {
                            $rec = explode(",", $data->recipient);

                            foreach($email as $item){ 
                                $selected = "";
                                foreach($rec as $s) 
                                {
                                    if($s == $item['email'])
                                    {
                                        $selected = "selected";
                                        break;
                                    }
                                }

                                echo '<option ' . $selected . ' value="'.$item['email'].'">'.$item['email'].'</option>';           
                            }          
                        }
                        else{
                            foreach($email as $item){          
                                echo '<option value="'.$item['email'].'">'.$item['email'].'</option>';           
                            } 
                        }                          
                        ?>
                </select>       
                <br>
                                    
                
                <button type="submit" class="btn btn-primary">Submit</button>
                <input type="button" onclick="clearFunction()" style="color:#495057" class="btn btn-warning" value="Clear">

            </form>

ReportController.php

public function saveRepeated(Request $request){

  
    
    $rules=['day'=>'required','time'=>'required'];

    $validasi=\Validator::make($request->all(),$rules);

    if($validasi->fails()){
        return \Redirect::back()
            ->withInput()
            ->withErrors($validasi);
    }else{

        $ScheduleRepeatedModel = new ScheduleRepeatedModel();
        $ScheduleRepeatedModel->day = $request->input('day');
        $ScheduleRepeatedModel->time = date('H:i:s',strtotime($request->get('time'))); 
        $ScheduleRepeatedModel->recipient = implode(",", $request->input('select'));          
        $ScheduleRepeatedModel->save();
        if (\Storage::exists('invoices.xlsx')) {
            \Storage::delete('invoices.xlsx');
        }
        $waktuKirim = \DateTime::createFromFormat('Y-m-d H:i:s', $ScheduleRepeatedModel->day." ".$ScheduleRepeatedModel->time);
        $file = Excel::store(new ReportExport, 'invoices.xlsx');
        $sendMail = \Mail::to($request->input('select'))
        ->later($waktuKirim, new \App\Mail\MailSender(['subject' => 'Report Detail']));
       
        return \Redirect::back()
            ->withPesan('Information created successfully');
    }
}
28 Nov
2 weeks ago

davy_yg left a reply on Watch A Video

I already click the number - for example number 1 - Laravel Nova Mastery, I still do not see the video pop out. I only see a red box called Laravel Nova Mastery and do not show any video even if I click it out.

27 Nov
2 weeks ago

davy_yg left a reply on Cron Job

ok for example:

set cron job in linux:

field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 (or names, see below) day of week 0-7 (0 or 7 is Sun, or use names)

1,7,25,47 */2 * * * command

Is this enough for the cron job to works. In addition to this I just need to add this script to my laravel:

// Run once per week on Monday at 1 PM...
$schedule->call(function () {
    //
})->weekly()->mondays()->at('13:00');

// Run hourly from 8 AM to 5 PM on weekdays...
$schedule->command('foo')
          ->weekdays()
          ->hourly()
          ->timezone('America/Chicago')
          ->between('8:00', '17:00');

I wonder if my script is correct?

davy_yg left a reply on Cron Job

I do not understand the relation between linux typing command with crontab -e which I should type manually and the script php that I should input from php laravel.

Since the two seems opposite. If I type it manually then why I set it up automatically from laravel code. IS that possible?

26 Nov
2 weeks ago

davy_yg left a reply on Cron Job

See CronTab is under linux. If I have my Cronjob which I set the schedule through laravel, I wonder how to set up CronTab with Laravel?

I mean I do not have to type it manually through linux.

davy_yg started a new conversation Cron Job

Hello,

I have a question about setting cron job. My web server is using Linux. I already have the schedule set up with laravel program which I can set it up as I like. When input the schedule, I wonder how you can automatically set up the cron job on the server?

I already have the json report setup with php script, but I do not know how to set up the cron job.

davy_yg started a new conversation Watch A Video

Hello, I cannot understand how to watch the video in this new website template. I try to find a way to watch the video by clicking many things but could not find it.

davy_yg left a reply on Crodjob Php Script

Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 6

Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 6 unable to select database 'db':

line 5: $link = mysqli_connect('localhost', 'root', '', 'ids') or die("unable to connect to msql server: " . msql_error()); line 6: mysqli_select_db("ids", $link) or die("unable to select database 'db': " . mysqli_error());

The ids database does exist and the user also correct.

davy_yg left a reply on Crodjob Php Script

Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 6

Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 6

Fatal error: Uncaught Error: Call to undefined function msql_error() in C:\xampp\htdocs\ids-api\public\cronjob_script.php:6 Stack trace: #0 {main} thrown in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 6

line 6 : $link = mysqli_connect("dbserver") or die("unable to connect to msql server: " . msql_error());

davy_yg started a new conversation Crodjob Php Script

Hello,

I am trying to create crobjob php script. and I get this error message:

Fatal error: Uncaught Error: Call to undefined function msql_connect() in C:\xampp\htdocs\ids-api\public\cronjob_script.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\ids-api\public\cronjob_script.php on line 5

I wonder why?

I thought msql_connect() would works for all php version. http://id1.php.net/manual/en/function.msql-query.php

cronjob_script.php

 $link = msql_connect("dbserver") or die("unable to connect to msql server: " . msql_error());
    msql_select_db("ids", $link) or die("unable to select database 'db': " . msql_error());
    
    $report = msql_query("SELECT * FROM tb_r_solusiorder LEFT JOIN tb_m_biller ON tb_r_solusiorder.billerid = tb_m_biller.biller_id LEFT JOIN tb_m_user_solusi ON tb_m_user_solusi.MobilePhone = tb_r_solusiorder.MobilePhone");        


    $report_string  =   "";        

    $url        =   "http://localhost/ids-api/public/api/list-report";        

    //open connection
    $ch = curl_init();

    //set the url, number of POST vars, POST data
    curl_setopt($ch,CURLOPT_URL, $url);
    curl_setopt($ch,CURLOPT_POST, count($report));
    curl_setopt($ch,CURLOPT_POSTFIELDS, $report_string);

    //execute post
    $result = curl_exec($ch);
    //close connection
    curl_close($ch);

    echo "<pre>";
    print_r($result); 
    echo "</pre>";
21 Nov
3 weeks ago

davy_yg left a reply on Checkbox.js

The thing is I have not created the checkbox yet. Do I have to do that? I only check the console.log().

This is from udemy tutorial that I followed. Yet, I cannot imitate the tutorial.

davy_yg started a new conversation Checkbox.js

Hello I am trying to make this js works.

index.html

<html>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">

<script src = "checkbox.js" type = "text/javascript"/></script>


<h1>Hello</h1>


</html>

checkbox.js

$(function() {

    var checkBoxes =
    $('input[type=checkbox]');
    console.log(checkBoxes.val())

})

On console I get this message:

Character coding HTML documents are not declared. The document will not be rendered properly on the browser with its configuration if it has characters outside the US-ASCII range. File character coding must be declared in the document or in protocol transfer.

I am trying to check this value:

console.log(checkBoxes.val())

19 Nov
3 weeks ago

davy_yg left a reply on Show And Hide Arrow Using JS

@michaelcharles

Your suggestion does not work yet.

Also, I want to start with the navigation sub menu closed.

<script>

$( "#Pages" ).load(function() {
    $('#subPages').hide(); 

    // $('#Pages').removeClass('subPages');        
    // $('#Pages').removeClass('arrowd');
    // $('#Pages').addClass('arrow');    
});  


$( "#Pages" ).click(function(e) {

    if(!$('#Pages').hasClass('subPages')) {
        $('#Pages').addClass('subPages');
        $('#Pages').addClass('arrowd');
        $('#Pages').removeClass('arrow');
    } else {
        $('#Pages').removeClass('subPages');        
        $('#Pages').removeClass('arrowd');
        $('#Pages').addClass('arrow');        
        }

});

I thought this would works. The sub menu remains open.

davy_yg started a new conversation Show And Hide Arrow Using JS

Hello,

I am trying to show arrowd and hide arrow when showing the submenu but I have not been successful yet. And the opposite.

Any clue why?

Please review my code below.

navigation.blade.php

<div id="Pages">    
    <li class="nav-item {{ (Request::segment(1) == 'dashboard') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="#subPages" data-toggle="collapse" class="collapsed">
        
        <i class="fa fa-table"></i>
        <span  class="nav-link-text">Dashboard</span>
        <span id="arrow"><i class="fa fa-angle-right"></i></span>
        <span id="arrowd"><i class="fa fa-angle-down"></i></span>
      </a>
    </li>
    </div>

    <div id="subPages">
    <li class="nav-item-sub {{ (Request::segment(1) == 'dashboard-thxh') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="{{ url('/dashboard-thxh') }}">
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Dashboard TRX Harian</span>
      </a>
    </li>

    <li class="nav-item-sub {{ (Request::segment(1) == 'dashboard-thxhpromo') ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="">
      <a class="nav-link" href="{{ url('/dashboard-thxhpromo') }}">
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Dashboard TRXH PROMO</span>
      </a>
    </li>
    </div>


<script>

$(function() {
$( "#Pages" ).click(function(e) {

    if(!$('#Pages').hasClass('subPages')) {
        $('#Pages').addClass('subPages');
        $('#Pages').addClass('arrowd');
        $('#Pages').removeClass('arrow');
    } else {
        $('#Pages').removeClass('subPages');        
        $('#Pages').removeClass('arrow');
        $('#Pages').addClass('arrowd');        
    }

});

</script>

davy_yg started a new conversation Showing Sub Nav

Hello,

I would like to put time like 1 sec for removeClass and addClass. How to do so?

<script>
$(function() {
$( "#Pages" ).click(function(e) {

    if(!$('#Pages').hasClass('subPages')) {

    $('#Pages').addClass('subPages');
  } else {
    $('#Pages').removeClass('subPages');
  }

});
</script>
16 Nov
3 weeks ago

davy_yg started a new conversation Sorry, The Page You Are Looking For Could Not Be Found.

Sorry, the page you are looking for could not be found.

web.php

 Route::post('/edit-schedule', '[email protected]');

ReportController.php

public function submitEditSchedule(Request $request) {


    $id = $request->id;
    $input = $request->validate(
        [
            'date' => 'required',
            'time' => 'required',               
        ], [
            'date.required' => 'Date is required',
            'time.required' => 'Time is required'             
        ]
    );

    $ScheduleModel = ScheduleModel::findOrFail($id);
    
    $ScheduleModel->date = $request->get('date');
    $ScheduleModel->time = $request->get('time');
    $ScheduleModel->recipient = $request->get('select'); 
    $ScheduleModel->save();
    
    return back()->with('success', 'Information updated successfully.');

}

edit_schedule.blade.php

@if ($message = Session::get('success'))
                <div class="alert alert-success alert-block">
                    <button type="button" class="close" data-dismiss="alert">×</button> 
                        <strong>{{ $message }}</strong>
                </div>
            @endif

            @if ($message = Session::get('pesan'))
                <div class="alert alert-danger alert-block">
                    <button type="button" class="close" data-dismiss="alert">x</button>
                        <strong>{{ $message }}</strong>
                </div>
            @endif
            
            <form id="myForm" action="{{ ($data != "") ? url('/edit-schedule') : url('/save-schedule') }}" method="post" enctype="multipart/form-data">
                @csrf
                <input type="hidden" name="scheduleId" value="{{ ($data) ? $data->id : "" }}" />
                
                <b>Schedule</b>
                
                <input type="hidden" name="scheduleId" value="{{ ($data) ? $data->id : "" }}" />
                <div class="form-group">

                    <label style="font-weight:500">Select Date</label>
                    <input type="text" id="datepicker" name="date" value="{{ ($data) ? $data->date : old('date') }}"></p>
                </div>
                <div class="form-group">
                    <label style="font-weight:500">Select Time</label>
                    <input  name="time" class="timepicker" type="text" placeholder="" value="{{ ($data) ? $data->time : old('time') }}">

                </div><!-- class="timepicker" -->
                <!-- value="{{ ($data) ? $data->time : old('time') }}" -->
                    <?php echo $data->time; ?>
                
                Select Recipient<br><br>

                <a href='#' id='select-all'>select all</a>
                <a href='#' id='deselect-all'>deselect all</a><br><br>
                <select name="select" id='public-methods' multiple='multiple'>
                      <?php     
                        foreach($email as $item){          
                            echo '<option value="'.$item['email'].'">'.$item['email'].'</option>';           
                        }                                    
                        ?>
                </select>       
                <br>
                                    
                
                <button class="btn btn-primary">Submit</button>
                <input type="button" onclick="clearFunction()" style="color:#495057" class="btn btn-warning" value="Clear">

            </form>

I cannot understand why after pressing submit button. I get this error message:

Sorry, the page you are looking for could not be found. 

I thought this message will appears:

"Information updated successfully."

Any clue?

davy_yg started a new conversation Timepicker

Loading date:

   <input  name="time" class="timepicker" type="text" placeholder="" value="{{ ($data) ? $data->time : old('time') }}">

...

<script>
$('.timepicker').timepicker({
    timeFormat: 'h:mm p',
    interval: 30,
minTime: '0',
    maxTime: '11:00pm',
    defaultTime: '11',
    startTime: '0:00',
    dynamic: false,
    dropdown: true,
    scrollbar: true
});
</script>

I wonder why the timepicker does not shows the correct value?

<?php echo $data->time; ?>

01:00:00

The value is 11:00 AM. And the $data->time value is 1:00:00 . I wonder why instead of showing 1:00 PM it shows 11:00 AM which is the first value of time picker?

davy_yg started a new conversation Return View

Hello,

Will this works? double with when return view?

  $schedule = ScheduleModel::where('id', $id)->first();

    $email = AutoEmailModel::get();

    return view('pages.report.edit_schedule')
            ->with('data', $schedule)
            ->with('email', $email);

Thanks in advance.

14 Nov
4 weeks ago

davy_yg left a reply on Callback

Is callback(JSON.parse(xhr.responseText)) stand by itself or is it calling another function?

davy_yg left a reply on Callback

Let say:

AjaxJS(url1, function(data){

})


AjaxJS(url, callback) {
...
callback(JSON.parse(xhr.responseText))
...
console.log(x)  
}

Will console.log(x) be accessed? callback will call AjaxJS first function correct?

davy_yg started a new conversation Callback

Hello,

I wonder if callback in js equals to return in php?

09 Nov
1 month ago

davy_yg left a reply on Table.ajax.url

What about this one:

table.ajax.reload( function ( json ) { ... }, false );

What is false for?

Besides that one:

table_ajax_reload(function () {
        setInterval(function () {
                table_ajax_reload();
        }, 15000);
    });

I want to take the interval off. I wonder why this code does not works:

table_ajax_reload();

Whereas the code above works. That is strange to me. Any clue?

davy_yg started a new conversation Table.ajax.url

Any clue what this means:

 table.ajax.url(url + "&date="+$(this).val()).load();

Is it ajax syntax or what?

08 Nov
1 month ago

davy_yg started a new conversation What Is .then For?

Hello,

I cannot understand what is .then is for?

Why even use .then? why not just goes with function(data){ }) without .then?

myForm.addEventListener('submit', function(e){

    e.preventDefault();
    var url = 'https://randomuser.me/api/?results=10';
    axios.get(url)
    .then(function(data){
    
        console.log('enter then');
    })

})
07 Nov
1 month ago

davy_yg started a new conversation Get Month From Date

How to get month from date?

var valtgl = $("#val-tgl").val();
            
    //var month = valtgl.getMonth()      

this is the value of valtgl:

2020-11-14

I want to get month how?

05 Nov
1 month ago

davy_yg started a new conversation Code Interpret

Hello,

Can you help interpret the following code. Doe that mean if the code does not load Loading message will keeps appearing?

$("#val-tgl").change(function() {
        $(".panel-val").html("...");
        $("#val-date").html("Loading...");
        $("#live-chart").hide();
        table.ajax.url(url + "&date="+$(this).val()).load();
    });

Thanks in advance?

31 Oct
1 month ago

davy_yg started a new conversation Downgrade Mysqldump

How to downgrade mysqldump tools:

I am using mysql bench and when trying to export online databases from mysql bench to sql file I am getting this error:

mysqldump.exe is version 8.0.13 but the MySQL Server to be dumped has version 5.7.21. Because the version of mysqldump is not the same as the server, some features may not be backed up properly. It is recommeded you upgrade or downgrade your local MySQL client programs, including mysqldump, to a version equal to or newer than that of the target server. The path to the dump tool must then be set in Preferences -> Administrator -> Path to mysqldump Tools.

30 Oct
1 month ago

davy_yg started a new conversation Jquery Prop

Hello,

I cannot understand what prop for even after looking at the documentation.

.prop()

https://api.jquery.com/prop/#prop-propertyName

Any clue what is it for?

29 Oct
1 month ago

davy_yg started a new conversation Bind

What is the difference between:

isFullAge.bind(this, 20);

and

isFullAge(this, 20);

function isFullAge(limit, el){
    return el >= limit;
}
26 Oct
1 month ago

davy_yg started a new conversation Testing Connection

Hello,

I would like to test the connection of mysql :

<?php 

$koneksi=mysqli_connect('103.52.144.133:3307','username','*****,'interlog_isems');

echo mysql_error($koneksi);

 ?>

I would like to see if the connection works:

Fatal error: Uncaught Error: Call to undefined function mysql_error() in C:\xampp\htdocs\isems2\pages\koneksi.php:4 Stack trace: #0 {main} thrown in C:\xampp\htdocs\isems2\pages\koneksi.php on line 4

Why the error appears?

davy_yg started a new conversation MySQL Workbench

Hello,

I would like to know why the following error appears:

13:16:10 Dumping interlog_isems (all tables)
Running: mysqldump.exe --defaults-file="c:\users\admin\appdata\local\temp\tmpo5nj8c.cnf"  --user=interlog_isems --host=103.52.144.133 --protocol=tcp --port=3307 --default-character-set=utf8 --skip-triggers "interlog_isems"
mysqldump: Error: 'The foreign data source you are trying to reference does not exist.  Data source error:  error: 1146  'Table 'tmi_inv.fedTransfer3' doesn't exist'' when trying to dump tablespaces
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,                            JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')                FROM          information_schema.COLUMN_STATISTICS                WHERE SCHEMA_NAME =         interlog_isems'     AND TABLE_NAME = 'VW_Device';': Unknown table 'COLUMN_STATISTICS' in information_schema (1109)

Operation failed with exitcode 2

13:16:12 Export of C:\Users\Admin\Documents\dumps\interlog_isems.sql has finished with 1 errors

When I check C:\Users\Admin\Documents\dumps\interlog_isems.sql the file does not exist.

I wonder why?