Tutorial by Examples: f

@{ RootModule = 'MyCoolModule.psm1' ModuleVersion = '1.0' CompatiblePSEditions = @('Core') GUID = '6b42c995-67da-4139-be79-597a328056cc' Author = 'Bob Schmob' CompanyName = 'My Company' Copyright = '(c) 2017 Administrator. All rights reserved.' Description = 'It does cool stu...
$FirstName = 'Bob' Export-ModuleMember -Variable FirstName To export a variable from a module, you use the Export-ModuleMember command, with the -Variable parameter. Remember, however, that if the variable is also not explicitly exported in the module manifest (.psd1) file, then the variable wil...
Add-ons can be installed as: Normal add-ons, which are installed until uninstalled Temporary Add-ons (extensions only): are only installed until Firefox is restarted, or can manually uninstalled earlier. Using jpm run (Add-on SDK only): Automatically runs Firefox using a temporary profile with ...
Manage Files and Projects Ctrl+Shift+R : Open Resource (file, folder or project) Ctrl+Shift+S : Save all files Ctrl+W : Close current file Ctrl+Shift+W : Close all files Editor Window F12 : Jump to Editor Window Ctrl+E : Show list of open Editors. Use arro...
For Getting updated or to do something before app goes live to user you can use below method. AppDidFinishLaunching - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Write your code before app launch return YES; } While ...
Typically, some files from the Web Application should not be overwritten when performing the deployment (e.g. web.config). This can be accomplished by: 1) Excluding from output - which means setting Build action to None. This is the easiest way, but it might not work for some particular files or fo...
workflow DoSomeWork { Get-Process -Name notepad | Stop-Process } This is a basic example of a PowerShell Workflow definition.
Just like PowerShell functions, workflows can accept input parameter. Input parameters can optionally be bound to a specific data type, such as a string, integer, etc. Use the standard param keyword to define a block of input parameters, directly after the workflow declaration. workflow DoSomeWork ...
PowerShell Workflows are inherently equipped with the ability to run as a background job. To call a workflow as a PowerShell background job, use the -AsJob parameter when invoking the workflow. workflow DoSomeWork { Get-Process -ComputerName server01 Get-Process -ComputerName server02 Get-...
workflow DoSomeWork { parallel { Get-Process -ComputerName server01 Get-Process -ComputerName server02 Get-Process -ComputerName server03 } } One of the unique features of PowerShell Workflow is the ability to define a block of activities as parallel. To use this feature, us...
The find and replace feature in Atom works in two ways, one operates locally only on the file you are in, and the other on a set of files or directories. To open the find and replace tool for a single file, press Ctrl+F (For Mac OS use ⌘+F). Enter in the first blank the string you are searching for...
var json = "{\"Name\":\"Joe Smith\",\"Age\":21}"; var person = JsonConvert.DeserializeObject<Person>(json); This yields a Person object with Name "Joe Smith" and Age 21.
Occasionally we see StackOverflow Java questions (and C or C++ questions) that ask what something like this: i += a[i++] + b[i--]; evaluates to ... for some known initial states of i, a and b. Generally speaking: for Java the answer is always specified1, but non-obvious, and often difficult ...
Sometimes one would like to pass names of columns from a data frame to a function. They may be provided as strings and used in a function using [[. Let's take a look at the following example, which prints to R console basic stats of selected variables: basic.stats <- function(dset, vars){ f...
from nltk.tokenize import sent_tokenize, word_tokenize example_text = input("Enter the text: ") print("Sentence Tokens:") print(sent_tokenize(example_text)) print("Word Tokens:") print(word_tokenize(example_text))
NLTK has by default a bunch of words that it considers to be stop words. It can be accessed via the NLTK corpus with: from nltk.corpus import stopwords To check the list of stop words stored for english language : stop_words = set(stopwords.words("english")) print(stop_words) Exam...
Minimum skeleton mynamespace.myaddon | The container-directory of the add-on. setup.py | Register this directory to the Python-interpreter of | the ZOPE-instance. mynamespace | The namespace-directory of the add-on. __init__.p...
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskWrites() .penaltyLog() //Logs a message to LogCat .build())
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectActivityLeaks() .detectLeakedClosableObjects() .penaltyLog() .build());
Our demo app consists of a scoreboard. The score model is an immutable record. The scoreboard events are contained in a Union Type. namespace Score.Model type Score = { ScoreA: int ; ScoreB: int } type ScoringEvent = IncA | DecA | IncB | DecB | NewGame Changes are propagated by listening...

Page 373 of 457