For smart Primates & ROBOTS (oh and ALIENS ).

Thursday, April 23, 2015

html html5 to Pdf

Real Life Coding Stuff
Generate PDF file of html html5 with div span tags. It really works on liquid layout also! Try it now! html html5 to Pdf Download here: Part-1  Part-2 Part-3 Part-4 Part-5 Part-6 Part-7 Part-8 Part-9 Part-10 Part-11 Extract  all files Part-1 to Part-11...
Share:

Wednesday, April 22, 2015

File open Dialogbox show error System Threading ThreadStateException

Real Life Coding Stuff
Problem: I am wondering when you get the error 'System.Threading.ThreadStateException' while using OpenFileDialog in C# Winform application. So how to solve this? First we see the error details, after that I will show you solution. See the screenshot below. System.Threading.ThreadStateException Error...
Share:

Monday, April 20, 2015

How to use Response.Write in ASP.NET MVC 5

Problem: How to use Response.Write in ASP.NET MVC 5 Solution: See the below example: Example:    @{        Response.Write("<br/>Emp First Name :");    } OR   @("test"...
Share:

Sunday, April 19, 2015

jquery ui dialog box show previous page before show new page's contents

Problem: If you used jquery ui dialog box to show any dynamic page's contents then I am sure you have faced this problem. when you click first time it will work fine but the second time on click it will show previous page's contents and after  delay of 2 to 3 seconds it will show the contents of the url which you have supplied. this is the bug...
Share:

Friday, April 17, 2015

jquery ui datepicker automatically delete text from input field

Problem: Did you worked with jquery ui date picker? when assigned a default value to text filed, jquery ui datepicker will automatically delete text from that textbox field. So how to stop it? Solution: It seems the bug in jquery ui datepicker which is automatically delete text from input field. to overcome this problem you need to write 22 lines...
Share:

session destroyed after redirect in codeigniter

Problem: Working CodeIgniter framework you can face the session problem. the problem is when you storing the values in session and redirect the page. then session destroyed automatically, it is loosing session data even you have properly loaded session library $this->load->library('session') in constructor. see the below code: public function...
Share:

Wednesday, April 15, 2015

How to use multilanguage in CodeIgniter

Problem: Suppose you want to use Italian language in CodeIgniter then how to do it? Solution: CodeIgniter provide a facility that you can store the predefined words in array in separate files. after that you can use it as per your requirements. Example: 1- create a folder name "italian" under "application\language".2- under this folder create...
Share:

Friday, April 10, 2015

Run custom sql query in CakePHP 3.0

Problem: How to Run custom sql query in CakePHP 3.0 Solution & Example: File : src\Model\Table\ArticlesTable.php <?phpnamespace App\Model\Table; use Cake\ORM\Table;use Cake\Datasource\ConnectionManager;class ArticlesTable extends Table{    var $conn;    public function initialize(array $config) {   ...
Share:

Thursday, April 09, 2015

Add new row dynamically in JTable

Real Life Coding Stuff
Problem: Add new row dynamically in JTable This is Java code allow to you add a new row in JTable. when you press enter then a new row automatically inserted and you can make more entry. Add new row dynamically in JTable Solution & Example: import java.util.*; import...
Share:

Wednesday, April 08, 2015

How to create own custom class in cakephp 3.0

Problem: How to use own custom class or library class in CakePHP 3.0If you have own useful library and you want to use it in your CakePHP 3.0 MVC Framework then follow below steps. Solution: If you have good knowledge of Core PHP then It will be easy to create own custom class in CakePHP 3.0 and use it. follow below steps: 1# Create the folder...
Share:

Tuesday, April 07, 2015

Model in CakePHP 3.0

Problem: CalePHP 3.0 is different than it previous versions. Lot of things removed. In new CakePHP 3.0   How to use Model in CakePHP 3.0 using new ORM model Solution: See below example Example: Create ArticlesController.php controller in "src\Controller" folder <?phpnamespace App\Controller;use Cake\Core\Configure;use Cake\Network\Exception\NotFoundException;use...
Share:

Saturday, April 04, 2015

custom query in cakePHP 3.0

Problem: How to execute custom query in cakePHP Solution: Use ConnectionManager::get() and it's method newQuery() you can pass custom sql query Example: Change your database information in "config\app.php" file as below:   'Datasources' => [        'default' => [           ...
Share:

Form in CakePHP 3.0

Problem: How to create Form in CakePHP 3.0 Solution: To create form in CakePHP 3.0 you need to use $this->Form->create() and along with this also use echo $this->Form->input(), $this->Form->label(), $this->Form->text(), $this->Form->button() and never forget that every for must close with $this->Form->end(array(''))...
Share:

Friday, April 03, 2015

How to change default controller in CakePHP 3.0

Problem: How to change default controller in CakePHP 3.0. You know that default page of CakePHP 3.0 is Pages and it's action is display. Solution: To change default controller in CakePHP 3.0 open config.php which is located under "config" folder. and change : $routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']); TO $routes->connect('/',...
Share:

Thursday, April 02, 2015

Notice (8): Undefined variable in cakephp

Real Life Coding Stuff
Problem: You can get the error message Notice (8): Undefined variable in CakePHP while passing variable value from Controller to View. How to overcome this error? Solution: If you mistakenly create a method in predefined Controller "PagesController.php" which is automatically...
Share:

Ads Inside Post

Powered by Blogger.

Archive