For my final project, I created an online survey that can store data. I used Servi.js to save data from a form and save it to a database on my server. Also, because the servi database seems can only save data from one form each time, so I used javascript to make one html page act as several pages. This way I can store data from one person all at once. I am currently using this survey for my thesis experiment as well.
Please find the survey here:
http://104.236.59.251:3001
Here is the server code for data storage:
var servi = require('servi');
var app = new servi(true);
var namesDB = useDatabase("dataStorage");
port(3001);
start();
// --- routes --- //
route('/', submitform);
route('/submitform', video1);
function submitform(request){
// Show the form file
request.serveFile("final.html");
}
function video1(request) {
var storeData = {
name: request.params.Name,
Gender: request.params.Gender,
Age: request.params.Age,
NormalHearing: request.params.Hearing,
Parkinson: request.params.Parkinson,
Video1_primaryEmotion: request.params.q0,
Video1_howMuch: request.params.q1,
Video1_otherEmotion: request.params.q2,
Video1_whatsTheEmotion: request.params.q3,
Video1_howMuchOfOtherEmotion: request.params.q4,
Video1_pleaseness: request.params.q5,
Video1_haveYouSeenTheVideo: request.params.q6,
Video1_CloseEyes: request.params.q7,
Video1_commoents: request.params.q8,
Video2_primaryEmotion: request.params.v2q0,
Video2_howMuch: request.params.v2q1,
Video2_otherEmotion: request.params.v2q2,
Video2_whatsTheEmotion: request.params.v2q3,
Video2_howMuchOfOtherEmotion: request.params.v2q4,
Video2_pleaseness: request.params.v2q5,
Video2_haveYouSeenTheVideo: request.params.v2q6,
Video2_CloseEyes: request.params.v2q7,
Video2_commoents: request.params.v2q8,
Video3_primaryEmotion: request.params.v3q0,
Video3_howMuch: request.params.v3q1,
Video3_otherEmotion: request.params.v3q2,
Video3_whatsTheEmotion: request.params.v3q3,
Video3_howMuchOfOtherEmotion: request.params.v3q4,
Video3_pleaseness: request.params.v3q5,
Video3_haveYouSeenTheVideo: request.params.v3q6,
Video3_CloseEyes: request.params.v3q7,
Video3_commoents: request.params.v3q8,
Video4_primaryEmotion: request.params.v4q0,
Video4_howMuch: request.params.v4q1,
Video4_otherEmotion: request.params.v4q2,
Video4_whatsTheEmotion: request.params.v4q3,
Video4_howMuchOfOtherEmotion: request.params.v4q4,
Video4_pleaseness: request.params.v4q5,
Video4_haveYouSeenTheVideo: request.params.v4q6,
Video4_CloseEyes: request.params.v4q7,
Video4_commoents: request.params.v4q8
};
namesDB.add(storeData);
request.serveFile('ThankYyou.html');
// console.log(namesDB);
}
My World
2015年3月12日 星期四
2015年2月12日 星期四
As We May Think
In the article “As We May Think” published in 1945, Dr. Vannevar Bush discusses his view of future and what are the next steps for scientists in the future. For example, he states that the technology can downsize the costs for producing complicated devices with better quality and reliability. He also believes that the future inventions and creations will save tremendous amount of time and efforts for professions in various fields with inventions such as data retrieval and manipulation. However, besides benefits that technology can bring to mankind, he also points out potential issues to be avoided in the future.
Most of knowledge today have been converted to transmittable forms so everybody can access them and share them easily. We have formed a new world based on immediateness and comprehension of knowledge. I agree with many points that Bush mentions in the article. Even though the article was written a half century ago, he already foresaw a lot of what is happening in today’s society and problems that we are dealing with such as overwhelming information and limitation of interactions to reality.
The article makes me think that there are always two sides to everything.
On the surface, we might be enormously benefited by an invention of a new technology, for instance, the memex or computer. Under the surface, we are inevitably also limited and troubled by the same invention as well.
2015年2月5日 星期四
Long Live the Web Response
Tim Berners-Lee in his article “Long Live the Web” points out few issues that the world wide web has been facing these days. Since there is no doubt that web has made a profound impact on human interaction in today’s society, protecting its fundamental principles can prevent serious problems and foster evolution and innovation.
First, preserving egalitarian principles allow us to have freedom to access information that we want. By supporting decentralisation feature, we can share information without needing any authorization. Secondly, we can also prevent companies that are trying to create isolated architecture and sell users’ information and limit their accesses by supporting URI, which provides interconnected information space, and net neutrality, which protects users’ right to access any information online,
Furthermore, supporting open standards and separation of web and internet layers, and projects that allow users to create their own websites from their own servers can also foster new inventions and free speech on the internet and prevent a company from becoming a monopoly, which most likely will limits creation and innovation.
This article does not just let us be more aware of how protecting web fundamental principles is important, but also arms us with the knowledge so we can make right decisions, support companies and projects that actually care about their users' right. I also believe only with the knowledge, we can uncloud our vision so we will able to spark more innovations and eventually secure the future.
訂閱:
文章 (Atom)