Aside from rewriting the entire RichTextBox control, is there a way to apply the built-in shader effects (e.g. DropShadowEffect) to a specific piece of text or even a Paragraph or Run?
I have a mainForm and a saveForm.
I never close the mainForm, just let the saveForm appear over the top.
When i close the saveForm, I want a piece of code to run on returning to mainForm.
What is the best way to achieve this?
I created a high memory utilization dump and using !dumpheap -stat and !dumpheap -mt I got the address of two large string generic list of 30 MB each.
I want to know more about these lists. What they contain or which piece of code is using them.
Is there a way to find them out?
0:000 !do 2b370038
Name: System.Object[]
MethodTable: 71e240bc
EEClass: 71c0da54
Size: 33554448(0x2000010) bytes
Array: Rank 1, Number of elements 8388608, Type CLASS
Element Type: System.Collections.Generic.List`1[[System.String, mscorlib]]
Fields:
None
Essentially, I wanted to run a piece of demo code from W3c Offline Webapps page. It looks like that:
var db = window.openDatabase("notes", "", "The Example Notes App!", 1048576);
Firefox 3.5, IE8 and Chrome do not seem to get it. Is there anybody out there that actually wrote support for that? Or is this wishful thinking about 'the standard of the future'?
I want to intercept minimize/maximize events for a windows mobile 6.1 application in c#. Is there a simple way to achieve this. (A piece of code as an example would be great).
I need to know when the user plays with my application or the application runs in background.
Hi Everybody, I really like Hudson CI and I do think it is the most useful and effective piece of software ever made for the Agile Application Lifecycle :-)
Anyway if the CI become unstable, the development is going to be really compromised, so keeping an eye on it is CRUCIAL !
Does anybody know about an effective solution for always monitoring it while you are "on the road" ? (maybe using your iPhone or iPod)
I'm working on a 64-bit Windows and my applicaiton runs with elevated privileges. I have a problem with the following very simple piece of code:
myKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
if (myKey != null)
{
string[] HKLMvaluenames = myKey.GetValueNames();
}
But for some reason HKLMvaluenames array is populated with values from the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
Is there a way around this problem?
I found this piece of code:
char a = 1["ABC"];
A few quick test led me to the fact it was the same than writing:
char a = "ABC"[1];
Which seems far more logical to me. So my questions:
Why is this notation valid?
Is there any reason to write something that way?
Will the following piece of code work as expected in a multi-threaded scenario?
int getUniqueID()
{
static int ID=0;
return ++ID;
}
It's not necessary that the IDs to be contiguous - even if it skips a value, it's fine.
Can it be said that when this function returns, the value returned will be unique across all threads?
I want example.com/23-45 be transformed to example.com?id=23-45
Could you please post the code I should add to .htaccess file to make this work
(Is this everything I should do to make this work - add a piece of code to .htaccess file ???)
Thanks a lot!
Hi everyone,
I have started to try APC to store some specific data on each webserver as an complement to memcached.
However, the following code piece is giving me headaches:
echo apc_store('key', 'value');
echo apc_store('key', 'newvalue');
echo apc_fetch('key');
Result:
value
Why is apc_store not working as properly?
Consider the following piece of code :
<select>
<option value="0">foo</option>
<option value="1" selected="selected">bar</option>
</select>
If I select the first option and reload the page, the first option stays selected and the select does not switch to the second option. How can I force firefox to give priority to the html?
I need a little piece of advice.
I have a test page with 2 fields: word number and URL
Also i have a button Push.
When i push the button i want to open the specified URL (it's local html files) and highlight the word at the "word number" position
Of course the code must ignore element nodes (<p>,<b>,<table> and so on)
I have the following piece of code:
root="//valueExpression[matches(self::*,'pattern')]/.."
But I can only use XPath 1.0 and I get an exception for the function matches(). Can you please help me with a solution using only functions from XPath 1.0 ?
What is the basic setup on the subject?
Let say I have a QByteArray, and I need to encrypt it with simple password.
And then decrypt it in another piece of code
Just a very simple setup
I've a piece of code that launches an Intent. I'm wondering if there's any way to get return codes and/or catch exceptions? The particular scenario I'm facing is when I launch an Intent passing a 'rtsp' URL but it turns out the URL isn't available.
How can i write 'one bit' into a file stream or file structure each time? is it possible to write to a queue and then flush it ? is it possible with c# or java?
this was needed when i try to implement an instance of Huffman codding. i can't write bits into files. so write them to a bitset and then (when compression was completed) write 8-bit piece of it each time (exclude last one).
I've a simple product installer for windows OS, which could be evaluated for a month. What are the techniques I can use so that this piece of software is not used after a month? I've seen that several s/w use system date to check it but it's very primitive and easily forge-able. I think a key based system based on registry or online verification could be an option but I don't know much about these.
Please help.
I have a piece of usb hardware, for which I know the driver.
However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ?
I have a repeater to call a child... my code is as follows:
<mx:Repeater id="projectRP" dataProvider="{projectsHttp.lastResult.project}">
<Block:project id="wholeProject"
projectID="{projectRP.currentIndex}"
workingTitle="{projectRP.currentItem.workingTitle}"
projectTitle="{projectRP.currentItem.projName}"
startDate="{textToDate(projectRP.currentItem.startDate)}"
projectPositions="{XML(projectRP.currentItem.positions)}"
creationComplete="Alert.show(String(projectRP.currentIndex))"
/>
</mx:Repeater>
For some reason, the creationComplete piece isn't s
Hello,
nowadays I have this piece of code:
#import "C:\Users\Public\SoundLog\DLLs\ForPython\SoundLogDLL.tlb" named_guids
but I want to substitute the C:\Users\Public part by the %PUBLIC% environment variable.
How can I do this ?
After performing an ajax request if the input in the form was wrong I am trying to get this validatationTextBox to be focussed on and display an indicator message showing the problem.
The code is:
dijit.byId("passwordField").focusNode.focus()
The form element is as mentioned a validationTextBox.
The matter that is confusing me even further is that before in dojo 1.5, this piece of code was simply dijit.byId("passwordField").focus() and this worked fine. How can I fix this?
I just found two piece of code
#if CONSOLE // defined by the console version using
ournamespace.FactoryInitializer;
#endif
and
#if _NET_1_1
log4net.Config.DOMConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) );
#else
log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) );
#endif
Can any one please tell me with a running sample( please provide a simple one) what is the significance of those code snippets and when and how to use those?
Thanks.
Is there any unit testing framework for C like JUnit and Nunit for java and .NET?
Or how do we test a piece of code written in C for different scenarios?
Thanks in advance......
I'm trying to piece together a dynamic view that will give a list of all emails that are still being rejected.
Table structure:
EmailName - varchar(150) - An email address
StartRejection - Date - Day to start rejecting email
Duration - Small Int - Duration of rejection
IsIndefinate - Bit - Is the rejection 'non date range specific' but indefinate