What is the best way to generate QR code today? Client side or Server side? Why? - qr-code

We got many libraries to help us generate QR code nowadays, should we generate QR code on client side or server side? Why? What is the pros and cons?

Related

Is runat=server the correct way of running?

I am a newcomer developer to ASP.NET.
I wonder that is running forms on server (namely runat=server) the right way of coding ? I feel that all of scripts, forms etc. must run on client side because server side runnings may cause bottleneck on server side.
So what kind of advantages/ disadvantages
-running on server side
-running on client side ?
Yes, that runat=server means that ASP.Net does some processing on the server side.
This processing means that
You have an object model you can use in your code, to access properties of your controls and event handlers (such as an OnClick for the various Buttons)
The (possibly complicated - see grids) HTML is generated to be sent to the client (=browser)
The real form/script etc does run on the client. Validations run both client-side and server-side.
I think this link will give you a good understanding of the difference. difference between server and client controls There are plenty of explanations out there if you just Google

Is there a way to prevent users from sending false messages to server?

I'm currently writing a multiplayer game with network interactions (obviously). Is there a way to store some sort of encryption key within the executable so that I can signed any outgoing messages to the server such that the server knows the message is coming from the client code itself, not a cheater?
Sorry there's no code to go along with this question. I'm forging into unknown territory with this question in regards to my experience.
No. While it might be very difficult to do, it is possible to figure out your encryption method.
The potentially easiest way that they could get your encryption method is through decompiling your code, but this is much harder with some languages than others. Java and C# apparently can be decompiled to high-level readable code. This question covers that topic.

Build a HAR file using only client side code?

Is that possible? I know I can extract some timing data using the Navigation Timing API, but that's not enough. Also know that I can use a proxy like Browsermob Proxy, but I was wondering if I could do the same with just client side code (JS).
Perhaps something using the Resource Timing API might be what you are looking for? I am looking for an answer to a similar issue and I found this article which has been useful:
http://calendar.perfplanet.com/2012/an-introduction-to-the-resource-timing-api/
You can see the code that implements the API here:
https://github.com/andydavies/waterfall/blob/master/waterfall.js
I hope this is helpful.

Screen scraping in server side

I am new to screen scraping. When i use proxy server and when i track the HTTP transactions, i am getting my post datas revealed to me. So my doubt/problem here is,
1)Will it get stored in the server side or it will be revealed only to the client side?
2)Do we have an option of encrypting the post data in screen scraping?
3)Is it advisable to use screen scraping for banking applications?
I am using screen scraper tool which i have downloaded it from
http://www.screen-scraper.com/download/choose_version.php. (Enterprise version)
Thanks in advance.
My experience with scraping is that if you aren't doing anything super complex (like logging into a secure website like an online banking website, etc.) then Python has some great libraries that will help you out a lot.
To answer your questions:
1) You may need to be more clear, but this really depends on your server/client architecture.
2) As a matter of fact you do. Urllib and Urllib2 (built-in Python libraries) both have functions that enable you to encrypt data before you make a POST. As far as how secure this encryption is, for most applications, this will suffice.
3) I actually have done scraping on online banking sites! I'm not exactly familiar with that tool, but I would recommend using something a little different than a scraper. Selenium, which is a "web-driver", allows you to simulate the use of a browser, meaning anything that the broswer does in the background in order to validate the session is automatically taken care of. The main problem I ran into while trying to scrape the banking site was the loss of important session data.
Selenium - https://pypi.python.org/pypi/selenium
Other libraries you may find useful are: urllib, urllib2, and Mechanize
I hope I was somewhat helpful!
I've used screen-scraper to scrape banking sites before. It will impact the site just like your browser--if the site uses encryption the connection from screen-scraper to the site will be too.
If you have a client page sending data to screen-scraper, you probably should encrypt that. I generally just make the connection via SSH.
1) What do you mean by server side? Your proxy server or screen-scraper software? Any of them can read/store your information.
2) If you are connecting through HTTPS then your software should warn you about malicious proxy server: https://security.stackexchange.com/questions/8145/does-https-prevent-man-in-the-middle-attacks-by-proxy-server
3) I don't think they have some logger which they can read. But if you are concerned you can try to write your own. There are some APIs which you can read HTML easily with jQuery sintax:
https://pypi.python.org/pypi/pyquery or XPath: http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/

How to use Red5 with Asp.net

I want to record voice online and I guess I need to use FMS or Red5 and I don't know how to use Red5 with Asp.net, actually this is my first attempt to handle such a thing and currently I am a .net developer.
So someone please show me a way to handle it and show me how to use Red5 with Asp.net.
Thanks in advance.
This is the nice page which has very good infromation abou red ands ASP http://www.aspnetajaxchat.com/Deployment_Guide.pdf
http://www.freelancer-job.com/blog/2008/08/13/flash-aspnet-coder-to-integrate-red5-based-audiovideo-chat-module-to-aspnet-website-by-zukinet/
Some more information avilable in are there any ASP.NET with Voice Recording sample codes?
I have successfully written an asp.net application to stream multiple users P2P video using Red5.
Integration of red5 is actually simple. Once you've got it working on your Server/VM all you have to do is install the olfa Demo and you can write a player/streamer in flash. You just have to set the netconnections. One for the incoming stream and another for the outgoing stream. Then you'd have to add a mic & camera capture to attach them to the outgoing stream. If you want to make your player/Streamer more robust you can use a combination of Javascript and a webservice(AJAX) to control what streams to where.
You weren't very detailed on what you wanted to do otherwise I could have probably assisted you further.
For example code go to
http://code.google.com/p/red5/source/browse/#svn%2Fflash%2Ftrunk%253Fstate%253Dclosed

Resources