Search Results

Search found 791 results on 32 pages for 'allen gabriel baker'.

Page 16/32 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • SIMPLE PHP MVC Framework!

    - by Allen
    I need a simple and basic MVC example to get me started. I dont want to use any of the available packaged frameworks. I am in need of a simple example of a simple PHP MVC framework that would allow, at most, the basic creation of a simple multi-page site. I am asking for a simple example because I learn best from simple real world examples. Big popular frameworks (such as code ignighter) are to much for me to even try to understand and any other "simple" example I have found are not well explained or seem a little sketchy in general. I should add that most examples of simple MVC frameworks I see use mod_rewrite (for URL routing) or some other Apache-only method. I run PHP on IIS. I need to be able to understand a basic MVC framework, so that I could develop my own that would allow me to easily extend functionality with classes. I am at the point where I understand basic design patterns and MVC pretty well. I understand them in theory, but when it comes down to actually building a real world, simple, well designed MVC framework in PHP, i'm stuck. I would really appreciate some help! Edit: I just want to note that I am looking for a simple example that an experienced programmer could whip up in under an hour. I mean simple as in bare bones simple. I dont want to use any huge frameworks, I am trying to roll my own. I need a decent SIMPLE example to get me going.

    Read the article

  • Should we develop a custom membership provider in this case?

    - by Allen
    I'll be adding a bounty to this, probably 200, more if you guys think its appropriate. I wont accept an answer until I can add a bounty so feel free to go ahead and answer now Summary Long story short, we've been tasked with gutting the authentication and authorization parts of a fairly old and bloated asp.net application that previously had all of these components written from scratch. Since our application isn't a typical one, and none of us have experience in asp.net's built in membership provider stuff, we're not sure if we should roll our own authentication and authorization again or if we should try to work within the asp.net membership provider mindset and develop our own membership provider. Our Application We have a fairly old asp.net application that gets installed at customer locations to service clients on a LAN. Admins create users (users do not sign up) and depending on the install, we may have the software integrated with LDAP. Currently, the LDAP integration bulk-imports the users to our database and when they login, it authenticates against LDAP so we dont have to manage their passwords. Nothing amazing there. Admins can assign users to 1 group and they can change the authorization of that group to manage access to various parts of the software. Groups are maintained by Admins (web based UI) and as said earlier, granted / denied permissions to certain functionality within the application. All this was completely written from the ground up without using any of the built in .net authorization or authentication. We literally have IsLoggedIn() methods that check for login and redirect to our login page if they aren't. Our Rewrite We've been tasked to integrate more tightly with LDAP, they want us to tie groups in our application to groups (or whatever types of containers that LDAP uses) in LDAP so that when a customer opt's to use our LDAP integration, they dont have to manage their users in LDAP AND in our application. The new way, they will simply create users in LDAP, add them to Groups in LDAP and our application will see that they belong to the appropriate LDAP group and authenticate and authorize them. In addition, we've been granted the go ahead to completely rip out the User authentication and authorization code and completely re-do it. Our Problem The problem is that none of us have any experience with asp.net membership provider functionality. The little bit of exposure I have to it makes me worry that it was not intended to be used for an application such as ours. Though, developing our own ASP.NET Membership Provider and Role Manager sounds like it would be a great experience and most likely the appropriate thing to do. Basically, I'm looking for advice, should we be using the ASP.NET Membership provider & Role Management API or should we continue to roll our own? I know this decision will be influenced by our requirements so I'm going over them below Our Requirements Just a quick n dirty list Maintain the ability to have a db of users and authenticate them and give admins (only, not users) the ability to CRUD users Allow the site to integrate with LDAP, when this is chosen, they don't want any users stored in the DB, only the relationship between Groups as they exist in our app / db and the Groups/Containers as they exist in LDAP. .net 3.5 is being used (mix of asp.net webforms and asp.net mvc) Has to work in ASP.NET and ASP.NET MVC (shouldn't be a problem I'm guessing) This can't be user centric, administrators need to be the only ones that CRUD (or import via ldap) users and groups We have to be able to Auth via LDAP when its configured to do so I always try to monitor my questions closely so feel free to ask for more info. Also, as a general summary of what I'm looking for in an answer is just. "You should/shouldn't use xyz, here's why". Links regarding asp.net membership provider and role management stuff are very welcome, most of the stuff I'm finding is 5+ years old. Edit: Added some stuff to "Our Rewrite"

    Read the article

  • XmlDataProvider authentication Http issue

    - by Allen Ho
    Hi, I have an XMLDataProvider IsAsynchronous="True" x:Key="xmlData" Source="http://192.168.15.90/text.xml"/ The only problem is the Source requires authtication. I can get around this but using a HttpWebRequest in which I can pass in NetworkCredentials, but I was just wondering if there was a simpler way of passing in credentials to the XMLDataProvider

    Read the article

  • Silverlight: Set Items Widths in ItemsControl to Stretch

    - by Tom Allen
    I've got an ItemsControl which fills from top to bottom, but I can't get it's child items to occupy the whole width of the ItemsControl: I basically need to stretch the green bits to fill the width of the control (as shown by the blue bits). I've tried things like setting the HorizontalAlignment property of the template item to Stretch and I've even tried binding it's Width property to the ItemsControl Width, but neither worked. Should be a straight forward one, but it's something I just can't quite figure out...

    Read the article

  • JAVA Classes in Game programming.

    - by Gabriel A. Zorrilla
    I'm doing a little strategy game to help me learn Java in a fun way. The thing is I visioned the units as objects that would self draw on the game map (using images and buffering) and would react to the mouse actions with listeners attached to them. Now, based on some tutorials I've been reading regarding basic game programming, all seems to be drawn in the Graphics method of my Map class. If a new unit emerges, i just update the Map.Graphics method, it's not as easy as making a new Unit object which would self draw... In this case, I'd be stuck with a whole bunch of Map methods instead of using classes for rendering new things. So my question is, is it possible to use classes for rendering units, interface objects, etc, or i'll have to create methods and just do some kind of structural programming instead of object oriented? I'm a little bit confused and I'd like to have a mental blueprint of how things would be organized. Thanks!

    Read the article

  • Prepared statement help, Number of variables doesn't match number of parameters in prepared statement

    - by Sam Gabriel
    I'm getting this error : Number of variables doesn't match number of parameters in prepared statement every time I run this code: $dbh = new mysqli("localhost", "***", "***", "pics"); $stmt = $dbh->prepare("INSERT INTO comments (username, picture, comment) VALUES (?, ?, ?)"); $stmt->bind_Param('s', $username); $stmt->bind_Param('d', $picture); $stmt->bind_Param('s', $comment); $username=$_SESSION['username']; $picture=$_GET['id']; $comment=$_POST['comment']; $stmt->execute(); What's the problem?

    Read the article

  • Missing taglibrary in Netbeans Hibernate tutorial xhtml file?

    - by Christopher W. Allen-Poole
    I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I am getting the following error: "This page calls for XML namespace declared with prefix br but no taglibrary exists" Now, I have seen a similar question somewhere else: http://forums.sun.com/thread.jspa?threadID=5430327 but the answer is not listed there. Or, if it is, then I am clearly missing it -- line one of my index.xhtml file reads "http://www.w3.org/1999/xhtml". It also does not explain why, when I reload localhost:8080, the message disappears. Here is my index.xhtml file: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"> <ui:composition template="./template.xhtml"> <ui:define name="body"> <h:form> <h:commandLink action="#{filmController.previous}" value="Previous #{filmController.pageSize}" rendered="#{filmController.hasPreviousPage}"/> <h:commandLink action="#{filmController.next}" value="Next #{filmController.pageSize}" rendered="#{filmController.hasNextPage}"/> <h:dataTable value="#{filmController.filmTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px"> <h:column> <f:facet name="header"> <h:outputText value="Title"/> </f:facet> <h:outputText value="#{item.title}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Description"/> </f:facet> <h:outputText value="#{item.description}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value=" "/> </f:facet> <h:commandLink action="#{filmController.prepareView}" value="View"/> </h:column> </h:dataTable> <br/> </h:form> </ui:define> </ui:composition> </html>

    Read the article

  • Using string[] as a Dictionary key e.g. Dictionary<string[], StringBuilder>

    - by Nick Allen - Tungle139
    The structure I am trying to achieve is a composite Dictionary key which is item name and item displayname and the Dictionary value being the combination of n strings So I came up with var pages = new Dictionary<string[], StringBuilder>() { { new string[] { "food-and-drink", "Food & Drink" }, new StringBuilder() }, { new string[] { "activities-and-entertainment", "Activities & Entertainment" }, new StringBuilder() } }; foreach (var obj in my collection) { switch (obj.Page) { case "Food": case "Drink": pages["KEY"].Append("obj.PageValue"); break; ... } } The part I am having trouble with is accessing the Dictionary Key pages["KEY"] How do I target the Dictionary Key whose value at [0] == some value? Hope that makes sense

    Read the article

  • iPad UIColor Saturation Issues

    - by Carter Allen
    I am trying to draw a UIColor on the screen of a view-based app, and I am trying to do so using HSB. It is absolutely necessary for me to use HSB in this case. I can create a UIColor object with any S value from 0.0f to 0.75f, but past that the numerical changes have no effect on the actual saturation displayed. I need it to be 1.0f, but it is still using 0.75f. Any ideas on why it is doing that, and how I can make it work?

    Read the article

  • WPF Animation Duration

    - by Allen Ho
    I have a storyboard like the following Duration="0:0:1" Completed="DeviceExplorer_Completed" The animation for some reason does not appear to be working linearly. If I change the duration to something like Duration="0:0:0.8" and assign the stroyboard to a MouseEnter event of a button, the animation moves but does not complete for some reason, I move my mouse over the button a few times before it enetually completes... Any ideas why?

    Read the article

  • Why eGet() in EMF returns Object rather than EObject?

    - by Gabriel Šcerbák
    I am working on some code using the EMF framework in Java, but it is really hard to use, e.g. I cannot implement OCL-like query API on top of EMF which would be type-safe. One of the reasons is that eGet() for a EStructuralFeature return just an Object, not EObject. So anything I would write must use much of null checking, type checking and type casting which is unsafe, not performant and cannot be generalized in a reusable way. Why doesn't EMF generate dummy implementations with EObject wrappers for arbitrary Object value? Implementing the EObject and hence the EClass interfaces even with simple throw UnsupportedOperationException is really a pain (the APIs are too big). The same holds for the eContainer() method which makes navigatinng the model upwards painful.

    Read the article

  • Object created in Interface Builder getting dealloc'ed too soon

    - by Collin Allen
    The Project I'm working on a relatively simple iPhone OS project that's navigation controller based, with a root table view and a detail table view. Tap an item in the main list to see its details in a pushed table view. The Setup I broke out the data source for both views into their own objects so as not to muddy the purpose of a view controller. Having done this, the table views no longer have data sources since those methods are now in separate files, so I created an instance of each data source class in the appropriate XIB files with the Object item (dragged it in, then set its class). Then, to actually connect the tableviews to their data sources, I set the dataSource outlet of each tableview to the yellow data source object in Interface Builder. The table view delegates are still set to their view controllers. The Problem The root table view works just fine, but when you tap a row to push to the detail view, the data source object gets instantiated as expected, then immediately dealloc'ed, causing a crash (numberOfSectionsInTableView: gets called on the freed object). I can't figure out why the data source is getting automatically dealloc-ed when I need it right then and there for the detail view, as indicated by my data source object creation and tableview connection in Interface Builder. What's more perplexing is that the very approach works fine for the root tableview! The Question Is there anything obvious I'm missing that would cause this to happen? Or, is this even the right way to instantiate a data source for a table view controller? It seems like poor object oriented programming to do it from within the view controller, which should only be concerned with the view. I could cram everything in two table view controller classes and it would probably work, but it would not be as modular as I'd like. Thanks!

    Read the article

  • Is LuaJIT really faster than every other JIT-ed dynamic languages?

    - by Gabriel Cuvillier
    According to the computer language benchmark game, the LuaJIT implementation seems to beat every other JIT-ed dynamic language (V8, Tracemonkey, PLT Scheme, Erlang HIPE) by an order of magnitude. I know that these benchmarks are not representative (as they say: "Which programming language implementations have the fastest benchmark programs?"), but this is still really impressive. In practice, is it really the case? Someone have tested that Lua implementation?

    Read the article

  • Rewriting subdomain to subfolder with htaccess

    - by Owen Allen
    I'm attempting to use .htaccess in the root folder of an Ubuntu/Apache2 server in order to mask a subdomain to subfolder and I keep getting a 500 Internal Error. I know that I'm doing something stupidly wrong and it is some silly error causing the problem. I've checked all of the similar threads on SO and online and whenever I try their advice the 500 continues. Here's my code. RewriteEngine on RewriteCond %{HTTP_HOST} ^admin\.mydomain\.com.*$ RewriteRule (.*) intranet/$1 [L] What I want to occur is that if a user visits admin.mydomain.com they will get the contents of the folder admin.mydomain.com/intranet/ but their URL bar will still be admin.mydomain.com. Any idea what I'm doing wrong? In addition, some of the threads online talked about possible problems with this system. Is this the best way of doing this masking, should I be using a vhost setup?

    Read the article

  • Solving the EXC_BAD_ACCESS in WhatATool Part 2

    - by Allen
    #import <Cocoa/Cocoa.h> @interface PolygonShape : NSObject { int numberOfSides, maximumNumberOfSides, minimumNumberOfSides; } @property (readwrite) int numberOfSides, maximumNumberOfSides, minimumNumberOfSides; @property (readonly) float angleInDegrees, angleInRadians; @property (readonly) NSString * name; @property (readonly) NSString * description; -(id) init; -(void) setNumberOfSides:(int)sides; -(void) setMinimumNumberOfSides:(int)min; -(void) setMaximumNumberOfSides:(int)max; -(float) angleInDegrees; -(float) angleInRadians; -(NSString *) name; -(id) initWithNumberOfSides:(int) sides minimumNumberOfSides:(int) min maximumNumberOfSides:(int) max; -(NSString *) description; -(void) dealloc; @end #import "PolygonShape.h" @implementation PolygonShape -(id) init { return [self initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:5]; } @synthesize numberOfSides, minimumNumberOfSides, maximumNumberOfSides, angleInRadians; -(void) setNumberOfSides:(int)sides { numberOfSides = sides; NSLog(@"The number of sides is off limit so the number of sides is %@.",sides); } -(void)setMaximumNumberOfSides:(int)max { if (maximumNumberOfSides <= 12) { maximumNumberOfSides = max; } } -(void)setMinimumNumberOfSides: (int)min { if (minimumNumberOfSides > 2) { minimumNumberOfSides = min; } } - (id)initWithNumberOfSides:(int)sides minimumNumberOfSides:(int)min maximumNumberOfSides:(int)max { if(self=[super init]) { [self setNumberOfSides:(int)sides]; [self setMaximumNumberOfSides:(int)max]; [self setMinimumNumberOfSides: (int)min]; } return self; } -(float) angleInDegrees { float anglesInDegrees = (180 * (numberOfSides - 2) / numberOfSides); return anglesInDegrees; } -(float)angleInRadiants { float anglesInRadiants = ((180 * (numberOfSides - 2) / numberOfSides) * (180 / M_PI)); return anglesInRadiants; } -(NSString *)name { NSString * output; switch (numberOfSides) { case 3: output = @"Triangle"; break; case 4: output = @"Square"; break; case 5: output = @"Pentagon"; break; case 6: output = @"Hexagon"; break; case 7: output = @"Heptagon"; break; case 8: output = @"Octagon"; break; case 9: output = @"Nonagon"; break; case 10: output = @"Decagon"; break; case 11: output = @"Hendecagon"; break; case 12: output = @"Dodecabgon"; break; default: output = @"Invalid number of sides: %i is greater than maximum of five allowed."; } return output; } -(NSString *)description { NSString * output; NSLog(@"Hello I am a %i-sided polygon (aka a %@) with angles of %f degrees (%f radians).", numberOfSides, output, [self angleInDegrees], [self angleInRadiants]); return [self description]; } -(void)dealloc { [super dealloc]; } @end #import <Foundation/Foundation.h> #import "PolygonShape.h" void PrintPathInfo() { NSLog(@"Section 1"); NSLog(@"--------------------"); NSString *path = [@"~" stringByExpandingTildeInPath]; NSLog(@"My home folder is at '%@'.", path); NSArray *pathComponent = [path pathComponents]; for (path in pathComponent) { NSLog(@"%@",path); } NSLog(@"--------------------"); NSLog(@"\n"); } void PrintProcessInfo() { NSLog(@"Section 2"); NSLog(@"--------------------"); NSString * processName = [[NSProcessInfo processInfo] processName]; int processIdentifier = [[NSProcessInfo processInfo] processIdentifier]; NSLog(@"Process Name: '%@', Process ID: '%i'", processName, processIdentifier); NSLog(@"--------------------"); NSLog(@"\n"); } void PrintBookmarkInfo() { NSLog(@"Section 3"); NSLog(@"--------------------"); NSArray * keys = [NSArray arrayWithObjects: @"Stanford University", @"Apple", @"CS193P", @"Stanford on iTunes U", @"Stanford Mall", nil]; NSArray * objects = [NSArray arrayWithObjects: [NSURL URLWithString: @"http://www.stanford.edu"], @"http://www.apple.com", @"http://cs193p.stanford.edu", @"http://itunes.stanford.edu", @"http://stanfordshop.com",nil]; NSMutableDictionary * dictionary = [NSMutableDictionary dictionaryWithObjects:objects forKeys:keys]; NSEnumerator * enumerator = [keys objectEnumerator]; for (id keys in dictionary) { NSLog(@"key: '%@', value: '%@'", keys, [dictionary objectForKey:keys]); } NSLog(@" "); NSLog(@"These are the ones that has the prefix 'Stanford'."); NSLog(@" "); id object; while (object = [enumerator nextObject]) { if ([object hasPrefix: @"Stanford"]) { NSLog(@"key: '%@', value: '%@'", object, [dictionary objectForKey:object]); } } NSLog(@"--------------------"); NSLog(@"\n"); } void PrintIntrospectionInfo() { NSLog(@"Section 4"); NSLog(@"--------------------"); SEL lowercase = @selector (lowercaseString); NSMutableArray * array = [NSMutableArray array]; [array addObject: [NSString stringWithString: @"Here is a string"]]; [array addObject: [NSDictionary dictionary]]; [array addObject: [NSURL URLWithString: @"http://www.stanford.edu"]]; [array addObject: [[NSProcessInfo processInfo]processName]]; for (id keys in array) { NSLog(@"\n"); NSLog(@"Class Name: %@", [keys className]); NSLog(@"Is Member of NSString: %@", [keys isMemberOfClass:[NSString class]]?@"Yes":@"No"); NSLog(@"Is Kind of NSString: %@", [keys isKindOfClass:[NSString class]]?@"Yes":@"No"); if ([keys respondsToSelector: lowercase]==YES) { NSLog(@"Responds to lowercaseString: %@",[keys respondsToSelector: lowercase]?@"Yes":@"No"); NSLog(@"lowercaseString is: %@", [keys performSelector: lowercase]); } else { NSLog(@"Responds to lowercaseString: %@",[keys respondsToSelector: lowercase]?@"Yes":@"No" ); } } NSLog(@"--------------------"); } void PrintPolygonInfo() { NSMutableArray * array = [NSMutableArray array]; PolygonShape * polygon1 = [[PolygonShape alloc]initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:7]; [array addObject:polygon1]; [array description]; PolygonShape * polygon2 = [[PolygonShape alloc]initWithNumberOfSides:6 minimumNumberOfSides:5 maximumNumberOfSides:9]; [array addObject:polygon2]; [array description]; PolygonShape * polygon3 = [[PolygonShape alloc]initWithNumberOfSides:12 minimumNumberOfSides:9 maximumNumberOfSides:12]; [array addObject:polygon3]; [array description]; [array release]; [polygon1 release]; [polygon2 release]; [polygon3 release]; } int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; PrintPathInfo(); PrintProcessInfo(); PrintBookmarkInfo(); PrintIntrospectionInfo(); PrintPolygonInfo(); [pool release]; return 0; } //The result was "EXC_BAD_ACCESS", but I couldn't figure out how to resolve this problem.

    Read the article

  • iPhone tilt direction

    - by Tate Allen
    Hi all, I am making a simple, tilt controlled game using UIKit. So far, when I tilt the device the character moves in the appropriate direction. What I want him to do is to change the direction he is facing when I tilt the device. For example, when I tilt it left, I want the character to face left. Is there a way to detect whether the device was tilted left or right? If so, could you point me in the right direction please. Thanks, Tate

    Read the article

  • SVNKit's SVNCpoyClient method not working properly

    - by Gabriel Parenza
    Hi Everyone, I am having trouble copying file using SVNKit. After copying the files from source to destination files end up one folder above the intended folder. For ex: When copying files from "https://example.com/svn/repos/trunk/project/src/ex.txt" to "https://example.com/svn/repos/branches/PackageN/project/src", files end up in "project" folder inside PackageN while my intention is to move it to "src" folder inside "project. Code I am using: svnCopySource svnCopySource[] = new SVNCopySource[]{}; SVNCommitInfo svnCommitInfo = SVNClientManager.newInstance(null,"", "").getCopyClient().doCopy(svnCopySource, dstURL, false, false, false,commitMessage, null); // SVNCopySource[] sources // SVNURL dst // boolean isMove // boolean makeParents // boolean failWhenDstExists, // String commitMessage, // SVNProperties revisionProperties

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >