This is a continuation of our basic tutorial on MVC Framework. In this section, we will be creating the template files for both the TBS and the Smarty template engines. **The recap** In [part one](http://www.daniweb.com/web-development/php/tutorials/476695/part-one-php-mvc-framework-understanding-the-basics), we have created application controllers, models, and the one and only lone View class. Once again, please allow me to present few segments of those Classes here. **Main Controller** We will use this as our example. All of our application controllers have the method called index(). If we can recall from part one, we made the parent controller as an abstract class with an abstract …

Member Avatar
Member Avatar
+3 forum 9

Hi guys, To make Some things easier, I want to make a program that can do the following: 1. Import a .txt file to a specific .xls file. The .txt file contains several lines of data which is build like this: (aaaa,bbbb,cccc,etc.) sererated by comma. Imported in excel, I would like to split the lines in columns, like this: (column A: aaaa, column B: bbbb, column C: cccc, etc). 2. When this is done, the user can give in, for example column B, an option. When the user clicks on a button, the columns E and F should give Yes …

Member Avatar
Member Avatar
+0 forum 4

Here's a simple game code, open a new vb project and copy paste this code and hit run. the game contains 3 levels, all you have to do is to shoot the smiley faces to earn money using mouse clicks, also there's a boss enemy on level 3. I didn't have much time to add more levels to the game (actually i only tried to play it once :p), here's my point of this code "Just for fun" try to import some enemy characters(in a picturebox) and add more levels and add some sound effects to the shooting or when …

Member Avatar
Member Avatar
+3 forum 8

**How do passwords work?** What a password isn't, or at least really shouldn't be, is some kind of secret word or phrase that is simply compared against a table of usernames in a login database. Such plaintext systems are about as secure as a chocolate padlock on a furnace door. Even a login system whereby those passwords are encrypted isn't much better, although many people assume they are safe as houses. Breaches across the years have proven how insecure any system which relies purely on reversible algorithm encryption really is. The user logs in and enters a password, this triggers …

Member Avatar
Member Avatar
+1 forum 11

**Part One**: Learning the Basic Patterns **Disclaimer**: please pardon my spellogrammatico errors. I am not really a rough draft person. I type and write codes the split seconds as they crossed my mind, otherwise I will get extremely lazy and then will eventually hibernate like a tardigrade. I hope I do not add more confusion to this subject matter. Today is the last day of my very short Spring Break and I pretty much did not do anything productive for days, except for learning the new programming language called hack from facebook. I thought it would be something that I …

Member Avatar
Member Avatar
+3 forum 1

Is java a platform Independent language. I think its no? My question is in what respect java is totally platform dependent. Is there any case? Share with Us. I have seen this question. So please reply quickly. Java is probably one of object oriented programming. Does it purely object oriented programming?

Member Avatar
Member Avatar
+0 forum 2

How can this be implemented on a web page? using c# and clicking a calander which will go to a booking form from each day and how to add database to this? using visuals tudios 2008, using For example a doctors practice.

Member Avatar
Member Avatar
+0 forum 2

Hello everybody, I need a way to practice the basics of c++ that i learned.I can use classes, objects, pointers and the very basics. What can i do to practice them in a useful way. I dont want to make a useless program. Please give me ideas and thanks !!

Member Avatar
Member Avatar
+0 forum 1

Hi! I'm making a chess program, that need to move pieces on the chess board, get an input,check if the move is valid and print the output. The compiler finds some errors that i don't understand...I need some help with the pieces functions. Plz help me fix them!!! my attempts : //Chess project// #include <cstdlib> #include <iostream> using namespace std; #include<stdio.h> #include<string.h> #include<stdlib.h> // all figures are represented as a constant integers// //constants // all columns are presented as an integers # int board[8][8];//chess board is presented as a 2D array of int #define empty 0 #define pawn 1 #define …

Member Avatar
Member Avatar
+0 forum 35

Hi, I'm currently trying to program a sudoku solver. As a beginner I wrote pseudocode to establish what I'd have to do. One of the first things was to make sure each number in each of the 3 x 3 grids aren't equal to any of the others. Here is my [B]attempt[/B]. I'm pretty sure I've gone the long way around tackling this but it was the only way I was fairly confident I knew how to do, haha. txt1_2 means that it's the second number in the first 3 x 3 grid (from left to right). At the moment, …

Member Avatar
Member Avatar
+0 forum 7

[CODE] <?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y:->m:->d")."<br>"; echo("hello") ."<br/>"; $app5=5; echo($app5); $baby="going"; echo("$baby i love to "); //echo ($baby$app5); if($app5==5) echo "dance"."<br>"; echo strlen("dance"); echo strpos("dance","h"); switch($ab=1) { case 1: echo 1; case 2: echo 2; default : echo "default"; } $a = array(1,2,5,3,6); for($i=0;$i<5;$i++) echo $a[$i]."<br>"; $a = array(1=>"apple",2=>"boy",3=>"girl",4=>"koel",5=>"good"); for($i=1;$i<=5;$i++) echo $a[$i]."<br>"; echo $a[2]."<br>"; echo $a['2']."<br>"; $a=array ( $0=array(40,60,20), $1=array(278,102,173) ); for($i=0;$i<2;$i++) { echo "<br>".$a[$i]; for($j=0;$j<3;$j++) echo $a[$i][$j]." "; } ?> [/CODE] I have started learning PHP today and I was trying out some very basic commands. I am getting an error …

Member Avatar
Member Avatar
+0 forum 1

I dont know nothing about Java. Which is the best tutorial site to learn java and how it is easily learn.

Member Avatar
Member Avatar
+0 forum 2

Im 16 and have been working with Vb for a few months when i have time. I am trying to make a text box that when the user of the program types into it what they have typed will be sent to [B]my email [/B]with a push of a button...Im having alot of trouble because i dont know how to do this...PLEASE help me thanks

Member Avatar
Member Avatar
+0 forum 1

Hi cannot get images to load any help would be gratefully recieved... [CODE] import pygame import sys from pygame.locals import * sys.path.append ("C:\\Python26\Bits\player.png") ###Will not Load saved image #triedC:\Python26\Bits\player.png # and tried C:\Python26\Bits #confusing or what!!! #Whole program not here # set up the window WINDOWWIDTH = 400 WINDOWHEIGHT = 400 windowSurface = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT), 0, 32) pygame.display.set_caption('Sprites and Sound') player = pygame.Rect(300, 100, 40, 40) playerImage = pygame.image.load('player.png') playerStretchedImage = pygame.transform.scale(playerImage, (40, 40)) windowSurface.blit(playerStretchedImage, player) pygame.display.update() while True: # check for the QUIT event for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() [/CODE]

Member Avatar
Member Avatar
+0 forum 1

[B]Hi, Could someone tell me where to find a good tutorials on pygame 1.9.1 for beginner thanks[/B]

Member Avatar
Member Avatar
+0 forum 1

Hi all, I am new Phython user and started using Python 2.7 just a couple days ago. I have written this code which is working, But when user put in correct code loop is not breaking ?? just wondering if it could be improved and what book would you recommend for Python 2.7 or 3? and do you know when Python 3 will be available? also hear about something called gygame (I think) which should work with python but I could not get this work with Python ! any help here would greatful recieved.. INPUT TEST>>>PYTHON 2.7: DATE OF CODING …

Member Avatar
Member Avatar
+0 forum 9

Hi, I have a project to do for a C++ class that asks us to use a class termed "queue" to store some values (20/100/user defined) and allow the user to add/remove values. I'm sure it seems really basic, but I just can't get my code to display the class. I was hoping to allow the user to display their class on request from the main, but for all my attempts I just can't get it to work:sad: Anyway, I would be reeally grateful if anyone has some tips or anything! Thanks! [CODE] #include <iostream> #include <cstring> using namespace std; …

Member Avatar
Member Avatar
+0 forum 10

hi all, i have a programming assignment where i read a text file through command line arguments. i then use that information to get a list of photos (just strings, not actual images) and a list of keywords that correspond to each of those photos. i am stuck on how to build these lists so i can access them to find a list of keywords for each photo and also to find a list of photos for each keyword. i was fiddling around with arraylists and linkedlists, but i wasn't coming up with the right tactic. i can clarify any …

Member Avatar
Member Avatar
+0 forum 1

Hi friends.... I need to learn Smarty for my next project... Plzz tell me , some good tutorials/free books... for smarty template engine, developement in coding.... If any body having softcopy ,plz send me as attachment... Thanks in advance... Saritha K

Member Avatar
Member Avatar
+0 forum 1

The End.