50% Off/-

50% Off/-

Php

50% Off/-

50% Off/-

Web

50% Off/-

50% Off/-

Latest Added Tutorials

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
You can use following configuration for on-demand PHP storm debugging:...Continue Reading
macOS Mojave Setup: Homebrew + Apache + PHP + MariaDB
Android simple GET Request: import android.os.AsyncTask; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class HttpGetRequestTask extends AsyncTask<String, Integer, String> { private RequestResponseHandler requestResponseHandler; public HttpGetRequestTask(RequestResponseHandler requestResponseHandler) { this.requestResponseHandler=requestResponseHandler; } protected String doInBackground(String... urls) {...Continue Reading
using System; using System.Collections.Generic; using System.Linq; using System.Web; using Google.Apis.Auth.OAuth2; using Google.Apis.Sheets.v4; using Google.Apis.Sheets.v4.Data; using Google.Apis.Services; using Google.Apis.Util.Store; using System.IO; using System.Threading; namespace DgEeUI.Utils { public class GoogleSheetUtil { private string _webRootPath; private string _spreadSheetId; public GoogleSheetUtil(string webRootPath, string spreadSheetId) { _webRootPath = webRootPath; _...Continue Reading

© 2019 All rights reserved. Codesenior.COM