50% Off/-

50% Off/-

Php

50% Off/-

50% Off/-

Web

50% Off/-

50% Off/-

Latest Added Tutorials

Events abstract class CounterEvent {} class IncrementEvent extends CounterEvent{} class DecrementEvent extends CounterEvent{} Bloc Class import 'dart:async'; import 'package:fluttertemplate/blocs/bloc.dart'; import 'counter_event.dart'; /// More Detail: /// https://www.didierboelens.com/2018/08/reactive-programming-streams-bloc/ /// https://pub.dev/documentation/rxdart/latest/ /// https://blog.soshace.com/understanding-flutter-bloc-pattern/ class CounterBloc extends Bloc { int _counter = 0; final _counterStateController = StreamController<i...Continue Reading
Events abstract class CounterEvent {} class IncrementEvent extends CounterEvent{} class DecrementEvent extends CounterEvent{} Bloc class import 'dart:async'; import 'package:fluttertemplate/blocs/bloc.dart'; import 'package:rxdart/rxdart.dart'; import 'counter_event.dart'; /// More Detail: /// https://www.didierboelens.com/2018/08/reactive-programming-streams-bloc/ /// https://pub.dev/documentation/rxdart/latest/ /// https://blog.soshace.com/understanding-flutter-bloc-pattern/ class CounterBlocRxDart extends Bloc { int _counter = 0; final _rep...Continue Reading
config/auth.php file 'guards' => [ 'crm_account' => [ 'provider' => 'crm_accounts', 'driver' => 'passport', 'hash' => true, ], ], 'providers' => [ 'crm_accounts' => [ 'driver' => 'eloquent', 'model' => App\Models\CrmAccount::class, 'table' => 'crm_accounts', ], ], CrmAccount Model: namespace App\Models; use Illuminate\Foundation\Auth\User as Authenticatable; use Laravel\Passport\HasApiTokens; class CrmAccount extends Authenticatable { use HasApiTokens; public $fillable = [ 'id', 'name', ]...Continue Reading
Number Increment Decrement Widget import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:kadir_alkan_kuafor/models/general_model.dart'; import 'package:kadir_alkan_kuafor/models/number_increment_decrement_model.dart'; class NumberIncrementDecrement extends StatefulWidget { final NumberIncrementDecrementModel numberIncrementDecrementModel; NumberIncrementDecrement({Key key, this.numberIncrementDecrementModel}) : super(key: key); @override StateContinue Reading
We can use following codes for multiple select in Laravel: Blade Template: <div class="form-group col-sm-6"> {!! Form::label('project_contents', 'Project Contents:') !!} <i>(You can choose multiple items)</i> @if(!isset($project)) {{Form::select('project_contents',$project_contents,null, array('data-placeholder'=>'Seçiniz','class' => 'form-control select','multiple'=>'multiple', 'name'=>'project_contents[]','required'=>''))}} @endif @if(isset($project)) <select multiple="multiple" name="project_conten...Continue Reading
I was getting ERR_CONNECTION_RESET because my Visual Studio 2013/IIS Express configured app port number was NOT in the range :44300-:44398. (I don't recall having to dismiss any warnings to get out of that range.) Changing the port number to something in this range is all I had to do to make it work. I noticed this after reviewing the netsh http show sslcert > sslcert.txt output and something clicking with stuff I read recently about the port numbers....Continue Reading
We can use FTPClient class in apache commons library to send UTF-8 encoded file names, such as Turkish, chinese, german etc. ftpClient = new FTPClient(); String server ="ftp.server.com"; int port = 21; String user ="test"; String pass ="test"; ftpClient.setControlEncoding("UTF-8");//must be before connect() method ftpClient.connect(server, port); ftpClient.login(user, pass); ftpClient.enterLocalPassiveMode(); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.sendCommand("OPTS UTF8 ON");//we should send this command...Continue Reading
Laravel redirect all HTTP request to HTTPS request via .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /public/$1 [QSA,L] </IfModule>...Continue Reading
IIS Manager with axios can be easily configured as follows: Axios.defaults.headers.common["Host"] = "localhost:44335"; On Android project, we should use IP as 10.0.2.2:44335...Continue Reading
In laravel, we can enforce all routes to https by using following steps: Open AppServiceProvider class and edit as follows: namespace App\Providers; use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { if(config('app.env') === 'prod'||config('app.env') === 'production') { URL::forceScheme('https'); } } /** * Register...Continue Reading
We can use following class to set alarm for multiple day of weeks: import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import java.util.Calendar; public class AlarmStartRadioHelper { private Context mContext; private Class<? extends BroadcastReceiver> mBroadcastReceiverClass; private static int RQS_1 = 1002; private String mActionName; public AlarmStartRadioHelper(Context context, Class<? extends Broa...Continue Reading
$pdf = PDF::loadView('projects.pdf', ['project' => $project]); $options = new Options(); $options->set('isPhpEnabled', 'true'); $dompdf = new Dompdf($options); $dompdf->setOptions($options); $dompdf->loadHtml('<html>....'); $dompdf->setPaper('A4', ''); $dompdf->render(); // Instantiate canvas instance $canvas = $dompdf->getCanvas(); $w = $canvas->get_width(); $h = $canvas->get_height(); $pageNumberWidth = $w / 2; $pageNumberHeight = $h - 50; $GLOBALS["logo1"]=public_path('images/logo/icon.png'); $GLOBALS["logo2"]=public_path('images/logo/kultur_lo...Continue Reading
Showing admob interstitial ads when splash screen is loaded with a timer can be implemented as follows: package com.codesenior.admob; import android.content.Intent; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import com.google.android.gms.ads.AdListener; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.InterstitialAd; import java.util.Timer; import java.util.TimerTask; public class SplashActivity extends AppCompatActivity { private InterstitialAd mInterstitialAd; private Timer...Continue Reading
We can access Vue component from Jquery as follows: app.__vue__.$refs.summary.loadProjectSummary($('#code').val()); Vue Component is included as follows: <project-summary-component ref="summary" project-summary-url="{{route('api.project.summary')}}"> </project-summary-component> As you notice, we have used ref attribute to access the component loadProjectSummary() method. LoadProjectSummary method: loadProjectSummary(code) { const data = { name: 'Client Token', scop...Continue Reading
Programmatically adding bootstrap-datatimepicker can be easily made as follows: $("body").on('focus', '.vue-date', function() { $(this).datetimepicker({ format: 'DD/MM/YYYY', useCurrent: false, locale: 'tr', }) });...Continue Reading

© 2019 All rights reserved. Codesenior.COM