How to Make the Open recent do-files list longer - stata

If one goes to the File menu of the Do-file Editor window of Stata, one sees that one of the options is Open recent do-files. Is it possible to control how many entries appear in this list? I would like to see more than the 10 that are currently there.
Within Stata, I looked in Preferences
General Preferences - Windows - Do-file Editor
in both General and Advanced and did not see a place to control this.
This question is somewhat related to the one here

This seems to be a question regarding the macOS rather than Stata. If you open up the System Preferences in you mac and navigate to the General options, you will see an option with a line starting "Recent Items: " As in the screen shot below.
If you change that setting and relaunch Stata it should work.
Unfortunately, I don't know how to do this in a Windows environment.

Related

How can I improve the usability/readability of Toad

I have installed Toad 12.8 and I had a pretty big mistake in executing code. I executed code out of sequence, despite triple checking my work. Some how the tab I had selected was unselected and another script was ran. I still wince in embarrassment a week later.
I just wanted to know if there are ways to improve usability/readability of Toad. For instance, can I highlight the tab I have selected? Can I review scripts in a viewer to showcase scripts that I have open and manage which have been executed and not?
I have changed the tab style to 'Flat Buttons', which better showcases the script you are viewing among the many you have open, but thats just 1 small change.
Anyone else have options they like to use? Im not seeing a lot of options here under View Options...
I'm on 12.5. Current tab is highlighted (i.e. has a different color than other tabs). You could, though, change the window background color (by default, it is white).
Open "Configure TOAD options" and search for "TAB", you'll find quite a few options in there.
If you want to review what you've executed, navigate to "Query Viewer" tab in the Editor window. Sort results by "Start Time" in descending order and it'll show what you executed, when, how many time was spent on it, how many rows were affected ... quite useful.
As of running code you didn't mean to: well, what can I say? I'm sorry you did that, but - after all - it is you who should pay attention to what you are doing. No highlighting will solve that problem (also know as we have met the enemy, and it is us).
Something I like to do to is to change the color of TEST vs PROD in order to make them stand out. On the session/new connection window, scroll right and you'll see a "color" column. I set PROD connections to Red and TEST to Blue. Give it a try, maybe you'll like it for a visual reminder for the environment you are working in. It will change the status bar background color so it's not that intrusive.

Control zoom in SAS Enterprise?

I'm using SAS Enterprise Guide 5.1.
My window looks like this:
The text is huge - I'd like to zoom out so I can see more of the code in my program (obviously this one is just a placeholder).
How can I control the level of zoom?
I tried using ctrl and the mouse-wheel. No luck. I've trawled through toolbar options and found nothing. The solution here requires changing Windows Settings - unfortunately that is not an option for me.
I don't think there's a dynamic zoom option. What I do is customize the font to make it smaller (and more aesthetically pleasing):
Tools
Options
SAS Programs
Editor Options
Appearance
gets you there, then select Lucida Console 9pt as your font, or whatever you find best for you.
Control-mouse wheel works as of Enterprise Guide 7.12, so ask your IT department for an upgrade!

Comparing the contents of two files in Sublime Text

