Tutorial by Examples

url = 'http://httpbin.org/post' files = {'file': ('report.csv', 'some,data,to,send\nanother,row,to,send\n')} r = requests.post(url, files=files) r.text
A literal inside a enumeration is a discrete type so we can use attribute Image to find out which literal it is as text form. Notice that this prints out the same word as in the code (but in upper case). with Ada.Text_IO; use Ada.Text_IO; procedure Main is type Fruit is (Banana, Pear, Orang...
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...
The FULL hint tells Oracle to perform a full table scan on a specified table, no matter if an index can be used. create table fullTable(id) as select level from dual connect by level < 100000; create index idx on fullTable(id); With no hints, the index is used: select count(1) from fullTabl...
You can set the desired UI widget's stylesheet using any valid CSS. The example below will set a QLabel's text color a border around it. #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Mai...
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...
The concept of timing is related more to the physics of flip flops than VHDL, but is an important concept that any designer using VHDL to create hardware should know. When designing digital hardware, we are typically creating synchronous logic. This means our data travels from flip-flop to flip-flo...
The JWT RFC stablish three classes of claims: Registered claims like sub, iss, exp or nbf Public claims with public names or names registered by IANA which contain values that should be unique like email, address or phone_number. See full list Private claims to use in your own context...
// 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
// filter by creation date $date = new Zend_Date(); $toDate = $date->get(Zend_Date::W3C); // today $fromDate = $date->sub('1', Zend_Date::MONTH)->get(Zend_Date::W3C); // one month ago $orders->addAttributeToFilter('created_at', array('from' => $fromDate, 'to' => $toDate)); ...

Page 823 of 1336