50% Off/-

50% Off/-

Php

50% Off/-

50% Off/-

Web

50% Off/-

50% Off/-

Latest Added Tutorials

HTML form <div class="flex flex-col flex-auto min-w-0"> <div class="flex-auto p-6 sm:p-10 "> <p-table #dt2 [value]="users" [loading]="loading" dataKey="id" [paginator]="true" [rows]="10" [rowsPerPageOptions]="[10,25,50]" styleClass="p-datatable-gridlines" [globalFilterFields]="filterColumns"> <ng-template pTemplate="caption"> <div class="flex"> <span class="p-input-icon-left ml-auto"> <i class="pi pi-search"></i>...Continue Reading
HTML file <div class="flex flex-col flex-auto min-w-0"> <!-- Main --> <div class="flex-auto p-6 sm:p-10 "> <p-table [value]="users" [lazy]="true" (onLazyLoad)="loadCarsLazy($event)" dataKey="id" [paginator]="true" [rows]="10" [totalRecords]="totalRecords" [loading]="loading"> <ng-template pTemplate="header"> <tr> <th *ngFor="let col of cols"> {{col.header}} </th> </tr> <...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
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
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
Ajax file upload usage with https://github.com/blueimp/jQuery-File-Upload plugin as follows: <div class="row"> <div class="col-sm-6"> <input class="file-upload" type="file" name="files" data-url="/file-upload.php" /> </div> <div class="col-sm-6"> <div class="progress"> <div id="progress-bar" class="progress-bar progress-bar-success"></div> </div> </div> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> &...Continue Reading
import * as queryString from 'querystring'; async send(order) { const response = await axios.post('/isbank/send', queryString.stringify( { orderNo: order.orderNo, amount: order.amount, currencyCode: '949', language: 'tr', 'creditCard.cardType': '1', 'creditCard.cv2': order.cvc, 'creditCard.expiredMonth': order.expiredMonth, 'creditCard.expiredYear': order.expiredYear, 'creditCard.pan': order.number, 'user.Email': order.email, 'user.Id': order.userId }...Continue Reading
We can use following codes in a view A, then NEXT VIEW back button will not be shown $ionicHistory.nextViewOptions({ disableBack: true });...Continue Reading
In a cordova project, we can test network connection as follows: 1. Run following commands: $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git $ cordova plugin rm org.apache.cordova.core.network-information 2. Add following codes in app.js file as follows: $ionicPlatform.ready(function () { if (window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); cordova.plugins.Keyboard.disableScroll(true); } if (window.Statu...Continue Reading
We can use following Javascript & Angular JS code to send push notification in OneSignal by using FILTER property: var content={}; content.en="Test message"; var filters=[]; filter={}; filter.field="tag"; filter.key="authorId"; filter.relation="="; filter.value=54; filters.push(filter); parameter = JSON.stringify({ app_id: "31ee45e2-c63d-4048-903a-89ca43f3afa4", contents:content, filters: filters }); $http.post("https://onesignal.com/api/v1/notifications", parameter, { h...Continue Reading
By using following codes, we can get rid of marquee element. For more information please click <style type="text/css"> .wordwrap { white-space: -moz-pre-wrap; /* Firefox */ white-space: -pre-wrap; /* Opera <7 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* IE */ } .marquee,.marquee-left { overflow: hidden; } </style> <script type="text/javascript" src="/Scripts/marquee.js"></script> <script type="text/javascript" src="/Scripts/...Continue Reading
What is CKEditor? CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It's a WYSIWYG editor that brings common word processor features directly to your web pages. Enhance your website experience with our community maintained editor. JSP Example To use CKEditor in a Java web application, we need to add following dependency: com.ckeditor ckeditor-java-core 3.5.3 Afte...Devamını Oku

© 2019 All rights reserved. Codesenior.COM