EmEditor - How to navigate to the next difference when doing a file compare - compare

I am using EmEditor to compare two 2.8 GB files and cannot for the life of me figure out how to navigate from one line to the next were differences exist between the two files. There are almost 8 million rows, so scrolling or paging down to find the next highlighted line would be incredibly painful.
Thanks

To go to the next change, select Next Change on the Compare menu, or press F7. To go to the previous change, select Previous Change on the Compare menu, or press Shift+F7.

Related

Google Sheets hours worked before and after specified time

I am trying to specify a time that starts a shift premium for a time card. I was so happy I finally figured out how to get it, but then I changed a time to a first shift time and thats when I lost all hope. I have spent hours messing with this and my current formula's looks like
x1.05
=IF(COUNT(A20:B20)=2,MOD($B$18-A20,1)*24,"")
x1.1
=IF(COUNT(A20:B20)=2,MOD(B20-$B$18,1)*24,"")
My end goal is to have it so first shift (7am - 3pm) fall under base pay, 2nd shift (4pm-12am) fall under x1.05 and anything past 12am falls under x1.1
Just getting this far has been a mind blower for me and any help would be greatly appreciated.
I have moved this to its own sheet to share with everyone. I am still playing with things myself and trying different things, but on the sheet I have included the variables along with the wording of the contract that effects the pay scale. NOTE the times I originally provided were just examples from the top of my head.
My Sheet
It doesn't look like your current sheet accounts for the multiple criteria you're wanting to evaluate. First shift (x1) begins at 7; second shift (x1.05) begins at 15:00, and third shift (x1.10) begins at 24:00.
I added each of those directly above the columns they affect and used this formula for the Base column:
=IF(COUNT($A20:$B20)=2,IF($A20<F$18,(MOD(MIN(F$18,$B20)-$A20,1))*24,0),"")
...this for the x1.05 column:
=IF(COUNT($A20:$B20)=2,IF($A20<G$18,(MOD(MIN(G$18,$B20)-$A20,1)*24)-E20,0),"")
...and this for the x1.10 column:
=IF(COUNT($A20:$B20)=2,(MOD(MIN(E$18+1,$B20)-$A20,1)*24)-SUM(E20:F20),"")
So far, it's working as expected. One thing I didn't add into it is to account for someone who starts their shift before 7 a.m. If you want this to be included in the x1.10 column, you could add a calculation for that to the formula there.
Here's what it looks like:
I'm working in Excel, but these formulas should all work in Google Sheets as well.

How change the order of overlapping line in line chart Power BI

When we want to emphasize one line with different color (my case "green"),
set the rest of the lines as "grey" , like below :
But the Problem the grey one which don't want to be emphasized
covering the main line like the arrangement in Power Point "Front" or "Backward"
How to arrange the order of line to decide which one on the top that won't be hidden by another lines ?
Try the following workaround:
move the measure you want to emphasize to the top;
then save and reopen the pbix file (or simply go to another page and then back)
It should now bring the green line to the front.
Users have requested this capability as an explicit feature, but Microsoft hasn't implemented it yet, as far as I know.

Merging cells in openoffice deleting specific whitespace

Ok, so what I have is going to be 3 cells of data that I need to merge into a link to pictures in my store. What I am looking for is an easy way to do this without double clicking and cntl v pasting for 4x at 100+ lines per page...
Cell 1. Cell 2. Cell 3
Assets/ name. .jpg
Needs to be.... assets/name.jpg
This seems simple, but the problem is most of the names are 2 words and even the single word names when merged look like this...... assets/ name name .jpg
Giving me a space after/ and a space after the second name. If the "name" I am merging with has 2 or more parts I still need to keep those spaces intact or the link will not work the way it's set up currently. I may need to rename the pictures into 1 solid word just for linking purposes, but hoping to avoid an extra step.
Is there a way to merge and remove the spaces I need gone to create the link? I have done a couple pages the hard way, not fun when I have 200+ pages to do.
Any help is appreciated.
Thank you.
Jerry
It seems to me possible that an answer to a completely different Q may be of interest to you:
=TRIM(LOWER((A1))&TRIM(A2)&TRIM(A3))

How to log variable value changes to a CSV file during debug in Visual Studio 2015 C++ Project?

