<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8292395842061856168</id><updated>2025-05-25T03:19:06.955-07:00</updated><category term="C#"/><category term="ASP.Net"/><category term="Oracle"/><category term="Java"/><category term="Objective C - iOS"/><category term="PHP Programming Tips"/><category term="My Sql"/><category term="Pronto 4GL"/><category term="Ajax"/><category term="Android"/><category term="Java Script"/><category term="Maven"/><category term="SSRS Database Programming"/><title type='text'>Code Help Desk</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-1048310057872896150</id><published>2017-02-19T21:30:00.000-08:00</published><updated>2017-06-06T02:22:16.615-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Catch the running mode in Java - Running mode or Debug mode</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE6gb9czRBpWsLhAP8AWS2GMBDUzanHZw5KIztNzaECTzQKaQ5WH9Il1KX7kFCJYh4NVe6UtPenDsCjeHDIzTFkNZxtQ8n8dlcqT8pSTkmXJL8X-d-uU7P28ocRZVmuULDfV8F69OgmDub/s1600/joinus-java.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE6gb9czRBpWsLhAP8AWS2GMBDUzanHZw5KIztNzaECTzQKaQ5WH9Il1KX7kFCJYh4NVe6UtPenDsCjeHDIzTFkNZxtQ8n8dlcqT8pSTkmXJL8X-d-uU7P28ocRZVmuULDfV8F69OgmDub/s320/joinus-java.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
boolean isDebug = java.lang.management.ManagementFactory.getRuntimeMXBean().&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getInputArguments().toString().indexOf(&quot;-agentlib:jdwp&quot;) &amp;gt; 0;&lt;br /&gt;
LOGGER.info(&quot;hihhhhhhhhhhhhhhhhhh&quot; + isDebug);&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/1048310057872896150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2017/02/catch-running-mode-in-java-running-mode.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/1048310057872896150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/1048310057872896150'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2017/02/catch-running-mode-in-java-running-mode.html' title='Catch the running mode in Java - Running mode or Debug mode'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE6gb9czRBpWsLhAP8AWS2GMBDUzanHZw5KIztNzaECTzQKaQ5WH9Il1KX7kFCJYh4NVe6UtPenDsCjeHDIzTFkNZxtQ8n8dlcqT8pSTkmXJL8X-d-uU7P28ocRZVmuULDfV8F69OgmDub/s72-c/joinus-java.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-1939776395286924289</id><published>2016-11-29T04:12:00.001-08:00</published><updated>2017-05-31T21:32:44.232-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java OOP Concepts 2 - Run time Polymorphism - Method Overriding </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;Run Time Polymorphism (Method Overriding) in JAVA&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-qNDv6-nfWkoEuEJ3p7EoCzTsBtszgkEBb0QYYyrEIj9eFwsnE4ZwsEUOlvBzX_ZDRps5aqhn0uReay8TBwNqKfA1pFJeT2v-Mgx53ch3TZlOwoj9hHElRTZdWtWU9iQOoiOZBzBh3x9y/s1600/joinus-java.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-qNDv6-nfWkoEuEJ3p7EoCzTsBtszgkEBb0QYYyrEIj9eFwsnE4ZwsEUOlvBzX_ZDRps5aqhn0uReay8TBwNqKfA1pFJeT2v-Mgx53ch3TZlOwoj9hHElRTZdWtWU9iQOoiOZBzBh3x9y/s320/joinus-java.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This can be explained as one method or action in many forms.&lt;br /&gt;
There are two types of polymorphism in Java.&lt;br /&gt;
&lt;br /&gt;
01. Run time polymorphism - Method overriding.&lt;br /&gt;
02. Compile time polymorphism - Method overloading.&lt;br /&gt;
&lt;br /&gt;
In this article I will explain about &lt;b&gt;Run Time Polymorphism&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This is also called as &amp;nbsp;&quot;Dynamic Method Dispatch&quot;. There can be multiple methods with same name but the determination of which one to be called is decided at run time.&lt;br /&gt;
&lt;br /&gt;
This is the process of&amp;nbsp;an overridden method is called through the reference variable of a super class.&lt;br /&gt;
&lt;br /&gt;
An example if below which is extracted from&amp;nbsp;&lt;a href=&quot;http://www.javatpoint.com/runtime-polymorphism-in-java&quot;&gt;http://www.javatpoint.com/runtime-polymorphism-in-java&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;

&lt;pre&gt;
class Bank{  
int getRateOfInterest(){return 0;}  
}  
  
class SBI extends Bank{  
int getRateOfInterest(){return 8;}  
}  
  
class ICICI extends Bank{  
int getRateOfInterest(){return 7;}  
}  
class AXIS extends Bank{  
int getRateOfInterest(){return 9;}  
}  
  
class Test3{  
public static void main(String args[]){  
Bank b1=new SBI();  // This process is called upcasting.
Bank b2=new ICICI();  
Bank b3=new AXIS();  
System.out.println(&quot;SBI Rate of Interest: &quot;+b1.getRateOfInterest());  
System.out.println(&quot;ICICI Rate of Interest: &quot;+b2.getRateOfInterest());  
System.out.println(&quot;AXIS Rate of Interest: &quot;+b3.getRateOfInterest());  
}  
}
&lt;/pre&gt;


