Tag Archives: Windows

Hyperbolic cosine

Some time ago someone asked me to write my own implementation of the hyperbolic cosine (http://pl.wikipedia.org/wiki/Funkcje_hiperboliczne) based on the Taylor series.

A quick proof-of-concept version:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double silnia (double n){
    if (n <= 1) return 1;
    else return silnia(n - 1)*n;
}

double mycosh(double z){
    double result = 1;
    int ilosc_wyr_ciagu = 30;
    int i;
    for (i = 1; i < ilosc_wyr_ciagu; i++){
        result += pow(z, 2*i) / silnia(2*i);
    }
    return result;
}

int main(int argc, char *argv[]) {
    double arg, c1, c2, blad;
    arg = 3.113408;
    c1 = cosh(arg);
    c2 = mycosh(arg);
    blad = abs(c2-c1)/c2;
    printf(" z=%f; cosh(z)=%f; mycosh(z)=%f; blad=%.90f \n", arg, c1, c2, blad);
    system("PAUSE");
    return 0;
}

Problems with VMware vCenter Server 5.5

A collection of a few problems I recently encountered with vCenter…

Problem: entries in the log C:\ProgramData\VMware\VMware VirtualCenter\Logs\Vpxd-XXX.log:

2015-02-03T17:04:41.874+01:00 [06244 error 'win32vpxLdap_win32'] [LDAP Client] Failed to add LDAP entry CN=396B4052-A620-474B-BE8E-0446D1E1E831,OU=ComponentSpecs,OU=Health,dc=virtualcenter,dc=vmware,dc=int: 0x68 (The object already exists.)

Solution: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2044680

Problem: entries in C:\ProgramData\VMware\VMware VirtualCenter\Logs\wrapper.log:

INFO | jvm 1 | 2015/02/02 17:09:21 | SEVERE: Unable to expose the remote JMX registry.
INFO | jvm 1 | 2015/02/02 17:09:21 | java.lang.IllegalArgumentException: Port value out of range: -1

Solution: VMware documentation

In short: edit the base.jmx.port variable in C:\Program Files\VMware\Infrastructure omcat\conf\catalina.properties:

base.jmx.port=-1

change it to:

base.jmx.port=6969

Problem: how to restore the configuration, in other words generally about configuration backup (but this is worth doing earlier ;-P).

Solution: VMware KB 1029864

Problem: where are the logs stored?

Solution: typical log locations:

C:\ProgramData\VMware\Infrastructure\Inventory Service\Logs
C:\ProgramData\VMware\VMware VirtualCenter\Logs

Problem: what does the vCenter database structure look like?

Solution: http://support.hp.com/pl-pl/document/c01271538

Attaching an EX2010 mailbox and “Mailbox Disabled”

A small curiosity…

An AD user account was accidentally deleted. After quickly restoring or creating a new account in AD and recovering the files, in theory all that remains is to attach the mailbox to the new account.

In theory… because when the user tries to log in through OWA, they get this message:

Mailbox disabled, Exception type: Microsoft.Exchange.Data.Storage.AccountDisabledException

You still need to clean up and synchronize AD with the MS Exchange Store:

get-mailboxdatabase | Clean-MailboxDatabase

Removing duplicate events in Outlook 2013

Time to start the new year with some cleanup… Outlook went first, with 26,420 events. Quite a lot… including many duplicates.

There are many shareware programs for removing duplicate messages, contacts, and events, but most of them do not work with Outlook 2013 or Active Sync accounts.

The open project Outlook Look For Duplicates can help. Its installation is not the most pleasant: many dependencies, manual installation of additional libraries, and so on. It is worth reading the project’s Wiki first.

After that, it works excellently and intuitively.