I have two cloned repositories of two very similar open-source projects, which I have been working on in different instances in Sublime Text 2 to arrive at my desired result. Code from both of these projects was used. I have been using Git as version control for my project, but have not included the original projects. Thus, I would like to be able to quickly compare the contents of two files of the original project and compare the differences between them and my project.
I was hoping that Sublime Text 2 would have a "Compare File" feature, but I can't seem to find anything related to it in the settings or online. A third-party ST2 package to accomplish this task would also work well. Is such a task possible to do within the ST2 text editor?
You can actually compare files natively right in Sublime Text.
Navigate to the folder containing them through Open Folder... or
in a project
Select the two files (ie, by holding Ctrl on
Windows or ⌘ on macOS) you want to compare in the sidebar
Right click and select the Diff files... option.
Compare Side-By-Side looks like the most convenient to me though it's not the most popular:
UPD: I need to add that this plugin can freeze ST while comparing big files. It is certainly not the best decision if you are going to compare large texts.
There are a number of diff plugins available via Package Control. I've used Sublimerge Pro, which worked well enough, but it's a commercial product (with an unlimited trial period) and closed-source, so you can't tweak it if you want to change something, or just look at its internals. FileDiffs is quite popular, judging by the number of installs, so you might want to try that one out.
UPDATE (Given the upvotes, I feel there is a need for a complete step-by-step explanation...)
In the Menu bar click on File->Open Folder...
Select a folder (the actual folder does not really matter, this step is just to make the FOLDERS sidebar available)
If there is no Side Bar shown yet, make it appear via View -> Side Bar -> Show Side Bar
Use this FOLDERS-titled Side Bar to navigate to the first file you want to compare.
Select it (click on it), hold down ctrl and select the second file.
Having two files selected, right click on one of the two and select Diff Files...
There should be a new Tab now showing the comparison.
Original short answer:
Note that:
The "Diff files" only appears with the "folders" sidebar (to open a folder: File->Open Folder) , not with "open files" sidebar.
UPDATE JAN 2018 - especially for Sublime/Mac
(This is very similar to Marty F's reply, but addresses some issues from previous responses, combines several different suggestions and discusses the critical distinction that gave me problems at first.)
I'm using Sublime Text 3 (build 3143) on Mac and have been trying for about 30 minutes to find this File Compare feature. I had used it before on Sublime/Mac without any problems, but this time, it was trickier. But, I finally figured it out.
The file format does not need to be UTF-8. I have successfully compared files that are UTF-8, ISO-8559-1, and Windows-1252.
There is no File > Open Folders on Sublime/Mac. Many instructions above start with "Select File > Open Folders," but that doesn't exist on Sublime/Mac.
File compare works on a Project basis. If you want to compare two files, they must be saved to disk and part of the current project.
Ways to open a project
If Sublime/Mac is not running or if it's running but no windows are open, drag a folder onto the Sublime app.
If Sublime/Mac is running, select "File > Open", navigate to the desired folder, don't select a file or folder and click "Open".
Add a folder to a project. If the files you want to compare are not part of the same hierarchy, first open the folder containing one of the files. Then, select "Project > Add Folder to Project", navigate to the folder you want and click "Open". You will now see two root-level folders in your sidebar.
The Sidebar must be visible. You can either "View > Side Bar > Show Side Bar" or use the shortcut, Command-K, Command-B.
Files must be closed (ie, saved) to compare. Single-clicking a file in the Side Bar does not open the file, but it does display it. You can tell if a file is open if it's listed in the "Open Files" section at the top of the Side Bar. Double-clicking a file or making a modification to a file will automatically change a file's status to "Open". In this case, be sure to close it before trying to compare.
Select files from the folder hierarchy. Standard Mac shorcut here, (single) click the first file, then Command-click the second file. When you select the first file, you'll see its contents, but it's not open. Then, when you Command-click the second file, you'll see its contents, but again, neither are open. You'll notice only one tab in the editing panel.
Control-click is not the same as right-click. This was the one that got me. I use my trackpad and often resort to Control-click as a right-click or secondary-click. This does not work for me. However, since I configured my trackpad in System Preferences to use the bottom-right corner of my trackpad as a right-click, that worked, displaying the contextual menu, with "Delete", "Reveal in Finder", and.... "Diff Files..."
Voilà!
UPDATE OCTOBER 2017
I never knew this feature existed in Sublime Text, but the interface appears to have changed slightly from the previous answer - at least on OS X. Here are the detailed steps I followed:
In the Menu Bar click File -> Open...
Navigate to the FOLDER that contains the files to be compared and with the FOLDER selected, click the Open button, this makes the FOLDERS sidebar appear
In the FOLDERS sidebar, click on the first file to be compared
Hold the Ctrl on Windows or ⌘ on OS X, and click the second file
With both files selected, right click on one and select Diff Files...
This opens a new tab showing the comparison. The first file in red, the second in green.
View - Layout and View - Groups will do in latest Sublime 3
eg:
Shift+Alt+2 --> creates 2 columns
Ctrl+2 --> move selected file to column 2
This is for side by side comparison.
For actual diff, there is the diff function other already mentioned.
Unfortunately, I can't find a way to make columns scroll at the same time, which would be a nice feature.
The Diff Option only appears if the files are in a folder that is part of a Project.
Than you can actually compare files natively right in Sublime Text.
Navigate to the folder containing them through Open Folder... or in a project
Select the two files (ie, by holding Ctrl on Windows or ⌘ on macOS) you want to compare in the sidebar
Right click and select the Diff files... option.
No one is talking about Linux but all above answers will work. Just use Ctrl to select more than one file. If you are looking to compare side by side, Meld is lovely.
There's a BeyondCompare plugin as well. It opens the 2 files in a BeyondCompare window. Pretty convenient to open files from the sublime window.
You will need BC3 installation present in the system.
After installing the plugin, you will have to provide the path to the installation.
Example:
{
//Define a custom path to beyond compare
"beyond_compare_path": "G:/Softwares/Beyond Compare 3/BCompare.exe"
}

Microsoft Visual C++ 2012: cannot find basic stuff

Being new to Microsoft Visual Studio Ultimate 2012, I cannot find some basic things that I usually take for granted. It must be my fault for sure.
How can I have multiple views of the same file? So far I have been able to split the file window vertically, but just once.
Can I split it horizontally?
Can I split it more than once?
Can I just have the same file in multiple windows?
Can I do some refactoring?
Can I set bookmarks, to jump back and forth in the code?
Can I have a list of bookmarks/breakpoints?
To have multiple view of the same file go to the Window meni and select New Window This will show the file in multiple windows, which you'll be able to split.
For bookmarking go to the Edit menu and look at the Bookmark sub-menu near the bottom. It's got all the options you need for manipulating bookmarks.
For breakpoints go to the Debug menu, select the Windows sub-menu and pick the Breakpoints menu. It will display an window that allows you to manage all the breakpoint in the project you're working on.
To refactor just right-click in any file and you'll see a Refactor sub-menu that has a list of refactor actions.

App Shortcut without pinning to Start Screen in Windows 8 using C++

Our company has an installer written in C++ that creates program shortcuts using IShellLink as described in:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776891%28v=vs.85%29.aspx
On Windows 8 all shortcuts created in the Start Menu will also show as titles on the Start Screen. What we're looking to do is programmically control which icons are shown on the Start Screen. In the following article it describes the option "System.AppUserModel.StartPinOption" as:
To create add an app shortcut without pinning it to the Start screen
view, you can set the following property on the shortcut:
System.AppUserModel.StartPinOption = 1. The symbolic name for 1 is
APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL.
http://msdn.microsoft.com/en-us/library/windows/desktop/jj673981%28v=vs.85%29.aspx
This appears to be possible using the Windows Installer, however I haven't found a way to accomplish the same functionality programmatically in C++ given our context.
If anyone has any information about this, or an example of some sort, it would be much appreciated.
One thing I found was that "..NewInstall" literally means that. User customizations to the tiles seem to be retained even after you delete/update the .lnk files. This is probably a good thing as updates won't reset the user's environment, but it does mean that I needed to use fresh installs of Windows 8 during testing. I used a VM box to minimize the pain. At least I don't know how to delete the properties once set from within the environment.