<?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>Ethelcofie’s Thought-osphere &#187; Development Articles</title>
	<atom:link href="http://blog.ethelcofie.com/category/development-articles/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ethelcofie.com</link>
	<description>Bits and Bobs from Software development,New Technologies and other random stuff i have done</description>
	<lastBuildDate>Tue, 22 Dec 2009 01:59:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changes to come in the New Year</title>
		<link>http://blog.ethelcofie.com/2009/12/21/changes-to-come-in-the-new-year/</link>
		<comments>http://blog.ethelcofie.com/2009/12/21/changes-to-come-in-the-new-year/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 01:57:38 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>

		<guid isPermaLink="false">http://blog.ethelcofie.com/?p=156</guid>
		<description><![CDATA[All changes, even the most longed for, have their melancholy; for what we leave behind us is a part of ourselves; we must die to one life before we can enter another. ~Anatole France.
This quote encapsulates all the wonderful changes that will be happening in my personal and professional life in the New Year.
Stay Tuned
]]></description>
			<content:encoded><![CDATA[<blockquote><p>All changes, even the most longed for, have their melancholy; for what we leave behind us is a part of ourselves; we must die to one life before we can enter another. ~Anatole France.</p></blockquote>
<p>This quote encapsulates all the wonderful changes that will be happening in my personal and professional life in the New Year.<br />
Stay Tuned</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2009/12/21/changes-to-come-in-the-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Volunteer Skills maybe we can help</title>
		<link>http://blog.ethelcofie.com/2009/12/03/volunteer-skills-maybe-we-can-help/</link>
		<comments>http://blog.ethelcofie.com/2009/12/03/volunteer-skills-maybe-we-can-help/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 21:13:15 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[Experiences]]></category>
		<category><![CDATA[General Articles]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[volunteer]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.ethelcofie.com/?p=141</guid>
		<description><![CDATA[So once in a while i come across a website i really think needs improvement and i usually  talk ,blog or rant about the issues it has . 
My intention in all this is  not to show that the developers didnt do a good job , I am just saying there is a [...]]]></description>
			<content:encoded><![CDATA[<p>So once in a while i come across a website i really think needs improvement and i usually  talk ,blog or rant about the issues it has . </p>
<p>My intention in all this is  not to show that the developers didnt do a good job , I am just saying there is a lot of room for improvement .</p>
<p>There are a number  sites on my radar at the moment </p>
<ul>
<li><a href="http://www.mofa.gov.gh/"> The Ghana Ministry of Agriculture website</a> (Open in FireFox)Thanks <a href="http://twitter.com/Kwabena">Kwabena</a> for bringing it to my attention.</li>
<li><a href="http://www.africa-union.org/">The African Union Website</a> . I <a href="http://blog.ethelcofie.com/2009/07/26/usability-issues-with-the-african-union-website/">blogged </a>about  the usability issues of this website earlier this year .</li>
<li><a href="http://barcampafrica-uk.wikispaces.com/">The  BarCamp Africa UK website </a>(a shameless plug for me as i am one of the <a href="http://barcampafrica-uk.wikispaces.com/Organisers">organizers</a> and we use a wiki  at the moment and  looking to migrate to website next year )</ul>
</li>
<p>Instead of writting a blog post everytime i see websites that are not what they should be , I propose  we do something about it .<br />
<strong><br />
<em>The Plan:I am seeking  web developers,designers and usability consultants who will give thier skills pro bono(free) to consult on and even help in house teams to improve or even rebuild these websites .</em></p>
<p>My plea to the organisations :If you work for any of these organisations whose website is mentioned above please contact me at ethel@ethelcofie.com to see how we can help improve your website .</p>
<p>Also if you are a web developer,designer or usability consultant and wish to donate your skills to improve these website .please contact me at ethel@ethelcofie.com.<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2009/12/03/volunteer-skills-maybe-we-can-help/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BarCampAfrica UK</title>
		<link>http://blog.ethelcofie.com/2009/09/29/barcampafrica-uk/</link>
		<comments>http://blog.ethelcofie.com/2009/09/29/barcampafrica-uk/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 16:58:46 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>

		<guid isPermaLink="false">http://blog.ethelcofie.com/?p=138</guid>
		<description><![CDATA[Update
BarCamp Africa UK was a success with about a 100 attendees congregating at the Vodafone Offices generating very interesting and pertinant discussions . The event had really good reviews furthur updates are on the wiki page 
Videos
http://barcampafrica-uk.wikispaces.com/Streaming
http://bit.ly/3MHvus
Pictures
http://bit.ly/1Jr9zX
http://bit.ly/9tQUS
http://j.mp/2KGT1j
A Number of articles written about  event
http://bit.ly/2pLRDF
http://shkspr.mobi/blog/?p=1047




]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong><br />
BarCamp Africa UK was a success with about a 100 attendees congregating at the Vodafone Offices generating very interesting and pertinant discussions . The event had really good reviews furthur updates are on the <a href="http://barcampafrica-uk.wikispaces.com/">wiki page </a></p>
<p><strong>Videos</strong><br />
<a href="http://barcampafrica-uk.wikispaces.com/Streaming">http://barcampafrica-uk.wikispaces.com/Streaming</a><br />
<a href="http://bit.ly/3MHvus">http://bit.ly/3MHvus</a></p>
<p><strong>Pictures</strong><br />
<a href="http://bit.ly/1Jr9zX">http://bit.ly/1Jr9zX</a><br />
<a href="http://bit.ly/9tQUS">http://bit.ly/9tQUS</a><br />
<a href="http://j.mp/2KGT1j">http://j.mp/2KGT1j</a></p>
<p><strong>A Number of articles written about  event</strong><br />
<a href="http://bit.ly/2pLRDF">http://bit.ly/2pLRDF</a><br />
<a href="http://shkspr.mobi/blog/?p=1047">http://shkspr.mobi/blog/?p=1047<br />
</a><br />
<br/></p>
<p><br/></p>
<div style="width: 250px;"><iframe name="countdown" id="mgframe" src="http://www.eventbrite.com/countdown-widget?eid=414006304" width="250" height="493" marginheight="0" marginwidth="0" scrolling="no"  frameborder="0" ></iframe><a href="http://www.eventbrite.com/r/ecount"><img src="http://www.eventbrite.com/s.gif" alt="Events" border="0"/></a></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2009/09/29/barcampafrica-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://bit.ly/3MHvus" length="734429184" type="video/mp4" />
		</item>
		<item>
		<title>Ethel&#8217;s Creative Mill</title>
		<link>http://blog.ethelcofie.com/2009/09/21/ethels-creative-mill/</link>
		<comments>http://blog.ethelcofie.com/2009/09/21/ethels-creative-mill/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 18:46:51 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[General Articles]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[innovation]]></category>
		<category><![CDATA[me]]></category>

		<guid isPermaLink="false">http://blog.ethelcofie.com/?p=136</guid>
		<description><![CDATA[Trust that little voice in your head that says &#8220;Wouldn&#8217;t it be interesting if&#8230;” ~ Duane Michals
I always have ideas floating around head and most of them i forget and others  i realise i  might never get the chance and time to do any of these so please feel free to take and ran with [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Trust that little voice in your head that says &#8220;Wouldn&#8217;t it be interesting if&#8230;” ~ Duane Michals</strong></em></p>
<p>I always have ideas floating around head and most of them i forget and others  i realise i  might never get the chance and time to do any of these so please feel free to take and ran with any of these ideas as you will&#8230;.</p>
<p>A Female mentoring portal &#8211; A portal of females categorized according to career sectors or any additional</p>
<p>catogories to help match mentors and mentees(borne out my realising that i have never had a female mentor )</p>
<p>An ideas exchange portal or group where creative ideas are presented and interested parties can pick and work on</p>
<p>ideas(preference for a group though)</p>
<p>A tool that allows me to aggregate my calender from my phone and various calender into one place</p>
<p>will add to this list and when i remember the rest untill next time <img src='http://blog.ethelcofie.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2009/09/21/ethels-creative-mill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program for simulation of mutual exclusion with the use of semaphores</title>
		<link>http://blog.ethelcofie.com/2008/09/15/program-for-simulation-of-mutual-exclusion-with-the-use-of-semaphores/</link>
		<comments>http://blog.ethelcofie.com/2008/09/15/program-for-simulation-of-mutual-exclusion-with-the-use-of-semaphores/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 13:33:54 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[Research Articles]]></category>
		<category><![CDATA[Alogirithm]]></category>
		<category><![CDATA[SIMULATION OF MUTUAL EXCLUSION WITH THE USE OF SEMAPHOR]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=51</guid>
		<description><![CDATA[This java program simulates the use mutual exclusion using semaphores. The program involves four processes named process 1,2,3,4 who are competing for critical sections A,B,C,D,E,F,G. with a semaphore A for critical section A,sem Z for B,semC for B,sem D for section E, ,sem F for section F and lastly sem G for section G .]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong>Program for simulation of mutual exclusion with the use of semaphores </strong></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><strong>PROBLEM DESCRIPTION</strong></p>
<p class="MsoNormal">In operating systems the problem of mutual exclusion is very often encountered because of multiple processes that access, modify certain shared resources such as data structures .The operating system need to ensure that these shared data structures are not accessed and modified<span> </span>by multiple processes at the same time causing incorrect results for the processes involved. One of the solutions to the problem of mutual exclusion is to use semaphores which as defined by <a href="http://encyclopedia.thefreedictionary.com/">http://encyclopedia.thefreedictionary.com</a> as a <strong>protected</strong> variable (or abstract data type) and constitutes the classic method for restricting access to shared resources (e.g. storage) in a multiprogramming environment. <span> </span></p>
<p class="MsoNormal">Semaphores have two basic functions, P():checks if critical section is filled then blocks or allows process as appropriate() function: checks when a process leaves critical section and removes it from semaphore queue.</p>
<p class="MsoNormal">The semaphores are used to implement these rules: to at most one process uses the shared data structure at a time (critical section) and all processes get their turn with the shared resource</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>PROGRAM DESCRIPTION</strong></p>
<p class="MsoNormal">This java program simulates the use mutual exclusion using semaphores. The program involves four processes named process 1,2,3,4 who are competing for critical sections A,B,C,D,E,F,G. with a semaphore A for critical section A,sem Z for B,semC for B,sem D for section E, ,sem F for section F and lastly sem G for section G .</p>
<p class="MsoNormal">The simulation program implements mutual exclusion by implementing these three rules:</p>
<p class="MsoNormal">1. At most one process may execute in the critical section a time i.e. all processes that request a critical section that is occupied are denied request and are to wait.</p>
<p class="MsoNormal">2. Request to enter and exit a critical section is eventually succeed: All processes that have made a request for a critical section may be denied a request initially but after a wait will get into the critical section when it is available.</p>
<p class="MsoNormal">3. Critical section request are prioritized on First come first served basis</p>
<p class="MsoNormal">
<p class="MsoNormal"><strong>HOW PROGRAM WORKS </strong></p>
<p class="MsoNormal">The program simulates a random request by any number of the processes for any of critical sections and implements the management of these process request using mutual exclusion rules stated above.</p>
<p class="MsoNormal">The program works by creating four processes, then creating 7 semaphores along corresponding to the 7 critical sections. The implements a P function whose primary task is to check when a process makes critical section request using the counter variable whether or not the critical section is occupied if it is it blocks the process until critical section is vacant else removing process from process queue and adding it to the semaphore queue</p>
<p class="MsoNormal">The program also implements the V function whose primary duty is to check for a process leaving a critical section decrease counter value flagging the critical section as vacant .This is implemented after a process sends a message of leaving the process</p>
<p class="MsoNormal"><strong> </strong></p>
<p class="MsoNormal"><strong>ALGORITHM</strong></p>
<p class="MsoNormal"><span> </span>Create Processes</p>
<p class="MsoNormal"><span> </span>Create all 7 critical sections</p>
<p class="MsoNormal"><span> </span>Create corresponding semaphores for each critical section</p>
<p class="MsoNormal"><span> </span>If for a process request for a critical section</p>
<p class="MsoNormal">Then</p>
<p class="MsoNormal"><span> </span>Check if semaphore counter &gt;0</p>
<p class="MsoNormal"><span> </span>Refuse permission to enter section for process and request process to hold till critical section if available</p>
<p class="MsoNormal"><span> </span>Add process to semaphore queue</p>
<p class="MsoNormal"><span> </span><span> </span>If semaphore counter =0</p>
<p class="MsoNormal"><span> </span>Then</p>
<p class="MsoNormal"><span> </span>Grant permission to enter the critical section</p>
<p class="MsoNormal"><span> </span>Remove process from semaphore queue</p>
<p class="MsoNormal">
<p class="MsoNormal"><span> </span>If process sends an acknowledgement to leave the critical section</p>
<p class="MsoNormal"><span> </span>Then</p>
<p class="MsoNormal"><span> </span>Decrease semaphore counter</p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal"><strong>DRAWING OF A SCENARIO OF THE MUTUAL EXCLUSION SIMULATION PROGRAM</strong></p>
<p class="MsoNormal"><strong> </strong></p>
<div id="attachment_53" class="wp-caption alignnone" style="width: 586px"><a href="http://blog.ethelcofie.com/wp-content/uploads/2008/09/mutex2.gif"><img class="size-full wp-image-53" title="mutex2" src="http://blog.ethelcofie.com/wp-content/uploads/2008/09/mutex2.gif" alt="DRAWING OF A SCENARIO OF THE MUTUAL EXCLUSION" width="576" height="193" /></a><p class="wp-caption-text">DRAWING OF A SCENARIO OF THE MUTUAL EXCLUSION</p></div>
<p class="MsoNormal"><strong> </strong></p>
<p class="MsoNormal"><strong> </strong></p>
<p class="MsoNormal"><!--[if gte vml 1]&gt;   &lt;![endif]--><!--[if !vml]--></p>
<p><strong>SCREEN SHOT OF MUTUAL EXCLUSION INVOLVING FOUR PROCESSES AND 7 CRITICAL SECTIONS AND THEIR METAPHORS</strong></p>
<p class="MsoNormal"><a href="http://blog.ethelcofie.com/wp-content/uploads/2008/09/mutex.gif"><img class="alignnone size-full wp-image-52" title="mutex" src="http://blog.ethelcofie.com/wp-content/uploads/2008/09/mutex.gif" alt="" width="577" height="485" /></a></p>
<p class="MsoNormal"><!--[if gte vml 1]&gt;  &lt;![endif]--><!--[if !vml]--><!--[endif]--></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/09/15/program-for-simulation-of-mutual-exclusion-with-the-use-of-semaphores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Motivation for choosing a Career in Information Technology</title>
		<link>http://blog.ethelcofie.com/2008/08/31/my-motivation-for-choosing-a-career-in-information-technology/</link>
		<comments>http://blog.ethelcofie.com/2008/08/31/my-motivation-for-choosing-a-career-in-information-technology/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 11:12:06 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[My Motivation for choosing a Career in Information Tech]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=32</guid>
		<description><![CDATA[ I found a draft of my Graduate School Essay and it makes me  realise that my  reasons for starting a Bsc in Computer Science as a perlude to  career in IT still holds true today : enjoy
ETHEL DELALI COFIE
SUPPORTING STATEMENT
The computer is dumb;
I am smart and the computer is only as smart as the one who writes its [...]]]></description>
			<content:encoded><![CDATA[<p> I found a draft of my Graduate School Essay and it makes me  realise that my  reasons for starting a Bsc in Computer Science as a perlude to  career in IT still holds true today : enjoy</p>
<p>ETHEL DELALI COFIE<br />
SUPPORTING STATEMENT</p>
<p><strong>The computer is dumb;</strong><br />
I am smart and the computer is only as smart as the one who writes its logic.<br />
These were the thoughts that crossed my mind as I sat in my first programming class along with another thought “am I sure I understand correctly what this lecturer is saying”.<br />
I had signed up for this computer training class after my secondary school education to learn for the first time in my life about computers and how they worked and my first class had succeeded in revolutionizing the way I thought of computers.<br />
I begun think to myself, well this computer stuff isn’t that bad after all and then mentally put it on the list of my career options I was considering at the time. After 6 months of the computer training course, I decided that a career in computing was what I wanted; I therefore applied to Valley View University to pursue a BSc course in Computer science.</p>
<p>I was the unofficial Class President during my years in the university given that I was always the one who would organize and rally the class to complete tasks.<br />
To further illustrate; The course work for the Expert system course included developing six expert system modules individually using the Knowledge Wright development platform from about a hundred pages of system requirement documents. I rallied the class and we decided that different groups of students would analyze and develop one system each, and make a presentation to the class for approval and onward dissemination, cutting down the effort and time needed to develop the system individually and enabling all of us to get much needed sleep.</p>
<p>In the University I took a semester’s course in distributed systems but I really developed interest in the subject area after taking an internet based applications course. Learning about object oriented client based systems,J2EE,Corba,Ole/ActiveX ,the concept of autonomous computers working together but seeming as one coherent system and the connectivity offered by the internet I realized there was limitless possibilities in this subject area.<br />
I became fascinated for instance by the idea of developing a system connecting a company’s geographically dispersed sites as well as thousands of sales representatives which would effectively manage sales ,billing ,stock control ,delivery and order tracking all in real time .<br />
This fascination led me to develop for my final year project a java based Client Server system for electoral data collation and statistic generation. This software is part of the few projects selected to be showcased in Valley View University’s annual press exhibition to be held in March 2006.</p>
<p>During my years in the university I endeavoured to acquire knowledge not only in the classroom but also in industry:<br />
My first year summer break was spent as an intern in Softtribe one of West Africa foremost software houses. There I worked developing modules in C++ and Java for their major systems being developed at the time.</p>
<p>The second year summer break saw me studying French because I believe that to be successful you need to be internationally competitive.<br />
During my third year summer break I became an intern at INIIT a computing research and development firm. After that summer I stayed on and worked part-time through to my final year and then after Graduation went on to work with them fulltime.<br />
At INIIT, I initially worked on web applications using PHP and JavaScript, and then moved to system analysis and design.</p>
<p>I am presently the project leader involved in developing a Client Server System which will be accesses via the intranet using Visual basic and SqlServer and I also represented my organisation in an ICT, telecommunication and media convergence conference in Cotonou –Benin (West-Africa) in February 2006. This conference was organized by the Panos Institute West Africa ( CIPACO project), in collaboration with the Haute Autorité de l&#8217;Audiovisuel et de la Communication (HAAC) of Benin, the African Communication Regulation Authorities Network (ACRAN) and the West African Telecommunications Regulators Association (WATRA).<br />
I was also part of the writing of the Cotonou Appeal on the Regulation of Convergence the document adopted at the conference.</p>
<p>I aim not only to develop more systems with a bias towards distributed systems and gradually move into the management of my own multinational computing firm and this has influenced my choice to study for an MSc in Distributed Systems Integration at De Montfort University.<br />
This is because after a critical look at the course modules being offered I realised that there is the right blend of technical, management and e-business modules to give me the relevant skills, up-to-date tools and knowledge not only to be technologically savvy but also for management also because as stated in the prospectus the course was designed in conjunction with industry.</p>
<p><em>Ps : I didn&#8217;t end up going to De Montfort though they offered me a place ,<br />
I went to Brighton University because they offered me a scholarship and they were by the sea<br />
I do have my Msc in Distributed Systems now and everyday i happily work on a variety distributed Systems  be it a financial sysytem or a booking system</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/08/31/my-motivation-for-choosing-a-career-in-information-technology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Write to create a Lightbox Effect with Div&#8217;s and Javacript</title>
		<link>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript/</link>
		<comments>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 13:03:14 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[light box effect]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=17</guid>
		<description><![CDATA[How to Write to create a Lightbox Effect with Div&#8217;s and Javacript
The tutorial shows a the light box effect and the use of iframes (changing the src target of the iframe)
A quick and easy snipper of code  with minimal hassle
1.The Html Code 
&#60;html&#62;
&#60;head&#62;Light Box Effect &#60;/head&#62;
&#60;body&#62;
&#60;!&#8211;image that onclick triggers the light box effect  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Write to create a Lightbox Effect with Div&#8217;s and Javacript</strong></p>
<p>The tutorial shows a the light box effect and the use of iframes (changing the src target of the iframe)<br />
A quick and easy snipper of code  with minimal hassle</p>
<p><strong><em>1.The Html Code</em> </strong></p>
<p>&lt;html&gt;<br />
&lt;head&gt;Light Box Effect &lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;!&#8211;image that onclick triggers the light box effect  &#8211;&gt;<br />
&lt;img src=&#8221;Box.jpg&#8221; name=&#8221;Box Image&#8221; onclick=&#8217;LightEffect(&#8221;http://www.flickr.com/&#8221;)&#8217;/&gt;</p>
<p>&lt;!&#8211;Div which will show  light box effect  &#8211;&gt;<br />
&lt;div id=&#8217;light&#8217; class=&#8217;white_content&#8217; style=&#8221;&gt;<br />
&lt;a href=&#8217;javascript:void(0)&#8217; onclick=&#8217;CloseFrame();&#8217;&gt;Close&lt;/a&gt; &lt;!&#8211;Close button  &#8211;&gt;<br />
&lt;iframe id=&#8217;pictureframe&#8217; src=&#8221; width=&#8217;800&#8242; height=&#8217;800&#8242;&gt; &lt;/iframe&gt;&lt;/div&gt;&#8221;; &lt;!&#8211;iframe &#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;!&#8211;div the causes fade shadow ovwe web page &#8211;&gt;<br />
&lt;div id=&#8217;fade&#8217; class=&#8217;black_overlay&#8217;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p><strong><em>2.Then the  Javascript function that display lightbox effect .</em></strong></p>
<p>function LightEffect(source)<br />
{<br />
// new url retrieved<br />
var url =source;</p>
<p>// new iframe url set<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=url;</p>
<p>// make lightframe  div visible<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;block&#8217;;</p>
<p>//fadeout web page<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;block&#8217;;<br />
}</p>
<p><em><strong>3.Then the  function that closes the lighbox </strong></em></p>
<p>function CloseFrame()<br />
{<br />
// iframe url removed<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=&#8221;;</p>
<p>//make lightframe  div not visible<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;none&#8217;;</p>
<p>//remove fade from web page<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;none&#8217;;<br />
}</p>
<p><em><strong>4. The CSS section (to be out in seperate css document or within the html in the head section )</strong></em></p>
<p>.black_overlay{</p>
<p>display: none;<br />
position: absolute;</p>
<p>top: 0%;</p>
<p>left: 0%;</p>
<p>background-color: black;</p>
<p>z-index:1001;</p>
<p>-moz-opacity: 0.8;<br />
width: 100%;</p>
<p>height: 100%;</p>
<p>opacity:.80;</p>
<p>filter: alpha(opacity=80);</p>
<p>}</p>
<p>.white_content {</p>
<p>display: none;</p>
<p>position: absolute;</p>
<p>top: 25%;</p>
<p>left: 25%;</p>
<p>border: 16px solid orange;</p>
<p>background-color: white;</p>
<p>z-index:1002;</p>
<p>overflow: auto;<br />
width: 800px;</p>
<p>height: 800px;</p>
<p>padding: 16px;</p>
<p>}</p>
<p><em><strong>5.Complete Code </strong></em></p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Light Box Effect &lt;/title    &gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>.black_overlay{</p>
<p>display: none;<br />
position: absolute;</p>
<p>top: 0%;</p>
<p>left: 0%;</p>
<p>background-color: black;</p>
<p>z-index:1001;</p>
<p>-moz-opacity: 0.8;<br />
width: 100%;</p>
<p>height: 100%;</p>
<p>opacity:.80;</p>
<p>filter: alpha(opacity=80);</p>
<p>}</p>
<p>.white_content {</p>
<p>display: none;</p>
<p>position: absolute;</p>
<p>top: 25%;</p>
<p>left: 25%;</p>
<p>border: 16px solid orange;</p>
<p>background-color: white;</p>
<p>z-index:1002;</p>
<p>overflow: auto;<br />
width: 800px;</p>
<p>height: 800px;</p>
<p>padding: 16px;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;!&#8211;javascript  &#8211;&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function LightEffect(source)<br />
{</p>
<p>var url =source;<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=url;<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;block&#8217;;<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;block&#8217;;<br />
}</p>
<p>function CloseFrame()<br />
{<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=&#8221;;<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;none&#8217;;<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;none&#8217;;<br />
}<br />
&lt;/script&gt;</p>
<p>&lt;!&#8211;image that onclick triggers the light box effect  &#8211;&gt;<br />
&lt;img src=&#8221;Box.jpg&#8221; name=&#8221;Box Image&#8221; onclick=&#8217;LightEffect(&#8221;http://www.flickr.com/&#8221;)&#8217;/&gt;</p>
<p>&lt;!&#8211;Div which will show  light box effect  &#8211;&gt;<br />
&lt;div id=&#8217;light&#8217; class=&#8217;white_content&#8217; style=&#8221;&gt;<br />
&lt;a href=&#8217;javascript:void(0)&#8217; onclick=&#8217;CloseFrame();&#8217;&gt;Close&lt;/a&gt; &lt;!&#8211;Close button  &#8211;&gt;<br />
&lt;iframe id=&#8217;pictureframe&#8217; src=&#8221; width=&#8217;800&#8242; height=&#8217;800&#8242;&gt; &lt;/iframe&gt;&lt;/div&gt;&#8221;; &lt;!&#8211;iframe &#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;!&#8211;div the causes fade shadow ovwe web page &#8211;&gt;<br />
&lt;div id=&#8217;fade&#8217; class=&#8217;black_overlay&#8217;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Hope this tutorial was helpful</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Write to create a Lightbox Effect with Div&#8217;s and Javacript</title>
		<link>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript-2/</link>
		<comments>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript-2/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 13:03:14 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[light box effect]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=17</guid>
		<description><![CDATA[How to Write to create a Lightbox Effect with Div&#8217;s and Javacript
The tutorial shows a the light box effect and the use of iframes (changing the src target of the iframe)
A quick and easy snipper of code  with minimal hassle
1.The Html Code 
&#60;html&#62;
&#60;head&#62;Light Box Effect &#60;/head&#62;
&#60;body&#62;
&#60;!&#8211;image that onclick triggers the light box effect  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Write to create a Lightbox Effect with Div&#8217;s and Javacript</strong></p>
<p>The tutorial shows a the light box effect and the use of iframes (changing the src target of the iframe)<br />
A quick and easy snipper of code  with minimal hassle</p>
<p><strong><em>1.The Html Code</em> </strong></p>
<p>&lt;html&gt;<br />
&lt;head&gt;Light Box Effect &lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;!&#8211;image that onclick triggers the light box effect  &#8211;&gt;<br />
&lt;img src=&#8221;Box.jpg&#8221; name=&#8221;Box Image&#8221; onclick=&#8217;LightEffect(&#8221;http://www.flickr.com/&#8221;)&#8217;/&gt;</p>
<p>&lt;!&#8211;Div which will show  light box effect  &#8211;&gt;<br />
&lt;div id=&#8217;light&#8217; class=&#8217;white_content&#8217; style=&#8221;&gt;<br />
&lt;a href=&#8217;javascript:void(0)&#8217; onclick=&#8217;CloseFrame();&#8217;&gt;Close&lt;/a&gt; &lt;!&#8211;Close button  &#8211;&gt;<br />
&lt;iframe id=&#8217;pictureframe&#8217; src=&#8221; width=&#8217;800&#8242; height=&#8217;800&#8242;&gt; &lt;/iframe&gt;&lt;/div&gt;&#8221;; &lt;!&#8211;iframe &#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;!&#8211;div the causes fade shadow ovwe web page &#8211;&gt;<br />
&lt;div id=&#8217;fade&#8217; class=&#8217;black_overlay&#8217;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p><strong><em>2.Then the  Javascript function that display lightbox effect .</em></strong></p>
<p>function LightEffect(source)<br />
{<br />
// new url retrieved<br />
var url =source;</p>
<p>// new iframe url set<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=url;</p>
<p>// make lightframe  div visible<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;block&#8217;;</p>
<p>//fadeout web page<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;block&#8217;;<br />
}</p>
<p><em><strong>3.Then the  function that closes the lighbox </strong></em></p>
<p>function CloseFrame()<br />
{<br />
// iframe url removed<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=&#8221;;</p>
<p>//make lightframe  div not visible<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;none&#8217;;</p>
<p>//remove fade from web page<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;none&#8217;;<br />
}</p>
<p><em><strong>4. The CSS section (to be out in seperate css document or within the html in the head section )</strong></em></p>
<p>.black_overlay{</p>
<p>display: none;<br />
position: absolute;</p>
<p>top: 0%;</p>
<p>left: 0%;</p>
<p>background-color: black;</p>
<p>z-index:1001;</p>
<p>-moz-opacity: 0.8;<br />
width: 100%;</p>
<p>height: 100%;</p>
<p>opacity:.80;</p>
<p>filter: alpha(opacity=80);</p>
<p>}</p>
<p>.white_content {</p>
<p>display: none;</p>
<p>position: absolute;</p>
<p>top: 25%;</p>
<p>left: 25%;</p>
<p>border: 16px solid orange;</p>
<p>background-color: white;</p>
<p>z-index:1002;</p>
<p>overflow: auto;<br />
width: 800px;</p>
<p>height: 800px;</p>
<p>padding: 16px;</p>
<p>}</p>
<p><em><strong>5.Complete Code </strong></em></p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Light Box Effect &lt;/title    &gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>.black_overlay{</p>
<p>display: none;<br />
position: absolute;</p>
<p>top: 0%;</p>
<p>left: 0%;</p>
<p>background-color: black;</p>
<p>z-index:1001;</p>
<p>-moz-opacity: 0.8;<br />
width: 100%;</p>
<p>height: 100%;</p>
<p>opacity:.80;</p>
<p>filter: alpha(opacity=80);</p>
<p>}</p>
<p>.white_content {</p>
<p>display: none;</p>
<p>position: absolute;</p>
<p>top: 25%;</p>
<p>left: 25%;</p>
<p>border: 16px solid orange;</p>
<p>background-color: white;</p>
<p>z-index:1002;</p>
<p>overflow: auto;<br />
width: 800px;</p>
<p>height: 800px;</p>
<p>padding: 16px;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;!&#8211;javascript  &#8211;&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function LightEffect(source)<br />
{</p>
<p>var url =source;<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=url;<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;block&#8217;;<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;block&#8217;;<br />
}</p>
<p>function CloseFrame()<br />
{<br />
parent.document.getElementById(&#8221;pictureframe&#8221;).src=&#8221;;<br />
document.getElementById(&#8221;light&#8221;).style.display=&#8217;none&#8217;;<br />
document.getElementById(&#8221;fade&#8221;).style.display=&#8217;none&#8217;;<br />
}<br />
&lt;/script&gt;</p>
<p>&lt;!&#8211;image that onclick triggers the light box effect  &#8211;&gt;<br />
&lt;img src=&#8221;Box.jpg&#8221; name=&#8221;Box Image&#8221; onclick=&#8217;LightEffect(&#8221;http://www.flickr.com/&#8221;)&#8217;/&gt;</p>
<p>&lt;!&#8211;Div which will show  light box effect  &#8211;&gt;<br />
&lt;div id=&#8217;light&#8217; class=&#8217;white_content&#8217; style=&#8221;&gt;<br />
&lt;a href=&#8217;javascript:void(0)&#8217; onclick=&#8217;CloseFrame();&#8217;&gt;Close&lt;/a&gt; &lt;!&#8211;Close button  &#8211;&gt;<br />
&lt;iframe id=&#8217;pictureframe&#8217; src=&#8221; width=&#8217;800&#8242; height=&#8217;800&#8242;&gt; &lt;/iframe&gt;&lt;/div&gt;&#8221;; &lt;!&#8211;iframe &#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;!&#8211;div the causes fade shadow ovwe web page &#8211;&gt;<br />
&lt;div id=&#8217;fade&#8217; class=&#8217;black_overlay&#8217;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Hope this tutorial was helpful</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/08/27/how-to-write-to-create-a-lightbox-effect-with-divs-and-javacript-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Write a Process Order Stored Procedure in T-SQL</title>
		<link>http://blog.ethelcofie.com/2008/07/29/how-to-write-a-process-order-stored-procedure-in-t-sql/</link>
		<comments>http://blog.ethelcofie.com/2008/07/29/how-to-write-a-process-order-stored-procedure-in-t-sql/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 14:02:59 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[order processing]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[T-SQL notes]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=12</guid>
		<description><![CDATA[This Persistent stored module Process Processes Orders by reading the oldest unfulfilled Order and Flags it status as Fulfilled when there is enough stock to fulfil other or leaves to Unfulfilled or Awaiting Stock otherwise]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="text-align:justify;margin:0;"><strong><span style="font-size: small;"><span style="font-family: Times New Roman;">PERSISTANT STORED MODULE CHOSEN: PROCESS ORDER</span></span></strong></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>This Persistent stored module Process Processes Orders by reading the oldest unfulfilled Order and Flags it status as Fulfilled when there is enough stock to fulfil other or leaves to Unfulfilled or Awaiting Stock otherwise.</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-size: small; font-family: Times New Roman;"> Database Structure</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<div class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-size: small; font-family: Times New Roman;"> </span></span></div>
<div id="attachment_10" class="wp-caption alignnone" style="width: 310px"><a href="http://etheldcofie.files.wordpress.com/2008/07/db.jpg"><img class="size-medium wp-image-10" src="http://etheldcofie.files.wordpress.com/2008/07/db.jpg?w=300" alt="Stock control database" width="300" height="268" /></a><p class="wp-caption-text">Stock control database</p></div>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span><strong>5.1 Pseudocode</strong></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>START</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Get <span> </span>oldest Unfufilled Order data</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Get the catalogue data for that Order </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>For Each Catalogue Item</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>If<span> </span>Catalogue Item type is Stock<span> </span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Then</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>if<span> </span>Catlogue Item available stock&gt; Catalogue Order Quantity</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span><span> </span>Then</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Set Order Status =Fufilled</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Else </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Set Order Status=Awaiting Stock</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>STOP</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Else if<span> </span>Catalogue Item type is Non-Stock<span> </span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>Create supplier Order</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small;"><span style="font-family: Times New Roman;"><span> </span>If<span> </span>Error in<span> </span>then return transaction to former state</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small; font-family: Times New Roman;">STOP</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="text-indent:-18pt;text-align:justify;margin:0 0 0 33pt;"><span style="font-family: Times New Roman;"><strong><span><span style="font-size: small;">5.2</span><span style="font-family: &quot;&quot;;"> </span></span></strong><strong><span style="font-size: small;">Actual code</span></strong></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><strong><span style="font-size: small; font-family: Times New Roman;"> </span></strong></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-size: small; font-family: Times New Roman;"> </span></span><span style="font-size: 10pt; color: #0000ff;">CREATE</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> <span style="color: #0000ff;">PROCEDURE</span> [dbo]<span style="color: #808080;">.</span>[ProcessOrder] </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; Add the parameters for the stored procedure here</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">AS</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">BEGIN</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; SET NOCOUNT ON added to prevent extra result sets from</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; interfering with SELECT statements.</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">SET</span> <span style="color: #0000ff;">NOCOUNT</span> <span style="color: #0000ff;">ON</span><span style="color: #808080;">;</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @catId <span style="color: #0000ff;">varchar</span><span style="color: #808080;">(</span><span style="color: #ff00ff;">max</span><span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @count <span style="color: #0000ff;">int</span><span> </span><span style="color: #008000;">&#8211;count</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @iRow <span style="color: #0000ff;">int</span><span> </span><span style="color: #008000;">&#8211;showing number of rows</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @itemtype <span style="color: #0000ff;">varchar</span><span style="color: #808080;">(</span>50<span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @available_stock <span style="color: #0000ff;">int</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @orderqty <span style="color: #0000ff;">int</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @Orderid <span style="color: #0000ff;">varchar</span><span style="color: #808080;">(</span><span style="color: #ff00ff;">max</span><span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">declare</span> @checkAwaiting <span style="color: #0000ff;">int</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; Insert statements for procedure here</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">DECLARE</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @tbl <span style="color: #0000ff;">TABLE</span><span style="color: #808080;">(</span><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span>RowID <span style="color: #0000ff;">INT</span> <span style="color: #0000ff;">IDENTITY</span><span style="color: #808080;">(</span>1<span style="color: #808080;">,</span> 1<span style="color: #808080;">),</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span>CatlID <span style="color: #0000ff;">VARCHAR</span><span style="color: #808080;">(</span><span style="color: #ff00ff;">Max</span><span style="color: #808080;">),</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span>Qty <span style="color: #0000ff;">INT</span><span style="color: #808080;">,</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span>OrderID <span style="color: #0000ff;">VARCHAR</span><span style="color: #808080;">(</span><span style="color: #ff00ff;">MAX</span><span style="color: #808080;">))</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">INSERT</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @tbl </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">SELECT</span> Catl_id<span style="color: #808080;">,</span>Quantity<span style="color: #808080;">,</span>Order_id <span style="color: #0000ff;">from</span> dbo<span style="color: #808080;">.</span>VwUnfufilledOrders <span style="color: #0000ff;">where</span> VwUnfufilledOrders<span style="color: #808080;">.</span>Order_date<span style="color: #808080;">=(</span><span style="color: #0000ff;">Select</span> <span style="color: #ff00ff;">min</span><span style="color: #808080;">(</span>VwUnfufilledOrders<span style="color: #808080;">.</span>Order_date<span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">from</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> dbo<span style="color: #808080;">.</span>VwUnfufilledOrders<span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #808080;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">SET</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @count <span style="color: #808080;">=</span> <span style="color: #ff00ff;">@@ROWCOUNT</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">SET</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @iRow <span style="color: #808080;">=</span> 1</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">set</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @checkAwaiting<span style="color: #808080;">=</span>0</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">Select</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @count</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Begin</span> <span style="color: #0000ff;">transaction</span><span style="color: #008000;">&#8211; start transcation</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211;call function for availability</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #008000;">&#8212;start loop to check for availabilty of every catlogue item</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">WHILE</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> @iRow <span style="color: #808080;">&lt;=</span> @count</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">begin</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Select</span> @catId<span style="color: #808080;">=</span>CatlID<span style="color: #808080;">,</span>@orderqty<span style="color: #808080;">=</span>Qty<span style="color: #808080;">,</span>@Orderid<span style="color: #808080;">=</span>OrderID <span style="color: #0000ff;">from</span> @tbl <span style="color: #0000ff;">where</span> RowID<span style="color: #808080;">=</span>@iRow</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span> </span><span style="color: #0000ff;">select</span> @itemtype<span style="color: #808080;">=</span>Item_Type<span style="color: #808080;">,</span> @available_stock<span style="color: #808080;">=</span>Available_stock <span style="color: #0000ff;">from</span> dbo<span style="color: #808080;">.</span>Catlogue_Item <span style="color: #0000ff;">where</span> Catl_id<span style="color: #808080;">=</span>@catId</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">if</span> <span style="color: #808080;">(</span>@itemtype<span style="color: #808080;">=</span><span style="color: #ff0000;">&#8216;Stock&#8217;</span><span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">begin</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">print</span> <span style="color: #ff0000;">&#8216;Order id is&#8217;</span><span style="color: #808080;">+</span>@Orderid<span style="color: #808080;">+</span><span style="color: #ff0000;">&#8216;with number of rows=&#8217;</span><span style="color: #808080;">+</span> <span style="color: #ff00ff;">convert</span><span style="color: #808080;">(</span><span style="color: #0000ff;">varchar</span><span style="color: #808080;">,</span>@count<span style="color: #808080;">)</span> <span style="color: #808080;">+</span><span style="color: #ff0000;">&#8216;it is a stock item&#8217;</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">if</span><span style="color: #808080;">(</span>@available_stock<span style="color: #808080;">&gt;</span>@orderqty<span style="color: #808080;">)</span> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">begin</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">print</span> <span style="color: #ff0000;">&#8216;Oder id is&#8217;</span><span style="color: #808080;">+</span>@Orderid<span style="color: #808080;">+</span><span style="color: #ff0000;">&#8216; /with Qty=&#8217;</span><span style="color: #808080;">+</span> <span style="color: #ff00ff;">convert</span><span style="color: #808080;">(</span><span style="color: #0000ff;">varchar</span><span style="color: #808080;">(</span>50<span style="color: #808080;">),</span>@orderqty<span style="color: #808080;">)</span> <span style="color: #808080;">+</span><span style="color: #ff0000;">&#8216;and available stock=&#8217;</span><span style="color: #808080;">+</span><span style="color: #ff00ff;">convert</span><span style="color: #808080;">(</span><span style="color: #0000ff;">varchar</span><span style="color: #808080;">(</span>50<span style="color: #808080;">),</span>@available_stock<span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Update</span> dbo<span style="color: #808080;">.</span>CustOrder <span style="color: #0000ff;">set</span> Status<span style="color: #808080;">=</span><span style="color: #ff0000;">&#8216;Fufilled&#8217;</span> <span style="color: #0000ff;">where</span> Order_id<span style="color: #808080;">=</span>@Orderid</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">If</span> <span style="color: #ff00ff;">@@error</span> <span style="color: #808080;">&lt;&gt;</span> 0 </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span style="color: #0000ff;"> goto</span> ERR_HANDLER</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span></span><span style="font-size: 10pt; font-family: &quot;&quot;;"><span style="color: #0000ff;">end</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">else</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">begin</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Update</span> dbo<span style="color: #808080;">.</span>CustOrder <span style="color: #0000ff;">set</span> Status<span style="color: #808080;">=</span><span style="color: #ff0000;">&#8216;UnFufilled&#8217;</span> <span style="color: #0000ff;">where</span> <a href="mailto:Order_id=@Orderid">Order_id<span style="color: #808080;">=</span>@Orderid</a></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">print</span> <span style="color: #ff0000;">&#8216;Qty not enough&#8217;</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">set</span> @checkAwaiting<span style="color: #808080;">=</span>1</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">goto</span> ERR_HANDLER</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; stock insufficient so Order status remains unfufilled</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211;call stock replenish function</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">end</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">end</span> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">if</span> <span style="color: #808080;">(</span>@itemtype<span style="color: #808080;">=</span><span style="color: #ff0000;">&#8216;NonStock&#8217;</span><span style="color: #808080;">)</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span> </span><span style="color: #0000ff;">begin</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #008000;">&#8211; create supplier order</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">print</span> <span style="color: #ff0000;">&#8216;Its a supplier direct order&#8217;</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">end</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">SET</span> @iRow <span style="color: #808080;">=</span> @iRow <span style="color: #808080;">+</span> 1</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">end</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">Commit</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> <span style="color: #0000ff;">Transaction</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">Return</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> 0</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;">ERR_HANDLER<span style="color: #808080;">:</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Select</span> <span style="color: #ff0000;">&#8216;Unexpected error occurred!&#8217;</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Rollback</span> <span style="color: #0000ff;">transaction</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">if</span><span style="font-size: 10pt; font-family: &quot;&quot;;"> <span style="color: #808080;">(</span> @checkAwaiting<span style="color: #808080;">=</span>1<span style="color: #808080;">)</span><span style="color: #0000ff;">Update</span> dbo<span style="color: #808080;">.</span>CustOrder <span style="color: #0000ff;">set</span> Status<span style="color: #808080;">=</span><span style="color: #ff0000;">&#8216;AwaitingStock&#8217;</span> <span style="color: #0000ff;">where</span> Order_id<span style="color: #808080;">=</span>@Orderid<span style="color: #008000;">&#8211; to be removed</span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; font-family: &quot;&quot;;"><span> </span><span style="color: #0000ff;">Return</span> 1</span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size: 10pt; color: #0000ff;">END</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/07/29/how-to-write-a-process-order-stored-procedure-in-t-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickr API: How to perform Authentication using PHP</title>
		<link>http://blog.ethelcofie.com/2008/05/19/flickr-api-how-to-perform-authenticating-using-php/</link>
		<comments>http://blog.ethelcofie.com/2008/05/19/flickr-api-how-to-perform-authenticating-using-php/#comments</comments>
		<pubDate>Mon, 19 May 2008 13:32:26 +0000</pubDate>
		<dc:creator>ethelcofie</dc:creator>
				<category><![CDATA[Development Articles]]></category>
		<category><![CDATA[flickr api]]></category>
		<category><![CDATA[flickr api authentication]]></category>

		<guid isPermaLink="false">http://etheldcofie.wordpress.com/?p=8</guid>
		<description><![CDATA[I presented this at Brighton BArCamp3 download power point
//1.Create a login link
$secret_key=&#8217;secret key&#8217;;
$params = array(
&#8216;api_key&#8217;=&#62; &#8216;api_key&#8217;,
&#8216;perms&#8217; =&#62; &#8216;write&#8217;);
$encoded_param = array();
//1.a Encode and organize authentication parameters
foreach($params as $key =&#62; $value)
{
$encoded_params[] = urlencode($key).&#8217;=&#8217;.urlencode($value);
}
//1b Create the api signature :an md5 of the parameters in alphabetic order

$apisig=md5($secret_key.&#8217;api_key&#8217;.$params['api_key'].&#8217;perms&#8217;.$params['perms']);
//1.c append api signature to url
$url =&#8221;http://flickr.com/services/auth/?&#8221;.
implode(&#8217;&#38;&#8217;,$encoded_params).&#8221;&#38;api_sig=&#8221;.$apisig;
header(&#8217;Location:&#8217;.$url); &#8211;&#62;This will then redirect back to [...]]]></description>
			<content:encoded><![CDATA[<p>I presented this at Brighton BArCamp3 <a href="http://blog.ethelcofie.com/wp-content/uploads/2008/09/flickr-php2.ppt" target="_blank">download power point</a></p>
<p><strong>//1.Create a login link</strong></p>
<p>$secret_key=&#8217;secret key&#8217;;</p>
<p>$params = array(<br />
&#8216;api_key&#8217;=&gt; &#8216;api_key&#8217;,<br />
&#8216;perms&#8217; =&gt; &#8216;write&#8217;);</p>
<p>$encoded_param = array();</p>
<p><strong>//1.a Encode and organize authentication parameters</strong></p>
<p>foreach($params as $key =&gt; $value)<br />
{<br />
$encoded_params[] = urlencode($key).&#8217;=&#8217;.urlencode($value);<br />
}</p>
<p><strong>//1b Create the api signature :an md5 of the parameters in alphabetic order</strong></p>
<p><strong></strong><br />
$apisig=md5($secret_key.&#8217;api_key&#8217;.$params['api_key'].&#8217;perms&#8217;.$params['perms']);</p>
<p><strong>//1.c append api signature to url</strong></p>
<p>$url =&#8221;<a href="http://flickr.com/services/auth/?">http://flickr.com/services/auth/?&#8221;.</a></p>
<p>implode(&#8217;&amp;&#8217;,$encoded_params).&#8221;&amp;api_sig=&#8221;.$apisig;</p>
<p>header(&#8217;Location:&#8217;.$url); &#8211;&gt;<strong>This will then redirect back to your call back url and include a frob value</strong></p>
<p><strong>//2.Get and use frob to retrive authentication token</strong></p>
<p><strong>//2.a Get frob from url </strong></p>
<p>if ($_REQUEST['frob'])<br />
{<br />
<em>//using  php_serial paramater serial to retrieve the format in serialized data structure<br />
</em> $frobparams = array(<br />
&#8216;api_key&#8217;=&gt; &#8216;api_key&#8217;,<br />
&#8216;frob&#8217; =&gt; &#8216;frob&#8217; ,<br />
&#8216;method&#8217; =&gt; &#8216;flickr.auth.getToken&#8217;,<br />
&#8216;format&#8217; =&gt; &#8216;php_serial&#8217;);</p>
<p>$encoded_param = array();</p>
<p>foreach($frobparams as $key =&gt; $value)<br />
{<br />
$encoded_params[] = urlencode($key).&#8217;=&#8217;.urlencode($value);<br />
}<br />
$url = &#8220;<a href="http://api.flickr.com/services/rest/?">http://api.flickr.com/services/rest/?&#8221;.implode(&#8217;&amp;&#8217;</a>, $encoded_params);</p>
<p><strong>//2.bCreate the api signature :an md5 of the parameters in alphabetic order</strong></p>
<p>$apisigfrob=md5(</p>
<p>$secret_key.</p>
<p>&#8216;api_key&#8217;.  $frobparams ['api_key'].</p>
<p style="text-align:left;">&#8216;format&#8217;.$frobparams ['format'].</p>
<p style="text-align:left;">&#8216;frob&#8217;.$frobparam['frob'].</p>
<p style="text-align:left;">&#8216;method&#8217;.$frobparams['method']);</p>
<p><strong></strong></p>
<p><strong>//2.c Construct url to auth.getToken</strong></p>
<p>$url=$url.&#8221;&amp;api_sig=&#8221;.$apisigfrob;</p>
<p><strong></strong></p>
<p><strong>// 2.d Get url response/contents</strong><br />
$rsp = file_get_contents($url);</p>
<p>$rsp_obj = unserialize($rsp);</p>
<p>$details=$rsp_obj;</p>
<p><strong></strong></p>
<p><strong>//2.e Glean Auth Token from $details</strong></p>
<p>if($details[stat]==&#8217;ok&#8217;)<br />
{<br />
echo  $details['auth']['token']['_content'];<br />
}<br />
else<br />
{</p>
<p>//dispaly error message if there is a problem<br />
echo  $details [message]    ;</p>
<p>}</p>
<p>}</p>
<p><strong>Just getting started:</strong> The Authentication Token can then be ussed as part of the parameter for a method call</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ethelcofie.com/2008/05/19/flickr-api-how-to-perform-authenticating-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
