Tutorial by Examples: sin

HtmlHelper.Action() @Html.Action(actionName: "Index") output: The HTML rendered by an action method called Index() @Html.Action(actionName: "Index", routeValues: new {id = 1}) output: The HTML rendered by an action method called Index(int id) @(Html.Action("In...
Let us assume we have the following Series: >>> import pandas as pd >>> s = pd.Series([1, 4, 6, 3, 8, 7, 4, 5]) >>> s 0 1 1 4 2 6 3 3 4 8 5 7 6 4 7 5 dtype: int64 Followings are a few simple things which come handy when you are workin...
Sometimes we have requirement of parsing pages, but doing so requires you to be an authorised user. Here is an example which shows you how to do in oracle sign in. import sys import requests import json from bs4 import BeautifulSoup def mprint(x): sys.stdout.write(x) print re...
Asset catalogs allow managing images, app icons, and launch images. Image Set is used for images which are displayed in the app. Universal images are usually the best option. You can either use a vector based image (such as PDF) which will scale for all screens, or include a 1x, 2x, and 3x variant...
Asset catalog images can be used from storyboards like any other kind of image added to the project. They will be automatically populated as an option in UIImageView and other views which support adding an image.
Executing a task with the background worker. Double Click on the BackgroundWorker control from the Toolbox This is how the BackgroundWorker appears after adding it. Double click on the added control to get the BackgroundWorker1_DoWork event and add the code to be executed when the BackgroundW...
You cannot access any GUI components from the BackgroudWorker. For example if you try to do something like this Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) TextBox1.Text = "Done" End Sub you will receive a runtime error saying that "Cross-thr...
Installers are custom types that implement the IWindsorInstaller interface and are used to register Components to the container, using the fluent registration API. public class MyInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) {...
Instantiate your ExoPlayer: exoPlayer = ExoPlayer.Factory.newInstance(RENDERER_COUNT, minBufferMs, minRebufferMs); To play audio only you can use these values: RENDERER_COUNT = 1 //since you want to render simple audio minBufferMs = 1000 minRebufferMs = 5000 Both buffer values can be twea...
// 1. Instantiate the player. player = ExoPlayer.Factory.newInstance(RENDERER_COUNT); // 2. Construct renderers. MediaCodecVideoTrackRenderer videoRenderer = ... MediaCodecAudioTrackRenderer audioRenderer = ... // 3. Inject the renderers through prepare. player.prepare(videoRenderer, audioRend...
In order to enable writing more complex UI tests the UIAutomatorViewer is needed. The tool located at /tools/ makes a fullscreen screenshot including the layouts of the currently displayed views. See the subsequent picture to get an idea of what is shown: For the UI tests we are looking for resou...
First create a BroadcastReceiver class to handle the incoming Location updates: public class LocationReceiver extends BroadcastReceiver implements Constants { @Override public void onReceive(Context context, Intent intent) { if (LocationResult.hasResult(intent)) { ...
We will take vehicle hierarchy example as depicted below. Vehicle.java package com.thejavageek.jpa.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Inheritance...
The next example is intended to count the amount of flags in the specified flag combination. The example is provided as a extension method: <DebuggerStepThrough> <Extension> <EditorBrowsable(EditorBrowsableState.Always)> Public Function CountFlags(ByVal sender As [Enum]) As In...
If a singleshot timer is required, it is quiet handy to have the slot as lambda function right in the place where the timer is declared: QTimer::singleShot(1000, []() { /*Code here*/ } ); Due to this Bug (QTBUG-26406), this is way is only possible since Qt5.4. In earlier Qt5 versions it has to ...
Setup First, install the necessary packages with: npm install express cors mongoose Code Then, add dependencies to server.js, create the database schema and the name of the collection, create an Express.js server, and connect to MongoDB: var express = require('express'); var cors = require('...
groups More detailed information about user and group numerical IDs can be found with the id command.
groups username More detailed information about user and group numerical IDs can be found with id username.
=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&"")) counts unique cell values within A1:A100, excluding blank cells and ones with an empty string (""). How does it do that? Example: A1:A100 = [1, 1, 2, "apple", "peach", &qu...
=SUMPRODUCT(IF(FREQUENCY(MATCH(A1:A100,A1:A100,0),MATCH(A1:A100,A1:A100,0))>0,1))

Page 104 of 161