Tutorial by Examples: c

use strict; use warnings; use Gtk2 -init; my $window = Gtk2::Window->new(); $window->show(); Gtk2->main(); 0;
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...
A Bootstrap modal dialog is a Bootstrap component which creates a modal dialog window which floats over page-level content. Here is an example of the basic usage of a Bootstrap modal dialog in HTML: <div class="modal fade" tabindex="-1" role="dialog"> <div...
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...
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...
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...
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 ...
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...
// get existing collections $orders = Mage::getModel('sales/order')->getCollection(); $products = Mage::getModel('catalog/product')->getCollection(); $customers = Mage::getModel('customer/customer')->getCollection();
// $orders is collection $orders->addAttributeToSelect('status'); // get status attribute $orders->addAttributeToSelect('*'); // get all attributes
// iterating over items in collection foreach ($orders as $singleOrder) { // do something with individual objects var_dump($singleOrder->getData()); } // get first/last item in collection $first = $orders->getFirstItem(); $last = $orders->getLastItem();
To get the raw value of a field on the Context Item: Sitecore.Context.Item["Field Name"]; To get the raw value of a field on a given item, item: item["Field Name"];

Page 508 of 826