Only have to enter first word with Recaptcha - asp.net-mvc

I'm using Google's Recaptcha control, using MVC Recaptcha. The MVC Recaptcha component wraps the Google Recaptcha control. For some reason, the control allows the first word to be entered only, but the second word can be missing and incorrect, and this works fine. Not in all cases, but I have noticed it in one area of the application.
Any idea why this might be happening?

From http://www.google.com/recaptcha/learnmore
"The user is then asked to read both words. If they solve the one for
which the answer is known, the system assumes their answer is correct
for the new one. The system then gives the new image to a number of
other people to determine, with higher confidence, whether the
original answer was correct."
"Currently, we are helping to digitize old editions of the New York Times and books from Google Books."

This is normal operation for recaptcha.
It uses one word that it knows for sure what it is and one word which it wants you to translate for it.
The most "everyday" word is normally the one you have to get correct and the weird word you can pretty much type anything in there.
Its looking to build a pool of answers and then out of all the translations given it will pick the most common answer to go in its official translation dictionary.
If you read up on the website you will see that it is part of a digitization project to convert books into electronic versions.

Related

Formatting of #HtmlTextBoxFor MVC Visual Basic Webpage

This is my first post here although I use this forum all the time and it usually provides me with a solution, however I've searched all over the web for an answer to this and I can't find anything.
I'm developing a website which provides software support. Users log on to it and add a "support call" which a member of a support team will answer.
The problem I am facing is that when users describe their problem (inside the TextBoxFor shown below), they can type out their problem, and format the text as they please, however when the call is submitted, sometimes (it appears randomly) the formatting just disappears, e.g. some spacing and paragraph use just disappears, here is an example:
Correct formatting:
Hi I'm having difficulty with x, and y and I need some assistance.
Could somebody help me out?
How it appears sometimes:
Hi I'm having difficulty with x,and y and I need some assistance.Could somebody help me out?"
This, of course is highly simplified, and some people have to write many paragraphs and text lines.
Here is the code for the textbox (in the view):
#Html.TextBoxFor(Function(model) model.SupportCall.Subject, New With {.maxLength = "254", .style = "width:500px;"})
It is worth mentioning that when a support call is submitted, it goes to a folder which is picked up by another internal piece of software, which then creates a database record for the call, meaning that an email notification can be sent to the support team, then the list of calls to be answered is updated from that database model, therefore I'm pretty sure it's possible that this process could be what is changing the text formatting.
A reason why this is happening is just as useful as a solution to me so any input is welcome.
use
<pre></pre>
prepend and append it.

How do Google opening links in a new window without target attribute?

