instruction stringlengths 0 30k ⌀ |
|---|
> Is there any option besides using the hidden iframe trick?
Unfortunately, no, not now. Otherwise the microsummary code you point to would use it instead.
> And if not, what is the best way to do the iframe trick so that your code works outside the context of any currently open tabs (so that closing tabs won't s... |
Here's a useful one for regular expressions and file paths:
"c:\\program files\\oldway"
@"c:\program file\oldway"
The @ tells the compiler to ignore any escape characters in a string. |
Here's a useful one for regular expressions and file paths:
"c:\\program files\\oldway"
@"c:\program file\newway"
The @ tells the compiler to ignore any escape characters in a string. |
|delphi|unicode| |
Here's one from the "No question's too dumb" department:
Well, as the subject says: Is there an impact? If so, how much? Will all the string literals I have in my code and in my DFM resources now take up twice as much space inside the compiled binaries? What about runtime memory usage of compiled applications? Will ... |
What impact (if any) does Delphi 2009's switch to Unicode(/UTF16) have on executable size and memory footprint? |
Be aware that some exception are dangerous to catch - or mostly uncatchable,
- OutOfMemoryException: anything you do in the catch handler might allocate memory (in the managed or unmanaged side of the CLR) and thus trigger another OOM
- StackOverflowException: depending whether the CLR detected it sufficiently... |
Unfortunately I'm stuck on Windows XP and Windows Server 2003 so that isn't an option for me. - (I will re-clarify that in my question as I found this solution after posting and realised i couldn't use it)
I found that one solution was to setup a custom handler which would move my message onto another queue or poiso... |
After a few days of looking I found a call to a modal popup extender .show() in the code behind. After commenting it out everything worked fine. |
How do I alter a TEXT column on a database table in SQL server? |
|sql-server|t-sql| |
In a SQL server database, I have a table which contains a TEXT field which is set to allow NULLs. I need to change this to not allow NULLs. I can do this no problem via Enterprise Manager, but when I try to run the following script, **alter table dbo.[EventLog] Alter column [Message] text Not null**, I get an error:
... |
Check out [appTranslator][1], its relatively cheap and works rather well. The guy developing it is really responsive to enhancement requests and bug report, so you get really good support.
[1]: http://www.apptranslator.com/ |
(Slightly off-topic)
They says there is no such thing as time management. You can't manage an hour and get extra 20 mins out of it. Well, I recently discovered that you can. It you're listening to podcasts or watching recoded web casts, you can speed up the play speed. I found that it also helps me stay focused on... |
How to create project specific respository post-commit actions |
|svn|version-control|vcs| |
Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that.
> It's a good practice to create one repository for the entire company or dep... |
Unfortunately, restricting the users to SPs defeats the purpose of this. I was hoping there was some way I could allow them to query everything and thereby enhance their troubleshooting skills. Thanks for your help guys. |
Only when you can't do it in PL/SQL ( or PL/SQL proves to be too slow, which would be pretty rare I believe ).
As a case study... We had a single java stored procedure running in production ( Oracle 9i ), it was originally written in java because at the time we thought java was cool, Something I've long since change... |
Email, IM, Skype... all those can distract. But biggest distraction is when my fellow colleague ask me why I wrote some year old algorithm this way and not that way. It brings my work to halt even if I know the answer.
To stop this interruptions, we have a 5-minute break every hour outside the office where we can ta... |
The properties methods will only give you the last revision number of the file you have the property in, not the head revision of the whole repository (a la the Stack Overflow footer). If you are wanting that, you'll need to use [svnversion](http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.ref.svnversion).
I rec... |
Try:
['bus.MyServiceFacade'].someAction()
or
'bus.MyServiceFacade'.someAction()
This may work, or it may not...but similar things are used in the Expression Language for JSPs. |
mod_python/MySQL error on INSERT with a lot of data: "OperationalError: (2006, 'MySQL server has gone away')" |
|python|mysql|xampp| |
When doing an INSERT with a lot of data, ie~ `INSERT INTO table (mediumtext_field) VALUES ('...lots of text here: about 2MB worth...')', MySQL returns "OperationalError: (2006, 'MySQL server has gone away')"
This is happening within a minute of starting the script, so it is not a timeout issue. Also, `mediumtext_fie... |
Is there a specification of Java's threading model running under Windows XP available anywhere? |
|java|multithreading|documentation| |
There are various documents describing threading on Solaris/Linux, but nowwhere describing the Windows implementation. I have a passing interest in this, it seems strange that something so critical is (seemingly) not documented.
Threading is not the same on different OS' - "Write Once, Run Anywhere" isn't true for t... |
I would use LWP (Libwww for Perl). Here's a good little guide: [http://www.perl.com/pub/a/2002/08/20/perlandlwp.html][1]
WWW::Scraper has docs here: [http://cpan.uwinnipeg.ca/htdocs/Scraper/WWW/Scraper.html][2]
[1]: http://www.perl.com/pub/a/2002/08/20/perlandlwp.html
[2]: http://cpan.uwinnipeg.ca/htdoc... |
I would use LWP (Libwww for Perl). Here's a good little guide: [http://www.perl.com/pub/a/2002/08/20/perlandlwp.html][1]
WWW::Scraper has docs here: [http://cpan.uwinnipeg.ca/htdocs/Scraper/WWW/Scraper.html][2]
It can be useful as a base, you'd probably want to create your own module that fits your restaurant mi... |
I'd say always ask yourself which makes more sense. Methods tend to be understood as actions to perform and are usually worded as such — `open()`, `flush()`, `parse()`. Properties tend to be understood as fancier fields/variables — `DisplayName`, `AutoSize`, `DataSource`.
This tends to come up a lot wi... |
I'm doing a personal, just for fun, project that is using screen scraping to give me a System Tray notification in case another line on an HTML table is added, modified or deleted.
Having done this before I thought: well let's go with the regular expression thing and that's it, but being a curious person, made me th... |
I wouldn't expect much difference but if there is one it will likely vary by scripting engine or browser.
If you find the code easier to grok, performance is a non-issue unless you expect to call the function millions of times. |
Emacs works for simple things but I use Eclipse for any larger project. |
Think about the users that will use your app. Why are they using it and in which context?
* Will the majority be pro users that know the domain in which the application is used and use the app a lot? Then don't be afraid of adding a lot of data to the screens as long as it arranged logically for users (normally th... |
How do I use LogParser to find out the LENGTH of a field in an IIS Log? |
|iis|logparser| |
I'm trying to find LONG UserAgent strings with LogParser.exe in my IIS logs. This example searches for entries with the string 'poo' in them.
LogParser.exe" -i:IISW3C "SELECT COUNT(cs(User-Agent)) AS Client FROM *.log WHERE cs(User-Agent) LIKE '%poo%'
I'm trying to say "How many entries have a User-Agent that... |
Zend Framework Select Operator Precedence |
|php|mysql|zend-framework| |
I am trying to use Zend_Db_Select to write a select query that looks somewhat like this:
SELECT * FROM bar WHERE a = 1 AND (b = 2 OR b = 3)
However, when using a combination of where() and orWhere(), it seems impossible to use condition grouping like the above.
Are there any native ways in Zend Framework t... |
I would use the following technique:
- Store the current message as complete text.
- Store the history using the delta algorithm.
This will keep your performance good with regular display, while keeping the storage to a minimum for the history.
|
You could use [DESCRIBE my_table][1] and use the results of that to generate the SELECT statement dynamically.
[1]: http://dev.mysql.com/doc/refman/5.0/en/describe.html |
I'm not sure how the annotation inheritance works for TestNG but this article may be of some use. <http://beust.com/weblog/archives/000170.html>.
Actually, this may help better <http://testng.org/doc/documentation-main.html#annotations>, look at inheritGroups. |
I agree with basszero. I'm using mercurial under windows and it's as easy and reliable as it can get. My development team is spread over Europe (well Dublin and Vienna :-).
We use VPN to commit or sometime the built in webserver (hgserve). Both work fine with no problems out of the box.
Also diff3 open source tool ... |
Many of the tools like grep also have really great man files too. I find myself referring to [grep's man page][1] a lot because there is so much you can do with it.
man grep
Many GNU tools also have an [info page][2] that may have more useful information in addition to the man page.
info grep
[1... |
I normally use
grep searchstring file -C n # n for number of lines of context up and down
Many of the tools like grep also have really great man files too. I find myself referring to [grep's man page][1] a lot because there is so much you can do with it.
man grep
Many GNU tools also have an [info pa... |
I agree that it isn't sufficient to `Select *`, if that one you don't need, as mentioned elsewhere, is a BLOB, you don't want to have that overhead creep in.
I would create a **view** with the required data, then you can `Select *` in comfort --if the database software supports them. Else, put the huge data in anot... |
OnTime is more an ALM tool - it's trying to do everything.
FogBugz just deals with bugs (and feature requests) and at that it's excellent. I'm not sure about some of the newer extensions (like discussions), but for bugs it's really good.
There's lots of stuff that I'd add to it in terms of better reports, search... |
If it's always the same one column, then you can create a view that doesn't have it in it.
Otherwise, no I don't think so. |
It is good practice to specify the columns that you are querying even if you query all the columns.
So I would suggest you write the name of each column in the statement (excluding the one you don't want).
SELECT col1, col2, col3, col.., col56 FROM table |
It is good practice to specify the columns that you are querying even if you query all the columns.
So I would suggest you write the name of each column in the statement (excluding the one you don't want).
SELECT
col1
, col2
, col3
, col..
, col53
FROM table |
So I went with newgem.
I removed all unnecessary RubyForge/gem stuff (hoe, setup, etc.), created git repo, imported project into NetBeans. All took 20 minutes and everything's on green.
That even gave me a basic rake task for spec files.
Thank you all. |
WCF MSMQ - How do I handle message failure |
|wcf|msmq| |
I have create a WCF service and am utilising netMsmqBinding binding.
This is a simple service that passes a Dto to my service method and does not expect a response. The message is placed in an MSMQ, and once picked up inserted into a database.
What is the best method to make sure no data is being lost.
I have ... |
I have create a WCF service and am utilising netMsmqBinding binding.
This is a simple service that passes a Dto to my service method and does not expect a response. The message is placed in an MSMQ, and once picked up inserted into a database.
What is the best method to make sure no data is being lost.
I have ... |
Here's such a list:
[Empty Thoughts:Django Blogging][1]
[1]: http://blog.michaeltrier.com/2007/12/30/django-blogging-apps |
:%s/\r+//g
In Vim, that strips all carriage returns, and leaves only newlines. |
If you just need to print your web page from the client-side use `window.print()`. Sample could be found here: <http://www.javascriptkit.com/howto/newtech2.shtml>. I would suggest preparing a special version of your page first with no dynamic content and with a layout which would look nice on print.
If you need to s... |
Single application build for multiple mobile devices |
|brew-framework|mobile| |
Is it possible to have one application build for multiple mobile devices (on [BREW](http://brew.qualcomm.com/brew/) platform), rather than making a separate build for each device.
In particular is is possible to use single BREW application build for multiple screen resolutions? |
|mobile|brew-framework| |
Is it possible to have one application binary build for multiple mobile devices (on [BREW](http://brew.qualcomm.com/brew/) platform), rather than making a separate build for each device using build script with conditional compilation.
In particular is is possible to use single BREW application build for multiple scr... |
You should be able to paste the following into abash terminal window.
**Display ANSI colour palette:**
e="\033["
for f in 0 7 `seq 6`; do
no="" bo=""
for b in n 7 0 `seq 6`; do
co="3$f"; p=" "
[ $b = n ] || { co="$co;4$b";p=""; }
no="${no}${e}${co}m ${p}${co} $... |
You should be able to paste the following into a bash terminal window.
**Display ANSI colour palette:**
e="\033["
for f in 0 7 `seq 6`; do
no="" bo=""
for b in n 7 0 `seq 6`; do
co="3$f"; p=" "
[ $b = n ] || { co="$co;4$b";p=""; }
no="${no}${e}${co}m ${p}${co} ... |
There are a lot of things to do and I'm not sure you'll find any single technique to get organized and stay focused.
But...
* Do list the things you have to do. Several short lists will be needed (today, later, inbox == to be sorted out, etc...). Review these lists once in the morning, and then in the evening. Th... |
I had to use during my vocational education for XML and XSLT. It had a lot of bugs and didn't work always. I couldn't get to like it, but if I had to test some XSLT I'd give it another shot. I found Notepad++ and I am more than happy with it for what I need.
To your question: Did you take a look at [jEdit's plugin l... |
Why not?
public static Logger getLogger(Object o) {
final Logger logger = Logger.getLogger(o.getClass());
logger.setLevel(ResourceManager.LOGLEVEL);
return logger;
}
And then when you need a logger for a class:
getLogger(this).debug("Some log message")
|
How to re-open the Java Console in Firefox 3 after I've closed it |
|firefox|java|applet| |
I'm using firefox3 to run a Java Applet (on Linux). normally, when the JVM launches the Java Console window opens so I can see output from the Applet (stack traces etc.).
However, if I _close_ the console there appears to be no way of getting it back short of restarting Firefox (I have to close the console because i... |
I'm using firefox3 to run a Java Applet (on Linux). normally, when the JVM launches the Java Console window opens so I can see output from the Applet (stack traces etc.).
However, if I _close_ the console there appears to be no way of getting it back short of restarting Firefox (I have to close the console because i... |
|java|firefox|applet| |
I'm using firefox3 to run a Java Applet (on Linux). normally, when the JVM launches the Java Console window opens so I can see output from the Applet (stack traces etc.).
However, if I _close_ the console there appears to be no way of getting it back short of restarting Firefox (I have to close the console because i... |
There is a FolderBrowserDialog class that you can use:
<http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx>
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result.Equals(get_DialogResult().OK)) {
textbox1.Text = folderBrowserDialog1.get_SelectedPat... |
There is a FolderBrowserDialog class that you can use if you want the user to select a folder.
<http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx>
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result.Equals(get_DialogResult().OK)) {
textbox1.Tex... |
I am not sure what context the xml is coming from, but if it is stored in a string const variable that you created, then the easiest way to modify it would be:
public class Example
{
private const string CAMLQUERY = "<Where><Eq><Field=\"FieldName\"><Value Type=\"Text\">{0}</Value></Field></Eq></Whe... |
One solution is the system function defined in stdlib.h
int system(const char *string);
[system api example][1]
[1]: http://www.cplusplus.com/reference/clibrary/cstdlib/system.html |
We evaluated GI a few months ago for a project. When I get to work in the morning I'll dig up our evaluation notes and edit some more comments in; for now suffice it to say we didn't end up using it.
By the way for those that don't know, TIBCO GI is a completely separate product from the rest of TIBCO's SOA business... |
We evaluated GI a few months ago for a project but didn't end up selecting it.
The IDE-in-a-browser (which is itself build with GI) actually works surprisingly well, though there are some features you normally expect from an editor that it lacks, most notably (and irritatingly) an Undo command. It's also impossible ... |
Here are some links but as with most things i have not got round to trying them yet.
http://gathadams.com/2007/08/21/add-google-maps-to-your-net-site-in-10-minutes/
http://www.mapbuilder.net/
Cheers
John |
:g/cntl-vcntl-m/s/// |
Create a new field. Copy the data across. Drop the old field. Rename the new field. |
NHibernate and Linq To Sql are Object/Relational Mappers designed to ease dealing with the impedence mismatch found between objects and RDBMS. If you where want to achieve a testable, persistant ignorant application, NHibernate is the way to go. I would always recommend NHibernate over Linq To Sql. Both tools are ai... |
You can use the following command:<br>
<code>:%s/^V^M//g</code>
<br> where the '^' means use "Ctrl" key. |
Just make sure you're not running into an **anti-pattern** here. Maybe you do too much work in the constructor? Or maybe these should be in fact different classes? Tests often give you clues about **design of code.** Listen to them. |
Django's powerful admin interface and easy ORM makes it a 30 minute job to build a blog that propably fits your needs; Why look for a 3rd party product when you can make it yourself very quickly? |
With the following command:
:%s/^M$//g
Get the `^M` to appear type Ctrl-V then Ctrl-M. Ctrl-V tells Vim to take the next character entered literally. |
Are you wanting to monitor performance, or just see which queries are executing? If the latter, you can configure MySQL to log all queries it's given. On a RedHat Linux box, you might add
log = /var/lib/mysql/query.log
to the [mysqld] section of /etc/my.cnf before restarting MySQL.
Remember that in a busy ... |
I found the [MRU editor](http://www.codeproject.com/KB/cs/VSProjectListEditorIII.aspx) from [Code Project](http://www.codeproject.com) a great tool for that. No problems with it, and it works on 2003, 2005, and 2008. |
REST + XML or JSON would be a good alternative. It is making big strides in the RIA world and the beauty of it is in it's simplicity. It is very easy to use without needing any special tooling. SOAP has it's strong points, but it works best in an environment with strong tooling support for it. I'm guessing from your qu... |
Off the top of my head, I'd say you need to create a new table with the same structure as the existing table but with your text column set to not null and then run a query to move the records from one to the other.
I realize that's sort of a pseudocode answer but I think that's really the only option you've got.
... |
For what it is worth, the Dev Branch of Google Chrome was recently updated to support Silverlight 2. I tried it and it works for me. Of course, you have to use the Dev release of Google Chrome. You can get more information about switching to Chrome Dev [here][1].
[1]: http://dev.chromium.org/getting-involved/... |
I actually encouraged the company I work for to begin tracking bugs with software (specifically FogBugz) and have been very pleased with FogBugz.
We blindly let our customers send bug requests into FogBugz through email, which has it's advantages and disadvantages. But we really haven't had any problems integratin... |
Opening a file in my application from File Explorer |
|vb.net|file-extension| |
I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds).
Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in Fi... |
I've been looking at the [NTag][1] project as well, which handles MP3/WMA/OGG. I don't know of a single library that handles all audio files including video.
[1]: http://www.orthogonal.com.au/computers/ntag/index.htm |