Tutorial by Examples: du

adb is a command line tool for communicating with an emulator instance or connected device. It allows for installing and debugging apps, transferring files, as well as a variety of other interactions with the connected emulator or device. The ADB system consists of a client, which sends commands fro...
There are specific scenarios where in we might need to create a Quartz scheduler,based on user input on when a scheduler should be triggered,apart from we can handle cases,where we have certain pre-defined functionalities,which need to be triggered based on user action,at a certain period. This exa...
Query to search last executed sp's in db SELECT execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql ORDER BY execquery.last_execution_time DESC Query to search thro...
@{ 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...
function Add { [CmdletBinding()] param ( [int] $x , [int] $y ) return $x + $y } Export-ModuleMember -Function Add This is a simple example of what a PowerShell script module file might look like. This file would be called MyCoolModule.psm1, and is referenced from the mod...
$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...
Rather than defining all of your functions in a single .psm1 PowerShell script module file, you might want to break apart your function into individual files. You can then dot-source these files from your script module file, which in essence, treats them as if they were part of the .psm1 file itself...
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...
' How To Seek Past VBA's 2GB File Limit ' Source: https://support.microsoft.com/en-us/kb/189981 (Archived) ' This must be in a Class Module Option Explicit Public Enum W32F_Errors W32F_UNKNOWN_ERROR = 45600 W32F_FILE_ALREADY_OPEN W32F_PROBLEM_OPENING_FILE W32F_FILE_ALREAD...
Private Const HashTypeMD5 As String = "MD5" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.md5cryptoserviceprovider(v=vs.110).aspx Private Const HashTypeSHA1 As String = "SHA1" ' https://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1c...
From the gnuplot 5.0 official online documentation: The command language of gnuplot is case sensitive, i.e. commands and function names written in lowercase are not the same as those written in capitals. All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number...
The pygame.mixer module helps control the music used in pygame programs. As of now, there are 15 different functions for the mixer module. Initializing Similar to how you have to initialize pygame with pygame.init(), you must initialize pygame.mixer as well. By using the first option, we initiali...
What is Kibana: Kibana is used for making visualizations and creating dashboards for the indexes presented in elasticsearch. Basically, it is an open source plug-in for elasticsearch. There are Six Tabs: Discover: You can explore your data from Discover tab Visulization: Creating v...
Let's say we have a model called product. class Product(models.Model): name = models.CharField(max_length=100) price = models.IntegerField() Now we are going to declare a model serializers for this model. from rest_framework.serializers import ModelSerializer class ProductSerialize...
In Swift, protocol extensions cannot have true properties. However, in practice you can use the "associated object" technique. The result is almost exactly like a "real" property. Here is the exact technique for adding an "associated object" to a protocol extension: ...
Installing Heroku Scheduler heroku addons:create scheduler:standard
Unlike functions, there's no need to forward declare a procedure. It can be placed anywhere in your code, before or after you call it using RUN. RUN proc. //Procedure starts here PROCEDURE proc: //Procedure ends here END PROCEDURE. The procedure name is folowed by a colon sign telling u...
custom_module.info name = Custom Module description = Creates a block containing a custom output. core = 7.x custom_module.module /** * Initiates hook_block_info. * * Registers the block with Drupal. */ function custom_module_block_info() { $blocks = array(); //Registers the ...
custom_module.info name = Custom Module description = Creates a block containing a custom output. core = 7.x custom_module.module /** * Initiates hook_block_info. * * Registers the block with Drupal. */ function custom_module_block_info() { $blocks = array(); //Registers the ...
Can be used in conjunction with the custom form example to create a table in the drupal database for a Mailing List feature. This example was made by creating the table directly in my development database, then created the data for hook_schema() using the Schema module. This allows for automatic t...

Page 40 of 47