This question already has answers here:
How to Disable Copy Paste (Browser)
(12 answers)
Closed 8 years ago.
I am developing an Online Exam rails app. In the Examination interface, I want to prevent the copy(ctrl+c), paste(ctrl+v), right click and selection functionalities. How I would be able to prevent it using javascript? Please help me to have a better solution for this.
Thanks :)-
This depends on the client's browser, so you'll need to add the appropriate JScript to your page. Note that this only works if Javascript is enabled on their browser (it generally will be).
Related
Rails 7
One of the requirements for my application, is to have the user fill out some tax information, using a fillable PDF form. While there are some gems that allow me to create a PDF, I only saw one recommendation:
Rails-Pdf Editing Template
But the post is 7+ years old, and when I checked the pdf-form gem, it seems the last time anyone did work on it, was about 7 years ago.
I don't necessarily want to create my own solution, and I would be happy to crate a frame, within my app, that takes the user to another site where they can edit the PDF, as long as it could be saved back to my own server.
Any recommendations?
You can use HexaPDF to do this. It supports filling out AcroForm forms, if you wanna do it this. Or you can load the PDF and overlay the information yourself, using everything that is available in the Canvas class.
(N.b. I'm the author of HexaPDF and the library is dual-licensed under the AGPL and a commercial license.)
Anyone use the <details> tag? I'm trying to create a link that takes the user to a details section and opens the previously closed details. Haven't found any solutions that work and aren't 5 years old.
<details><summary id="openThis">This is initially closed</summary>More words and stuff</details>
I'd like to create an anchor like this Open Sesame that also expands the details without the user having to click again. Any ideas welcome.
This question already has answers here:
Rails Browser Detection Methods
(3 answers)
Closed 8 years ago.
I'm trying to record visits to my site, but I keep getting crawlers accidentally setting off my code. Is there any way in rails controllers to determine whether a user is a bot such as googlebot, etc?
You can check HTTP headers, particularly the user agent string.
http://www.useragentstring.com/pages/Googlebot/
Most friendly bots have "bot" in their user agent.
Another suggestion is to use something like Google Analytics to track your visits. It's way better than implementing your own.
This question already has answers here:
Best way to save data on the iPhone
(7 answers)
Closed 9 years ago.
I want to start an iPhone app for an E-learning recommendation system which does the following:
Let the user register or log in the app.
After logging in the app ask the user questions.
My question:
What is the best way to manage users to be able to log/register and save/retrieve user questions and answers?
I feel like I've answered this question many times before, but the alleged duplicate recommends using NSUserDefaults and I think that's poor advice for saving the data that your app manages. (The dupe is from back in 2008, BTW; the iOS landscape was somewhat different back then, but even so I still don't think the most popular answer gives very good advice.)
Since you're looking at having your users log in, there may be a server that they're logging into. If so, saving the data on the server is the right thing to do. Exactly how that work will depend on your infrastructure, but you'll probably GET and POST data to a web server using HTTP. There's a LOT of information on the net about how to go about that (lack of research is probably why you're getting down votes), but you'll either use NSURLConnection and NSURLRequest directly, or you'll use a third party library like AFNetworking that makes it even easier to access a web server.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to create a static (non-refreshing) menu bar like Facebook?
How Facebook ajax work technologies? Can you tell me how change URL without refreshing page and static header in rails
Use history.pushState() to change the browser URL without reloading the page.
http://diveintohtml5.info/history.html
You can then add an event listener to the popstate event and react accordingly when the back button is used.
Read my answer
PJAX loads html from your server into the current page without a full page load. It's ajax with real permalinks, page titles, and a working back button that fully degrades.