Can we store data on SoloLearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Can we store data on SoloLearn?

Just wanted to know if raw data can be stored either on SoloLearn servers, or by linking it with local server(my phone's memory).(for code development purposes only).Thanks!

31st Jan 2017, 6:24 PM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
7 Answers
+ 6
SoloLearn deletes + terminates everything related to your application once a timeout expires (so, no). You can create files and save data there but you have a very short window in which to work with them. You can save files in (example) /sdcard/devs and then use it like this: HTML (src/hrefs/etc): <script src="file:///sdcard/devs/js/myjavascript.js" > Web Browser (address): file:///sdcard/devs/ (to browse, find things, copy 'links') Inside other code: /sdcard/devs/... Notes/caveats: There are THREE slashes for web protocols, TWO for the protocol (file:// .... it's like http://) and one for the beginning of the path: / Android may helpfully switch your path to /storage/emulated/0 (instead of /sdcard) - just switch it back if you get security violations. Javascript will be cached by SoloLearn (you reload but nothing changes). To get around local caching, you can: <script src="file:///sdcard/devs/js/myjavascript.js?cachebuster=1" > where you update the "cache buster"* number every time you save "myjavascript.js" in an external IDE like DroidEdit, etc. * Visitors: This is a URL parameter (but there's nothing to care about it so it's safe). People usually use time() + date() here to ensure the number is unique every run. Manual way is shown.
31st Jan 2017, 6:42 PM
Kirk Schafer
Kirk Schafer - avatar
+ 6
Thanks Kirk...but can I also do it on Java or CPP?
31st Jan 2017, 6:45 PM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
+ 6
okay...thanks!
31st Jan 2017, 7:01 PM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
+ 5
Java and C++ look on the server (vs. local AIDE and CppDroid apps). Since there's no real persistence you'd have to pull/send the data in every time; so you may need threading and still not be fast enough.
31st Jan 2017, 7:00 PM
Kirk Schafer
Kirk Schafer - avatar
+ 5
Python.. is a good option... But I'll have to learn it first :'(
1st Feb 2017, 4:50 AM
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍
StillSoul‌‌‌‌‌‌‌‌‌‌‌‌‌‍ - avatar
+ 5
Don't worry; it's not at all like trying to tame a snake :)
1st Feb 2017, 9:36 AM
Kirk Schafer
Kirk Schafer - avatar
+ 3
For Python you could avantageously and easily install an android app like QPython/QPython3 which provides interpreter to run Python scrpts and/or command line interpreter... through wich you can access to local storage, and run script in true real-time interactive input/output, unlike SoloLearn Code Playground :P
31st Jan 2017, 10:31 PM
visph
visph - avatar