|
What do you do when you detect your get request is broken or is passing wrong types of data? Say you have a forum-page.php?forum=3 that lists all the topics related to forum 3.
What would be a good way to deal with the absence of the "forum" variable?...
Started by Mr Goma on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For wrong non-essential variables that may be mistyped, fail ....
My view is to try the following:
For wrong/missing required variables, throw (forum-page.php) and show the error in a error box at the top of the page.
To stop this behavior.
|
|
I have a project Foo which I errantly created the wrong tag for. It should've read 'rMMDDYYYY' but I tagged it 'YYYYMMDD' instead. I realized my mistake after having commited my change. I now want to remove the YYYYMMDD folder under the tags directory...
Started by freakwincy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If you have tortoisesvn its as simple as deleting the directory from the repo browser .
If you want to remove the directory, do this: svn rm foo/tags/YYYYMMDD
Just delete the tag you dont want and create afresh with the same name or a different name .
|
|
I wondered how Google find the exact word ,even if we mistyped it in search box. I want to know if such open source algorithm is available.?.
Thanks you.
Started by vipin k. on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Or if you're using java....
Check out Peter Norvig's How to Write a Spelling Corrector article .
Take a look at this Python Implementation of a suggester, which implements something similar (though no doubt not as clever as Google's) to what Google does .
|
Ask your Facebook Friends
|
When trying to install MySQL's python bindings, MySQLdb, I followed the instructions to build and install on my MacBook running Mac OS X 10.6 i386, and after entering the following line into the terminal:
user-152-3-158-79:MySQL-python-1.2.3c1 jianweigan...
Started by Wei on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Well the error is pretty clear, do you have xcode installed? http://developer.apple.com/tools/Xcode/
You can look at a more detailed solution to this in http://blog.some-abstract-type.com/2009/09/mysql-python-and-mac-os-x-106-snow.html which includes ... .
|
|
Hi, I'm working on an iPhone game written in Objective C (which I'm new to). The problem is that the views which are used to draw the sprites on screen are semi transparent. I have set the alpha to 1.0 and the opacity to True. I have also used NSLog to...
Started by Keith Loughnane on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://www.cocos2d-iphone.org/
Is the view to which you are referring a subview to another... .
Try a more game-oriented system like cocos2d.
I'm not sure why you are getting semi-transparent views, but I would suggest not using UIViews for an iPhone game .
|
|
Hello,
I have a solution with many projects. There is actually a Core project and a few plugins. I changed OutputPath for all plugins so all binaries end up in the Core bin\debug folder. (this is necessary as the Core do not have a reference on plugins...
Started by PowerKiKi on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This command....
That would prevent the confusion with output folders.
Rather than changing the output location of the plug-ins, what you could do is create a post-build script (Properties \ Build Events tab) for them that will copy the them to the Core folder .
|
|
I need to sanitize HTML submitted by the user by closing any open tags with correct nesting order. I have been looking for an algorithm or Python code to do this but haven't found anything except some half-baked implementations in PHP, etc.
For example...
Started by Baishampayan Ghose on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://www.crummy.com/software/BeautifulSoup/
using BeautifulSoup:
from BeautifulSoup import BeautifulSoup....
Beautiful Soup works great for this.
Try to code it by hand and you will want to gouge your eyes out .
Run it through Tidy or one of its ported libraries .
|
|
I have an ASP MVC form which updates a business object and then its action goes to another page.
Both of these pages have a textarea with an id "Description", when it goes to the other page, for reasons unknown it fills in the values which were entered...
Started by qui on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
<p><label>Description</label><br /><br /><%=Html.TextArea(....
Which method are you using to update your object? Have you tried adding the object type name in the ID?
Like, Product.Description instead of just Description .
|
|
Hello, I'm having a problem that's intriguing me. I decided make a few changes (in a link and inserting metatags) in the index.php file from my company's site: http://www.expresssignproducts.com and after I uploaded the header pictures were all misaligned...
Started by Eduardo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
<div id="Header"> <script.......
I see in the source:
</head> <body onload="MM_preloadImages...
1) There are two <body> tags.
A few problems...
Maybe you switch the Compatibility View on (by accident ;)
Double check your settings .
|
|
So I have a non-jquery solution to this problem, but I would rather use jquery if there is a way, and also I am very curious as to why this is happening.
What is going on is I have a facebook iframe application, and I am using facebox to dynamically load...
Started by jtymann on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You can try adding the stuff as text rather than HTML using jquery ... .
I'm hazarding a guess that the function should be looking for simple text .
As you are using FB.XFBML.Host.parseDomElement(document.getElementById('facebox')); to parse the added html .
|