Hot answers tagged

32

I can confirm that upgrading to Windows 10 from either Windows 7 or Windows 8.1 (you can't upgrade from Windows 8 directly, you first have to upgrade to 8.1) leaves all your settings and licenses intact and that includes your Mathematica (9, 10.0, 10.1, 10.2) installation, I didn't have version 8 installed but I would guess it should work too. I have also ...


28

Copying my answer from StackOverflow (edit, now updated) ... If you are on Windows (with .NET), then you could use Mathematica's NETLink functionality in conjunction with the WebBrowser class to capture a screenshot of a web page: Needs["NETLink`"] LoadNETType["System.Drawing.Imaging.ImageFormat", AllowShortContext -> False] ...


21

On Windows 7 using ReadList instead of Run suppresses the window: Table[Pause[1/2]; ReadList["!dir", String], {3}]; This use of "!command" in place of a file is at least partially documented under OpenRead: On systems that support pipes,OpenRead["!command"] runs the external program specified by command, and opens a pipe to get input from it. As ...


20

You can call an external (shell) command cmd without showing a command window by using the pipe syntax "!"<>cmd. This can be used in place of a filename with any Mathematica function that opens a file for reading. For example: Import["!dir", "Text"] Read["!dir"] (opens stream, must be closed) OpenRead["!dir"], followed by Read, ReadList etc to grab ...


20

You need to add the following to KeyEventTranslations.tr: Item[KeyEvent["Tab", Modifiers -> {Control}], FrontEndExecute[FrontEndToken["CycleNotebooksForward"]]], Item[KeyEvent["Tab", Modifiers -> {Shift, Control}], FrontEndExecute[FrontEndToken["CycleNotebooksBackward"]]], This will map Control-Tab and Control-Shift-Tab to cycling between ...


18

Even the path is corrected, it still cannot run, since the argument type should {"double*", "double*"}. Here is my memo on calling dll created by gfortran using NETLink: Advantages of NETLink as compared to Mathlink: Fortran functions and subroutines can be called using NETLink without writing an additional C wrapper which is necessary in Mathlink. ...


17

I upgraded three machines from Windows 7 to Windows 10, two of which were work machines containing installations of Mathematica 10.x (and earlier). So far I have encountered zero issues related to Mathematica with this Windows upgrade. From a personal perspective, upgrading to Windows 10 was very simple. Also the QA team for Mathematica did a full test of ...


16

There are a few problems with your code. If you fix those up, as I did, your program will run fine. First off, the reason you see "no source available" when you pause the program is probably that when you break, the program is down inside a MathLink function, and so it is complaining that it doesn't have access to the MathLink library source code. To debug ...


15

After much digging, I found this MathGroup archive detailing how to get Mathematica working with SQL servers protected by Windows authentication. It's repeated here mainly for posterity's sake. Download the jTDS files from here: http://sourceforge.net/projects/jtds/files/ Unzip and locate the ntlmauth.dll file in the appropriate folder (x64, x86, IA64). ...


15

First, be sure to read the Specific Compilers section of the CCompilerDriver User Guide. This is the official place where the nuts and bolts of using external C compilers is discussed. In that section, "Visual Studio Express and 64-Bit Targets" is where compilation on 64-bit Windows is discussed. Some things to check when setting up: Be sure to install ...


14

You create metafiles every time when you copy graphics from Mathematica FrontEnd and paste it in MS Word because it is native format for exchanging vector graphics under Windows. So your question is actually about corrupted metafiles in MS Word document opened on a machine without Mathematica fonts installed. This behavior is expected because unlike PDF and ...


13

Until a better answer comes along, I present, for your edification, an ugly hack that isn't really Mathematica per se: Needs["CCompilerDriver`"] src = " #include \"WolframLibrary.h\" #include <windows.h> #include <string> BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) { char title[256]; GetWindowText(hwnd, title, ...


13

Mathematica 8 automatically detects Intel version 11, but not Intel version 12 which was released later. In order to use the Intel 12 compiler, you'll need to set $CCompiler to point CCompilerDriver to where you've installed the Intel compiler: Needs["CCompilerDriver`"] $CCompiler = {"Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler, ...


13

Mathematica 10 is not high-DPI-aware on Windows and so Windows renders it at the native resolution and then scales it by a factor of 2 by default to make it readable. Once Mathematica supports high-DPI displays in Windows, they will be able to properly render text and graphics that aren't blurry. If you're running Windows 8.1, you can disable this default ...


13

UPDATE from 06.11.2015 Since writing the original answer I installed updates for my Windows 7 x64. Now the original bug isn't there anymore but there still persists more fundamental bug which I observe in versions 8.0.4, 9.0.1, 10.0.1, 10.2 and 10.3 installed on the same system. This bug becomes evident when you look at the plots of horizontal channel ...


13

With a few rare exceptions, Mathematica is generally unable to work with long path names on Windows. This response presents two strategies to work around this difficulty: extended-length path syntax and short path names (documented in Naming Files, Paths, and Namespaces from the Windows Dev Center). Let's start with a big file name: $big = ...


13

There are a couple of issues at play. One is that the implementation of Total has changed, and it is now using several threads in parallel. Furthermore, there are platform-specific differences in how Timing works. On Windows, it will only measure the CPU time used by the main kernel thread, excluding any subthreads. On Linux, and I believe OS X, it will ...


12

As indicated in the documentation, one can access the Mathematica kernel from the command prompt using the command math in Unix/Linux and MathKernel from Mac OS X/ Windows. If the MathKernel command is not in your PATH variable, you can try one of several things: Enter the full pathname as part of the command Add MathKernel as a PATH variable using the ...


12

Here is a considerable simplification of Liam's accepted answer. It avoids the need to create and compile a C# program. This is basically just a small modification to Simon Woods' answer, so that it writes directly to the clipboard instead of creating a temporary file on disk. This avoids the need to clean up the file afterward. Needs["NETLink`"] ...


12

Update It's probably easier to use Edit -> Copy As -> Bitmap from the menubar. Changing the magnification of the notebook will change the size of the image that gets sent to the clipboard Previous answer There's likely a better answer out there, but I use a hack of the SEUploader to do this. toclipboard2[] := If[ MemberQ[Hold[{}, $Failed, ...


10

Arnoud Buzing in chat made us aware of this support page that discusses possibly related issues. UPDATE: A new version of the Windows installer has been placed on the Wolfram Portal. Its file hash is: F3EEC3AFEC3186001A1A237C88B7A991 You can check this with the following command: BaseForm[FileHash["Mathematica_9.0.0_WIN.exe", "MD5"], 16]


10

Setting a FontOpacity less than 1 appears to prevent sub-pixel rendering and therefore provides output similar (perhaps identical) to that obtained with ClearType switched off. text = Style["αβημπρτ", 20, FontFamily -> "Arial", FontOpacity -> 0.999]; Rotate[text, # °] & /@ {90, 90.1, -90, 85, 95, 45, 0} One possibility to automate this, and to ...


10

Something like this? It does just what you suggested: export the file and then place a FileDrop reference to it on the clipboard. Needs["NETLink`"]; InstallNET[]; LoadNETType["System.Windows.Forms.DataFormats"]; LoadNETType["System.Windows.Forms.Clipboard"]; exportToClipboard[graphics_] := Module[{dob, file}, file = FileNameJoin[{$TemporaryDirectory, ...


10

I have contacted the Wolfram support ([CASE:1292216]): Dear Andrew, Thank you for contacting Wolfram Customer Service. We simply ended our support of XP shortly after Microsoft had announced they would no longer support XP themselves. XP is going to become to difficult to handle without any kind of support from Microsoft as many of the issues we ...


10

It turned out that the MathematicaClosingDialog.nb is a nice example for a graphical user interface that solely uses the FrontEnd MathKernel. On the downside, one has to deal with low-level code. First I made a copy of the original MathematicaClosingDialog.nb, renamed it as MathematicaClosingDialog_Default.nb, and then imported it into a notebook: nb = ...


9

If you need to achieve the best possible quality I strongly recommend against using the Clipboard for transferring graphics. Under Windows the clipboard will contain a Windows Metafile generated with display resolution fidelity! This is the reason why you see jaggies. The same is true for the vector graphics files generated by Mathematica's Save Selection ...


9

I recently encountered a similar problem (CUDAQ[] returning False, CUDADriverVersion[] returning that strange "Mod[100 Revision Number, 1000]"). Here are the steps that finally got the CUDALink back working properly: Uninstalling by executing CUDAResourcesUninstall[] Downloading the proper paclet from http://www.wolfram.com/CUDA/CUDAResources.html ...


9

This is a known problem with nodejs on Windows. The stdout stream is an asynchronous stream and is not always being flushed before the process exits. A work-around is to perform an explicitly synchronous write to stdout (i.e. file descriptor #1): Import["!node -e require('fs').writeSync(1,'test')", "Text"] (* test *) The bug report referenced above ...


8

The following code copies the actua PNG image to the clipboard with transparency. This varies from the other answer in that it actual stores the entire image instead of a reference to the file. This code will likely work with more applications then the one above. It currently uses the Ctrl+Shift+C to copy with transparency. The code takes a while to run ...


8

Suppose you create a file addtwo.tm : :Begin: :Function: addtwo :Pattern: AddTwo[i_Integer, j_Integer] :Arguments: { i, j } :ArgumentTypes: { Integer, Integer } :ReturnType: Integer :End: :Evaluate: AddTwo::usage = "AddTwo[x, y] gives the sum of two machine integers x and y." int addtwo( int i, int j) { return i+j; } int ...



Only top voted, non community-wiki answers of a minimum length are eligible