<?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>IDIFY Solutions LLP &#187; Uncategorized</title>
	<atom:link href="http://blog.idifysolutions.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.idifysolutions.com</link>
	<description>I Do It For You</description>
	<lastBuildDate>Wed, 13 Mar 2013 14:59:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>send_data vs send_file in Rails</title>
		<link>http://blog.idifysolutions.com/2013/03/send_data-vs-send_file-in-rails/</link>
		<comments>http://blog.idifysolutions.com/2013/03/send_data-vs-send_file-in-rails/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 14:59:19 +0000</pubDate>
		<dc:creator>manish</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=168</guid>
		<description><![CDATA[send_data: &#8212;&#8212;&#8212;&#8212; send_data, Sends the given data to the browser. This method allows you to specify if the browser should display the response as a file attachment i.e. in a download or as inline data i.e; showing the output on the browser. For the send_data we may set the content type, the file name etc, [...]]]></description>
			<content:encoded><![CDATA[<p><strong id="internal-source-marker_0.7509905747137964">send_data:<br />
&#8212;&#8212;&#8212;&#8212;<br />
send_data, Sends the given data to the browser. This method allows you to specify if the browser should display the response as a file attachment i.e. in a download or as inline data i.e; showing the output on the browser. For the send_data we may set the content type, the file name etc,</strong></p>
<p>The options of a send_data are:</p>
<p>:filename &#8211; specifying a filename for the use on browser.<br />
:type &#8211; specifies an HTTP content type. Defaults to ‘application/octet-stream’. we can specify either pdf/excel.<br />
:disposition &#8211; specifies that the file shown inline or downloaded. Valid values are ‘inline’ and ‘attachment’ .Here attachment is the default dispostion.<br />
:status &#8211; specifies the status code to send with the response. Defaults to ‘200 OK’.</p>
<p>eg:<br />
send_data( out_data, :type =&gt; &#8220;text/xml&#8221;, :filename =&gt; &#8220;sample.xml&#8221;,:dispostion=&gt;&#8217;inline&#8217;,:status=&gt;&#8217;200 OK&#8217; )</p>
<p>send_file:<br />
&#8212;&#8212;&#8212;&#8211;<br />
send_file ,Sends the file, by default it streams 4096 bytes at a time. This way the whole file doesn‘t need to be read into memory at once. This makes feasible to send even large files. You can optionally turn off streaming and send the whole file at once.<br />
send_file(params[:path]) allows a malicious user to download any file on your server so need to be careful.</p>
<p>:filename &#8211; specifying a filename for the use on browser.<br />
:type &#8211; specifies an HTTP content type. Defaults to ‘application/octet-stream’. we can specify either pdf/xml.<br />
:length &#8211; used to manually override the length in bytes of the content whic is sent to the client. Defaults to File.size(path).<br />
:disposition &#8211; sspecifies that the file shown inline or downloaded. Valid values are ‘inline’ and ‘attachment’ .Here attachment is the default dispostion.<br />
:buffer_size &#8211; specifies size which in bytes of the buffer which is used to stream the file. Defaults to 4096.<br />
:status &#8211; specifies the status code to send with the response. Default is ‘200 OK’.<br />
:stream &#8211; whether to send the file to the user as it is read (true) or to read the entire file before send (false). Defaults to true.</p>
<p>send_file( out_data, :type =&gt; &#8220;text/xml&#8221;, :filename =&gt; &#8220;sample.xml&#8221;,:dispostion=&gt;&#8217;inline&#8217;,:status=&gt;&#8217;200 OK&#8217;,:stream=&gt;&#8217;true&#8217; )</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2013/03/send_data-vs-send_file-in-rails/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2013/03/send_data-vs-send_file-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ERROR: rvm requires autoreconf to install the selected ruby interpreter however autoreconf was not found in the PATH.</title>
		<link>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/</link>
		<comments>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 04:34:16 +0000</pubDate>
		<dc:creator>pardeep</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=141</guid>
		<description><![CDATA[This problem generally occurs in 1.8.7-head In ubuntu this can solve your problem. &#160; apt-get install automake Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>This problem generally occurs in 1.8.7-head</p>
<p>In ubuntu this can solve your problem.</p>
<p>&nbsp;</p>
<p>apt-get install automake</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Partition of a number</title>
		<link>http://blog.idifysolutions.com/2011/09/partition-of-a-number/</link>
		<comments>http://blog.idifysolutions.com/2011/09/partition-of-a-number/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 15:08:58 +0000</pubDate>
		<dc:creator>pardeep</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=112</guid>
		<description><![CDATA[for eg: user entered =5 1+1+1+1+1 1+4 2+3 3+1+1 1+2+2 1+1+1+2 #include&#60;stdio.h&#62; #include&#60;conio.h&#62; void ste(int); int main() { int cnt,n1,i,temp,n2,n3,n4,n5,z; z=cnt=0; clrscr(); printf("enter any number"); scanf("%d",&#38;n1); for(i=n1;i&#62;1;i--) { for(n2=i-1;n2&#62;=i/2;n2--) { for(n3=i/2;n3&#62;0;n3--) { temp=n2+n3; if(temp==i) { if(!(n2==n5&#38;&#38;n3==n4)) { printf("%d+%d",n2,n3); ste(z); cnt++; n4=n2; n5=n3; }//if }//if }//for }//for z++; printf("\n"); }//for printf("Number of partion is %d",cnt); getch(); [...]]]></description>
			<content:encoded><![CDATA[<pre><span style="color: blue;"><span><span style="color: blue;"><span><strong>for eg: user entered =5</strong>
1+1+1+1+1
1+4
2+3
3+1+1
1+2+2
1+1+1+2 <span id="more-112"></span> </span></span></span></span>#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void ste(int);

int main()
{
	int cnt,n1,i,temp,n2,n3,n4,n5,z;

	z=cnt=0;

	clrscr();

	printf("enter any number");
	scanf("%d",&amp;n1);

	for(i=n1;i&gt;1;i--)
	{
		for(n2=i-1;n2&gt;=i/2;n2--)
		{
			for(n3=i/2;n3&gt;0;n3--)
			{
				temp=n2+n3;

				if(temp==i)
				{
					if(!(n2==n5&amp;&amp;n3==n4))

					{
						printf("%d+%d",n2,n3);
						ste(z);
						cnt++;
						n4=n2;
						n5=n3;
					}//if
				}//if

			}//for

		}//for
		z++;
		printf("\n");
	}//for
	printf("Number of partion is %d",cnt);
	getch();
	return(0);
}//main

void ste(int x)
{
	char ch[8]="+1",ch2[400]="\0";
	int i;
	for(i=0;i&lt;x;i++)
	{
		strcat(ch2,ch);
	}//for
	printf("%s,  ",ch2);

}//int</pre>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/09/partition-of-a-number/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/09/partition-of-a-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert utf-8 to chinese in ruby on rails</title>
		<link>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/</link>
		<comments>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:21:21 +0000</pubDate>
		<dc:creator>Deepak</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=106</guid>
		<description><![CDATA[Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward &#160; def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id) @customer_name = from_name @customer_email = from_email str = &#8220;&#38;#26399;&#38;#24453;&#38;#24456;&#38;#24555;&#38;#23601;&#38;#21487;!&#8221; #    str= &#8220;subject in english&#8221; subject=str if str[0..1]==&#8221;&#38;#&#8221; subject_raw = str.gsub(&#8220;&#38;#&#8221;,&#8221;").gsub(&#8220;!&#8221;,&#8221;").split(&#8220;;&#8221;) subject=&#8221;" subject_raw.each {&#124;t&#124; subject += [t.to_i].pack(&#8220;U*&#8221;)} end mail(:to =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward</p>
<blockquote><p>&nbsp;</p>
<p>def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id)<br />
@customer_name = from_name<br />
@customer_email = from_email<br />
str = &#8220;&amp;#26399;&amp;#24453;&amp;#24456;&amp;#24555;&amp;#23601;&amp;#21487;!&#8221;<br />
#    str= &#8220;subject in english&#8221;<br />
subject=str<br />
if str[0..1]==&#8221;&amp;#&#8221;<br />
subject_raw = str.gsub(&#8220;&amp;#&#8221;,&#8221;").gsub(&#8220;!&#8221;,&#8221;").split(&#8220;;&#8221;)<br />
subject=&#8221;"<br />
subject_raw.each {|t| subject += [t.to_i].pack(&#8220;U*&#8221;)}<br />
end<br />
mail(:to =&gt; lead_email,<br />
:from =&gt; &#8220;\&#8221;"+from_name+&#8221;\&#8221;" + &#8220;&lt;&#8221;+from_email+&#8221;&gt;&#8221;,<br />
:charset =&gt; &#8216;utf-8&#8242;,<br />
:subject =&gt; subject,<br />
:reply_to =&gt; &#8216;noreply@buddyreferralsystem.com&#8217;,<br />
:content_type =&gt;&#8217;multipart/alternative&#8217;,<br />
:content_transfer_encoding =&gt; &#8217;8bit&#8217;,<br />
&#8220;X-Mailer&#8221; =&gt; &#8220;Ruby (1.9.2)&#8221;<br />
).deliver<br />
end</p></blockquote>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://blog.idifysolutions.com/2011/08/welcome/</link>
		<comments>http://blog.idifysolutions.com/2011/08/welcome/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 17:23:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=9</guid>
		<description><![CDATA[Welcome to IDIFY Solutions blog Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>Welcome to IDIFY Solutions blog</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/08/welcome/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/08/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