However java object data members ( data member = Unique data for an object ) are not be able to override.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/1939776395286924289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/11/java-oop-concepts-2-run-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/1939776395286924289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/1939776395286924289'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/11/java-oop-concepts-2-run-time.html' title='Java OOP Concepts 2 - Run time Polymorphism - Method Overriding '/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-qNDv6-nfWkoEuEJ3p7EoCzTsBtszgkEBb0QYYyrEIj9eFwsnE4ZwsEUOlvBzX_ZDRps5aqhn0uReay8TBwNqKfA1pFJeT2v-Mgx53ch3TZlOwoj9hHElRTZdWtWU9iQOoiOZBzBh3x9y/s72-c/joinus-java.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-3845713123387377724</id><published>2016-10-07T00:15:00.003-07:00</published><updated>2017-02-27T01:08:00.687-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java OOP Concepts 1 </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZKaTxuBpMQW0ZwTyDWG9LyanW86GQ97iFgi-wNJzkj8LRfQh4VfCbuIr7hSQID4MrfjbsPcGYYhi7viz_5pjPG428FOicFuDZJRxXHHc85nap6Voo-c79RF-y7QW9C3rhZk_fvPUN6MYn/s1600/oracle_java-100026145-large.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZKaTxuBpMQW0ZwTyDWG9LyanW86GQ97iFgi-wNJzkj8LRfQh4VfCbuIr7hSQID4MrfjbsPcGYYhi7viz_5pjPG428FOicFuDZJRxXHHc85nap6Voo-c79RF-y7QW9C3rhZk_fvPUN6MYn/s320/oracle_java-100026145-large.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Below I have listed a few points of general OOP concepts. In future I will explain each of these with individual articles.&lt;br /&gt;
&lt;br /&gt;
01. Simula is the first oo language&lt;br /&gt;
02. Smalltalk is the first true OO lang&lt;br /&gt;
03. Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Object is an entity which has state and behavior.&lt;br /&gt;
&lt;br /&gt;
04. Class&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Class is a collection of objects.&lt;br /&gt;
&lt;br /&gt;
------ OOP Concepts ---------------------------&lt;br /&gt;
05. Inheritance&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* If a class acquire all properties and behaviors of super class then inheritance happened there.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;b&gt;class Super {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; .....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; .....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;class Sub extends Super {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; .....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; .....&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
06. Abstraction&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Hiding internal details when interact with public world it is called abstraction.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Abstract classes achieves abstraction&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Interface achieves abstraction.&lt;br /&gt;
&lt;br /&gt;
07. Encapsulation - Data Hiding&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Wrapping all data into one object/unit is called encapsulation.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* In encapsulation, the variables of a class will be hidden from other classes&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* To do this&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* Declare private variables.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* Provide public getters and setters to access or modify data.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Pros&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* The fields of a class can be made read-only or write-only.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* Have control for field values.&lt;br /&gt;
08. Polymorphism&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Means many form of same method but various functions or processes&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Run time polymorphism&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* &lt;b&gt;OVERRIDING&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;* Compile time polymorphism&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;* &lt;b&gt;OVERLOADING&lt;/b&gt;&lt;br /&gt;
------ OOP Concepts ---------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/3845713123387377724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/10/java-oop-concepts-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3845713123387377724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3845713123387377724'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/10/java-oop-concepts-1.html' title='Java OOP Concepts 1 '/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZKaTxuBpMQW0ZwTyDWG9LyanW86GQ97iFgi-wNJzkj8LRfQh4VfCbuIr7hSQID4MrfjbsPcGYYhi7viz_5pjPG428FOicFuDZJRxXHHc85nap6Voo-c79RF-y7QW9C3rhZk_fvPUN6MYn/s72-c/oracle_java-100026145-large.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-2965743450792161787</id><published>2016-06-09T23:20:00.001-07:00</published><updated>2017-02-27T22:10:36.853-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><title type='text'>Maven build commands through command prompt - Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s1600/joinus-java.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s320/joinus-java.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When you are building a project through a command &amp;nbsp;prompt you have go to project root folder and then then run maven using below commands.&lt;br /&gt;
&lt;br /&gt;
Clean project with below command.&lt;br /&gt;
&lt;b&gt;mvn clean&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Clean and build project with below command.&lt;br /&gt;
&lt;b&gt;mvn clean install&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Clean and build project with below command with more logs.&lt;br /&gt;
&lt;b&gt;mvn clean -X install&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Clean and build project with below command. But this command skips test scripts of the code.&lt;br /&gt;
&lt;b&gt;mvn clean install -Dmaven.test.skip=true&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Cheers.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/2965743450792161787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/06/maven-build-commands-through-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2965743450792161787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2965743450792161787'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/06/maven-build-commands-through-command.html' title='Maven build commands through command prompt - Java'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s72-c/joinus-java.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-6336087073410353679</id><published>2016-05-29T23:13:00.004-07:00</published><updated>2017-02-27T22:11:11.066-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Descending order sorting a HashMap,TreeMap in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s1600/java.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s320/java.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif; font-size: 13px; line-height: 18.2px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif; font-size: 13px; line-height: 18.2px;&quot;&gt;Here is the code&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;color: #134f5c; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: 18.2px;&quot;&gt;Public static void mai(String[] args) {&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;TreeMap&amp;lt;String, Integer&amp;gt; treeMap = new TreeMap&amp;lt;String, Integer&amp;gt;();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;Iterator&amp;lt;Entry&amp;lt;String,&amp;nbsp;Integer&amp;gt;&amp;gt; entries = map.entrySet().iterator();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;while (entries.hasNext()) {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Entry&amp;lt;String, Integer&amp;gt; entry = entries.next();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;treeMap.put(entry.getKey(),&amp;nbsp;entry.getValue());&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #134f5c; line-height: 18.2px;&quot;&gt;&lt;b&gt;SortedSet&amp;lt;Map.Entry&amp;lt;String,Integer&amp;gt;&amp;gt; sm = new TreeSet&amp;lt;Map.Entry&amp;lt;String ,Integer&amp;gt;&amp;gt;();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;sm = &amp;nbsp; entriesSortedByValues(treeMap);&amp;nbsp;&amp;nbsp;// This is sorted map in descending order&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;//----------------&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;static &amp;lt;K,V extends Comparable&amp;lt;? super V&amp;gt;&amp;gt;&lt;br /&gt;SortedSet&amp;lt;Map.Entry&amp;lt;K,V&amp;gt;&amp;gt; entriesSortedByValues(Map&amp;lt;K,V&amp;gt; map) {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;SortedSet&amp;lt;Map.Entry&amp;lt;K,V&amp;gt;&amp;gt; sortedEntries = new TreeSet&amp;lt;Map.Entry&amp;lt;K,V&amp;gt;&amp;gt;(&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new Comparator&amp;lt;Map.Entry&amp;lt;K,V&amp;gt;&amp;gt;() {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;@Override public int compare(Map.Entry&amp;lt;K,V&amp;gt; e1, Map.Entry&amp;lt;K,V&amp;gt; e2) {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&amp;nbsp; &amp;nbsp; int res = e1.getValue().compareTo(e2.getValue());&lt;br /&gt;&amp;nbsp; &amp;nbsp; return res != 0 ? res : 1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&amp;nbsp; }&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;sortedEntries.addAll(map.entrySet());&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;return sortedEntries;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif; font-size: 13px; line-height: 18.2px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif; font-size: 13px; line-height: 18.2px;&quot;&gt;Happy coding&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/6336087073410353679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/descending-order-sorting-hashmaptreemap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6336087073410353679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6336087073410353679'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/descending-order-sorting-hashmaptreemap.html' title='Descending order sorting a HashMap,TreeMap in Java'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s72-c/java.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-8209131098285042438</id><published>2016-05-29T23:06:00.003-07:00</published><updated>2017-02-27T22:11:22.878-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Ascending order sorting a HashMap,TreeMap in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgagKkZ9PyV950NT4sXuy44D0_kkQGhJpu3twEx6w55PosPV3cvB3bsWM1MFiKY3MXtMgWXp-uCsNiFjrMC0GPL2jkXVhaIte2YTJdq22yATF9V9VdIxvuDQ1gl5Ff1aMEkKXBpcHzLv4rQ/s1600/oracle_java-100026145-large.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgagKkZ9PyV950NT4sXuy44D0_kkQGhJpu3twEx6w55PosPV3cvB3bsWM1MFiKY3MXtMgWXp-uCsNiFjrMC0GPL2jkXVhaIte2YTJdq22yATF9V9VdIxvuDQ1gl5Ff1aMEkKXBpcHzLv4rQ/s320/oracle_java-100026145-large.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here is the code&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;TreeMap&amp;lt;String, Integer&amp;gt; treeMap = new TreeMap&amp;lt;String, Integer&amp;gt;();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;Iterator&amp;lt;Entry&amp;lt;String,&amp;nbsp;Integer&amp;gt;&amp;gt; entries = map.entrySet().iterator();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;while (entries.hasNext()) {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Entry&amp;lt;String, Integer&amp;gt; entry = entries.next();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;treeMap.put(entry.getKey(),&amp;nbsp;entry.getValue());&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;SortedSet&amp;lt;Map.Entry&amp;lt;String,Integer&amp;gt;&amp;gt; sm = new TreeSet&amp;lt;Map.Entry&amp;lt;String ,Integer&amp;gt;&amp;gt;();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;b&gt;sm = &amp;nbsp; treeMap; // This is sorted map in ascending order&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Happy coding&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/8209131098285042438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/ascending-order-sorting-hashmaptreemap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/8209131098285042438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/8209131098285042438'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/ascending-order-sorting-hashmaptreemap.html' title='Ascending order sorting a HashMap,TreeMap in Java'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgagKkZ9PyV950NT4sXuy44D0_kkQGhJpu3twEx6w55PosPV3cvB3bsWM1MFiKY3MXtMgWXp-uCsNiFjrMC0GPL2jkXVhaIte2YTJdq22yATF9V9VdIxvuDQ1gl5Ff1aMEkKXBpcHzLv4rQ/s72-c/oracle_java-100026145-large.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-7794984267695293963</id><published>2016-05-29T23:01:00.001-07:00</published><updated>2017-02-27T22:11:37.766-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Recursive Method in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s1600/joinus-java.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s320/joinus-java.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here is the example.&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;public static LinkedHashMap&amp;lt;String,String&amp;gt; process(LinkedHashMap&amp;lt;String,String&amp;gt; map) {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; // Do some process here.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;//Lets say you need to iterate this method until your map getting empty.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; //then this is the way to do that.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; if( map.isEmpty()&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return null; // Here brake the loop.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; else&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return process(map); // Here still continue the loop&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Cheers.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/7794984267695293963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/recursive-method-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/7794984267695293963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/7794984267695293963'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/recursive-method-in-java.html' title='Recursive Method in Java'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdh5epQDH2hVfkZZaf3RJzg_2iGzJV3EfojlYQVOZPE-jyoMkV3nvYImL4C0mojco5VQm5EAIBcmJZHqwwB4uylRzL5fdJwR-3vk0o59MERY8s6eg6Mg2no07vCWIRkmDW9AdBHuqReBek/s72-c/joinus-java.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-5164029226843159472</id><published>2016-05-29T22:46:00.001-07:00</published><updated>2017-02-27T22:12:14.003-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Read HashMap using  Iterator in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s1600/java.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s320/java.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here I have used LinkedHashMap since I needed a map in insertion order. No matter it is LinkedHashMap or just HashMap this is the way to iterate it and read elements of key values pairs.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;LinkedHashMap&amp;lt;String, String&amp;gt; map = new LinkedHashMap&amp;lt;&amp;gt;();&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;map.put(&quot;A&quot;, &quot;1&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;map.put(&quot;M&quot;, &quot;1M&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;map.put(&quot;B.C&quot;, &quot;2&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;map.put(&quot;B.D.e&quot;, &quot;2&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;map.put(&quot;B.D.H&quot;, &quot;2&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;Iterator&amp;lt;Entry&amp;lt;String, String&amp;gt;&amp;gt; it = map.entrySet().iterator();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;while (it.hasNext()) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@SuppressWarnings(&quot;rawtypes&quot;)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Map.Entry entry = (Map.Entry)it.next();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Key &amp;nbsp; - &quot; +&amp;nbsp;entry.getKey().toString());&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Value - &quot;&amp;nbsp;+&amp;nbsp;entry.getValue().toString());&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
Do not hesitate to contact me if you have any issue. This is my tested code and it works fine. Happy coding.&lt;br /&gt;
You comments and ideas are highly admirable.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/5164029226843159472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/read-hashmap-using-iterator-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/5164029226843159472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/5164029226843159472'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2016/05/read-hashmap-using-iterator-in-java.html' title='Read HashMap using  Iterator in Java'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggx6ggtRfsxYQVPTA7yjPteR-qQyvG2UOfuQd_kUyDQln8ZXAVTiHLvkGE8-mqcz7WbI0xQp1Fe7NKi8PPvEjI5tvpQRCLOoYifoUJnyD7abl2dAdK0Q49Dk0_VBb2GpCHwXGzK1XLEMRt/s72-c/java.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-2429126746933796201</id><published>2015-10-28T23:11:00.002-07:00</published><updated>2016-01-26T21:05:07.869-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SSRS Database Programming"/><title type='text'>Use multiple DataSource data in one report table in SSRS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
When we create SSRS reports we can drag n drop column to to table from data source.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
But if we need to use two data sources and show both data in one table.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
Like sum,avg from one data source &amp;amp; cell values from another data source .&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
Then we can add regular exp to relevant header (where sum and avg put) &amp;nbsp;column text box as below.&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;&lt;i&gt;=First(Fields!flowRateTotal.Value,&quot;dsTotAvgData&quot;)&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: small;&quot;&gt;
In above expression &quot;&lt;b&gt;flowRateTotal&lt;/b&gt;&quot; is the field name and &quot;&lt;b&gt;dsTotAvgData&lt;/b&gt;&quot; DataSet name. All others are SSRS keywords.&lt;b&gt;&lt;i&gt;&lt;br clear=&quot;all&quot; /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy coding.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/2429126746933796201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/10/use-multiple-data-source-data-in-one.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2429126746933796201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2429126746933796201'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/10/use-multiple-data-source-data-in-one.html' title='Use multiple DataSource data in one report table in SSRS'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-6952443741630669285</id><published>2015-10-12T02:54:00.002-07:00</published><updated>2016-05-29T22:32:55.081-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Check NSDictionary is Empty or not - Objective C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are an iOS developer you will need to use data type called NSDictionary. &lt;br /&gt;
&lt;br /&gt;
When I m implementing web service access ( REST type , JSON output) I needed to populate data using using a NSDictionary. It worked fine but there was an issue coming when web service data is empty. So this case I had to find a way to check dictionary is empty or not either null or not.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
I have tried below way but exception thrown.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;[responseObject count];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Then I have tried and no errors was fired for empty list. Happy coding.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;if([NSNull null] != [responseObject objectForKey:@&quot;YOUR_JSON_OBJECT_NAME&quot;]) {&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;//Wow this worked.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can find my other article how to read REST full (JSON output) web service using AFNetworking library in iOS/Objective C. Just visit &lt;a href=&quot;http://codehelpdesk.blogspot/&quot;&gt;codehelpdesk.blogspot&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/6952443741630669285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/10/check-nsdictionary-empty-objective-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6952443741630669285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6952443741630669285'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/10/check-nsdictionary-empty-objective-c.html' title='Check NSDictionary is Empty or not - Objective C'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-7942343763737577679</id><published>2015-09-22T21:18:00.003-07:00</published><updated>2017-02-27T22:12:38.942-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java SOAP Web Service With Apache Axis2 </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
While I am developing JAVA axis2 web services I have found a good forum which describe how to set up web service via eclipse.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://codezone4.wordpress.com/2012/11/03/java-web-service-with-apache-axis2-in-eclipse/&quot;&gt;https://codezone4.wordpress.com/2012/11/03/java-web-service-with-apache-axis2-in-eclipse/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Happy coding.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/7942343763737577679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/09/java-soap-web-service-with-apache-axis2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/7942343763737577679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/7942343763737577679'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/09/java-soap-web-service-with-apache-axis2.html' title='Java SOAP Web Service With Apache Axis2 '/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-670493308567286667</id><published>2015-08-07T09:45:00.002-07:00</published><updated>2017-02-27T22:13:42.041-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="My Sql"/><title type='text'>How to get IDENTITY number of insert query C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have added my sample code snippet below to retrive Identity number when run the insert query. You have to create connection string and other parameter names as you wanted.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;using (var con = new SqlConnection(ConnectionString)) {&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; int newID;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; var cmd = &quot;INSERT INTO foo (column_name)VALUES (@Value);SELECT CAST(scope_identity() AS int)&quot;;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; using (var insertCommand = new SqlCommand(cmd, con)) {&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insertCommand.Parameters.AddWithValue(&quot;@Value&quot;, &quot;bar&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.Open();&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; newID = (int)insertCommand.ExecuteScalar();&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/670493308567286667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/08/how-to-get-identity-number-of-insert.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/670493308567286667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/670493308567286667'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/08/how-to-get-identity-number-of-insert.html' title='How to get IDENTITY number of insert query C#'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-6495647387986778010</id><published>2015-07-29T01:21:00.006-07:00</published><updated>2016-05-29T22:32:55.078-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>How to dynamically move between two view controllers in Objective C - iOS,Xcode</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;This code show how to move between two view controllers&amp;nbsp;dynamically.&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;To do this we need to catch what is the user device the app is running. It shold be either iPhone or iPad.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;Below I have explain the code well.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;01. Define a string with default value as&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;NSString *storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;if([[UIDevice currentDevice].model &amp;nbsp;isEqualToString:@&quot;iPhone&quot;])&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;}else if([[UIDevice currentDevice].model isEqualToString:@&quot;iPad&quot;])&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;storyboardTypeName = @&quot;Main_iPad&quot;;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;UIStoryboard *storyboard1 = [UIStoryboard storyboardWithName:storyboardTypeName bundle: nil];&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;UIViewController *controller = [storyboard1 instantiateViewControllerWithIdentifier:@&quot;termsnConditionVC&quot;];&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;[self.navigationController pushViewController:controller animated:YES];&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: Menlo;&quot;&gt;Happy coding&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/6495647387986778010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/how-to-dynamically-move-between-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6495647387986778010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6495647387986778010'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/how-to-dynamically-move-between-two.html' title='How to dynamically move between two view controllers in Objective C - iOS,Xcode'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-614897521701711876</id><published>2015-07-29T01:19:00.001-07:00</published><updated>2016-01-26T20:56:17.561-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Programming Tips"/><title type='text'>Read Server Path using PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This article shows you how to read server URL using PHP.&lt;br /&gt;
As an example if this code runs at abc.com/index.php then it output abc.com&lt;br /&gt;
&lt;br /&gt;
Source coed added below.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;$pos&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;= strripos($_SERVER[&quot;SERVER_NAME&quot;].$_SERVER[&quot;REQUEST_URI&quot;], &#39;/&#39;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;$serverFTPPath = substr($_SERVER[&quot;SERVER_NAME&quot;].$_SERVER[&quot;REQUEST_URI&quot;],0,$pos);&lt;/i&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy coding.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/614897521701711876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/read-server-path-using-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/614897521701711876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/614897521701711876'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/read-server-path-using-php.html' title='Read Server Path using PHP'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-4614704756062628779</id><published>2015-07-29T00:20:00.000-07:00</published><updated>2016-01-26T20:56:17.555-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Programming Tips"/><title type='text'>Multiple Files Upload in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is how we can upload multiple files using PHP.&lt;br /&gt;
&lt;br /&gt;
HTML code below.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;div class=&quot;row footer&quot;&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;div class=&quot;col-md-12 contact_left&quot;&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;h3&amp;gt;Upload multiple files to server &amp;lt;/h3&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;form action=&quot;&quot; method=&quot;post&quot; &amp;nbsp;&lt;b&gt;enctype=&quot;multipart/form-data&quot;&lt;/b&gt;&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;nbsp; &amp;lt;label for=&quot;file&quot;&amp;gt;&amp;lt;?php echo &#39;Select File/Files&#39;; ?&amp;gt;&amp;lt;/label&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;input type=&quot;file&quot; name=&quot;&lt;b&gt;files[]&lt;/b&gt;&quot; multiple style=&quot;font-size:14px;&quot;/&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;button type=&quot;input&quot; name=&quot;submit&quot; value=&quot;contactUs&quot; class=&quot;btn btn-success btn-icon pull-right&quot;&amp;gt;&amp;lt;?php echo &#39;Submit&#39;; ?&amp;gt;&amp;lt;/button&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/form&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;lt;/div&amp;gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Now I have added below PHP code and it shows how to upload multiple files to server. (Not the DB)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;if (isset($_POST[&#39;submit&#39;]) &amp;amp;&amp;amp; $_POST[&#39;submit&#39;] == &#39;contactUs&#39;) {&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//upload file start here&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$randomString=md5(uniqid(rand()));&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$appendName=substr($randomString, 0, 8);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$folderName = &amp;nbsp;$appendName;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$newDir =&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&#39;uploads/&#39;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$folderName&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(isset($_FILES[&#39;files&#39;])){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$errors= array();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;foreach($_FILES[&#39;files&#39;][&#39;tmp_name&#39;] as $key =&amp;gt; $tmp_name ){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$file_name = $key.$_FILES[&#39;files&#39;][&#39;name&#39;][$key];&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$file_size =$_FILES[&#39;files&#39;][&#39;size&#39;][$key];&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$file_tmp =$_FILES[&#39;files&#39;][&#39;tmp_name&#39;][$key];&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$file_type=$_FILES[&#39;files&#39;][&#39;type&#39;][$key];&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if($file_size &amp;gt; 2097152){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;$errors[]=&#39;File size must be less than 2 MB&#39;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;$desired_dir= $newDir; //echo $desired_dir;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if(empty($errors)==true){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;if(is_dir($desired_dir)==false){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;//echo &#39;&amp;lt;br&amp;gt; Make Dir&#39;.$desired_dir.&#39;&amp;lt;br&amp;gt;&#39;;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;mkdir(&quot;$desired_dir&quot;, 0700);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Create directory if it does not exist&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;if(is_dir(&quot;$desired_dir/&quot;.$file_name)==false){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;move_uploaded_file($file_tmp,&quot;$desired_dir/&quot;.$file_name);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}else{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;         &lt;/span&gt;// rename the file if another one exist&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;$new_dir=&quot;$desired_dir/&quot;.$file_name.time();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt; rename($file_tmp,$new_dir) ;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}else{&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;print_r($errors);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//upload file end &amp;nbsp;here&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
You have put both code &amp;nbsp;in same PHP file. And happy coding.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/4614704756062628779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/multiple-files-upload-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/4614704756062628779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/4614704756062628779'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/07/multiple-files-upload-in-php.html' title='Multiple Files Upload in PHP'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-3964049303500061564</id><published>2015-06-15T01:25:00.000-07:00</published><updated>2016-05-29T22:32:55.074-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Multiple UIAlertView in Objective C - iOS,XCode</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In iPhone mobile applications you can show alerts to users to give some message and so on.&lt;br /&gt;
Xcode provides a mechanism called UIAlertView for this. This article let you know how to pop up a UIAlertView and how to catch their button click events.&lt;br /&gt;
&lt;br /&gt;
First I show you how to show a uialertview to user.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #703daa;&quot;&gt;UIAlertView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;* dialog = [[&lt;/span&gt;&lt;span style=&quot;color: #703daa;&quot;&gt;UIAlertView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;initWithTitle&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;@&quot;Hello&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;&quot;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;delegate&lt;/span&gt;:&lt;span style=&quot;color: #bb2ca2;&quot;&gt;self&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;cancelButtonTitle&lt;/span&gt;:@&quot;Cancel&quot;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;otherButtonTitles&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;OK&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;nil&lt;/span&gt;];&lt;br /&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.&lt;span style=&quot;color: #703daa;&quot;&gt;tag&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #272ad8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[dialog&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;show&lt;/span&gt;];&lt;/h4&gt;
&lt;div&gt;
&lt;h4 style=&quot;background-color: white; font-family: Menlo; font-size: 12px;&quot;&gt;
&lt;span style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #703daa;&quot;&gt;UIAlertView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;* dialog2 = [[&lt;/span&gt;&lt;span style=&quot;color: #703daa;&quot;&gt;UIAlertView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;initWithTitle&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;@&quot;Hello World&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;message&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;&quot;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;delegate&lt;/span&gt;:&lt;span style=&quot;color: #bb2ca2;&quot;&gt;self&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;cancelButtonTitle&lt;/span&gt;:@&quot;Cancel&quot;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;otherButtonTitles&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;OK&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;nil&lt;/span&gt;];&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog2.&lt;span style=&quot;color: #703daa;&quot;&gt;tag&lt;/span&gt;&amp;nbsp;= &lt;/span&gt;&lt;span style=&quot;color: #272ad8;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[dialog2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;color: #222222;&quot;&gt;];&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Above code snippets show you a pop up message says &#39;Hello&#39;. And there are two buttons such &#39;cancel&#39; &amp;amp; &#39;OK&#39;. And below I shows how UIAlertView button click event catch and if multiple UIAlertViews are in the view controller class and how filter button click of which one.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
- (&lt;span style=&quot;color: #bb2ca2;&quot;&gt;void&lt;/span&gt;)alertView:(&lt;span style=&quot;color: #703daa;&quot;&gt;UIAlertView&lt;/span&gt;&amp;nbsp;*)alertView clickedButtonAtIndex:(&lt;span style=&quot;color: #703daa;&quot;&gt;NSIntege&lt;wbr&gt;&lt;/wbr&gt;r&lt;/span&gt;)buttonIndex {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(alertView.&lt;span style=&quot;color: #703daa;&quot;&gt;tag&lt;/span&gt;&amp;nbsp;==&amp;nbsp;&lt;span style=&quot;color: #272ad8;&quot;&gt;1&lt;/span&gt;) {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #008400; font-family: Menlo; font-size: 12px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;// Hello UIAlertViewClick&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(alertView.&lt;span style=&quot;color: #703daa;&quot;&gt;tag&lt;/span&gt;&amp;nbsp;==&amp;nbsp;&lt;span style=&quot;color: #272ad8;&quot;&gt;2&lt;/span&gt;) {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #008400; font-family: Menlo; font-size: 12px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;// Hello World UiAlertViewClick&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px;&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/3964049303500061564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/multiple-uialertview-in-objective-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3964049303500061564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3964049303500061564'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/multiple-uialertview-in-objective-c.html' title='Multiple UIAlertView in Objective C - iOS,XCode'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-3574408359627954263</id><published>2015-06-15T01:24:00.002-07:00</published><updated>2017-02-27T01:12:01.823-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Send Notifications in Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT6eX_1tuMutQjexR2tdoHHRuWwJr-qGguWtikqsylfoJfSXcpnAtiWeWItER21Rr-VylO_I7OeBrfPYtLrYYmojxfUeOyGM7vNFpODt9S1rS8WgdVhlUvsnS492fGSjWv0v5XT-l_rZkx/s1600/droid.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT6eX_1tuMutQjexR2tdoHHRuWwJr-qGguWtikqsylfoJfSXcpnAtiWeWItER21Rr-VylO_I7OeBrfPYtLrYYmojxfUeOyGM7vNFpODt9S1rS8WgdVhlUvsnS492fGSjWv0v5XT-l_rZkx/s320/droid.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Today I am going to show you how to send a user notification in Android.&lt;br /&gt;
Go through below code snippets and comments.&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void sendNotification() {&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//Start notification sending&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;String ns = Context.NOTIFICATION_SERVICE;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;NotificationManager mNotificationManager = (NotificationManager) this.getApplicationContext().getSystemService(ns);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int icon = R.drawable.notification_icon;&lt;br /&gt;//you should added notification icon to drawable folder.&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;CharSequence tickerText = getString(R.string.notification_bar_text);&lt;br /&gt;//You should define text in res-&amp;gt;values-&amp;gt;string.xml&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;long when = System.currentTimeMillis();&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Context context = getApplicationContext();&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;CharSequence contentTitle = getString(R.string.notification_bar_text);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;CharSequence contentText = &quot;Hello World&quot;;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;// when the notification is clicked, following Activity starts&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Intent notificationIntent = new Intent(this,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;MainActivity.class);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;PendingIntent contentIntent = PendingIntent.getActivity(this, 0,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Notification notification = new Notification(icon, tickerText, when);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;notification.setLatestEventInfo(context, contentTitle, contentText,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;contentIntent);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;notification.defaults = Notification.DEFAULT_SOUND;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;notification.flags = Notification.FLAG_AUTO_CANCEL;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;mNotificationManager.notify(1, notification);&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;//End notification sending&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/h4&gt;
&lt;br /&gt;
Happy coding.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/3574408359627954263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/send-notifications-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3574408359627954263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3574408359627954263'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/send-notifications-in-android.html' title='Send Notifications in Android'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT6eX_1tuMutQjexR2tdoHHRuWwJr-qGguWtikqsylfoJfSXcpnAtiWeWItER21Rr-VylO_I7OeBrfPYtLrYYmojxfUeOyGM7vNFpODt9S1rS8WgdVhlUvsnS492fGSjWv0v5XT-l_rZkx/s72-c/droid.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-8553974805964235379</id><published>2015-06-08T05:49:00.000-07:00</published><updated>2016-01-26T21:05:50.367-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Write gridview data to a notepad C# (windows application)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Through this code I planned to show how create a text file(note pad) by the C# desktop application&lt;br /&gt;
and which is store in the own application running folder.&lt;br /&gt;
&lt;br /&gt;
--------------------------&lt;br /&gt;
Name spaces need System.IO&lt;br /&gt;
//First of all you have to take the current application thread running path which will be the&lt;br /&gt;
//source path for the notepad&lt;br /&gt;
&lt;br /&gt;
String appRunDir = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath).ToString();&lt;br /&gt;
&lt;br /&gt;
//Then get the new notepad which you need to create&lt;br /&gt;
&lt;br /&gt;
String strDestinationFile;&lt;br /&gt;
strDestinationFile = appRunDir+&quot;\\YourNotePadNameHere&quot;+&quot;.txt&quot;;&lt;br /&gt;
&lt;br /&gt;
//Then write the file to disk&lt;br /&gt;
&amp;nbsp; if (!File.Exists(strDestinationFile)) using (StreamWriter sw = File.CreateText(strDestinationFile)) { }&lt;br /&gt;
&lt;br /&gt;
//Then write gridview data to the newly created note pad&lt;br /&gt;
&lt;br /&gt;
TextWriter tw = new StreamWriter(strDestinationFile);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int x = 0; x &amp;lt; GridView.Rows.Count - 1; x++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int y = 0; y &amp;lt; GridView.Columns.Count; y++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tw.Write(GridView.Rows[x].Cells[y].Value.ToString());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (y != GridView.Columns.Count - 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tw.Write(&quot; &amp;nbsp;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tw.WriteLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tw.Close();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Process.Start(&quot;notepad.exe&quot;, strDestinationFile);&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/8553974805964235379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/write-gridview-data-to-notepad-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/8553974805964235379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/8553974805964235379'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/write-gridview-data-to-notepad-c.html' title='Write gridview data to a notepad C# (windows application)'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-2260620194065419882</id><published>2015-06-08T05:48:00.001-07:00</published><updated>2016-05-29T22:32:55.061-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>How validate email in Objective C - iOS,Xcode</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This source code validate email string using regular expression. Enjoy it.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 12px; text-align: left;&quot;&gt;
- (&lt;span style=&quot;color: #bb2ca2;&quot;&gt;BOOL&lt;/span&gt;)validateEmailWithString:&lt;wbr&gt;&lt;/wbr&gt;(&lt;span style=&quot;color: #703daa;&quot;&gt;NSString&lt;/span&gt;*)email&lt;br /&gt;{&lt;br /&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #703daa;&quot;&gt;NSString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*emailRegex =&amp;nbsp;&lt;/span&gt;@&quot;[A-Z0-9a-z._%+-]+@[A-Za-z0-&lt;wbr&gt;&lt;/wbr&gt;9.-]+\\.[A-Za-z]{2,4}&quot;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #703daa;&quot;&gt;NSPredicate&lt;/span&gt;&amp;nbsp;*emailTest = [&lt;span style=&quot;color: #703daa;&quot;&gt;NSPredicate&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;predicateWithFormat&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;SELF MATCHES %@&quot;&lt;/span&gt;, emailRegex];&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #bb2ca2;&quot;&gt;return&lt;/span&gt;&amp;nbsp;[emailTest&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;evaluateWithObject&lt;/span&gt;:email];&lt;br /&gt;}&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/2260620194065419882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/how-validate-email-in-objective-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2260620194065419882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2260620194065419882'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2015/06/how-validate-email-in-objective-c.html' title='How validate email in Objective C - iOS,Xcode'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-955591105362557306</id><published>2014-10-06T05:05:00.004-07:00</published><updated>2016-05-29T22:32:55.083-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Save small data in iOS / Objective C++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;&lt;b&gt;Save small data in iOS / Objective C++&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;
In some development cases you might need to save data on your iPhone app permanently. But you may no need to design a database for it as well. In this case you can use below code snippets.&lt;br /&gt;
&lt;br /&gt;
T&lt;span style=&quot;background-color: white; font-family: Menlo;&quot;&gt;o save data you can use below code.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Menlo;&quot;&gt;On the below code &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;DasunTharaka&lt;/span&gt;&quot; is the value of data and &quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #d12f1b; font-family: Menlo;&quot;&gt;name&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt; is the data accessing key.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #d12f1b; font-family: Menlo; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #d12f1b; font-family: Menlo; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #703daa; font-family: Menlo;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*prefs = [&lt;/span&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;standardUserDefaults&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #d12f1b; font-family: Menlo;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;[prefs&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;setObject&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;@&quot;DasunTharaka&quot;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;forKey&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;@&quot;name&quot;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #d12f1b; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #d12f1b; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;Then you can read them using below code.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #d12f1b; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #703daa; font-family: Menlo;&quot;&gt;
&lt;b&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*prefs = [&lt;/span&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d1d81;&quot;&gt;standardUserDefaults&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #703daa; font-family: Menlo;&quot;&gt;
&lt;b style=&quot;color: #222222;&quot;&gt;&lt;span style=&quot;color: #703daa;&quot;&gt;NSString&lt;/span&gt;&amp;nbsp;*textToLoad = [prefs&amp;nbsp;&lt;span style=&quot;color: #3d1d81;&quot;&gt;stringForKey&lt;/span&gt;:&lt;span style=&quot;color: #d12f1b;&quot;&gt;@&quot;name&quot;&lt;/span&gt;];&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #4f8187;&quot;&gt;_myTxt&lt;/span&gt;.&lt;span style=&quot;color: #703daa;&quot;&gt;text&lt;/span&gt;&amp;nbsp;= textToLoad;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;Also this data will not be erased even if you kill the app or switched off the phone.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;Happy coding.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;Thanks.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;Dasun&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Menlo; font-size: 13px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/955591105362557306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/10/save-small-data-in-ios-objective-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/955591105362557306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/955591105362557306'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/10/save-small-data-in-ios-objective-c.html' title='Save small data in iOS / Objective C++'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-2276468915455415743</id><published>2014-09-12T05:29:00.001-07:00</published><updated>2016-05-29T22:32:55.064-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Jump to another view controller dynamically  - IOS / Objective C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;Jump to another view controller without using segues - IOS / Objective C&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;
As a iOS/iPhone developer you have might need to move between different view controllers time to time. I hope everyone knows that there is an easy way using segues. Segues are generating from UI layout. But you may want to redirect to another IOS View controller dynamically. Therefore I have programmed this event below manner.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NSString *storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if([[UIDevice currentDevice].model &amp;nbsp;isEqualToString:@&quot;iPhone&quot;]){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else if([[UIDevice currentDevice].model isEqualToString:@&quot;iPad&quot;]){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storyboardTypeName = @&quot;Main_iPad&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:storyboardTypeName bundle: nil];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlCouponListViewController *listViewViewController = [mainStoryboard instantiateViewControllerWithIdentifier:@&quot;secondViewControllerID&quot;];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [(UINavigationController*)self.window.rootViewController pushViewController:listViewViewController animated:NO];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Now I am gonna explain you what I have done using above code.&lt;br /&gt;
&lt;br /&gt;
------------------&lt;br /&gt;
&lt;b&gt;NSString *storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if([[UIDevice currentDevice].model &amp;nbsp;isEqualToString:@&quot;iPhone&quot;]){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storyboardTypeName = @&quot;Main_iPhone&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else if([[UIDevice currentDevice].model isEqualToString:@&quot;iPad&quot;]){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; storyboardTypeName = @&quot;Main_iPad&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This code snippets identify the user device either current device is a iPhone or iPad. Because my app was a universal one. But if you are using only iPhone or ipad app then you no need this code.&lt;br /&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:storyboardTypeName bundle: nil];&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This line of code does what is catching the storeboard is.&lt;br /&gt;
------------------&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;dlCouponListViewController *listViewViewController = [mainStoryboard instantiateViewControllerWithIdentifier:@&quot;secondViewControllerID&quot;];&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
This line catches the next view controller app should be redirected.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;secondViewControllerID &lt;/b&gt;is the id of next particular view controller.&lt;/div&gt;
------------------&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;[(UINavigationController*)self.window.rootViewController pushViewController:listViewViewController animated:NO];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Finally navigation controller complete the redirection task.&lt;br /&gt;
&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Thank you and happy coding.&lt;br /&gt;
Thanks.&lt;br /&gt;
Dasun&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/2276468915455415743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/jump-to-another-view-controller.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2276468915455415743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/2276468915455415743'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/jump-to-another-view-controller.html' title='Jump to another view controller dynamically  - IOS / Objective C'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-3038636630984222211</id><published>2014-09-12T02:40:00.000-07:00</published><updated>2016-05-29T22:32:55.069-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Mutiple UIAlertView handling in IOS / Objective C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;Mutiple UIAlertView&amp;nbsp;handling&amp;nbsp;in IOS /&amp;nbsp;Objective&amp;nbsp;C&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
I am explaining about the multiple UIAlertView handling.&lt;br /&gt;
&lt;br /&gt;
Below I have shown how to show a UIAlertView&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@&quot;&lt;/b&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;This is first message box pop up&lt;/b&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;!\n&quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;message:@&quot;\n\n &quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delegate:self&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cancelButtonTitle:@&quot;Cancel&quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;otherButtonTitles:@&quot;OK&quot;, nil];&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.tag = 1;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.alertViewStyle = UIAlertViewStylePlainTextInput;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [dialog show];&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@&quot;This is second message box pop up!\n&quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;message:@&quot;\n\n &quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delegate:self&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cancelButtonTitle:@&quot;Cancel&quot;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;otherButtonTitles:@&quot;OK&quot;, nil];&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.tag = 2;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.alertViewStyle = UIAlertViewStylePlainTextInput;&lt;/b&gt;&lt;br style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot; /&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [dialog show];&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;I have explained it well under &lt;a href=&quot;http://codehelpdesk.blogspot.com/2014/09/uialertview-message-box-in-ios.html&quot;&gt;&lt;b&gt;this article&lt;/b&gt;&lt;/a&gt;. &amp;nbsp;You can review it if you do not know how show a message box (UIAlertView) to user.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;Now I am going to show you how to identify the OK button or Cancel button click of each and every alert views.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; if (alertView.tag == 1) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; //&lt;/b&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;This is first message box execute method&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (buttonIndex == 1)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { // This is OK button click&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @try {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;NSString *useremail = [alertView textFieldAtIndex: 0].text;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } @catch (NSException * e) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@&quot;Exception: %@&quot;, e);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } @finally {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else if(&lt;/b&gt;&lt;b&gt;(alertView.tag == 0) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;//this is cancel button click&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; } else if (alertView.tag == 2) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; //&lt;/b&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;This is second message box execute method&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Now I m going to explain you about method.&lt;br /&gt;
When we create a UIAlertView you can see I have used below line of code.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;dialog.tag = 1; // this is for first message&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;dialog.tag = 2;&lt;/b&gt;&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&amp;nbsp;// this is for second message&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.4799995422363px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;div&gt;
This is the way app identify the executing uialertview. And it catch by below line of&amp;nbsp;alertView clickedButtonAtIndex: method.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;if (alertView.tag == 1) {&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I hope now you have how to handle the execution feed back of multiple UIAlertViews but now you may want to identify to know which button user has clicked. Either &quot;OK&quot; or &quot;Cancle&quot;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below lines of code identify it.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;if (buttonIndex == 1){&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Enjoy with UIAlertViews. Please do not forget to put a like if you get help from my article.&lt;/div&gt;
&lt;div&gt;
Thanks.&lt;/div&gt;
&lt;div&gt;
Dasun&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/3038636630984222211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/mutiple-uialertview-handling-in-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3038636630984222211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3038636630984222211'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/mutiple-uialertview-handling-in-ios.html' title='Mutiple UIAlertView handling in IOS / Objective C'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-4530671090580696434</id><published>2014-09-12T01:11:00.001-07:00</published><updated>2016-05-29T22:32:55.076-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>UIAlertView / Message box in IOS / Objective C </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
UIAlertView / Message box in IOS / Objective C&lt;br /&gt;
&lt;br /&gt;
Today I am going to explain you how to show a message box or UIAlertView from iphone/ipad application. I have attached a sample scree shot below and the source code below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6RKjqSWYjlxgJ2VAEiByS5r5VYODx5Dsm46jZmeEc9Q3WmjC_OliR6_bDWk77Mx8CJJf9tOa1CgzZso3NQg8ieZahTduLa_f5THbDmip2odEQH_b-Yhd3ncLmd6pBkwxw5Sys1ybd-wFP/s1600/add-uitextfield-in-uialertview-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6RKjqSWYjlxgJ2VAEiByS5r5VYODx5Dsm46jZmeEc9Q3WmjC_OliR6_bDWk77Mx8CJJf9tOa1CgzZso3NQg8ieZahTduLa_f5THbDmip2odEQH_b-Yhd3ncLmd6pBkwxw5Sys1ybd-wFP/s1600/add-uitextfield-in-uialertview-2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If we going show this to mobile user you have to use below code.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@&quot;Your title here!\n&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;message:@&quot;\n\n &quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delegate:self&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cancelButtonTitle:@&quot;Cancel&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;otherButtonTitles:@&quot;OK&quot;, nil];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.tag = 1;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dialog.alertViewStyle = UIAlertViewStylePlainTextInput;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [dialog show];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Below I am explaing the code line by line.&lt;br /&gt;
&lt;b&gt;----------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;i&gt;UIAlertView* dialog = [[UIAlertView alloc] initWithTitle:@&quot;Your title here!\n&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;message:@&quot;\n\n &quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delegate:self&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cancelButtonTitle:@&quot;Cancel&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;otherButtonTitles:@&quot;OK&quot;, nil];&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Above line is set up the message title , cancel button and OK button titles.&lt;br /&gt;
&lt;b&gt;----------------------&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;dialog.tag = 1;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This line will be help full when we have multiple UIAlertViews. Because app need to identify which alertview has been excuted and I have added it another post titled &quot;&lt;a href=&quot;http://codehelpdesk.blogspot.com/2014/09/mutiple-uialertview-handling-in-ios.html&quot;&gt;Mutiple UIAlertView&amp;nbsp;handling&amp;nbsp;in IOS /&amp;nbsp;Objective&amp;nbsp;C&lt;/a&gt;&quot;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;---------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;dialog.alertViewStyle = UIAlertViewStylePlainTextInput;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This line process the title text box of the alertview.&lt;br /&gt;
---------------------&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&amp;nbsp;[dialog show];&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This shows the UIAlertView to user.&lt;br /&gt;
&lt;br /&gt;
----------------------&lt;br /&gt;
Thank you and do not hesitate to contact me if any issues.&lt;br /&gt;
&lt;br /&gt;
Dasun&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/4530671090580696434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/uialertview-message-box-in-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/4530671090580696434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/4530671090580696434'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/uialertview-message-box-in-ios.html' title='UIAlertView / Message box in IOS / Objective C '/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6RKjqSWYjlxgJ2VAEiByS5r5VYODx5Dsm46jZmeEc9Q3WmjC_OliR6_bDWk77Mx8CJJf9tOa1CgzZso3NQg8ieZahTduLa_f5THbDmip2odEQH_b-Yhd3ncLmd6pBkwxw5Sys1ybd-wFP/s72-c/add-uitextfield-in-uialertview-2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-3537222917845263059</id><published>2014-09-12T00:51:00.001-07:00</published><updated>2016-05-29T22:32:55.071-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Objective C - iOS"/><title type='text'>Send local notifications - IOS / Objective C</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;b&gt;Send local notifications - IOS , Objective C&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When you are developing an iphone/ipad app you will need to send some notifications when the app is closed or exits. That notification can be jump at any where you need it to jump. Today I m going to show you how to send a notification to a user from your iapp.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UILocalNotification* localNotification = [[UILocalNotification alloc] init];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:60];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localNotification.alertBody = @&quot;Great you have one notification&quot;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localNotification.timeZone = [NSTimeZone defaultTimeZone];&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
this is code for location push notification in objective C. The second line&amp;nbsp;&quot;NSDate dateWithTimeIntervalSinceNow:60&quot; here 60 is the time duration to send a notifiation after fire a event.&lt;br /&gt;
&lt;br /&gt;
Happy coding. If any issue do not hesitate to contact me.&lt;br /&gt;
Thanks.&lt;br /&gt;
Dasun&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/3537222917845263059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/send-local-notifications-ios-objective-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3537222917845263059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/3537222917845263059'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/09/send-local-notifications-ios-objective-c.html' title='Send local notifications - IOS / Objective C'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8292395842061856168.post-6160943448935706602</id><published>2014-03-04T03:04:00.000-08:00</published><updated>2016-01-26T21:04:40.905-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Programming Tips"/><title type='text'>Read a file data using file browser in Jom social (Joomla ) using PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
It is bit typical to add own php code to take a file into the system using a file browser.&lt;br /&gt;
Here below I have attached the code&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;jimport(&#39;joomla.filesystem.file&#39;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$jinput = JFactory::getApplication()-&amp;gt;input;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$fileInput = new JInput($_FILES);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$file = $fileInput-&amp;gt;get(&#39;thumb&#39;, null, &#39;array&#39;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(isset($file) &amp;amp;&amp;amp; !empty($file[&#39;name&#39;])) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$filename = JFile::makeSafe($file[&#39;name&#39;]);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$src = $file[&#39;tmp_name&#39;];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;$data[&#39;image&#39;]=$filename;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;}&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Below I have attached the client code below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;nodeLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span aria-expanded=&quot;true&quot; class=&quot;nodeLabelBox repTarget &quot; role=&quot;treeitem&quot;&gt;&amp;lt;&lt;span class=&quot;nodeTag &quot;&gt;div&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;class&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;fileUpload btn btn-primary&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeBracket editable insertBefore &quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;nodeChildBox &quot; role=&quot;group&quot;&gt;
&lt;div class=&quot;nodeBox textNodeBox nodeHidden &quot; role=&quot;presentation&quot;&gt;
&lt;div class=&quot;nodeLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;nodeLabelBox repTarget &quot; role=&quot;treeitem&quot;&gt;&amp;lt;&lt;span class=&quot;nodeTag &quot;&gt;span&lt;/span&gt;&lt;span class=&quot;nodeBracket editable insertBefore &quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;nodeText editable &quot;&gt;&lt;span class=&quot;  &quot;&gt;Upload&lt;/span&gt;&lt;/span&gt;&amp;lt;/&lt;span class=&quot;nodeTag &quot;&gt;span&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nodeBox emptyNodeBox nodeHidden &quot; role=&quot;presentation&quot;&gt;
&lt;div class=&quot;nodeLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;nodeLabelBox repTarget &quot; role=&quot;treeitem&quot;&gt;&amp;lt;&lt;span class=&quot;nodeTag &quot;&gt;input&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;id&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;thumb&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;class&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;upload&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;type&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;file&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;style&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;position:
 absolute; top: 0; right: 0; margin: 0; padding: 0; font-size: 20px; 
cursor: pointer;opacity: 0;filter: alpha(opacity=0); width:150px;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeAttr editGroup &quot;&gt;&amp;nbsp;&lt;span class=&quot;nodeName editable &quot;&gt;name&lt;/span&gt;=&quot;&lt;span class=&quot;nodeValue editable &quot;&gt;thumb&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nodeBracket editable insertBefore &quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nodeCloseLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;nodeCloseLabelBox repTarget &quot;&gt;&amp;lt;/&lt;span class=&quot;nodeTag &quot;&gt;div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;nodeCloseLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;nodeCloseLabelBox repTarget &quot;&gt;&lt;span class=&quot;nodeTag &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;nodeCloseLabel &quot; role=&quot;presentation&quot;&gt;
&lt;span class=&quot;nodeCloseLabelBox repTarget &quot;&gt;&lt;span class=&quot;nodeTag &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codehelpdesk.blogspot.com/feeds/6160943448935706602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codehelpdesk.blogspot.com/2014/03/read-file-data-using-file-browser-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6160943448935706602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8292395842061856168/posts/default/6160943448935706602'/><link rel='alternate' type='text/html' href='http://codehelpdesk.blogspot.com/2014/03/read-file-data-using-file-browser-in.html' title='Read a file data using file browser in Jom social (Joomla ) using PHP'/><author><name>d</name><uri>http://www.blogger.com/profile/06316768209014037581</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>