i wonder how google manages to open external links in a new window/tab without defining target="_blank".
For example in google plus, all external links open in a new window.
I think its some Javascript voodoo but the .js code is obfuscated so i cant really look into.
edit: oh and followup question: why?
Using a framework makes this easy. Just have JavaScript look for links marked rel="external", or another identifier that shows them to be an external link, and dynamically add target="blank". Here's an example using Prototype:
$$('a[rel="external"]').each(function(a) {
a.setAttribute('target', '_blank');
};
It's not beyond reasoning for them to add the target attribute by javascript before allowing the anchor link event to return true.
It's Javascript. You can say:
window.open('http://example.org', '_blank').focus();
But please, don't. Opening links in new windows is almost always the wrong thing to do. Seriously, good uses of this are vanishingly few. If users want a link opened in a new window, they are quite capable of doing that themselves.
Jakob Nielsen was telling people this twelve years ago. Others have taken up the cudgels. The W3C removed the target attribute from HTML 4 because it was such a bad idea. I honestly don't understand how this usage persists. Don't you find it incredibly annoying when a website does this to you? Why would you want to write a website which does this to someone else?
Which brings me to your followup question. Why did Google decide to do this? I have no answer to that, and i am completely and utterly baffled how one of the very biggest, brightest, web companies could make such an elementary mistake. But then, a lot of the Google Plus interface has very poor usability (as in, mostly worse than Facebook poor); i suspect there is an interesting story behind it. Was the project under-resourced, and thus built cheaply on top of a rapid development framework such as GWT? Was it built as a spare time project by a lone wolf with a blind spot for web architecture? Was it driven by strategy wonks who didn't care about getting the technology right? Mystery.

translate to multiple languages

I would like to get translation from one ( best - automatically detected) language to 4 different using google-translate. My idea is to wrote a html document which contain 4 frames - in one of them I can find text form and button. After click on it, Internet browser will send demand to google translate and show results in 4 frames.
If you want a self service, hosted service that does translations and content management for you check out Localize.js
This is going to be terribly translated. As someone that speaks English well, Russian poorly, and Spanish even more poorly, I can detect that these auto-translations never come out right.
My recommendation is to serve your page through a basic system that will allow you to respond to submitted form values. Pass in &LANG=two country iso code and then have your backend serve up the correct data.
Have someone that speaks both languages prepare the content for you. Then, whenever you are serving these pages, you can also conditionally adjust CSS to account for differences in format which come from difference in language length.
If you don't have those capabilities available, make 5 pages. One in English and the other 4 in the other languages. You will seriously seem retarded to anyone that speaks those languages well if you use an auto-translate. I think this is a bad idea for any kind of professional page, even if you can work out the technical issues.
-Brian J. Stinar-
Google has an API to its translate tool that will enable you to send it some text and receive back that text translated into any language you choose.
edit: This is now a paid service

Best way to format pretty URLs for numeric IDs

Alright, so let's say I'm writing a forum application, and I want pretty URLs. However, all my tables use numeric IDs, so I'm not sure the best way to format the URLs for those resources. Let's pretend I'm trying to get a topic with ID 123456 and title This is a forum post. I've seen it done a couple ways:
www.example.com/topic/123456
www.example.com/topic/this-is-a-forum-post
www.example.com/topic/123456/this-is-a-forum-post
Which one would you say is, taking all things into consideration (including SEO), the optimal URL?
Sorry if this question is too vague, but it seems programming-related and it's not incredibly open-ended, as I just want to hear the pros and cons of each method.
I would go with option 3, and make the slug (the last bit) optional
Because?
The ID will always be unique... 2 people may make a thread with the name 'good news' for example
The search bots can access the slug for some SEO goodness
The slug should be optional ... Using just the ID should still give you access to the site. Perhaps if the slug isn't there you could forward to the slug'd version, if you're concerned about duplicate content. You could always use the canonical meta tag to tell Google to index the slugged version.
Another benefit of the optional slug is if someone copies and pastes the URL into a document, there is a chance it could have characters at the end chopped off (because URLs generally don't have spaces, so they don't break to new lines). Having the slug optional means there is more of a chance people will find your page.
I believe this is what Stack Overflow does.. and also notice they are doing rather well in the Search Engines.
Update
From the comments, be sure to 301 redirect any missing slug version to the correct slug.
URL 1 is definitely suboptimal. URL 2 is attractive but you run the risk of confusion if tags collide, especially if they differ only in punctuation. So I'd say URL 3 is the clear winner.
Also note that just because you display URL 3 is no reason not to accept all 3, with the other two redirecting. If URL 2 is ambiguous, it should redirect to a disambiguation page.
I would think that the 2nd URL would be the best for SEO since it is meaningful and has less depth. It's nicer for people as well since you can look at the URL and know what the content is about.
Doesn't include the title, so you'll lose the additional SEO value of having those keywords in the URL.
Won't work well, because it doesn't have a unique numerical ID, so what are you going to do if someone else tries to post a topic titled "This is a forum post"? Then you start getting into the weird thing digg does, where it has to give the second one the url "http://www.example.com/topic/this-is-a-forum-post_2", and so on. It makes it harder to take the URL they tried to load, and figure out exactly which topic they were trying to get to.
Has the best of both worlds, this would be my style of choice.
Stackoverflow seems to using pattern 3, with the title being ignored completely (just the id is used).
That makes for nice semantic URL, and is also easy to implement, and still works if the title changes later.
Of course, the title could be completely fake:
Best way to format pretty URLs for numeric IDs
I'll go for the first one. You know it really doesn't matter now. Since there are Long URLs converter and it will just proliferate and will become the norm in the future. Remember the longer your URL the less SEO points you'll get.
And you can't control the way people name their forum topics. So really, I'll just choose the first one for simplicity and the norm.
For SEO/traffic, definitely no.2 without a doubt. Get those meaningless numbers out of the URL every single time.
www.example.com/topic/this-is-a-forum-post
pickup the "this-is-a-forum-post" from your database and map it back to the ID number within your database via a query. Then do an internal URL re-write to the real page, something like /topic.php?ID=324342
I would go with option 2, as SEO can better understand.
Stack Overflow uses the third way, probably, that is the reason, Stack Overflow urls were not optimized for SEO. I am not sure in the above answer.
But In my experience with Google, Quite Often, I could see a solution from other forums, whereas stackoverflow solutions were almost invisible.
Best way to format pretty URLs for numeric IDs
Best way to format pretty URLs for numeric IDs
if the both urls were one and the same, the SEO simply goes with option 2, which is less optimized.
I'm not convinced longer URL's are SEO trouble. The depth seems to be a bigger issue, and not by counting slashes, but by steps it takes to get from an indexed page with rank to the content page. I recently created a dummy test page titled /content/roofing/how-much-does-a-shingle-roof-cost.html and threw it on the server just to test pathways and make sure my directories were working correctly. I'm not even sure how google discovered the page but it did and it started getting traffic, so I had to give it content and make it part of the family. The dummy content was a copy of our about page so it wasn't empty, but I was surprised an unpromoted page would get traction, and think the URL had something to do with that.
Which brings up a slight alternative to the above 3 choices for a URL. What if you went with number 3 but added .html to the end? I generally do this with dynamic URL's but I have no concrete evidence that it's helpful. According to Google they brag that they can index dynamic URL's just fine and so there's no need to do URL rewrites at all. Google doesn't mind a bit if the other engines aren't as good at that. Several sites I trust add the html at the end (blogger for example) and it can't hurt, so I still do it.
i would suggest the first one, since the topic title can be changed for clarity, by the admins and then the url will be inconsistent.
www.example.com/topic/123456
also allows one to just edit the last bit of the url (the numbers and jump to another topic), not likely to happen but still a usable feature.

Is there any way to restrict how many item returned by CodeCentral Web Service

I am building web client for CodeCentral web service from CodeGear web site.
I need to restrict number of items return by Search operation of CodeGear web service, say it, 10 per page. This way I can minimize loading of my web page.
I just don't know how to do it. Any ideas?
Sorry, I don't know the answer off hand.
I would suggest you contact John Kaster of CodeGear. He would know all the ins and outs of that. I haven't seen him posting here. Usually the email is [first initial][last name]#codegear.com. You might also try posting in the Developer Network / CodeCentral forum which I imagine John and his team will be monitoring.
You're right. The search form on the CodeCentral page lists the maximum number of entries as an option (the "Show" option), but does not allow you to select the option. And trying various obvious parameter values doesn't work.
I haven't tried it, but what might help you is if you research the CodeCentral Expert, which is a package to help search the CodeCentral website from within Delphi and C++ Builder: http://dn.codegear.com/article/23023
The package seems to be quite old, since comments on that page date from 2000, so there's no guarantee that it will work with the new site. However, checking through archive.org, it appears that the CodeCentral search page has remained the same for quite a number of years, and the search page, and even the missing "Show" option, has not changed over that time.
Even if the package doesn't work, maybe the package will give you the correct parameters you need for the calls to their search.
Otherwise, you'll have to send an email as previously answered.

Resources