localStorage只存字符串。
angular5 已經(jīng)深陷 出不來了
if (typeof callback === "function") callback.call(this, d)
發(fā)現(xiàn)高版本的android使用這個的時候會閃退
嘗試使用RNFS 卻會出現(xiàn)問題, 還在解決中
July 13
昨天剛好用到,直接保存就好了,就是用的 CameraRoll 上網(wǎng)找篇文章學著配置就行了,沒什么難度。
writing-mode 了解一下
<!DOCTYPE html>
<html>
<head>
<style>
#mainBox {
border: 1px #f00 solid;
width: 300px;
height: 250px;
writing-mode: tb-lr;/*IE寫法*/
writing-mode: vertical-lr;
}
#mainBox a {
margin: 5px;
padding: 0px;
display: inline-block;
width: 30px;
height: 30px;
border: 1px #00f solid;
writing-mode: lr-tb;
}
</style>
</head>
<body>
<div id="mainBox">
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">7</a>
<a href="#">8</a>
<a href="#">9</a>
<a href="#">10</a>
</div>
</body>
</html>files是數(shù)組,要循環(huán)append
for(var i = 0;i < this.file.length;i++){
formData.append('file[]', this.file[i]);
}this.goodsList.push(...__goodsList)這里不能使用push,vue不能監(jiān)聽不存在的屬性,可以使用set或$set
問題解決了。
需要把base64的圖片再轉(zhuǎn)為普通圖片上傳。
可以節(jié)約系統(tǒng)資源,對于一些需要頻繁創(chuàng)建和銷毀的對象,單例模式無疑可以提高系統(tǒng)的性能。
類似于 懶加載
const manage_routes: Routes = [
{ path: 'manage', redirectTo: 'manage/dashboard_conf', pathMatch: 'full' },
{ path: 'manage/dashboard_conf', component: DashboardConfComponent },
{ path: 'manage/image_upload', component: ImageUploadComponent },
{ path: 'manage/image_conf', component: ImageConfComponent }
]
寫錯了,應該是上面的路由列表。
Angualr2是支持路由多次重定向的。
你可以自己輸入和輸出來擬合函數(shù)啊,都有那么多參照點了。
也就是會說你輸入一個標準照片,分別采用各種濾鏡得到輸出照片,根據(jù)原始和輸出數(shù)據(jù)的關(guān)系,就可以擬合一個濾鏡函數(shù)出來(可能有誤差的)
有沒有人知道啊
replace第一個參數(shù)傳一個全局模式的正則就可以了
function searchs(str, match, replace) {
const reg = new RegExp(match, 'g')
return str.replace(reg, replace)
}
const str = 'Lorem ipsum dolor sit a met a';
const result = searchs(str, 'a', '<i>a</i>')
console.log(result)
// Lorem ipsum dolor sit <i>a</i> met <i>a</i> name: {
textStyle: {
color:'red'
}
},格式問題,用int轉(zhuǎn)一下試試
homebrew可以從git倉庫中下載。formule沒有就去git倉庫下
以前做開發(fā)的時候用到過百度,它的so庫不怎么齊全,老是出bug。后來就改用高德了
PureComponent的本質(zhì)是幫你寫了一個shouldComponentUpdate,做一層淺比較,實現(xiàn)渲染時優(yōu)化。
如果是簡單類型的比較,就不用自己寫shouldComponentUpdate了。
需要注意的是:PureComponent和shouldComponentUpdate不能共存
import { ClubCodeGuard } from './../../../guards/club-code.guard';
import { EnrollMemberComponent } from './../enroll-member.component';
import { Router, ActivatedRoute } from "@angular/router";
import { EnrollMemberModule } from './../enroll-member.module';
import { MembershipService } from './../../../member/services/membership.service';
import { MemberForm } from './../models/enroll-member-form';
import { EnrollMemberPromotionsComponent } from './promotions.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DebugElement,Injectable,Component, OnInit, NgModule, ViewChild } from '@angular/core';
import { ComponentFixtureAutoDetect } from '@angular/core/testing';//自動變更檢測
import { async } from '@angular/core/testing';//異步的beforeEach
import { Member } from 'app/member/models/member';
import { FormsModule } from '@angular/forms';
import { ToastrModule } from 'ngx-toastr';
import { Observable, BehaviorSubject } from 'rxjs/Rx';
import { ProformaInvoiceComponent } from 'app/member-prospect-manager/enroll-member/proforma-invoice/proforma-invoice.component';
import { ClubService } from 'app/club/services';
import { HttpModule, Http } from '@angular/http';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { HandleErrorService } from '../../../shared-services/handle-error.service';
import { AccessTypeService } from '../../../club/services/access-type.service';
import { MemberService } from '../../../member/services/member.service';
import { CurrentUserService } from '../../../user/services/current-user.service';
import { GetCurrentUserService } from '../../../user/services/get-current-user.service';
import { PromotionService } from 'app/promotions/services/promotion.service';
import { FormService } from 'app/membership/services/form.service';
import { RouterTestingModule } from "@angular/router/testing";
import { EnrollMemberMembershipTypeComponent } from 'app/member-prospect-manager/enroll-member/membership-type/membership-type.component';
import { EnrollMemberMembershipInfoComponent } from 'app/member-prospect-manager/enroll-member/membership-info/membership-info.component';
import { EnrollMemberReviewAndPayComponent } from 'app/member-prospect-manager/enroll-member/review-and-pay/review-and-pay.component';
import { EnrollMemberConfirmationComponent } from 'app/member-prospect-manager/enroll-member/confirmation/confirmation.component';
describe('when navigate to promotion selecte', () => {
let component: EnrollMemberPromotionsComponent;
let fixture: ComponentFixture<EnrollMemberPromotionsComponent>;
let de: DebugElement;
let el: HTMLElement;
let location: Location;
let router: Router;
let mockAR: any = {
params: {
subscribe: function() {
console.log('Subscribed.');
Observable.of({ id: 123 });
}
}
}
let mockRouter = {
navigate: jasmine.createSpy('navigate')
}
beforeEach(async () => {
TestBed.configureTestingModule({
providers: [
MembershipService,
ClubService,
HandleErrorService,
AccessTypeService,
MemberService,
GetCurrentUserService,
PromotionService,
CurrentUserService,
Router,
ActivatedRoute,
FormService,
{ provide: Router, useValue: mockRouter }
],
imports: [
FormsModule,
EnrollMemberModule,
HttpClientModule,
HttpModule,
ToastrModule.forRoot(),
RouterTestingModule.withRoutes([
{
path: 'tab',
component: EnrollMemberComponent,
data: {
title: 'EnrollMemberComopnent',
iconClass: 'fa fa-bullhorn'
},
canActivate: [ClubCodeGuard],
children: [
{
path: '',
redirectTo: 'membership-type',
pathMatch: 'full'
},
{
path: 'membership-type',
component: EnrollMemberMembershipTypeComponent,
data: { title: 'EnrollMemberMembershipTypeComponent', iconClass: 'fa fa-bullhorn' },
canActivate: [ClubCodeGuard]
},
{
path: 'membership-info',
component: EnrollMemberMembershipInfoComponent,
data: { title: 'EnrollMemberMembershipInfoComponent', iconClass: 'fa fa-bullhorn' },
canActivate: [ClubCodeGuard]
},
{
path: 'promotions',
component: EnrollMemberPromotionsComponent,
data: { title: 'EnrollMemberPromotionsComponent', iconClass: 'fa fa-bullhorn' },
canActivate: [ClubCodeGuard]
},
{
path: 'review-pay',
component: EnrollMemberReviewAndPayComponent,
data: { title: 'EnrollMemberReviewAndPayComponent', iconClass: 'fa fa-bullhorn' },
canActivate: [ClubCodeGuard]
},
{
path: 'confirmation',
component: EnrollMemberConfirmationComponent,
data: { title: 'EnrollMemberConfirmationComponent', iconClass: 'fa fa-bullhorn' },
canActivate: [ClubCodeGuard]
}
]
},{
path: '',
redirectTo: 'tab',
pathMatch: 'full'
}
])
]
}).compileComponents(); // compile template and css
router = TestBed.get(Router);
location = TestBed.get(Location);
fixture = TestBed.createComponent(EnrollMemberPromotionsComponent);
router.initialNavigation();
});
beforeEach(() => {
router = TestBed.get(Router);
location = TestBed.get(Location);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學校辦產(chǎn)業(yè)為響應國家深化產(chǎn)教融合/校企合作的政策,積極推進“中國制造2025”,實現(xiàn)中華民族偉大復興的升級產(chǎn)業(yè)鏈。利用北京大學優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓領(lǐng)域的先行者
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務(wù)負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。