How do you uninstall / remove MarkLogic 7 on MacOS X? - database

Does anyone know how to completely remove MarkLogic 7 on MacOSX?
I've read their documentation which says:
To entirely remove MarkLogic, remove the following directories:
~/Library/MarkLogic
~/Library/Application Support/MarkLogic
~/Library/StartupItems/MarkLogic
~/Library/PreferencePanes/MarkLogic.prefPane
But I don't have those folders. I have no idea where it's been installed!
Then it says:
To make Mac OS X completely forget it ever had a MarkLogic installation, run the following command from a terminal window:
sudo pkgutil --forget com.marklogic.server
But that didn't seem to do anything. I still have it in my System Preferences.

My guess is that when you say you don't have those folders, you mean that you don't see ~/Library when you open Finder (please comment if that's not the case). You can make the Library directory appear by:
Open Finder
Click on your home directory
Click the Settings icon (gear)
Click Show View Options
Check the Show Library Folder option
Now you should be able to see the Library folder and you'll be able to remove those directories.
Note: I don't know your background, so forgive me if this is too basic, but the ~/Library directory contains a bunch of stuff that OS X uses to make your system run. It's hidden because making mistakes in there can cause problems that are tricky to fix. If the contents of ~/Library are not familiar to you, you might want to un-check that option when you're done.

Dave is probably right. But just in case, you can use that prefpane to stop MarkLogic, then use the Error Log button to open the log. Start MarkLogic and the first new line in the log will tell you where it is:
Notice: Starting MarkLogic Server 7.0-3 x86_64 in /Users/${USER}/Library/MarkLogic
with data in /Users/${USER}/Library/Application Support/MarkLogic/Data

Also, don't delete ~/Library/PreferencePanes/MarkLogic.prefPane, but remove the preference pane by right-clicking on it in System Preferences. It will then be deleted, but you can't remove its icon from System Preferences if you have deleted the preference pane.

Related

How to fix function (that validates input) from not reading a text file? [duplicate]

Trying out the Clion EAP on the Mac. How does one change the current working directory for a launched program? It appears to be set to the output directory of the binaries.
This can be changed via the Run -> Edit Configurations... dialog, just like Idea.
The mix of needing to make changes to CMakeLists.txt for so much of the configuration just threw me, and I've been hunting for a way to change it there, but this bit at least is consistent with the other IDEs, which is good.
Hopefully they'll improve the rest of the Project Settings in a similar fashion.
The "Working Directory" is where the executable starts. Modifying the "Working Directory" in the Configurations setting tells Clion to change to the "Working Directory" after the executable starts execution.
If you want to change where the executable starts execution you will need to add a line to the CMakesLists.txt file.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(TimeServer ${SOURCE_FILES})
Position in the cmakes file is important. If you add the set command after the add_executable it will not work. It must come before.
These answers are relatively old. Not sure when the feature was added but there's a very nice UI way to set the current working directory now.
I made a YouTube tutorial for my COSC1030 (Beginning C++) students but the solution is the same for everyone:
https://youtu.be/dTtZEAfh_LM
If you know your CLion fairly well and don't need a demo, here's a short-hand version: Edit Configurations (from drop-down menu at top right of screen), enter the directory you want to use in Working Directory or select via "..." pop-up.

Lost code lines when Notepad++ crashed

I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb because there's nothing left in it. How the hell is that even possible ? It erased everything I typed and saved the file as if there's nothing in it.
Do you know a way to get my code back ? Or did something like this ever happened to someone ? :/ I'm kinda worried because there was a lot of work there and I don't feel like re-typing it all...
When that option is enabled (and it is by default), Notepad++ keeps a backup copy of files you edit.
You can find the backups in the directory %APPDATA%\Notepad++\backup under the format filename#datetime.
I lost four unsaved files when my Notepad++ crashed, I searched through net and found another way to retrieve unsaved files other than backup folder
C:\Users\{username}\AppData\Roaming\Notepad++\backup
Hope it can help others who face the same problem as me. You can try to locate the dump files at
C:\Users\{username}\AppData\Local\Temp\N++RECOV
There will be .dump file inside, this is where I found my unsaved files. You can open the dump file with Notepad++, and see your unsaved works.
This has happened to me a few times lately and I've found a few solutions that make it possible to recover the lost code.
For Windows 7 and probably other modern Windows versions:
Find the file in File Explorer. The size will be 0KB. Right click on it and then choose Properties from the context menu.
Choose the Previous Versions tab. There's a good chance you will find a fairly recent version saved during the latest Restore point. If it's a bit old, it's still probably better than the current 0KB.
Click the Restore button.
My personal optimal solution:
Since this happened to me a few times and the Windows Previous Version was not always up to date, I looked for a different solution that could always give me the latest, most up-to-date version before the 0KB crash.
I discovered that I already had the solution installed on my computer. I have a SugarSync account that always backs up my work files to the cloud. The great part of the service is that SugarSync always keeps the last 5 versions in the cloud, so while the current version will be 0KB, you can download the next to last version and update your file on your computer.
If you have some other backup program, you can check if that service also keeps different versions that you can recover.
I've used notepad++ without any backup for years. One day this happen to me, too.
Here is what I've found as possible solutions:
http://buffernow.com/notepad-plus-crash-recover-your-lost-file/
(similar to Indrajit answer) - not much help. I didn't find my file there.
I have recovered my file one week ago as per answer of Hvck
Same problem here. Same answers:
https://superuser.com/questions/390204/how-to-restore-a-previous-version-of-file-in-notepad
One lesson learned: Use the backup!
use a plugin:
http://www.ilovefreesoftware.com/12/windows/two-plugins-auto-save-files-notepad-auto-save-autosave2.html
use notepad++ backup
http://allinworld99.blogspot.ca/2015/01/notepad-backup-files.html
** UPDATE **
It happened to me again!!! Another way to recover my file: View source on my browser and resave the file to other location. If you are lucky enough to have the file loaded in your browser :) It worked for me for a css file and for a js file.
Comparing the files: what N++ backed-up and the file from browser and files are matching. OMG!
GO to Taskbar click and run %APPDATA%, click to Notepad++ click to backup.
Your files saved by filename.extensionname#year-month-date_time
I know it's too late to answer this, but maybe my answer will help others.
I've encountered the same problem recently. Then it became regular. I did not find a solution to the problem itself, plus it may be caused by many different reasons, so probably no universal solution exists.
However, there is a way to save your files while notepad++ is not closed. Even if the backups folder is empty.
First of all, do not close notepad++. Open a taskmanager, find the notepad++ process and locate the Dump or Create dump file option. Click it. This will create a whole memory dump of the process. This dump will contain the documents you had opened. However you may need to find this data, plus it may be in a different encoding. I guess it is in UTF8 most of the time, but I am not completely sure.
The dump file can be examined with simple programs like notepad++ itself or with a hex editor.
Notepad doesn't auto-save its open file so unfortunately you have lost your work.
On next time you can use Notepad++ it retrieves file automatically
Refer this link may it help you Notepad++ recovery
I tried all the above solutions but nothing was working for me.
But luckily I have opened files one day earlier in eclipse as well. Eclipse and all other IDEs maintain a cache of all the files. You can get the copy of the file from that cache. To get copy from the eclipse.
Right Click on the file Name
Go to Replace With - Previous from the Local History
This answer applies to more recent versions of NotePad++:
Go to the folder of the file, see if there is a subfolder called nppBackup. Recently I've found sometimes the backup wasn't created in %AppData%/Notepad++/backup but it always seems to get created here, with the following file name format [original file name][date stamp]_[time stamp].bak

