Tutorial by Examples: cs

A basic implementation for singly-linked-list in java - that can add integer values to the end of the list, remove the first value encountered value from list, return an array of values at a given instant and determine whether a given value is present in the list. Node.java package com.example.so....
The following query will return informationa about qeries, their plans and average statistics regarding their duration, CPU time, physical and logical io reads. SELECT Txt.query_text_id, Txt.query_sql_text, Pl.plan_id, avg_duration, avg_cpu_time, avg_physical_io_reads, avg_logica...
files = list.files(pattern="*.csv") data_list = lapply(files, read.table, header = TRUE) This read every file and adds it to a list. Afterwards, if all data.frame have the same structure they can be combined into one big data.frame: df <- do.call(rbind, data_list)
This document explains how to get Google Access tokens and use them to get Google Analytics data to be displayed in our websites. Example: A live example is available in https://newtonjoshua.com note: Use the same gmail account for all the below steps. STEP 1: Set Up Google Analytics Foll...
*> Strip off trailing zero bytes STRING c-string DELIMITED BY LOW-VALUE INTO working-store
function downloadCsv() { var blob = new Blob([csvString]); if (window.navigator.msSaveOrOpenBlob){ window.navigator.msSaveBlob(blob, "filename.csv"); } else { var a = window.document.createElement("a"); a.href = window.URL.createObjectURL(blob, { ...
Let say you want to create css/js file specific to a platform. For that you have to create a merges folder in root folder of you cordova porject. In merges folder create directory for each platform (android/ios..). then in specific platform folder create a css/js folder and put your css/js file spec...
QGraphics can be used to organize complicated scenes of visual objects into a framework that makes them easier to handle. There are three major types of objects used in this framework QGraphicsView, QGraphicsScene, and QGraphicsItems. QGraphicsItems are the basic visual items that exist in the scen...
'Base string Dim exStr : exStr = " <Head>data</Head> " 'Left Dim res: res = Left(exStr,6) 'res now equals " <Head" 'Right Dim res: res = Right(exStr,6) 'res now equals "Head> " 'Mid Dim res: res = Mid(exStr,8,4) 'res now equals "data&quot...
scan is used for calling function multiple times over a list of values, the function may contain state. scan syntax (as of theano 0.9): scan( fn, sequences=None, outputs_info=None, non_sequences=None, n_steps=None, truncate_gradient=-1, go_backwards=False, m...
Service broker is technology based on asyncronous communication between two(or more) entities. Service broker consists of: message types, contracts, queues, services, routes, and at least instance endpoints More: https://msdn.microsoft.com/en-us/library/bb522893.aspx
USE [MyDatabase] CREATE MESSAGE TYPE [//initiator] VALIDATION = WELL_FORMED_XML; GO CREATE CONTRACT [//call/contract] ( [//initiator] SENT BY INITIATOR ) GO CREATE QUEUE InitiatorQueue; GO CREATE QUEUE TargetQueue; GO CREATE SERVICE InitiatorService ON QUEUE...
Almost any controller needs some external dependencies to work. Here is a way to configure a dependency object (or its factory) and pass it to a controller. Doing so will help to sustain a separation of concerns, keep code clear and testable. Say, we have an interface and its implementation that...
Before starting gulp we need to install node.js and npm. Then install gulp-sacc $ npm i gulp-sass --save-dev // i = install Gulp Head var gulp = require('gulp'); // Requires the gulp-sass plugin var sass = require('gulp-sass'); Gulp Body gulp.task('sass', function(){ return gulp.src('...
Installing Gulp and His Tasks $ npm install gulp --save-dev $ npm install gulp-sass --save-dev $ npm install gulp-uglify --save-dev $ npm install gulp-imagemin --save-dev Determining Folder Structure In this structure, we will use the app folder for development purposes, while the dist folde...
import pandas as pd df = pd.DataFrame([{'var1': 'a,b,c', 'var2': 1, 'var3': 'XX'}, {'var1': 'd,e,f,x,y', 'var2': 2, 'var3': 'ZZ'}]) print(df) reshaped = \ (df.set_index(df.columns.drop('var1',1).tolist()) .var1.str.split(',', expand=True) .stack() .reset_ind...
Usually you'll end up creating models which will contain a state, and that state will be changing during the lifespan of the object. AASM is a finite state machine enabler library that can help you out with dealing with having an easy passing through the process design of your objects. Having some...
To add a background-image rule via the CSSOM, first get a reference to the rules of the first stylesheet: var stylesheet = document.styleSheets[0].cssRules; Then, get a reference to the end of the stylesheet: var end = stylesheet.length - 1; Finally, insert a background-image rule for the bo...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var app = express(); app.use(favicon(__dirname + '/public/img/favicon.ico')); app.use(express.static(path.join(__dirname, 'public'))); app.listen(3000, function() { console.log("...
Here a Turtle Graphics Ninja Twist: import turtle ninja = turtle.Turtle() ninja.speed(10) for i in range(180): ninja.forward(100) ninja.right(30) ninja.forward(20) ninja.left(60) ninja.forward(50) ninja.right(30) ninja.penup() ninja.setposit...

Page 18 of 24