I'm working with code igniter and for some reason, the url http://mysite.com/account/100 gives me a 404 error. Here's what my controller looks like.
class account extends Controller {
function account()
{
parent::Controller();
}
function index()
{
echo $this->uri->segment(2);
}
Any idea what's wrong?
I allow the user to record a video within my app, then later play it again. When a user records a video, I save the URL of the video, then play the video later from the saved URL. I save the video both in the Photos app and in my app. If I delete the video within the photos app, it still plays. After about 7 days, the video gets deleted. I think I am saving in my tmp directory, but i'm not sure. Here is what I am doing:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];
[self dismissViewControllerAnimated:YES completion:nil];
// Handle a movie capture
if (CFStringCompare ((__bridge_retained CFStringRef) mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) {
NSString *moviePath = [NSString stringWithFormat:@"%@",[[info objectForKey:UIImagePickerControllerMediaURL] path]];
NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL];
NSData *videoData = [NSData dataWithContentsOfURL:videoURL];
_justRecordedVideoURL = [NSString stringWithFormat:@"%@",videoURL];
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
_managedObjectContext = [appDelegate managedObjectContext];
Video *video = [NSEntityDescription insertNewObjectForEntityForName:@"Video" inManagedObjectContext:_managedObjectContext];
[video setVideoData:videoData];
[video setVideoURL:[NSString stringWithFormat:@"%@",videoURL]];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateStyle = NSDateFormatterLongStyle;
[dateFormatter setDateStyle:NSDateFormatterLongStyle];
NSDate *date = [dateFormatter dateFromString:[dateFormatter stringFromDate:[NSDate date]]];
NSString *dateAdded = [dateFormatter stringFromDate:date];
[video setDate_recorded:dateAdded];
if(_currentAthlete != nil){
[video setWhosVideo:_currentAthlete];
}
NSError *error = nil;
if(![_managedObjectContext save:&error]){
//handle dat error
}
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *tempPath = [documentsDirectory stringByAppendingFormat:@"/vid1.mp4"];
BOOL success = [videoData writeToFile:tempPath atomically:NO];
if(success == FALSE){
NSLog(@"Video was not successfully saved.");
}
if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath)) {
UISaveVideoAtPathToSavedPhotosAlbum(moviePath, self,
@selector(video:didFinishSavingWithError:contextInfo:), nil);
}
}
}
Am I saving it incorrectly? When I go to play the video, it works fine, after a couple days the video will play without audio, then eventually it will be gone. Any ideas why?
Is it possible in any possible way to add to/change the .application file (or any other way) of a ClickOnce deploy file to allow parameters to be specified without the need for the parameters to be passed via the URL?
The assembly can be compiled at run time/resigned/etc, or stated otherwise, I am not worried about the bounds of "what else" I would have to do.
Hello,
just a quick question :
var h = $('#hebergeurJQUERY').val();
var t = $('#typeJQUERY').val();
function requestData() {
$.ajax({
type: "GET",
url: '12months/months.php',
data : "hosting="+h+"&type="+t+"",
......
doesnt work while
data : "hosting=Something&type=Something",
Works.
Any idea to something stupid i did (again ?)
;)
Thanks
I am writing a java servlet (struts/JSP etc). I am trying to style a progress bar using CSS in a JSP page but get this error when using chrome's developer tools:
Resource interpreted as image but transferred with MIME type text/plain.
<%@ include file="../include/css/default.css" %
And in the CSS file:
background:url(../images/bg_bar.gif) no-repeat 0 0;
Could anyone explain why this is and show how I can use this CSS in my page?
Hello there,
As you may know, res.sendRedirect(url) on the servlet side does not work because the GWT client does not process it.
Does anybody knows how to do this?
Thanks you.
Daniel
What will be proper regular expression for git repositories?
example link:
[email protected]:someone/someproject.git
so it will be like
server can be url or ip
Project can contain some other characters than alphanumeric like '-'
I'm not sure what is the role of '/'
any suggestions?
Are there any tool for monitoring HTTP responses? so open such tool up. give it URL. And it goes to it and brings you back not only body of http response but all http response.
I would like to use a switch for the layout of paragraph tags on a webpage.
I use the after pseudoelement
p:after {content: url("../img/paragraph.gif");}
Now i need to remove this css code from the page. How can this be done easily (jquery is already used on the page)? (i do not want to include or remove files containing css)
I have a website tracked using Google Analytics. It is a Django-based website, so all the URLs are "friendly" URLs (e.g., /my/friendly/url/) and don't have associated files like index.html, etc. Should the "default page" option in Google Analytics be left blank or set to /?
I need to make available to browsers data file produced by my web service method. Indeed the web service method should return url to produced file. Im working with axis2 on tomcat.
s
Thanks in advance.
Hi ,
I am doing the small application for link exchange,
so before i approve the URL , i want to check his/her site page rank,
I know , there some site tell the Google page rank position ,
But am looking some API , for page rank checking...
Thanks
Bharanikumar
How can I set the background-image css property of say a div using jquery? will something like this work?
$("#div").css("backgroundImage", "url('test.jpg')");
I'm trying to develop an application using UIWebView. The app is loading remote URL's, so in order to make it quick I want it to use the images included in the application bundle. I was wondering if there is a way to do it without forcing the application to manually replace the address of each image to point into local resources?
Im trying to display a loading gif before submitting a multipart-form (file upload), this is my code.. but the image is not displaying.. if i remove the submit() it displays, so.. is not a path or syntax problem.
$('#btnSubmit').click(function() {
document.getElementById('loader').innerHTML = "<img src='<?= url::base() ?>themes/img/loading.gif' border='0' />";
$('#uploadform').submit();
});
Hi,
I installed wamp server on xp. During the installation it did not show any error/warning message.
Then i start it & type http://localhost/ in url bar but it just show a blank page.
I also checked
notepad C:\WINDOWS\system32\drivers\etc\hosts
their is no restriction for localhost.
Help.
Thanks...
In Ruby on Rails,
http://localhost:3000/foobars/alt/1
works
but
http://localhost:3000/foobars/alt/1.xml
doesn't work.
config/route.rb is
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
so supposedly it supports an id.format in the URL?
I have a small rails app that has default scaffold generated routes eg. /stadia/1.xml. However I have to support legacy client app that can't construct such URLs correctly. What I need to do is to map URL in the form:
/stadia?id=1?format=xml to /stadia/1.xml
Or even something like:
/myApp?model=<model_name>?id=<id>?format=xml to /<model_name/<id>.xml
Is it possible to craft appropriate route in Rails?
http://www.kampyle.com/ in this url when you scroll one picture always moves. i want to know this process name.how can they do it. after click this picture it's vanish and never appear even refresh the page.How they get information i click this picture .it will be helpful for me if some one give me the solution .
Hi,
I am aware of this question already existing, but it has given me no luck.
I have an application which loads a physicial XML document via the following method:
jQuery.ajax( {
type: "GET",
url: fileName,
dataType: "xml",
success: function(data) {
etc...
I parse the XML and convert it into a string which is saved into a variable so that it can easily be stored in a database. How can I now convert the data in this variable back into an XML object so that it can be parsed as such?
Hello,
I am trying to grab a value from a url:
http://localhost:8080/bin/task_status?id=2&cmd=percent_done
I am unsure how to actually do this within a javascript (ajax) command that once the page has been loaded will be called every .5 seconds. It is using the AJAX built in progress bar to display.
Hi, i want to make a facebook flash app. Now im trying to make it possible to invite your friends to the app. I want to do this from within actionscript without the user having to leave the app.
The ideal solution would be to make a custom interface show possible invites and then doing some URL request containing the friends id's
Anyone have any idea how to solve this or if its even possible ?