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

<channel>
	<title>Siri Innovations</title>
	<atom:link href="http://siriinnovations.com/blog/feed/" rel="self" type="application/rss+xml"/>
	<link>https://siriinnovations.com/blog/</link>
	<description>Innovative like no other</description>
	<lastBuildDate>Fri, 12 Apr 2019 07:47:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Google oauth 2.0 in CodeIgniter</title>
		<link>https://siriinnovations.com/blog/login-with-googleoauth2-0-account-in-codeigniter/</link>
					<comments>https://siriinnovations.com/blog/login-with-googleoauth2-0-account-in-codeigniter/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 10 Apr 2019 09:18:35 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[Google Login]]></category>
		<category><![CDATA[OAuth API]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=1175</guid>

					<description><![CDATA[<p>Google OAuth API is the simple and powerful way to integrate login system in the website. Google OAuth Login API let you allow the user to sign in the web application using their Google account without registration. The main advantage of Google login is the user can log in to the web application with their [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/login-with-googleoauth2-0-account-in-codeigniter/">Google oauth 2.0 in CodeIgniter</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Google OAuth API is the simple and powerful way to integrate login system in the website. Google OAuth Login API let you allow the user to sign in the web application using their Google account without registration. The main advantage of Google login is the user can log in to the web application with their existing Google account without register account on the website. Nowadays almost all web users have a Google account, Sign-in with Google helps to increase the user’s subscription on your website.</p>
<p>Step1:-<br>Create Google API Console Project<br>-&gt; Go to <a href="https://console.developers.google.com">Google API Console.</a><br>-&gt; Create project,Auth credentials for the project.</p>
<p>Step2:-<br>-&gt; Download the latest version of codeigniter and extract into your root folder.</p>
<p>Step3:-<br>Create a google_config.php in /config folder, place below code.</p>
<pre class="code" lang="php">defined('BASEPATH') OR exit('No direct script access allowed'); 
/* | To get API details you have to create a Google Project 
| at Google API Console (https://console.developers.google.com) 
| client_id string Your Google API Client ID.
| client_secret string Your Google API Client secret. 
| redirect_uri string URL to redirect back to after login. 
| application_name string Your Google application name. 
| api_key string Developer key. 
| scopes string Specify scopes */
$config['google']['client_id'] = 'Google_API_Client_ID';
$config['google']['client_secret'] = 'Google_API_Client_Secret';
$config['google']['redirect_uri'] = 'https://example.com/project_folder_name/user_authentication/';
$config['google']['application_name'] = 'Login to example.com';
$config['google']['api_key'] = '';
$config['google']['scopes'] = array(); 
</pre>
<p>Step4:-</p>
<p>Create Controller Auth.php In yor controllers/ folder.</p>
<pre class="code" lang="php">
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Auth extends CI_Controller { function __construct() { parent::__construct(); $this-&gt;load-&gt;library('google');&lt;br ?--&gt; }
public function index(){
$data['google_login_url']=$this-&gt;google-&gt;get_login_url();
$this-&gt;load-&gt;view('home',$data);
}
public function oauth2callback(){
$google_data=$this-&gt;google-&gt;validate();
$session_data=array(
'name'=&gt;$google_data['name'],
'email'=&gt;$google_data['email'],
'source'=&gt;'google',
'profile_pic'=&gt;$google_data['profile_pic'],
'link'=&gt;$google_data['link'],
'sess_logged_in'=&gt;1
);
$this-&gt;session-&gt;set_userdata($session_data);
redirect(base_url());
}
public function logout(){
session_destroy();
unset($_SESSION['access_token']);
$session_data=array('sess_logged_in'=&gt;0);
$this-&gt;session-&gt;set_userdata($session_data);
redirect(base_url());
}
}</pre>
<p>Step5:-<br>Create A view home.php file in view forlder.</p>
<pre class="code" lang="html">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Google authentication library for codeigniter&lt;/title&gt;
&lt;!-- Compiled and minified CSS --&gt;
&lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/css/materialize.min.css"&gt;
&lt;link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"&gt;

&lt;!-- Compiled and minified JavaScript --&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/js/materialize.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div align="center"&gt;
&lt;h2&gt;Google authentication library for Codeigniter&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="container"&gt;
&lt;div class="row"&gt;
&lt;div class="col s12 m6 offset-m3 l6 offset-l3"&gt;

&lt;?php
if($this-&gt;session-&gt;userdata('sess_logged_in')==0){?&gt;
&lt;a href="&lt;?=$google_login_url?&gt;"class="waves-effect waves-light btn red"&gt;&lt;i class="fa fa-google left"&gt;&lt;/i&gt;Google login&lt;/a&gt;
&lt;?php }else{?&gt;
&lt;a href="&lt;?=base_url()?&gt;auth/logout" class="waves-effect waves-light btn red"&gt;&lt;i class="fa fa-google left"&gt;&lt;/i&gt;Google logout&lt;/a&gt;
&lt;?php }
?&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;div class="row"&gt;

&lt;?php if(isset($_SESSION['name'])){?&gt;
&lt;div class="col s12 m6 l4 offset-l3 " &gt;
&lt;div class="card "&gt;
&lt;div class="card-image waves-effect waves-block waves-light"&gt;
&lt;img class="activator" src="&lt;?=$_SESSION['profile_pic']?&gt;"&gt;
&lt;/div&gt;
&lt;div class="card-content"&gt;
&lt;span class="card-title activator grey-text text-darken-4"&gt; &lt;i class="material-icons"&gt;&lt;?=$_SESSION['name']?&gt;&lt;/i&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="card-reveal"&gt;
&lt;span class="card-title grey-text text-darken-4"&gt;&lt;?=$_SESSION['name']?&gt;&lt;i class="material-icons right"&gt;close&lt;/i&gt;&lt;/span&gt;
&lt;p&gt;Email Id: &lt;?=$_SESSION['email']?&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;?php }?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The post <a href="https://siriinnovations.com/blog/login-with-googleoauth2-0-account-in-codeigniter/">Google oauth 2.0 in CodeIgniter</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/login-with-googleoauth2-0-account-in-codeigniter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1175</post-id>	</item>
		<item>
		<title>Watermarking an image using paperclip gem</title>
		<link>https://siriinnovations.com/blog/watermarking-an-image-using-paperclip-gem/</link>
					<comments>https://siriinnovations.com/blog/watermarking-an-image-using-paperclip-gem/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 05 Feb 2016 05:47:31 +0000</pubDate>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Gem]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Paperclip]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<guid isPermaLink="false">http://siriinnovations.com/blog/?p=1126</guid>

					<description><![CDATA[<p>You can brand all the images present in your application by placing your official logo as watermark on images. This can be done in a programmatic manner using a paperclip gem. Requirements: • Add paperclip gem to your ruby on rails application and install all the dependencies like image magick. Implementation: • Choose a model [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/watermarking-an-image-using-paperclip-gem/">Watermarking an image using paperclip gem</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-size: 10pt;">You can brand all the images present in your application by placing your official logo as watermark on images. This can be done in a programmatic manner using a paperclip gem.</span></p>
<p><span style="color: #800080; font-size: 10pt;"> <strong>Requirements:</strong></span><br />
<span style="font-size: 10pt;"> • Add paperclip gem to your ruby on rails application and install all the dependencies like image magick.</span></p>
<p><span style="color: #800080; font-size: 10pt;"> <strong>Implementation:</strong></span><br />
<span style="font-size: 10pt;"> • Choose a model and add image attribute columns by following paperclip documentation.</span><br />
<span style="font-size: 10pt;"> • Using paperclip options you can easily define different size of images within the model.</span><br />
<span style="font-size: 10pt;"> • Paperclip allows you to add your custom processor to deal with the images and its sizes.</span><br />
<span style="font-size: 10pt;"> • If you have multiple sizes of images then you can workout the changes on the original image by adding a custom processor. So that the other images will do have a watermark image correspondingly.</span><br />
<span style="font-size: 10pt;"> • Create a processor and place in your library folder of your application. If you have multiple processors then it is suggested to have a folder for processors.</span></p>
<h5><span style="font-size: 10pt;"><span style="color: #800080;"><strong>Path:</strong></span>RAILS_APP/lib/paperclip_processors/watermark.rb</span></h5>
<pre class="code">module Paperclip
class Watermark &lt; Processor
    # Handles watermarking of images that are uploaded.
attr_accessor :current_geometry, :target_geometry, :format, :whiny, :convert_options, :watermark_path, :overlay, :position
def initialize file, options = {}, attachment = nil
super
geometry          = options[:geometry]
      @file             = file
ifgeometry.present?
        @crop             = geometry[-1,1] == '#'
end
      @target_geometry  =Geometry.parse geometry
      @current_geometry = Geometry.from_file @file
      @convert_options  = options[:convert_options]
      @whiny            = options[:whiny].nil? ? true : options[:whiny]
      @format           = options[:format]
      @watermark_path   = options[:watermark_path]
      @dissolve         = options.fetch(:watermark_dissolve, 70)
      @position         = options[:position].nil? ? "SouthEast" : options[:position]
      @overlay          = options[:overlay].nil? ? true : false
      @current_format   = File.extname(@file.path)
      @basename         = File.basename(@file.path, @current_format)
end
    # TODO: extend watermark
    # Returns true if the +target_geometry+ is meant to crop.
def crop?
      @crop
end
    # Returns true if the image is meant to make use of additional convert options.
defconvert_options?
not @convert_options.blank?
end
    # Performs the conversion of the +file+ into a watermark. Returns the Tempfile
    # that contains the new image.
def make
dst = Tempfile.new([@basename, @format].compact.join("."))
dst.binmode
command = "convert"
params = [fromfile]
params += transformation_command
params&lt;&lt;tofile(dst)
begin
success = Paperclip.run(command, params.flatten.compact.collect{|e| "'#{e}'"}.join(" "))
rescue Paperclip::Errors::CommandNotFoundError
raise Paperclip::Errors::CommandNotFoundError, "There was an error resizing and cropping #{@basename}" if @whiny
end
ifwatermark_path
command = "composite"
command += " -dissolve #{@dissolve}"
params = %W[-gravity #{@position} #{watermark_path} #{tofile(dst)}]
params&lt;&lt;tofile(dst)
begin
success = Paperclip.run(command, params.flatten.compact.collect{|e| "'#{e}'"}.join(" "))
rescue Paperclip::Errors::CommandNotFoundError
raise Paperclip::Errors::CommandNotFoundError, "There was an error processing the watermark for #{@basename}" if @whiny
end
end
dst
end
deffromfile
File.expand_path(@file.path)
end
deftofile(destination)
File.expand_path(destination.path)
end
deftransformation_command
if @target_geometry.present?
scale, crop = @current_geometry.transformation_to(@target_geometry, crop?)
trans = %W[-resize #{scale}]
trans += %W[-crop #{crop} +repage] if crop
trans&lt;&lt;convert_options if convert_options?
trans
end
end
end
end
</pre>
<p><span style="font-family: georgia, palatino, serif;"><span style="font-size: 10pt;">• By using this module, you can manipulate the image to handle</span><span style="font-size: 10pt;"> wat</span><span style="font-size: 10pt;">ermarking.</span></span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • Your model cant call any of the method in the module since its out of model scope. You can require the module by specifying require    paperclip_processors/watermark&#8217; on top of your model inside the class.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • Once after requiring the module, you can able to call the processor on to your image with various options.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • You can place your desired image/logo in public folder.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • Specify the following options in your model inorder to get the watermark on the uploaded image.</span></p>
<pre class="code">:original =&gt; {		
			:processors =&gt; [:watermark],
			:watermark_path =&gt; "#{Rails.root}/public/images/logo-home-new.png",
			:position =&gt; 'NorthWest',
			:watermark_dissolve =&gt; 90,
			:auto_orient    =&gt; false
		}
</pre>
<p><span style="font-family: georgia, palatino, serif; font-size: 10pt;">• Here the processors option in the original hash uses the customized watermark class.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • Watermark_path should have the watermark image complete url. This image will come on uploads.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • The position option is where the watermark image will get pasted. For now, the watermark image comes on left-top    of the uploaded      image, refer the documentation of image magick for various values to pass.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • Auto orient adjusts an image so that its orientation is suitable for viewing. Currently it is set to false.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • After all configurations are done, the image uploads will get a watermark present on them.</span><br />
<span style="font-family: georgia, palatino, serif; font-size: 10pt;"> • For adding watermarks to existing images in your model, you can try as below,</span></p>
<p><span style="font-family: 'times new roman', times, serif; font-size: 12pt;">ModelName.find_eachdo|rec|</span><br />
<span style="font-family: 'times new roman', times, serif; font-size: 12pt;"> rec.image_or_avatar.reprocess!</span><br />
<span style="font-family: 'times new roman', times, serif; font-size: 12pt;"> end</span></p>
<p><span style="font-family: georgia, palatino, serif; font-size: 10pt;"><em><strong>Note:</strong> Running above command on your model will convert all the images to be watermarked.</em></span></p>
<p>The post <a href="https://siriinnovations.com/blog/watermarking-an-image-using-paperclip-gem/">Watermarking an image using paperclip gem</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/watermarking-an-image-using-paperclip-gem/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1126</post-id>	</item>
		<item>
		<title>Simple HTML5 audio player with playlist</title>
		<link>https://siriinnovations.com/blog/warning-htmlspecialchars-function-htmlspecialchars-charset-utf-7-not-supported-assuming-iso-8859-1-in-homesiriinnopublic_htmlblogwp-includesformatting-php-on-line-2751warning-htmlspec/</link>
					<comments>https://siriinnovations.com/blog/warning-htmlspecialchars-function-htmlspecialchars-charset-utf-7-not-supported-assuming-iso-8859-1-in-homesiriinnopublic_htmlblogwp-includesformatting-php-on-line-2751warning-htmlspec/#comments</comments>
		
		<dc:creator><![CDATA[Yuva kumar]]></dc:creator>
		<pubDate>Thu, 17 Jul 2014 03:34:21 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[HTML5 Audio Player]]></category>
		<category><![CDATA[HTML5 Audio Player open source]]></category>
		<category><![CDATA[HTML5 Player]]></category>
		<category><![CDATA[Open source HTML5 Audio Player]]></category>
		<category><![CDATA[Simple HTML5 Audio Player]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=665</guid>

					<description><![CDATA[<p>Introduction: HTML5 introduces built-in media support via the &#60;audio&#62; and &#60;video&#62; elements, offering the ability to easily embed media into HTML documents.The &#60;audio&#62; tag defines sound, such as music or other audio streams. Currently, there are 3 supported file formats for the &#60;audio&#62; element: MP3, Wav, and Ogg. How to Use: &#60;audio id="audio" preload="auto" tabindex="0" [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/warning-htmlspecialchars-function-htmlspecialchars-charset-utf-7-not-supported-assuming-iso-8859-1-in-homesiriinnopublic_htmlblogwp-includesformatting-php-on-line-2751warning-htmlspec/">Simple HTML5 audio player with playlist</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>HTML5 introduces built-in media support via the <a title="The HTML &lt;audio&gt; element is used to represents sound content in documents. Added as part of HTML5, it may contain several audio sources, represented using the src attribute or the &lt;source&gt; element; the browser will choose the most suitable one. Fallback content for browser not supporting the &lt;audio&gt; element can be added too." href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio"><code>&lt;audio&gt;</code></a> and <a title="The HTML &lt;video&gt; element is used to embed video content in an HTML or XHTML document." href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video"><code>&lt;video&gt;</code></a> elements, offering the ability to easily embed media into HTML documents.The &lt;audio&gt; tag defines sound, such as music or other audio streams. Currently, there are 3 supported file formats for the &lt;audio&gt; element: MP3, Wav, and Ogg.</p>
<p>How to Use:</p>
<pre class="code" lang="html">&lt;audio id="audio" preload="auto" tabindex="0" controls="" type="audio/mpeg"&gt;
&lt;source type="audio/mp3" src="media/Kalimba.mp3"&gt;
Sorry, your browser does not support HTML5 audio.
&lt;/audio&gt;
</pre>
<p>HTML5 audio tags:</p>
<pre class="code" lang="html">&lt;audio&gt; - Defines sound content.
&lt;source&gt; - Defines multiple media resources for media elements, such as &lt;video&gt; and &lt;audio&gt;.
</pre>
<p>How to Setup playlist:<br />
In Html body:</p>
<pre class="code" lang="html">&lt;ul id="playlist"&gt;
&lt;li class="active"&gt;&lt;a href="media/Kalimba.mp3"&gt;Kalimba&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="media/Maid_with_the_Flaxen_Hair.mp3"&gt;Maid with the Flaxen Hair&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="media/Sleep_Away.mp3"&gt;Sleep Away&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>In Javascript:<br />
1. To initialize player</p>
<pre class="code" lang="js">function init(){
current = 0;
audio = $('audio');
playlist = $('#playlist');
tracks = playlist.find('li a');
len = tracks.length - 1;
audio[0].volume = .10;
playlist.find('a').click(function(e){
e.preventDefault();
link = $(this);
current = link.parent().index();
run(link, audio[0]);

});
audio[0].addEventListener('ended',function(e){
current++;
if(current == len){
current = 0;
link = playlist.find('a')[0];
}else{
link = playlist.find('a')[current];
}
run($(link),audio[0]);
});
}
</pre>
<p>2. To playlist media</p>
<pre class="code" lang="js">function run(link, player){
player.src = link.attr('href');
par = link.parent();
par.addClass('active').siblings().removeClass('active');
audio[0].load();
audio[0].play();
}
</pre>
<p>3. Last step &#8211; Combine above two functions in jquery load function.</p>
<pre class="code" lang="js">&lt;script type='text/javascript'&gt;//&lt;![CDATA[
$(window).load(function(){
var audio;
var playlist;
var tracks;
var current;
init();
function init(){
current = 0;
audio = $('audio');
playlist = $('#playlist');
tracks = playlist.find('li a');
len = tracks.length - 1;
audio[0].volume = .10;
playlist.find('a').click(function(e){
e.preventDefault();
link = $(this);
current = link.parent().index();
run(link, audio[0]);
});
audio[0].addEventListener('ended',function(e){
current++;
if(current == len){
current = 0;
link = playlist.find('a')[0];
}else{
link = playlist.find('a')[current];
}
run($(link),audio[0]);
});
}
function run(link, player){
player.src = link.attr('href');
par = link.parent();
par.addClass('active').siblings().removeClass('active');
audio[0].load();
audio[0].play();
}
});//]]&gt;
&lt;/script&gt;
</pre>
<p>In CSS &#8211; make little design to your player:</p>
<pre class="code" lang="css">&lt;style type='text/css'&gt;
audio{background:#666;width:400px;padding:20px;}
#playlist{background:#666;width:400px;padding:0px 20px 20px 20px;margin-top: -5px;}
.active a{color:#5DB0E6;text-decoration:none;}
li a{color:#eeeedd;background:#333;padding:5px;display:block;}
li a:hover{text-decoration:none;}
&lt;/style&gt;
</pre>
<p>Conclusion:<br />
In this article we have looked in detail at the HTML5 &lt;audio&gt; element with simple playlist, used jQuery to make easier and help us work through cross-browser differences, and built a really useful audio player that works as part of a web page.</p>
<p>The post <a href="https://siriinnovations.com/blog/warning-htmlspecialchars-function-htmlspecialchars-charset-utf-7-not-supported-assuming-iso-8859-1-in-homesiriinnopublic_htmlblogwp-includesformatting-php-on-line-2751warning-htmlspec/">Simple HTML5 audio player with playlist</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/warning-htmlspecialchars-function-htmlspecialchars-charset-utf-7-not-supported-assuming-iso-8859-1-in-homesiriinnopublic_htmlblogwp-includesformatting-php-on-line-2751warning-htmlspec/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">665</post-id>	</item>
		<item>
		<title>How to create module in YII framework?</title>
		<link>https://siriinnovations.com/blog/create-module-yii-framework/</link>
					<comments>https://siriinnovations.com/blog/create-module-yii-framework/#comments</comments>
		
		<dc:creator><![CDATA[Shilpa Buddha]]></dc:creator>
		<pubDate>Thu, 17 Jul 2014 03:28:41 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[How to create modules in YII framework]]></category>
		<category><![CDATA[Modules in YII framework]]></category>
		<category><![CDATA[yii framework]]></category>
		<category><![CDATA[YII framework Modules]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=652</guid>

					<description><![CDATA[<p>A module is a self-contained unit which contains models, views, controllers and other supporting components. It is same like an application, but the difference is module can’t be deployed alone. Modules are useful units in large applications. We can easily develop and maintain the large application by dividing it into several modules and we can [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/create-module-yii-framework/">How to create module in YII framework?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A module is a self-contained unit which contains models, views, controllers and other supporting components. It is same like an application, but the difference is module can’t be deployed alone.</p>
<p>Modules are useful units in large applications. We can easily develop and maintain the large application by dividing it into several modules and we can use the common modules for several applications.</p>
<p>Creating module: Every module should have unique name in one application and the module should be organized as a folder. The typical directory structure of a module will be like:</p>
<p>For example our module name is &#8216;abc&#8217;, the folder structure is as follows:</p>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>abc</td>
<td></td>
</tr>
<tr>
<td>AbcModule.php</td>
<td>the module class file</td>
</tr>
<tr>
<td>components</td>
<td>containing reusable user components</td>
</tr>
<tr>
<td>views</td>
<td>containing view files for widgets</td>
</tr>
<tr>
<td>controllers</td>
<td>containing controller class files</td>
</tr>
<tr>
<td>DefaultController.php</td>
<td>the default controller class file</td>
</tr>
<tr>
<td>extensions</td>
<td>containing third-party extensions</td>
</tr>
<tr>
<td>models</td>
<td>containing model class files</td>
</tr>
<tr>
<td>views</td>
<td>containing controller view and layout files</td>
</tr>
<tr>
<td>layouts</td>
<td>containing layout view files</td>
</tr>
<tr>
<td>default</td>
<td>containing view files for DefaultController</td>
</tr>
<tr>
<td>index.php</td>
<td>the index view file</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>A module should have module class which extends from CWebModule.</p>
<p>Using Module:</p>
<p>Place the module directory under the modules folder,then declare the module id in the modules property of the application.</p>
<pre class="code" lang="php"> return array(
......
'modules'=&gt;array('abc',...),
......
);
</pre>
<p>&nbsp;</p>
<p>The module instance may be accessed via the module property of the currently active controller.</p>
<p>A controller action in a module can be accessed using the route moduleID/controllerID/actionID. For example, assuming the above abc module has a controller named PostController, we can use the route abc/post/create to refer to the create action in this controller. The corresponding URL for this route would be http://www.example.com/index.php?r=abc/post/create.</p>
<p>The post <a href="https://siriinnovations.com/blog/create-module-yii-framework/">How to create module in YII framework?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/create-module-yii-framework/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">652</post-id>	</item>
		<item>
		<title>How to save multiple input entries in one column in mysql using php?</title>
		<link>https://siriinnovations.com/blog/save-multiple-input-entries-one-column-mysql-using-php/</link>
					<comments>https://siriinnovations.com/blog/save-multiple-input-entries-one-column-mysql-using-php/#respond</comments>
		
		<dc:creator><![CDATA[Yuva kumar]]></dc:creator>
		<pubDate>Fri, 11 Jul 2014 06:03:27 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[multiple input entries]]></category>
		<category><![CDATA[multiple input entries in one column in mysql using php]]></category>
		<category><![CDATA[one column in mysql]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=707</guid>

					<description><![CDATA[<p>Introduction: Serialization method &#8211; serialize() is to store multiple fields in single column. PHP is able to automatically serialize most of its variables to strings &#8211; letting you save them into storage like $_SESSION. However, there are some tweaks you have to know to avoid exploding .php scripts and performance problems. serialize() converts an array, [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/save-multiple-input-entries-one-column-mysql-using-php/">How to save multiple input entries in one column in mysql using php?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>Serialization method &#8211; <em>serialize()</em> is to store multiple fields in single column. PHP is able to automatically serialize most of its variables to strings &#8211; letting you save them into storage like $_SESSION. However, there are some tweaks you have to know to avoid exploding .php scripts and performance problems.</p>
<p><em>serialize()</em> converts an array, given as its only parameter, into a normal string that you can save in a file, pass in a URL, etc. Unserialize() is the opposite of <em>serialize()</em> &#8211; it takes a <em>serialize</em>d string and converts it back to an array.</p>
<p><strong>Example:</strong></p>
<p>On Post request you have received $_POST data for name, mobile, address, email.</p>
<pre class="code" lang="php">
&lt;?php
$data = $_POST;
$data_serialize = serialize($data);
?&gt;
</pre>
<p><strong>Output:</strong></p>
<p>resulting array will be</p>
<pre class="default prettyprint prettyprinted"><code><span class="pln">a</span><span class="pun">:</span><span class="lit">4</span><span class="pun">:{</span><span class="pln">s</span><span class="pun">:</span><span class="lit">4</span><span class="pun">:</span><span class="str">"name"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">3</span><span class="pun">:</span><span class="str">"abc"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">6</span><span class="pun">:</span><span class="str">"mobile"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">13</span><span class="pun">:</span><span class="str">"9874325972398"</span><span class="pun">;</span><span class="pln">
s</span><span class="pun">:</span><span class="lit">7</span><span class="pun">:</span><span class="str">"address"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">4</span><span class="pun">:</span><span class="str">"test"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">5</span><span class="pun">:</span><span class="str">"email"</span><span class="pun">;</span><span class="pln">s</span><span class="pun">:</span><span class="lit">13</span><span class="pun">:</span><span class="str">"test@test.com"</span><span class="pun">;}

</span></code><code><span class="pun">use this serialized string to insert into database.</span></code></pre>
<p class="none">
<p><strong>Unserialize value from DB:</strong></p>
<pre><code>$data_unserialize = unserialize($records_serialize);
</code></pre>
<p>The post <a href="https://siriinnovations.com/blog/save-multiple-input-entries-one-column-mysql-using-php/">How to save multiple input entries in one column in mysql using php?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/save-multiple-input-entries-one-column-mysql-using-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">707</post-id>	</item>
		<item>
		<title>How to use jQuery?</title>
		<link>https://siriinnovations.com/blog/use-jquery/</link>
					<comments>https://siriinnovations.com/blog/use-jquery/#respond</comments>
		
		<dc:creator><![CDATA[Yuva kumar]]></dc:creator>
		<pubDate>Fri, 11 Jul 2014 05:29:58 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=643</guid>

					<description><![CDATA[<p>Introduction: jQuery is not a language, but it is a well written JavaScript code. It is fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. In order to work with jQuery, you should be aware of the basics of JavaScript, HTML and CSS. Why [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/use-jquery/">How to use jQuery?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>jQuery is not a language, but it is a well written JavaScript code. It is fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. In order to work with jQuery, you should be aware of the basics of JavaScript, HTML and CSS.</p>
<p><strong>Why jQuery:</strong></p>
<ul>
<li>It helps to improve the performance of the application.</li>
<li>It helps to develop most browser compatible web page.</li>
<li>It helps to implement UI related critical functionality without writing hundreds of lines of codes.</li>
<li>It is extensible – jQuery can be extended to implement customized behavior.</li>
<li>No need to learn fresh new syntaxes to use jQuery, knowing simple JavaScript syntax is enough.</li>
</ul>
<p><strong>How to use jQuery?:</strong></p>
<ul>
<li>jQuery JavaScript file can be downloaded from jQuery <a title="http://www.jquery.com/" href="http://www.jquery.com/">Official website</a>.</li>
<li>To load jquery file</li>
</ul>
<blockquote>
<pre class="code" lang="js">&lt;script type="text/javascript" src="jquery-1.10.2.min.js"&gt;&lt;/script&gt;</pre>
</blockquote>
<p><strong>Load jQuery from CDN:</strong></p>
<p>A jQuery file can be loaded from <a title="http://code.google.com/apis/libraries/devguide.html" href="http://code.google.com/apis/libraries/devguide.html">Google CDN</a>. You will need to keep the following tag in your page.</p>
<blockquote>
<pre class="code" lang="js">&lt;script type="text/javascript" language="Javascript" 
        src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;
&lt;/script&gt;</pre>
</blockquote>
<p><strong>How to load local jQuery file when CDN is not available:</strong></p>
<blockquote>
<pre class="code" lang="js"><code>&lt;script src="https//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; 
&lt;script&gt; window.jQuery || document.write('&lt;script src="/scripts/jquery.1.10.2.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt; 
</code></pre>
</blockquote>
<p><strong>How to execute jQuery code?:</strong></p>
<ul>
<li>As and when page loads, execute the jQuery code:</li>
</ul>
<blockquote>
<pre class="code" lang="js">&lt;script language="javascript" type="text/javascript"&gt;
$(function () {
$("#div1").css("border", "2px solid green");
});
&lt;/script&gt;</pre>
</blockquote>
<ul>
<li>Execute jQuery only when the complete DOM objects (the complete page has been loaded). You will have to wrap your code in <em>.ready</em> function.</li>
</ul>
<blockquote>
<pre class="code" lang="js">&lt;script language="javascript" type="text/javascript"&gt;
$(document).ready(function () {
$("#div1").css("border", "2px solid green");
});
&lt;/script&gt;</pre>
</blockquote>
<pre id="pre6"><strong>References:
<a href="http://jquery.com/">http://jquery.com/</a>
</strong></pre>
<p>The post <a href="https://siriinnovations.com/blog/use-jquery/">How to use jQuery?</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/use-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">643</post-id>	</item>
		<item>
		<title>Execute your PHP code from html file</title>
		<link>https://siriinnovations.com/blog/execute-php-code-html-file/</link>
					<comments>https://siriinnovations.com/blog/execute-php-code-html-file/#respond</comments>
		
		<dc:creator><![CDATA[Shilpa Buddha]]></dc:creator>
		<pubDate>Fri, 11 Jul 2014 05:25:48 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[PHP Code]]></category>
		<category><![CDATA[PHP Code in HTML]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=563</guid>

					<description><![CDATA[<p>Execute your PHP code from html file: When web page is loaded, the server will check the extension of the file to know how to handle the page. If it is a .htm or .html file, it sends directly to the browser because it does not have anything to process on server. If it is [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/execute-php-code-html-file/">Execute your PHP code from html file</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Execute your PHP code from html file:</p>
<p>When web page is loaded, the server will check the extension of the file to know how to handle the page. If it is a .htm or .html file, it sends directly to the browser because it does not have anything to process on server. If it is a .php or .asp etc file, it needs to execute on server.</p>
<p>If you want to add some PHP code in your existing html file, we can do that by two ways.</p>
<ol>
<li>We can change the file extension as .php, so that the file will execute on the server.</li>
<li>By using your htaccess file you can make your html file as php file as shown below.</li>
</ol>
<p>Add below line for .html file</p>
<pre class="code" lang="php">AddType application/x-httpd-php .html</pre>
<p>for .htm file</p>
<pre class="code" lang="php">AddType application/x-httpd-php .htm</pre>
<p>If you want to include the php code only in one page just add the below code to your htaccess file.</p>
<pre class="code" lang="php">&lt;Files yourpage.html&gt;
AddType application/x-httpd-php .html
&lt;/Files&gt;</pre>
<p>This code will make the PHP code executable on the html file and not in all other files.</p>
<p>Take care while adding the lines to your existing htaccess file.</p>
<p>1. Don&#8217;t overwrite your htaccess file, just add extra lines for that as shown above.</p>
<p>2. If your html file have any code which starts with &lt;? will execute as php code. So, echo those lines as below.</p>
<pre class="code" lang="php">&lt;?php echo '&lt;?xml version="1.0" encoding="IUTF-8"?&gt;'; ?&gt;</pre>
<p>This coding is only preferable for small websites, which has little php code.</p>
<p>The post <a href="https://siriinnovations.com/blog/execute-php-code-html-file/">Execute your PHP code from html file</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/execute-php-code-html-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">563</post-id>	</item>
		<item>
		<title>CakePHP Installation</title>
		<link>https://siriinnovations.com/blog/cakephp-installation/</link>
					<comments>https://siriinnovations.com/blog/cakephp-installation/#respond</comments>
		
		<dc:creator><![CDATA[Sindhuja Buddha]]></dc:creator>
		<pubDate>Thu, 10 Jul 2014 11:39:50 +0000</pubDate>
				<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Installation steps]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=655</guid>

					<description><![CDATA[<p>Cake PHP: Cake PHP is a free open-source rapid development framework for PHP, inspired by Ruby on Rails. It provides an extensible architecture for developing, maintaining, and deploying applications. It uses MVC software design pattern. It supports UNIX and Windows Platform and it is easy to install. Before running cakephp we must need * Apache(HTTP) [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/cakephp-installation/">CakePHP Installation</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><b>Cake PHP:</b></p>
<p>Cake PHP is a free open-source rapid development framework for PHP, inspired by Ruby on Rails. It provides an extensible architecture for developing, maintaining, and deploying applications. It uses MVC software design pattern. It supports UNIX and Windows Platform and it is easy to install.</p>
<p><b>Before running cakephp we must need</b></p>
<p>* Apache(HTTP) server.</p>
<p>* php 4.3.2 or greater.</p>
<p>* database server(MySQL).</p>
<p><b>steps to instal cake php:</b></p>
<p>1. Go to official site <a href="http://cakephp.org/">http://cakephp.org/</a> to download the cakephp.zip file.</p>
<p>2. Download the file and unzip the file.</p>
<p>3. Rename the unzipped file and save into localhost root (wamp/www or xampp/htdocs).</p>
<p>Example: xampp/htdocs/cakephp</p>
<p>4. Now open a web browser and type http://localhost/cakephp/</p>
<p><b>Note</b>: you have to run the web server(Apache) and database server(MySQL).</p>
<p>5. Now you will get some notifications as following.</p>
<p><a href="http://www.siriinnovations.com/blog/wp-content/uploads/2013/10/cake.png"><img fetchpriority="high" decoding="async" class="size-medium wp-image-656 aligncenter" src="http://www.siriinnovations.com/blog/wp-content/uploads/2013/10/cake-300x148.png" alt="cake" width="369" height="162" /></a></p>
<p>6. According to the first two notifications we have to change the <b>security salt</b> value and security <b>cipher Seed</b> value.</p>
<p>Open the file <b>cakephp/app/config/core.php</b> and change those two values.</p>
<p><b>Note</b>: security salt is a random string used in security hashing methods and security cipher Seed is a random numeric string (digits only) used to encrypt/decrypt strings.</p>
<p>7. Now we have to configure the database for database connection.</p>
<p>8. Open localhost/PhpMyadmin and create one database.</p>
<p>Ex:  db_cakephp</p>
<p>9. Rename the <b>database.php.default</b> as <b>database.php</b> in <b>app/config/</b> folder.</p>
<p>10. Open database.php file and change the DATABASE_CONFIG class.</p>
<p><b>Actual code:</b></p>
<p>class DATABASE_CONFIG {</p>
<pre class="code" lang="php">public $default = array(
'datasource' =&gt; 'Database/Mysql',
'persistent' =&gt; false,
'host' =&gt; 'localhost',
'login' =&gt; 'user',
'password' =&gt; 'password',
'database' =&gt; 'database_name',
'prefix' =&gt; '',
//'encoding' =&gt; 'utf8',
);
 public $test = array(
'datasource' =&gt; 'Database/Mysql',
'persistent' =&gt; false,
'host' =&gt; 'localhost',
'login' =&gt; 'user',
'password' =&gt; 'password',
'database' =&gt; 'test_database_name',
'prefix' =&gt; '',
//'encoding' =&gt; 'utf8',
);
}
</pre>
<p>&nbsp;</p>
<p>Change the login, password and database details.</p>
<p>Ex:</p>
<pre class="code" lang="php">class DATABASE_CONFIG {
public $default = array(
'datasource' =&gt; 'Database/Mysql',
'persistent' =&gt; false,
'host' =&gt; 'localhost',
'login' =&gt; 'root',
'password' =&gt; '',
'database' =&gt; 'db_cakephp',
'prefix' =&gt; '',
//'encoding' =&gt; 'utf8',
);
public $test = array(
'datasource' =&gt; 'Database/Mysql',
'persistent' =&gt; false,
'host' =&gt; 'localhost',
'login' =&gt; 'root',
'password' =&gt; 'root',
'database' =&gt; 'db_cakephp',
'prefix' =&gt; '',
//'encoding' =&gt; 'utf8',
);
}
</pre>
<p>&nbsp;</p>
<p>11. Now again go through the link: <b>http://localhost/cakephp/</b></p>
<p>You will get the notifications as follows</p>
<p><a href="http://www.siriinnovations.com/blog/wp-content/uploads/2013/10/cake2.png"><img decoding="async" class="size-medium wp-image-657 aligncenter" src="http://www.siriinnovations.com/blog/wp-content/uploads/2013/10/cake2-300x108.png" alt="cake2" width="364" height="149" /></a></p>
<p>&nbsp;</p>
<p>12. Now your cakephp is ready to use.</p>
<p>&nbsp;</p>
<p>The post <a href="https://siriinnovations.com/blog/cakephp-installation/">CakePHP Installation</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/cakephp-installation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">655</post-id>	</item>
		<item>
		<title>Yahoo and Google Multi Messenger</title>
		<link>https://siriinnovations.com/blog/yahoo-and-google-multi-messanger/</link>
					<comments>https://siriinnovations.com/blog/yahoo-and-google-multi-messanger/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 10 Jul 2014 11:09:52 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=535</guid>

					<description><![CDATA[<p>Users of Google Talk (GTalk) and Yahoo Messenger can also let them go to polygamy, that’s running multiple instances and login to multiple accounts. Ability to polygamy running multiple Google Talk is useful if users have multiple Google Talk accounts (or Google or Gmail accounts that used to login to GTalk) or multiple profiles or [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/yahoo-and-google-multi-messanger/">Yahoo and Google Multi Messenger</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Users of Google Talk (GTalk) and Yahoo Messenger can also let them go to polygamy, that’s running multiple instances and login to multiple accounts.</p>
<p>Ability to polygamy running multiple Google Talk is useful if users have multiple Google Talk accounts (or Google or Gmail accounts that used to login to GTalk) or multiple profiles or personalities, and don’t want to log on and off from one account to another account every time when want to switch, or want to log in to all accounts at the same time on the same computer.</p>
<p>You can add the /nomutex switch or parameter to existing Google Talk shortcut, or create a new shortcut with the /nomutex command line parameter.</p>
<p><strong>Gtalk Messenger multiple login To edit existing Google Talk shortcut:</strong></p>
<blockquote><p>Step1: Right click on the Google Talk shortcut.<br />
Step2: On the right click contextual menu, click on Properties.<br />
Step3: Go to Shortcut tab on Google Talk Properties window.<br />
Step4: On the Target textbox, add in the /nomutex to the end of the line so that it looks like below (or you can simply copy and paste the below syntax and replace the original).</p>
<p>&#8220;C:\Program Files\Google\Google Talk\googletalk.exe&#8221; /nomutex</p>
<p>Step5: Click on OK.</p></blockquote>
<p><strong>Alternate Method:</strong><br />
If you have hex editor, you can act like a hacker and modify the bits in Google Talk program so that it will always allow multiple instances of GTalk to be launched whether the /nomutex switch is specified or not.</p>
<p>Launch hex editor and open googletalk.exe, then search for the following patterns in the hex editor:</p>
<blockquote><p>004536FD . 3BC6 CMP EAX,ESI<br />
004536FF . 75 05 JNZ SHORT googleta.00453706</p></blockquote>
<p>Modify the string to look like the following:</p>
<blockquote><p>004536FD . 8BC1 MOV EAX,ECX<br />
004536FF . EB 05 JMP SHORT googleta.00453706</p></blockquote>
<p><strong>Yahoo Messenger:</strong></p>
<blockquote><p>Step 1: Go to Start<br />
Step2: Run,type regedit, then enter.<br />
Step3: Navigate to HKEY_CURRENT_ USER &#8211;&gt; Software &#8211;&gt; Yahoo &#8211;&gt; Pager &#8211;&gt; Test.<br />
Step4: On the right page, right-click and choose new Dword value.<br />
Step5: Rename it as Plural.<br />
Step6: Double click and assign a decimal value of 1.</p></blockquote>
<p>The post <a href="https://siriinnovations.com/blog/yahoo-and-google-multi-messanger/">Yahoo and Google Multi Messenger</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/yahoo-and-google-multi-messanger/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">535</post-id>	</item>
		<item>
		<title>Decoupling with custom jQuery events</title>
		<link>https://siriinnovations.com/blog/decoupling-custom-jquery-events/</link>
					<comments>https://siriinnovations.com/blog/decoupling-custom-jquery-events/#respond</comments>
		
		<dc:creator><![CDATA[Yuva kumar]]></dc:creator>
		<pubDate>Wed, 09 Jul 2014 11:56:06 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Decoupling]]></category>
		<category><![CDATA[jquery]]></category>
		<guid isPermaLink="false">http://www.siriinnovations.com/blog/?p=557</guid>

					<description><![CDATA[<p>Introduction: Decoupling is when we remove these unnecessary relationships, allowing units of code to function independently. Applications should be able to function independently or with other apps in a container (think widgets). While the concept of custom events in jQuery may not be a new one, I tend to only see them used amongst plugins, mainly to [&#8230;]</p>
<p>The post <a href="https://siriinnovations.com/blog/decoupling-custom-jquery-events/">Decoupling with custom jQuery events</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>Decoupling is when we remove these unnecessary relationships, allowing units of code to function independently. Applications should be able to function independently or with other apps in a container (think widgets).</p>
<p>While the concept of <a href="http://api.jquery.com/trigger/">custom events in jQuery</a> may not be a new one, I tend to only see them used amongst plugins, mainly to keep their events namespaced for fear of collusion with other events.</p>
<p>The truth is they can be leveraged in everyday and jQuery code to help make life a little easier.</p>
<p><strong>The problem</strong></p>
<p>It’s not uncommon to see a single event handler finding itself responsible for many things:</p>
<div>
<pre class="code" lang="js">$('.add-items').on('click', function(event) {
$('.loading-message').show();
$.ajax({
// etc
});
$('.something-else').addClass('foo')
event.preventDefault();
});</pre>
</div>
<p>Having an event handler responsible for a lot of different tasks will typically result in large, incoherent event callbacks. These can often get worse when other developers have to add in additional functionality later.</p>
<p><strong>Decoupling all the things</strong></p>
<p>One route I like to take is to separate the logic relating to the DOM event.This means just handling anything related to the event (preventDefault or stopPropagation calls, for example) and then firing a custom event and allowing another part of the application handle the ‘business’ side of things:</p>
<div>
<pre class="code" lang="js">var doc = $(document);
$('.add-items').on('click', function(event) {
doc.trigger('addItem', [$(this)]);
event.preventDefault();
});</pre>
</div>
<p>The first thing to note is that I’m grabbing a reference to the document wrapped as a jQuery object:</p>
<div>
<pre class="code" lang="js">var doc = $(document);</pre>
</div>
<p>By triggering the events on this global object, it can become a sort of mediator between other parts of code.</p>
<p>Storing a reference to it outside of the event handler callback also means that it won’t be created each time the button is clicked. This is a good practice to get in the habit of.</p>
<p>Then all that is required is to trigger an event of our choice and pass any useful data along with it.</p>
<div>
<pre class="code" lang="js">doc.trigger('addItem', [$(this)]);</pre>
</div>
<p>An object or array can be passed along with the event. In this case i am passing along a jQuery object that refers to the clicked button.</p>
<p><strong>Responding to the event</strong></p>
<p>Listening for the addItem event is as simple as creating an event listener on the documentobject:</p>
<div>
<pre class="code" lang="js">$(document).on('addItem', function(event, btnElement) {
$('.something-else').addClass('foo')
});
$(document).on('addItem', function(event, btnElement) {
$.ajax({
// etc
});
});</pre>
</div>
<p>The event object in the above callback handlers are related to the add Itemcustom event and have nothing to do with the earlier click event.</p>
<p>Now the logic is nicely separated, and additional chunks of functionality can be added or removed without any need to worry about the other parts of the application.</p>
<p>And seeing as the global document object was chosen to be the mediator, these events can be attached in other places (perhaps a different file completely) without any extra effort.</p>
<p>It seems like a bit more work initially, but as the code expands, this way of decoupling events will start to pay back in droves.</p>
<p>The post <a href="https://siriinnovations.com/blog/decoupling-custom-jquery-events/">Decoupling with custom jQuery events</a> appeared first on <a href="https://siriinnovations.com/blog">Siri Innovations</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://siriinnovations.com/blog/decoupling-custom-jquery-events/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">557</post-id>	</item>
	</channel>
</rss>