Search Results

Search found 8042 results on 322 pages for 'days'.

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

  • moment.js work out time left

    - by user1503606
    I am trying to get my head around the moment.js library as it seems more stable than the jquery one and the jquery date one is output console errors. http://momentjs.com/docs/#/manipulating/ What i am trying to do is do a countdown to work out the time left from now. example i have var countDownTill = '2012-11-19 00:00:00 +0000'; document.write(moment(countDownTill).diff(moment(), 'months') + " months<br>"); document.write(moment(countDownTill).diff(moment(), 'weeks') + " weeks<br>"); document.write(moment(countDownTill).diff(moment(), 'days') + " days<br>"); which will output 0 months 1 weeks 4 days but its not working out overall its doing it individuals for each value (days,weeks,months) so if i up the date by say 12 months like below. var countDownTill = '2013-11-19 00:00:00 +0000'; document.write(moment(countDownTill).diff(moment(), 'months') + " months<br>"); document.write(moment(countDownTill).diff(moment(), 'weeks') + " weeks<br>"); document.write(moment(countDownTill).diff(moment(), 'days') + " days<br>"); it outputs. 12 months 53 weeks 369 days where as i am trying to get it to output 12 months 2 weeks 5 days example here http://jsfiddle.net/fDmWH/3/

    Read the article

  • Sort and limit queryset by comment count and date using queryset.extra() (django)

    - by thornomad
    I am trying to sort/narrow a queryset of objects based on the number of comments each object has as well as by the timeframe during which the comments were posted. Am using a queryset.extra() method (using django_comments which utilizes generic foreign keys). I got the idea for using queryset.extra() (and the code) from here. This is a follow-up question to my initial question yesterday (which shows I am making some progress). Current Code: What I have so far works in that it will sort by the number of comments; however, I want to extend the functionality and also be able to pass a time frame argument (eg, 7 days) and return an ordered list of the most commented posts in that time frame. Here is what my view looks like with the basic functionality in tact: import datetime from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.db.models import Count, Sum from django.views.generic.list_detail import object_list def custom_object_list(request, queryset, *args, **kwargs): '''Extending the list_detail.object_list to allow some sorting. Example: http://example.com/video?sort_by=comments&days=7 Would get a list of the videos sorted by most comments in the last seven days. ''' try: # this is where I started working on the date business ... days = int(request.GET.get('days', None)) period = datetime.datetime.utcnow() - datetime.timedelta(days=int(days)) except (ValueError, TypeError): days = None period = None sort_by = request.GET.get('sort_by', None) ctype = ContentType.objects.get_for_model(queryset.model) if sort_by == 'comments': queryset = queryset.extra(select={ 'count' : """ SELECT COUNT(*) AS comment_count FROM django_comments WHERE content_type_id=%s AND object_pk=%s.%s """ % ( ctype.pk, queryset.model._meta.db_table, queryset.model._meta.pk.name ), }, order_by=['-count']).order_by('-count', '-created') return object_list(request, queryset, *args, **kwargs) What I've Tried: I am not well versed in SQL but I did try just to add another WHERE criteria by hand to see if I could make some progress: SELECT COUNT(*) AS comment_count FROM django_comments WHERE content_type_id=%s AND object_pk=%s.%s AND submit_date='2010-05-01 12:00:00' But that didn't do anything except mess around with my sort order. Any ideas on how I can add this extra layer of functionality? Thanks for any help or insight.

    Read the article

  • PASS summit 2013. We do not remember days. We remember moments.

    - by Maria Zakourdaev
      "Business or pleasure?" barked the security officer in the Charlotte International Airport. "I’m not sure, sir," I whimpered, immediately losing all courage. "I'm here for the database technologies summit called PASS”. "Sounds boring. Definitely a business trip." Boring?! He couldn’t have been more wrong. If he only knew about the countless meetings throughout the year where I waved my hands at my great boss and explained again and again how fantastic this summit is and how much I learned last year. One by one, the drops of water began eating away at the stone. He finally approved of my trip just to stop me from torturing him. Time moves as slow as a turtle when you are waiting for something. Time runs as fast as a cheetah when you are there. PASS has come...and passed. It’s been an amazing week. Enormous sqlenergy has filled the city, filled the convention center and the surrounding pubs and restaurants. There were awesome speakers, great content, and the chance to meet most inspiring database professionals from all over the world. Some sessions were unforgettable. Imagine a fully packed room with more than 500 people in awed silence, catching each and every one of Paul Randall's words. His tremendous energy and deep knowledge were truly thrilling. No words can describe Rob Farley's unique presentation style, captivating and engaging the audience. When the precious session minutes were over, I could tell that the many random puzzle pieces of information that his listeners knew had been suddenly combined into a clear, cohesive picture. I was amazed as always by Paul White's great sense of humor and his phenomenal ability to explain complicated concepts in a simple way. The keynote by the brilliant Dr. DeWitt from Microsoft in front of the full summit audience of 5000 deeply listening people was genuinely breathtaking. The entire conference throughout offered excellent speakers who inspired me to absorb the knowledge and use it when I got home. To my great surprise, I found that there are other people in this world who like replication as much I do. During the Birds of a Feather Luncheon, SQL Server MVP Ted Krueger was writing a script for replicating the food to other tables. I learned many things at PASS, and not all of them were about SQL. After three summits, this time I finally got the knack of networking. I actually went up and spoke to people, and believe me, that was not easy for an introvert. But this is what the summit is all about. Sqlpeople. They are the ones who make it such an exciting experience. I will be looking forward to the next year. Till then I have my notes and new ideas. How long was the summit? Thousands of unforgettable moments.

    Read the article

  • Wide gap in my resume as a Java developer. What are must-have skills required to get hired those days? [closed]

    - by OnlineAlien
    For some legal reasons I haven't worked for anybody for the last 12 years. I am a java web developer or at least I am thinking so. For this period I have been working on my project- some sort of business network - and I did few small jobs, so right now I feel I am far behind in terms of my skills and the skills needed today. I lingered too long on Struts and Hibernate and thought that could the job for my project. I need to get a job, right now, so I am spending most of my time brushing my skills. My question is: What are the current necessary skills that could convince employers to hire me regardless of my past employment or the lack of it. Right now I am on AspectJ, IoC and Spring Thanks

    Read the article

  • Getting segmentaion fault after destructor

    - by therealsquiggy
    I'm making a small file reading and data validation program as part of my TAFE (a tertiary college) course, This includes checking and validating dates. I decided that it would be best done with a seperate class, rather than integrating it into my main driver class. The problem is that I'm getting a segmentation fault(core dumped) after my test program runs. Near as I can tell, the error occurs when the program terminates, popping up after the destructor is called. So far I have had no luck finding the cause of this fault, and was hoping that some enlightened soul might show me the error of my ways. date.h #ifndef DATE_H #define DATE_H #include <string> using std::string; #include <sstream> using std::stringstream; #include <cstdlib> using std::exit; #include <iostream> using std::cout; using std::endl; class date { public: explicit date(); ~date(); bool before(string dateIn1, string dateIn2); int yearsBetween(string dateIn1, string dateIn2); bool isValid(string dateIn); bool getDate(int date[], string dateIn); bool isLeapYear(int year); private: int days[]; }; #endif date.cpp #include "date.h" date::date() { days[0] = 31; days[1] = 28; days[2] = 31; days[3] = 30; days[4] = 31; days[5] = 30; days[6] = 31; days[7] = 31; days[8] = 30; days[9] = 31; days[10] = 30; days[11] = 31; } bool date::before(string dateIn1, string dateIn2) { int date1[3]; int date2[3]; getDate(date1, dateIn1); getDate(date2, dateIn2); if (date1[2] < date2[2]) { return true; } else if (date1[1] < date2[1]) { return true; } else if (date1[0] < date2[0]) { return true; } return false; } date::~date() { cout << "this is for testing only, plox delete\n"; } int date::yearsBetween(string dateIn1, string dateIn2) { int date1[3]; int date2[3]; getDate(date1, dateIn1); getDate(date2, dateIn2); int years = date2[2] - date1[2]; if (date1[1] > date2[1]) { years--; } if ((date1[1] == date2[1]) && (date1[0] > date2[1])) { years--; } return years; } bool date::isValid(string dateIn) { int date[3]; if (getDate(date, dateIn)) { if (date[1] <= 12) { int extraDay = 0; if (isLeapYear(date[2])) { extraDay++; } if ((date[0] + extraDay) <= days[date[1] - 1]) { return true; } } } else { return false; } } bool date::getDate(int date[], string dateIn) { string part1, part2, part3; size_t whereIs, lastFound; whereIs = dateIn.find("/"); part1 = dateIn.substr(0, whereIs); lastFound = whereIs + 1; whereIs = dateIn.find("/", lastFound); part2 = dateIn.substr(lastFound, whereIs - lastFound); lastFound = whereIs + 1; part3 = dateIn.substr(lastFound, 4); stringstream p1(part1); stringstream p2(part2); stringstream p3(part3); if (p1 >> date[0]) { if (p2>>date[1]) { return (p3>>date[2]); } else { return false; } return false; } } bool date::isLeapYear(int year) { return ((year % 4) == 0); } and Finally, the test program #include <iostream> using std::cout; using std::endl; #include "date.h" int main() { date d; cout << "1/1/1988 before 3/5/1990 [" << d.before("1/1/1988", "3/5/1990") << "]\n1/1/1988 before 1/1/1970 [" << d.before("a/a/1988", "1/1/1970") <<"]\n"; cout << "years between 1/1/1988 and 1/1/1998 [" << d.yearsBetween("1/1/1988", "1/1/1998") << "]\n"; cout << "is 1/1/1988 valid [" << d.isValid("1/1/1988") << "]\n" << "is 2/13/1988 valid [" << d.isValid("2/13/1988") << "]\n" << "is 32/12/1988 valid [" << d.isValid("32/12/1988") << "]\n"; cout << "blerg\n"; } I've left in some extraneous cout statements, which I've been using to try and locate the error. I thank you in advance.

    Read the article

  • Getting segmentation fault after destructor

    - by therealsquiggy
    I'm making a small file reading and data validation program as part of my TAFE (a tertiary college) course, This includes checking and validating dates. I decided that it would be best done with a seperate class, rather than integrating it into my main driver class. The problem is that I'm getting a segmentation fault(core dumped) after my test program runs. Near as I can tell, the error occurs when the program terminates, popping up after the destructor is called. So far I have had no luck finding the cause of this fault, and was hoping that some enlightened soul might show me the error of my ways. date.h #ifndef DATE_H #define DATE_H #include <string> using std::string; #include <sstream> using std::stringstream; #include <cstdlib> using std::exit; #include <iostream> using std::cout; using std::endl; class date { public: explicit date(); ~date(); bool before(string dateIn1, string dateIn2); int yearsBetween(string dateIn1, string dateIn2); bool isValid(string dateIn); bool getDate(int date[], string dateIn); bool isLeapYear(int year); private: int days[]; }; #endif date.cpp #include "date.h" date::date() { days[0] = 31; days[1] = 28; days[2] = 31; days[3] = 30; days[4] = 31; days[5] = 30; days[6] = 31; days[7] = 31; days[8] = 30; days[9] = 31; days[10] = 30; days[11] = 31; } bool date::before(string dateIn1, string dateIn2) { int date1[3]; int date2[3]; getDate(date1, dateIn1); getDate(date2, dateIn2); if (date1[2] < date2[2]) { return true; } else if (date1[1] < date2[1]) { return true; } else if (date1[0] < date2[0]) { return true; } return false; } date::~date() { cout << "this is for testing only, plox delete\n"; } int date::yearsBetween(string dateIn1, string dateIn2) { int date1[3]; int date2[3]; getDate(date1, dateIn1); getDate(date2, dateIn2); int years = date2[2] - date1[2]; if (date1[1] > date2[1]) { years--; } if ((date1[1] == date2[1]) && (date1[0] > date2[1])) { years--; } return years; } bool date::isValid(string dateIn) { int date[3]; if (getDate(date, dateIn)) { if (date[1] <= 12) { int extraDay = 0; if (isLeapYear(date[2])) { extraDay++; } if ((date[0] + extraDay) <= days[date[1] - 1]) { return true; } } } else { return false; } } bool date::getDate(int date[], string dateIn) { string part1, part2, part3; size_t whereIs, lastFound; whereIs = dateIn.find("/"); part1 = dateIn.substr(0, whereIs); lastFound = whereIs + 1; whereIs = dateIn.find("/", lastFound); part2 = dateIn.substr(lastFound, whereIs - lastFound); lastFound = whereIs + 1; part3 = dateIn.substr(lastFound, 4); stringstream p1(part1); stringstream p2(part2); stringstream p3(part3); if (p1 >> date[0]) { if (p2>>date[1]) { return (p3>>date[2]); } else { return false; } return false; } } bool date::isLeapYear(int year) { return ((year % 4) == 0); } and Finally, the test program #include <iostream> using std::cout; using std::endl; #include "date.h" int main() { date d; cout << "1/1/1988 before 3/5/1990 [" << d.before("1/1/1988", "3/5/1990") << "]\n1/1/1988 before 1/1/1970 [" << d.before("a/a/1988", "1/1/1970") <<"]\n"; cout << "years between 1/1/1988 and 1/1/1998 [" << d.yearsBetween("1/1/1988", "1/1/1998") << "]\n"; cout << "is 1/1/1988 valid [" << d.isValid("1/1/1988") << "]\n" << "is 2/13/1988 valid [" << d.isValid("2/13/1988") << "]\n" << "is 32/12/1988 valid [" << d.isValid("32/12/1988") << "]\n"; cout << "blerg\n"; } I've left in some extraneous cout statements, which I've been using to try and locate the error. I thank you in advance.

    Read the article

  • ASP MVC 2: Error with dropdownlist on POST

    - by wh0emPah
    Okay i'm new to asp mvc2 and i'm experiencing some problems with the htmlhelper called Html.dropdownlistfor(); I want to present the user a list of days in the week. And i want the selected item to be bound to my model. I have created this little class to generate a list of days + a short notation which i will use to store it in the database. public static class days { public static List<Day> getDayList() { List<Day> daylist = new List<Day>(); daylist.Add(new Day("Monday", "MO")); daylist.Add(new Day("Tuesday", "TU")); // I left the other days out return daylist; } public class Dag{ public string DayName{ get; set; } public string DayShortName { get; set; } public Dag(string name, string shortname) { this.DayName= name; this.DayShortName = shortname; } } } I really have now idea if this is the correct way to do it Then i putted this in my controller: SelectList _list = new SelectList(Days.getDayList(), "DayShortName", "DayName"); ViewData["days"] = _list; return View(""); I have this line in my model public string ChosenDay { get; set; } And this in my view to display the list: <div class="editor-field"> <%: Html.DropDownListFor(model => model.ChosenDay, ViewData["days"] as SelectList, "--choose Day--")%> </div> Now this all works perfect. On the first visit, But then when i'm doing a [HttpPost] Which looks like the following: [HttpPost] public ActionResult Registreer(EventRegistreerViewModel model) { // I removed some unrelated code here // The code below executes when modelstate.isvalid == false SelectList _list = new SelectList(Days.getDayList(), "DayShortName", "DayName"); ViewData["days"] = _list; return View(model); } Then i will have the following exception thrown: The ViewData item that has the key 'ChosenDay' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'. This errors gets thrown at the line in my view where i display the dropdown list. I really have no idea how to solve this and tried several solutions i found online. but none of them really worked. Ty in advance!

    Read the article

  • datediff rounding

    - by derekcohen
    I have a db table in SQL Server which contains a start date for a project. On a web status page I want to show how many days/weeks/months the project has run, the units depending on the duration. So under 21 days I'd show days, under 7 weeks I'd show weeks, otherwise show completed months. So I get the days, weeks and months values and can then use some code to decide which one to display. Suppose the project starts on 30 Dec 2010 and I'm checking today (27 Feb 2011). select datediff(d,'30 Dec 2010',getdate()) as days, datediff(wk,'30 Dec 2010',getdate()) as weeks , datediff(m,'30 Dec 2010',getdate())as months produces days: 59 weeks: 9 months: 2 But in fact the difference is 8 whole weeks and some rounding takes place. I've tried doing it in ASP as well, getting the start date and then doing the datediff() but it's no better. Is there a better way? thanks

    Read the article

  • Changing a select input to a checkbox acting as an on/off toggle switch in Rails

    - by Ribena
    I have a set of 7 dropdown inputs allowing admins to say whether they are open or closed for business on a given day. I'd like that changed to 7 open/closed switches (presumably styled checkboxes?) but can't figure out how to do this! Here are the relevant bits of code I currently have (prior to any change): app/view/backend/inventory_pool/edit.html.haml - content_for :title, @inventory_pool = form_for [:backend, @inventory_pool], html: {name: "form"} do |f| .content - if is_admin? %a.button{:href => root_path}= _("Cancel") %button.button{:type => :submit}= _("Save %s") % _("Inventory Pool") %section %h2= _("Basic Information") .inner .field.text .key %h3= "#{_("Print Contracts")}" %p.description .value .input %input{type: "checkbox", name: "inventory_pool[print_contracts]", checked: @inventory_pool.print_contracts} %section#workdays %h2= _("Workdays") .inner - [1,2,3,4,5,6,0].each do |i| .field.text .key %h3= "#{I18n.t('date.day_names')[i]}" .value .input %select{:name => "store[workday_attributes][workdays][]"} %option{:label => _("Open"), :value => Workday::WORKDAYS[i]}= _("Open") %option{:label => _("Closed"), :value => "", :selected => @store.workday.closed_days.include?(i) ? true : nil}= _("Closed") app/models/workday.rb class Workday < ActiveRecord::Base belongs_to :inventory_pool WORKDAYS = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"] def is_open_on?(date) return false if date.nil? case date.wday when 1 return monday when 2 return tuesday when 3 return wednesday when 4 return thursday when 5 return friday when 6 return saturday when 0 return sunday else return false #Should not be reached end end def closed_days days = [] days << 0 unless sunday days << 1 unless monday days << 2 unless tuesday days << 3 unless wednesday days << 4 unless thursday days << 5 unless friday days << 6 unless saturday days end def workdays=(wdays) WORKDAYS.each {|workday| write_attribute(workday, wdays.include?(workday) ? true : false)} end end And in app/controllers/backend/inventory_pools_controller I have this (abridged): def update @inventory_pool ||= InventoryPool.find(params[:id]) process_params params[:inventory_pool] end def process_params ip ip[:print_contracts] ||= "false" # unchecked checkboxes are *not* being sent ip[:workday_attributes][:workdays].delete "" if ip[:workday_attributes] end

    Read the article

  • SQLAuthority News – Microsoft SQL Server 2005/2008 Query Optimization & Performance Tuning Training

    - by pinaldave
    Last 3 days to register for the courses. This is one time offer with big discount. The deadline for the course registration is 5th May, 2010. There are two different courses are offered by Solid Quality Mentors 1) Microsoft SQL Server 2005/2008 Query Optimization & Performance Tuning – Pinal Dave Date: May 12-14, 2010 Price: Rs. 14,000/person for 3 days Discount Code: ‘SQLAuthority.com’ Effective Price: Rs. 11,000/person for 3 days 2) SharePoint 2010 – Joy Rathnayake Date: May 10-11, 2010 Price: Rs. 11,000/person for 3 days Discount Code: ‘SQLAuthority.com’ Effective Price: Rs. 8,000/person for 2 days Download the complete PDF brochure. To register, either send an email to [email protected] or call +91 95940 43399. Feel free to drop me an email at pinal “at” SQLAuthority.com for any additional information and clarification. Training Venue: Abridge Solutions, #90/B/C/3/1, Ganesh GHR & MSY Plaza, Vittalrao Nagar, Near Image Hospital, Madhapur, Hyderabad – 500 081. Additionally there is special program of SolidQ India Insider. This is only available to first few registrants of the courses only. Read more details about the course here. Read my TechEd India 2010 experience here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, SQL Training, SQLAuthority News, T SQL, Technology

    Read the article

  • Converting Openfire IM datetime values in SQL Server to / from VARCHAR(15) and DATETIME data types

    - by Brian Biales
    A client is using Openfire IM for their users, and would like some custom queries to audit user conversations (which are stored by Openfire in tables in the SQL Server database). Because Openfire supports multiple database servers and multiple platforms, the designers chose to store all date/time stamps in the database as 15 character strings, which get converted to Java Date objects in their code (Openfire is written in Java).  I did some digging around, and, so I don't forget and in case someone else will find this useful, I will put the simple algorithms here for converting back and forth between SQL DATETIME and the Java string representation. The Java string representation is the number of milliseconds since 1/1/1970.  SQL Server's DATETIME is actually represented as a float, the value being the number of days since 1/1/1900, the portion after the decimal point representing the hours/minutes/seconds/milliseconds... as a fractional part of a day.  Try this and you will see this is true:     SELECT CAST(0 AS DATETIME) and you will see it returns the date 1/1/1900. The difference in days between SQL Server's 0 date of 1/1/1900 and the Java representation's 0 date of 1/1/1970 is found easily using the following SQL:   SELECT DATEDIFF(D, '1900-01-01', '1970-01-01') which returns 25567.  There are 25567 days between these dates. So to convert from the Java string to SQL Server's date time, we need to convert the number of milliseconds to a floating point representation of the number of days since 1/1/1970, then add the 25567 to change this to the number of days since 1/1/1900.  To convert to days, you need to divide the number by 1000 ms/s, then by  60 seconds/minute, then by 60 minutes/hour, then by 24 hours/day.  Or simply divide by 1000*60*60*24, or 86400000.   So, to summarize, we need to cast this string as a float, divide by 86400000 milliseconds/day, then add 25567 days, and cast the resulting value to a DateTime.  Here is an example:   DECLARE @tmp as VARCHAR(15)   SET @tmp = '1268231722123'   SELECT @tmp as JavaTime, CAST((CAST(@tmp AS FLOAT) / 86400000) + 25567 AS DATETIME) as SQLTime   To convert from SQL datetime back to the Java time format is not quite as simple, I found, because floats of that size do not convert nicely to strings, they end up in scientific notation using the CONVERT function or CAST function.  But I found a couple ways around that problem. You can convert a date to the number of  seconds since 1/1/1970 very easily using the DATEDIFF function, as this value fits in an Int.  If you don't need to worry about the milliseconds, simply cast this integer as a string, and then concatenate '000' at the end, essentially multiplying this number by 1000, and making it milliseconds since 1/1/1970.  If, however, you do care about the milliseconds, you will need to use DATEPART to get the milliseconds part of the date, cast this integer to a string, and then pad zeros on the left to make sure this is three digits, and concatenate these three digits to the number of seconds string above.  And finally, I discovered by casting to DECIMAL(15,0) then to VARCHAR(15), I avoid the scientific notation issue.  So here are all my examples, pick the one you like best... First, here is the simple approach if you don't care about the milliseconds:   DECLARE @tmp as VARCHAR(15)   DECLARE @dt as DATETIME   SET @dt = '2010-03-10 14:35:22.123'   SET @tmp = CAST(DATEDIFF(s, '1970-01-01 00:00:00' , @dt) AS VARCHAR(15)) + '000'   SELECT @tmp as JavaTime, @dt as SQLTime If you want to keep the milliseconds:   DECLARE @tmp as VARCHAR(15)   DECLARE @dt as DATETIME   DECLARE @ms as int   SET @dt = '2010-03-10 14:35:22.123'   SET @ms as DATEPART(ms, @dt)   SET @tmp = CAST(DATEDIFF(s, '1970-01-01 00:00:00' , @dt) AS VARCHAR(15))           + RIGHT('000' + CAST(@ms AS VARCHAR(3)), 3)   SELECT @tmp as JavaTime, @dt as SQLTime Or, in one fell swoop:   DECLARE @dt as DATETIME   SET @dt = '2010-03-10 14:35:22.123'   SELECT @dt as SQLTime     , CAST(DATEDIFF(s, '1970-01-01 00:00:00' , @dt) AS VARCHAR(15))           + RIGHT('000' + CAST( DATEPART(ms, @dt) AS VARCHAR(3)), 3) as JavaTime   And finally, a way to simply reverse the math used converting from Java date to SQL date. Note the parenthesis - watch out for operator precedence, you want to subtract, then multiply:   DECLARE @dt as DATETIME   SET @dt = '2010-03-10 14:35:22.123'   SELECT @dt as SQLTime     , CAST(CAST((CAST(@dt as Float) - 25567.0) * 86400000.0 as DECIMAL(15,0)) as VARCHAR(15)) as JavaTime Interestingly, I found that converting to SQL Date time can lose some accuracy, when I converted the time above to Java time then converted  that back to DateTime, the number of milliseconds is 120, not 123.  As I am not interested in the milliseconds, this is ok for me.  But you may want to look into using DateTime2 in SQL Server 2008 for more accuracy.

    Read the article

  • BPM Business Value Patterns

    - by JuergenKress
    Together with Matthias Ziegler from Accenture we presented the BPM Business Value Patterns at the SOA & BPM Integration Days in Germany in October: BPM Business Value Patterns View more presentations by Jürgen Kress Please visit the website http://soa-bpm-days.de/  for the next SOA & BPM Integration Days III February 29th & March 1st in Munich If you'd like to learn more please feel free to contact us any time: Matthias Ziegler Jürgen Kress For regular information on Oracle SOA Suite become a member of the SOA Partner Community. To register please visit  www.oracle.com/goto/emea/soa (OPN account required) Blog Twitter LinkedIn Mix Forum Technorati Tags: Matthias Ziegler,Jürgen Kress,SOA & BPM Integration Days,BPM,BPM Value Patterns,BPM ROI,Oracle,OPN,Accenture

    Read the article

  • Mix metrics for April 5, 2010

    - by tim.bonnemann
    Our latest numbers... Registered Mix users (weekly growth) 61,374 (+0.6%) Active users (percent of total) Last 30 days: 4,317 (7.0%) Last 60 days: 8,638 (14.1%) Last 90 days: 12,481 (20.3%) Traffic (30-day) Visits: 11,893 Page views: 65,880 Twitter Followers: 3,169 List mentions: 146 User-generated content (30-day) New ideas: 36 New questions: 57 New comments: 394 Groups There are currently 1,402 Mix groups (requires login).

    Read the article

  • Mix metrics for March 22, 2010

    - by tim.bonnemann
    Mix hit another major milestone this past week, surpassing 60,000 registered members. Registered Mix users (weekly growth) 60,662 (+0.8%) Active users (percent of total) Last 30 days: 4,571 (7.5%) Last 60 days: 8,945 (14.7%) Last 90 days: 11,479 (18.9%) Traffic (30-day) Visits: 12,371 Page views: 70,896 Twitter Followers: 3,117 List mentions: 146 User-generated content (30-day) New ideas: 32 New questions: 74 New comments: 378 Groups There are currently 1,394 Mix groups (requires login).

    Read the article

  • Merry Christmas and Happy new year everyone and bye bye we meet again soon as possible

    - by anirudha
    few days ago i plan that i enjoy this cold days with my family so i decide that i go their and enjoy Christmas even i am Hindus no problem. so those days i stop everything relate to my daily technical life routine. because on Christmas and  new year i never meet you so Merry Christmas  and Happy new year to all [ friends , relative and all guys who know me or  even not] bye bye take care i come again as soon as possible.

    Read the article

  • WebCenter Workshops and Seminars

    - by rituchhibber
    The following workshops and eSeminars are already scheduled. You are allowed to forward eSeminars and events with registration links to any interested Oracle partner or consulting employee. If links are missing, please contact the organizer to be invited for this workshop (and get a registration link). Oracle WebCenter Content Foundation October 16-18, 2012: Colombes, France Oracle ADF Foundation October 10 -12, 2012: Colombes, Paris, France WebCenter Content Management Webcenter Content Manager 11g Workshop (3 days to nominated partners) Oracle Image Process Mgmt I/PM Foundation WS (3 days to nominated partners) WebCenter Sites November 20th - 22nd, 2012: Madrid, Spain ADF - Oracle Application Development Framework ADF 11g Foundation Workshop (3 days to nominated partners) ADF 11g Advanced Workshop (4 days to nominated partners)

    Read the article

  • svn usage advice

    - by AngeloBad
    I need an advice about SVN usage. I use Tortoise SVN on my client to deal with a project I am working on. The probjem is that I have two set of bugs top fix on the project. One to deploy till 5 days, and one to deploy till 10 days. I am going to solve all the bugs before the 5fth days but I do not want to deploy the last 5 before the release date (till 10 days). How can I work on two separate codes and the merge all the modification? Is it possible? I have to create a branch?

    Read the article

  • Mix metrics for June 14, 2010

    - by tim.bonnemann
    We've been busy working on a few improvements to Mix which we plan to roll out over the coming weeks. In the meantime, here are our latest community metrics once again: Registered Mix users (weekly growth) 64,769 (+0.9%) Active users (percent of total) Last 30 days: 4,682 (7.2%) Last 60 days: 8,251 (12.7%) Last 90 days: 11,936 (18.4%) Traffic (30-day) Visits: 13,674 Page views: 77,808 Twitter Followers: 3,451 List mentions: 205 User-generated content (30-day) New ideas: 29 New questions: 38 New comments: 167 Groups There are currently 1,440 Mix groups (requires login).

    Read the article

  • moore's law and quadratic algorithm

    - by damon
    I was going thru a video (from coursera - by sedgewick) in which he argues that you cannot sustain Moore's law using a quadratic algorithm.He elaborates like this In year 197* you build a computer of power X ,and need to count N objects.This takes M days According to Moore's law,you have a computer of power 2X after 1.5 years.But now you have 2N objects to count. If you use a quadratic algorithm, In year 197*+1.5 ,it takes (4M)/2 = 2M days 4M because the algorithm is quadratic,and division by 2 because of doubling computer power. I find this hard to understand.I tried to work thru this as below To count N objects using comp=X , it takes M days. -> N/X = M After 1.5 yrs ,you need to count 2N objects using comp=2X -> 2N/(2X) -> N/X -> M days where do I go wrong? can someone please help me understand?

    Read the article

  • Set and Verify the Retention Value for Change Data Capture

    - by AllenMWhite
    Last summer I set up Change Data Capture for a client to track changes to their application database to apply those changes to their data warehouse. The client had some issues a short while back and felt they needed to increase the retention period from the default 3 days to 5 days. I ran this query to make that change: sp_cdc_change_job @job_type='cleanup', @retention=7200 The value 7200 represents the number of minutes in a period of 5 days. All was well, but they recently asked how they can verify...(read more)

    Read the article

  • Excel Pivot Tables -- Divide Numerical Column Data into Ranges

    - by ktm5124
    Hi, I have an Excel spreadsheet with a column called "Time Elapsed" that stores the number of days it took to complete a task. I would like to make a pivot table out of this spreadsheet where I divide the "Time Elapsed" column into ranges, e.g., how many tasks took 0 to 4 days to complete how many tasks took 5 to 9 days how many took 10 to 14 days how many took 15+ days Do I have to create new columns in my spreadsheet dedicated to each interval (0 to 4, 5 to 9, etc.) or can I use some feature of pivot tables to separate my one "Time Elapsed" column into intervals? Thanks in advance.

    Read the article

  • Mix metrics for June 20, 2011

    - by tbonnema
    One of the busiest week's ever for Mix this past week, thanks to Suggest-a-Session contest, which just wrapped up at midnight Pacific last night. See for yourself: Registered Mix users (weekly growth) 76,378 (+1.7%) Active users (percent of total) Last 30 days: 4,383 (5.7%) Last 60 days: 5,232 (6.9%) Last 90 days: 6,240 (8.2%) Traffic (30-day) Visits: 17,368 Page views: 148,426 Twitter Followers: 7,116 List mentions: 380 User-generated content (30-day) New ideas: 10 New questions: 11 New comments: 30 New group messages: 34 New direct messages: 1,661 Groups There are currently 1,603 Mix groups (requires login).

    Read the article

  • Applying the Knuth-Plass algorithm (or something better?) to read two books with different length and amount of chapters in parallel

    - by user147133
    I have a Bible reading plan that covers the whole Bible in 180 days. For the most of the time, I read 5 chapters in the Old Testament and 1 or 2 (1.5) chapters in the New Testament each day. The problem is that some chapters are longer than others (for example Psalm 119 which is 7 times longer than a average chapter in the Bible), and the plan I'm following doesn't take that in count. I end up with some days having a lot more to read than others. I thought I could use programming to make myself a better plan. I have a datastructure with a list of all chapters in the bible and their length in number of lines. (I found that the number of lines is the best criteria, but it could have been number of verses or number of words as well) I then started to think about this problem as a line wrap problem. Think of a chapter like a word, a day like a line and the whole plan as a paragraph. The "length" of a word (a chapter) is the number of lines in that chapter. I could then generate the best possible reading plan by applying a simplified Knuth-Plass algorithm to find the best breakpoints. This works well if I want to read the Bible from beginning to end. But I want to read a little from the new testament each day in parallel with the old testament. Of course I can run the Knuth-Plass algorithm on the Old Testament first, then on the New Testament and get two separate plans. But those plans merged is not a optimal plan. Worst-case days (days with extra much reading) in the New Testament plan will randomly occur on the same days as the worst-case days in the Old Testament. Since the New Testament have about 180*1.5 chapters, the plan is generally to read one chapter the first day, two the second, one the third etc... And I would like the plan for the Old Testament to compensate for this alternating length. So I will need a new and better algorithm, or I will have to use the Knuth-Plass algorithm in a way that I've not figured out. I think this could be a interesting and challenging nut for people interested in algorithms, so therefore I wanted to see if any of you have a good solution in mind.

    Read the article

  • Set and Verify the Retention Value for Change Data Capture

    - by AllenMWhite
    Last summer I set up Change Data Capture for a client to track changes to their application database to apply those changes to their data warehouse. The client had some issues a short while back and felt they needed to increase the retention period from the default 3 days to 5 days. I ran this query to make that change: sp_cdc_change_job @job_type='cleanup', @retention=7200 The value 7200 represents the number of minutes in a period of 5 days. All was well, but they recently asked how they can verify...(read more)

    Read the article

  • Apply email retention policy to Inbox but not subfolders?

    - by NaOH
    Our official email policy states that email older than 90 days in the Inbox is moved to Deleted Items, not including subfolders of the Inbox. This wasn't a problem to implement in Exchange 2003. In 2010, however, it appears that Policy Tags applied to the Inbox also apply to its subfolders. How can I prevent this from occuring? EDIT: Here is the output of Get-RetentionPolicy: RunspaceId : b6a05d43-3e56-4348-9d0e-2d2bf7e6c283 RetentionId : 56417b54-af3b-4c14-bd3c-9dcf9bdd133e RetentionPolicyTagLinks : {Junk E-mail - 7 Days, Deleted Items - 7 Days, Sent Items - 90 Days, Inbox - 90 Days} AdminDisplayName : ExchangeVersion : 1.0 (0.0.0.0) Name : Default Company Policy DistinguishedName : CN=Default Company Policy,CN=Retention Policies Container,CN=Company,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=com Identity : Default Company Policy Guid : 56417b54-af3b-4c14-bd3c-9dcf9bdd133e ObjectCategory : domain.com/Configuration/Schema/ms-Exch-Mailbox-Recipient-Template ObjectClass : {top, msExchRecipientTemplate, msExchMailboxRecipientTemplate} WhenChanged : 2/8/2013 2:18:11 PM WhenCreated : 2/8/2013 2:11:18 PM WhenChangedUTC : 2/8/2013 10:18:11 PM WhenCreatedUTC : 2/8/2013 10:11:18 PM OrganizationId : OriginatingServer : server.domain.com IsValid : True

    Read the article

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