wilddogteam / demo-ios-drawing Goto Github PK
View Code? Open in Web Editor NEWdemo-ios-drawing是一个基于 Wilddog iOS SDK 开发的实时画图 demo,可多终端登录来一起画画,同步显示图画效果。
License: MIT License
demo-ios-drawing是一个基于 Wilddog iOS SDK 开发的实时画图 demo,可多终端登录来一起画画,同步显示图画效果。
License: MIT License
由于你们单次拉取数据有限制,想请教一个分页拉取数据的方案
I want to delete all datas under root node,here is my code:
- (void)clearDatas {
__weak __typeof(self) weakSelf;
[[[self.wilddog queryOrderedByKey] queryLimitedToFirst:5] observeEventType:WDGDataEventTypeValue withBlock:^(WDGDataSnapshot *snapshot) {
NSLog(@"%@",snapshot.value);
NSEnumerator *children = snapshot.children;
WDGDataSnapshot *next = children.nextObject;
while (next) {
[next.ref removeValue];
next = children.nextObject;
}
}];
}
This is a button event,I want to delete 5 pieces of data every time I click the button.But the problem is,when I first click the button,the snapshot returned contains 5 pieces of data,and I can delete them correctly.
But after the first time,the snapshot returned contains no data,the console shows:
2017-03-09 11:57:17.901947 Wilddog Drawing[5475:2673406] Not a valid path: / -> (null)
2017-03-09 11:57:17.902140 Wilddog Drawing[5475:2673406] (null)
So,there are two questions:
1 how to return correct data after first click.
2 I think deleting datas in this way is not elegant,is there a more convenient way to delete data under the root node?
The method is
self.childAddedHandle = [self.wilddog observeEventType:WDGDataEventTypeChildAdded withBlock:^(WDGDataSnapshot *snapshot) {...}];
When the the requested data is too big,the block won't be called.And the console show the following message:
"too_big, error reason:Data requested exceeds the maximum size that can be accessed with a single request
Data requested exceeds the maximum size that can be accessed with a single request."
In this case,what should I do to get the data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.