Tutorial by Examples: o

perl -Mojo -E 'p("http://localhost:3000" => form => {Input_Type => "XML", Input_File => {file => "d:/xml/test.xml"}})' File d:/xml/test.xml will be uploaded to server which listen connections on localhost:3000 (Source) In this example: -Mmodule execu...
Type below command: instmodsh It'll show you the guild as below: Available commands are: l - List all installed modules m <module> - Select a module q - Quit the program cmd? Then type l to list all the installed modules, you can also use command m &l...
package main import ( "fmt" "k8s.io/client-go/1.5/kubernetes" "k8s.io/client-go/1.5/pkg/api/v1" "k8s.io/client-go/1.5/tools/clientcmd" ) func main() { config, err := clientcmd.BuildConfigFromFlags("", <kube-config-path&g...
Modal dialog components can be instantiated via jQuery with the function $('#myModal').modal(options), where $('#myModal') is a top-level reference to the specific modal dialog and options is a Javascript object specifying the modal dialog's default attributes. The options object allows for multipl...
Depending on the version of Weka being used different methods for loading ARFF files should be utilised. Weka <3.5.5 The following sample code shows how to load an ARFF file: import weka.core.Instances; import java.io.BufferedReader; import java.io.FileReader; ... BufferedReader reader = n...
Many databases can be used in Weka. Firstly, the DatabaseUtils.props file must be edited to match your database; specifically you must provide your database's name, location, port and correct driver. jdbcDriver=org.gjt.mm.mysql.Driver jdbcURL=jdbc:mysql://localhost:3306/my_database Then the dat...
IronPython enables to use generic classes and methods from the .net framework. Generics can be used with the same syntax as accessing an index. For passing more than one type-parameter, they must be separated with a comma: l = Dictionary[int, str]() That way we create a dictionary where keys on...
url = 'http://your_url' files = {'file': open('myfile.test', 'rb')} r = requests.post(url, files=files)
url = 'http://httpbin.org/post' files = {'file': ('report.xls', open('report.xls', 'rb'), 'application/vnd.ms-excel', {'Expires': '0'})} r = requests.post(url, files=files)
Instead of attribute Image and Ada.Text_IO.Put on enumeration literals we can only use the generic package Ada.Text_IO.Enumeration_IO to print out the literals. with Ada.Text_IO; use Ada.Text_IO; procedure Main is type Fruit is (Banana, Pear, Orange, Melon); package Fruit_IO is new Enume...
Attribute Image capitalizes all characters of enumeration literals. The function Case_Rule_For_Names applies upper case for the first character and makes the rest lower case. with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants; with Ada.Strings.Fixed...
Simply specifying a file destination, echo will create, write, or append to a file. <echo file=example.txt" append="false"> hello world </echo>
To print the contents of a file, we can use loadfile to read a file into a local property, and then use echo to print the value of it. <loadfile property="contents" srcFile="example.txt" /> <echo message="${contents}" />
If your code is running behind a proxy and you know the end point, you can set this information in your code. requests accepts a proxies parameter. This should be a dictionary that maps protocol to the proxy URL. proxies = { 'http': 'http://proxy.example.com:8080', 'https': 'http://securepro...
requests uses specific environment variables automatically for proxy detection. HTTP_PROXY will define the proxy URL to use for HTTP connections HTTPS_PROXY will define the proxy URL to use for HTTPS connections Once these environment variables are set, the Python code does not need to pass a...
The whole ES6 spec is not yet implemented in its entirety so you will only be able to use some of the new features. You can see a list of the current supported ES6 features at http://node.green/ Since NodeJS v6 there has been pretty good support. So if you using NodeJS v6 or above you can enjoy usi...
Xcode by itself has quite a few good tools built in, but sometimes you just want to change a specific behavior or create a convenience shortcut. That's why there's Alcatraz. Installation curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh Throw this ...
Console Module Similar to the browser environment of JavaScript node.js provides a console module which provides simple logging and debugging possibilities. The most important methods provided by the console module are console.log, console.error and console.time. But there are several others like ...
Open phone's settings open battery open menu and select "battery optimization" from the dropdown menu select "all apps" select the app you want to whitelist select "don't optimize" Now this app will show under not optimized apps. An app can check whether it's...
Annotations are means of attaching metadata to code. To declare an annotation, put the annotation modifier in front of a class: annotation class Strippable Annotations can have meta-anotations: @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.VALUE_PARAMETER, A...

Page 629 of 1038