Tutorial by Examples: ada

The Iris flower data set is a widely used data set for demonstration purposes. We will load it, inspect it and slightly modify it for later use. import java.io.File; import java.net.URL; import weka.core.Instances; import weka.core.converters.ArffSaver; import weka.core.converters.CSVLoader; i...
Moshi has built-in support for reading and writing Java’s core data types: Primitives (int, float, char...) and their boxed counterparts (Integer, Float, Character...). Arrays Collections Lists Sets Maps Strings Enums It supports your model classes by writing them out field-by-field. In ...
The basic use of fit is best explained by a simple example: f(x) = a + b*x + c*x**2 fit [-234:320][0:200] f(x) ’measured.dat’ using 1:2 skip 4 via a,b,c plot ’measured.dat’ u 1:2, f(x) Ranges may be specified to filter the data used in fitting. Out-of-range data points are ignored. (T. W...
Swift 3 import UIKit // Save String to file let fileName = "TextFile" let documentDirectory = try FileManager.default.urlForDirectory(.documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) var fileURL = try documentDirectory.appendingPathComponent(fileName).ap...
Navigate to phpMyAdmin by URL http://your_ip/phpmyadmin or http://localhost/phpmyadmin Login using username root and root password. Click on Databases tab. Enter database name, select collation (you may leave it to default) and click create. Click on Privileges tab and select "Add user a...
Can be used in conjunction with the custom form example to create a table in the drupal database for a Mailing List feature. This example was made by creating the table directly in my development database, then created the data for hook_schema() using the Schema module. This allows for automatic t...
Hello friends before start code we have need to declare dependency for access firebase ui component, so here is the dependency which you can put it in your gradel other wise you can add dependency as jar also. compile 'com.firebaseui:firebase-ui-database:0.4.0' Then after we are querying in fire...
public static DataTable ExcelPackageToDataTable(ExcelPackage excelPackage) { DataTable dt = new DataTable(); ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets[1]; //check if the worksheet is completely empty if (worksheet.Dimension == null) { return dt;...
import gzip import os outfilename = 'example.txt.gz' output = gzip.open(outfilename, 'wb') try: output.write('Contents of the example file go here.\n') finally: output.close() print outfilename, 'contains', os.stat(outfilename).st_size, 'bytes of compressed data' os.system('file...
TypeScript enables editors to provide contextual documentation: You'll never forget whether String.prototype.slice takes (start, stop) or (start, length) again!
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Aeson main :: IO () main = do let example = Data.Aeson.object [ "key" .= (5 :: Integer), "somethingElse" .= (2 :: Integer) ] :: Value print . encode $ example
Opening a database is database specific, here there are examples for some databases. Sqlite 3 file := "path/to/file" db_, err := sql.Open("sqlite3", file) if err != nil { panic(err) } MySql dsn := "mysql_username:CHANGEME@tcp(localhost:3306)/dbname" db, e...
Let's say we want to move a given date a numof months. We can define the following function, that uses the mondate package: moveNumOfMonths <- function(date, num) { as.Date(mondate(date) + num) } It moves consistently the month part of the date and adjusting the day, in case the date re...
You can load AngularJS services in vanilla JavaScript using AngularJS injector() method. Every jqLite element retrieved calling angular.element() has a method injector() that can be used to retrieve the injector. var service; var serviceName = 'myService'; var ngAppElement = angular.element(do...
It is a common practice to name files using the date as prefix in the following format: YYYYMMDD, for example: 20170101_results.csv. A date in such string format can be verified using the following regular expression: \\d{4}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]) The above expression considers d...
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="${db.host}" port="${db.port}"...
First, I will place my date into a Macro Variable. NOTE: I find that date9. works great with IBM® Netezza® SQL and Transact-SQL. Use whichever format that works for the type of SQL you're executing. data _null_; call symput('testDate',COMPRESS(put(today(),date9.))); ;RUN; %PUT ...
DATA _null_; CALL SYMPUT('testVariable','testValueText'); ;RUN; In the example above, %PUT &testVariable; will resolve to testvalueText. You may find the need to format your variable within the SYMPUT() call. DATA _null_; CALL SYMPUT('testDate',COMPRESS(PUT(today(...
1. To write a simple data to test whether connection is working or not. function myFunction(){ var firebaseUrl = "https://example-app.firebaseio.com/"; var secret = "secret-key"; var base = FirebaseApp.getDatabaseByUrl(firebaseUrl, secret); base.setData("test&quo...
Adapters are used to convert the interface of a given class, known as an Adaptee, into another interface, called the Target. Operations on the Target are called by a Client, and those operations are adapted by the Adapter and passed on to the Adaptee. In Swift, Adapters can often be formed through ...

Page 10 of 12