Tutorial by Examples: df

This is a copy of the advanced function snippet from the Powershell ISE. Basically this is a template for many of the things you can use with advanced functions in Powershell. Key points to note: get-help integration - the beginning of the function contains a comment block that is set up to be ...
In order to add Firebase Crash Reporting to your app, perform the following steps: Create an app on the Firebase Console here. Copy the google-services.json file from your project into your in app/ directory. Add the following rules to your root-level build.gradle file in order to inc...
// long form String sayHello(String name){ "Hello, ${name ? name : 'stranger'}." } // elvis String sayHello(String name){ "Hello, ${name ?: 'stranger'}." } Notice that the "elvis" format omits the "true" term because the original comparison...
Add below dependencies to your build.gradle // Facebook login compile 'com.facebook.android:facebook-android-sdk:4.21.1' Add below helper class to your utility package: /** * Created by Andy * An utility for Facebook */ public class FacebookSignInHelper { private static final...
Query can be used instead of table in import operation: sqoop import --query 'select Id,Message from TestTable where $CONDITIONS' --where 'id>100' --connect "jdbc:sqlserver://192.168.1.100:1433;database=Test_db --username user -–pas...
This solution uses the ora:tokenize XQuery function that is available from Oracle 11. Sample Data: CREATE TABLE table_name ( id, list ) AS SELECT 1, 'a,b,c,d' FROM DUAL UNION ALL -- Multiple items in the list SELECT 2, 'e' FROM DUAL UNION ALL -- Single item in the list SELECT 3, NULL ...
If we want to get the x-cordinate of origin of the view, then we need to write like: view.frame.origin.x For width, we need to write: view.frame.size.width But if we add a simple extension to an UIView, we can get all the attributes very simply, like: view.x view.y view.width view.height...
If you have loaded a file into GHCi (e.g. using :l filename.hs) and you have changed the file in an editor outside of GHCi you must reload the file with :r or :reload in order to make use of the changes, hence you don't need to type again the filename. ghci> :r OK, modules loaded: Main. ghci...
let configuration = WKWebViewConfiguration() if let path = NSBundle.mainBundle().pathForResource("customUserScript", ofType: "js"), source = try? NSString(contentsOfFile: path, encoding: NSUTF8StringEncoding) as String { let userScript = WKUserScript(source...
This error occurs when tables are not adequately structured to handle the speedy lookup verification of Foreign Key (FK) requirements that the developer is mandating. CREATE TABLE `gtType` ( `type` char(2) NOT NULL, `description` varchar(1000) NOT NULL, PRIMARY KEY (`type`) ) ENGINE=InnoD...
My.Computer.Network.DownloadFile("ftp://server.my/myfile.txt", "donwloaded_file.txt") This command download myfile.txt file from server named server.my and saves it as donwloaded_file.txt into working directory. You can specify absolute path for downloaded file.
My.Computer.Network.DownloadFile("ftp://srv.my/myfile.txt", "donwload.txt", "Peter", "1234") This command download myfile.txt file from server named srv.my and saves it as donwload.txt into working directory. You can specify absolute path for downloaded fil...
My.Computer.Network.UploadFile("example.txt", "ftp://server.my/server_example.txt") This command upload example.txt file from working directory (you could specify absolute path if you want) to server named server.my. File stored on the server will be named server_example.txt. ...
My.Computer.Network.UploadFile("doc.txt", "ftp://server.my/on_server.txt", "Peter", "1234") This command upload doc.txt file from working directory (you could specify absolute path if you want) to server named server.my. File stored on the server will be na...
In Emacs M-x slime will start slime with the default (first) Common Lisp implementation. If there are multiple implementations provided (via variable slime-lisp-implementations), other implementations can be accessed via M-- M-x slime, which will offer the choice of available implementations in mini...
Reflection is useful when it is properly used for right purpose. By using reflection, you can access private variables and re-initialize final variables. Below is the code snippet, which is not recommended. import java.lang.reflect.*; public class ReflectionDemo{ public static void main(St...
To check if a required gem is installed, from within your code, you can use the following (using nokogiri as an example): begin found_gem = Gem::Specification.find_by_name('nokogiri') require 'nokogiri' .... <the rest of your code> rescue Gem::LoadError end However, this can ...
Instead of web pages, we can also load the document files into iOS WebView like .pdf, .txt, .doc etc.. loadData method is used to load NSData into webview. Swift //Assuming there is a text file in the project named "home.txt". let localFilePath = NSBundle.mainBundle().pathForResource(&...
You can install NLTK over pip (pip install nltk).After it is installed, many components will not be present, and you will not be able to use some of NLTK's features. From your Python shell, run the function ntlk.download() to select which additional packages you want to install using UI. Alternati...
We can change the style of the placeholder by setting attributedPlaceholder (a NSAttributedString). var placeholderAttributes = [String: AnyObject]() placeholderAttributes[NSForegroundColorAttributeName] = color placeholderAttributes[NSFontAttributeName] = font if let placeholder = textField.p...

Page 8 of 21