Tutorial by Examples

In order to install an extension as a normal add-on into Release or Beta versions of Firefox greater than, or equal to, version 48, the extension must be signed by Mozilla. An extension is signed by submitting it to AMO. Once it is signed, the extension can be installed on any version of Firefox whi...
Register C++ classes in QML At C++ side, imagine we have a class named QmlCppBridge, it implements a method called printHello(). class QmlCppBridge : public QObject { Q_OBJECT public: Q_INVOKABLE static void printHello() { qDebug() << "Hello, QML!"; } }; ...
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 ...
Create separate files for header and footer(as they are common for all the pages and it does not make sense to make them a part of a single page) Keep common elements(Like Search/Back/Next etc) in separate file(The idea is to remove any kind of duplication and keeping the segregation logical) Fo...
//Add a List validation to B column. Values should be in a list var val = worksheet.DataValidations.AddListValidation("B:B"); //Shows error message when the input doesn't match the accepted values val.ShowErrorMessage = true; //Style of warning. "information" and "warn...
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...
//Add a List validation to the C column var val3 = worksheet.DataValidations.AddIntegerValidation("E:E"); //For Integer Validation, you have to set error message to true val3.ShowErrorMessage = true; val3.Error = "The value must be an integer between 0 and 10"; //Minimum a...
//Add a DateTime Validation to column F var val4 = worksheet.DataValidations.AddDateTimeValidation("F:F"); //For DateTime Validation, you have to set error message to true val4.ShowErrorMessage = true; //Minimum allowed date val4.Formula.Value = new DateTime(2017,03,15, 01, 0,0); /...
//Add a TextLength Validation to column G var val5 = worksheet.DataValidations.AddTextLengthValidation("G:G"); //For TextLenght Validation, you have to set error message to true val5.ShowErrorMessage = true; //Minimum allowed text lenght val5.Formula.Value = 3; //Maximum allowed te...
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 ...
Presentation SimpleXML is a PHP library which provides an easy way to work with XML documents (especially reading and iterating through XML data). The only restraint is that the XML document must be well-formed. Parsing XML using procedural approach // Load an XML string $xmlstr = f...
There are cases when you need to change Display Name of column in a list view e.g. Column Name showing in the view is "IsApprovalNeeded" and you want to appear as "Is Approval Needed?". You can, of course change the display name of a column by changing the column title in list ...
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...
Web deployment offers the option to automatically backup target Web site (not target Web application!) on deployment. This is recommended to allow web application rollback. In order to configure automatic backups, the following steps must be followed: 1) Enable backups Open %programfiles%\IIS\Mic...
@RunWith(RobolectricTestRunner.class) public class MyActivityTest { @Test public void clickingButton_shouldChangeResultsViewText() throws Exception { MyActivity activity = Robolectric.setupActivity(MyActivity.class); Button button = (Button) activity.findViewById(R.id.button); ...
String json = ...; Moshi moshi = new Moshi.Builder().build(); JsonAdapter<BlackjackHand> jsonAdapter = moshi.adapter(BlackjackHand.class); BlackjackHand blackjackHand = jsonAdapter.fromJson(json); System.out.println(blackjackHand);
BlackjackHand blackjackHand = new BlackjackHand( new Card('6', SPADES), Arrays.asList(new Card('4', CLUBS), new Card('A', HEARTS))); Moshi moshi = new Moshi.Builder().build(); JsonAdapter<BlackjackHand> jsonAdapter = moshi.adapter(BlackjackHand.class); String json = jsonAdapte...
Moshi has built-in support for reading and writing Java’s core data types: Primitives (int, float, char...) and their boxed counterparts (Integer, Float, Character...). Arrays Collections Lists Sets Maps Strings Enums It supports your model classes by writing them out field-by-field. In ...
In order to access or alter an index on a table, you need to somehow place the table into the stack. Let's assume, for this examples that your table is a global variable named tbl. Getting the content at a particular index: int getkey_index(lua_State *L) { lua_getglobal(L, "tbl"); ...
workflow DoSomeWork { Get-Process -Name notepad | Stop-Process } This is a basic example of a PowerShell Workflow definition.

Page 1098 of 1336