Tutorial by Examples

As it is with GitHub Desktop most of the work is pretty simple: You select "Clone a repository" (In the stable version the plus on the upper left) and there are some repositories (your own and the repos from each company you are in) recommended. Alternatively you can paste a link to any ot...
You can select a branch at the upper left. When you selected the right branch you need to press the sync button (upper right) which does now the same as git checkout BRANCHNAME. In the older version you are able to view 2 different branches at once and compare the pushes. Furthermore you could vi...
Pull (Sync) Like in the command line you need to pull the current state of the repository once in a while. In GitHub Desktop this process is called by the sync Button at the top right corner. Push When you made local changes and want to push them you make a commit by writing something into the su...
The default icon of the Date-Picker in the Extension Library from OpenNTF is nice but not sexy. You can change it to one of the cool "Font Awesome Icons". First, add a DatePicker component to your page: <xe:djDateTextBox id="datePickerComp" value="#{myDoc.myDateField}&q...
The text field calls different delegate methods (only if delegates are set)One of delegate method called by textfield is *- (BOOL)textFieldShouldReturn:(UITextField )textField This method is called whenever users taps the return button.By using this method, we can implement any custom behaviour. ...
from requests import post payload = {'key1' : 'value1', 'key2' : 'value2' } foo = post('http://httpbin.org/post', data=payload) To pass form encoded data with the post operation, data must be structured as dictionary and supplied as the data parameter. If the data d...
Install the dependencies: pip install jinja2 Install a framework: pip install flask Create the following structure ├── run.py └── templates Put a file template.html in the templates directory. The file can contain a jinja 2 variable named my_string. <!DOCTYPE html> <html lang=&qu...
Each section can can contain JavaScript and Stylesheets, these two languages are used within liquid tags: {% javascript %}{% endjavascript %} & {% stylesheet %}{% endstylesheet %}. When placing code inside of these two tags, Shopify compiles each piece into shopify_compiled.js & shopify_com...
With the Requests module,its is only necessary to provide a file handle as opposed to the contents retrieved with .read(): from requests import post files = {'file' : open('data.txt', 'rb')} foo = post('http://http.org/post', files=files) Filename, content_type and headers can also be set:...
Purpose of the project: Download particular file based on message id sent as a request from client to server. File will be created on server and transmitted to client. Here, I haven't share the whole code but shown what is necessary as the purpose is to demonstrate the changes required for migratio...
Response codes can be viewed from a post operation: from requests import post foo = post('http://httpbin.org/post', data={'data' : 'value'}) print(foo.status_code) Returned Data Accessing data that is returned: foo = post('http://httpbin.org/post', data={'data' : 'value'}) print(foo.text)...
Detailed instructions on getting jupyter-notebook set up or installed.
Simple HTTP Authentication Simple HTTP Authentication can be achieved with the following: from requests import post foo = post('http://natas0.natas.labs.overthewire.org', auth=('natas0', 'natas0')) This is technically short hand for the following: from requests import post from requests.au...
import nltk from nltk.tokenize import sent_tokenize, word_tokenize text = 'We saw the yellow dog' word = word_tokenize(text) tag1 = nltk.pos_tag(word) print(tag1)
Each request POST operation can be configured to use network proxies HTTP/S Proxies from requests import post proxies = { 'http': 'http://192.168.0.128:3128', 'https': 'http://192.168.0.127:1080', } foo = requests.post('http://httpbin.org/post', proxies=proxies) HTTP Basic Authe...
import UIKit struct Person { // Model let firstName: String let lastName: String } class GreetingViewController : UIViewController { // View + Controller var person: Person! let showGreetingButton = UIButton() let greetingLabel = UILabel() override func vie...
import UIKit struct Person { // Model let firstName: String let lastName: String } protocol GreetingView: class { func setGreeting(greeting: String) } protocol GreetingViewPresenter { init(view: GreetingView, person: Person) func showGreeting() } class Greetin...
import UIKit struct Person { // Model let firstName: String let lastName: String } protocol GreetingViewModelProtocol: class { var greeting: String? { get } var greetingDidChange: ((GreetingViewModelProtocol) -> ())? { get set } // function to call when greeting did cha...
Activity is complete screen. UI is XML based and package com.example.android.activity; import android.os.Bundle; import android.app.Activity; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceSta...
Firstly, we created a voter: namespace BBIT\CoreBundle\Security\Authorization\Voter; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; class EventVoter implements VoterInterface { const VIE...

Page 1257 of 1336