50% Off/-

50% Off/-

Php

50% Off/-

50% Off/-

Web

50% Off/-

50% Off/-

Latest Added Tutorials

Normally Glassfish looks at the cacerts.jks certificate file stored in the GLASSFISH_SERVER\glassfish\domains\domain1\config location.You can change this configuration or replace cacerts.jks file with your cacerts file. There are some default JVM Options which Glassfish is used:      -XX:+UnlockDiagnosticVMOptions      -XX:NewRatio=2      -XX:MaxPermSize=192m      -Xmx512m      -client      -javaagent:C:/glassfish5/glassfish/li...Continue Reading
First Step: localhost:8081 when you encounter a user login screen, run this code:  - select account_status from dba_users where username = 'ANONYMOUS'; if you encounter this error: SP2-0640: Not connected, firstly run this code: sqlplus /nolog - alter user ANONYMOUS identified by anonymous; - alter user ANONYMOUS account unlock;
We can use above dockerfile to build gradle project. After build process, generated war file will be moved to /usr/local/tomcat/webapps/ directory. If you need to add a custom certificate, you should copy the new certifacete to /etc/ssl/certs directory. Otherwise, Java Keytool is not importing the custom certificate from another location. (It took me 5 hours to reach this information.) The last commands, for loop in this case, automatically imports existing certificates into cacerts. FROM gradle:7.3.3-jdk8 AS build ENV TIS_DATA=/home/tis-data #W...Continue Reading
We can use following codes to run gradle build in docker image then copy generated war file to Tomcat directory FROM gradle:7.3.3-jdk8 AS build COPY --chown=gradle:gradle . /home/gradle/src WORKDIR /home/gradle/src RUN gradle build --no-daemon FROM tomcat:8.5.73 WORKDIR /app RUN rm -fr /usr/local/tomcat/webapps/ROOT COPY --from=build home/gradle/src/build/libs/ktbyigm.war /usr/local/tomcat/webapps/ROOT.war CMD ["catalina.sh", "run"] EXPOSE 9090...Continue Reading
What is Injectable decorator? Marks a class as available to Injector for creation. import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root', }) export class UserService { } The service itself is a class that the CLI generated and that's decorated with @Injectable().      What exactly does providedIn do? Determines which injectors will provide the injectable, by either associating it with an @NgModule or other InjectorType, or by specifying that this injectable should be provided in the 'root' injector...Continue Reading
Nodejs Stream Api const config = require('./config.js'); const AWS = require('aws-sdk'); // Set the region AWS.config.update(config.aws_remote_config); // Create the DynamoDB service object const db = new AWS.DynamoDBStreams({apiVersion: 'latest'}); exports.handler = async (event) => { let lastEvaluatedShardId = null; let params = { "ExclusiveStartShardId": null, "Limit": 100, "StreamArn": config.aws_stream_arn }; const describeStreamResult = await db.describeStream(params).promise(); do { let shards = describeStreamResult....Continue Reading
Amazon Dynamodb Lambda Function for Rest Api Firstly install aws sdk package: npm i aws-sdk Note: AWS Lambda now supports layers, we can easily create our library. For more information: https://medium.com/@anjanava.biswas/nodejs-runtime-environment-with-aws-lambda-layers-f3914613e20e const config = require('./config.js'); const AWS = require('aws-sdk'); // Set the region AWS.config.update(config.aws_remote_config); // Create the DynamoDB service object const db = new AWS.DynamoDB({apiVersion: 'latest'}); exports.handler = async (event) => { let ty...Continue Reading
Flutter TextFormField Phone Number Formatter Converts phone number 00000000 to (000) 000 0000 class PhoneNumberFormatter extends TextInputFormatter { PhoneNumberFormatter(); @override TextEditingValue formatEditUpdate( TextEditingValue oldValue, TextEditingValue newValue, ) { if (!oldValue.text.contains("(") && oldValue.text.length >= 10 && newValue.text.length != oldValue.text.length) { return TextEditingValue( text: "", selection: TextSelection.collapsed(offset: 0), ); }...Continue Reading
Laravel Eloquent Column Editing with Yajra Datatables class PrivatePackageController extends AppBaseController { public function index(){ try { $model=PrivatePackage::query(); $result=DataTables::eloquent($model) ->setTotalRecords(100) ->editColumn('price', function(PrivatePackage $privatePackage) { return MoneyUtil::twoDecimalNumber($privatePackage->price/100); }) ->toArray()['data']; return $this->sendResponse($result,''...Continue Reading
Change button text and background color then submit form: <input class="btn btn-primary" onclick="this.style.backgroundColor='red'; this.style.borderColor='red'; this.value='E-Posta Gönderiliyor... Bu işlem 1-2 dakika sürebilir.. Lütfen Bekleyiniz'; document.getElementById('mainForm').submit()" type="submit" value="Gönder" />...Continue Reading
Base Model for Laravel Mssql Datetime Configuration use Illuminate\Database\Eloquent\Model; abstract class BaseModel extends Model { protected $dateFormat = 'Y-m-d H:i:s.u'; public function getDateFormat() { return 'Y-m-d H:i:s.u'; } public function fromDateTime($value) { return substr(parent::fromDateTime($value), 0, -3); } }...Continue Reading
class ApiHelper { static const String BASE_PATH = "http://api.example.com"; static const String API_PATH = "/api"; Future<ApiResponseModel> request(String url, {Map<String, String> queryParameters, bearerToken = '', isSSL = false}) async { return _innerRequest(url, 'GET',bearerToken,isSSL); } Future<ApiResponseModel> _innerRequest(String url, String type, [postParams,bearerToken = '']) async { url = _getUrl(url); Dio dio = _getDio(bearerToken); try { var response; if(type=='GET')...Continue Reading
PostsDataSource class PostsDataSource(private val scope: CoroutineScope) : PageKeyedDataSource<Int, Question>() { private val repository = QuestionRepository() override fun loadInitial( params: LoadInitialParams<Int>, callback: LoadInitialCallback<Int, Question> ) { scope.launch { try { val response = repository.getQuestionsAsync(1) when { response.success -> { val listing = response.data val...Continue Reading
Fragment import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.LinearLayoutManager import com.codesenior.period.tracker.R import com.codesenior.period.tracker.adapters.QuestionAdapter import com.codesenior.period.tracker.factories.QuestionViewModelFactory import com.codesenior.period.tracker.repositories.QuestionRepository import kotlinx.andr...Continue Reading
Axios interceptor for refresh token when you have multiple parallel requests. initAxios() { var thiz = this; Axios.defaults.baseURL = Constants.BASE_API_URL; Axios.defaults.headers.common["Authorization"] = "Bearer 123"; Axios.defaults.headers.common["Accept"] = "application/json; charset=UTF-8"; Axios.defaults.headers.common["Language"] = "TR"; //Axios.defaults.headers.common["Host"] = "localhost:44335";//todo remove in production Axios.interceptors.request.use((request: any) => { console.log("Starting Request", reque...Continue Reading

© 2019 All rights reserved. Codesenior.COM