What’s bigger than a double?

C++ has long double, but there is no guarantee that it’s any more precise than a plain double. On an x86 platform, usually double is 64 bits, and long double is either 64 or 80 bits (which gives you 19 significant figures, if I remember right). Your mileage may vary, especially if you’re not on … Read more

Python Function to test ping

It looks like you want the return keyword def check_ping(): hostname = “taylor” response = os.system(“ping -c 1 ” + hostname) # and then check the response… if response == 0: pingstatus = “Network Active” else: pingstatus = “Network Error” return pingstatus You need to capture/’receive’ the return value of the function(pingstatus) in a variable … Read more

Get variable type in bash

Bash doesn’t have types in the same way as Python (although I would say that Python has classes rather than types). But bash variables do have attributes that are given (mostly) through declare, but the range of attributes is fairly small. You can find an attribute using declare -p, for example, declare -i creates an … Read more

WIX: Howto set the name of the msi output file dynamically

You could update the OutputName of your .wixproj and use an MSBuild variable to pass through the version number or any other variable you like. My build script looks like this: set PRODUCTVERSION=7.1.0.1 MSBuild.exe /p:Configuration=Debug /p:ProductVersion=%PRODUCTVERSION% Installer.wixproj And my WiX project looks like this: <?xml version=”1.0″ encoding=”utf-8″?> <Project ToolsVersion=”4.0″ DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> <PropertyGroup> <Configuration Condition=” ‘$(Configuration)’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)