What do you guys think? Should constants be capitalized? Or is that an archaic practice? So...
const int MY_CONSTANT = 5;
vs.
const int myConstant = 5;
In a Visual Studio Add-In, I'm enumerating over the members of a class in the current source file. When I encounter a property (e.g. CodeElement.Kind == vsCMElement.vsCMElementProperty) I cast that CodeElement to a CodeProperty and I can see the property's name and type.
What I'm having a problem with is getting a list of the property's…
There is a previous question ("Is a masters degree overkill?"), which is about the types of jobs available and the value of a masters when trying to get a job. What I am curious about the impact of programming ability.
I know you usually write a masters thesis on some topic, which I imagine forces you to specialize. Do your programming…
A requirement for a program I am writing is that it must be able to trust a configuration file. To accomplish this, I am using several kinds of hashing algorithms to generate a hash of the file at compile time, this produces a header with the hashes as constants.
Dependencies for this are pretty straight forward, my program depends on…
Hey all
Are there any pre-made scripts that I can use for PHP / MySQL to prevent server-side scripting and JS injections?
I know about the typical functions such as htmlentities, special characters, string replace etc. but is there a simple bit of code or a function that is a failsafe for everything?
Any ideas would be great. Many…
Hi all,
I have this regex that allow all php files :
^.*\.([Pp][Hh][Pp])
how can I exclude a specific file, for example test.php ?
Thanks for your answer,
Best regards
[edit]
I omit to say that it is a reg from a htaccess file, the /i doesn't seems to work, and the ? neither.
[Edit2]
the purpose is to grant access to…
I have a list of training dates saved into an XML file, and I have a little javascript file that parses all of the training dates and spits them out into a neatly formatted page. This solution was fine until we decided that we wanted another web-page on another sever to access the same XML file.
Since I cannot use…
Hi,
I include several images of eps format in latex. After latex command, there are some of the images missing in the dvi file. Not sure if it is related to the image size, most of the images missing have size around 83kB while those shown up have a size less than 40kB. After conversion from dvi to ps, the images…
I am working on .NET ClickOnce project that uses Sql Server 2005 Compact Edition to synchronize remote data through the use of a Merge replication. This application has been live for nearly a year now, and while we encounter occasional synchronization errors, things run quite smoothly for the most part.
…
I know that if I want to have requests for MyPage.aspx go to the class called MyHandler in the assembly called MyAssembly, I can add this to my web.config file:
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="MyPage.aspx" type="MyHandler, MyAssembly"/>
…
I'd like to be notified when a file has been created, deleted or changed, but not using polling mechanism.
I have surveyed related Java API that can use.(EX:JNotify, JPathWatch and JXFileWatcher)
Those APIs provide file monitor by using native component on OS. But I met the same problem is that they…
If I pay someone to write some software for me and our contract doesn't specify, do I own the rights to the source code, or does the company who wrote the software? Who does the intellectual property belong to in this situation?
I'm specifically interested in the answer as it applies in the United…
I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't…
I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found…
Hi,
I have a wide and long table. I am not sure how to put it in my thesis. Since it is wide, sidewaystable may be the choice. Meanwhile it is also to long to fit in one page, so longtable comes into my mind. However, I cannot make sideaystable and longtable working together for one table, e.g.…
Rumour has it that this;
SELECT * FROM lineage_string where lineage like '%179%' and lineage regexp '(^|/)179(/|$)'
Would be faster than this;
SELECT * FROM lineage_string where lineage regexp '(^|/)179(/|$)'
Can anyone confirm ? Or know a decent way to test the speed of such queries.…
I'm building an iPhone application where I detach some threads to do long-running work in the background so as not to hang the UI. I understand that threads need NSAutoreleasePool instances for memory management. What I'm not sure about is if the threaded method calls another method - does…
The company I am working for has a flash component (using flex and cs4) that crashes intermittently in chrome, FF and IE. (so far only win32 platforms)
I submitted a bug report to Adobe but have not heard anything back from them. Their support process seems like a black hole. WE can…
I must be missing something very basic in the CSS. My jQuery anchor button is functional, but it's rendering as a simple underlined label, not asa rounded-corner UI button. I would be grateful if someone could point out the error in this simple example.
Thanks
!DOCTYPE HTML PUBLIC…
Hi all,
i'm trying to make SwfUpload working. In some cases, I've a strange behaviour.
So I would like to inspect the flows sended and received by the flash component. And I've tryed to use fiddler to do that, but I can't capture data comming from flash or going to flash.
Is…
Hi there,
I am a Java newbie trying to maintain an application that works fine under J2SE 5.0 (32- and 64-bit) but has a very specific problem when run under Java SE 6 64-bit:
[Tims-MPB:~] tlynch% java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build…
I need a method of quickly searching a large 2 dimensional array. I extract the array from Excel, so 1 dimension represents the rows and the second the columns. I wish to obtain a list of the rows where the columns match certain criteria. I need to know the row number (or…
Hello,
the title says it all. I have seen some similar questions on SO like this or this, but either i have overlooked something or my requirement is different, neither works.
My situation is following:
i have a Masterpage
one of its contentpage is called…
In a WinForms application I need to detect when the contents of a System.Windows.Forms.WebBrowser is double clicked which in turn opens custom winform dialog box.
I note that WebBrowserBase disables the Control.DoubleClick event but I've not worked out how…
Greetings all,
I would very much like to determine the IP# of a domain from client script.
It's for use in a testing application to determine whether or not a certain domain is set to a QA address as opposed to the address live on the . The testing…