Tutorial by Examples: bc

Driver: 12c R1 11g R2 (Note: the driver is not included in Maven Central!) Driver class initialization: Class.forName("oracle.jdbc.driver.OracleDriver"); Connection URL Older format, with SID "jdbc:oracle:thin:@<hostname>:<port>:<SID>" Newer...
For accessing the MS SQL Server database Sqoop requires an additional JDBC driver which can be downloaded from Microsoft. The following steps will install MSSQL Server JDBC driver to Sqoop: wget 'http://download.microsoft.com/download/0/2/A/02AAE597-3865-456C-AE7F-613F99F850A8/sqljdbc_4.0.2206.100_...
ShortcutDescriptionCtrl + cStop the current jobCtrl + zSuspend the current job (send a SIGTSTP signal)
Start a Script Block as background job: $job = Start-Job -ScriptBlock {Get-Process} Start a script as background job: $job = Start-Job -FilePath "C:\YourFolder\Script.ps1" Start a job using Invoke-Command on a remote machine: $job = Invoke-Command -ComputerName "ComputerName&...
As of GHC 7.10, Applicative is a superclass of Monad (i.e., every type which is a Monad must also be an Applicative). All the methods of Applicative (pure, <*>) can be implemented in terms of methods of Monad (return, >>=). It is obvious that pure and return serve equivalent purposes, ...
This example shows how a MongoDB collection can be displayed in a React component. The collection is continuously synchronized between server and client, and the page instantly updates as database contents change. To connect React components and Meteor collections, you'll need the react-meteor-data...
SpriteKit functionality can be implemented in a subclass of SKScene. For example, a game may implement the main game functionality within an SKScene subclass called GameScene. In Swift: import SpriteKit class GameScene: SKScene { override func didMoveToView(view: SKView) { /* Co...
@Singleton @Component(modules = AppModule.class) public interface AppComponent { void inject(App app); Context provideContext(); Gson provideGson(); MainActivityComponent mainActivityComponent(ActivityModule activityModule); } @ActivityScope @Subcomponent(modules = Act...
Suppose you want to prevent unauthorized users to access the page then you have to put barrier to them by authorizing access. We can do this by using spring-security which provides basic authentication by securing all HTTP end points. For that you need to add spring-security dependency to your proje...
Most KVO and KVC functionality is already implemented by default on all NSObject subclasses. To start observing a property named firstName of an object named personObject do this in the observing class: [personObject addObserver:self forKeyPath:@"firstName" ...
List subList(int fromIndex, int toIndex) Here fromIndex is inclusive and toIndex is exclusive. List list = new ArrayList(); List list1 = list.subList(fromIndex,toIndex); If the list doesn't exist in the give range, it throws IndexOutofBoundException. What ever changes made on the list1 wi...
A downcast can be used to make use of a subclass's code and data inside of a function taking a parameter of its superclass. class Rat { var color = "white" } class PetRat: Rat { var name = "Spot" } func nameOfRat(🐭: Rat) -> String { guard let petRat = ...
#include <stdio.h> #include <curl/curl.h> int main(void) { CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* example.com is redirected, so we tell libcurl to follow redirect...
The standard library module urllib.request can be used to download web content: from urllib.request import urlopen response = urlopen('http://stackoverflow.com/questions?sort=votes') data = response.read() # The received bytes should usually be decoded according the response's characte...
https://godzillai5.wordpress.com/2016/08/20/db2-for-i-in-the-cloud-connecting-to-pub400-via-jdbc-in-netbeans/
https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/
Transaction using JDBC driver is used to control how and when a transaction should commit and rollback. Connection to MySQL server is created using JDBC driver JDBC driver for MySQL can be downloaded here Lets start with getting a connection to database using JDBC driver Class.forName("com.m...
The libc crate is 'feature gated' and can only be accessed on nightly Rust versions until it is considered stable. #![feature(libc)] extern crate libc; use libc::pid_t; #[link(name = "c")] extern { fn getpid() -> pid_t; } fn main() { let x = unsafe { getpid() }; ...
Display a live video feed taken from a webcam using OpenCV's VideoCapture class with Java, C/C++ and Python. Java import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.videoio.VideoCapture; public class Camera { public static void main(String[] args) { // L...
Abstract base classes (ABCs) enforce what derived classes implement particular methods from the base class. To understand how this works and why we should use it, let's take a look at an example that Van Rossum would enjoy. Let's say we have a Base class "MontyPython" with two methods (jo...

Page 2 of 4