instruction stringlengths 0 30k ⌀ |
|---|
|ruby|performance|testing| |
I've been looking at ways people test their apps in order decide where to do caching or apply some extra engineering effort, and so far httperf and a simple sesslog have been quite helpful.
What tools and tricks did you apply on your projects? |
I ran into a similar issue where cmd would always open up in a particular directory (annoying when running scripts which invoke cmd). The best way to deal with this is to edit your autorun settings. Raymond Chen has a nice article about this here:
http://blogs.msdn.com/oldnewthing/archive/2007/11/21/6447771.aspx
... |
You are using the wrong SMTP-server. If you you are only going to send emails to your gmail-account, have a look at my answer [here][1].
If you also need to send email to other accounts, ask you ISP for your SMTP-details.
EDIT: I think it is always better to use the ISP SMTP-server as they (should) have people mo... |
Calculate like this:
x = 1 - 1/3 + 1/5 - 1/7 + 1/9 (... etc as far as possible.)
Pi = x * 4
You have got Pi !!!
This is the simplest method I know of.
|
Calculate like this:
x = 1 - 1/3 + 1/5 - 1/7 + 1/9 (... etc as far as possible.)
PI = x * 4
You have got Pi !!!
This is the simplest method I know of.
The value of PI slowly converges to the actual value of Pi (3.141592165......). If you iterate more times, the better.
|
An alternative:
z = x.copy()
z.update(y) |
Developer moving from SQL Server to Oracle |
|sql-server|database|oracle-database| |
We are bringing a new project in house and whereas previously all our work was on SQL Server the new product uses an oracle back end.
Can anyone advise any crib sheets or such like that gives an SQL Server person like me a rundown of what the major differences are - Would like to be able to get up and running as soo... |
What is a DWORD in MVS2005 c++, can it be 64 bits long? |
|c++|dword|winapi| |
Because DWORD implies that it is a double word that is 2 * 16.
But in VS its just an unsigned long which could be machine, platform, SDK dependant. |
|c++|dword|winapi|64-bit| |
What is a DWORD in MVS2005 c++, it is 32bit on a 32 bit machine can it be 64bits on a 64bit machine? |
|c++|winapi|64-bit|dword| |
Actually, on 32bit computers a word is 32bit, but the DWORD type is a leftover from the good old days of 16bit.
MS has decided all the old types will not change size in order to make it easier to port programs to the newer system.
You can find the official list here:
http://msdn.microsoft.com/en-us/library/aa383... |
|c#|oop| |
|c#|tdd|oop| |
|oop|tdd| |
How do you run a script on login in *nix? |
|unix|linux| |
I know I once know how to do this but... how do you run a script (bash is OK) on login in unix? |
|unix|linux|bash|shell| |
|linux|macos|unix|bash|shell| |
Does IE6 Support AES 256 bit encryption? |
|ssl|internet-explorer-6|aes| |
Will IE6 negotiate a 256 bit AES SSL connection if the server is capable? |
Run macro automatically OnSave in Word 97 |
|ms-word|word97| |
I have a macro which refreshes all fields in a document (the equivalent of doing an F9 on the fields). I'd like to fire this macro automatically when the user saves the document.
Under options I can select "update fields when document is printed", but that's not what I want. In the VBA editor I only seem to find eve... |
Run macro automatically OnSave in Word |
[Exslt][1] is "supposed to be" a platform-independent set of xslt extensions, but only so far as various xslt processors choose to implement them.
There's [some evidence][2] that MSXML actually does support exsl:node-set(), but I don't know for sure.
There is an [old article][3] discussing [an implementation][4] ... |
There are cases where SELECT * is good for maintenance purposes, but in general it should be avoided.
These are special cases like views or stored procedures where you want changes in underlying tables to propagate without needing to go and change every view and stored proc which uses the table. Even then, this can... |
There is no webservice available.
But there are enough html scrapers written in every language to suit your needs!
I've used the [.NET 3.5 Imdb Services opensource project][1] in a few personal projects.
[1]: http://www.codeplex.com/imdb |
There is no webservice available.
But there are enough html scrapers written in every language to suit your needs!
I've used the [.NET 3.5 Imdb Services opensource project][1] in a few personal projects.
1 minute google results:
- Perl: [IMDB-Film][2]
- Ruby: [libimdb-ruby][3]
[1]: http://www.co... |
The only "API" the IMDb publishes is a set of [plain-text data files][1] containing formatted lists of actors, directors, movies, etc. You would likely need to write your own parser unless somebody has released one for your language. Try Google searches like "imdb api" and "imdb parser".
A screen scraper might be us... |
I've had good luck with the [SWF::File][1] library on CPAN, and particularly the [dumpswf.plx][2] tool that comes with that distribution. It generates Perl code that, when run, regenerates your SWF.
[1]: http://search.cpan.org/dist/SWF-File/
[2]: http://search.cpan.org/src/YSAS/SWF-File-0.42/dumpswf.plx |
Not that I have any good articles here right now, but what you want to do is something along Producer-Consumer with a Threadpool.
The Producers loops through and creates tasks (which in this case could be to just queue up the items in a List or Stack). The Consumers are, say, five threads that reads one item off the... |
Basically, information hiding is about code clarity. It's designed to make it easier for someone else to extend your code, and prevent them from accidentally creating bugs when they work with the internal data of your classes. It's based on the principle that **nobody ever reads comments**, especially ones with instruc... |
> The team captain thinks that LabVIEW
> is better for its ease of learning and
> teaching. Is that true?
I doubt that would be true for any single language, or paradigm. LabView could surely be easier for people with electronics engineering background; making programs in it is "simply" drawing wires. Then again, ... |
> The team captain thinks that LabVIEW
> is better for its ease of learning and
> teaching. Is that true?
I doubt that would be true for any single language, or paradigm. LabView could surely be easier for people with electronics engineering background; making programs in it is "simply" drawing wires. Then again, ... |
LINQ supports IN in the form of contains. Think "collection.Contains(id)" instead of "id IN (collection)".
from a in TableA
where (
from b in TableB
join c in TableC
on b.id equals c.id
select b.id
).Contains(TableA.Id)
select new { a.Id, a.Name }
See al... |
Why not just use the web.config and the System.Configuration functionality that already exists?
Your web app is going to parse web.config on every page load anyway, so the overhead involved in having yet another XML config file seems overkill when you can just define your own section on the existing configuration. |
I've been lucky to work in small projects with the possibility to suggest a suitable language for my task. For example C as a low-level language, extending Lua for the high-level/prototyping has served very well, getting up to speed quickly on a new embedded platform. I'd always prefer two languages for any bigger proj... |
How to accept REF cursor in JAVA without importing Oracle Package |
|oracle-database|ref|cursor|in|java| |
I am writting JAVA programme using JDBC for database conntectivity , I am calling one stored procedure in that which is returning ORACLE REF CURSOR , IS there any way I can handle that without importing ORACLE PACKAGES ? |
|java|oracle-database|jdbc| |
I prefer Company.Website.Spec and usually have one test project per solution |
tagName is null or not an object -- error msg in IE7 using latest version of jQuery (1.2.6) |
|asp.net|javascript|jquery| |
has anyone else seen this error message. a quick check with google doesn't show me much. |
Since you're using Windows Authentication in IIS, you may have some security events in the Windows Event log. I would check the Event log for Security Events as well as Application Events and see if you're hitting any sort of permissions issues.
Also, since you're basically just communicating to AD via LDAP...you m... |
We follow an embedded approach:
Company.Namespace.Test
Company.Namespace.Data.Test
This way the tests are close to the code that is being tested, without have to toggle back and forth between project or hunt down references to ensure there is a test covering a particular method. We also don't have to maintain t... |
What is the simplest and best tool for real-time tweaking of CSS in IE6, similar to what Firebug does for Firefox? |
|css| |
All front-end developers know the pain of coding for Firefox, then viewing our then mangled pages in IE6. We usually used IE conditional comments to create separate CSS files for IE to render correctly. It would be great if there was a tool like Firebug for IE. Firebug "lite" exists but it seems to be very beta. Is the... |
More info please. Do you mean that you have changed the ip address of the host that the database is on and now you have to connect to it from a different macine, or are you having trouble starting the database after the ip change? |
More info please. Do you mean that you have changed the ip address of the host that the database is on and now you have to connect to it from a different macine, or are you having trouble starting the database after the ip change?
... and what error message do you receive? |
Super Robust as chrome c++ and portable - tips - help - comments. |
How do I make a Microsoft Word document “read only” within a SharePoint document library? |
|sharepoint| |
How do I make open “read only” the only option within a SharePoint document library?
When using either Word 2003 or 2007 and saving the document as a template or modifying the file properties as “read only” doesn’t prevent modification of the file in a SharePoint document library. Modifying the document library per... |
|asp.net|sharepoint|visual-studio-2008| |
You could set a 0 byte socket send buffer (and I don't exactly recommend this) so that when your blocking call to HttpResponse.send() you have a closer idea as to when the last byte left, but travel time is not included. ***Ekk***--I feel queasy for even mentioning it. I think with some servlet containers, like Tomc... |
You could set a 0 byte socket send buffer (and I don't exactly recommend this) so that when your blocking call to HttpResponse.send() you have a closer idea as to when the last byte left, but travel time is not included. ***Ekk***--I feel queasy for even mentioning it. You can do this in Tomcat with connector specif... |
C# component do not refresh when source code updated |
|c#|.net|custom-component| |
I have a solution with many projects. One project contain few custom components. One of these components is used to display a title on an image. We can change the color of the background and many other things.
The problem is IF I decide to change the default color of the background of the component or change the pos... |
This reminds me that [the overview docs for ruby-openid server are still missing][1]. But you can see [the example][2], and until the docs are ported over, see the [docs for the python implementation][3] which follows the same object model.
[1]: http://trac.openidenabled.com/trac/ticket/267
[2]: http://http://... |
This reminds me that [the overview docs for ruby-openid server are still missing][1]. But you can see [the example][2], and until the docs are ported over, see the [docs for the python implementation][3] which follows the same object model.
[1]: http://trac.openidenabled.com/trac/ticket/267
[2]: http://openide... |
[RDF Gravity][1] is an RDF visualisation tool.
Here's a screenshot:
![RDF Gravity Screenshot][2]
[1]: http://semweb.salzburgresearch.at/apps/rdf-gravity/index.html
[2]: http://semweb.salzburgresearch.at/apps/rdf-gravity/html/owl_ontology_1.jpg |
If you have time, you can create your own pretty easily by using the [System.Windows.Forms.TreeView][1] Class. Each node can have a checkbox, so If you populate the treeview (onexpand) you can let the user select the files/directories he wants to upload.
This should get you started on populating the treeview with di... |
IMDB prohibits scrapers, and change the page layout every once in a while, so parsing HTML is an option, but be prepared to adjust your code 2-3 times a year (been there, done that, given up). They do have a fee-based service giving the full access to the data, but you'll also need to explain what is it for, and convin... |
Groovy: Correct Syntax for XMLSlurper to find elements with a given attribute |
|groovy|xmlslurper| |
Given a HTML file with the structure html->body->a bunch of divs what is the correct groovy statement to find all of the divs with a non blank tags attribute?
The following is not working:
def nodes = html.body.div.findAll {it.@tags != null}
because it finds all the nodes. |
I haven't worked much with Java but I did work in large groups of Java developers. The impression I've got was that Spring is OK. But everybody was upset at Hibernate. Half the team if asked "If you could change one thing, what would you change?" and they'd say "Get rid of Hibernate.". When I started to learn Hibernate... |
|mobile|gps| |
I am developing a web app that will be hit frequently by mobile browsers. I am wondering if there is a way to get enough information from the browser request to lookup position data (triangulation or GPS) **Not from the request directly, of course.** A colleague suggested there some carriers supply a unique identifier ... |
Which Javascript engine would you Embed in an application? |
|javascript|c++|embed| |
Just to make it clear, I'm not interested in DOM scripting or writing Javascript in a browser. What I want to do is embed Javascript in a hobby game engine of mine. Now that we have the 5th generation of Javascript engines out (all blazing fast) I'm curious what engine would you choose to embed in a C++ framework (that... |
Just to make it clear, I'm not interested in DOM scripting or writing Javascript in a browser. What I want to do is embed Javascript in a hobby game engine of mine. Now that we have the 5th generation of Javascript engines out (all blazing fast) I'm curious what engine would you choose to embed in a C++ framework (that... |
|c++|javascript|embed| |
Just to make it clear, I'm not interested in DOM scripting or writing Javascript in a browser. What I want to do is embed Javascript in a hobby game engine of mine. Now that we have the 5th generation of Javascript engines out (all blazing fast) I'm curious what engine would you choose to embed in a C++ framework (that... |
I have a solution with many projects. One project contain few custom components. One of these components is used to display a title on an image. We can change the color of the background and many other things.
The problem is IF I decide to change the default color of the background of the component or change the pos... |
I have a solution with many projects. One project contain few custom components. One of these components is used to display a title on an image. We can change the color of the background and many other things.
The problem is IF I decide to change the default color of the background of the component or change the pos... |
It's probably not the answer you want to hear, but the best way to avoid logical inconsistencies, you really want to look at [database normalisation][1]
[1]: http://en.wikipedia.org/wiki/Database_normalization#Normal_forms |
SQL Server doesn't know anything about your classes. I think that you'll have to enforce this by using a Factory class that constructs/deconstructs all these for you and makes sure that you're passing the right values depending upon the type.
Technically this is not "enforcing the rules in the database" but I don't... |
I think there is a better third solution.
It strikes me that you're storing two different things in the same table and that you might be better off creating 2 separate tables one for user templates and one for system templates. You might then be able to create a view over the two tables to make them appear as a singl... |
Anything you can do with cvs can be done with the command line, and I am pretty sure svn is the same. Just work out the functionality you want and stick it in a shell script or a command file. |
Can a proxy server cache SSL requests? |
|proxy|caching|ssl|encryption| |
Can a (||any) proxy server cache content that is requested by a client over https? As the proxy server can't see the querystring, or the http headers, so I reckon they can't.
I'm considering a desktop application, run by a number of people behind a proxy. This application may access services across the internet and ... |
Can a proxy server cache SSL GETs? If not, would response body encryption suffice? |
|security|encryption|ssl|caching|proxy| |
Can a (||any) proxy server cache content that is requested by a client over https? As the proxy server can't see the querystring, or the http headers, I reckon they can't.
I'm considering a desktop application, run by a number of people behind their companies proxy. This application may access services across the in... |
The description is mostly for system projects, like e-mail inbox.
You might be able to set one in the underlying DB table. |