history

What are ways to move data older than 'Y' days to an archive/history table in MySQL?

非 Y 不嫁゛ 提交于 2019-12-11 07:19:50
问题 Looking to move data from a table A to history table B every X days for data that is Y days old and then remove the data from history table B that is older than Z days. Just exploring different ways to accomplish this. So any suggestions would be appreciated. Example for variables X - 7days Y - 60days z - 365days Thank you 回答1: CREATE PROCEDURE prc_clean_tables (Y INT, Z INT) BEGIN BEGIN TRANSACTION; DECLARE _now DATETIME; SET _now := NOW(); INSERT INTO b SELECT * FROM a WHERE timestamp <

Real time Motion History Image (MHI) in Matlab

ε祈祈猫儿з 提交于 2019-12-11 02:25:52
问题 My project was to detect human activity through stored video clips. I have used following code in order to get the Motion History Image (MHI) of the video clip. function MHI = MHI(fg) % Initialize the output, MHI a.k.a. H(x,y,t,T) MHI = fg; % Define MHI parameter T T = 15; % # of frames being considered; maximal value of MHI. % Load the first frame frame1 = fg{1}; % Get dimensions of the frames [y_max x_max] = size(frame1); % Compute H(x,y,1,T) (the first MHI) MHI{1} = fg{1} .* T; % Start

How do I obtain a list of files that changed from svn over a date range?

心不动则不痛 提交于 2019-12-11 02:11:08
问题 I'm attempting to pull a list of files that changed during a range of dates from svn. Currently I'm using something like this: svn diff -r {2009-08-10}:{2009-08-20} --summarize d:/libs/trunk Is there a better way to do this? 回答1: I suppose that my original method of programaticaly pulling data from svn is the best approach. svn diff -r {2009-08-10}:{2009-08-20} --summarize d:/libs/trunk where we are asking for a diff based on the range from the first date until the second date. We ask for the

vi input mode in R?

心已入冬 提交于 2019-12-10 20:24:34
问题 I'd like to be able to edit my R history using vi commands (e.g. ESC-/, ESC-k). I noticed a similar question here: vi input mode in command line Matlab? and tried the readline mods suggested in this post (doesn't R use readline?) but they don't work (for me). Any ideas? 回答1: The Vim-R-plugin should do the trick. I have used it in Ubuntu, MacOS, and Windows 7. The developer is great and does frequent bugfixes. To get Vim behavior in the R console you'll need to use the Conque Shell plugin,

How can I save a specified number of lines from R's history to a file?

假装没事ソ 提交于 2019-12-10 18:13:27
问题 This is a little frustrating, and I'm sure there's an easy answer. history(max.show=N) will display N lines of history on to the terminal. savehistory(file) will save a number of lines of history to a file, depending on some environment variable. What I would like to do is savehistory(file, max.show=N) To do this in one line instead of having to copy or trawl through a history file for the lines I want would make things much easier. Is there a quick function/way to save a specified number of

Is there an Ember.js equivalent to Backbone.js Router for history and hash changes?

℡╲_俬逩灬. 提交于 2019-12-10 17:09:55
问题 In Backbone.js you can use the Router to bind to # changes to navigate around a single-page HTML5 app. Is there an equivalent for Ember.js? Or have I missed something fundamental about its design? 回答1: There are plans to write a router for Ember. It will likely be integrated with the Ember StateManager. For now, you can use sproutcore-routing or another routing solution. I'm currently using sproutcore-routing successfully, but it has some limitations. 回答2: You may also want to have a look at

Etymology of the term “flag” in programming [closed]

牧云@^-^@ 提交于 2019-12-10 14:50:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Every now and then i find a boolean variable named "flag", mostly by novice programmers. I always tell them every boolean is a flag, and variables should have meaningful names. So i was wondering what is the etymology behind the term "flag". Maybe its something obvious, my guess

Git, rewriting history of master branch and associated tags

百般思念 提交于 2019-12-10 14:48:53
问题 I've just had my first experience with rewriting the history of one of my repos (using git-filter-branch). The problem is that the repo had several tags, which after rewriting seem to be completely disconnected from the resulted history. I think this is due to the fact that the history associated with the tags hasn't been rewritten, so they have to point to the old commits. So, what can I do to "apply" the tags on the new history. A little ASCII art, maybe it's easier to understand my

Concatenate the history of two Git repositories?

蹲街弑〆低调 提交于 2019-12-10 14:08:30
问题 I have an old Git repo, call it app . Then, after a year, I wanted to rebuild the app from scratch, so I made a new repo, call it app-2 . Now, I realize I should've just made a new branch or something, instead of a new repo, because I want to move the history of app-2 on top of app and then get rid of app-2 so that app now has all the history of app + app-2 . Is this possible to do? UPDATE: I tried "reseting" the app repo by removing all the files in app (except for the .git directory) and

Rationale of choosing difference new line representation by Unix, Mac, DOS/Windows?

无人久伴 提交于 2019-12-10 12:58:09
问题 Does anyone know the original rationale, or story, of the different platforms each choosing a different, yet similar to some degree, new line representation? There must be some design decisions made originally. (I don't believe this is all random choice ...) Unix/Mac OS X: LF (\n) Mac OS 9 and before: CR (\r) DOS/Windows: CRLF (\r\n) 回答1: Jeff Atwood posted on this very topic in "The Great Newline Schism" Wikipedia covers the history of newline. In short, CR+LF is a reference to the electric