so the problem is, i have a contenteditable div, with a keyup function binded.
everytime somebody puts a youtube url in it, it has to be replaced by an embedded movie.
i came up with a regex like this :
content.match(/http:\/\/\w{0,3}.?youtube+\.\w{2,3}\/watch\?v=.*?(?=\s)/g);
firefox wil do the replace after a whitespace, but in ie it won't work.
any suggestions?
thnx in advance!
Hi I have the address of a property and my application can launch a browser to go to http://maps.google.com?q=searchStringHere. If a good match is found it will take it directly there. Is there any thing I can append to the url to make it switch to streetview without having the exact coordinates? I dont't want to code any javascript or flash.
I have a field URL countryURL; in a Country class. I want to store its data into a COUNTRY table in a database through Hibernate.
Which Hibernate type I should use in the hibernate mapping file
<property column="COUNTRY_URL" name="countryURL" type="..."/>
It is not excepting string and text type.
Is it possible to set a base url on a page with a relative value?
For example, I have two websites (website A and website B). For Website B it will be located at www.website-a.com/website-b. So could I set the BASE href as '/website-b/'?
Thanks
I would like to rewrite dynamic URL
/index.php?pid=login&redirect=/previous-page.html
to something like this
/login.html-r-previous-page.html
I tried this
RewriteRule ^login.html-r-(.*)$ /index.php?pid=login&redirect=$1 [L]
But no succes. I was also trying to change the regex to .+ or some other forms, but it seems useless. Maybe I am making mistake somewhere else.
I am new to regular expressions and also mod_rewrite.
Thank you for help
Hi,
I am trying to make a call button that will call 18 which is Fire Dept in France.
So my code is :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://18"]];
It doesn't work and I get this message in the console :
< warning Ignoring unsafe request to open URL tel://18
But I saw other application that have the same button fully working !
I am trying this on the device of course.
What am I missing ?
Hello, I want to download a .mp3 file on a Website with NSSURLConnection on IPhone,
This .mp3 URL of the file is:
http://dl.mp3.kapsule.info/fsfsdfdsfdserwrwq3/fc90613208cc3f16ae6d6ba05d21880c/4b5244f0/b/7e/b7e80afa18d06fdd3dd9f9fa44b51fc0.mp3?filename=Every-Day-I-Love-You.mp3
When I built my app, it run OK. My app downloaded the .mp3 file successful and then played it. However, after a few days, I run my app again, the app can't downloaded the .mp3 file.
How can I download the .mp3 file all the time?
Thank you very much.
Hi,
I've got this regex (I'm not good at it) /http://www.youtube.com/watch?v=[a-zA-Z0-9_]/i it has to match any youtube watch url (because youtube always redirects to that domain)... It should match http://www.youtube.com/watch?v=iMXCqgWjpL8 but it doesn't.
Can someone help me?
Regard,
dodo
I have a desktop forms application . I want to fetch any flash file embedded from a given html page. I used this approach: parse the html page(using htmlagilitypack) to get hold of direct url of any embedded flash, then fetch the file. But this approach wouldn't work if relative paths are used.
How else can a flash file embedded in an html page be downloaded ?
ty
can anyone see why this wouldn't be working. Fairly new to django so any help would be much appreciated
actual url:
http://127.0.0.1:8000/2010/may/12/my-second-blog-post/
urls.py:
(r'(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blog/detail.html')),
In url query with id I use is_numeric($_GET['id']) for security issues. But in query with for example category name, is urlencode() a right way for security?
Thanks in advance.
URL's are posting in address bar however all pages show up as the home page. I tried to add a document to the documents tab and after seeing inheritance overrides I canceled out of it and now all the pages post the home page.
Hello,
I have a simple hit counter written in c# .net. I placed that counter to many pages using the pageviewerwebpart. What I want to do is, not only counting the hits, but also which page triggered the hit counter. So how can I retrieve the page URL with my hit counter ?
Thanks.
i have used facebook connect in my site but it is not working properly. when i click on facebook connect button it shows popup after that when i enter my login and password it shows the callback url in the same popup.
Using jquery, when a button is clicked (server side), I want to append #button to the url.
This will only be used when there is validation errors, I want the browser to scroll to the bottom where the button is.
I already tried MaintainScrollPositionOnPostback but it doesn't work here since the validation rows are made visible upon clicking the button.
Beside query string root folder
how do i get the current doc library list(ListName) from below example url
http://site/subsite/ListName/Forms/AllItems.aspx
any standard way?
Ok so i'm executing the following line of code in javascript
RegExp('(http:\/\/t.co\/)[a-zA-Z0-9\-\.]{8}').exec(tcont);
where tcont is equal to some string like 'Test tweet to http://t.co/GXmaUyNL' (the content of a tweet obtained by jquery).
However it is returning, in the case above for example, 'http://t.co/GXmaUyNL,http://t.co/'.
This is frustracting because I want the url without the bit on the end - after and including the comma.
Any ideas why this is appearing? Thanks
I must have done something, but am going crazy trying to find my mistake.
After my last upload now all my url's are pointing to localhost:3000 instead of the site.
It was working before. :(
I have a website on GoDaddy. All permissions are set correctly and the image DOES exist. However when the page loads the image for the item selected does not show. Here is my code
imagepath = "~/spaimages/" + currentSpaModel.Name.ToString() + ".png";
if (File.Exists(Server.MapPath(imagepath)))
{ this.spaimage.ImageUrl = Server.MapPath(imagepath); }
spaimage is an ASP control and thr URL that the image is set to is D:\hosting\xxxxxxx\calspas\spaimages\modelname.png
What am I doing wrong.
I have an xsd file Foo.xsd. I tried to refer it in a WSDL file as
But when I try to access the wsdl url using browser I am getting the following error.
org.codehaus.xfire.XFireRuntimeException: Couldn't find schema part:
I am using xFire 1.2.6 for generating webservices.
Any input would be appreciated!
hi
i am using GZIP for the compression and its working fine but the problem came when the URL's are dynamic (e.g Default/template_css.php?w=310&h=237&sw=200&ct=fpss-container2). I am using Php .
Thanks