Tutorial by Examples: bac

There are many ways to backup an Alfresco system. It is important that you backup the database as well as the content store. You may also want to back up the Solr indices. Assuming you installed using the binary installer, and everything lives in $ALRESCO_HOME, you can backup the database like this...
page.js var context = { items: [ {id: 1, name: "Foo"}, {id: 2, name: "Bar"}, {id: 3, name: "Joe"} ] } exports.loaded = function(args){ var page = args.object; page.bindingContext = context; } exports.showEntry = functi...
You need to import System.ComponentModel for using background worker Imports System.ComponentModel Then Declare a private variable Private bgWorker As New BackgroundWorker You need to create two methods for background worker's DoWork and RunWorkerCompleted events and assign them. Private Su...
Here is our function to create a simple ajax call written in vanilla javascript (not es2015): function ajax(url, callback) { var xhr; if(typeof XMLHttpRequest !== 'undefined') xhr = new XMLHttpRequest(); else { var versions = ["MSXML2.XmlHttp.5.0", ...
sed -i -e cmd file will modify file even if its permissions are set to read-only. This command behaves similarly to sed -e cmd file > tmp; mv -f tmp file rather than sed -e cmd file > tmp; cat tmp > file; rm tmp The following example uses gnu sed: $ echo 'Extremely important data' &gt...
const Promise = require('bluebird'), fs = require('fs') Promise.promisifyAll(fs) // now you can use promise based methods on 'fs' with the Async suffix fs.readFileAsync('file.txt').then(contents => { console.log(contents) }).catch(err => { console.error('error reading', er...
var expect = require("chai").expect; describe('Suite Name', function() { describe('#method()', function() { it('should run without an error', function(done) { testSomething(err => { expect(err).to.not.be.equal(null) done() }) }) }) }) ...
When you can't / don't want to use Strict Mocks, you can't use MockSequence to validate call order. An alternate approach is to use callbacks to validate that the Setup expectations are being invoked in the expected order. Given the following method to test: public void MethodToTest() { _ut...
function calculatorService() { const service = {}; service.add = function(a,b) { return a + b } return service; } angular.module('app').factory('calculatorService', calculatorService); Testing describe('calculator service', function() { var calcula...
Objective C: view.backgroundColor = [UIColor redColor]; Swift: view.backgroundColor! = UIColor.redColor() Swift 3 view.backgroundColor = UIColor.redColor
Samtools can be used to convert between sam and bam: -b indicates that the input file will be in BAM format -S indicates that the stdout should be in SAM format samtools view -sB thing.bam > thing.sam And to convert between sam and bam: samtools view thing.sam > thing.bam samtools ...
Let's create a process which is rather long to complete : $ sleep 1000 To pause the process, type Ctrl + Z : ^Z [1]+ Stopped sleep 1000 You can use jobs to see the list of processes running or stopped in the current terminal : $ jobs [1]+ Stopped sleep 10...
A common pattern in other languages is having a function that produces a "stream" of objects, and being able to use loop-code to loop over it. We can model this in C++ as template<class T> struct generator_iterator { using difference_type=std::ptrdiff_t; using value_type=T; ...
Frontend Interface /** * Entity attribute frontend interface * * Frontend is providing the user interface for the attribute * */ interface Mage_Eav_Model_Entity_Attribute_Frontend_Interface { } Source Interface /** * Entity attribute select source interface * * Source is providing ...
identification division. program-id. subprog. procedure division. display "in subprog" goback. ... call "subprog" goback. The first GOBACK above will return from subprog. Assuming the second is inside the main procedure, GOBACK will return to the operating system. ...
Errors, when managed properly by the server, will be returned to your client with a specific HTTP status code different from 2xx (see RFC 2616 section 10). It's advised to catch globally your errors from your $.ajaxSetup() as demonstrated in the example below. Therefore all errors coming from your ...
The backup menu is in the Administration Panel. And in the Left menu, inside the Server Administration, go on Backup. TeamCity (as of v10) does not automatically backup, but you can get TeamCity to back itself up on a daily basis by scheduling a task to hit the REST api. Typically you would also n...
Objective-C UIGraphicsBeginImageContext(self.view.frame.size); [[UIImage imageNamed:@"image.png"] drawInRect:self.view.bounds]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); self.view.backgroundColor = [UIColor colorWithPatternIma...
public static Boolean ExportDB(String DATABASE_NAME , String packageName , String folderName){ //DATABASE_NAME including ".db" at the end like "mayApp.db" String DBName = DATABASE_NAME.substring(0, DATABASE_NAME.length() - 3); File data = Environment.getDataDir...
One drawback of creating private method in Javascript is memory-inefficient because a copy of the private method will be created every time a new instance is created. See this simple example. function contact(first, last) { this.firstName = first; this.lastName = last; this.mobile; ...

Page 8 of 12