Parse Automatic Backups provides a option to automate through a cron job the backup of a Parse
Requires composer
hg clone https://man@bitbucket.org/man/parse-automatic-backup
or download the zip and extract itcomposer install
Launch the index.php file in a web browser or in a cron job. That’s all folks!
https://bitbucket.org/man/parse-automatic-backup
This entry was written by Code and tagged backends, cloud computing, parse. Leave a comment or view the discussion at the permalink.
, posted on 18 Decembro, 2014 at 8:38, filed underThe audio pad app “Guerrilla Sample Box” is written using the ios 5 sdk and AVAudioPlayer class from AVFoundation.
The part of the code that deals with the audio pad interface and sound manipulation is located at PMPPlayViewController.m. The process of playing sounds is quite simple, and can be divided in 2:
First, a NSMutableArray is created, which holds several AVAudioPlayer objects, one per sound. They are initiated with a pathForResource.
Second, a playButtonPressed method is created, which is fired from buttons located at PlayView nib. Each time they are pressed all sounds are stopped, and the sound related to the tag property of the button starts playing.
#import "PMPPlayViewController.h" @interface PMPPlayViewController () @end @implementation PMPPlayViewController @synthesize statusText; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { sonsMutables = [NSMutableArray arrayWithCapacity:20]; NSError *error; nSons = 20; for (int i= 0; i<nSons; i++) { AVAudioPlayer *playerMutable; NSString *pathMutable = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"Sound_%ld", i] ofType:@"mp3"]; playerMutable = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:pathMutable] error:&error]; playerMutable.volume = 1.0f; [playerMutable prepareToPlay]; [playerMutable setNumberOfLoops:0]; [sonsMutables addObject:playerMutable]; } } return self; } - (void)viewDidLoad{ [super viewDidLoad]; } - (void)viewDidUnload{ [super viewDidUnload]; } - (IBAction)playButtonPressed:(id)sender{ UIButton *button = (UIButton*) sender; int toneIndex = button.tag; for(int i=0; i<nSons; i++){ [[sonsMutables objectAtIndex:i] stop]; } AVAudioPlayer *playerFinal; playerFinal = [sonsMutables objectAtIndex:toneIndex]; [playerFinal setVolume:1.0f]; if([playerFinal isPlaying]){ [playerFinal stop]; } playerFinal.currentTime = 0; [playerFinal play]; NSString *title = [sender titleForState:UIControlStateNormal]; statusText.text = [NSString stringWithFormat:@"%@ ...", title]; } - (IBAction)stopSounds:(id)sender { for(int i=0; i<nSons; i++){ [[sonsMutables objectAtIndex:i] stop]; } } @end |
SoundBOX (Guerrilla Samples Box) is a sound machine that can be used as a citizen tool é unha máquina de son que pretende servir como ferramenta cidadá. Contains chants hymns and other standards that can be heard in public events in Spain.
Almost all sounds were taken from recordings of Pedro Jimenez, Kamen, Chinowski (Tesladream), Grupo Numax and Edu Comelles, all of them were released at Mediateletipos.net as part of the “sound archive #spanishrevolution Yes, we klang!).
This entry was written by Code. Leave a comment or view the discussion at the permalink.
, posted on 25 Xuño, 2012 at 15:47, filed under