Search Results

Search found 17788 results on 712 pages for 'last'.

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

  • JQuery datepicker numberOfMonths: display current selection month last

    - by Paul
    Hi, I have a jquery datepicker with the numberOfMonths set to 3, currently when I click on the datepicker, the left side month is the current month. In most cases, the user is only going to be selecting a date prior to todays date so I would prefer the current month selected to be the last calendar i.e. March, April, May instead of the current implementation which is May, June, July. Greatly appreciate any help!

    Read the article

  • php parse error always on the last line

    - by is0lated
    I'm trying to read a comment that is stored in a mysql table. For some reason I always get a parse error on the last line of the file even if the last line is blank. I'm not sure if it's relevant but the connect.php works for putting the comment into the database. I'm using wampserver to host it and coding it by hand. I think that's it's something to do with the while loop, when I comment out the while(){ and the } near the end I just get a few missing variable errors as you would expect. I'm quite new to php coding so I'm pretty sure the problem will be something simple that I've either missed or not understood properly. Anyway, here's my code: <?php include "connect.php"; ?> <?php $sql = "SELECT * FROM main"; $result = mysql_query($sql) or die("Could not get posts from table"); while($rows=mysql_fetch_array($result)){ ?> <table bgcolor="green" align="center"> <tr> <td></td> </tr> <tr> <td><strong> <? echo $rows['name']; ?> </strong></td> </tr> <tr> <td> <? echo $rows['email']; ?> </td> </tr> <tr> <td> <? echo $rows['comment']; ?> </td> </tr> </table> <? } ?> Thanks for the help. :)

    Read the article

  • vbsript and excel delete all worksheets except last one

    - by matthew moore
    I am trying to delete all worksheet in excel exept last one and save it then move its location. I can not get it took work as it deletes all other worksheets but errors out with and out of range error. Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.DisplayAlerts = False Set objWorkbook = objExcel.Workbooks.Open("C:\M-tek 10-31-12_Tony.xlsx") i = objWorkbook.Worksheets.Count Do while i = i i = i - 1 objWorkbook.Worksheets(i).Delete Loop

    Read the article

  • Recursive SQL, have the last three values increased?

    - by Mike
    Hi, I have a table that looks like this: ---------------------- | DateTime | Value | ---------------------- | 2010-01-01 | 26 | | 2010-02-01 | 24 | | 2010-03-01 | 23 | | 2010-04-01 | 28 | | 2010-05-01 | 30 | I need to find if the last three consecutive months have increased in value. How can I get SQL to check whether the value for each has increased? If anyone can give me any pointers for solving this problem it would be greatly appreciated! Thanks

    Read the article

  • Efficiently store last X items in an MySQL Database

    - by Saif Bechan
    I want to store the last 3 items in an MySQL database in an efficient way. So when the 4th item is stored the first should be deleted. The way I do this not is first run a query getting the items. Than check what I should do then insert/delete. There has to be a better way to do this. Any suggestions?

    Read the article

  • How to get the newest (last modified) directory [C#]

    - by Shaitan00
    Currently my application uses string[] subdirs = Directory.GetDirectories(path) to get the list of subdirectories, and now I want to extract the path to the latest (last modified) subdirectory in the list. What is the easiest way to accomplish this? (efficiency is not a major concern - but robustness is)

    Read the article

  • PHP: Remove the first and last item of the array

    - by phpBOY
    Hi, Suppose I have this array: $array = array('10', '20', '30.30', '40', '50'); Questions What is the fastest/easiest way to remove the first item from the above array? What is the fastest/easiest way to remove the last item from the above array? So the resulting array contains only these values: '20' '30.30' '40'

    Read the article

  • Get last/newly added element in std::set

    - by Dave17
    can you get the last or newly added element in std::set? for example say if the loop runs to collect the elements to fill in the std::set. if on the first run the set was, [0] "A" [1] "B" [2] "D" and, on second run, the set becomes [0] "A" [1] "B" [2] "C" [3] "D" How would you check if 'C' is the new element that was added?

    Read the article

  • [php] how to read only 5 last line of the txt file

    - by safaali
    hello i have a file named "file.txt" it updates by adding lines to it. I am reading it by this code: $fp = fopen("file.txt", "r"); $data = ""; while(!feof($fp)) { $data .= fgets($fp, 4096); } echo $data; and a huge number of lines appears. I just want to echo the last 5 lines of the file how can i do that ? thanks in advanced

    Read the article

  • Robocopy - Compare modified dates of files?

    - by Kenny Bones
    Hi, I've been trying to create this script that basically mirrors two sets of folders and it's content (including subfolders), but only copy files that are newer than the ones that already exist. I tried doing this by writing a vbscript, but it turns out that I manualle need to scan each subfolder and then it's content. And then that subfolder's content as well and so on and so forth. So I'm wondering if anyone knows if this can be done with Robocopy?

    Read the article

  • mysql first record retrieval

    - by Sammy
    While very easy to do in Perl or PHP, I cannot figure how to use mysql only to extract the first unique occurence of a record. For example, given the following table: Name Date Time Sale John 2010-09-12 10:22:22 500 Bill 2010-08-12 09:22:37 2000 John 2010-09-13 10:22:22 500 Sue 2010-09-01 09:07:21 1000 Bill 2010-07-25 11:23:23 2000 Sue 2010-06-24 13:23:45 1000 I would like to extract the first record for each individual in asc time order. After sorting the table is ascending time order, I need to extract the first unique record by name. So the output would be : Name Date Time Sale John 2010-09-12 10:22:22 500 Bill 2010-07-25 11:23:23 2000 Sue 2010-06-24 13:23:45 1000 Is this doable in an easy fashion with mySQL? Thanks, Sammy

    Read the article

  • Vbscript - Compare and copy files from folder if newer than destination files

    - by Kenny Bones
    Hi, I'm trying to design this script that's supposed to be used as a part of a logon script for alot of users. And this script is basically supposed to take a source folder and destination folder as basically just make sure that the destination folder has the exact same content as the source folder. But only copy if the datemodified stamp of the source file is newer than the destination file. I have been thinking out this basic pseudo code, just trying to make sure this is valid and solid basically. Dim strSourceFolder, strDestFolder strSourceFolder = "C:\Users\User\SourceFolder\" strDestFolder = "C:\Users\User\DestFolder\" For each file in StrSourceFolder ReplaceIfNewer (file, strDestFolder) Next Sub ReplaceIfNewer (SourceFile, DestFolder) Dim DateModifiedSourceFile, DateModifiedDestFile DateModifiedSourceFile = SourceFile.DateModified() DateModifiedDestFile = DestFolder & "\" & SourceFile.DateModified() If DateModifiedSourceFile < DateModifiedDestFile Copy SourceFile to SourceFolder End if End Sub Would this work? I'm not quite sure how it can be done, but I could probably spend all day figuring it out. But the people here are generally so amazingly smart that with your help it would take alot less time :)

    Read the article

  • x.lastChild.nodeValue

    - by Zeb-ur-Rehman
    <html> <head> <script type="text/javascript" src="jQuery.js"> <script type="text/javascript"> x=document.getElementByTagName("p"); document.write(x.lastChild.nodeValue); </script> </head> <body> <p id="intro">Hello World 1!</p> <p id="intro">Hello World 2!</p> <p id="intro">Hello World 3!</p> </body> </html> Why doesn't the above code work. I want to show [Hello World 3!] by using the statement documetn.write(x.lastChild.nodeValue()); Thanks in advance...

    Read the article

  • C# mysql one return last_insert_id

    - by Bernhard
    I am trying to create a method in which I can exequte mysql UPDATE, DELETE or INSERT query. The method must work when with an INSERT I ask or do not ask the last_insert_id(). Below is the code that I have at the moment: public int executeUID(MySqlCommand msCommand) { try { this.Open(); msCommand.Connection = this.msCon; return int.Parse(msCommand.ExecuteScalar().ToString()); } catch (MySqlException ex) { throw ex; } finally { this.Close(); } } The problem with this is is that when I use an insert query that returns a last_insert_id() the method works greatly. But when the query doesn't return an last_insert_id() the method malfunctions. How can I get this method to work?

    Read the article

  • FullCalendar displaying last weeks events below this weeks events

    - by Brian
    I am developing an application to manage an On-Call calendar, using FullCalendar to render it. Most events are 1 week long, starting at 8:00 AM Tuesday and ending the following Tuesday at 8:00 AM. Another event, presumably with a different person on-call, will follow that event. During a hallway usability test, someone commented that the month calendar view was difficult to read because the previous weeks event is not at the top of the stack, instead rendering below the event that starts during that week. When being viewed, the eye perceives that it should go down 1 line to view the remaining timeline because the event from last week is there, instead of moving down to the following week. I investigated what I believe to be the problem: function segCmp(a, b) { return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); } sorts the events for a row, but uses the length of the event in the calculation. Since the current week's event will have a longer duration, it always get sorted to the top. To test, I changed the start dates to Wednesday so the durations are closer. This cause the events to render how I would expect, with last weeks events at the top and this weeks at the bottom. I thought that if one of the events in the compare doesn't start that week, then it should only be compared based on the start times. I modified the function to be: function segCmp(a, b) { if (a.isStart == false || b.isStart == false) { return (a.event.start - b.event.start); } return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); } This solved my problem, and the rendering now looks good - and passes the hallway test. What I don't know is if this would have an impact in other areas. I have taken a look at the other views (month, week, day) and they all seem to be rendering properly as well. I am just not familiar with FullCalendar enough to file a bug or feature request on this, or if this would even be considered a bug. I am wondering if what I modified is correct, or if it is not what a better modification would be to fix this issue. Thanks! Below I have the json results for what should be displayed: [{"title":"Person 1 - OnCall (OSS On Call)","id":12,"allDay":false,"start":"2010-11-30T15:00:00.0000000Z","end":"2010-12-07T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/12"}, {"title":"Person 2 - OnCall (OSS On Call)","id":13,"allDay":false,"start":"2010-12-07T15:00:00.0000000Z","end":"2010-12-14T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/13"}, {"title":"Person 3 - OnCall (OSS On Call)","id":14,"allDay":false,"start":"2010-12-14T15:00:00.0000000Z","end":"2010-12-21T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/14"}, {"title":"Person 4 - OnCall (OSS On Call)","id":15,"allDay":false,"start":"2010-12-21T15:00:00.0000000Z","end":"2010-12-28T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/15"}, {"title":"Person 5 - OnCall (OSS On Call)","id":16,"allDay":false,"start":"2010-12-28T15:00:00.0000000Z","end":"2011-01-04T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/16"}, {"title":"Person 6 - OnCall (OSS On Call)","id":17,"allDay":false,"start":"2011-01-04T15:00:00.0000000Z","end":"2011-01-11T15:00:00.0000000Z","editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/17"}, {"title":"Christmas","id":2,"allDay":true,"start":"2010-12-25T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/2"}, {"title":"New Years Eve","id":3,"allDay":true,"start":"2010-12-31T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/3"}, {"title":"New Years Day","id":4,"allDay":true,"start":"2011-01-01T07:00:00.0000000Z","end":null,"editable":false,"className":"fc-event-title-calendar","url":"/TimeManagement/Edit/4"}]

    Read the article

  • Having a problem displaying data from last inserted data

    - by Gideon
    I'm designing a staff rota planner....have three tables Staff (Staff details), Event (Event details), and Job (JobId, JobDate, EventId (fk), StaffId (fk)). I need to display the last inserted job detail with the staff name. I've been at it for couple of hours and getting nowhere. Thanks for the help in advance. My code is the following: $eventId = $_POST['eventid']; $selectBox = $_POST['selectbox']; $timePeriod = $_POST['time']; $selectedDate = $_POST['date']; $count = count($selectBox); //constructing the staff selection if (empty($selectBox)) { echo "<p>You didn't select any member of staff to be assigned."; echo "<p><input type='button' value='Go Back' onClick='history.go(-1)'>"; } else { echo "<p> You selected ".$count. " staff for this show."; for ($i=0;$i<$count;$i++) { $selectId = $selectBox[$i]; //insert the details into the Job table in the database $insertJob = "INSERT INTO Job (JobDate, TimePeriod, EventId, StaffId) VALUES ('".$selectedDate."', '".$timePeriod."', ".$eventId.", ".$selectId.")"; $exeinsertJob = mysql_query($insertJob) or die (mysql_error()); } } //display the inserted job details $insertedlist = "SELECT Job.JobId, Staff.LastName, Staff.FirstName, Job.JobDate, Job.TimePeriod FROM Staff, Job WHERE Job.StaffId = Staff.StaffId AND Job.EventId = $eventId AND Job.JobDate = ".$selectedDate; $exeinsertlist = mysql_query($insertedlist) or die (mysql_error()); if ($exeinsertlist) { echo "<p><table cellspacing='1' cellpadding='3'>"; echo "<tr><th colspan=5> ".$eventname."</th></tr>"; echo "<tr><th>Job Id</th><th>Last Name</th> <th>First Name </th><th>Date</th><th>Hours</th></tr>"; while ($joblistarray = mysql_fetch_array($exeinsertlist)) { echo "<tr><td align=center>".$joblistarray['JobId']." </td><td align=center>".$joblistarray['LastName']."</td><td align=center>".$joblistarray['FirstName']." </td><td align=center>".$joblistarray['JobDate']." </td><td align=center>".$joblistarray['TimePeriod']."</td></tr>"; } echo "</table>"; echo "<h3><a href=AssignStaff.php>Add More Staff?</a></h3>"; } else { echo "The Job list can not be displayed at this time. Try again."; echo "<p><input type='button' value='Go Back' onClick='history.go(-1)'>"; }

    Read the article

  • Returning to last viewed List page after insert/edit with ASP.NET Dynamic Data

    - by Pat James
    With a pretty standard Dynamic Data site, when the user edits or inserts a new item and saves, the page does a Response.Redirect(table.ListActionPath), which takes the user back to page 1 of the table. If they were editing an item on page 10 (or whatever) and want to edit the next item on that page, they have to remember the page number and navigate back to it. What's the best way to return the user to the list page they last viewed? I can conceive of some solutions using cookies, session state, or query string values to retain this state and making my own Page Template to incorporate it, but I can't help thinking this must be something that was considered when Dynamic Data was created, and there must be something simpler or built-in to the framework that I'm missing here.

    Read the article

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