Search Results

Search found 1548 results on 62 pages for 'kevin brown'.

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

  • Why does this php/ajax query fail?

    - by Ashley Brown
    I'm ajaxing over to this php file. $a = 'old'; $b = 'new'; if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $query = "SELECT * FROM `tld` WHERE type = '".$var."'"; } $query = "SELECT * FROM `tld` "; $result = mysqli_query($link,$query); while($row = mysqli_fetch_assoc($result)) { echo '<div>'.$row['something'].'</div>'; } The data posted is either 'all' 'new' or 'old'. If i send the data as either new or old, the script works and outputs as expected. If the posted data is neither new or old but all instead, it fails and don't show any errors or respond anything back. (I've monitored via dev tools aswell) So, I tried this if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $var = "SELECT * FROM `tld` WHERE type = '".$var."'"; } elseif ($_POST['info-type'] == 'all'){ $query = "SELECT * FROM `tld` "; } But the script still fails. If i fully remove the IF statements and use the query without the WHERE clause like it is after the elseif, it works?

    Read the article

  • Codeigniter: URI segments

    - by Kevin Brown
    How do I create an if statement saying something like this? $segment = "segment 2 or 3"; if($segment == 1{ do stuff } I know this is pretty elementary, but I don't totally understand the URI class...

    Read the article

  • Is there a free, smale-scale, not web-based issue/bug tracking system?

    - by Doc Brown
    I know, there were posts before here on SO before concerning issue or bug tracking systems, like this one, but the given answers point either to commercial systems or web-based systems, which both seem to be oversized for our needs. What I am looking for is a non-commercial tool for a team of 3 to 4 developers, which can be used on an existing fileserver, without the need of installing additional server software like a C/S database or a web server. Some things I expect from such a system: allows to remember bugs (with a priority) and issues / ideas for new features (mostly without a priority) description of the issue, perhaps some additional remarks short info who entered the bug/issue entry one or more tags allowing us to group or filter the list Any suggestions? EDIT: I should have said that, but we are using MS Windows clients, Visual Studio development, Tortoise SVN (the latter works fine without a subversion server). And yes, I am strict on "no server software", since all server based solutions I have seen so far seem much to oversized/heavy weighted/too-much-effort-to-be-worth-it. In fact, if no one has a better idea, we are going to use a spreadsheet, but I can't believe there are no ready-made, light weight solutions.

    Read the article

  • jQuery: exclude class on click

    - by Kevin Brown
    //Table select $("#reports-table tr").click( function() { var detail_id = $(this).attr('id'); $(this).addClass("selected"); $(this).siblings().removeClass("selected"); $('#reports-right').show().load('/members/details/'+detail_id); $('#reports-table').width(680); } ); I currently am using this code to add a selected class to a table row and show details of the row clicked in a right 'aside'. The problem is, I have action buttons in the row--when they are clicked, becausee they are children of the tr, this function still runs... How can I exclude a certain class?

    Read the article

  • Creating seed model from data already in DB

    - by Nick Brown
    Is there a way to convert data in an existing database into objects that can easily be put into a seed method? Essentially I'd like to let some people add lines to my DB via a form and then convert that into an object that I can re-seed the DB anytime I need to make changes. The database itself is created via code-first using the following model: public class Combo { public int Id { get; set; } public string MainPrefix { get; set; } public string MainDescriptor { get; set; } public string MainDish { get; set; } public string Connector { get; set; } public string SecondaryDescriptor { get; set; } public string SecondaryDish { get; set; } }

    Read the article

  • null checking edit textbox android

    - by sara brown
    i want to make empty textbox checking for android. i tried try catch but it was force to close. below is my codes try{ name = (EditText)findViewById(R.id.name); }catch(NullPointerException ex){ new AlertDialog.Builder(KawalanAppXTVT.this).setTitle("Error" ) .setMessage("That's not a number") .setPositiveButton("OK", null).show(); can someone help me?

    Read the article

  • Python - Removing duplicates from a string

    - by Daniel
    def remove_duplicates(strng): """ Returns a string which is the same as the argument except only the first occurrence of each letter is present. Upper and lower case letters are treated as different. Only duplicate letters are removed, other characters such as spaces or numbers are not changed. >>> remove_duplicates('apple') 'aple' >>> remove_duplicates('Mississippi') 'Misp' >>> remove_duplicates('The quick brown fox jumps over the lazy dog') 'The quick brown fx jmps v t lazy dg' >>> remove_duplicates('121 balloons 2 u') '121 balons 2 u' """ s = strng.split() return strng.replace(s[0],"") Writing a function to get rid of duplicate letters but so far have been playing around for an hour and can't get anything. Help would be appreciated, thanks.

    Read the article

  • Codeigniter: how should I restructure db schema?

    - by Kevin Brown
    I don't even know if that's the right term. May it be known that I'm a major novice! I have three tables: users, profiles, and survey. Each one has user_id as it's first field, (auto-increment for users), and they're all tied by a foreign key constraint, CASCADE on DELETE. Currently, for each user, let's say user_id 1, they have a corresponding db entry in the other tables. For profiles it lists all their information, and the survey table holds all their survey information. Now I must change things...darn scope creep. Users need the ability to have multiple survey results. I imagine that this would be similar to a comment table for a blog... My entire app runs around the idea that a single user is linked to a constraining profile and survey. How should I structure my db? How should I design my app's db so that a user can have multiple tests/profiles for the test? Please assist! Any advice, information and personal-knowledge is appreciated! Right now the only way I know how to accompany my client is to create a pseudo-user for each test (so unnecessary) and list them in a view table (called "your tests")-- these are obtained from the db by saying: where user_id=manager_id

    Read the article

  • Sum up values in SQL once all values are available

    - by James Brown
    I have events flowing into a MySQL database and I need to group and sum the events to transactions and store away into another table. The data looks like: +----+---------+------+-------+ | id | transid | code | value | +----+---------+------+-------+ | 1 | 1 | b | 12 | | 2 | 1 | i | 23 | | 3 | 2 | b | 34 | | 4 | 1 | e | 45 | | 5 | 3 | b | 56 | | 6 | 2 | i | 67 | | 7 | 2 | e | 78 | | 8 | 3 | i | 89 | | 9 | 3 | i | 90 | +----+---------+------+-------+ The events arrive in batches and I would like to create the transaction by summing up the values for each transid, like: select transid, sum(value) from eventtable group by transid; but only after all the events for that transid have arrived. That is determined by the event with the code e (b for the beginning, e for the end and i for varying amount of intermediates). Being a novice in SQL, how could I implement the requirement for the existance of the end code before the summing?

    Read the article

  • Scala, represent pattern of boolean tuple into something else.

    - by Berlin Brown
    This is a cellular automata rule (input Boolean == Left, Center, Right Cell) and output Boolean . What is a better way to represent this in Scala. trait Rule { def ruleId() : Int def rule(inputState:(Boolean, Boolean, Boolean)) : Boolean override def toString : String = "Rule:" + ruleId } class Rule90 extends Rule { def ruleId() = 90 def rule(inputState:(Boolean, Boolean, Boolean)) : Boolean = { // Verbose version, show all 8 states inputState match { case (true, true, true) => false case (true, false, true) => false case (false, true, false) => false case (false, false, false) => false case _ => true } } }

    Read the article

  • Java static source analysis/parsing (possibly with antlr), what is a good tool to do this?

    - by Berlin Brown
    I need to perform static source analysis on Java code. Ideally, I want the system to work out of the box without much modification from me. For example, I have used Antlr in the past, but I spent a lot of time building grammar files and still didn't get what I wanted. I want to be able to parse a java file and have return the character position of say: Character position start and end of a Java block comment Character position start and end of a Java class file Character position start and end of a Java method declaration, signature, and implementation. It looks like Antlr will do that, but I have yet to finish a grammar that actually gives me the positions of the code I need. Does anyone have that complete Antlr grammar and Java code to give the character positions of the parts in the Java source.

    Read the article

  • Codeigniter: how to track activity w/o using multiple db rows?

    - by Kevin Brown
    I need to track the completion of tasks for users. I started by having a row called "first_login", "profile_complete", "other_thing_complete", etc... I'd like to combine these all into one row "activity_state". I just don't know how to properly store data in this field, and how to retrieve it. What kind of field should it be, and how should I read/write to it?

    Read the article

  • Codeigniter: State Machine how to

    - by Kevin Brown
    I created a db row called "activity_state" to denote which things a user has and hasn't completed. The problem is, I don't know how to use it... How can I use this single row to determine what a user has done? ie. have they completed their profile?, have they completed an assignment? Someone mentioned using it as a bitfield, but I'm unfamiliar with that. Is that a good idea? Any ideas?

    Read the article

  • Paged UIScrollView with UIImageViews only showing first UIImageVIew

    - by Jonathan Brown
    I am working on a paged UIScrollView, but it only wants to show the first UIImageView within it. I add each UIImageView at an offset of the width of the scroll view, so that should create each page. When run, it says the scroll view is the right number of pages, but the images don't show. Any help would be much appreciated! int numSlides = NUM_TUTORIAL_SLIDES; NSString *fileName; UIImageView *slideImageView; CGRect slideFrame; for (int i = 1; i <= numSlides; i++) { slideFrame.origin.x = self.tutorialScrollView.frame.size.width * (i-1); slideFrame.origin.y = 0; slideFrame.size = self.tutorialScrollView.frame.size; slideImageView = [[UIImageView alloc] initWithFrame:slideFrame]; if([[AppManager sharedManager] is4inchScreen]) { fileName = [NSString stringWithFormat:@"Slide%[email protected]", i]; } else { fileName = [NSString stringWithFormat:@"Slide%[email protected]", i]; } slideImageView.image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:fileName ofType:nil]]; [self.tutorialScrollView addSubview:slideImageView]; [slideImageView release]; } self.tutorialScrollView.contentSize = CGSizeMake(self.tutorialScrollView.frame.size.width * numSlides, self.tutorialScrollView.frame.size.height); self.tutorialScrollView.delegate = self;

    Read the article

  • HTML/CSS Design for Report

    - by Kevin Brown
    I'm looking for some resources that demonstrate good graphic design for generated (PHP/HTML/CSS) reports. The website I'm designing is essentially a long test. Everything is finished except the report generation, and this part needs to look good! I'd appreciate any advice/resources you can point me to! I know this isn't directly programming related, but my purposes do encompass coding and output.

    Read the article

  • Codeigniter: Using data in a controller

    - by Kevin Brown
    I'm new to php and CI, and I'm having some trouble in my controller. I feel that I'm doing this the wrong way, and it could be easier, I just don't know the syntax: $data['members'] = $this->home_model->getUser($id); $credit = $this->home_model->getCredit($id); if ($credit == '0'){stuff...} So I'm getting the user's data that has their the same information as "getCredit" does, but I don't know how to get the single variable that I need for my if statement... How can I just use the "getUser" function so that I'm not pulling redundant information?

    Read the article

  • Silverlight Cream for March 22, 2010 -- #817

    - by Dave Campbell
    In this Issue: Bart Czernicki, Tim Greenfield, Andrea Boschin(-2-), AfricanGeek, Fredrik Normén, Ian Griffiths, Christian Schormann, Pete Brown, Jeff Handley, Brad Abrams, and Tim Heuer. Shoutout: At the beginning of MIX10, Brad Abrams reported Silverlight 4 and RIA Services Release Candidate Available NOW From SilverlightCream.com: Using the Bing Maps Silverlight control on the Windows Phone 7 Bart Czernicki has a very cool BingMaps and WP7 tutorial up... you're going to want to bookmark this one for sure! Code included and external links... thanks Bart! Silverlight Rx DataClient within MVVM Tim Greenfield has a great post up about Rx and MVVM with Silverlight 3. Lots of good insight into Rx and interesting code bits. SilverVNC - a VNC Viewer with Silverlight 4.0 RC Andrea Boschin digs into Silverlight 4 RC and it's full-trust on sockets and builds an implementation of RFB protocol... give it a try and give Andrea some feedback. Chromeless Window for OOB applications in Silverlight 4.0 RC Andrea Boschin also has a post up on investigating the OOB no-chrome features in SL4RC. Windows Phone 7 and WCF AfricanGeek has his latest video tutorial up and it's on WCF and WP7... I've got a feeling we're all going to have to get our arms around this. Some steps for moving WCF RIA Services Preveiw to the RC version Fredrik Normén details his steps in transitioning to the RC version of RIA Services. Silverlight Business Apps: Module 8.5 - The Value of MEF with Silverlight Ian Griffiths has a video tutorial up at Channel 9 on MEF and Silverlight, posted by John Papa Introducing Blend 4 – For Silverlight, WPF and Windows Phone Christian Schormann has an early MIX10 post up about te new features in Expression Blend with regard to Silverlight, WPF, and WP7. Building your first Silverlight for Windows Phone Application Pete Brown has his first post up on building a WP7 app with the MIX10 bits. Lookups in DataGrid and DataForm with RIA Services Jeff Handley elaborates on a post by someone else about using lookup data in the DataGrid and DataForm with RIA Services Silverlight 4 + RIA Services - Ready for Business: Starting a New Project with the Business Application Template Brad Abrams is starting a series highlighting the key features of Silverlight 4 and RIA with the new releases. He has a post up Silverlight 4 + RIA Services - Ready for Business: Index, including links and source. Then in this first post of the series, he introduces the Business Application Template. Custom Window Chrome and Events Watch a tutorial video by Tim Heuer on creating custom chrome for OOB apps. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Quirks in .NET – Part 3 Marshalling Numbers

    - by thycotic
    Kevin has posted about marshalling numbers in the 3rd part of his ongoing blog series.   Jonathan Cogley is the CEO of Thycotic Software, an agile software services and product development company based in Washington DC.  Secret Server is our flagship enterprise password management product.

    Read the article

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