Tutorial by Examples: e

To get a list of available serial ports use python -m serial.tools.list_ports at a command prompt or from serial.tools import list_ports list_ports.comports() # Outputs list of available serial ports from the Python shell.
Add the debugger statement in your content script var foo = 1; debugger; foo = 2; Open the Developer Tool on the web page where your content script is injected to see the code execution pause at those lines.
Below are some tips to remember while we are writing a select query in MySQL that can help us and reduce our query time:- Whenever we use where in a large table we should make sure the column in where clause are index or not. Ex:- Select * from employee where user_id > 2000. user_id if ind...
To get started with unit testing PowerShell code using the Pester-module, you need to be familiar with three keywords/commands: Describe: Defines a group of tests. All Pester test files needs at least one Describe-block. It: Defines an individual test. You can have multiple It-blocks inside a De...
Drawing text in canvas with your font from assets. Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/SomeFont.ttf"); Paint textPaint = new Paint(); textPaint.setTypeface(typeface); canvas.drawText("Your text here", x, y, textPaint);
Detailed instructions on getting axapta set up or installed.
A module is a collection of related reusable functions (or cmdlets) that can easily be distributed to other PowerShell users and used in multiple scripts or directly in the console. A module is usually saved in it's own directory and consists of: One or more code files with the .psm1 file extensi...
Download the latest stable version from Activiti's website or you can check out the code from github and unzip to a directory of choice and then check out the readme.html that includes pointers to the docs and the release notes. The userguide ( docs/userguide/index.html ) includes instructions on ho...
Temporary tables could be very useful to keep temporary data. Temporary tables option is available in MySQL version 3.23 and above. Temporary table will be automatically destroyed when the session ends or connection is closed. The user can also drop temporary table. Same temporary table name can b...
Drop Temporary Table is used to delete the temporary table which you are created in your current session. DROP TEMPORARY TABLE tempTable1 DROP TEMPORARY TABLE IF EXISTS tempTable1 Use IF EXISTS to prevent an error occurring for tables that may not exist
Although Julia is not a purely functional language, it has full support for many of the cornerstones of functional programming: first-class functions, lexical scope, and closures. The fixed-point combinator is a key combinator in functional programming. Because Julia has eager evaluation semantics ...
The SKI combinator system is sufficient to represent any lambda calculus terms. (In practice, of course, lambda abstractions blow up to exponential size when they are translated into SKI.) Due to the simplicity of the system, implementing the S, K, and I combinators is extraordinarily simple: A Dir...
string is defined as alias string = immutable(char)[];: so need to use dup to make a mutable char array, before it can be reversed: import std.stdio; import std.string; int main() { string x = "Hello world!"; char[] x_rev = x.dup.reverse; writeln(x_rev); // !dlr...
After running your grammar .g4 file with ANTLR.jar you should have a number of files generated such as : 1.yourGrammarNameListener.py 2.yourGrammarNameParser.py 3.yourGrammarName.tokens ... To use these in a python project include the Python runtime in your workspace so any application you ar...
Frequently you may want to filter structures and other complex data types. Searching an array of structs for entries that contain a particular value is a very common task, and easily achieved in Swift using functional programming features. What's more, the code is extremely succinct. struct Painter...
Changing the edit text's appearance when it's selected, pressed and not selected can be customised easily by adding creating a new style for your edit text like so <style name="EditTextTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorContr...
The Autobahn package can be used for Python web socket server factories. Python Autobahn package documentation To install, typically one would simply use the terminal command (For Linux): sudo pip install autobahn (For Windows): python -m pip install autobahn Then, a simple echo server ca...
New Pull Request Whenever you want to create a Pull Request (let's say this is either by a recent change. But, you can also do this with an older change too!), you can go ahead and let GitHub do a lot of the heavy lifting for you and hit the green Compare & Pull Request button (NOT TO BE CONFUS...
To easily select a buffer by filename, you can use: :b [part_of_filename]<Tab><Tab><Tab>...<Enter> The first Tab will expand the word to a full filename, and subsequent Tab presses will cycle through the list of possible matches. When multiple matches are available, you ...
<C-^> will switch to and from the previous edited file. On most keyboards <C-^> is CTRL-6. 3<C-^> will switch to buffer number 3. This is very quick, but only if you know the buffer number. You can see the buffer numbers from :ls or from a plugin such as MiniBufExplorer.

Page 709 of 1191