Tutorial by Examples: c

Here we are sharing some minimal workflow to build and publish an Angular 2+ npm package. Configuration files We need some config files to tell git, npm, gulp and typescript how to act. .gitignore First we create a .gitignore file to avoid versioning unwanted files and folders. The content is: ...
Steps: clone the gradle-script-kotlin project copy/paste from the cloned project to your project: build.gradle.kts gradlew gradlew.bat settings.gradle update the content of the build.gradle.kts based on your needs, you can use as inspiration the scripts in the project just clo...
The following example expands upon Hello World by demonstrating multiple dependencies using the define() function. Create a new HTML file called index.html and paste the following content: <!DOCTYPE html> <html lang="en"> <head> <title>Hello RequireJS</t...
In our example we will be creating a customized formatter for email addresses that will allow us to display obfuscated email addresses to fool those nasty spammers. The formatter will have a some configuration options that will allow us to control how the email address is obfuscated: Remove @ an...
Not all libraries are defined in a way that is compatible with AMD and RequireJS's define() function. The author's have addressed this by including a shim directive for configuring those dependencies. One example is using the jQuery UI Layout Plugin. That plugin depends on jQuery. You can configu...
Parts of template can be displayed conditionally. If statement is used for this purpose. It's similar to if statement in programing languages. Contents of block are executed/displayed if an expression evaluates to true. {% if enabled == false %} Disabled {% endif %} Disabled will be displ...
As of Ruby 2.4.0, you can start an interactive IRB session inside any Ruby script using these lines: require 'irb' binding.irb This will start an IBR REPL where you will have the expected value for self and you will be able to access all local variables and instance variables that are in scope....
CloudCannon offers hosting and a CMS for Jekyll applications. Here are the steps in hosting your Jekyll application on CloudCannon (http://cloudcannon.com). Without version control: Create your blog locally using some local files and jekyll serve Create a CloudCannon account and create a new si...
SWIFT: Getting an instance of UIStoryboard programmatically can be done as follows: let storyboard = UIStoryboard(name: "Main", bundle: nil) where: name => the name of the storyboard without the extension bundle => the bundle containing the storyboard file and its relate...
A basic principle of functional programming is that it avoids changing the application state (statelessness) and variables outside it's scope (immutability). Pure functions are functions that: with a given input, always return the same output they do not rely on any variable outside their scope...
RTL (Right-to-left) support is an essential part in planning for i18n and L10n. Unlike English language which is written from left to right, many languages like Arabic, Japanese, Hebrew, etc. are written from right to left. To appeal to a more global audience, it is a good idea to plan your layouts ...
Starting SDK 17 (Android 4.2), RTL support was added in Android layouts and is an essential part of localization. Going forward, the left/right notation in layouts should be replaced by start/end notation. If, however, your project has a minSdk value less than 17, then both left/right and start/end ...
To test if the layouts that have been created are RTL compatible, do the following : Go to Settings -> Developer options -> Drawing -> Force RTL layout direction Enabling this option would force the device to use RTL locales and you can easily verify all parts of the app for RTL suppo...
The first step for coding for localization is to create default resources. This step is so implicit that many developers do not even think about it. However, creating default resources is important because if the device runs on an unsupported locale, it would load all of its resources from the defau...
To provide translations in other languages (locales), we need to create a strings.xml in a separate folder by the following convention : res/values-<locale>/strings.xml An example for the same is given below: In this example, we have default English strings in the file res/values/string...
Creating language specific layouts is often unnecessary if you have specified the correct start/end notation, as described in the earlier example. However, there may be situations where the defaults layouts may not work correctly for certain languages. Sometimes, left-to-right layouts may not transl...
By default, the escape character is ~. Just go ahead and type ~. in your opened SSH session. After hitting Enter your session will end immediately. Go ahead and try it in any session, it works regardless of the responsiveness of your session.
In version 2.10, JMeter introduced a mechanism that saves you time when creating scripts - JMeter Templates. These templates are skeletons that can be reused as the base for your new scripts. JMeter already has several available templates with detailed descriptions, and you can also add your own. T...
JMeter also enables you to manually configure your workspace. It’s more complex, but you can make the scripts fit your exact needs. Configure your browser proxy Configure your browser, as described in chapter 1. Configure JMeter The “WorkBench” branch can be used as a temporary workspace for...
JMeter can also can be used for recording mobile performance testing. Mobile scripts recording is very similar to web application scripts recording. Configure JMeter Configure “JMeter Templates” as specified in chapter 1. Configure your mobile phone After the JMeter configuration is prepared...

Page 686 of 826