<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bin-Blog &#187; scirpt</title>
	<atom:link href="http://www.bin-co.com/blog/tag/scirpt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quizzin WordPress Plugin for Quiz Creation</title>
		<link>http://www.bin-co.com/blog/2008/11/quizzin-wordpress-plugin/</link>
		<comments>http://www.bin-co.com/blog/2008/11/quizzin-wordpress-plugin/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 16:37:29 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugin-week]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[quizzin]]></category>
		<category><![CDATA[scirpt]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=197</guid>
		<description><![CDATA[<strong><a href="http://www.bin-co.com/tools/wordpress/plugins/quizzin/">Quizzin WordPress Plugin</a> lets you add quizzes to your blog</strong>. This plugin is designed to be as easy to use as possible. Quizzes, questions and answers can be added from the admin side. This will appear in your post if you add a small HTML comment in your post.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/10/wordpress_logo.png" alt="WordPress Plugin Week" title="WordPress Logo" width="183" height="145" class="alignnone size-full wp-image-136 intro" align="right" /></p>
<p class="intro"><strong class="highlight"><a href="http://www.bin-co.com/tools/wordpress/plugins/quizzin/">Quizzin WordPress Plugin</a> lets you add quizzes to your blog</strong>. This plugin is designed to be as easy to use as possible. Quizzes, questions and answers can be added from the admin side. This will appear in your post if you add a small HTML comment in your post.</p>
<p><strong class="highlight">Welcome to Plugin week</strong> &#8211; in Plugin week, I release a new WordPress Plugin each day, every day for one week. This is the sixth (and final) plugin in that series. The plugins released so far are&#8230;</p>
<ul>
<li><a href="http://www.bin-co.com/blog/2008/11/eventr-wordpress-plugin/">Eventr Wordpress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2008/11/autofields-wordpress-plugin/">Autofields WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2008/11/pollin-wordpress-plugin/">Pollin WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2008/11/surveys-wordpress-plugin/">Surveys WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2008/11/quartz-wordpress-plugin/">Quartz WordPress Plugin</a></li>
</ul>
<p><strong class="highlight">Note 1:</strong> Quzzin is a beta plugin(as are most of the plugins released in the Plugin Week) &#8211; so watch out for bugs. And trust me, there will be quite a few.</p>
<h2>Installation</h2>
<ul>
<li>Download the <a href="http://downloads.wordpress.org/plugin/quizzin.zip">zipped file</a>.</li>
<li>Extract and upload the folder to /wp-contents/plugins/ folder</li>
<li>Go to the Plugin management page of WordPress admin section and <strong class="highlight">enable the Quizzin plugin</strong></li>
<li>Go to the Quizzin Management page(<strong class="highlight">Tools &gt; Manage Quiz</strong>) to create or edit Quizzes</li>
<li>After creating the quiz, create a <strong class="highlight">new post and add the HTML comment [QUIZZIN 1]</strong> in it. Here the &#8216;1&#8242; should be the ID of the quiz to be inserted.</li>
</ul>
<h2>Usin&#8217; Quizzin Plugin</h2>
<p>This plugin is pretty straight forward &#8211; after enabling the plugin, go to the Manage Quiz page(Manage &gt; Manage Quiz). All the existing quizzes will be show here. You also have the option of creating a new quiz &#8211; or editing an existing one.</p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/quizzin_manage.png" alt="Quizzin WordPress Plugin - Manage" title="Quizzin WordPress Plugin - Manage" width="409" height="214" class="alignnone size-full wp-image-198" /></p>
<p>Click on the &#8216;Create new Quiz&#8217; link to create a new quiz &#8211; you have to fill in three fields &#8211; the quiz name, the description and the Final Screen.</p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/quizzin_create.png" alt="Quizzin WordPress Plugin - Create" title="Quizzin WordPress Plugin - Create" width="360" height="424" class="alignnone size-full wp-image-199" /></p>
<p>The &#8216;Final screen&#8217; field is very important &#8211; you can customize the result of the quiz using this. Basically, what you fill in here will be shown when a user completes the quiz. You can use several variables here. For example, if you put in the text &#8216;%%SCORE%%&#8217;, it will be replaced by the score the user got in the quiz.</p>
<p>The other possible variables are&#8230;</p>
<table>
<tr>
<th style="text-align: left;">Variable</th>
<th style="text-align: left;">Value</th>
</tr>
<tr>
<td>%%SCORE%%</td>
<td>The number of correct answers</td>
</tr>
<tr>
<td>%%TOTAL%%</td>
<td>Total number of questions</td>
</tr>
<tr>
<td>%%PERCENTAGE%%</td>
<td>Correct answer percentage</td>
</tr>
<tr>
<td>%%GRADE%%</td>
<td>1-10 value. 1 is 10% or less, 2 is 20% or less, and so on.</td>
</tr>
<tr>
<td>%%WRONG_ANSWERS%%</td>
<td>Number of answers you got wrong</td>
</tr>
<tr>
<td>%%RATING%%</td>
<td>A rating of your performance &#8211; it could be &#8216;Failed&#8217;(0-39%), &#8216;Just Passed&#8217;(40%-50%), &#8216;Satisfactory&#8217;, &#8216;Competent&#8217;, &#8216;Good&#8217;, &#8216;Excellent&#8217; and &#8216;Unbeatable&#8217;(100%)</td>
</tr>
<tr>
<td>%%QUIZ_NAME%%</td>
<td>The name of the quiz</td>
</tr>
<tr>
<td>%%DESCRIPTION%%</td>
<td>The text entered in the description field.</td>
</tr>
</table>
<p>Once you have filled out this form, you will be taken to the next page where you can manage your questions. Click on the &#8216;Create new Question&#8217; to add your questions and answers. You have to select one of the answers as the correct one.</p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/quizzin_question.png" alt="Quizzin WordPress Plugin - New Question" title="Quizzin WordPress Plugin - New Question" width="376" height="428" class="alignnone size-full wp-image-200" /></p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/quizzin_mange_questions-300x245.png" alt="Quizzin WordPress Plugin - Mange Questions in Quiz" title="Quizzin WordPress Plugin - Mange Questions in Quiz" width="300" height="245" class="size-medium wp-image-201" /></p>
<p>After you have added all the question, create a new post and add the HTML comment [QUIZZIN 1] &#8211; here the 1 should be the ID of the quiz to be inserted. That&#8217;s it &#8211; you should have a working quiz on your blog now.</p>
<h2>See it in Action</h2>
<p>I have created a <a href="http://wordpress.binnyva.com/plugin/wordpress-quiz-quizzin-plugin-demo/">WordPress Quiz using the Quizzin plugin</a>. Lets see how well you know wordpress. If you take the quiz, post your results in the comments field.</p>
<h2>Credits</h2>
<p>Thanks to <a href="http://www.theanand.com/blog/">&#8216;The&#8217; Anand</a> for suggesting the idea of a Quiz plugin. Also, <a href="http://www.dailyseoblog.com/">Mani Karthik</a> provided a lot of encouragement to create the plugin.</p>
<p>As a matter of fact, Quizzin is the first plugin in the plugin week series. When those two suggested the Quiz plugin, my lazy brain immediately saw the benefits &#8211; I get 3 plugins for the price of one. Once the quiz plugin is created, just remove the correct answer option, limit the question to just one and record the answers &#8211; and you have a Poll plugin. To create a survey plugin, just remove the correct answer option and record the user&#8217;s input. You also need to create a interface to show the results. Voila &#8211; you have a survey plugin. That&#8217;s right &#8211; the <a href="http://www.bin-co.com/blog/2008/11/surveys-wordpress-plugin/">Pollin Plugin</a> and <a href="http://www.bin-co.com/blog/2008/11/surveys-wordpress-plugin/">Surveys plugin</a> are based on the Quizzin Plugin.</p>
<p>The <a href="http://www.bin-co.com/blog/2008/11/eventr-wordpress-plugin/">eventr plugin</a> was created for the <a href="http://www.barcampkerala.org/">Barcamp Kerala</a>. Again, the credit for its suggestion goes to Anand. After that plugin was ready, I am sitting on four unreleased plugins(that is, two plugins and an idea for two more) &#8211; that&#8217;s when the thought of doing a plugin week hit me. The rest, as they say, is history.</p>
<h2>Feedback</h2>
<p>If you have any suggestions or notice any problems with the Quizzin WordPress plugin, post it in the <a href="http://projects.binnyva.com/forum/viewforum.php?f=10">Quizzin forum</a>.</p>
<p>That&#8217;s it! Plugin week is over. 6 days, 6 plugins. Now, I have to go catch up on some much needed sleep. Happy Blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/11/quizzin-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>
		</item>
		<item>
		<title>Hello Script for C Language</title>
		<link>http://www.bin-co.com/blog/2008/07/hello-script-for-c-language/</link>
		<comments>http://www.bin-co.com/blog/2008/07/hello-script-for-c-language/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 17:41:49 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[scirpt]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=116</guid>
		<description><![CDATA[C &#8211; the root of all modern language&#8217;s syntax. Here is the hello script for C. A &#8216;Hello Script&#8216; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet when working with that language.
C is a general-purpose, block structured, procedural, imperative [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">C &#8211; the root of all modern language&#8217;s syntax. Here is the hello script for C. A &#8216;<a href="http://www.bin-co.com/blog/2008/03/learning-a-new-programming-language-the-hello-world-method/">Hello Script</a>&#8216; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet when working with that language.</p>
<blockquote><p>C is a general-purpose, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie. Although C was designed for implementing system software, it is also widely used for applications. It is widely used on a great many different software platforms and computer architectures, and several popular compilers exist.</p>
<p><a href="http://en.wikipedia.org/wiki/C_(programming_language)">Wikipedia</a></p></blockquote>
<p>Unfortunately, I am not an expert in C &#8211; I prefer dynamic languages over static ones. So if you find any problems in the script, please let me know in the comments.</p>
<pre><code class="c">
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

// Function declaration
void hello(char name[]) {
 	char result[50] = "Hello, ";
 	strcat(result, name);
 	printf("%s\n", result);
}

int main() {
	int i;
	// Printing(IO)
	printf("Hello World!\n");

	// Variables, concatenation
	char name[] = "Binny";
	int year = 2008;
	printf("Hello, %s - welcome to %d\n", name, year);

	//If, else
	if (year &gt; 2008) {
		printf("Welcome to the future - yes, we have flying cars!");
	}
	else if(year &lt; 2008) {
		printf("The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!");
	}
	else {
		printf("Anything wrong with your time machine? You have not gone anywhere, kiddo.");
	}
	printf("\n");

	// For loop
	for(i=0; i&lt;3; i++) {
		printf("%d) Hi there!\n", i);
	}

 	//Numerical Array, while
 	char rules[3][20]; //I am sure there is a better way of doing this using poiters. If you know, please leave a few 'pointers' in the comment.
 	strcpy(rules[0], "Do no harm");
 	strcpy(rules[1], "Obey");
 	strcpy(rules[2], "Continue Living");
 	i=0;
	while(i&lt;3) {
		printf("Rule %d : %s\n", i+1, rules[i]);
		i++;
	}

	// Struct - nearest thing C has to an associated array
	struct structure {
		char hello[20];
		int number;
		char foo[20];
	} associated, new_associated;
	strcpy(associated.hello, "world");
	associated.number = 1337;
	strcpy(associated.foo, "bar");
	printf("hello: %s\n", associated.hello);
	printf("number: %d\n", associated.number);
	printf("foo: %s\n", associated.foo);

	// Function calling
	hello("John Oldman");

	// Writing to a file
 	FILE *out;
 	out = fop<!-- fix wordpress bug -->en("/tmp/Hello.txt", "w");
 	char *str = "Hello From C";
 	fputs(str, out);
 	fclose(out);

	// Reading and displaying a file.
	FILE *in;
	in = fop<!-- fix wordpress bug -->en("Hello.c", "r");
	if (in) {
		while (!feof(in))
			printf("%c",fgetc(in));
	}
	fclose(in);

	// Run a system command.
	sys<!-- fix wordpress bug -->tem("ls");

	return 1;
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/07/hello-script-for-c-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
