Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 109/136 | < Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >

  • jquery/ajax load new content when available

    - by Tim
    I know this is quite a vague question -- sorry about that. If I have a forum, shoutbox or something similar where users enter and submit data, running on PHP and MySQL, what is the best way to have the newly submitted content automatically display on the page for all users when it is submitted? Much like a live newsfeed, if you like... The effect sort-of works here at stackoverflow, when you are answering a question you are told when new answer is submitted. I want to test for newly submitted content and then display it automatically. Any suggestions? Many thanks :)

    Read the article

  • AJAX with jQuery not returning data

    - by James P
    This is my Javascript: $(document).ready(function() { $('#like').bind('keydown', function(e) { if(e.keyCode == 13) { var likeMsg = $('#like').val(); if(likeMsg) { // Send the AJAX request to like.php $.ajax({ url: 'like.php', success: function(data) { alert('Content: ' + data); } }); } } }); }); And this is my like.php file: <?php echo "It works! :)"; ?> When I press enter on the #like input, it seems the AJAX request is sent and an alert box comes up saying: Content:, but there's no data being sent back from like.php... I have checked if the file exists and if it's in the same directory and whatever and it is, so I'm pretty much clueless atm. Does anyone know what could be wrong here? Cheers.

    Read the article

  • How can a property resolve its own name and type with reflection?

    - by Tim Santeford
    Is there a way for a property to access its own name and type at runtime using reflection? I want to access this info without hard coding the name or index of the property in the class. Simple Example Code: Private ReadOnly Property MyProperyName() As String Get Console.WriteLine((Get Current Property Info).Type.ToString) Console.WriteLine((Get Current Property Info).Name) Return "" End Get End Property Expected output: System.String MyPropertyName

    Read the article

  • How can I change the color of build output in a shell window?

    - by Tim Gradwell
    I have a build process which runs from a batch file. It produces a large volume of text. Sometimes it prints the word "Error" or "Warning" followed by a message. The errors and warnings are getting lost among a sea of text. Can I highlight those words in a different color, maybe in a dos window, or a cygwin shell window, possibly by piping them through some string manipulation program before posting them to the screen? Thanks.

    Read the article

  • check for null date in CASE statement, where have I gone wrong?

    - by James.Elsey
    Hello, My source table looks like this Id StartDate 1 (null) 2 12/12/2009 3 10/10/2009 I want to create a select statement, that selects the above, but also has an additional column to display a varchar if the date is not null such as : Id StartDate StartDateStatus 1 (null) Awaiting 2 12/12/2009 Approved 3 10/10/2009 Approved I have the following in my select, but it doesn't seem to be working. All of the statuses are set to Approved even though the dates have some nulls select id, StartDate, CASE StartDate WHEN null THEN 'Awaiting' ELSE 'Approved' END AS StartDateStatus FROM myTable The results of my query look like : Id StartDate StartDateStatus 1 (null) Approved 2 12/12/2009 Approved 3 10/10/2009 Approved 4 (null) Approved 5 (null) Approved StartDate is a smalldatetime, is there some exception to how this should be treated? Thanks

    Read the article

  • Convert DOMElement Array to jQuery Object

    - by Tim N
    I am using the DataTables plugin for jQuery and need to get one of the table rows. DataTables has a fnGetNodes function that returns an Array with all of the DOMElements of the table. I would like to use a jQuery selector to find that row (I know the id of the row), but I need to convert the Array to a jQuery Object, is this possible?

    Read the article

  • How do I choose what and when to cache data with ob_start rather than query the database?

    - by Tim Santeford
    I have a home page that has several independent dynamic parts. The parts consist of a list of recent news from the company, a site statistics panel, and the online status of certain employees. The recent news changes monthly, site statistics change daily, and online statuses change on a per minute bases. I would like to cache these panels so that the db is not hit on every page load. Is using ob_start() then ob_get_contents() to cache these parts to a file the correct way to do this or is there a better method in PHP5 for doing this? In asking this question I'm trying to answer these additional questions: How can I determine the correct approach for caching this data without doing extensive benchmarking? Does it make sense to cache these parts in different files and then join them together per requests or should I re-query the data and cache once per minute? I'm looking for a rule of thumb for planning pages and for situations where doing testing is not cost effective (The client is not paying enough for it I mean). Thanks!

    Read the article

  • Can't get div to 100% height?

    - by James
    I'm not entirely sure what I'm doing wrong, and I can't figure out how to Google it because a common mistake is very prevalent. I have the parent's height explicitly set, but I can't get #main-sub-content 's height to 100%. Here's the page: http://coloryourspot.vadremix.com/ And the corresponding CSS: http://coloryourspot.vadremix.com/styles/primary/main.css Can anyone spot the issue? Solved: The problem was the parent element had height:auto!important;

    Read the article

  • Handling null values with PowerShell dates

    - by Tim Ferrill
    I'm working on a module to pull data from Oracle into a PowerShell data table, so I can automate some analysis and perform various actions based on the results. Everything seems to be working, and I'm casting columns into specific types based on the column type in Oracle. The problem I'm having has to do with null dates. I can't seem to find a good way to capture that a date column in Oracle has a null value. Is there any way to cast a [datetime] as null or empty?

    Read the article

  • CakePHP accessing other controllers

    - by James
    CakePHP Newbie :) I am having trouble accessing another controller and passing that data to a view in one of my controllers: In controllers/landings_controller.php: var $uses = 'User'; function home() { $userdata = $this->User->read(); $this->set(compact('userdata')); } In views/landings/home.ctp: <?php echo $this->userdata; ?> When accessing /landings/home I get the following error: Notice (8): Undefined property: View::$userdata [APP/views/landings/home.ctp, line 38] I don't know what I am doing wrong. Any help? Thanks!

    Read the article

  • Getting data from ListView control

    - by James
    I need to retrieve my data from a ListView control set up in Details mode with 5 columns. I tried using this code: MessageBox.Show(ManageList.SelectedItems(0).Text) And it works, but only for the first selected item (item 0). If I try this: MessageBox.Show(ManageList.SelectedItems(2).Text) I get this error: InvalidArgument=Value of '2' is not valid for 'index'. Parameter name: index I have no clue how I can fix this, any help? Edit: Sorry, should have said, I'm using Windows.Forms :)

    Read the article

  • Monotouch auto resizing views in iphone

    - by Tim Bassett
    I have created a view in interface builder that contains another view (content area) and a button bar at the bottom. The hierarchy is as: ->View --->mapContainer UIView ----->map MKMapView ----->OverlayView UIView --->ToolBar UIToolBar I would like the mapContainer to resize to full window when the ToolBar is hidden. I would like the map and the OverlayView to resize to the mapContainer size I have attempted the following code, but it has no effect. Please advise? public override void ViewDidLoad () { base.ViewDidLoad (); this.mapContainer.AutosizesSubviews = true ; this.View.AutosizesSubviews = true ; try { this.mapContainer.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth ; this.map.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth ; this.map.SizeToFit(); this.mapContainer.SizeToFit(); this.map.SizeToFit(); this.View.Frame = new System.Drawing.RectangleF(0,0,this.View.Frame.Width, this.View.Frame.Height ); this.mapContainer.LayoutSubviews(); } catch(Exception ex) { Console.Write(ex.ToString()); } }

    Read the article

  • Translate an IQueryable instance to LINQ syntax in a string

    - by James Dunne
    I would like to find out if anyone has existing work surrounding formatting an IQueryable instance back into a LINQ C# syntax inside a string. It'd be a nice-to-have feature for an internal LINQ-to-SQL auditing framework I'm building. Once my framework gets the IQueryable instance from a data repository method, I'd like to output something like: This LINQ query: from ce in db.EiClassEnrollment join c in db.EiCourse on ce.CourseID equals c.CourseID join cl in db.EiClass on ce.ClassID equals cl.ClassID join t in db.EiTerm on ce.TermID equals t.TermID join st in db.EiStaff on cl.Instructor equals st.StaffID where (ce.StudentID == studentID) && (ce.TermID == termID) && (cl.Campus == campusID) select new { ce, cl, t, c, st }; Generates the following LINQ-to-SQL query: DECLARE @p0 int; DECLARE @p1 int; DECLARE @p2 int; SET @p0 = 777; SET @p1 = 778; SET @p2 = 779; SELECT [t0].[ClassEnrollmentID], ..., [t4].[Name] FROM [dbo].[ei_ClassEnrollment] AS [t0] INNER JOIN [dbo].[ei_Course] AS [t1] ON [t0].[CourseID] = [t1].[CourseID] INNER JOIN [dbo].[ei_Class] AS [t2] ON [t0].[ClassID] = [t2].[ClassID] INNER JOIN [dbo].[ei_Term] AS [t3] ON [t0].[TermID] = [t3].[TermID] INNER JOIN [dbo].[ei_Staff] AS [t4] ON [t2].[Instructor] = [t4].[StaffID] WHERE ([t0].[StudentID] = @p0) AND ([t0].[TermID] = @p1) AND ([t2].[Campus] = @p2) I already have the SQL output working as you can see. I just need to find a way to get the IQueryable to translate into a string representing its original LINQ syntax (with an acceptable translation loss). I'm not afraid of writing it myself, but I'd like to see if anyone else has done this first.

    Read the article

  • I built my rails app with sqlite and without specifying any db field sizes, Is my app now foobared for production?

    - by Tim Santeford
    I've been following a lot of good tutorials on building rails apps but I seem to be missing the whole specifying and validating db field sizes part. I love not needing to have to think about it when roughing out an app (I would have never done this with a PHP or ASP.net app). However, now that I'm ready to go to production, I think I might have done myself a disservice by not specifying field sizes as I went. My production db will be MySQL. What is the best practice here? Do I need to go through all of my migration files and specify sizes, update all the models with validation, and update all my form partial views with input max widths? or am I missing a critical step in my development process?

    Read the article

  • Change Dll loaded with MEF

    - by Tim
    Hi all, I'm using MEF and the System.ComponentModel.Composition.dll to load some dll. I'm doing something like : AggregateCatalog catalog = new AggregateCatalog(new AssemblyCatalog(Assembly.GetExecutingAssembly()), new DirectoryCatalog(directory)); _container = new CompositionContainer(catalog); _container.ComposeParts(this); to import my dll. After some times, I would like to update my dll but if I try to delete it, I have an access denied, because it's alrealdy used by the program. How can I release the dll, replace with a new dll and load the dll again ? (without closing the program) Thanks in advance for your help

    Read the article

  • Java / Spring MVC 3 validation of an email address

    - by Tim
    I have a Java backend with Spring MVC and I am using validation in this way on my domain object for an email address: import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; ... @NotNull @Size(min = 1, max = 100) @Pattern(regexp="^([a-zA-Z0-9\\-\\.\\_]+)'+'(\\@)([a-zA-Z0-9\\-\\.]+)'+'(\\.)([a-zA-Z]{2,4})$") private String email; But all I get with these lines of code Set<ConstraintViolation<Person>> failures = validator.validate(personObject); ... Map<String, String> failureMessages = new HashMap<String, String>(); for (ConstraintViolation<Person> failure : failures) { failureMessages.put(failure.getPropertyPath().toString(), failure.getMessage()); System.out.println(failure.getPropertyPath().toString()+" - "+failure.getMessage()) } I get this on the console: email - must match "^([a-zA-Z0-9\\-\\.\\_]+)'+'(\\@)([a-zA-Z0-9\\-\\.]+)'+'(\\.)([a-zA-Z]{2,4})$" but I have as email address [email protected], so the regexp does not match. So I have two prolems: What's wrong here? And how can I define a error message on my own, because display this to the user, that is not a good thing :-) Thank you in advance for your help and Best Regards.

    Read the article

  • How to arrange labels in a flowlayout manner?

    - by Tim Büthe
    How do I arrange some UILabels and/or UIButtons of a variable length? I just want to add them to a UITableViewCell and they should arrange in a left-to-right flow, much like lines of text in a paragraph. I only found possibilities to create lables with a fixed size and position using "initWithFrame:...". Same seems to be true for Interface Builder, as far as I can tell. Any solution is appreciated no matter if it's done in code or using a custom cell XIB-file.

    Read the article

  • Batch file to Zip using only whats available to user

    - by James
    I am trying to write a script that I can give to user to have it automatically zip certain files of theirs and then load them onto an ftp site. Anyone know where I could find information on writing a batch file for auto-zipping files using only what is available to a user running windows? I have been looking for quite a bit but I am struggling. Thanks.

    Read the article

  • How to do simultaneous builds in two Git branches?

    - by james creasy
    I've looked at git-new-workdir, but I don't want the history to be shared because the branches have a release-main relationship. That is, changes in the release branch I want to propagate to the main line, but changes in the main line I don't want in the release line. A common pattern for me is to fix a bug in the release line, integrate it to the main line, then start builds in both branches at the same time. Is there a way to do this with git-new-workdir, do I need to clone, or is there a better solution? Thanks

    Read the article

< Previous Page | 105 106 107 108 109 110 111 112 113 114 115 116  | Next Page >