Tutorial by Examples: app

In your build.gradle you need to add the below dependencies: debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' In your Application class yo...
If you have: infix fun <T> T?.shouldBe(expected: T?) = assertEquals(expected, this) you can write the following DSL-like code in your tests: @Test fun test() { 100.plusOne() shouldBe 101 }
Prerequisites you should have fuse installed (https://www.fusetools.com/downloads) you should have done the introduction tutorial in terminal: fuse install android in terminal: uno install Fuse.Views Step 1 git clone https://github.com/fusetools/hikr Step 2 : Add package reference to ...
Command git cherry shows the changes which haven't yet been cherry-picked. Example: git checkout master git cherry development ... and see output a bit like this: + 492508acab7b454eee8b805f8ba906056eede0ff - 5ceb5a9077ddb9e78b1e8f24bfc70e674c627949 + b4459544c000f4d51d1ec23f279d9cdb19c1d32b...
After creating a new Symfony application, you can use the server:run command to start a simple PHP web server, so you can access your new application from your web browser: cd my_project_name/ php bin/console server:run You can now visit http://localhost:8000/ to see the Symfony welcome page. ...
Whenever we create a new project in Xcode for our new app, it gives us various in-built classes, targets, tests, plist file, etc. Similarly it also gives us as Assets.xcassets file, which manages all the image assets in our project. This is how this file looks like in file navigator: If we clic...
APPEND was command in msdos that allowed to use resource/media files like they are in the same directory.The command is still available in 32bit versions of windows but seems is not working. In some sources (including microsofts') it is pointed that the command is replaced by DPATH ,but it is not en...
By creating multiple properties files for the different environments or use cases, its sometimes hard to manually change the active.profile value to the right one. But there is a way to set the active.profile in the application.properties file while building the application by using maven-profiles. ...
pry is a powerful tool that can be used to debug any ruby application. Setting up a ruby-on-rails application with this gem is very easy and straightforward. Setup To start debugging your application with pry Add gem 'pry' to the application's Gemfile and bundle it group :development, :test ...
The following steps need to be done in the app.ionic.io Create an account or login into your ionic account Click "New App" in the Dashboard and give name for your app I named my app as 'MyIonicApp' In the overview section of this newly created app, there will be a ID...
By default tee command overwrites the file. You can instruct tee to append to the file using the –a option as shown below. $ ls | tee –a file
Locate and open your TIBCO BW bwengine.tra file typlically under TIBCO_HOME/bw/5.12/bin/bwengine.tra (Linux environment) Look for the line that states: *** Common variables. Modify these only. *** Add the following line right after that section tibco.deployment=%tibco.deployment% ...
/** * Apply a radial mask (vignette, i.e. fading to black at the borders) to a bitmap * @param imageToApplyMaskTo Bitmap to modify */ public static void radialMask(final Bitmap imageToApplyMaskTo) { Canvas canvas = new Canvas(imageToApplyMaskTo); final float centerX = imageToApply...
Request:"http://example.com" GET / HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Accept: text/html;q=1.0,application/xml;q=0.9 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive ...
This is an Angular 2 wrapper library for Dropzone. npm install angular2-dropzone-wrapper --save-dev Load the module for your app import { DropzoneModule } from 'angular2-dropzone-wrapper'; import { DropzoneConfigInterface } from 'angular2-dropzone-wrapper'; const DROPZONE_CONFIG: Dropzon...
With the help of react-navigation, you can add navigation to your app really easy. Install react-navigation npm install --save react-navigation Example: import { Button, View, Text, AppRegistry } from 'react-native'; import { StackNavigator } from 'react-navigation'; const App = StackNavigat...
@Controller @RequestMapping("/appointments") public class AppointmentsController { //your handlers here, for example: @RequestMapping(path = "/new", method = RequestMethod.GET) public AppointmentForm getNewForm() { return new AppointmentForm(); } @RequestMapping...
store the cookie with three parts. function onLogin($user) { $token = GenerateRandomToken(); // generate a token, should be 128 - 256 bit storeTokenForUser($user, $token); $cookie = $user . ':' . $token; $mac = hash_hmac('sha256', $cookie, SECRET_KEY); $cookie .= ':' . $mac...
Some of the log4net appenders are buffered appenders. These appenders will only log when a certain amount of messages are logged. Some samples are the SmtpAppender, RemotingAppender or the AdoNetAppender. These appenders have a setting BufferSize: <bufferSize value="100" /> This ...
If you have a file appender, make sure you are writing to a location where the user is allowed to create and update the files. If not the logging will fail. You can check this when you have internal debugging enabled.

Page 31 of 33