With the recent establishment of the ability to lend ebooks with the Kindle and the Nook, several 'swap clubs' have sprung up around the net where you can make your ebooks available for lending and borrow ebooks from others. I've tried three of the services and have found that they all work, although the last one I've tried has been FAR more successful.
Booklending.com (formly Kindlelending.com until Amazon complained about their trademark). This is a pretty good service. It operations on a 'push' principle. When you log in you register what books you are interested in, and then wait for someone to send them to you. When you make your books available it will show if anyone is waiting for those books and offer up to 3 people that you can send to.
It has a limited ability to see which books are available for lending, but no real strong search capabilities. I've received several books from here and it works OK.
I've also lent books from this site. When you lend a book it opens Amazon in a frame and you can then use the Amazon lending capabilities to send your book out. When you list the books you have available you have to manually enter them.
http://www.lendink.com/ Lendink is another site, it has an advantage in that you can see what books are available and search by genre. It operates on a 'pull' principle. When you see a book you are interested in you can click it and the site will send an email to the owner of the book that you are interested in lending it.
I've also lent books through this service. It operates very similarly to the booklending.com site. When you list the books you have available you have to manually enter them.
This site supports both Nook and kindle books.
Finally the last and best site is:
lendle.me
This is the latest site I've tried. Unlike the other sites you have to enter your books before you can borrow from it. It provides a bookmark that runs a script on your Amazon page to parse out which books you have available. It then saves all of those and figures out which ones are lendable.
It gives you two credits (loans) to start, and then as you register books it gives you more. I had 10 credits after I parsed out my books.
For the previous sites you want to request many books, you don't have a good hit ratio. However for lendle.me I had a 7 out of 10 books lent to me in less than 48 hours, I had requested several because based on the other sites I expected to only get 2-3 hits with 10 requests. Lendle.me seems to have a wider selection of books (probably because it parses them from Amazon). I can generally read a book in 2 days, so I'm going to have to stop requesting just to keep up.
If you are borrowing Kindle books, I recommend lendle.me, if you are borrowing Nook books then lendink is your choice. However it doesn't hurt to be on all 3 sites to maximize your borrowing and lending chances.
I've been using the lending services to borrow books that I would check out of a library. I've added some new authors to my 'buy list' after doing so. It stretches my dollars and makes me more likely to take a chance, you can borrow the first book in a series and see if you want to be spending your money on the rest.
Friday, March 18, 2011
Monday, March 14, 2011
Application not picking up changes in a static library
I recently wasted a lot of time, I was attempting to modify a class in a static library, and no matter what I did, it would NOT work. Eventually I added some log statements and they didn't show up, although old ones did.
I found that when I made modifications to my static library the main application was not relinked.
For my WallPaperEdit application, I found that the main executable was WallPaperEdit in the directory
/Users/myusername/Library/Developer/Xcode/DerivedData/WallPaperEDit_randomLetters/Build/Products/Debug-iphonesimulator/WallPaperEdit.app
When I made a change in my static library, it was not being picked up for this, and it was not being relinked. Even doing a clean did not work.
If I modify a file in my main library, then it recompiles and relinks this, and my new change is picked up. I'm going to use that as a workaround for now, and then try and find the build setting that makes this behavior as it properly does.
While XCode4 says it supports automated dependencies between multiple projects, I've found that it can sometimes be painful.
I found that when I made modifications to my static library the main application was not relinked.
For my WallPaperEdit application, I found that the main executable was WallPaperEdit in the directory
/Users/myusername/Library/Developer/Xcode/DerivedData/WallPaperEDit_randomLetters/Build/Products/Debug-iphonesimulator/WallPaperEdit.app
When I made a change in my static library, it was not being picked up for this, and it was not being relinked. Even doing a clean did not work.
If I modify a file in my main library, then it recompiles and relinks this, and my new change is picked up. I'm going to use that as a workaround for now, and then try and find the build setting that makes this behavior as it properly does.
While XCode4 says it supports automated dependencies between multiple projects, I've found that it can sometimes be painful.
Tuesday, February 15, 2011
Apple's new subscription model.
I'm seeing a lot of reports on Apple's new subscription model. Providers that provide content that is purchased outside the app store now has to provide a 'in app purchase' to get that material, costing 30%. This is a killer, move on Apple's part, and if they enforce it you can say goodbye to Kindle, Nook, Netflix, etc... The companies can't afford to take this cut.
With the agency model for ebooks, 5 out of 6 of the big publishers in the US now set their prices for their ebooks. When Amazon sells one of these ebooks, it gets 30% of the list price, and the publisher gets 70% of the list price. By the contract Amazon can NOT change this price.
If they were to make this available as an in-app purchase, then Apple would get 30%, the publisher would get 70%, and Amazon would get nothing. Obviously Amazon will not go for this.
I wonder if Apple is attempting to push all other ebook providers off the App Store, or if it is just rattling cages. If they do push all other ebook providers off, then I might have to reconsider using the Apple Ecosystem. I have NO desire to use iBooks, and will never use it. It ties me to one device, and Apple has just shown how unwise that is.
This seems like a foolish move now that serious iPhone contenders are on the horizon, between Android, and now Windows 7 (with the Nokia deal), IOS could have some troubles. I would rather be using the Windows 7 toolset instead of IOS, however the market is not currently there.
With the agency model for ebooks, 5 out of 6 of the big publishers in the US now set their prices for their ebooks. When Amazon sells one of these ebooks, it gets 30% of the list price, and the publisher gets 70% of the list price. By the contract Amazon can NOT change this price.
If they were to make this available as an in-app purchase, then Apple would get 30%, the publisher would get 70%, and Amazon would get nothing. Obviously Amazon will not go for this.
I wonder if Apple is attempting to push all other ebook providers off the App Store, or if it is just rattling cages. If they do push all other ebook providers off, then I might have to reconsider using the Apple Ecosystem. I have NO desire to use iBooks, and will never use it. It ties me to one device, and Apple has just shown how unwise that is.
This seems like a foolish move now that serious iPhone contenders are on the horizon, between Android, and now Windows 7 (with the Nokia deal), IOS could have some troubles. I would rather be using the Windows 7 toolset instead of IOS, however the market is not currently there.
Friday, December 17, 2010
Side Track: Unreal Development Kit
OK, I've been working (slowly) over the last month on refactoring my flow, but I'm not ready to post stuff. However I decided that I was going to download the Unreal Development Kit and see if I could get 'Epic Citadel' to compile and install my own version. Step 1 is to boot up a windows box and download the development kit. It's a 1.1 GB download.
The UDK is Windows only, but interestingly enough it can send data directly to your iphone for testing and running. For submission to the developer program you need to use your Mac. I'm not sure if that means you can't use Objective-C stuff directly in it, probably not.
It was trivially easy to get stuff running on the iPhone. I installed the application, started the Mobile Editor, and used their sample map. I then ran play install on iOS device, and it prompted me for my provisioning certificate, my developer certificate and for some plist information. I just moved those over from my mac, and boom I had a level running on my iPhone 4.
I don't have much knowledge of the unreal editor, I played with the very first version when Unreal first came out. It looks like a non-trivial learning curve, however for those with skills creating models, textures and scripting, I think getting a really nice game has just become a lot easier. I look forward to a good game in the Epic Citadel map. (If I read their licensing terms correctly, you can use those models in your game, your milage may vary, I'm not a lawyer.) (Infinity blade is OK, but not my style of game).
Epic did a great job of getting a third party editor working with iOS. I'm sure there are pitfalls in moving forward with a real game, but the first impressions are VERY impressive.
(Epic requires the following text when writing documentation about using the Unreal Development Kit, since they are providing this for FREE, I think it's quite reasonable to comply with their legal requirements.)
Note this blog post is not endorsed by Epic games.
Unreal Development Kit (UDK) © 2009, Epic Games, Inc. Epic, Epic Games, Gears of War, Gears of War 2, Unreal, AnimSet Viewer, AnimTree Editor, Unreal Cascade, Unreal Content Browser, Unreal Development Kit, Unreal Editor, Unreal Engine, Unreal Kismet, Unreal Lightmass, Unreal Matinee, Unreal PhAT, UnrealScript and Unreal Tournament are trademarks or registered trademarks of Epic Games, Inc. in the United States of America and elsewhere. All other trademarks are the pr
The UDK is Windows only, but interestingly enough it can send data directly to your iphone for testing and running. For submission to the developer program you need to use your Mac. I'm not sure if that means you can't use Objective-C stuff directly in it, probably not.
It was trivially easy to get stuff running on the iPhone. I installed the application, started the Mobile Editor, and used their sample map. I then ran play install on iOS device, and it prompted me for my provisioning certificate, my developer certificate and for some plist information. I just moved those over from my mac, and boom I had a level running on my iPhone 4.
I don't have much knowledge of the unreal editor, I played with the very first version when Unreal first came out. It looks like a non-trivial learning curve, however for those with skills creating models, textures and scripting, I think getting a really nice game has just become a lot easier. I look forward to a good game in the Epic Citadel map. (If I read their licensing terms correctly, you can use those models in your game, your milage may vary, I'm not a lawyer.) (Infinity blade is OK, but not my style of game).
Epic did a great job of getting a third party editor working with iOS. I'm sure there are pitfalls in moving forward with a real game, but the first impressions are VERY impressive.
(Epic requires the following text when writing documentation about using the Unreal Development Kit, since they are providing this for FREE, I think it's quite reasonable to comply with their legal requirements.)
Note this blog post is not endorsed by Epic games.
Unreal Development Kit (UDK) © 2009, Epic Games, Inc. Epic, Epic Games, Gears of War, Gears of War 2, Unreal, AnimSet Viewer, AnimTree Editor, Unreal Cascade, Unreal Content Browser, Unreal Development Kit, Unreal Editor, Unreal Engine, Unreal Kismet, Unreal Lightmass, Unreal Matinee, Unreal PhAT, UnrealScript and Unreal Tournament are trademarks or registered trademarks of Epic Games, Inc. in the United States of America and elsewhere. All other trademarks are the pr
Monday, October 25, 2010
Cloud Storage Dropbox vs Sugarsync
Recenlty I started thinking about backups and decided to use cloud storage to help keep things up to date. Right now I'm testing two services out to see how they work. I'm using the free version, source is pretty small, but might upgrade to a paid service if its good enough.
The two services I'm testing are Dropbox and sugarsync.
Dropbox
Dropbox is one of the most common ones out there. You establish a single directory on your system and then the dropbox application will monitor that directory and sync any files found to the cloud and other computers.
It's easy to set up, and comes with a 2GB initial size.
If I refer someone to dropbox both that person and myself get an extra 250 MB of space (up to an 8GB max). I should have found a referral link before signing up.
If you want a referral link, just follow:
Dropbox referal link
The iphone client is pretty nice and will even let you view your source files.
Sugarsync
This got good reviews and has one major advantage over dropbox. It can share ANY directory on your system. This is pretty good. In addition if some one is referral to the service by you, you and that person get 500 mb of extra space (not bad) really. 2 GB for free out of the box, another 500 mb for playing with it a little bit, and then one extra person signing up for a free account gives you 500 mb, with no upper limit.
If you are want to try it out follow this link:
Sugarsync referral
I wish I had found a referral link prior to signing up, it would have been extra space :)
Right now I'm trying out both DropBox and Sugarsync on the same files in the same directory. This is a nice dual redundant backup, and I can see how they work for me.
The iphone client lets you stream music, and view photos but doesn't let you view other files like DropBox does. I like the space and flexibility however.
The nice things about these is the service runs in the background and updates your files as you change them. They can even track history for you. Painless source control. Of course I would still run a real repository, but this is a good 'backup'.
I plan to run both services in parallel for a while to see which I like better.
The two services I'm testing are Dropbox and sugarsync.
Dropbox
Dropbox is one of the most common ones out there. You establish a single directory on your system and then the dropbox application will monitor that directory and sync any files found to the cloud and other computers.
It's easy to set up, and comes with a 2GB initial size.
If I refer someone to dropbox both that person and myself get an extra 250 MB of space (up to an 8GB max). I should have found a referral link before signing up.
If you want a referral link, just follow:
Dropbox referal link
The iphone client is pretty nice and will even let you view your source files.
Sugarsync
This got good reviews and has one major advantage over dropbox. It can share ANY directory on your system. This is pretty good. In addition if some one is referral to the service by you, you and that person get 500 mb of extra space (not bad) really. 2 GB for free out of the box, another 500 mb for playing with it a little bit, and then one extra person signing up for a free account gives you 500 mb, with no upper limit.
If you are want to try it out follow this link:
Sugarsync referral
I wish I had found a referral link prior to signing up, it would have been extra space :)
Right now I'm trying out both DropBox and Sugarsync on the same files in the same directory. This is a nice dual redundant backup, and I can see how they work for me.
The iphone client lets you stream music, and view photos but doesn't let you view other files like DropBox does. I like the space and flexibility however.
The nice things about these is the service runs in the background and updates your files as you change them. They can even track history for you. Painless source control. Of course I would still run a real repository, but this is a good 'backup'.
I plan to run both services in parallel for a while to see which I like better.
Thursday, September 16, 2010
Capturing part of an image from a UIImageView
I have a set of views over a picture and I wanted to pick the part of the picture under the views. I found some code on stack overflow that helped me extract the part of the photo I wanted, however when I used it, it seemed to be scaled improperly and showed up strangely.
I finally figured out that the reason was because the UIImageView scales the image, and I was using the view coordinates of the part I was interested to try and get the subimage from the picture. This means that when I'm choosing a number from 0-320 in the view and grabbing those coordinates from a 1200x1600 image. This meant that I was always in the top left part of the picture.
The following code seems pretty close (it might still be a little off) but at least it grabs stuff in the right vicinity. I wanted to solve this problem even though I'm currently planning to actually abandon the 'grab' screen and put on separate dialog approach. Instead I'm going to create an overlay and place it on top of the current view, allowing precise dynamic changes to occur.
I finally figured out that the reason was because the UIImageView scales the image, and I was using the view coordinates of the part I was interested to try and get the subimage from the picture. This means that when I'm choosing a number from 0-320 in the view and grabbing those coordinates from a 1200x1600 image. This meant that I was always in the top left part of the picture.
The following code seems pretty close (it might still be a little off) but at least it grabs stuff in the right vicinity. I wanted to solve this problem even though I'm currently planning to actually abandon the 'grab' screen and put on separate dialog approach. Instead I'm going to create an overlay and place it on top of the current view, allowing precise dynamic changes to occur.
- (UIImage*) getView:(CGRect )area
{
if (self.image==nil)
return nil;
if (self.image.image==nil)
return nil;
UIGraphicsBeginImageContext(area.size);
// we are using aspect fit, so we will be using which ever is the larger of these two scale factors.
float widthScaleFactor=self.image.bounds.size.width/self.image.image.size.width;
float heightScaleFactor=self.image.bounds.size.height/self.image.image.size.height;
float scaleFactor=widthScaleFactor;
NSLog(@"scale factors are height=%f width=%f",widthScaleFactor,heightScaleFactor);
if (widthScaleFactor
scaleFactor=heightScaleFactor;
CGRect drawRect=CGRectMake(-area.origin.x/scaleFactor, -area.origin.y/scaleFactor,
self.image.image.size.width,self.image.image.size.height);
UIImageOrientation currentOrient=self.image.image.imageOrientation;
CGRect destRect=CGRectMake(0, 0, area.size.width, area.size.height);
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextClipToRect(context, destRect);
[self.image.image drawInRect:drawRect];
UIImage* im=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return im;
}
Labels:
Code,
Debugging,
UIImageView
Colored RGB sliders, without a XIB
The next step of my refactoring was to modify the Colored View sliders so that they are independent of a .xib file so that I can place them into any view. This gives me a lot of flexibility and reduces some of the dependance of a xib in a dependent library.
In addition I found that when I programmatically created the sliders I could change the height and make it look somewhat nicer.
I revised the creation code so that it creates 4 sliders programmatically spaced within a passed in view. It sets up callbacks in the current routine.
When a color changes it calls a delegate with the changes.
In addition I found that when I programmatically created the sliders I could change the height and make it look somewhat nicer.
I revised the creation code so that it creates 4 sliders programmatically spaced within a passed in view. It sets up callbacks in the current routine.
When a color changes it calls a delegate with the changes.
- (void) loadView : (UIView *)viewToUse
{
NSLog(@"In loadView for ColorEditor");
// Don't use a nib.
self.leftMargin=10;
self.rightMargin=10;
self.spacing=5;
self.fontSize=10;
int labelWidth=74;
int labelHeight=21;
viewToUse.backgroundColor=[UIColor cyanColor];
if (currentColorSpace==nil)
currentColorSpace = CGColorSpaceCreateDeviceRGB();
NSArray *sliderLabels= [NSArray arrayWithObjects:NSLocalizedString(@"Red", @"Red"), NSLocalizedString(@"Green", @"Green"), NSLocalizedString(@"Blue", @"Blue"),NSLocalizedString(@"Transparency","Transparency"), nil];
NSLog(@"view height %f, width %f x %f, y %f",viewToUse.frame.size.height,viewToUse.frame.size.width,viewToUse.frame.origin.x,viewToUse.frame.origin.y);
int sliderHeight=(viewToUse.frame.size.height)/4-spacing;
NSLog(@"SliderHeight %d",sliderHeight);
for (int i=0;i<4;i++)
{
CGRect labelFrame=CGRectMake(0, (sliderHeight+spacing)*i+sliderHeight/2-labelHeight/2, labelWidth, labelHeight);
UILabel *label=[[UILabel alloc] initWithFrame:labelFrame];
label.adjustsFontSizeToFitWidth=true;
label.text=[sliderLabels objectAtIndex:i];
[viewToUse addSubview:label];
CGRect areaFrame=CGRectMake(leftMargin+labelWidth, (sliderHeight+spacing)*i,viewToUse.bounds.size.width-leftMargin-rightMargin-labelWidth, sliderHeight);
sliders[i]=[[UISlider alloc]init];
[sliders[i] addTarget:self action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged];
sliders[i].tag=i;
sliders[i].accessibilityLabel=[sliderLabels objectAtIndex:i];
NSLog(@"Y is %d",(sliderHeight+spacing)*i);
sliders[i].frame=areaFrame;
[viewToUse addSubview:sliders[i]];
}
[self calcColors];
}
and the calc colors is:
- (void) calcColors
{
for (int index=0;index<4;index++)
{
[self setSlider:sliders[index] colorIndex:index];
}
currentColor=[UIColor colorWithRed:colors[0] green:colors[1] blue:colors[2] alpha:colors[3]];
for (int index=0;index<4;index++)
{
// numeric fields are not implemented.
// textFields[index].text=[NSString stringWithFormat:@"%d",(int) (colors[index]*255)];
}
if (delegate!=nil)
{
[delegate colorChanged:currentColor];
}
}
This looks like:
Note that the sliders (the area in blue) is the only thing the code does. The rest is a custom frame done in a .nib. This enables me to embed the sliders in a view:
The .nib in interface builder looks like this:
Note that I have an image view under a label. This allows me to change the label and show what it looks like under the label.
The yellow area is my current color for the slider view. I set it to a unique color so that I can watch what is going on.
I'm allowing the font and background color to be set using the tab bar. This is not standard behavior for a tab bar, but it is allowable in a modal dialog. I have a 3rd tab that will eventually be used for a font choice.
The code for this is:
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
colorEditor=[[ColorEditor alloc]init];
isFont=true;
self.view.backgroundColor=[UIColor colorWithRed:0 green:0 blue:0 alpha:0];
}
- (void) initColors:(UIColor*) fColor background:(UIColor*) back text:(NSString*) textValue image:(UIImage*)background {
[colorEditor loadView:actionView];
colorEditor.delegate=self;
label.textColor=fColor;
label.backgroundColor=back;
label.text=textValue;
[colorEditor setCurrentColor:label.textColor];
backImage.contentMode=UIViewContentModeScaleAspectFit;
backImage.image=background;
}
- (void) colorChanged:(UIColor*) newColor
{
if (isFont)
label.textColor=newColor;
else
label.backgroundColor=newColor;
// Tell our delegate that we have our font colors changed.
[delegate styleChanged:label.textColor background:label.backgroundColor];
}
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item // called when a new view is selected by the user (but not programatically)
{
if (item==fontColor)
{
isFont=true;
[colorEditor setCurrentColor:label.textColor];
}
else
{
isFont=false;
[colorEditor setCurrentColor:label.backgroundColor];
}
if (label !=nil)
{
label.text=item.title;
}
}
@end
I can now change the color editor and use it to set both the background and foreground color of a font.
And the header for this defines another protocol that allows the foreground and background color to be set.
@protocol StyleChanged
- (void) styleChanged:(UIColor*) fontColor background:(UIColor*) backColor;
@end
@interface ColorEdit : UIViewController<UITabBarDelegate,ColorListener> {
IBOutlet UILabel *label;
IBOutlet UIView *actionView;
IBOutlet UIImageView *backImage;
ColorEditor *colorEditor;
IBOutlet UITabBarItem *fontColor;
IBOutlet UITabBarItem *backColor;
bool isFont;
id<StyleChanged> delegate;
}
@property (nonatomic,retain) IBOutlet UIImageView *backImage;
@property (nonatomic,retain) IBOutlet UILabel *label;
@property (nonatomic,retain) IBOutlet UIView *actionView;
@property (nonatomic,retain) ColorEditor *colorEditor;
@property (nonatomic,retain) IBOutlet UITabBarItem *fontColor;
@property (nonatomic,retain) IBOutlet UITabBarItem *backColor;
@property (nonatomic,retain) id delegate;
- (void) initColors : (UIColor*) fontColor background:(UIColor*) back text:(NSString*) textValue image:(UIImage*)background ;
Subscribe to:
Posts (Atom)