PostgreSQL Error: The program can't start because libpq.dll is missing from your computer

I'm using Visual Studio 2010 to build a program in C that can operate on a PostgreSQL database.
Everything is fine in VS, no compile errors, everything looks good.
When I click to debug and run, the code compiles, but then I get a pop up that says:
The program can't start because libpq.dll is missing from your computer
I've installed PostgreSQL and added the folder containing all the necessary files to my include and linker paths, but to no avail.
I cannot figure out why I am still getting this message?
Any suggestions?
The answer's surprisingly simple.
The issue you're seeing comes from the compiled application not being able to find the PostgreSQL libraries. The libpq.lib is used to compile the application, and it links to the DLL at run-time. You can either add it to your system wide path, or bundle the DLL with your application. (I'd add it on the development machine, and bundle the redistributable for a installer package.)
To include it in your path try:
Right click on "My Computer" and select Properties
Then Click on "Advanced System Settings".
Click the "Environment Variables" button at the bottom of the dialog box.
It will pop up a dialog with a group box labeled "System Variables". Find the one in the list box that has a Variable name of "Path".
Now, add the path of the PostgreSQL library folder to the path with a ";" separator.
Now logout or reboot. It's imperative that you at least log out of Windows and log back in for the Visual Studio debugger to pickup the additional executable module paths (that Path variable). Ideally, rebooting sends the new system path to all applications in the system at boot time.
If the Path variable has "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" in it, you would add ";C:\Program Files\PostgreSQL\libraries" to make it look like "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\PostgreSQL\libraries".
Be aware that your path will be really long in most cases. Just add it to the end.
Good luck!
I have Win10 64 bit and this worked for me.
Get portable version of HeidiSQL and copy libpg.dll from the archive to the HeidiSQL installation folder on your computer.
Works like a charm.

