instruction stringlengths 0 30k ⌀ |
|---|
These options are all good, but I would just put it on a USB key. |
One option is the up-and-comer <a href="http://getdropbox.com">DropBox</a>. A free filesharing service that gives you 2GB free, and no limit to the number of computers you share on.
Define a shared folder, put your tiddlywiki files in there, and then point the local editing to the shared drive. Any changes are autom... |
If I had to guess, I'd say it has to do with what zone the file is currently in. Its probably still considered in the "internet zone" when you click Open. VBA shouldn't be running within that zone.
Have a user mark the server website as safe (Control Panel -> Internet Options -> Security -> Trusted Sites -> Sites)... |
Use $_SERVER['HTTPS'] to tell if it is ssl, and redirect to the right place if not.
And remember, the page that displays the form does not need to be fed via https, it's the post back URL that needs it most. |
I loosely follow these guidelines:
* Web Forms/SQLDataSource- Quick and dirty app for internal use to show reporting or some other such data.
* MVC- Simple to complex business logic for a core product.
* MVC/REST Web Services/jQuery- HTML/Whatever type of client RIA's (when user experience reigns supreme).
* Flas... |
I didn't use Jaxer for very long, but here's some things I found:
**Pros**
* Write the frontend and backend in the same code. Especially nice for writing validation logic.
* "Seamless" AJAX communication back to the server - it's just like calling a JS function.
* The ability to use JavaScript frameworks like j... |
I need to join two lists, sort them and remove duplicates. Is there a better way to do this? |
|algorithm|lisp|sorting|list| |
I have two unsorted lists and I need to produce another list which is sorted and where all the elements are unique.
The elements can occur multiple times in both lists and they are originally unsorted.
My function looks like this:
(defun merge-lists (list-a list-b sort-fn)
"Merges two lists of (x,... |
[My answer][1] from [The Log File for Database is Full][2]:
As soon as you take a full backup of the database, and the database is not using the Simple recovery model, SQL Server keeps a complete record of all transactions ever performed on the database. It does this so that in the event of a catastrophic failure wh... |
I think most additional languages are offered so that if you develop in that language on a regular basis, you can feel comfortable writing db functions, triggers, etc. The usefulness of these features is to provide a control over data as close to the data as possible. |
Where are static variables stored (in C/C++)? |
|c|c++|compiler-construction| |
In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision?
For example:
<pre><code>
foo.c: bar.c:
static int foo = 1; static int foo = 10;
void fooTest() { void barTest() {
static int bar = 2; ... |
|c++|c|compiler-construction| |
In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don't have name collision?
For example:
<pre><code>
foo.c: bar.c:
static int foo = 1; static int foo = 10;
void fooTest() { void barTest() {
static int bar = 2; ... |
The technology used is usually not matter of choice and especially in a big company you don't have many options.
If I were able to choose a technology, in Java I would pick Wicket. I have been using Spring MVC and it is good, but Wicket has a neat features that Spring MVC has not: server-side state management and e... |
We use [TeamCity][1], from JetBrains. They also make Resharper And IntelliJ.
We use it for building our .Net applications, and it has been quite easy to set up, connect to TFS, and run additional tools from. It is very polished, and actually kinda reminds me of this site. Found it much nicer than CruiseControl, ... |
All information about the endpoint is available in metadata of a service, you can write a client what will explore the meta data of the service and will configure the client. For a code example you can look into this excellent [Mex Explorer](http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&tabid=19&downlo... |
Perl, Ruby, PHP, etc all have distribution mechanisms built into the language to consume such libraries.
There's not such a thing built into JS.
There are tons of script archives out there - but no "central" JS repo. |
Why not using the System.IO.FileInfo class, together with the DirectoryInfo class you have a set of usefull methods. |
How do you test your web UI to see if it renders uniformly across different browsers? |
|testing|browser|user-interface| |
Tools like Selenium are good for testing user interactions on the web UI. However, I was curious what are people approaches for strictly testing and verifying that web pages are rendered correctly across a set of browsers?
Is this even possible? |
I think the ONLamp introduction to metaclass programming is well written and gives a really good introduction to the topic despite being several years old already.
[http://www.onlamp.com/pub/a/python/2003/04/17/metaclasses.html][1]
In short: A class is a blueprint for the creation of an instance, a metaclass is a... |
When doing an initial design I like a whiteboard and 1 - 3 other developers to bounce ideas off of. That's usually enough to catch any glaring errors/fix any tricky situations that may arise without dropping the s/n ratio by too much. |
I find pen and paper, a whiteboard and possibly some <a href="http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card">CRC cards</a> to be very useful. Most of the time I think a whiteboard and some stickers or cards with the class and/or module names written on them work best when doing planning and desig... |
you can broaden your question : "how can I protect my .net assemblies from reverse engineering ?"
the answer is - you can not. just look up "reflector", and run it on some code.
(by the way, this is always the answer for code that is out of your hands, as long as you do not have en/decryption hardware sent with ... |
you can broaden your question : "how can I protect my .net assemblies from reverse engineering ?"
the answer is - you can not. for those who havent seen it yet, just look up "reflector", and run it on some naive exe.
(by the way, this is always the answer for code that is out of your hands, as long as you do not... |
Performance bottlenecks will be the same regardless of whether the architecture is 32- or 64-bit. Performance problems tend to be the result of sub-optimal algorithms — the choice between 32- and 64-bit types won't significantly affect performance.
Most importantly, don't try to improve the performance of some... |
Does anyone have .Net Excel IO component benchmarks? |
|c#|excel|components| |
I'm needing to access Excel workbooks from .Net. I know all about the different ways of doing it (I've written them up in a [blog post][1]), and I know that using a native .Net component is going to be the fastest. But the question is, which of the components wins? Has anybody benchmarked them? I've been using Syncfusi... |
I usually start with a empty interface then start writing tests. I then generate the members using refactoring tools. For me unit testing is part of the design. |
I use pen and paper.
For all planning purposes, it's the fastest way.
I get lost in layout and finetuning when I use a UML package.
But that is my burden.. :-) |
The easiest way I've found to do that in an X-Window environment is through X resources. The relevant part of my .Xdefaults looks like this:
Emacs.geometry: 80x70
Note that I don't care where the windows go ;-) You can probably suffix it with +0+0 location coordinates to get it in the upper-left corner of yo... |
The easiest way I've found to do that in an X-Window environment is through [X resources][1]. The relevant part of my .Xdefaults looks like this:
Emacs.geometry: 80x70
You should be able to suffix it with +0+0 location coordinates to force it to the upper-left corner of your display. (the reason I don't do ... |
You should check out [Curried JavaScript Functions][1]. I haven't completely wrapped my head around his curry function, but it might have your answer.
[1]: http://www.svendtofte.com/code/curried_javascript/ |
You should check out [Curried JavaScript Functions][1]. I haven't completely wrapped my head around his curry function, but it might have your answer.
Edit: I would agree with your assessment, however.
[1]: http://www.svendtofte.com/code/curried_javascript/ |
Just a thought, but I wonder if your use of a forward slash when setting the logger is causing a problem? instead of
config.setLogConfig("d:/temp", Level.FINEST);
you should use
config.setLogConfig("/temp", Level.FINEST);
or
config.setLogConfig("d:\\temp", Level.FINEST);
Finally, I ... |
As many people have stated you really can't convert a floating point back to a fraction (unless its extremely exact like .25). Of course you could create some type of look up for a large array of fractions and use some sort of fuzzy logic to produce the result you are looking for. Again this wouldn't be exact though ... |
The following C++ function can do that:
HRESULT GetElevationType( __out TOKEN_ELEVATION_TYPE * ptet );
/*
Parameters:
ptet
[out] Pointer to a variable that receives the elevation type of the current process.
The possible values are:
TokenElevationTypeDefault - Th... |
if(StartDate < EndDate)
{}
DateTime supports normal comparision operators. |
Check out DateTime.Compare method |
Just look around online and start trying to use whatever tool/technology your trying to learn. As you try to learn one thing, you'll realize your lacking knowledge in other needed areas. at which point you can repeat the process of looking around for this new item you need to learn.
for example, maybe you want to l... |
StartDate < EndDate |
if (StartDate < EndDate)
// code
if you just want the dates, and not the time
if (StartDate.Date < EndDate.Date)
// code |
You're getting into "Anti-reversing techniques". And it's an art basically. Worse is that even if you stomp newbies, there are "anti-anti reversing plugins" for olly and IDA Pro that they can download and bypass much of your countermeasures.
Counter measures include debugger detection by trap Debugger APIs, or det... |
Like Barry said, people took advantage of consts; One of the ways this was used, was for keeping track of singleton instances.
If you look at a classic singleton implementation, you would see this :
// Example implementation of the Singleton pattern.
TSingleton = class(TObject)
protected
... |
kbhit is indeed not part of any standard C interfaces, but can be found in conio.h.
However, you should be able to use getc/getchar from tango.stdc.stdio - I changed the FAQ you mention to reflect this. |
Manually?
I do not see an alternative if you want strict testing. Just install as many different browsers as possible and test in all of them. Of course this includes different versions of most popular browsers, and you need to check on Windows, Linux and Macintosh.
|
One of the strongest solutions to this problem is [Trusted Computing][1]. Basically you would encrypt the application and transmit the decryption key to a special chip (the [Trusted Platform Module][2]), The chip would only decrypt the application once it has verified that the computer is in a "trusted" state: no memor... |
Use $_SERVER['HTTPS'] to tell if it is ssl, and redirect to the right place if not.
And remember, the page that displays the form does not need to be fed via https, it's the post back URL that needs it most.
*edit* yes, as is pointed out below, it's best to have the entire process in https, it's much more reassu... |
The [RESTWiki][1] is a very good resource and then there is the classic ["How I explained REST to my Wife"][2].
However, don't forget to go read about it directly from the [source][3], it is not as difficult a read as it may first seem.
And I am assuming you will be doing REST over HTTP so [this][4] will come ... |
Directory.CreateDirectory() should do it.
http://msdn.microsoft.com/en-us/library/system.io.directory.createdirectory(VS.71).aspx
Also, in Vista, you probably cannot write into C: directly unless you run it as an admin, so you might just want to bypass that and create the dir you want in a sub-dir of C: (which i'd ... |
I just created a new Tiddlywiki at [TiddlySpot][1]. It allows you to keep a local copy of the Tiddlywiki and also sync it up with the server.
[1]: http://tiddlyspot.com/ |
Best way to start a thread as a member of a C++ class? |
|c++|pthreads| |
I'm wondering the *best* way to start a pthread that is a member of a C++ class? My own approach follows as an answer... |
Why does Imake interpret certain words in a Imakefile to numerical values? |
|linux|unix|makefile| |
I've found it very difficult to find any existing documentation on this. What I'm trying to find out is why Imake would interpret a word such as "unix", "linux" or "i386" to a number 1 in the produced Makefile? I'm sure it is a function of indicating whether or not your on that system or not. I've not been able to f... |
The filtering can be done using the reject method like so:
$$('a').reject(function(element) { return element.getAttribute("href") == "http://foo.com"; }).invoke("addClassName", "external");
|
The filtering can be done using the reject method like so:
$$('a').reject(function(element) { return element.getAttribute("href").match(/http:\/\/(www.|)foo.com/); }).invoke("addClassName", "external");
|
If you have control over the crawling process, or it has predictable output, the above solutions (storing in a tempfile until finished, then mv'ing to the completed-downloads place, or ignoring files with a '.downloading' kind of name) might work. If all of that is beyond your control, you can make sure that the file ... |
To generate script for an object you have to pass up to six parameters:
exec proc_genscript
@ServerName = 'Server Name',
@DBName = 'Database Name',
@ObjectName = 'Object Name to generate script for',
@ObjectType = 'Object Type',
@TableName = 'Parent table name for index and tri... |
How about looking at the rule in question? Google says this:
> /^[a-z0-9]{6,24}[-_a-z0-9]{12,36}[a-z0-9]{6,24}\s*\z/is
> ...which in its current form will hit (some, depending on hyphenation) words
with 24 or more characters. So maybe someone who is familiar with tracker IDs
can adjust the regexp so that large... |
What would make the most sense is changing out which image is displayed on the fly:
<div id="pin-images"><br/>
<img src="fivepins.jpg" /><br/>
<img src="fourpins.jpg" /><br/>
<img src="threepins.jpg" /&g... |
do your css tag as _Width: 500px or whatever. |
The only tool I know is [Vera][1]. Havent used it, though, so cant comment how viable it is. [Demo][2] looks promising.
[1]: http://www.inspirel.com/vera/
[2]: http://www.inspirel.com/vera/ce/demo.html |
Try
alter table company drop Company_CountryID_FK
alter table company drop CountryID
|
Debugging a stack overflow in .NET (I've checked the usual suspects, and have moved on to winDBG and co.) |
|.net|vb.net|debugging|windbg|stack| |
So I have a nasty stack overflow I have been trying to track down / solve for the past 8 hours or so, and I'm at the point where i think i need advice.
The details:
Interestingly enough this code runs fine when called in the context of our regular winforms application -- but I am tasked with writing a web-based v... |
Brilliant! This is just what I need as well. Thanks aku.
edg: Environment.OSVersion contains a version string but this doesn't generally give enough information to differentiate editions (also applies to XP Home/XP Pro). Also, there's the risk that this string will be localised so matching on it woudn't necessarily ... |
foo { min-width: 100px } // for everyone
* html foo { width: 100px } // just for IE
(or serve a separate stylesheet to IE using [conditional comments][cc])
[cc]: http://www.quirksmode.org/css/condcom.html |
Update: looks like network install is not that minimal. There's 57MB .iso image, but you also need to download stage3 which is about 120MB and portage with is 29MB. This totals about 205MB. Or am I missing something? |
Update: looks like network install is not that minimal. There's 57MB .iso image, but you also need to download stage3 which is about 120MB and portage with is 29MB. And later on, you need the Linux kernel, which is about 46MB. This totals about 250MB. Or am I missing something? |
Update: looks like network install is not that minimal. There's 57MB .iso image, but you also need to download stage3 which is about 120MB and portage with is 29MB. And later on, you need the Linux kernel, which is about 46MB. This totals about 250MB. Or am I missing something?
**Update:** I have installed the Kerne... |
Winsock - 10038 Error - Win2K3 Server - baffling behaviour |
|winsock|windows-server-2003| |
Attempt to send a message through a socket failed with WinSock error 10038. After around 40 seconds, messages are received successfully from the same socket and subsequently the send() is also succeeding in the same socket. This behaviour has been witnessed in Windows Server 2003. Is this any known behaviour with WinSo... |
We havn't found an easy way without hitting the StackTrace. If it's an exception, we just grab from that:
StackTrace trace = new StackTrace(ex, true);
StackFrame frame = trace.GetFrame(0);
For chatty items, we just write the string. We have a snippet that's able to grab the class name on insertion. ... |
I think I would first sort the two lists separately and then merge them with a function that also skips over duplicates. This should be a bit faster as it requires one less traversal of both lists.
P.S.: I doubt it can be done much faster as you basically always need at least one sort and one merge. Perhaps you can ... |
Back to my previous exampe in your previous question. Your parameterized query is a string looking like that:
qr = "Select Tbl_Country.* From Tbl_Country WHERE id_Country = [fid_country]"
depending on the nature of fid_Country (number, text, guid, date, etc), you'll have to replace it with a joker value and s... |
I think you are perhaps worrying too much!
Does it make sense logically? Do you know where to find your code within the namespaces?
I would much rather see a codebase like the above with a small number of classes, relevant to the name with a hierarchy, than one large namespace where everything is interrelated..
... |
I think you are perhaps worrying too much!
Does it make sense logically? Do you know where to find your code within the namespaces?
I would much rather see a codebase like the above with a small number of classes, relevant to the name with a hierarchy, than one large namespace where everything is interrelated..
... |
I just build my business objects from scratch, and almost never use the DataTable and especially not the DataSet anymore, except to initially populate the business objects. The advantages to building your own are testability, type safety and intellisense, extensibility (try adding to a DataSet) and readability (unless... |
How to monitor a text file in realtime |
|monitoring|text-files| |
for debugging purpose in a somewhat closed system, I have to output text in a file.
Does anyone knows of a tool that runs on windows ( console based or not ) that detects changes to a file and outputs them in real-time ?
|
I have used [FileSystemWatcher](http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx) for monitoring of text files for a component I recently built. There may be better options (I never found anything in my _limited_ research) but that seemed to do the trick nicely :)
Crap, my bad, you're actuall... |
I use "tail -f" under cygwin. |
FileSystemWatcher works a treat, although you do have to be a little careful about duplicate events firing - [1st link from Google](http://blogs.msdn.com/ahamza/archive/2006/02/04/FileSystemWatcher-Duplicate-Events.aspx) - but bearing that in mind can produce great results. |
I know thunderbird and eudora have support for SimpleMAPI so they can talk to an exchange server but the command set of what they can do is rather basic (you need Extended MAPI support for the whole set)
afaik Outlook is the only windows client with full support for Extended MAPI.
|
The only way I can think of is if the Exchange server has Outlook Web Access (OWA) turned on. You can test this by trying the server name in your browser like so: http://server/exchange.
If you mean programmatically then the recommended way is to use WedDAV (which is what OWA uses).
@Jon I think the method you li... |
That error should not be coming from the code you posted. According to MSDN, you've done this right: http://msdn.microsoft.com/en-us/library/bb384054.aspx
Hence I would recommend you re-check the error message, and where the compiler says the error is coming from. The text of the message you posted did not include... |
That error should not be coming from the code you posted. According to MSDN, you've done this right: http://msdn.microsoft.com/en-us/library/bb384054.aspx
Hence I would recommend you re-check the error message, and where the compiler says the error is coming from. The text of the message you posted did not include... |
I believe you can use the overloaded < or > operators.
For example:
DateTime d1 = new DateTime(2008, 1, 1);
DateTime d2 = new DateTime(2008, 1, 2);
if (d1 < d2) { ...
|
if (StartDate>=EndDate)
{
throw new InvalidOperationException("Ack! StartDate is not before EndDate!");
} |