search for: current_date

Displaying 13 results from an estimated 13 matches for "current_date".

2013 Apr 17
3
Creating a vector with repeating dates
Dear R forum I have a data.frame df = data.frame(dates = c("4/15/2013", "4/14/2013", "4/13/2013", "4/12/2013"), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as "Current_date", 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013,  "Current_date", 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013, Current_date, 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013 i.e. I need to create a new vector as given below which I need to use for some other purpose. Current_date 4/15/2013 4...
2009 May 08
9
Bash Script help...
...in order one after another. How do i do that so everything gets dont as the steps depend on each other. Example: cd /system_backups/ tar cvf apache-conf.tar /etc/httpd/conf/* gzip -v9 apache-conf.tar tar cvf apache-data.tar /var/www/* gzip -v9 apache-data.tar then last step... tar cvf <current_date>-system_backup.tar <all> the gzip files above gzip -v9 <current_date>-system_backup.tar scp <current_date>-system_backup.tar.gz user at 10.0.0.1:/. etc...etc.... My questions: 1. How do I execute each statement and make sure subsequent statements are not executed until the...
2006 Jun 21
3
Simple range question
I have a model with a datetime field called start_date. I''d like to do a find on the model so that it returns only records with the start_date equal to the current day. Something like this: @foos = Foo.find(:all, :conditions => //?? start_date equal to today''s date ??// ] ) Thanks in advance for any help. -------------- next part
2006 Feb 28
6
Activerecord equivalent of the SQL "SUM()" function.
...y active record object. Basically I have an object called "Report < ActiveRecord::Base" with a field called "hours" (work hours). Here''s how I access it from within my helper function: Report.find(:first, :conditions => "date = ''" << current_date.strftime("%Y-%m-%d") << "'' AND user_id = ''" << @user.id.to_s << "''") However, in some cases I want the exact same info as above, except a running total of the entire week. Here''s more or less how I''d lik...
2013 Apr 03
4
Better way of writing R code
Dear R forum, (Pl note this is not a finance problem) I have two data.frames as currency_df = data.frame(current_date = c("3/4/2013", "3/4/2013", "3/4/2013", "3/4/2013"), issue_date = c("27/11/2012", "9/12/2012", "14/01/2013", "28/02/2013"), maturity_date = c("27/04/2013", "3/5/2013", "14/6/2013", "28...
2006 Feb 08
1
Possible AGI Bug in Asterisk?
...ed $ti = time(); $dir = "/vol/recordings/"; $finame = $ti."_".$extn; $fname = $dir.$finame; $finame = $finame.".gsm"; # populate the DB with the required information # Agent, Filename, date, time # Get the Date and Time $gdate = $dbh->selectrow_array ("SELECT current_date()"); $gtime = $dbh->selectrow_array ("SELECT current_time()"); $date_time = "$gdate $gtime"; # Cross reference the Agent Phone with extension $phone = $dbh1->selectrow_array ("SELECT phone from map where extn = '$extn'"); $agent = $dbh1->selectro...
2017 Jul 25
1
Can rsync server mark deleted source files as extraneous?
...ackup, excluding the old deleted files. It could work something like this:     when rsync server notices an unmarked extraneous file, it timestamps and marks the file as extraneous.    rsync server periodically deletes extraneous files like this        if (extraneous_mark == true and timestamp > current_date - age), then delete the file    where age is number of days extraneous files are retained.        rsync client can restore deleted files from server.    rsync client can restore directory from server, excluding extraneous files.  Thank you,Wolfram Volpi -------------- next part -------------- An HT...
2006 Apr 20
0
Sqlite3 migration and CURRENT_TIMESTAMP
...ys appended to the end of the list of existing columns. Column-def may take any of the forms permissable in a CREATE TABLE statement, with the following restrictions: * The column may not have a PRIMARY KEY or UNIQUE constraint. * The column may not have a default value of CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP. * If a NOT NULL constraint is specified, then the column must have a default value other than NULL. So I can''t do this, either... Thanks, Morgan -- Posted via http://www.ruby-forum.com/.
2007 Feb 21
2
backup incremental
dear all, can anybody tell me, how to backup my data on samba?do you have a script for backup incremental? i don't understand to user rsync thank you Cyd ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html
2006 Jun 14
4
Using now() to determine what should be displayed
I''m trying to create a paginated list that will take note of the "end_date" field in my table. This is what I have: @post_pages, @posts = paginate(:posts, :per_page => 10, :order_by => ''end_date'') in the controller. And for the view: <h1>Posts ending soon</h1> <ul><% for post in @posts do %> <strong>Post Title:
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here''s the outline of the files in use: ....app ........controllers ............application_controller.rb ............rushing_offenses_controller.rb ........models ............rushing_offense.rb ....lib
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2006 Mar 13
32
DRY principle form validations
We are wondering how you''d validate a credit card number or a SSN without writing Javascript and Ruby code. Would it be through Rails'' AJAX support? -- Posted via http://www.ruby-forum.com/.