code

Need help with Values

I want to take a value ex: <input type="hidden" name="quicksearch" value="**1**" /> from a third party website. then place that value on my website ex: <input type="hidden" name="quicksearch" value="**REPLACE WITH 1**" /> ...

whats the format for a string of forward slash / in c#

Hi, I'm using a htmlhelper where i give table data id's based on day and month values which are retrieved. The problem is the id is not recognized in the format it is. / seems to not be picked up yet when i replace '/' with '-' it works. daysRow.AppendFormat("<td id='{0}/{1}'>{0}</td>", day, d1.Month.ToString()); can anyone tell me h...

what is the best program for arranging codes?

i need a program that make my php and html codes tidy.i mean remove unnecessary spaces,tabs,newlines and ... . thanks for helping. ...

java tracing spaghetti code

Folks, I have just joined this company which has a huge source tree based upon JSP/Servlet and EJB 1.2. No documentation exists. The code has been written over seven years, with a large number of undocumented changes. Are there any tool tah can assist me in tracing the execution? Putting a breakpoint is not helping me much. ...

Need a hand understanding this Java code please :-)

Hi all, Just wondering if anyone would be able to take a look at this code for implementing the quicksort algorithm and answer me a few questions, please :-) public class Run { /*************************************************************************** * Quicksort code from Sedgewick 7.1, 7.2. *********************************...

Android: Create a ColorDrawable object without using xml

Is it possible to create a ColorDrawable object without using xml? I would like to be able to change the backgroundColor of a view programmatically, using setBackgroundColor() or setBackgroundDrawable() or setBackgroundResource(), but I want to be able to specify the RGB values in code, not XML. Is this possible? ...

Where do I input a piece of code in Emacs?

Hi there, I have just started using Emacs for the specific purpose of editing latex documents. I was attracted to Emacs because I want to be able to customize syntax highlighting even to the point of defining the colors of specific words. I am new to Emacs and not a programmer, so I having an extreme difficulty in doing what I want to d...

How to group rules in jquery

Hi I've got a simple question. I've this code below, i use ajax three times in very similiar ways the only things that change are the data passed and the id of the target. Is there a way to group these instructions in a simple one? Thx D. $('#fld_email').focusout(function() { var request_email = $(this).val(); ...

where is wrong in my php code ????

hi all, <td align="center" bgcolor="#FFFFFF"><?php echo '<label onclick="window.open('profilephp.php?member=$row['MemberID']','mywindow')">'.{$row['MemberName']}.'</label>';?><br /> <?php echo "<p align='center'><img width='100' height='100' src={$row['MemberImg']} alt='' /></p>";?></td></tr> Parse error: syntax error, unexpected T_S...

Code coverage (c++ code execution path)

Let's say I have this code: int function(bool b) { // execution path 1 int ret = 0; if(b) { // execution path 2 ret = 55; } else { // execution path 3 ret = 120; } return ret; } I need some sort of a mechanism to make sure that the code has gone in any possible path, ...

C# and F# lambda expressions code generation

Let's look at the code, generated by F# for simple function: let map_add valueToAdd xs = xs |> Seq.map (fun x -> x + valueToAdd) The generated code for lambda expression (instance of F# functional value) will looks like this: [Serializable] internal class map_add@3 : FSharpFunc<int, int> { public int valueToAdd; internal ...

Can one make Code Analysis understand Code Contracts?

Hi all, When using Code Analysis and Code Contracts in combination, I get a lot of warnings like warning : CA1062 : Microsoft.Design : In externally visible method 'Foo.Bar(Log)', validate parameter 'log' before using it. In Foo.Bar, I have a Contract that validates 'log'. public Bar(Log log){ Contract.Requires(log != null); lo...

Unmanaged Code calling leads to heavy memory leak!!

Maybe I need change the title as "Unmanaged Code calling leads to heavy memory leak!" The leak is around 30M/hour I think maybe I need complete my code here because the memory leak maybe not from a static string whereas my real code derive this string from external device (see new code attached). so I handle also unmanaged code. Could ...

Best PHP xml2array function

I need a function that takes a string as XML input and change that into an array. Example: <a> <b> <c></c> </b> </a> So I can read it in PHP like this: $array = xml2array($xmlcode); echo $array['a']['b']['c']; Note: I tried all xml2array functions in PHP's documentation on xml_parse, and they all didn't work or had problems. ...

MSTest code coverage

Hi, I have a test project for a web service and, when I run tests in debug mode, everything works ok. However, when I just run tests, I get following error, for a referenced assembly that I try to obtain code coverage: Class Initialization method WebServiceTest.wstest.MyClassInitialize threw exception. System.IO.FileLoadException: Sys...

Colorize code inside <code></code>

I'm looking for a open source PHP script to colorize the code inside <code></code> or [code][/code] tags. Thanks ...

XCode Code Snippet Macros Not Working Consistently

Hi, I'm a newbie, but things aren't consistently working for me in the XCode editor. I'll be in a method, and type "For" (without the quotes of course). What's supposed to happen is the entire For structure appears for me to fill in, right? Well, the For gets highlighted to show it's a key word, but the snippet doesn't show up. At that ...

persistant '<class>' may not respond to +method

I've found a bunch of posts on this problem and have actually managed to removed one of the warnings i was getting from these however one persists. Some context: I'm creating currency converter as an exercise in learning Objective C My Rate class represents a rate that a currency can be converted to or from looks like this: Rate.h //...

How does one use VirtualAllocEx do make room for a code cave?

How does one use VirtualAllocEx do make room for a code cave? I am currently in possession of a piece of software with very little "free space" and i read that VirtualAllocEx is used for making this space.. Thanks! Jake ...

What is CodeResources in Cocoa Mac apps?

I see these CodeResources folders in some of the system Mac apps and some third party apps. What are they? ...