I am working on a war game project using legacy C++ code. Attacks appear to be functioning strangely in "extreme cases" (e.g., a combat in one game "tile" in which 5000 arrows are fired at a group of 3 regiments, one of which can be the target for any of the ~5000 potential "hits" in the course of one game turn). My task is to collate data on what is happening during a game turn.
I need to record how the value for one particular Local variable changes during the course of one game turn for any unit that comes under fire (restricting to a 'test scenario' in which only regiments in one tile are under attack).
My Visual Studio "Watch window" at the beginning of a debug session looks about like this:
Name----------------------Value------------Type
targ-----------------------011-------------short
(gUnit[011]).damage--------0---------------short
(gUnit[047]).damage--------0---------------short
(gUnit[256]).damage--------0---------------short
What this mean is: at the first breakpoint, the regiment represented in nested array gUnit[011]) has been determined to be the target ("targ") for a "hit" and the "damage" for that regiment prior to this hit is = 0.
After one loop that may change to this:
Name----------------------Value------------Type
targ-----------------------256-------------short
(gUnit[011]).damage--------3---------------short
(gUnit[047]).damage--------0---------------short
(gUnit[256]).damage--------0---------------short
Which means: after one "hit" Regiment 011 has suffered 3 damage, and now for the next hit that has been determined to occur Regiment 047 is the target. So for each cycle of the call loop, any of the potential targets can be reassigned as the target and the value of 'damage' can change. For this example of 5000 arrows fired, there could be 5000 hits (though it would be unlikely to be > 1300 hits for that many shots fired). For each hit that occurs in the span of one game turn, I need to record:
target and damage
I have breakpoints setup and I can do what I need to do manually meaning:
Advance to first call to the function that determines a hit ["MissileHit()"]
Advance again and note that value for (gUnit[011]).damage has changed from 0 to 3. /* i.e., the Regiment with the ID "011" has taken "3" damage . . . */
Repeat 5000 times for experiment ONE (and noting that, with each loop targ can change to any of the three arrays that represent the units that are under attack in the tile.
Repeat for another 7 experiments (with slightly different conditions) for phase one of testing.
Repeat for perhaps 3 or 4 more phases of testing . . .
In sum, THOUSANDS of rows with at least two columns:
targ.......damage
(as a side note, this csv will get additional columns plugged in to it after each test cycle, so the final spreadsheet will look more like this:
atkrID....Terrain....atkrExpr....atkrFatig....targID....targDamage
The end result of all this data collection being: descriptive statistics can be calculated on the various in-game variables that mediate the outcomes of attacks)
Obviously, doing this "manually" would be ridiculous.
Is there an easy way to get Visual Studio to generate csv files that will record this data for me?
I can certainly go down the path of writing scripts to run when these breakpoints execute, and fstreaming stuff into a file. But, I'm still wet-behind the ears (both with Visual Studio, C++ and developing in general!) so, I thought it worth asking if there are built in features of Visual Studio that would facilitate this.
I think the VS extension like Drop's comment would be a better path for this issue, but I think it would require the high extension knowledge, so I just provide another workaround for this issue: Add the data breakpoint and output the value to the output windows, even if you also need to copy and past the value to your files, but I think it is also convenient for you to analyze the value during debugging.
Visual Studio. Debug. How to save to a file all the values a variable has had during the duration of a run?

SAS Enhanced Editor: Submitting code block without manually highlighting

Very rarely do I ever need to submit an entire .sas file. Instead, I submit steps one at a time. This means I am constantly highlighting code.
Question: Is there a way to have SAS submit a block of code without manually highlighting it?
Scratch Work:
Emacs ESS has the "Evaluate this paragraph and step" command C-c C-p. One solution would be to use ESS instead of the Enhanced Editor. However, I am working on SAS for Windows which does not currently appear to have interactive functionality with ESS.
There is the SUBTOP command which can be used to submit the first n lines of code. However, SUBTOP does not seem to be able to submit code at an arbitrary position within the entire document.
It appears to be SAS standard practice to separate steps by a blank line. This means a block of code may be defined as the text between two non-consecutive blank lines.
I don't know of a direct way to do that. However, there are some useful options.
First off, if you're in the Enhanced Editor, you can use keys to expand/contract code blocks using the Code Folding feature.
Alt + hyphen (Alt -) folds the current block. Then, Shift+(Down Arrow) highlights the whole block (which is now one line), and F8 (or your assigned function key if different) submits that block.
Second, if you use the Program Editor, enable the feature that removes executed code from the window; then you can use SUBTOP effectively.
Third, you might consider structuring your programs differently. If you usually need to run it in pieces, each piece could be a separate program. Enterprise Guide makes this particularly easy to manage; each program gets its own output tab and log, even. One process flow = one 'old' program, with each substantial step being a separate actual program file (however you prefer to run); then you just run by right clicking the step you want to run and selecting submit.
The short answer is no, there is no way to submit a code block in SAS using a single keystroke.
Let me explain why.
A region of text is determined by two aspects of the cursor, point and mark. Point is the current position of the cursor relative to the start of the file. Mark is a variable containing a possible position of the cursor. Region is the text between the point and the mark.
Submitting a code block can be viewed as a two step process:
Select a region.
Submit the selected region to the compiler.
To bind this process to a single key requires being able to select a region using code. The process would go something as follows.
Create a command-style macro which first selects a region, probably
using the FIND command to locate the end of a block (searching for
a carriage return, line feed, "run;" statement, etc.).
Set the mark.
Move the point to the start of the region.
Select the region.
Execute the region using the SUBMIT, GSUBMIT, or END commands.
Compile the macro and bind it to a function key using the KEYS menu.
There are two problems with this.
First, there is no way to set the mark in the Enhanced Editor (EE) using code. Without a mark, a region cannot be defined and the process described above fails. The MARK command referred to by #guest applies only to the Program Editor. To see this, try pressing Ctrl+M or issuing the MARK command from the command line in the EE. You will receive the following message:
ERROR: The MARK command is not supported by the Enhanced Editor.
Second, it is unclear how to select a region using code. The documentation for all of this is disparate and incomplete. Without a way to set the mark, I did not spend too much time investigating how to select.
Tantilizingly, however, is the ability to set the mark in the EE using a keyboard macro. How or why this differs from the MARK command is beyond me. It is also possible to select a region. While a seeming lack of code commands to set mark and select prevents us from creating a single keystroke submit, keyboard macros enable us to develop a two keystoke approach.
Submitting Code
Under Tools > Options > Preferences > Results I have checked "View results as they are generated". This forces the results window to take the foreground after code is submitted.
In the KEYS screen, I have the following:
Key Definition
--- ----------
F3 clear log; end; log; wpgm;
F4 clear log; end;
When I press F3,
the log is cleared (clear log;)
the selected region is submitted (end;)
the log window is selected (log;)
the most recent program window is selected (wpgm;)
This means the results are not immediately displayed to me, depsite the Preferences setting set above. If I want to see the results, I instead press F4. This clears the log and submits the code, but does not select any other windows.
To open the KEYS screen, either type KEYS into the command line in the top left corner of the EE interface or submit dm 'KEYS';. Changes to the KEYS menu must first be saved before they take effect.
Keyboard Macros
For instructions on creating Keyboard Macros.
Select a Single Line of Code
Create a keyboard macro which does the following.
Move cursor to beginning of line
Extend selection to end of line
I have this bound to Ctrl+Enter. I may then execute a line of code using Ctrl+Enter > F3.
Manual Code Selecting/Folding
This approach requires collapsible code sections be enabled. To do this, goto Tools > Options > Enhanced Editor > General and check the 'Collapse code sections' check boxes.
Within the Keyboad Macros,
Assign a command to 'Mark current position' (Ctrl+Space).
Assign 'Toggle expand current line' (Alt+P)
Assign 'Extend selection from mark' (Alt+L)
Once this has been done, place your cursor at the end of a folding block, such as to the right of the semi-colon in a run; statment. Execute the sequence:
Mark current position
Toggle expand current line
Toggle expand current line
Extend selection from mark
A side effect of 'Toggle expand current line' is that when a code block is folded, the point moves to the beginning of the folding block. Since we set the mark at the end of the block, this allows us to define and select a region.
In terms of the keys I have assigned, this is Ctrl+Space > Alt+P > Alt+P > Alt+L. Note that Alt may remain pressed during the last three steps of this sequence so that it becomes Ctrl+Space > Alt (P-P-L). Therefore, to manually submit a folding block using the keyboard, place the cursor at the end of a block and issue Ctrl+Space > Alt (P-P-L) > F3.
Automatic Code Selection/Folding
This automatic process relies on a side-effect of the 'Toggle expand current line' keyboard macro which is described in the previous section. The manual code folding/selecting process is automated using the search function.
The overall process can be seen in two parts:
Find the end of a folding block.
Select the folding block.
Folding blocks are defined by the following.
Beginning of a block:
proc <name/options> ;
data <name/options> ;
%macro <name/options> ;
End of a block:
run;
quit;
%mend;
The semi-colon toggles the block boundary in the EE. The EE naively looks for keyword pairs. So, even though it's nonsense to the compiler, it is possible to define a data-%mend folding block.
The following gives the commands which need to be issued by a keyboard macro for each part.
I. Finding the end-of-block statement
Move cursor to beginning of line (This ensures that the folding block boundary is included in the forward search set in Step 3).
Reset search.
Set search direction to forward.
Set search to case insensitive.
Set search to ignore text in comments.
Set search to code.
Turn on regular expression mode for searching.
Set search to string \<[rqm][ue][ni][dt]*\>;
Find next occurance using the current settings.
Move cursor right (When an end-of-block statement is found, the entire word is highlighted. Moving the cursor to the right places the point at the end of the folding block, to the right of the semi-colon.).
II. Selecting the folding block
Mark current position.
Toggle expand current line. (Folds the section with the side-effect of moving the cursor to the start of the block).
Toggle expand current line. (Unfolds the selection to allow highlighting. The cursor remains at the beginning of the block).
Extend selection to mark.
I have this sequence bound to Ctrl+Shift+Enter.
Note that the search settings altered in the macro do not extend globally. That is, if you hit Ctrl+F and have 'Regular expression search' unchecked, if you again open Ctrl+F after running this macro, you will see that 'Regular expression search' remains unchecked.
Let me explain the regular expression in Step 8 because it is not immediately obvious.
The Ctrl+F dialog does not use Perl Regular Expressions. It uses something else, probably whatever regex syntax came before Perl was integreated into SAS. To see what options are available, click on the arrow beside the "Find text:" text box in the Find dialog. The options we use are given below:
\< matches the beginning of a word
\> matches the end of a word
[] matches a set of characters (via exclusive OR)
* forces 0 or more occurances of the preceeding character(s)
The regular expression \<[rqm][ue][ni][dt]*\>; means that the word must start with r, q, or m. The second character can only be u or e. The third character can only be n or i. If a fourth character exists, it must either be d or t. The last character must be ;. Therefore, only the keywords run;, quit; and mend; will be found. Words containg full or partial matches, such as ammend or treatment, are skipped.
Disadvantages to this approach
Keywords other than run;, quit; and mend; are not supported.
Folding blocks inside folding blocks are not supported. This method is not 'smart' in that it cannot discern which keyword pairs define the outer block.
People who like to put the name of their macro in the mend statement are not supported. Since the regex expression requires a semi-colon at the end, a statement of the form %mend MacroName; will be skipped over.
Based on months of research, this appears to be as complete a solution as can be developed. The lynch pin(s) needed are a code based ability to set mark and to select a region within the Enhanced Editor. If anyone knows of a way to do this, please let others know so that someone may implement the single-key-submit process outlined in the first part of this answer.
How many keystrokes and hand movements does it take in EMACS to identify and submit the code. Do you have to move your right hand off the mouse.
This following will only work in the old text editor
I am pretty sure you can write a command macro but you will need to move the cursor to the start of a paragraph and hit a function key or mouse button
You need to put a macro like the one below on a function key or mouse button
macro
mark;find <empty line> unmark;store;submit past buffer
I can submit a block of code without touching the keyboard very quickly
My right had is usually on the mouse
My index finger is on left mouse button, second finger of right mouse button
highlight code using index finger submit code without moving index finger by
using second finger which is just above the right button.
submit should be on the RMB
I found your solution to this elegant, but I had problems executing the search with you proposed text (I got error). So I changed it
from:
<[rqm][ue][ni][dt]*>;
to:
(?im)run;|quit;|mend;
which seems to do the trick for me.
DW