Monday, April 30, 2012

PHP CGI Environment customization

What is the proper way to set the CGI environment for running scripts in PHP? If I would like to run a script and pass in all the CGI ENV variables - it should have only AUTH_TYPE,PATH_INFO etc.



Right now,if I do exec() - it uses the OS ENV variables like PATH,TERM etc. I can't use pcntl_exec(). Appreciate any hints.



Thanks.





preg_match_all not working when trying to get all characters including whitespace

Here is my function:



function grabstuff()
{
foreach (glob("../folder/*.php") as $fn)
{
$file = file_get_contents($fn);

preg_match_all("#\{\('(\w+)'\)}#", $file, $matches);

foreach ($matches[1] as $match)
{

$query = ("ALTER TABLE xxxxx ADD COLUMN `$match` LONGTEXT AFTER xxxxx;");

$result = mysql_query($query) or die("Err: ".mysql_error());

}
}
}


And here is what it looks for on the pages:



<?/*{('test test')}*/?>


It is ignoring this instance where there is a whitespace. It works well for testtest and test_test. Not getting any php errors or mysql errors. Do I need to use \w+\S or \w+\W? I tried both of those, even (...) and it still didn't work. How do I get my above function to recognize any characters within the {('')}, whether they be a normal abc characters or whitespace. I'm sure this is simple. I've done research on google and here and wasn't able to find a solution. (There will be multiple instances of {('')} on any given page if that helps). I've been using this function for a while now, but would like to add the ability to include whitespaces. Thanks!





Javascript - JSON date formatting

With some help from some fellow stack users, I currently have this:




http://jsfiddle.net/wZETP/




The JSON data gives me the {start.date} in YYYY-MM-DD formatting, but I would like to know how to implement a date change to:




Mon 01 Jan






Javascript function taking too long to complete?

Below is a snipet of code that I am having trouble with. The purpose is to check duplicate entries in the database and return "h" with a boolean if true or false. For testing purposes I am returning a true boolean for "h" but by the time the alert(duplicate_count); line gets executed the duplicate_count is still 0. Even though the alert for a +1 gets executed.



To me it seems like the function updateUserFields is taking longer to execute so it's taking longer to finish before getting to the alert.



Any ideas or suggestions? Thanks!



var duplicate_count = 0

for (var i = 0; i < skill_id.length; i++) {

function updateUserFields(h) {
if(h) {
duplicate_count++;
alert("count +1");
} else {
alert("none found");
}
}

var g = new cfc_mentoring_find_mentor();
g.setCallbackHandler(updateUserFields);
g.is_relationship_duplicate(resource_id, mentee_id, section_id[i], skill_id[i], active_ind,table);
};

alert(duplicate_count);




Storing a pointer's address in an unsigned int in C

Is it possible to cast a pointer to an unsigned int, then later cast it back to a pointer? I'm trying to store the pointer to a struct in a pthread_t variable, but I can't seem to get it to work.





How to use Encryption/Decryption to send encrypt data using post (JSON) method?

how to send the password,bank account, credit card information using JSON POST method,We cant send it as plain text. How to use encryption/Decryption method for sending this highly important data?



Three major problem :




  1. How to encrypt data ? (Data means password,bank account, credit card information).

  2. How to send this encrypt data using web service (JSON format)?

  3. How to retrieved this data from server and decrypt ?





how are android security permissions checked at run-time?

This question has been asked before at How does Android enforce permissions?. While the discussions there are good, the question is still not fully answered.



In the development environment, exceptions are thrown when the app tries to do something that requires permissions not declared in AndroidManifest.xml. So how does the run-time system implement the run-time checking?



I guess it's most likely done in the core framework, which may or may not need support from native code. But I don't know what source code files in AOSP are relevant to this.





About haskell, how to define function in file?

I am totally newbie to haskell.



I have such snippet code



lucky:: Int->String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry , youre out of luck pal!"


I tried to input to terminal directly, seems not right.
But if I want to put this in file and load this file, then call lucky function. How should I construct this file?
Thank you!



I tried this:



module Main where
lucky:: Int->String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry , youre out of luck pal!"


main = do


But when i try to call lucky in terminal, i got this:



