It’s a while that I am thinking about developing a portal at our student community at University to monitor the part time jobs for robotics & nano-electronics students that are posted online (Finn.no is popular place to do so in Norway). Finally this would come up on a screen where robotics and Nano students would be hanging out.
For this purpose I have either thought to connect directly to the database (waiting for the response from the website). If they do not let me to do so, I was thinking to have the announcements sent to me with email (a service that the website offers) and then process the emails and update the list. To this I came across connecting to email servers with POP3 and using POP3 terminal commands to read emails (a tutorial on this subject) and update my list to show on the screen.
First command after connecting. E-mail userid (this may or may not not the full e-mail address). Example: USER testuser
Password of the email account. PASS thisPasswordIsCool
To open a folder in C#, simply follow the following example :
private void openFolder()
string myDocspath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);// if you are after special documents (e.g. my documents)
string myFolderpath = Application.StartupPath + "\\folderName\\"; // a folder right beside where you run the program
string windir = Environment.GetEnvironmentVariable("WINDIR");
System.Diagnostics.Process process = new System.Diagnostics.Process();
process .StartInfo.FileName = windir + @"\explorer.exe";
process .StartInfo.Arguments = myFolderpath;
process .Start();//OPEN the folder
Saving query to excel format could go through Microsoft Office Interop services or some third party libraries. However there is a simpler way. CSV file formats are wuite simple and one could simply read queries and save them into a text file format with CSV as the extension (myfile.csv).
The tricks would be to have the data read from database by query and write each record as a line and semicolon to separate the column vales.This is actually language independent and one could implement it by C#, Java or any other language that could execute queries on a database.
With running the project on emulator, .apk file is automatically generated on the bin directory. Building the project (not running) will NOT output the apk file into the bin directory.
If you are wondering about number of lines in a text file you are about to read, you could simply use this code to find it out
int cnt = File.ReadLines("file_Path.txt").Count();
var whatever = "<?= $phpVar ?>";
string filesArray = Directory.GetFiles(sourcePath);
foreach (string file in filesArray)
string name = Path.GetFileName(file);
string destPath = Path.Combine(destFolder, name);
SELECT … FROM
Most basic SELECT statement is only consisting of 2 parts: (1) what columns & (2) what table(s) those columns should be picked up from.
SELECT * FROM testTable