/*
void rotate(int **a, int n) {
if(!a || n<2)
return;
int mid = n/2;
for(int i=0; i<mid; ++i) {
int len = n-1-i;
for(int j=i; j<len; ++j) {
import java.io.*;
import java.util.*;
/*
* To execute Java, please define "static void main" on a class
* named Solution.
*
* If you need more classes, simply define them inline.
*/
// https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/
import java.io.*;
import java.util.*;
// new: https://coderpad.io/EK7KCRPA
/*
* To execute Java, please define "static void main" on a class
//Stub mw service
const mwServiceStub = Ember.Service.extend({
});
moduleForComponent('base-grid-module', 'Unit | Component | base grid module', {
// Specify the other units that are required for this test
// needs: ['component:foo', 'helper:bar'],
unit: true,
let person1 = {
firstName: 'John',
lastName: 'Doe',
name() {
return `${this.firstName} ${this.lastName}`
}
}
console.log('person', person1.name());
As Ember developer for a while, I always wonder to know how to create an Ember Addon? At this time, I was given such opportunity, and I want to share how I created Ember Addon.
create an addon folder by running ember addon <NAME>
, in my case, the name is stupid-switch
. ember addon stupid-swtich
Go to package.json
to remove ember-welcome-pag from devDependencies
and add "ember-cli-htmlbars": "^1.1.1"
(your version may vary) to dependencies
. You may need to run rm node_modules/ember-welcome-page
if installed perviously.
Now, run ember s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
var util = require('util') | |
function test (inherits) { | |
function Fruit () { | |
} | |
Fruit.prototype.round = false | |
Fruit.prototype.sweet = true | |
Fruit.prototype.eat = function () {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
var util = require('util') | |
function test (inherits) { | |
function Fruit () { | |
} | |
Fruit.prototype.round = false | |
Fruit.prototype.sweet = true | |
Fruit.prototype.eat = function () {} |