instruction stringlengths 0 30k ⌀ |
|---|
You have difficulty to get Web application that use PAC because PAC inheritance pattern work well on custom component and custon dialog box that is not really present in the web.
Many framwework use PAC that let you override the presentation, abstraction or control but when used in the web, mostly transform to MVC ... |
> However it's written in Python which
> means there's little real support in
> the way of deployment/packaging,
> debugging, profilers and other tools
> that make building and maintaining
> applications much easier.
Python has:
1. a [great interactive debugger][1], which makes very good use of Python [REPL... |
> However it's written in Python which
> means there's little real support in
> the way of deployment/packaging,
> debugging, profilers and other tools
> that make building and maintaining
> applications much easier.
Python has:
1. a [great interactive debugger][1], which makes very good use of Python [REPL... |
|javascript|events| |
I have a page which does quite a bit of work and I don't want the user to be able to navigate away from that page (close browser, hit back button, etc.) without getting a warning. I found that the onbeforeunload event (which I think is IE-specific, which works fine for me as the project uses lots of ActiveX) works grea... |
copy it in from windows explorer. easiest way. |
drag the files / folder from windows explorer into the solution explorer. it will add them all. |
It looks like [Steve Yegge][1] actually already posted the answer to this a few years back: ["Shiny and New: Emacs 22."][2] Scroll down to "Changing Case in Replacement Strings" and you'll see his example code using the `replace-regexp` function.
The general answer is that you use "\," to call any lisp expression as... |
Since you're using JUnit, have you looked at [junit-addons][1]? It has the ability to ignore the java security model and access private methods and attributes.
[1]: http://junit-addons.sourceforge.net/ |
Right click on the file, select 'Open With' and choose "Web Form Editor" and click "Set as Default". |
You could use `exists` instead of `in` like this:
Select J.Email
From Jobseeker j
Where not exists (Select * From aspnetMembership a where j.email = a.email)
You should get better performance and avoid the 'weird' behaviour when using `in`. |
You could use `exists` instead of `in` like this:
Select J.Email
From Jobseeker j
Where not exists (Select * From aspnetMembership a where j.email = a.email)
You should get better performance and avoid the 'weird' behaviour (which I suspect is to do with null values/results) when using `in`. |
What's the bare minimum permission set for Sql Server 2005 services? |
|security|sql-server-2005|system-administration| |
Best practices recommend not installing Sql Server to run as SYSTEM. What is the bare minumum you need to give the user account you create for it? |
You seem to be confusing two *very* different things here: the
Ruby Programming Language and the specific threading model of one
specific implementation of the Ruby Programming Language. There
are currently around 11 different implementations of the Ruby
Programming Language, with *very* different and unique th... |
I'm assuming you're referring to indexing tables on a relational DBMS (like mySql, Oracle, or Postgres).
Indexes are secondary data stores that keep a record of a subset of fields for a table in a specific order.
If you create an index, any query that includes the subset of fields that are indexed in its WHERE cl... |
Here's a link that is specific to VS2008 XAML formatting but the good news is you can do it directly inside VS.
http://geekswithblogs.net/lbugnion/archive/2007/09/29/Cleaning-up-XAML-code-and-improving-parsing-time-with-Blend.aspx |
The C++ Programming Language by Bjarne Stroustrup is a must read. Effective C++ (Scott Meyers) is another book I found helpful.
And to balance all this, read the C++ FQA ( http://yosefk.com/c++fqa/ ) - while not a book, it's a valuable resource, and I wish I had access to it when I was getting started with C++. Just... |
If you're looking for a free solution, MediaWiki has some [alternative parsers](http://www.mediawiki.org/wiki/Alternative_parsers) that might be a good place to look. You might have to go through more than one phase to get it to Microsoft Word format though. |
I don't know if gwhois does something special with the server output; however, you can plainly connect to the whois server on port whois (43), send your query, read all the data in the reply and parse them. To make life a little easier, you could use the telnetlib.Telnet class (even if the whois protocol is much simple... |
As well as Rotor 2.0 - you could also take a look at the [HotSpot virtual machine][1] in the OpenJDK.
[1]: http://openjdk.java.net/groups/hotspot/ |
There is the class [org.apache.struts.util.MessageResources][1] with various methods getMessage, some of them take arguments to insert to the actual message.
Eg.: `messageResources.getMessage("thekey", "Yes!!!")`
[1]: http://struts.apache.org/1.2.7/api/org/apache/struts/util/MessageResources.html |
There is the class [org.apache.struts.util.MessageResources][1] with various methods getMessage, some of them take arguments to insert to the actual message.
Eg.:
messageResources.getMessage("thekey", "Yes!!!");
[1]: http://struts.apache.org/1.2.7/api/org/apache/struts/util/MessageResources.html
|
You can use [WinChain][1]
[1]: http://code.google.com/p/winchain/wiki/HowToUse |
I can't make comments yet, so I will comment on Dr8k's post and make another observation. Private variables that are exposed as public getter/setter properties, and do get serialized/deserialized as such through those properties. We did it at my old job al the time.
One thing to note though is that if you have any... |
Game Loop and GDI over .NET CF |
As a first pass, you can try using color histograms. However, you really need to narrow down your problem domain. Generic image matching is a very hard problem. |
Tenenbaum's first operating systems book. My first look at kernal level programming. |
Using xsd to generate XML in .net |
|.net|xml|xsd| |
I'm working in a .net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know whether it can be done at all or i may... |
I 2nd VisualAssist, been using it since V6, can't live without it...
I see no one has mentiond CoolCommands: http://geekswithblogs.net/brians/archive/2007/03/04/107922.aspx
Great set of time savers...
|
How to import homepath into c program using gcc |
|c|gcc| |
I am using gcc for windows. The OS is windows XP.
How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to:
fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w");
|
Whatever you do, just don't use USB 1.1. |
It's a difficult problem! It depends on how accurate you need to be, and it depends on what kind of images you are working with. You can use histograms to compare colours, but that obviously doesn't take into account the spatial distribution of those colours within the images (i.e. the shapes). Edge detection followed ... |
The National Institute of Standards and Technology (NIST) online Dictionary of Algorithms and Data Structures lists this problem as "[all simple paths"][1] and recommends a [depth-first search][2]. CLRS supplies the relevant algorithms.
A clever technique using Petri Nets is found [here][3]
[1]: http://www.n... |
I would suggest you start with [LabVIEW for Everyone][1]. Its a good book which covers the basics of LabVIEW well.
[1]: http://www.amazon.com/LabVIEW-Everyone-Programming-Instruments-Instrumentation/dp/0131856723 |
> However it's written in Python which
> means there's little real support in
> the way of deployment/packaging,
> debugging, profilers and other tools
> that make building and maintaining
> applications much easier.
Python has:
1. a [great interactive debugger][1], which makes very good use of Python [REPL... |
Your best bet is to avoid trying to build your own system out of primitives, and instead use locking unless it **really** shows up as a hot spot when profiling. (If you think you can be clever and avoid locks, don't. You aren't. That's the general "you" which includes me and everybody else.) You should at minimum u... |
If none of the code from the assembly is ever used, then eventually the pages from that assembly will be moved from memory into the page file in favour of actively used pages. In which case, the overall long-term effect is likely to be minor. Although, there will be a negative effect on startup time. |
Also, for some good techniques you might follow [Google's blog "Testing on the Toilet"](http://googletesting.blogspot.com/2007/01/introducing-testing-on-toilet.html). |
Silverlight 2 Drag and Drop tutorials |
|silverlight| |
I'm wondering if people can suggest the best tutorial that will walk me through the best way to do Drag and Drop with control collision detection etc, using MS Silverlight V2.
I've done the [Jesse Liberty tutorials][1] at Silverlight.net, and they were a good introduction, but I'm looking for something a bit deeper.... |
Much like you can tell System Events.app to sleep your Mac, you can tell Image Events.app to mess with your displays. The Image Events application provides a "displays" collection. Each display has a "profile" with lots of goodies. However, everything I just mentioned is read-only, so I don't have a good way to do i... |
If you're rather obsessive about speed here, you can do the following:
Each character is one byte, representing two hex values. Thus, each character is really two four-bit values.
So, you can do the following:
1. Unpack the four-bit values to 8-bit values using a multiplication or similar instruction.
2. U... |
## Windows ##
Some of the above values are easily available from the appropriate WIN32 API, I just list them here for completeness. Others, however, need to be obtained from the Performance Data Helper libary (PDH), which is a bit "unintuitive" and takes a lot of painful trial and error to get to work. (At least it ... |
## Windows ##
Some of the above values are easily available from the appropriate WIN32 API, I just list them here for completeness. Others, however, need to be obtained from the Performance Data Helper libary (PDH), which is a bit "unintuitive" and takes a lot of painful trial and error to get to work. (At least it ... |
## Windows ##
Some of the above values are easily available from the appropriate WIN32 API, I just list them here for completeness. Others, however, need to be obtained from the Performance Data Helper libary (PDH), which is a bit "unintuitive" and takes a lot of painful trial and error to get to work. (At least it ... |
## Windows ##
Some of the above values are easily available from the appropriate WIN32 API, I just list them here for completeness. Others, however, need to be obtained from the Performance Data Helper libary (PDH), which is a bit "unintuitive" and takes a lot of painful trial and error to get to work. (At least it ... |
## Windows ##
Some of the above values are easily available from the appropriate WIN32 API, I just list them here for completeness. Others, however, need to be obtained from the Performance Data Helper libary (PDH), which is a bit "unintuitive" and takes a lot of painful trial and error to get to work. (At least it ... |
target/host is usually the target tool chain you would be using (mostly arm-linux) |
My experience is that the CMM is so vague that its very easy to fulfill. Also, when they come to certify you, they look at the project that your organization chooses. Where I used to work, this was the project with no real deadline, plenty of money, and lots of time to spend on every nook and cranny of process. Many of... |
Mmm I think the Linux version of MySQL Workbench is out for download at:
<a href="http://forums.mysql.com/read.php?3,56274,56274#msg-56274">http://forums.mysql.com/read.php?3,56274,56274#msg-56274</a>
You can see the pre-release announcement here:
<a href="http://dev.mysql.com/workbench/?p=138">http://dev.mysql.co... |
There are a few approaches I can think of right off, each with differing levels of complexity and flexibility. I'm assuming your goal is to preserve an order in retrieval, rather than requiring storage as an actual linked list.
The simplest method would be to assign an ordinal value to each record in the table (e.g... |
If you see CMM run. And run fast. |
Detecting if WinHelp is Installed on Vista or newer Windows |
|windows|windows-vista|windows-server-2008|winhelp| |
Is there a reliable way to detect whether or not WinHelp is installed on Windows Vista or newer versions of Windows? If possible, I'd like a solution that's not specific to any particular version of Windows.
I've posted this question to other message boards and got back answers regarding the size of Winhlp32.exe bef... |
I've written a very simple GUI just like you propose. I have it running on Windows, Linux and Macintosh. It should port relatively easily to any system like the PSP or DS too.
It's open-source, LGPL and is here:
http://code.google.com/p/kgui/
|
How to guarantee 64-bit writes are atomic? |
|multithreading|lockless|c|atomic| |
When can 64-bit writes be guaranteed to be atomic, when programming in C on an Intel x86-based platform (in particular, an Intel-based Mac running MacOSX 10.4 using the Intel compiler)? For example:
unsigned long long int y;
y = 0xfedcba87654321ULL;
/* ... a bunch of other time-consuming stuff happens... |
|c|macos|multithreading|atomic|lockless| |
RhinoMocks: Correct way to mock property getter |
|tdd|rhino-mocks| |
I'm new to RhinoMocks, and trying to get a grasp on the syntax in addition to what is happening under the hood.
I have a user object, we'll call it User, which has a property called IsAdministrator. The value for IsAdministrator is evaluated via another class that checks the User's security permissions, and returns ... |
You might want to look at [Clutter][1], it looks pretty cool. I haven't used it yet but I intend to in an upcoming personal project.
[1]: http://clutter-project.org/ |
According to Chapter 7 of [Part 3A - System Programming Guide][1] of Intel's [processor manuals][2], quadword accesses will be carried out atomically if aligned on a 64-bit boundary, on a Pentium or newer, and unaligned (if still within a cache line) on a P6 or newer. You should use `volatile` to ensure that the compil... |
How to convert decimal to hex in JavaScript? |
|javascript|hex| |
How do you convert decimal values to their hex equivalent in JavaScript? |
yourNum = yourNum.toString(16);
and reverse the process with:
yourNum = parseInt(yourNum, 16); |
Others have hinted at it... but continue and break are enforced by the **compiler** and have their own associated rules. Goto has no such limitations, though the net effect *might* almost be the same, in some circumstances.
I do not consider continue or break to be harmful per se, though I'm sure either can be used ... |
I'm not 100% sure of the answer, but have you tried using reflector to look at what ManagementObjectSearcher does? It may give you some clue as to what you are doing wrong. |
var number = 3200;
var hexString = number.toString(16);
The 16 is the radix and there are 16 values in a hexidecimal number :-) |
Typically I create a Domain User with only the specific rights on the network which I will require the server to have (i.e. to write to the network backup drive), I then add the account to local power users or local administrators depending on what needs to be done on the machine, however this isn't required. I've ins... |
Your `WidgetHolder` is going to hold invalid references (pointers). You are passing objects on the stack and then holding references to their (temporary) addresses. This is bad.
You should only assign references to objects with the same lifetime as the reference itself.
Pass references to the constructor if you ... |
Your `WidgetHolder` is going to hold invalid references (pointers). You are passing objects on the stack to the constructor and then holding references to their (temporary) addresses. This is guaranteed to break.
**You should only assign references to objects with the same (or greater) lifetime as the reference itse... |
Also see [Five ways to return all rows from one table which are not in another table][1]
[1]: http://wiki.lessthandot.com/index.php/5_ways_to_return_rows_from_one_table_not_in_another_table |
Nice suggestions that have helped so far (not saying there aren't other nice suggestions below, just what has helped)
<ul>
<li>New 3GHz laptop - the power of lost utilization works wonders when whinging to management
<li>Disable Anti Virus during compile
<li>'Disconnecting' from VSS (actually the network) dur... |
Any PHP editors supporting 5.3 syntax? |
|php| |
I'm using namespaces in a project and Eclipse PDT, my IDE of choice, recognizes them as syntax errors. Not only it renders its convenient error checking unusable, but it also ruins Eclipse's PHP explorer.
5.3 features are coming to PDT 2.0 scheduled for release in December. Are there any alternatives for the present... |
|php|eclipse| |
|php|ide| |
AFAIK, at least with mysql, tmp tables are kept in RAM, making SELECTs much faster than anything that hits the HD |
There's other modes that have less complex functions used for `fill-paragraph-function`. Browsing through my install, it looks like the ones in ada-mode and make-mode are good examples. |
Sharepoint Lists automatically have an column with "ID" which auto increments. You simply need to select this column from the "modify view" screen to view it. |
While I am not sure it is a "valid" second factor, many websites have been using this type of process for a while: cookies. Hardly secure, but it is the type of item you are describing.
Insofar as regarding "something the user has" vs "something the user knows", if it is something resident on the user PC [like a ba... |
Basically the code above:
1. Creates a secure random number generator (for VB see link below)
2. Fills a bytearray of length 20 with random bytes
3. Base64 encodes the result (you can probably use Convert.ToBase64String(...))
You should find some help here:
http://msdn.microsoft.com/en-us/library/system.sec... |
Embed data in a C++ program |
|data|c|c++| |
I've got a C++ program that uses SQLite. I want to store the SQL queries in a separate file -- a plain-text file, *not* a source code file -- but embed that file in the executable file like a resource.
(This has to run on Linux, so I can't store it as an actual resource as far as I know, though that would be perfect... |
|c++|c|linux|data| |
A Manual merge is probably going to be the best option.
The main consideration will probably be to make sure that the logic for matching templates works in the combined stylesheet. |
Rather than adding the rows of the data grid one at a time, use the DataGridView.Rows.AddRange method to add all the rows at once. That should only update the display once. There's also a DataGridView.Columns.AddRange to do the same for the columns.
Skizz |