instruction stringlengths 0 30k ⌀ |
|---|
I've had success putting the output from one free obfuscator [into a different obfuscator][1]. In Dotfuscator CE, only some of the obfuscation tricks are included, so using a second obfuscator that has different tricks makes it more obfuscated.
[1]: http://harriyott.com/2008/09/obfuscations-what-you-need-if-you-... |
The fact that you actually can reverse engineer it does not make obfuscation useless. It does raise the bar significantly.
An unobfuscated .NET assembly will show you all the source, highlighted and all just by downloading the [.NET Reflector][1]. Add obfuscation to that and you'll reduce very significatively the a... |
[Latest version of Script#][1] was posted less than a month ago. Nikhil continues to actively work on that project and it's a very good tool for generating JavaScript code from C#. It is actively used in a couple of different internal Microsoft projects.
Some of the benefits of Script# are:
- Intellisense
... |
At my old job we used [SlickEdit][1] for C++ development under Debian. It's cross-platform and quite powerful.
It's not free, though.
[1]: http://www.slickedit.com |
<a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> is one option. Write Java code, debug it with a standard Java debugger, then press the "Compile" button and turn it into highly-optimized JavaScript. It generates completely separate JavaScript for each major browser family (IE, Firefox, Safari, etc.... |
That are many different ways that you can accomplish this, typically the best/easiest manner is to simply put a literal control in for Header, Footer, and Item templates. Then handle the ItemDataBound event, you can look at the item type and take a specific action on it there to load the needed data.
If you want to... |
Poppler programming |
|language-agnostic|pdf|cross-platform|poppler| |
Poppler is a classic example of something without documentation that you would prefer be documented. This question is language agnostic, just asking about the general idea..
In short, how do you make a PDF viewer control with poppler?
From what I can tell, you'd need to use poppler to render it to some surface, whi... |
These days 2TB fits in one machine, so you've got options, from simple to complex. These all presume linux servers:
- You can get poor-man's HA by setting up two machines and doing a periodic rsync from the main one to the backup.
- You can use <a href="http://www.drbd.org">DRBD</a> to mirror one from the other ... |
These days 2TB fits in one machine, so you've got options, from simple to complex. These all presume linux servers:
- You can get poor-man's HA by setting up two machines and doing a periodic rsync from the main one to the backup.
- You can use <a href="http://www.drbd.org">DRBD</a> to mirror one from the other ... |
This problem is caused by some JavaScript which eats keyboard events. You can hit the escape key, for example, which is trapped by one of the .js files and causes the shadow box to close.
Your choices are to hack through the files and find the problem, or not use shadowbox. Good luck! |
Javascript array with a mix of literals and arrays |
|javascript| |
I can create the following and reference it using
area[0].states[0]
area[0].cities[0]
var area = [
{
"State" : "Texas",
"Cities" : ['Austin','Dallas','San Antonio']
},
{
"State" :"Arkansas",
"Cities" ... |
I can create the following and reference it using
area[0].states[0]
area[0].cities[0]
var area = [
{
"State" : "Texas",
"Cities" : ['Austin','Dallas','San Antonio']
},
{
"State" :"Arkansas",
"Cities" ... |
|javascript|jquery| |
Asside from the cache issue mentioned above...
If you port the code to a processor with a smaller register size it will not be atomic anymore.
IMO, threading issues are too thorny to risk it. |
`__declspec( dllexport )` - The class or function so tagged will be exported from the DLL it is built in. If you're building a DLL and you want an API, you'll need to use this or a separate .DEF file that defines the exports. This is handy because it keeps the definition in one place, but the .DEF file provides more op... |
Well I was aware of the gears code already. The mechanism gears uses is based on a workaround through performing an explicit method call into the gears plugin from the gears loader to set the window object and use that as site interface instead of the IUnknown provided by IE Mobile in the SetSite call. Regarding to the... |
Suspend Process in C# |
|c#| |
How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.
I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it. |
|c#|.net| |
With perl you could do this:
my $tc_string = join ' ', map { ucfirst($\_) } split /\s+/, $string; |
No, there's no way to do that while still keeping the functionality your customers are 'implicitly' asking for. The only 'wrapping' in MSI you can do is to extract it on installation and start your InnoSetup installer from the temporary location where you extracted to. MSI is a fundamentally different way of working: I... |
How can an MFC application terminate itself? |
|c++|mfc|vc| |
What is the proper way for an MFC application to cleanly close itself? |
|c++|mfc|vcs| |
|c++|mfc|visual-c++| |
I often have aliases for vi, ls, etc. but sometimes you want to escape the alias. Just add a back slash to the command in front:
Eg:
$ alias vi=vim
$ # To escape the alias for vi:
$ \vi # This doesn't open VIM
Cool, isn't it? |
I question those of you who recommend the use of PerlUnit. It hasn't had a release in 3 years. If you really want xUnit-style testing, have a look at [Test::Class](http://search.cpan.org/perldoc?Test::Class), it does the same job, but in a more Perlish way. The fact that it's still maintained and has regular releases d... |
You should have a look at the `Send-PoshCode` function in the [PoshCode](http://PoshCode.org/) cmdlets script module ... it uses a POST, not a PUT, but the technique is practically identical. I don't have PUT server I can think of to test against, but basically, set your $url and your $data, and do something like:
... |
You could use the query grouping function on your query of records. You will obviously have to change the query fields according to your data and the left() function may be different syntax depending on your database engine. The query below works on MSSQL.
<cfquery datasource="#application.dsn#" name="qMembers... |
Look into NCover |
Do you mean all interfaces a Type implements?
Like this:
ObjX foo = new ObjX();
Type tFoo = foo.GetType();
Type[] tFooInterfaces = tFoo.GetInterfaces();
foreach(Type tInterface in tFooInterfaces)
{
// do something with it
}
Hope tha helpts. |
Actually what I discovered I needed to do was use the administration tools available from the Administration Launchpad. I was not responsible for installing Crystal and did not even realise this existed. The query builder and also the "Report Datasources" feature that were available from here was exactly what I neede... |
I use my keyboard, a text editor and my brain to generate JavaScript.
:P |
There is alway static fake object, but this question is about rhino-mocks, so I present you with a the way I'll do it.
The trick is that you create a local variable as the counter, and use it in your anonymous delegate/lambda to keep track of where you are on the array. Notice that I didn't handle the case that GetVal... |
There is alway static fake object, but this question is about rhino-mocks, so I present you with the way I'll do it.
The trick is that you create a local variable as the counter, and use it in your anonymous delegate/lambda to keep track of where you are on the array. Notice that I didn't handle the case that GetValue... |
Depending on exactly what is happening and what DNN is showing you you might be able to manually look inside the EventLog table, pull out the XML data stored there, and parse it to find the stack trace and detailed information regarding the specific error at hand.
I have found however though that I get MUCH better o... |
I think you need to make sure "Active Desktop" is turned on.
You might try setting `HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceActiveDesktopOn` to `1` (found [here][1]).
I haven't tried it, so no guarantees.
[1]: http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit... |
`__declspec( dllexport )` - The class or function so tagged will be exported from the DLL it is built in. If you're building a DLL and you want an API, you'll need to use this or a separate .DEF file that defines the exports ([MSDN][1]). This is handy because it keeps the definition in one place, but the .DEF file prov... |
Not a programming book, but still a very important book every programmer should read:
[Orbiting the Giant Hairball by Gordon MacKenzie][1]
[1]: http://www.amazon.com/Orbiting-Giant-Hairball-Corporate-Surviving/dp/0670879835/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221181519&sr=8-1 |
Example of the SHGetFolderPath in VB
http://support.microsoft.com/kb/252652 |
How to use getaddrinfo_a to do async resolve with glibc |
|c|dns|glibc|getaddrinfo-a| |
An often overlooked function that requires no external library, but basically has no documentation whatsoever.
|
OOP class design, Is this design inherintantly 'anti' OOP? |
|oop| |
I remember back when MS released a forum sample application, the design of the application was like this:
/Classes/User.cs
/Classes/Post.cs
...
/Users.cs
/Posts.cs
So the classes folder had just the class i.e. properties and getters/setters.
The Users.cs, Post.cs, etc. have the actual methods that access the... |
I will risk some down-votes here by saying: this seems a little bit schizophrenic, though a lot of people ask for it.
If you want Windows to download and install the updates, but **not** complete the install process by rebooting - what's the point? Why not simply turn of AutoUpdates in the first place? if you don't ... |
This is a wildly open ended question because how you use a SCM depends heavily on which SCM you choose. A distributed SCM like git works very differently from a centralized one like Subversion.
svn is way easier to digest for the "new user", but git can be a little more powerful and improve your workflow. Subversion... |
If you are using Subversion, you check out your files _once_ . Then, whenever you have made big changes (or are going to lunch or whatever), you _commit_ them to the server. That way you can keep your old work flow by pressing F5, but every time you _commit_ you save a copy of all the files in their current state in yo... |
Maybe not the correct answer, but at least a workaround:
1. define a Java template with the name "parenthesis" (or "pa") with the following :
(${word_selection})${cursor}
2. once the word is selected, ctrl-space + p + use the arrow keys to select the template
I used this technique for boxing primary t... |
You can use <a href="http://tidy.sourceforge.net/">tidy</a> to convert it to XHTML, and then use whatever XML processing facilities your language of choice has available. |
The Perl [WWW::Mechanize][1] library is excellent for doing the donkey work of interacting with a website to get to the actual page you need.
[1]: http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm |
Is Asp.net and Windows Workflow good combination? |
|asp.net|workflow| |
I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves.
Microsoft claims that asp.net and Windows Workflow is possible to combine. How hard is it to install and maintain a ... |
Use the properties. One interesting note from MS's framework design guidelines book is that if you have a property and need to add extra methods for more complex set/get, then you should eliminate the property and go with only get/set methods. |
I'd recommend [BeautifulSoup][1]. It isn't the fastest but performs really well in regards to the not-wellformedness of (X)HTML pages which most parsers choke on.
[1]: http://www.crummy.com/software/BeautifulSoup/ |
If you are trying to extract truly maximum performance from these loops, than I would recommend writing the entire looping construct in assembler. You should be able to use inline assembly depending on the data structures involved in your loop. Even better if you can unroll any piece of your loop (like the parts invo... |
Hibernate takes a snapshot of the state of each object that gets loaded into the Session. On flush, each object in the Session is compared with its corresponding snapshot to determine which ones are dirty. SQL statements are issued as required, and the snapshots are updated to reflect the state of the (now clean) Sessi... |
It depends on your skills with Ruby and/or Groovy, whether you have legacy Java systems to deal with, and where you want to deploy your applications.
I was initially thrilled with Rails. At the time, there wasn't an option of deploying on the application servers at work since work is all Java. This has changed. I c... |
I haven't used Delphi in years, but it probably depends on what Unicode encoding they use. UTF8 will be exactly the same for the regular ASCII character set (it only uses more than one byte when you get into the exotic characters). UTF16 might be a bit bloated. |
**There is no definitive answer.** However, I would choose a light solution, like Python or Rails, over Java or ColdFusion.
You may want to investigate *C# ASP.NET + Silverlight* combo. Microsoft made it highly integrated, which is double-edged sword. But in many cases this helps.
You may also want to **review** ... |
Take a look to org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck
Every element in the session goes to this method to determine if it is dirty or not by comparing with an untouched version (one from the cache or one from the database). |
Looking at the network point of view, either could be routing to the "internet" at any time. If things like spanning tree protocol are enabled on a swith then you may find that what may have been the routing card to begin with may not be anymore. |
Looking at the network point of view, either could be routing to the "internet" at any time. If things like spanning tree protocol are enabled on a switch then you may find that what may have been the routing card to begin with may not be anymore. |
I question those of you who recommend the use of PerlUnit. It hasn't had a release in 3 years. If you really want xUnit-style testing, have a look at [Test::Class](http://search.cpan.org/perldoc?Test::Class), it does the same job, but in a more Perlish way. The fact that it's still maintained and has regular releases d... |
I have had no problems with Smartassembly. |
I find email the most distracting, so I've really cracked down on receiving certain types of email. I've unsubscribed from many mailing lists, job alerts etc. Shutting down email for a period of the day is quite useful too. |
See this CodeProject article for the win32 basics : http://www.codeproject.com/KB/threads/pausep.aspx. This sample code makes use of the ToolHelp32 library from the SDK, so I would recommend turning this sample code into an unmanaged C++/CLI library with a simple interface like "SuspendProcess(uint processID).
Proc... |
If they cannot be combined, do compression first and then encryption. Compressing an already encrypted file will lead to poor compression ratios, because a lot of redundancy is removed. |
An alternative to obfuscation is converting your script to a binary using something like [ActiveState's Perl Dev Kit][1].
[1]: http://www.activestate.com/Products/perl_dev_kit/index.mhtml |
You should also consider the `array` module in the standard library if all the items in your list or tuple are of the same type. It can be faster and take less memory. |
function LastRowIndex(byval w as worksheet, byval col as variant) as long
dim r as range
set r = application.intersect(w.usedrange, w.columns(col))
if not r is nothing then
set r = r.cells(r.cells.count)
if isempty(r.value) then
LastRowIndex = r.end(xl... |
If you are trying to produce an xml file as output, you will want to produce `&` (as `&` on it's own is invalid xml). If you are just producing a string then you should set the output mode of the stylesheet to text by including the following as a child of the xsl:stylesheet
> `<xsl:output method="text"/>`
Thi... |
Most common usage as @aku pointed out is to allow a change to a pointer parameter to be visible after the function returns.
#include <iostream>
using namespace std;
struct Foo {
int a;
};
void CreateFoo(Foo** p) {
*p = new Foo();
(*p)->a = 12;
... |
No.
If done right, Test Driven Development IS your design tool.
I hope you forgive me for linking to [my own blog entry, wherein I discuss the pitfalls of Test Driven Development that went wrong][1] simply because developers treated their tests as, merely, tests.
In a previous project, devs used a highly damag... |
No.
If done right, Test Driven Development IS your design tool.
I hope you forgive me for linking to [my own blog entry, wherein I discuss the pitfalls of Test Driven Development that went wrong][1] simply because developers treated their tests as, merely, tests.
In a previous project, devs used a highly damag... |
You're spot on about needing a unit of work, but don't write one. Use NHibernate or some other ORM. That is what they're made for. They have Unit of Works built in.
Business objects are indeed "the way to go" for most applications. You're diving into a deep area and there will be much learning to do. Look into DDD.... |
if you have an MSDN License, check out [Expressions][1]. It's designed explicitly for WPF, exports directly to Visual Studio and it may help ease your transition.
[1]: http://www.microsoft.com/expression/ |
Are you sure the classes aren't partial classes. In which case they really aren't two classes, just a single class spread across multiple files for better readability. |
Based on your code snippet, **Posts** is primarily a class of static helper methods. **Posts** is not the same object as **Post**. Instead of **Posts**, a better name might be **PostManager** or **PostHelper**. If you think of it that way, it may help you understand why they broke it out that way. |
Disregard the "Cliff's Note" link - it's for VSTS 2005. There's no reason to install an old version - the installer (and everything else about the product) is MUCH improved with VSTS2008. Also make sure you install SP1 - it's not just bug fixes but some MAJOR enhancements.
Instructions for install are here: [Team ... |
We are currently rewriting our application in WPF from Winforms. Yes, there is a steep learning curve and you have to "re-learn" some things, but it is so worth it. And combined with WCF, we are finding we are writing less code, faster, and more robust than ever before. Stick with it for a while, read [Adam Nathan's... |
This is also an important step for a decoupling (or loosely coupling) you applications. |
Can you use Microsoft Entity Framework with Oracle? |
|oracle-database|entity-framework| |
Is it possible to use Microsoft Entity Framework with Oracle database?
|
Best way for allowing subdomain session cookies using Tomcat |
|java|tomcat|session|cookies|subdomain| |
By default tomcat will create a session cookie for the current domain.
If you are on www.example.com, your cookie will be created for www.example.com (will only work on www.example.com). Whereas for example.com it will be created for .example.com (desired behaviour, will work on any subdomain of example.com as well ... |
You could perhaps go around the problem by creating a new property:
public new int Bar
{
get { return 0; }
set {}
}
int IBase.Bar {
get { return Bar; }
} |
Is there any list of blog engines, written in Django? |
|python|django| |
Is there any list of blog engines, written in Django? |