Search Results

Search found 6625 results on 265 pages for 'advice'.

Page 21/265 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Need advice on multitab form in ASP.NET MVC

    - by Sasha
    Hi all, i need an advice on how to implement my form. I have a requirement: i need a form that spans through 5 tabs. Each tab has around 10 fields, some of them empty, some of them must contain data from db and be non editable. Each of these tabs must be a part of one form that is submitted to my controller. The question is: what is the best way to implement this? I was thinking about having partial views on each tab, each view would have its own model class. After form gets filled all data from all partials would go to action that will take care of all of it. Any advices? I am using ASP.NET MVC 1, Entity Framework 1, mvc extensions from Telerik and jQuery

    Read the article

  • [ADVICE] .NET Desktop Application - Client Server C#, SQL

    - by Rillanon
    Hi guys, Recently I've being given a chance to develop a PMS (Practice Management System) software for a small physiotherapy clinic. I'm a computer science student and my course is predominately told on Linux. However, my client runs all their computers on vista or Windows 7. My ideas are to develop the client front end in Visual C# and access a central postgresql server. I'm a beginner in Windows Programming so I'm after advice on best practice on implement user rights and access levels in C# (WPF or Windows FORM). I've had a look into Credential class in Visual C# and access control list but please share your thoughts. I'm probably way over my head on this but this is my first commercial project so I'm keen to test the waters. Cheers Ian

    Read the article

  • Web-design / UI advice

    - by Damian
    I'm working on a website on a Fmylife style. Now the homepage is the page showing the list of the latest posts. But I think there is a problem with that: The most "interesting" page is the one showing the top posts of the last days, but that page has very few visits compared to the main page. I suppose that's only because the main page is the "default" one. So, I've been thinking of making a home page that shows no posts (only one at the top of the page) but 4 big buttons showing the visitors what are the options to browse the content. But I'm also afraid that most users will not click any option and leave the site having seen no posts. So I don't know what to do. Obviously I have no idea of what will be good from a usability/efficiency point of view. Maybe a mix of the two options will be the best, but I don't know how to mix them. Any advice or idea will be greatly appreciated. The current home page looks like this: http://soquestion.latest.secretsapp.appspot.com/latest The new home page would look like this: http://soquestion.latest.secretsapp.appspot.com/

    Read the article

  • Advice moving from Eclipse to xCode

    - by Gloin the Dark
    To xCode xPerts: I have been doing Java in Eclipse for about 9 years now and I have really gotten used to the power of the refactoring tools. There are a few operations I do all the time. I am looking for equivalents in xCode since it has better support for objective-c than eclipse. (I'm not at my Mac as I write this. So some of this is from memory. I am still very new to xCode.) 1 "rename". It seems that the xCode equivalent for variables is "edit all in scope". Does this work for files/classes/methods too? 2 "extract local variable" select an expression it creates a local var initialized to that expression. It even creates a usable name for the variable. 3 "extract method" select some code and it will create a method with that code and appropriate parameters/return value. 4 "inline" (variable or method) opposite of extract, inlines all or just the selected occurrence of the selected var or method. 5 "find next" occurrence of selected text. In eclipse I can select some text and hit ctrl-k to go to the next occurrence of that in the file. likewise shift-ctrl-k finds backwards. IIRC the xCode "find next" ignores the selection and only uses what is in the find box. 6 "change method signature" This would be very useful with ocjective-c's named parameter messaging syntax. This is great for adding parameters to a method. 7 "pull-up/push-down" for moving methods up or down the class hierarchy. 8 "move" for moving elements around to other classes etc. Those are the ones that I use all of the time. I have estimated that these tools cut my coding time in half. Are any of these supported in xCode? Thanks in advance for any advice.

    Read the article

  • Advice on optimzing speed for a Stored Procedure that uses Views

    - by Belliez
    Based on a previous question and with a lot of help from Damir Sudarevic (thanks) I have the following sql code which works great but is very slow. Can anyone suggest how I can speed this up and optimise for speed. I am now using SQL Server Express 2008 (not 2005 as per my original question). What this code does is retrieves parameters and their associated values from several tables and rotates the table in a form that can be easily compared. Its great for one of two rows of data but now I am testing with 100 rows and to run GetJobParameters takes over 7 minutes to complete? Any advice is gratefully accepted, thank you in advanced. /*********************************************************************************************** ** CREATE A VIEW (VIRTUAL TABLE) TO ALLOW EASIER RETREIVAL OF PARMETERS ************************************************************************************************/ CREATE VIEW dbo.vParameters AS SELECT m.MachineID AS [Machine ID] ,j.JobID AS [Job ID] ,p.ParamID AS [Param ID] ,t.ParamTypeID AS [Param Type ID] ,m.Name AS [Machine Name] ,j.Name AS [Job Name] ,t.Name AS [Param Type Name] ,t.JobDataType AS [Job DataType] ,x.Value AS [Measurement Value] ,x.Unit AS [Unit] ,y.Value AS [JobDataType] FROM dbo.Machines AS m JOIN dbo.JobFiles AS j ON j.MachineID = m.MachineID JOIN dbo.JobParams AS p ON p.JobFileID = j.JobID JOIN dbo.JobParamType AS t ON t.ParamTypeID = p.ParamTypeID LEFT JOIN dbo.JobMeasurement AS x ON x.ParamID = p.ParamID LEFT JOIN dbo.JobTrait AS y ON y.ParamID = p.ParamID GO -- Step 2 CREATE VIEW dbo.vJobValues AS SELECT [Job Name] ,[Param Type Name] ,COALESCE(cast([Measurement Value] AS varchar(50)), [JobDataType]) AS [Val] FROM dbo.vParameters GO /*********************************************************************************************** ** GET JOB PARMETERS FROM THE VIEW JUST CREATED ************************************************************************************************/ CREATE PROCEDURE GetJobParameters AS -- Step 3 DECLARE @Params TABLE ( id int IDENTITY (1,1) ,ParamName varchar(50) ); INSERT INTO @Params (ParamName) SELECT DISTINCT [Name] FROM dbo.JobParamType -- Step 4 DECLARE @qw TABLE( id int IDENTITY (1,1) , txt nchar(300) ) INSERT INTO @qw (txt) SELECT 'SELECT' UNION SELECT '[Job Name]' ; INSERT INTO @qw (txt) SELECT ',MAX(CASE [Param Type Name] WHEN ''' + ParamName + ''' THEN Val ELSE NULL END) AS [' + ParamName + ']' FROM @Params ORDER BY id; INSERT INTO @qw (txt) SELECT 'FROM dbo.vJobValues' UNION SELECT 'GROUP BY [Job Name]' UNION SELECT 'ORDER BY [Job Name]'; -- Step 5 --SELECT txt FROM @qw DECLARE @sql_output VARCHAR (MAX) SET @sql_output = '' -- NULL + '' = NULL, so we need to have a seed SELECT @sql_output = -- string to avoid losing the first line. COALESCE (@sql_output + txt + char (10), '') FROM @qw EXEC (@sql_output) GO

    Read the article

  • Need advice on OOP philosophy

    - by David Jenings
    I'm trying to get the wheels turning on a large project in C#. My previous experience is in Delphi, where by default every form was created at applicaton startup and form references where held in (gasp) global variables. So I'm trying to adapt my thinking to a 100% object oriented environment, and my head is spinning just a little. My app will have a large collection of classes Most of these classes will only really need one instance. So I was thinking: static classes. I'm not really sure why, but much of what I've read here says that if my class is going to hold a state, which I take to mean any property values at all, I should use a singleton structure instead. Okay. But there are people out there who for reasons that escape me, think that singletons are evil too. None of these classes is in danger of being used anywhere except in this program. So they could certainly work fine as regular objects (vs singletons or static classes) Then there's the issue of interaction between objects. I'm tempted to create a Global class full of public static properties referencing the single instances of many of these classes. I've also considered just making them properties (static or instance, not sure which) of the MainForm. Then I'd have each of my classes be aware of the MainForm as Owner. Then the various objects could refer to each other as Owner.Object1, Owner.Object2, etc. I fear I'm running out of electronic ink, or at least taxing the patience of anyone kind enough to have stuck with me this long. I hope I have clearly explained my state of utter confusion. I'm just looking for some advice on best practices in my situation. All input is welcome and appreciated. Thanks in advance, David Jennings

    Read the article

  • Need advice on using Grails and Ajax to append to a div like in Rails

    - by Nate
    I'm just starting out in Grails and need some advice on using Ajax. I want to append some html to the bottom of a div inside a form. This is basically what I have: -form- -div id="listOfchildren"- childrow 1 input fields childrow 2 input fields childrow 3 input fields -/div- -form- -a-Add Child 4-/a- When I click on the "Add Child" I want to make an ajax call that results in a new childrow getting inserted into the "listOfchildren" div. So the document would look like this: -form- -div id="listOfchildren"- childrow 1 input fields childrow 2 input fields childrow 3 input fields childrow 4 input fields -/div- -form- -a-Add Child 5-/a- In Rails I would do something simple like this: render :update do |page| page.insert_html :bottom, "list_of_children", :partial = child_partial page.replace "add_link", :partial = 'add_link' end The previous code sends an javascript back to the browser with two commands. The first command tells the browser to append some html to the bottom of a div. The second command updates the "add link" counter. In grails I can only see how to replace an entire div (which would wipe out the user's existing input) and I don't see how I can call multiple functions from the ajax response. I can probably do this if I was to write some javascript functions in prototype or whatever, but I'd like to avoid that if there is a simpler way. Thanks! Nate

    Read the article

  • Need some advice on Core Data modeling strategy

    - by Andy
    I'm working on an iPhone app and need a little advice on modeling the Core Data schema. My idea is a utility that allows the user to speed-dial their contacts using user-created rules based on the time of day. In other words, I would tell the app that my wife is commuting from 6am to 7am, at work from 7am to 4pm, commuting from 4pm to 5pm, and home from 5pm to 6am, Monday through Friday. Then, when I tap her name in my app, it would select the number to dial based on the current day and time. I have the user interface nearly complete (thanks in no small part to help I've received here), but now I've got some questions regarding the persistent store. The user can select start- and stop-times in 5-minute increments. This means there are 2,016 possible "time slots" in week (7 days * 24 hours * 12 5-minute intervals per hour). I see a few options for setting this up. Option #1: One array of time slots, with 2,016 entries. Each entry would be a dictionary containing a contact identifier and an associated phone number to dial. I think this means I'd need a "Contact" entity to store the contact information, and a "TimeSlot" entity for each of the 2,016 possible time slots. Option #2: Each Contact has its own array of time slots, each with 2,016 entries. Each array entry would simply be a string indicating which phone number to dial. Option #3: Each Contact has a dictionary of time slots. An entry would only be added to the dictionary for time slots with an active rule. If a search for, say, time slot 1,299 (Friday 12:15pm) didn't find a key @"1299" in the dictionary, then a default number would be dialed instead. I'm not sure any of these is the "right" way or the "best" way. I'm not even sure I need to use Core Data to manage it; maybe just saving arrays would be simpler. Any input you can offer would be appreciated.

    Read the article

  • Looking for advice on importing large dataset in sqlite and Cocoa/Objective-C

    - by jluckyiv
    I have a fairly large hierarchical dataset I'm importing. The total size of the database after import is about 270MB in sqlite. My current method works, but I know I'm hogging memory as I do it. For instance, if I run with Zombies, my system freezes up (although it will execute just fine if I don't use that Instrument). I was hoping for some algorithm advice. I have three hierarchical tables comprising about 400,000 records. The highest level has about 30 records, the next has about 20,000, the last has the balance. Right now, I'm using nested for loops to import. I know I'm creating an unreasonably large object graph, but I'm also looking to serialize to JSON or XML because I want to break up the records into downloadable chunks for the end user to import a la carte. I have the code written to do the serialization, but I'm wondering if I can serialize the object graph if I only have pieces in memory. Here's pseudocode showing the basic process for sqlite import. I left out the unnecessary detail. [database open]; [database beginTransaction]; NSArray *firstLevels = [[FirstLevel fetchFromURL:url retain]; for (FirstLevel *firstLevel in firstLevels) { [firstLevel save]; int id1 = [firstLevel primaryKey]; NSArray *secondLevels = [[SecondLevel fetchFromURL:url] retain]; for (SecondLevel *secondLevel in secondLevels) { [secondLevel saveWithForeignKey:id1]; int id2 = [secondLevel primaryKey]; NSArray *thirdLevels = [[ThirdLevel fetchFromURL:url] retain]; for (ThirdLevel *thirdLevel in thirdLevels) { [thirdLevel saveWithForeignKey:id2]; } [database commit]; [database beginTransaction]; [thirdLevels release]; } [secondLevels release]; } [database commit]; [database release]; [firstLevels release];

    Read the article

  • Advice on designing and building distributed application to track vehicles

    - by dario-g
    I'm working on application for tracking vehicles. There will be about 10k or more vehicles. Each will be sending ~250bytes in each minute. Data contains gps location and everything from CAN Bus (every data that we can read from vehicle computer and dashboard). Data are sent by GSM/GPRS (using UDP protocol). Estimated rows with this data per day is ~2000k. I see there 3 main blocks. 1. Multithreaded Socket Server (MSS) - I have it. MSS stores received data to the queue (using NServiceBus). 2. Rule Processor Server (RPS) - this is core of this system. This block is responsible for parsing received data, storing in the database, processing rules, sending messages to Notifier Server (this will be sending e-mails/sms texts). Rule example. As I said between received bytes there will be information about current speed. When speed will be above 120 then: show alert in web application for specified users, send e-mail, send sms text. (There can be more than one instance of RPS). 3. Web application - allows reporting and defining rules by users, monitoring alerts, etc. I'm looking for advice how to design communication between RPS and Web application. Some questions: - Should Web application and RPS have separated databases or one central database will be enough? I have one domain model in web application. If there will be one central database then can I use the same model (objects) on RPS? So, how to send changed rules to RPS? I try to decouple this blocks as much as possible. I'm planning to create different instance of application for each client (each client will have separated database). One client will be have 10k vehicles, others only 100 vehicles.

    Read the article

  • Domain Transfer Protection - need advice

    - by Jack
    Hey, I am about to purchase a domain name for a bit of money. I do not personally know the person who I am purchasing the domain name from, we have only chatted via email. The proposed process for the transfer is: The owner of the domain lowest the domain name security and emails me the domain password, I request the transfer After the request, I transfer the money via PayPal When the money has been cleared the current domain name owner confirms the transfer via the link that he receives in that email I wait for it to be transferred. The domain is currently registered with DirectNIC - http://www.directnic.com/ Is this the best practice? Seeing I am paying a bit of money for this domain name, I am worried that after the money has been cleared that I won't see the domain name or hear from the current domain name owner again. Is there a 'domain governing body' which I can report to if this is the case? Is the proposed transfer process the best solution? Any advice would be awesome. Thanks! Jack

    Read the article

  • Advice on Method overloads.

    - by Muhammad Kashif Nadeem
    Please see following methods. public static ProductsCollection GetDummyData(int? customerId, int? supplierId) { try { if (customerId != null && customerId > 0) { Filter.Add(Customres.CustomerId == customerId); } if (supplierId != null && supplierId > 0) { Filter.Add(Suppliers.SupplierId == supplierId); } ProductsCollection products = new ProductsCollection(); products.FetchData(Filter); return products; } catch { throw; } } public static ProductsCollection GetDummyData(int? customerId) { return ProductsCollection GetDummyData(customerId, (int?)null); } public static ProductsCollection GetDummyData() { return ProductsCollection GetDummyData((int?)null); } 1- Please advice how can I make overloads for both CustomerId and SupplierId because only one overload can be created with GetDummyData(int? ). Should I add another argument to mention that first argument is CustomerId or SupplierId for example GetDummyData(int?, string). OR should I use enum as 2nd argument and mention that first argument is CustoemId or SupplierId. 2- Is this condition is correct or just checking 0 is sufficient - if (customerId != null && customerId 0) 3- Using Try/catch like this is correct? 4- Passing (int?)null is correct or any other better approach. Edit: I have found some other posts like this and because I have no knowledge of Generics that is why I am facing this problem. Am I right? Following is the post. http://stackoverflow.com/questions/422625/overloaded-method-calling-overloaded-method

    Read the article

  • Rails and GIT workflow advice.

    - by dannymcc
    Hi Everyone, I need some advice with my desired setup with git and rails. Basically for my first Rails application I used a base application template from GitHub, I then made a ton of changes and now have a full application which is fairly customised. I have now extracted all of the changes I made to the files within the base application template and have committed the changes to my fork of the github repo. Ideally, I would like to have the base application template as a branch in my application and rebase it with my master. Is this actually possible? The reason I want to do this: I want to keep the base application up to date and functional, so for my next project I can just clone the base application template from my github fork and get working. Likewise, if anyone fixes any bugs in the base application template, I could merge those fixes with any application I have the base application template as a branch? Is this possible? Is there a better/more common way to do this? Thanks in advanced! Thanks, Danny

    Read the article

  • Thread management advice - Is TPL a good idea?

    - by Ian
    I'm hoping to get some advice on the use of thread managment and hopefully the task parallel library, because I'm not sure I've been going down the correct route. Probably best is that I give an outline of what I'm trying to do. Given a Problem I need to generate a Solution using a heuristic based algorithm. I start of by calculating a base solution, this operation I don't think can be parallelised so we don't need to worry about. Once the inital solution has been generated, I want to trigger n threads, which attempt to find a better solution. These threads need to do a couple of things: They need to be initalized with a different 'optimization metric'. In other words they are attempting to optimize different things, with a precedence level set within code. This means they all run slightly different calculation engines. I'm not sure if I can do this with the TPL.. If one of the threads finds a better solution that the currently best known solution (which needs to be shared across all threads) then it needs to update the best solution, and force a number of other threads to restart (again this depends on precedence levels of the optimization metrics). I may also wish to combine certain calculations across threads (e.g. keep a union of probabilities for a certain approach to the problem). This is probably more optional though. The whole system needs to be thread safe obviously and I want it to be running as fast as possible. I tried quite an implementation that involved managing my own threads and shutting them down etc, but it started getting quite complicated, and I'm now wondering if the TPL might be better. I'm wondering if anyone can offer any general guidance? Thanks...

    Read the article

  • please check my MYSQL query & give me advice?

    - by Suba
    select s.s_nric as NRIC,s.s_name as NAME,s.s_psle_eng as PSLE_ENG,s.s_psle_math as PSLE_MATHS,s.s_psle_aggr as PSLE_AGGR, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEEN%' AND re.re_year='2008' AND re.re_semester='2' AND re.re_nric=s.s_nric ) as English_2008, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEMA%' AND re.re_year='2008' AND re.re_semester='2' AND re.re_nric=s.s_nric ) Maths_2008, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEEN%' AND re.re_year='2009' AND re.re_semester='2' AND re.re_nric=s.s_nric ) as English_2009, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEMA%' AND re.re_year='2009' AND re.re_semester='2' AND re.re_nric=s.s_nric ) Maths_2009 ,isc.isc_g_gpa as ISC_GPA from si_student_data as s LEFT JOIN si_isc_gpa as isc ON isc.isc_g_nric=s.s_nric where 1=1 AND s.s_admission_year='2008' GROUP BY s.s_nric ORDER BY s.s_gender,s.s_name asc This is my query. please check my sub query this is my sub query (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEEN%' AND re.re_year='2008' AND re.re_semester='2' AND re.re_nric=s.s_nric ) as English_2008, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEMA%' AND re.re_year='2008' AND re.re_semester='2' AND re.re_nric=s.s_nric ) Maths_2008, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEEN%' AND re.re_year='2009' AND re.re_semester='2' AND re.re_nric=s.s_nric ) as English_2009, (SELECT re.re_mark FROM si_results re WHERE re.re_code like 'FEMA%' AND re.re_year='2009' AND re.re_semester='2' AND re.re_nric=s.s_nric ) Maths_2009 When I execute my query, server take long time to execute. So how to make simple? please advice me. Thanks.

    Read the article

  • Enterprise Platform in Python, Design Advice

    - by Jason Miesionczek
    I am starting the design of a somewhat large enterprise platform in Python, and was wondering if you guys can give me some advice as to how to organize the various components and which packages would help achieve the goals of scalability, maintainability, and reliability. The system is basically a service that collects data from various outside sources, with each outside source having its own separate application. These applications would poll a central database and get any requests that have been submitted to perform on the external source. There will be a main website and REST/SOAP API that should also have access to the central data service. My initial thought was to use Django for the web site, web service and data access layer (using its built-in ORM), and then the outside source applications can use the web service(s) to get the information they need to process the request and save the results. Using this method would allow me to have multiple instances of the service applications running on the same or different machines to balance out the load. Are there more elegant means of accomplishing this? i've heard of messaging systems such as MQ, would something like that be beneficial in this scenario? My other thought was to use a completely separate data service not based on Django, and use some kind of remoting or remote objects (in they exist in Python) to interact with the data model. The downside here would be with the website which would become much slower if it had to push all of its data requests through a second layer. I would love to hear what other developers have come up with to achieve these goals in the most flexible way possible.

    Read the article

  • Advice on setting up a central db with master tables for web apps

    - by Dragn1821
    I'm starting to write more and more web applications for work. Many of these web applications need to store the same types of data, such as location. I've been thinking that it may be better to create a central db and store these "master" tables there and have each applicaiton access them. I'm not sure how to go about this. Should I create tables in my application's db to copy the data from the master table and store in the app's table (for linking with other app tables using foreign keys)? Should I use something like a web service to read the data from the master table instead of firing up a new db connection in my app? Should I forget this idea and just store the data within my app's db? I would like to have data such as the location central so I can go to one table and add a new location and the next time someone needs to select a location from one of the apps, the new one would be there. I'm using ASP.NET MVC 1.0 to build the web apps and SQL 2005 as the db. Need some advice... Thanks!

    Read the article

  • Invalid Pointer Operation, advice requested with debugging

    - by Xanyx
    I appear to have created code that is trashing memory. Having never had such problems before, i am now settign an Invalid Pointer Operation. In the following the value of the const string sFilename gets trashed after my call to PromptForXYZPropertiesSettings. // Allow the user to quickly display the properties of XYZ without needing to display the full Editor function PromptForXYZProperties(const sFilename:string; var AXYZProperties: TXYZProperties): boolean; var PropEditor: TdlgEditor; begin PropEditor:= TdlgEditor.create(nil); try PropEditor.LoadFromFile(sFilename); Other Details: Delphi 2007, Windows 7 64 bit, but can reproduce when testing EXE on XP REMOVING CONST STOPS PROBLEM FROM EXHIBITING (but presumably the problem is thus just lurking) PropEditor.PromptForXYZPropertiesSettings creates and shows a form. If I disable the ShowModal call then the memory is not trashed. Even though i have REMOVED ALL CONTROLS AND CODE from the form So I would like some advice on how to debug the issue. I was thinking perhaps watching the memory pointer where the sFilename var exists to see where it gets trashed, but not sure how i would do that (obviously needs to be done within the app so is owned memory). Thanks

    Read the article

  • Seeking good practice advice: multisite in Drupal

    - by deanloh
    I'm using multisite to host my client sites. During development stage, I use subdomain to host the staging site, e.g. client1.mydomain.com. And here's how it look under the SITES folder: /sites/client1.mydomain.com When the site is completed and ready to go live, I created another folder for the actual domain, e.g. client1.com. Hence: /sites/client1.com Next, I created symlinks under client1.com for FILES and SETTINGS.PHP that points to the subdomain i.e. /sites/client1.com/settings.php --> /sites/client1.mydomain.com/settings.php /sites/client1.com/files --> /sites/client1.mydomain.com/files Finally, to prevent Google from indexing both the subdomain and actual domain, I created the rule in .htaccess to rewrite client1.mydomain.com to client1.com, therefore, should anyone try to access the subdomain, he will be redirected to the actual domain. This above arrangement works perfectly fine. But I somehow feel there is a better way to achieve the above in much simplified manner. Please feel free to share your views and all advice is much appreciated.

    Read the article

  • OOP + MVC advice on Member Controller

    - by dan727
    Hi, I am trying to follow good practices as much as possible while I'm learning using OOP in an MVC structure, so i'm turning to you guys for a bit of advice on something which is bothering me a little here. I am writing a site where I will have a number of different forms for members to fill in (mainly data about themselves), so i've decided to set up a Member controller where all of the forms relating to the member are represented as individual methods. This includes login/logout methods, as well as editing profile data etc. In addition to these methods, i also have a method to generate the member's control panel widget, which is a constant on every page on the site while the member is logged in. The only thing is, all of the other methods in this controller all have the same dependencies and form templates, so it would be great to generate all this in the constructor, but as the control_panel method does not have the same dependencies etc, I cannot use the constructor for this purpose, and instead I have to redeclare the dependencies and same template snippets in each method. This obviously isn't ideal and doesn't follow DRY principle, but I'm wondering what I should do with the control_panel method, as it is related to the member and that's why I put it in that controller in the first place. Am I just over-complicating things here and does it make sense to just move the control_panel method into a simple helper class? Here are the basic methods of the controller: class Member_Controller extends Website_Controller { public function __construct() { parent::__construct(); if (request::is_ajax()) { $this->auto_render = FALSE; // disable auto render } } public static function control_panel() { //load control panel view $panel = new View('user/control_panel'); return $panel; } public function login() { } public function register() { } public function profile() { } public function household() { } public function edit_profile() { } public function logout() { } }

    Read the article

  • How do I change careers to become a programmer with little money

    - by bgc83
    I'm currently a network engineer, but find myself wanting to get into the world of development. I took a little bit of Java in college, am 27 years old and have been network engineering for 4 years now. I have a mortgage and student loans so going back to school would be difficult. I'm willing to put in however much hardwork is needed around my full time job to learn, but part of me feels I may need actuall schooling to get down some of the advanced concepts. Just looking for a little advice and direction. I have purchased a bunch of the Head First programming books and have begun reading through some of them as I figure out my way into this transition.

    Read the article

  • How do I use SDl_Threads properly?

    - by Anoymonous
    I am new to threads,SDL and how graphic work in general. I've been looking through all of LazyFoo's SDL tutorials, and had helped me greatly. But in his tutorials about multi threading, he commented that you should never use video functions in separate threads, or might cause problem. I am curious how it should be done, as I still have a vague understanding of graphics and threads. As one of my projects is a shoot'em up, I was wondering if I should create one thread that displays all the graphics, one threads receives all the player input for his ship, and another thread for the enemy AI. If this is NOT how it should be done, (I think it's wrong) does anyone have any advice of how graphics should be implemented with user input and enemy AI with threads? For the Lazyfoo's tutorials, this is the link: http://lazyfoo.net/SDL_tutorials/

    Read the article

  • How do I change careers to become a programmer without spending a lot of money

    - by bgc83
    I'm currently a network engineer, but find myself wanting to get into the world of development. I took a little bit of Java in college, am 27 years old and have been network engineering for 4 years now. I have a mortgage and student loans so going back to school would be difficult. I'm willing to put in however much hardwork is needed around my full time job to learn, but part of me feels I may need actuall schooling to get down some of the advanced concepts. Just looking for a little advice and direction. I have purchased a bunch of the Head First programming books and have begun reading through some of them as I figure out my way into this transition.

    Read the article

  • Learning C++ from AS3

    - by grey
    I'm a decent AS3 programmer. I work in games, and that is my reason for programming. While there is much I can accomplish with Adobe AIR, my understanding at this point is that learning C++ is probably a good direction to take. I would learn a lot of valuable lower level programming if I needed it down the road, and I would have an easier time learning other C oriented languages. I see a lot of information for people looking to learn AS3 who know C++, but not the other way around. Why C++? Cross platform compatibility is important to me, so I'm not particularly interested in C# or Objective-C at this junction. I'm also aware of HaXe, and while I love the concept, after doing some research I'm worried about investing a lot of time into something so recent with limited learning resources and documentation. I'm looking for advice and resources (books, articles) related to this topic. Thanks in advance!

    Read the article

  • What should I do or learn to better prepare myself for a co-op position?

    - by Chris Vinz
    I'm currently taking computer systems in a technical institute and I will start looking for a coop job by next September. Since summer vacation is only a few weeks away, I was wondering what I should learn or do to help me land a job and do well in it. I'm pretty sure I'm ahead of most of my classmates since I got around 1.5 years "head start." For now, I'm planning to learn how to use source control (git - for no reason really) and was actually thinking of learning Scheme through SICP and maybe build something nice with it at the end. On the other hand, I'm wondering if it's better to expand on what I know right now and I'm thinking of C++ since I enjoy it a lot more than others like Java. Can I get advice on this? thanks!

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >