Multipad sample sources download - winapi

It is mentioned in here https://learn.microsoft.com/en-us/windows/win32/winmsg/using-the-multiple-document-interface. I have tried to search the Internet, but with no luck so far. Where do I download the sources for Multipad sample application from?

The interesting bits are in the documentation, but as a compilable sample, the MULTIPAD sample was available with Microsoft Visual C++ 1.5x (like 30 years ago).
As of today, you can find it here from Microsoft Visual C++ - Version 1.52c (Microsoft) (1995) (disclaimer: I'm not sure about the legal terms, I have the original CD Rom) and get into the MSVC15\SAMPLES\MULTIPAD directory that contains the following files:
16/09/1994 15:00 766 MP300.ICO
16/09/1994 15:00 12 531 MPFILE.C
16/09/1994 15:00 7 856 MPFIND.C
16/09/1994 15:00 4 477 MPINIT.C
16/09/1994 15:00 10 901 MPPRINT.C
16/09/1994 15:00 26 414 MULTIPAD.C
16/09/1994 15:00 558 MULTIPAD.DEF
16/09/1994 15:00 3 518 MULTIPAD.H
16/09/1994 15:00 2 681 MULTIPAD.MAK
16/09/1994 15:00 7 366 MULTIPAD.RC
16/09/1994 15:00 766 NOTE300.ICO
16/09/1994 15:00 2 977 RESOURCE.H

Related

What directories does Linux have that macOS doesn't?

I'm a Python programmer that is trying to make a system of sorts that creates save data for a game I'm making, and I want it to be in different places in something like Ubuntu than I do macOS. As I don't have a macOS, and it's impossible to just up and get an ISO to get a macOS VM, I can't look through the files and folders and see what it has (or doesn't) that Linux does or doesn't.
I've tried looking all over to the point of attempting to get a hold of an ISO to build a VM in VirtualBox, but haven't been successful at all.
What files or folders does macOS have that Linux does, or vice versa?
To complete the (excellent) answer from #Michael, here is the listing of the home and root directory after a fresh install on the latest stable release of MacOS System (10.14.2)
MacBook-Pro:~ max$ ls -al /
total 37
drwxr-xr-x 26 root wheel 832 Jan 6 19:00 .
drwxr-xr-x 26 root wheel 832 Jan 6 19:00 ..
-rw-rw-r-- 1 root admin 8196 Jan 13 07:11 .DS_Store
drwx------ 5 root admin 160 Jan 6 11:47 .Spotlight-V100
d-wx-wx-wt 2 root wheel 64 Jan 14 06:39 .Trashes
---------- 1 root admin 0 Aug 18 06:53 .file
drwx------ 11 root admin 352 Jan 14 06:39 .fseventsd
drwxr-xr-x 2 root wheel 64 Aug 18 06:53 .vol
drwxrwxr-x+ 39 root admin 1248 Nov 30 12:49 Applications
drwxr-xr-x+ 60 root wheel 1920 Nov 30 12:50 Library
drwxr-xr-x 2 root wheel 64 Aug 18 06:53 Network
drwxr-xr-x# 5 root wheel 160 Nov 30 12:46 System
drwxr-xr-x 5 root admin 160 Jan 6 18:59 Users
drwxr-xr-x+ 4 root wheel 128 Jan 14 06:39 Volumes
drwxr-xr-x# 37 root wheel 1184 Nov 30 12:55 bin
drwxrwxr-t 2 root admin 64 Aug 18 06:53 cores
dr-xr-xr-x 3 root wheel 4301 Jan 14 06:39 dev
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 Jan 14 06:40 home
-rw-r--r-- 1 root wheel 313 Aug 18 10:03 installer.failurerequests
dr-xr-xr-x 2 root wheel 1 Jan 14 06:40 net
drwxr-xr-x 6 root wheel 192 Nov 30 12:50 private
drwxr-xr-x# 64 root wheel 2048 Jan 6 18:49 sbin
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 tmp -> private/tmp
drwxr-xr-x# 9 root wheel 288 Nov 30 12:38 usr
lrwxr-xr-x# 1 root wheel 11 Jan 6 18:49 var -> private/var
And the home dir:
MacBook-Pro:~ max$ ls -al ~
total 16
drwxr-xr-x+ 15 max staff 480 Jan 14 06:43 .
drwxr-xr-x 5 root admin 160 Jan 6 18:59 ..
-r-------- 1 max staff 7 Jan 6 18:59 .CFUserTextEncoding
drwx------ 2 max staff 64 Jan 14 06:40 .Trash
-rw------- 1 max staff 0 Jan 13 07:11 .bash_history
drwx------ 10 max staff 320 Jan 14 06:40 .bash_sessions
-rw------- 1 max staff 908 Jan 14 06:43 .viminfo
drwx------+ 3 max staff 96 Jan 6 18:59 Desktop
drwx------+ 3 max staff 96 Jan 6 18:59 Documents
drwx------+ 3 max staff 96 Jan 6 18:59 Downloads
drwx------# 51 max staff 1632 Jan 13 07:11 Library
drwx------+ 3 max staff 96 Jan 6 18:59 Movies
drwx------+ 3 max staff 96 Jan 6 18:59 Music
drwx------+ 3 max staff 96 Jan 6 18:59 Pictures
drwxr-xr-x+ 4 max staff 128 Jan 6 18:59 Public
Application settings on macOS are ususally saved somewhere in ~/Library: Common places are ~/Library/Preferences/com.example.mycoolgame.plist for preferences (should be in plist format and "com.example.mycoolgame" should be a valid bundle ID that you own (you should own the domain)). The advantage/disadvantage of this path is that power users know about this directory and can edit the files there as they wish.
Then you have ~/Library/Caches for cached data. All cached data should be put somewhere under this directory. (Never use it for content that cannot be regenerated or redownloaded though.)
~/Library/ApplicationSupport/YourApplicationName/...: here you can basically do anything you like. It would be good if "YourApplicationName" would be globally unique in this case.. So better make it long. Users usually don't see the filesystem contents of anything below "~/Library", so there is no need for short names.
Of course, you can also put your savegames in ~/Documents/MyCoolGame/savegames and tell the user that you save the games there.
A gotcha (maybe): I'm not sure if system APIs expand "~" properly. I think probably not: Calling fopen with a path that starts with "~" would most likely not do the right thing. The users directory is located at something like "/Users/max", so "~" expands to "/Users/max" in the command line if the username is "max".
I can't answer your original question "What directories does Linux have that macOS doesn't?" because I don't have a Linux box at hand at the moment, and I don't think that it would be helpful for your use case.
For global data, there is also the "/Library" hierarchy.. But normal users don't have access to this place, so your game would need to ask for admin rights, which will make everything much more complicated, and this will feel user-unfriendly to macOS users. The macOS way is to have a self-contained application bundle and put all user-specific or temporary data into the appropriate place within the users home folder.