factorial.hs:7:8: Empty 'do' construct
lucky 7

<interactive>:1:1: Not in scope: `lucky'




Windows Server Crash Dump Analysis

I'm not certain that this is the right venue for this question, but a programmer friend of mine said I should try this here.



My company's main application is hosted on a terminal server running Windows Server 2008. Since last Thursday we have seen this server crash and reboot 3 times, and we just went live with this server on the previous Tuesday. I have used the the WinDbg program to analyze the crash dump file, but I'm a little outside by depth at this point and I'm hoping that someone out there can help me get this issue resolved.



The application that appears to me to be at fault is winoac.exe which is the executable for SmartWare 4.5 (www.smartware4.com). This is the platform that our application runs on. If this application is at fault, is there anything that I can do about it, other than complaining to SmartWare?



Thanks a million to anybody that can help.



Here are the results of the analysis.



Microsoft (R) Windows Debugger Version 6.10.0003.233 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\esinnard\Desktop\Windows Dumps\1-29-09\MEMORY.DMP]
Kernel Summary Dump File: Only kernel address space is available

Symbol search path is: SRV*C:\ProgramData\Symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows Server 2008/Windows Vista SP1 Kernel Version 6001 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: Server, suite: TerminalServer
Built by: 6001.18145.x86fre.vistasp1_gdr.080917-1612
Machine Name:
Kernel base = 0x81c41000 PsLoadedModuleList = 0x81d4e930
Debug session time: Thu Jan 29 12:49:43.870 2009 (GMT-6)
System Uptime: 0 days 11:18:08.929
Loading Kernel Symbols
...............................................................
................................................................
..............
Loading User Symbols
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
Loading unloaded module list
.....
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 8E, {c0000005, 81c88043, 9cef0840, 0}

Page bd1f2 not present in the dump file. Type ".hh dbgerr004" for details
Page bc9c3 not present in the dump file. Type ".hh dbgerr004" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
Probably caused by : RDPDD.dll ( RDPDD!OE2_TableEncodeOrderFields+11e )

Followup: MachineOwner
---------

7: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

KERNEL_MODE_EXCEPTION_NOT_HANDLED (8e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: 81c88043, The address that the exception occurred at
Arg3: 9cef0840, Trap Frame
Arg4: 00000000

Debugging Details:
------------------

PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

FAULTING_IP:
nt!RtlInitUnicodeString+1b
81c88043 f266af repne scas word ptr es:[edi]

TRAP_FRAME: 9cef0840 -- (.trap 0xffffffff9cef0840)
ErrCode = 00000000
eax=00000000 ebx=fe414fd8 ecx=ffffffec edx=9cef0914 esi=fe40fcf0 edi=fe415000
eip=81c88043 esp=9cef08b4 ebp=9cef0924 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
nt!RtlInitUnicodeString+0x1b:
81c88043 f266af repne scas word ptr es:[edi]
Resetting default scope

DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT

BUGCHECK_STR: 0x8E

PROCESS_NAME: WINOAC.EXE

CURRENT_IRQL: 0

LAST_CONTROL_TRANSFER: from 81c72fbe to 81cfc759

STACK_TEXT:
9cef0400 81c72fbe 0000008e c0000005 81c88043 nt!KeBugCheckEx+0x1e
9cef07d0 81c9953a 9cef07ec 00000000 9cef0840 nt!KiDispatchException+0x1a9
9cef0838 81c994ee 9cef0924 81c88043 badb0d00 nt!CommonDispatchException+0x4a
9cef085c 9976011a 99771680 997708e8 00000000 nt!Kei386EoiHelper+0x186
9cef0924 9959efab 5d0102bb 00000006 00000002 RDPDD!OE2_TableEncodeOrderFields+0x11e
9cef0a0c 995aeaf8 5d0102bb 00000006 00000002 win32k!xxxRealDrawMenuItem+0x80b
9cef0abc 9958455b 5d0102bb 0110007e 9cef0b04 win32k!xxxDrawState+0x1c9
9cef0b2c 995853e1 5d0102bb fe40fc78 00c8d0d4 win32k!xxxDrawMenuItem+0x3f8
9cef0b98 9959f511 5d0102bb 00000000 fe414570 win32k!xxxMenuDraw+0x1f2
9cef0bf0 994ed1d6 00000017 5d0102bb 00000004 win32k!xxxMenuBarDraw+0x1bf
9cef0c38 9950c0f5 fe414570 5d0102bb 00000001 win32k!xxxDrawWindowFrame+0xf7
9cef0cb4 9950d73d fe414570 00000085 090402df win32k!xxxRealDefWindowProc+0x88b
9cef0ccc 994e673d fe414570 00000085 090402df win32k!xxxWrapRealDefWindowProc+0x2b
9cef0ce8 9950d6f4 fe414570 00000085 090402df win32k!NtUserfnNCDESTROY+0x27
9cef0d20 81c9897a 000200ba 00000085 090402df win32k!NtUserMessageCall+0xc6
9cef0d20 77089a94 000200ba 00000085 090402df nt!KiFastCallEntry+0x12a
WARNING: Frame IP not in any known module. Following frames may be wrong.
0012d7cc 00000000 00000000 00000000 00000000 0x77089a94


STACK_COMMAND: kb

FOLLOWUP_IP:
RDPDD!OE2_TableEncodeOrderFields+11e
9976011a 8b4518 mov eax,dword ptr [ebp+18h]

SYMBOL_STACK_INDEX: 4

SYMBOL_NAME: RDPDD!OE2_TableEncodeOrderFields+11e

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: RDPDD

IMAGE_NAME: RDPDD.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 4791923e

FAILURE_BUCKET_ID: 0x8E_RDPDD!OE2_TableEncodeOrderFields+11e

BUCKET_ID: 0x8E_RDPDD!OE2_TableEncodeOrderFields+11e

Followup: MachineOwner
---------

------------------------------------------------------------------------------------------


Microsoft (R) Windows Debugger Version 6.10.0003.233 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\esinnard\Desktop\Windows Dumps\1-29-09\MEMORY.DMP]
Kernel Summary Dump File: Only kernel address space is available

Symbol search path is: SRV*C:\ProgramData\Symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows Server 2008/Windows Vista SP1 Kernel Version 6001 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: Server, suite: TerminalServer
Built by: 6001.18145.x86fre.vistasp1_gdr.080917-1612
Machine Name:
Kernel base = 0x81c41000 PsLoadedModuleList = 0x81d4e930
Debug session time: Thu Jan 29 12:49:43.870 2009 (GMT-6)
System Uptime: 0 days 11:18:08.929
Loading Kernel Symbols
...............................................................
................................................................
..............
Loading User Symbols
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
Loading unloaded module list
.....
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 8E, {c0000005, 81c88043, 9cef0840, 0}

Page bd1f2 not present in the dump file. Type ".hh dbgerr004" for details
Page bc9c3 not present in the dump file. Type ".hh dbgerr004" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
Probably caused by : RDPDD.dll ( RDPDD!OE2_TableEncodeOrderFields+11e )

Followup: MachineOwner
---------

7: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

KERNEL_MODE_EXCEPTION_NOT_HANDLED (8e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: 81c88043, The address that the exception occurred at
Arg3: 9cef0840, Trap Frame
Arg4: 00000000

Debugging Details:
------------------

PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffd400c). Type ".hh dbgerr001" for details

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

FAULTING_IP:
nt!RtlInitUnicodeString+1b
81c88043 f266af repne scas word ptr es:[edi]

TRAP_FRAME: 9cef0840 -- (.trap 0xffffffff9cef0840)
ErrCode = 00000000
eax=00000000 ebx=fe414fd8 ecx=ffffffec edx=9cef0914 esi=fe40fcf0 edi=fe415000
eip=81c88043 esp=9cef08b4 ebp=9cef0924 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
nt!RtlInitUnicodeString+0x1b:
81c88043 f266af repne scas word ptr es:[edi]
Resetting default scope

DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT

BUGCHECK_STR: 0x8E

PROCESS_NAME: WINOAC.EXE

CURRENT_IRQL: 0

LAST_CONTROL_TRANSFER: from 81c72fbe to 81cfc759

STACK_TEXT:
9cef0400 81c72fbe 0000008e c0000005 81c88043 nt!KeBugCheckEx+0x1e
9cef07d0 81c9953a 9cef07ec 00000000 9cef0840 nt!KiDispatchException+0x1a9
9cef0838 81c994ee 9cef0924 81c88043 badb0d00 nt!CommonDispatchException+0x4a
9cef085c 9976011a 99771680 997708e8 00000000 nt!Kei386EoiHelper+0x186
9cef0924 9959efab 5d0102bb 00000006 00000002 RDPDD!OE2_TableEncodeOrderFields+0x11e
9cef0a0c 995aeaf8 5d0102bb 00000006 00000002 win32k!xxxRealDrawMenuItem+0x80b
9cef0abc 9958455b 5d0102bb 0110007e 9cef0b04 win32k!xxxDrawState+0x1c9
9cef0b2c 995853e1 5d0102bb fe40fc78 00c8d0d4 win32k!xxxDrawMenuItem+0x3f8
9cef0b98 9959f511 5d0102bb 00000000 fe414570 win32k!xxxMenuDraw+0x1f2
9cef0bf0 994ed1d6 00000017 5d0102bb 00000004 win32k!xxxMenuBarDraw+0x1bf
9cef0c38 9950c0f5 fe414570 5d0102bb 00000001 win32k!xxxDrawWindowFrame+0xf7
9cef0cb4 9950d73d fe414570 00000085 090402df win32k!xxxRealDefWindowProc+0x88b
9cef0ccc 994e673d fe414570 00000085 090402df win32k!xxxWrapRealDefWindowProc+0x2b
9cef0ce8 9950d6f4 fe414570 00000085 090402df win32k!NtUserfnNCDESTROY+0x27
9cef0d20 81c9897a 000200ba 00000085 090402df win32k!NtUserMessageCall+0xc6
9cef0d20 77089a94 000200ba 00000085 090402df nt!KiFastCallEntry+0x12a
WARNING: Frame IP not in any known module. Following frames may be wrong.
0012d7cc 00000000 00000000 00000000 00000000 0x77089a94


STACK_COMMAND: kb

FOLLOWUP_IP:
RDPDD!OE2_TableEncodeOrderFields+11e
9976011a 8b4518 mov eax,dword ptr [ebp+18h]

SYMBOL_STACK_INDEX: 4

SYMBOL_NAME: RDPDD!OE2_TableEncodeOrderFields+11e

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: RDPDD

IMAGE_NAME: RDPDD.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 4791923e

FAILURE_BUCKET_ID: 0x8E_RDPDD!OE2_TableEncodeOrderFields+11e

BUCKET_ID: 0x8E_RDPDD!OE2_TableEncodeOrderFields+11e

Followup: MachineOwner
---------

------------------------------------------------------------------------------------------


Microsoft (R) Windows Debugger Version 6.10.0003.233 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\esinnard\Desktop\Windows Dumps\2-3-09-2\MEMORY.DMP]
Kernel Summary Dump File: Only kernel address space is available

Symbol search path is: SRV*C:\ProgramData\Symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows Server 2008/Windows Vista SP1 Kernel Version 6001 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: Server, suite: TerminalServer
Built by: 6001.18145.x86fre.vistasp1_gdr.080917-1612
Machine Name:
Kernel base = 0x81c13000 PsLoadedModuleList = 0x81d20930
Debug session time: Tue Feb 3 14:20:03.117 2009 (GMT-6)
System Uptime: 0 days 2:00:33.869
Loading Kernel Symbols
...............................................................
................................................................
.............
Loading User Symbols
PEB is paged out (Peb.Ldr = 7ffdc00c). Type ".hh dbgerr001" for details
Loading unloaded module list
.....
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 8E, {c0000005, 81c5a043, d60a5840, 0}

Page bce51 not present in the dump file. Type ".hh dbgerr004" for details
Page bce22 not present in the dump file. Type ".hh dbgerr004" for details
Page bb16b not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
PEB is paged out (Peb.Ldr = 7ffdc00c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffdc00c). Type ".hh dbgerr001" for details
Probably caused by : win32k.sys ( win32k!OffBitBlt+97 )

Followup: MachineOwner
---------

0: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

KERNEL_MODE_EXCEPTION_NOT_HANDLED (8e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: 81c5a043, The address that the exception occurred at
Arg3: d60a5840, Trap Frame
Arg4: 00000000

Debugging Details:
------------------

Page bb16b not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
Page bce5a not present in the dump file. Type ".hh dbgerr004" for details
PEB is paged out (Peb.Ldr = 7ffdc00c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffdc00c). Type ".hh dbgerr001" for details

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

FAULTING_IP:
nt!RtlInitUnicodeString+1b
81c5a043 f266af repne scas word ptr es:[edi]

TRAP_FRAME: d60a5840 -- (.trap 0xffffffffd60a5840)
ErrCode = 00000000
eax=00000000 ebx=fe41afd8 ecx=ffffffec edx=d60a5914 esi=fe40f5e0 edi=fe41b000
eip=81c5a043 esp=d60a58b4 ebp=d60a5924 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
nt!RtlInitUnicodeString+0x1b:
81c5a043 f266af repne scas word ptr es:[edi]
Resetting default scope

DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT

BUGCHECK_STR: 0x8E

PROCESS_NAME: WINOAC.EXE

CURRENT_IRQL: 0

LAST_CONTROL_TRANSFER: from 81c44fbe to 81cce759

STACK_TEXT:
d60a5400 81c44fbe 0000008e c0000005 81c5a043 nt!KeBugCheckEx+0x1e
d60a57d0 81c6b53a d60a57ec 00000000 d60a5840 nt!KiDispatchException+0x1a9
d60a5838 81c6b4ee d60a5924 81c5a043 badb0d00 nt!CommonDispatchException+0x4a
d60a585c 999e2242 ff888010 00000000 00000000 nt!Kei386EoiHelper+0x186
d60a5924 999befab 1401009b 00000006 00000002 win32k!OffBitBlt+0x97
d60a5a0c 999ceaf8 1401009b 00000006 00000002 win32k!xxxRealDrawMenuItem+0x80b
d60a5abc 999a455b 1401009b 0110007e d60a5b04 win32k!xxxDrawState+0x1c9
d60a5b2c 999a53e1 1401009b fe40d168 00c8d0d4 win32k!xxxDrawMenuItem+0x3f8
d60a5b98 999bf511 1401009b 00000000 fe418398 win32k!xxxMenuDraw+0x1f2
d60a5bf0 9990d1d6 00000017 1401009b 00000004 win32k!xxxMenuBarDraw+0x1bf
d60a5c38 9992c0f5 fe418398 1401009b 00000001 win32k!xxxDrawWindowFrame+0xf7
d60a5cb4 9992d73d fe418398 00000085 0904035f win32k!xxxRealDefWindowProc+0x88b
d60a5ccc 9990673d fe418398 00000085 0904035f win32k!xxxWrapRealDefWindowProc+0x2b
d60a5ce8 9992d6f4 fe418398 00000085 0904035f win32k!NtUserfnNCDESTROY+0x27
d60a5d20 81c6a97a 0003001c 00000085 0904035f win32k!NtUserMessageCall+0xc6
d60a5d20 77049a94 0003001c 00000085 0904035f nt!KiFastCallEntry+0x12a
WARNING: Frame IP not in any known module. Following frames may be wrong.
0012d7cc 00000000 00000000 00000000 00000000 0x77049a94


STACK_COMMAND: kb

FOLLOWUP_IP:
win32k!OffBitBlt+97
999e2242 8b4d20 mov ecx,dword ptr [ebp+20h]

SYMBOL_STACK_INDEX: 4

SYMBOL_NAME: win32k!OffBitBlt+97

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: win32k

IMAGE_NAME: win32k.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 48d1b9ef

FAILURE_BUCKET_ID: 0x8E_win32k!OffBitBlt+97

BUCKET_ID: 0x8E_win32k!OffBitBlt+97

Followup: MachineOwner
---------




Error 1606. Could not access network location %SystemDrive%\inetpub\wwwroot\ while installing on IIS7

I'm trying to port our software installer which currently supports Windows 2000 and Windows 2003 to a Windows 2008 environment. Currently, the installer gets an error which reads "Error 1606. Could not access network location %SystemDrive%\inetpub\wwwroot."



%SystemDrive% is without a doubt C:\, and C:\inetpub\wwwroot\ has the correct accessibility.



It is interesting that if I hardcode the path in the following keys in the registry to C:\inetpub\wwwroot\, without using the environment variable, the installer works correctly.
• HKLM/Software/Wow6432Node/Microsoft/InetStp/PathWWWRoot
• KHLM/Software/Microsoft/InetStp/PathWWWRoot.



This seems like a very poor hack. I do not want to tell our clients that they need to hack their registry before they will be able to install our product. Another option is to change the registry behind the scenes, do our install, and revert the registry keys to their original values at the end of the install, but obviously I don't like this solution either.



I find it hard to believe that Microsoft would have done this without reason, so there must be an alternate approach to get these installers to work without modifying the registry.



Any tips appreciated.





jQuery toggle/vertical slider effect with multiple Divs

Actually, I am new to jQuery and I am writting a sample page with jQuery functions. In this page I am making use of toggle function. Please help me to get the intended effect. I am trying to get it but it is not working properly.
The effect I am trying to apply is;




  1. There are 2 buttons on the page, say Button1 and Button2.

  2. There are 2 Divs, say Div1 and Div2.

  3. Initially both Divs are hidden and only 2 buttons are visible.

  4. If Button1 is clicked, Div1 should get toggle down and vice versa.

  5. If Div1 is in open state and Button2 is clicked, Div1 should go up slightly and Div2 should fall down.



I have written some code with CSS applied on it. But I am not getting the sliding effect as it gives with only one Div.



I have written Javascript as;



var IsPanelDown = false;
var IsPanel2Down = false;

$(document).ready(function() {

// Expand Panel
$("#open").click(function(){
if (IsPanel2Down == false)
{
$("div#panel2").slideUp("slow");
IsPanel2Down = false;
}
$("div#panel").slideDown("slow");
IsPanelDown = true;
});

// Collapse Panel
$("#close").click(function(){
$("div#panel").slideUp("slow");
IsPanelDown = false;
});

// Switch buttons from "Log In | Register" to "Close Panel" on click
$("#toggle a").click(function () {
$("#toggle a").toggle();
});

$("#toggle2 a").click(function () {
$("#toggle2 a").toggle();
});

$("#open1").click(function(){
if(IsPanelDown == false)
{

$("div#panel").slideUp("slow");
IsPanelDown = false;
}
$("div#panel2").slideDown("slow");
IsPanel2Down = true;
});

// Collapse Panel
$("#close1").click(function(){
$("div#panel2").slideUp("slow");
IsPanel2Down = false;
});
});




Deploying Content Type with Publishing HTML Field by Feature saving content not correctly

I have a problem using a Publishing HTML Field.



The Elements.xml:



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID="{987B9BA2-23AB-4E52-99DD-2D59BAA79F4B}" Name="LeftContent" DisplayName="Left Content" RichText="TRUE" RichTextMode="FullHtml" Type="HTML" Hidden="FALSE"></Field>

<!-- Parent ContentType: Article Page (0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D) -->
<ContentType ID="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D002da882f450a44abaacff86118ffffaeb"
Name="Left Content"
Version="0">
<FieldRefs>
<FieldRef ID="{987B9BA2-23AB-4E52-99DD-2D59BAA79F4B}"/>
</FieldRefs>
</ContentType>

</Elements>


In my Page Layout I use ...



<PublishingWebControls:RichHtmlField id="rchHtmlFldROSTableTwoColumnRight" FieldName="ROSTableTwoColumnRight" runat="server"/>


The problem is that when I create a page based on the page layout with this content type and edit the field, SharePoint saves the content not as HTML but HTML Entities. So in not-edit-mode you see the HTML source code like

Hello World



I hope somebody can help me.
Thanks!! ;)





apache rewrite port for a certain path

I would need to rewrite



(http: or https:)//my.domain.com/foo/


into



(http: or https:)//my.domain.com:8080/foo/


I was not sure if apache mod-proxy could do that, and how





AS3 How to simulate the throwing of something?

So I have started this game, and the premise is you are going to be running around, and balls are going to be thrown from the sides of the screens. You have to try to dodge the balls. What I want to know is how do you make the balls act like they are actually being thrown. Like what would be the formula or whatever for something like this.





Should we use IE's CSS Dynamic properties?

Should we use IE's CSS Dynamic properties?



I read IE8+ would not support these.



What is the best strategy to handle this?





forcefully logout a specific user among all online users

I'm developing a website in asp.net.

In my site administrator can view list all other online users.

Administrator can also disable any account from that list.

Everything was going fine so far. But now i decided to logout the user which is beeing disabled. How to do a logout operation for a particular user from the above specified online user list.



NOTE: I'm using default membership schema for my sql server database.



PLEASE HELP.





My mod_rewrite code in htaccess caused the page to not load

I have horrible URLs like this:



http://example.com/subfolder/index.php?a=1&b=1&token=8d519decbe60db44154b1fbc8c553ac4



I am trying to make it look like this:



http://example.com/subfolder/menu/1/1/#/



But this code is causing the page to crash/not be found or something:



RewriteEngine on

RewriteCond %{QUERY_STRING} ^a=([0-9]+)&b=([0-9]+)&token=([A-Za-z0-9]+)
RewriteRule ^subfolder/index.php /menu/$1/$2/#? [R=301,L]


I put this .htaccess file in my root folder example.com/.htaccess, do I need to put it in the subfolder?



I'm getting 404 page not found error !





No action after PHP form Posted to SQL

I'm making a calendar of events, and the "details" for the event are on a hidden div.
I have a small icon that, when clicked, uses javascript to show the details.



What I want is that when this is clicked, the icon is replaced by a different icon (to show it is 'open') and for that icon, when clicked, to close the div again.



So the current code is



<a href="#" onclick="Effect.BlindDown('eventdetails<?php echo $event_count;?>'); return false;"><img class="open" src="./img/plus.png"></a>


And I'd want the image to change to "minus.png". So then it would be



<a href="#" onclick="Effect.BlindUp('eventdetails<?php echo $event_count;?>'); return false;"><img class="open" src="./img/minus.png"></a>  


But cant quite figure it out. Any ideas?



UPDATE



OKay, currently have from Mia, but still not working



<a href="#" onclick="toggleDisplayWait("eventdetails<?php echo $event_count;?>", "icon", 800); return false;"><img id="icon" class="open" src="./img/plus.png"></a>


And in the header...



    function toggleDisplayWait(divId, imgId, durationmSec) {
if(!$(divId).visible()) {
move = Effect.BlindDown;
newImage = "./img/minus.png";
}
else {
move = Effect.BlindUp;
newImage = "./img/plus.png";
}
move(divId, {duration: durationmSec / 1000.0 });
setTimeout(function() { $(imgId).src = newImage; }, durationmSec)
}

$(divId).hide();

</script>


When I run the event, I get a syntax error on toggledisplaywait (





AIR native extension: how do I return an ArrayList from android native code

I have written an android native extension to get the list of songs in the android phone. Retrieving song works fine. I am saving the list of songs in an ArrayList in native code.



I am able to return the size of the ArrayList to AIR app, but how do I return the full ArrayList itself.



Can someone please guide me?



Thank you in advance.





I have two identical mysql databases running on the same server. The old one works fine. The new one is getting terrible performance with 'order by'

I've been in the middle of migrating a drupal-5 site to drupal-6. Unfortunately, once I made a copy of the drupal-5 database, the new db has terrible performance problems. Queries like this one:




SELECT DISTINCT(n.nid), n.title, n.created FROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE n.type <> 'acidfree' AND tn.tid = 402 AND n.status = 1 ORDER BY n.nid, limit 1;



can take several seconds to execute on the new db while the identical query completes in under a millisecond on the old db. I've run mysqlcheck --repair and --optimize, with no benefit, and the hosting provider is insisting that it's my lousy sql that's causing the problem.



Any suggestions on how to fix this? Queries like that one are used to load random photos onto pages of the site and some pages are taking as long as a minute to load.



EDIT: After 2 weeks of complaints about this, the problem suddenly resolved itself (within minutes of posting here). The provider insists they didn't change anything.....



I might as well close this question for now. Thanks for the suggestions.