Usage of ngcsv in web apps - angularjs

I really can't think of a scenario that would make me use ngcsv, it converts array to CSV file.
What I don't understand is why the server couldn't just return a proper file instead of pass the data through client code first. If you use I'll be happy to understand why this is useful.

Presumably it would work without access to the server since the code is all completely client side.

I'm planning on using it in a 100% offline app that relays on LocalStorage.. so I guess there's many scenarios where it could be useful

Related

Fetching data from websites and make them into .txts

I am having an assignment in which I have to fetch data from a site (somewhat like a news site) and make them into text files and then list them using tags.
Could someone please provide me some information/knowledge/keywords/instructions that can help me finish this?(using C only) Thank you.
The basic concept is this: you'll need to connect to the HTTP server on port 80, fetch the HTML, parse it and store the information you want in files. To accomplish the former, if you're using Windows, you can use the WinInet API. Otherwise go with cURL, which is a very popular, efficient, cross-platform solution.
The other tasks require a relatively good command of C, but it's nothing special - you'll need to work with strings to parse your results, then use C's file I/O (fopen/fprintf/fwrite) to save your stuff to disk.

How to make my GAE system secure

I'm developing an iOS app that used GAE as a backend. The only sensitive data my app will transfer to GAE is login details, anything else that is transferred is not sensitive. I intend to use SSL for everything, just coz that seems most sensible to me - is there any reason not to? Also, I want some way of ensuring that my app is the only way that my GAE system can be accessed (ie nobody accessing it from the web/spoofing a client to look like mine) how do I go about this? I read something about public and private keys but wasn't exactly sure if it was relevant?
Any help is much appreciated
Thanks!
Short answer for your last question: you cant. There is no way you can enforce that your application is only accessed through your IOS app.
You can make it as hard as possible, but you cant guarantee that. The correct way is not relying on your IOS application
to validate the data send, but to do this verification in your gae app (if needed: again).
SSL is a good thing anyway - if done correctly (see: http://www2.dcsec.uni-hannover.de/files/android/p50-fahl.pdf )
But if the only sensitive data send is a password, you could consider using something like SRP ( start reading here: http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol )

Work with Database using Spock and Geb.

I hope someone have already faced an issue to verify that application shows correct data from database. I reviewd how groovy used SQL, but I have no idea where and how I should do that. I'm just starting to use gradle+Spock+Geb for testing application. I have a few files where I described a couple of pages from application, a couple of modules and a file with spock specification. Where and how I need to connect to Oracle DB, use SQL and compare result's data with application's ones?
P.S. I write everything in notepad++ and launch from command line writing 'gradlew firefoxTest'. Does exist any more comfortable way to work with gradle+spock+geb?
Thanks in advance.
Because there are no other answers, I wanted to provide a solution someone at my company thought of. This assumes you already have a project that uses some sort of JDBC. In our case it is JDBI.
The idea is to extend Classloader and then use that to directly access the data access object class via the JVM. That idea should work.
I have not tested it out because it doesn't completely fit our use-case. I'll admit that this does not completely apply to your use case, but technically you could just run the jar of an existing project, which can access the database.

GWT RPC Data Encryption and gwt-crypto issue

I have a GWT app, which is deployed on the app engine. The application is basically an exam simulator. All the exam questions and answers are stored in an XML file on the server. I use JAXB parser to parse the XML file and send a list of objects to the client through GWT RPC.
I noticed that during the transit (server -> client), the entire data is visible in plain text in Firebug. Since the data (exam questions and answers) are my intellectual property (IP) and something that I give lot of value to, I'm concerned that it's very easy to steal that data. Therefore, I'm trying to find ways to do some basic encryption and obfuscate the content when it's being sent over from the server to the client.
After Googling, I came across gwt-crypto project, and within a few minutes, I was able to achieve the exact result that I wanted. The server would encrypt the data, and the client would decrypt it. In Firebug, it would show the data in encrypted format, and not as plain text.
However, I ran into an issue. After implementing encryption/decryption, I noticed that my application would not load inside my company's network, which is obviously protected by a firewall. The application works perfectly from home or even on a 3G network on my phone. Another version of the application, which does not use encryption/decryption works perfectly from within my company's network. I confirmed this by creating 2 exact same versions of the app, with the only difference between a boolean flag, that determines whether encryption/decryption is enabled or disabled.
I have the following questions here:
What is the best way to achieve the result that I want to achieve? Is gwt-crypto a good solution for that? I'm fine with any simple approach to obfuscate the data during transit. It doesn't have to be a sophisticated algorithm.
What could be the possible reason for a GWT app, with encryption/decryption enabled, not working inside a firewall? I'm really clueless on this.
I'll appreciate any help on this issue.
Using SSL is the right way to go.
In your case, given AppEngine SSL limitations, you should load your HTML normally from non-SSL domain and use cross-site RPC to load your data via SSL domain.
Update:
What is the best way to achieve the result that I want to achieve?
If you want to secure the data in transit then the only secure option is SSL/HTTP. Usually it's also the simplest one as it does not require you to change the application code, just server configuration. In your particular case (appengine with private domain), it takes more work as described above.
Is gwt-crypto a good solution for that?
No. gwt-crypto uses a key to encrpt/decrypt the data. You also need a secure way to discribute this key.
I'm fine with any simple approach to obfuscate the data during transit.
Security through obscurity in not security. It's a false sense of security, which is even more dangerous than no security. It's enough that only one of the technically capable students cracks this and soon everybody would do it.
Possible attack would go like this:
Snoop the network, get username/password of user.
Login as that user, have browser load exam data, which is now unencrypted in memory.
Dump the DOM and inspect it for exam questions.
-
What could be the possible reason for a GWT app, with encryption/decryption
enabled, not working inside a firewall?
Use firebug to make sure network connections are identical, except for the encrypted content. Firewalls should not work that deep. Talk to sysadmin about it.

Flash connectivity with database

How can I establish connection of a Flash site with a database(i.e. MYSQLetc)?
If you need to pass the Data from Flash to Database , for example Registration information , then follow the Tutorial
I assume you have knwoledge of Server Side Scripting like PHP or C#
I had to do this for a college project I did before and you can easily do it with the URLLoader and URLVariables functions by stocking up your variables and sending them to a page or recieving the variables and then taking them out of the URLVariables function.
However if you were to be passing arrays or dynamically chosen variables then you would need to pass all of your data as a comma seperated string and then parse through it on the other side and vice versa.
I'll try to post some actual code when I get home but I hope this helped
You cannot connect to a database server directly from flash.
To communicate with the database you need a webservice.
There is a project called assql that connects Flash directly to the database but is aimed at AIR projects. AMFPHP is good for using php to save to the database from AS3.

Resources