Eclipse: choosing a default debugger for all new C projects

Whenever I start a new project, I have to go through setting up the debugger with Eclipse time and time again before I can use it. Isn't there a default setting for all new C projects I can change?
I'm not sure exactly what you mean by "setting up the debugger" (perhaps you can clarify), but under "Preferences -> Run/Debug -> Launching -> Default Launchers" you should be able to select your preferred launcher for different kind of launch modes. This can also be selected individually for each launch configuration.
Typically it is up to the toolchain and/or project to determine which debugger/launcher is suitable to use for that specific project, but I know there is a bug in CDT which prevents toolchains from properly specifying the default launcher to use.
I only use Eclipse for Java, so I can't give you an authoritative answer. But since no one else seems to be answering:
Java projects have a (more or less) hidden file in the project directory called .project and another one called .settings . I'm not sure if this would apply to the C environment as well, but it seems likely. You may want to look at the set of such "hidden" files for a well set up project and a virginal project side by side to find out which settings make the difference.
Given that information, you may be able to simply edit (perhaps with some assistance from a script you can write yourself) the file(s) in question to do the configuration textually without a lot of mouse clicking.

How to allow a user to edit data in a separate app from the terminal?

I am writing a terminal-based application, but I want the user to be able to edit certain text data in a separate editor. For example, if the user chooses to edit the list of current usernames, the list should open as a text file in the user's favorite editor (vim, gedit, etc.). This will probably be an environment variable such as $MYAPPEDITOR. This is similar to the way commit messages work in svn.
Is the best way to do this to create a temporary file in /tmp, and read it in when the editor process is terminated? Or is there a better way to approach this problem?
There's already a $EDITOR variable, which is extremely standard and I have seen it working on a wide variety of unixes. Also, vi is always an option on any flavor of unix.
Debian has a sensible-editor command that invokes $EDITOR if it can, or falls back to some standard ones otherwise. Freedesktop.org has an xdg-open command that will detect which desktop environment is running and open the file with the associated application. As far as I know, sensible-editor doesn't exist on other distributions, and of course xdg-open will fail in a text-only environment, but it couldn't hurt to try as many options as possible, if you think it's important that a desktop user can see their happy shiny gedit or kate instead of scary old vi or nano. ;)
The way crontab and sudoedit work is also by making a file in /tmp. git puts it under .git, and svn actually puts it in the current directory (not /tmp).
The way svn and mercurial do it is by making a file in /tmp.
BTW, you don't need a MYAPPEDITOR, on nix there's EDITOR already present.
Since you mention svn in your post, why not just follow the same methodology? svn opens a file with a particular name with whatever $EDITOR (or $SVN_EDITOR) contains - this might actually require some work on your part; determining the parameters to each supported editor. In either case, you have the name of the file that was saved (or the error code of the application if something failed) and you can just use that.

Resources