Reset/Remove .bash file versions

New to this and I believe I made duplicates or versions of the .bash_profile. I'd like to know how to make one the priority or delete those that are not active. I think its interfering with my SQL communication.
-rw------- 1 noahjones staff 2342 Sep 3 18:33 .bash_history
-rw-r--r-- 1 noahjones staff 157 Sep 3 18:31 .bash_profile
-rw------- 1 noahjones staff 201 Sep 3 18:29 .bash_profile.save
-rw-r--r-- 1 noahjones staff 74 Sep 3 16:33 .bash_profile_
drwx------ 48 noahjones staff 1536 Sep 3 18:34 .bash_sessions
-rw-r--r-- 1 noahjones staff 118 Sep 3 15:38 .bashrc
drwxr-xr-x 3 noahjones staff 96 Sep 3 16:01 .bundle
drwxr-xr-x 4 noahjones staff 128 Sep 3 15:40 .gem
-rw-r--r-- 1 noahjones staff 74 Sep 3 18:33 _bash.profile
Only the .bashrc and /.bash_profile are relevant. The file .bash_history is created automatically to store the history of your commands; the .bash_profile.save, .bash_profile_ and _bash.profile must be your backup files -- they are virtually ignored. The .bundle and .gem are not related to bash.
You probably have .bashrc and/or .bash_profile misconfigured. The difference between .bash_profile and .bashrc is that the former is only executed once, when you log in, while the latter is run every time you open a new /bin/bash shell. Depending on what you need to do with SQL you may want to delete one or the other.

metabase as service with oracle database

I tried Install Metabase as servicetutorial for Metabase Setup on CENTOS. Though i want to run metabase with oracle.
[bkmetabase#BK01 MetaBase]$ pwd
/home/bkmetabase/MetaBase
[bkmetabase#BK01 MetaBase]$ ll
total 119488
-rw-rw-r-- 1 bkmetabase bkmetabase 3975 Jun 6 07:52 logger_metabase.log
-rw-rw-r-- 1 bkmetabase bkmetabase 7503872 Jun 6 07:52 metabase.db.mv.db
-rw-rw-r-- 1 bkmetabase bkmetabase 187 May 27 12:12 metabase.db.trace.db
-rw-rw-r-- 1 bkmetabase bkmetabase 114839203 May 20 13:10 metabase.jar
drwxrwxr-x 2 bkmetabase bkmetabase 4096 May 27 12:05 plugins
[bkmetabase#BK01 MetaBase]$ cd plugins/
[bkmetabase#BK01 MetaBase]$ ll
total 3320
-rw-rw-r-- 1 bkmetabase bkmetabase 3397734 May 5 17:13 ojdbc7.jar
Currently to run as process i am running like below
~/jdk1.8.0_171/bin/java -jar metabase.jar &> logger_metabase.log &
How can we run it as background service with oracle as database?

Installing Torch7. iPython installation error (mac)

I'm trying to install Torch7 on my mac, however the installation halts at this point:
Not updating your shell profile.
You might want to
add the following lines to your shell profile:
export PATH=/Users/khsiddiqui/torch/install/bin:$PATH
export LD_LIBRARY_PATH=/Users/khsiddiqui/torch/install/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/Users/khsiddiqui/torch/install/lib:$DYLD_LIBRARY_PATH
Not sure what it means. Further above I received the following output
echo "Error: could not find ipython in PATH. Do you have it installed?"
fi
However iPython is installed as I can confirm:
No update necessary, 'ipython' is up-to-date.
ipython-3.0.0-3.egg was installed on: Thu Apr 9 18:12:32 2015
kamransiquisMBP:torch khsiddiqui$ env | grep PATH
PATH=/Users/khsiddiqui/Library/Enthought/Canopy_64bit/User/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/opt/X11/bin:
/usr/texbin
Attempting to locate the .bashrc file
%edit .bashrc
WARNING: Argument given (.bashrc) can't be found as a variable or as a filename.
kamransiquisMBP:torch khsiddiqui$ ls -ld ~/.*
drwxr-xr-x+ 43 khsiddiqui staff 1462 12 Apr 01:15 /Users/khsiddiqui/.
drwxr-xr-x 6 root admin 204 19 Oct 17:34 /Users/khsiddiqui/..
-r-------- 1 khsiddiqui staff 7 19 Oct 17:34 /Users/khsiddiqui/.CFUserTextEncoding
-rw-r--r--# 1 khsiddiqui staff 16388 26 Mar 23:59 /Users/khsiddiqui/.DS_Store
drwxr-xr-x 3 khsiddiqui staff 102 8 Sep 2014 /Users/khsiddiqui/.R
-rw-r--r-- 1 khsiddiqui staff 728832 2 Apr 17:21 /Users/khsiddiqui/.RData
-rw-r--r-- 1 khsiddiqui staff 1101 20 Oct 02:58 /Users/khsiddiqui/.Rapp.history
-rw-r--r-- 1 khsiddiqui staff 6314 2 Apr 17:21 /Users/khsiddiqui/.Rhistory
drwx------ 22 khsiddiqui staff 748 12 Apr 01:25 /Users/khsiddiqui/.Trash
-rw------- 1 khsiddiqui staff 1860 9 Apr 22:15 /Users/khsiddiqui/.bash_history
drwxr-xr-x 4 khsiddiqui staff 136 9 Apr 17:57 /Users/khsiddiqui/.cache
drwx------ 18 khsiddiqui staff 612 12 Apr 20:09 /Users/khsiddiqui/.canopy
drwxr-xr-x 3 khsiddiqui staff 102 12 Apr 01:15 /Users/khsiddiqui/.conda
drwxr-xr-x 2 khsiddiqui staff 68 12 Apr 01:11 /Users/khsiddiqui/.continuum
drwx------ 3 khsiddiqui staff 102 30 Jul 2010 /Users/khsiddiqui/.cups
drwx------ 10 khsiddiqui staff 340 2 Apr 17:26 /Users/khsiddiqui/.dropbox
-rw-r--r-- 1 khsiddiqui staff 2525 12 Apr 16:56 /Users/khsiddiqui/.enstaller4rc
drwxr-xr-x 9 khsiddiqui staff 306 9 Apr 22:25 /Users/khsiddiqui/.ipython
drwxr-xr-x 4 khsiddiqui staff 136 12 Apr 16:57 /Users/khsiddiqui/.matplotlib
-rw-r--r-- 1 khsiddiqui staff 340 12 Apr 01:12 /Users/khsiddiqui/.profile
-rw-r--r-- 1 khsiddiqui staff 251 28 Mar 13:45 /Users/khsiddiqui/.profile-anaconda.bak
drwxr-xr-x 15 khsiddiqui staff 510 2 Apr 17:21 /Users/khsiddiqui/.rstudio-desktop
drwxr-xr-x 6 khsiddiqui staff 204 20 Oct 19:21 /Users/khsiddiqui/.subversion
-rw------- 1 khsiddiqui staff 625 9 Apr 21:33 /Users/khsiddiqui/.viminfo
i had a similar problem and solved it, maybe it could help others.
Here was the end of the second installation script, and the command "th" wasn't working:
Not updating your shell profile.
You might want to
add the following lines to your shell profile:
. /Users/myusername/torch/install/bin/torch-activate
This article explains how your shell profile is organized: https://serverfault.com/questions/110065/what-profile-is-my-current-shell-using
I realized in my user folder /Users/myusername/ i had a ".bash_profile" file, i pasted the line ". /Users/myusername/torch/install/bin/torch-activate" inside but didn't work (command "th" no recognized in terminal).
So in the same /Users/myusername/ folder i created a ".profile" file and pasted the line ". /Users/myusername/torch/install/bin/torch-activate" inside.
Then the command "th" works fine ;)
First, IPython may be installed but not seen by the install process.
If you enter which ipython at a shell prompt it will tell you where it is installed. Then echo $PATH will display your PATH variable which should contain the directory that contains IPython. If it isn't then you will have to edit the PATH statement in your .bashrc file to add it.
Second, .bashrc is a file that is run by the shell when it starts up and should be in your home directory so enter cd at a shell prompt and you will be there. Then use a text editor such as Text Edit to edit it. In your case you don't have a .bashrc file, instead some things are being set in a file called .profile. You should probably check the contents of that.
Finally, I wouldn't run any of these commands from within IPython. Only run them (and the Torch install process) from the shell.
Further, I notice you have a file with the name "anaconda" in it. Have you installed 'Anaconda'?

Unix - pipeline ls - la | less C executable giving double total file size vs shell

*Edit - Stephen has answered this question in the comments below *
so basically I have made two seperate child processes(using two seperate methods with their own fork) to execute the command ls -la | less using pipe.
The first one executes ls like this:
execl("/bin/ls", "ls", "-la", NULL);
The second child process executes less like this:
execlp("less", "less", NULL);
And the results come up fine.. apart from one little part:
Results using shell command:
total 15
drwxr-xr-x 2 daniel staff 4 2015-02-27 18:58 .
drwxr-xr-x 15 daniel staff 24 2015-02-27 18:58 ..
-rwxr-xr-x 1 daniel staff 9280 2015-02-27 18:58 pipes
-rw-r--r-- 1 daniel staff 1419 2015-02-27 18:58 pipes.c
Results using my executable:
total 30
drwxr-xr-x 2 daniel staff 4 Feb 27 18:58 .
drwxr-xr-x 15 daniel staff 24 Feb 27 18:58 ..
-rwxr-xr-x 1 daniel staff 9280 Feb 27 18:58 pipes
-rw-r--r-- 1 daniel staff 1419 Feb 27 18:58 pipes.c
Now the date being a different format I don't care about.. but the total size is twice as large with my executable(30 vs 15). Why is this happening?
Make sure that the ls you are running from the shell and the ls that is running in your program are the same program.
Your program is specifying /bin/ls as the program to run; you can find out what is being run when you type the command at the shell prompt by using the shell command which ls (also see type ls).
If these are different it could be due to the POSIX vs. GNU blocksize used in the total size computation.
This answer indicates that POSIX and GNU tools differ in the blocksize they use to compute the total. Try adding h to your command and compare the results (this flag makes the units explicit). My guess is that the execution environment of these processes is disturbing the result. For instance it may not be the same ls that you are running.

Resources