instruction stringlengths 0 30k ⌀ |
|---|
In C, a struct can have another struct as one of it's members. While this isn't exactly the same as what you're asking, you could end up either with a situation where one struct contains another, or one struct contains two structs, both of which hold parts of the info that you wanted.
psuedocode: i don't remember the actual syntax.
A.field1 = 1;
A.field2 = 'a';
A.field3 = struct B;
to access:
A.field3.field4;
or something of the sort.
Or you could have struct C hold both an A and a B:
C.A = struct A;
C.B = struct B;
with access then something like
C.A.field1;
C.A.field2;
C.B.field3;
C.B.field4;
hope this helps!
EDIT: both of these solutions avoid naming collisions.
Also, I didn't see your `matlab` tag. By convention, you should want to edit the question to include that piece of info. |
J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000100: Machine name: DEV J0000100: Project file: E:\mbiek\foo.pf J0000100: Template file: E:\mbiek\foot.xdt J0000100: Job name: MBiek J0000100: Output folder: E:\foo\A0001401 J0000100: Temp folder: E:\foo\Output\A0001401 J0000100: Document 1 - Starting document J0005000: Document 1 - Text overflowed on page 1 (warning) J0000101: Document 1 - 1 page(s) composed J0000102: Document 1 - 1 page(s) rendered at 500 x 647 pixels J0000100: Document 1 - Completed successfully J0000020:
I have this gigantic ugly string and I'm tring to extract pieces from it using regex.
In this case, I want to grab everything after "Project Name" up to the part where it says "J0000011:" (the 11 is going to be a different number every time).
Here's the regex I've been playing with
Project name:\s+(.*)\s+J[0-9]{7}:
The problem is that it doesn't stop until it hits the **J0000020:** at the end.
How do I make the regex stop at the first ocurrence of **J[0-9]{7}**? |
I think you should just shake this feeling of "odd". There's nothing odd about it. |
http://www.aquafold.com/
I use it at work on windows but it's java and supports OSX. |
If I understand your schema and question correctly, how about something like this:
select student_name, score
from students
join (select student_answers.student_id, count(*) as score
from student_answers, answer_key
group by student_id
where student_answers.question_id = answer_key.question_id
and student_answers.answer = answer_key.answer)
as student_scores on students.student_id = student_scores.student_id
where score >= 7
order by score, student_name
That should select the students with a score of 7 or more, for example. Just adjust the where clause for your purposes. |
Make .* non-greedy by adding '?' after it:
Project name:\s+(.*?)\s+J[0-9]{7}: |
For python you can try using [processing module][1].
[1]: http://pyprocessing.berlios.de/ |
FYI, in this particular case, the reason the `IBOutlet` even exists is simply so that Interface Builder can parse the source file and glean bits of understanding from it. It's a clue (well, a bit stronger than a clue) that the variable preceded by `IBOutlet` should show up as an Outlet in Interface Builder when designing your UIs. |
Mike Rettig created a .NET library called [Retlang](http://code.google.com/p/retlang/) and a Java port called Jetlang that is inspired by Erlang's concurrency model. |
Using non-greedy quantifiers here is probably the best solution, also because it is more efficient than the greedy alternative: Greedy matches generally go as far as they can (here, until the end of the text!) and then trace back character after character to try and match the part coming afterwards.
Hower, consider using a negative character class instead:
Project name:\s+(\S*)\s+J[0-9]{7}:
`\S` means “everything except a whitespace and this is exactly what you want. |
[RichQ's answer][1] is a reasonable technique, if you're using an array, vector, etc.
If you're a collection that isn't indexed by ordinal values... or think you *might need to* at some point in the near future... then you might want to consider exposing your own iterator type(s), and associated `begin()`/`end()` methods:
class Blah
{
public:
typedef std::vector<mydata> mydata_collection;
typedef myDataCollection::const_iterator mydata_const_iterator;
// ...
mydata_const_iterator data_begin() const
{ return myPreciousData.begin(); }
mydata_const_iterator data_end() const
{ return myPreciousData.end(); }
private:
mydata_collection myPreciousData;
};
...which you can then use in the normal fashion:
Blah blah;
for (Blah::mydata_const_iterator itr = blah.data_begin();
itr != blah.data_end();
++itr)
{
// ...
}
[1]: http://stackoverflow.com/questions/44693/in-c-what-alternatives-do-i-have-for-exposing-a-collection-from-the-point-of-vi#44734
|
[RichQ's answer][1] is a reasonable technique, if you're using an array, vector, etc.
If you're using a collection that isn't indexed by ordinal values... or think you *might need to* at some point in the near future... then you might want to consider exposing your own iterator type(s), and associated `begin()`/`end()` methods:
class Blah
{
public:
typedef std::vector<mydata> mydata_collection;
typedef myDataCollection::const_iterator mydata_const_iterator;
// ...
mydata_const_iterator data_begin() const
{ return myPreciousData.begin(); }
mydata_const_iterator data_end() const
{ return myPreciousData.end(); }
private:
mydata_collection myPreciousData;
};
...which you can then use in the normal fashion:
Blah blah;
for (Blah::mydata_const_iterator itr = blah.data_begin();
itr != blah.data_end();
++itr)
{
// ...
}
[1]: http://stackoverflow.com/questions/44693/in-c-what-alternatives-do-i-have-for-exposing-a-collection-from-the-point-of-vi#44734
|
|sql|ms-access| |
Updating an old ASP/Access site for a client (and hating it) - I need SQL to add a column to an existing table and set a default value. Doesn't work - any ideas?
This works fine
ALTER TABLE documents ADD COLUMN membersOnly NUMBER
I want this to work:
ALTER TABLE documents ADD COLUMN membersOnly NUMBER DEFAULT 0
Have googled and seen instructions for default values work for other field types but I want to add number. Thanks! |
Win32 HCURSOR |
|c++|winapi|native| |
I am building a custom win32 control/widget and would like to change the cursor to a horizontal "splitter" symbol when hovering over a particular vertical line in the control. IE: I want to drag this vertical line (splitter bar) left and right (WEST and EAST).
Of the the system cursors (OCR_*), the only cursor that makes sense is the OCR_SIZEWE. Unfortunately, that is the big, awkward cursor the system uses when resizing a window. Instead, I am looking for the cursor that is about 20 pixels tall and around 3 or 4 pixel wide with two small arrows pointing left and right.
I can easily draw this and include it as a resource in my application but the cursor itself is so prevalent that I wanted to be sure it wasn't missing something.
For example: when you use the COM drag and drop mechanism (CLSID_DragDropHelper, IDropTarget, etc) you implicitly have access to the "drag" icon (little box under the pointer). I didn't see an explicit OCR_* constant for this guy ... so likewise, if I can't find this splitter cursor outright, I am wondering if it is part of a COM object or something else in the win32 lib. |
How far does SQL Server Express Edition scale? |
|sql-server| |
Wikipedia says SQL Server Express Edition is limited to "one processor, 1 GB memory and 4 GB database files". Does anyone have practical experience with how well this scales?
|
I'll second the vote for [Telerik][1]. Their controls for the most part "just work" and their support has been excellent. I primarily use their forums and I still receive a response within a day (unlike some other vendors who barely seem to notice that they've even got a forum).
It also feels like they've actually spent time trying out a lot of the ways customer's will use their controls. The documentation and support reflects it. They aren't perfect, though. One issue that they had in the past, and that they've addressed in the latest releases (what they were calling their "Prometheus" controls, now just "Rad Controls for ASP.NET AJAX") is the performance of the controls. In previous releases they were definitely a bit sluggish (I'm thinking specifically of their RadGrid and RadEditor). Now they're noticeably faster (esp. the RadEditor - it loads MUCH faster).
Overall I wouldn't think twice of recommending them.
[1]: http://www.telerik.com |
I think that [HTML tidy][1] will do what you want. There is a Python binding for it.
[1]: http://tidy.sourceforge.net/ |
This will work. It's messy because in BAT files you can't use set var=\`cmd\` like you can in unix.
The fact that echo doesn't understand quotes is also messy, and could lead to trouble if `Some Pattern` contains shell meta characters.
set FILENAME=%~f1
echo s/Some Pattern/%FILENAME%/ | sed -e "s/\\/\\\\/g" >sedcmd.tmp
sed -f sedcmd.tmp inputfile
del /q sedcmd.tmp |
This will work. It's messy because in BAT files you can't use set var=\`cmd\` like you can in unix.
The fact that echo doesn't understand quotes is also messy, and could lead to trouble if `Some Pattern` contains shell meta characters.
set FILENAME=%~f1
echo s/Some Pattern/%FILENAME%/ | sed -e "s/\\/\\\\/g" >sedcmd.tmp
sed -f sedcmd.tmp inputfile
del /q sedcmd.tmp
[Edited]: I am suprised that it didn't work for you. I just tested it, and it worked on my machine. I am using sed from <http://sourceforge.net/projects/unxutils> and using cmd.exe to run those commands in a bat file. |
How do I make bash reverse-search work in Terminal.app without it displaying garbled output? |
|macos|bash| |
Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash. Is there some kind of termcap or perhaps a bash shopt command that can fix this? It is very annoying.
Steps to reproduce: Open Terminal.app, reverse-search to a longish command. Hit <ctrl>-E once you've found the command. The cursor goes to the end of the line, but the display doesn't update.
I'm guessing this is some kind of problem with the readline library on OS X. It's more of a problem with updating the cursor position after a search than anything else. Basically, ctrl-a and ctrl-e tend to break the search output.
![os x terminal failure image][1]
In the above, the first part of the command should be displayed, and the cursor should be at the end of the line, but it isn't. You literally can't see what you're editing when this happens.
[1]: http://involution.com/images/osxterminal.png |
I wouldn't recommend just making the switch on an existing project. Perhaps start a small "demo" project that the team can use to experiment with the technology and (if necessary) learn what they need to and demonstrate to management that it is worthwhile to make the switch. In the end, even the dev team might realize they aren't ready or it's not worth it.
Whatever you do, be sure to document it. Perhaps if you use a demo project, write a postmortem for future reference. |
SQL Server - testing the database |
|sql-server|unit-testing| |
What tools are people using for testing SQL Server databases? TSQLUnit? |
What tools are people using for testing SQL Server databases?
By this I mean all parts of the database - configuration, tables, column type, stored procedures, constraints.
Most likely, there is no one tool to do it all. |
You could launch a new bash process redirecting the stderr of that process:
$ bash -i 2> stderr.log
$
|
Use the `exec` builtin in bash:
`exec 2> /tmp/myfile` |
If you want a pen and papper kind of exercizes I'd recommend more designing than coding.
Actually coding in paper sucks and it let's you learn almost nothing. Work enviroment does matter so typing in a computer, compiling, seeing what errors you've made, using refactor here and there, just doesn't compare to what you can do on a piece of paper and so, what you can do on a piece of paper, while being an interesting mental exercize is not practical, it will not improve your coding skills so much.
On the other hand you can design the architecture of a medium or even complex application by hand in a paper. In fact I usually do. Engineering tools (such as Enterprise Architect) are not good enough to replace the good all by-hand diagrams.
Good projects could be, How would you design a game engine? Classes, Threads, Storage, Physics, the data structures which will hold everything and so on. How would you start a search engine? How would you design an pattern recognition system?
I find that kind of problems much more rewarding that any paper coding you can do. |
Have you tried getting a write lock on the file? If it's being written to, that should fail, and you know to leave it alone for a bit... |
To use the least amount of space you should use a CHAR field constrained to 'Y' or 'N'. Oracle doesn't support BOOLEAN, BIT, or TINYINT data types, so CHAR's one byte is as small as you can get. |
You probably have to go with some out of band signaling: have the producer of "file.ext" write a dummy "file.ext.end". |
Doing your own BigNum library is complicated, so i'd say like jjnguy. Use whatever your language offers as libraries.
In .net, reference the VisualJ dll as they contain the BigInteger and BigDecimal classes. You should however be aware of some limitations of these libraries, like the lack of a square root method, for example. |
I would create a test site first, and see what the team thinks, but for me I wouldn't go back to WebForms after using MVC.
Some people don't like code mixed with HTML, and I can understand that, but I far prefer the flexibility over things like Page Lifecycle, rendering HTML and biggy for me - no viewstate cruft embedded in the page source.
Some people prefer MVC for better testibility, but personally most of my code is in the middle layer and easily tested anyway... |
Can IIS 6 serve requests for pages with no extensions? |
|iis| |
Is there any way in IIS to map requests to a particular URL with no extension to a given application.
For example, in trying to port something from a Java servlet, you might have a URL like this...
http://[server]/MyApp/HomePage?some=parameter
Ideally I'd like to be able to map everything under MyApp to a particular application, but failing that, any suggestions about how to achieve the same effect would be really helpful. |
This method is basically from David Marr's book "Vision"
Gaussian blur your signal with the expected width of your peaks.
this gets rid of noise spikes and your phase data is undamaged.
Then edge detect (LOG will do)
Then your edges were the edges of features (like peaks).
look between edges for peaks, sort peaks by size, and you're done.
I have used variations on this and they work very well.
|
TBH, PHP probably isn't the best tool for this, really not what it was designed for. I've heard of memory leaks and other bad things happening when you try this. Also bear in mind PHP only has a finite amount of resource ids (for file handles, db connections ect) per execution of a script.
Be better of using something else, maybe python or perl, though I don't have any real experience writing these sorts of apps, but I do know PHP isn't right for what your trying to do. |
Automatically floating all fields in a VFP report? |
|visual-foxpro|foxpro|report| |
I want to set all the fields and labels on a VFP7 report to "Float". I tried `USE`ing the `.frx` file and doing the following `REPLACE` but it didn't work. Is there some other field I need to change too?
REPLACE float WITH .T. FOR objtype = 8 |
|report|foxpro|visual-foxpro| |
I want to set all the fields and labels on a VFP7 report to "Float" and "Stretch with overflow". I tried `USE`ing the `.frx` file and doing the following `REPLACE` but it didn't work. Is there some other field I need to change too?
REPLACE float WITH .T. FOR objtype = 8 |
You mean change the text file before it's committed? You can (I'm not sure how), but it's generally not a good idea, as it doesn't tell the client about the change, so the local copies become void on a commit.
What I would do is block the commit (non zero exit), and give an error message as to why you don't want that revision to go through. |
What's the best way to keep a PHP script running as a daemon? |
|php|daemon| |
What is the best way to keep a PHP script running as a daemon, and what's the best way to check if needs restarting.
I have some scripts that need to run 24/7 and for the most part I can run them using nohup. But if they go down, what's the best way to monitor it so it can be automatically restarted? |
**Very. Equally important as choosing good method and variable names.**
Much more if your test suite is going to referred to by new devs in the future.
As for your original question, definitely Answer1. Typing in a few more characters is a small price to pay for
- the readability. For you and others. It'll eliminate the 'what was I thinking here?' as well as 'WTF is this guy getting at in this test?'
- Quick zoom in when you're in to fix something someone else wrote
- instant update for any test-suite visitor. If done correctly, just going over the names of the test cases will inform the reader of the specs for the unit. |
The default is CTRL+F10 but it can be overridden. The place to find what your current shortcuts are and change them is
> **T**ools
**C**ustomize...
**K**eyboard...
Show **c**ommands containing:
Debug.RunToCursor
or
>**T**ools
**O**ptions
**E**nvironment
**K**eyboard
Show **c**ommands containing:
Debug.RunToCursor |
Maven2 Eclipse integration |
|eclipse|maven2| |
There seem to be two rival Eclipse plugins for integrating with Maven:
[m2Eclipse][1]
and
[q4e][2].
Has anyone recently evaluated or used these plugins?
Why would I choose one or the other?
[1]: http://m2eclipse.codehaus.org/
[2]: http://code.google.com/p/q4e/ |
|eclipse|maven2|build| |
User scripts are accessible via the script menu in Xcode's menubar (between the Window and Help menus). Wasn't sure what else to call them. What I'm asking about are not "run script" build phase scripts. |
I have been using m2Eclipse for quiet some time now and have found it to be very reliable. I wasn't aware of q4e until I saw this question so I can't recommend one over the other. |
Why don't you post the schema you have now? It's too broad a question to answer usefully without some detail of what platform and database you're going to use and the table structure you're proposing... |
Given your mention of "C#'s reflection power", I am unsure whether you're looking for an interactive C# console for small code snippets of your own (à la Ruby's `irb`), or a means of interacting with an existing, compiled application currently running as a process.
In the former case:
* **Windows PowerShell** might be your friend
* Another candidate would be the [**C# shell**](http://michael.susens-schurter.com/blog/2006/12/20/cssh-c-shell/)
* Finally, [**CSI**](http://www.codeproject.com/KB/cs/csi.aspx), a Simple C# Interpreter |
Yes.
[Test]
public void UsernameValidator_LessThanLengthLimit_ShouldValidate() {}
Put the test subject first, the test statement next, and the expected result last.
That way, you get a clear indication of what it is doing, and you can easily sort by name :) |
Tools -> Options -> Tables/Queries -> (At the bottom right:) Sql Server Compatible Syntax - turn option on for this database.
then you can execute your query:
ALTER TABLE documents ADD COLUMN membersOnly NUMBER DEFAULT 0
|
Have you tried using Valgrind? That is usually the fastest and easiest way to debug these sorts of errors. If you are reading or writing outside the bounds of allocated memory, it will flag it for you. |
jQuery AJAX vs. UpdatePanel |
|asp.net|jquery|updatepanel| |
We've got a page with a ton of jQuery (approximately 2000 lines) that we want to trim down b/c it is a maintenance nightmare, and it might be easier to maintain on the server. We've thought about using UpdatePanel for this. However, we don't like the fact that the UpdatePanel is sending the whole page back to the server.
Looking for suggestions. |
Seems like dealing with licensing issues would be nightmarish for the host. |
As an interesting side note, WPF's binding handles marshaling automatically so you can bind the UI to object properties that are modified on background threads without having to do anything special. This has proven to be a great timesaver for me.
In XAML:
<TextBox Text="{Binding Path=Name}"/>
|
`malloc` can return `NULL` if no memory is available. You're not checking for that. |
I run XCode on a 17" iMac (2 yrs old) with 2GB of RAM and haven't had any trouble. |
Look into the LIKE clause |
Well, `".*"` is a greedy selector. You make it non-greedy by using `".*?"` When using the latter construct, the regex engine will, at every step it matches text into the `"."` attempt to match whatever make come after the `".*?"`. This means that if for instance nothing comes after the `".*?"`, then it matches nothing.
Here's what I used. `s` contains your original string. This code is .NET specific, but most flavours of regex will have something similar.
`string m = Regex.Match(s, @"Project name: (?<name>.*?) J\d+").Groups["name"].Value;` |
memset() causing data abort |
|c|c++|memory| |
I'm getting some strange, intermittent, data aborts (< 5% of the time) in some of my code, when calling memset. The problem is that is usually doesn't happen unless the code is running for a couple days, so it's hard to catch it in the act.
I'm using the following code:
char *msg = (char*)malloc(sizeof(char)*2048);
char *temp = (char*)malloc(sizeof(char)*1024);
memset(msg, 0, 2048);
memset(temp, 0, 1024);
char *tempstr = (char*)malloc(sizeof(char)*128);
sprintf(temp, "%s %s/%s %s%s", EZMPPOST, EZMPTAG, EZMPVER, TYPETXT, EOL);
strcat(msg, temp);
//Add Data
memset(tempstr, '\0', 128);
wcstombs(tempstr, gdevID, wcslen(gdevID));
sprintf(temp, "%s: %s%s", "DeviceID", tempstr, EOL);
strcat(msg, temp);
As you can see, I'm not trying to use memset with a size larger that what's originally allocated with malloc()
Anyone see what might be wrong with this? |
|c++|c|memory|windows-mobile| |
I run XCode for Mac development on a 20" current-gen iMac and it works perfectly with plenty of other processes running. You can definitely use the iMac to develop software. |
I don't have a recommendation, but I do have some feedback on the Telerik recommendations. I can't stand their tools myself. The performance of their more complicated controls (e.g., Tree, Grid) is very sluggish and feels very un-web 2.0. |
I thought everyone used cometd for this sort of thing. |
Try tidylib. You can get some really basic bindings as part of the elementtidy module (builds elementtrees from HTML documents). http://effbot.org/downloads/#elementtidy
>>> import _elementtidy
>>> xhtml, log = _elementtidy.fixup("<html></html>")
>>> print log
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 1 column 7 - Warning: discarding unexpected </html>
line 1 column 14 - Warning: inserting missing 'title' element
Parsing the log should give you pretty much everything you need. |
I can't reproduce this, hitting either Ctrl+E, Ctrl+A or the arrow keys updates the command line correctly. Are you running 10.5.4? Is it perhaps a bug in earlier versions? |
In FxCop 1.36 there is actually a project option on the "Spelling & Analysis" tab that will supress analysis for any generated code.
If you don't want to turn analysis off for all generated code, you need to make sure that you add a CODE_ANALYSIS symbol to the list of conditional compilation symbols (project properties, Build tab). Without this symbol defined, the SupressMessage attributes will be removed from the compiled code so FxCop won't see them.
The other problem with your SuppressMessage attribute is that you are listing a "Target" of a specific method name (in this case WindowsClient.MainForm.InitializeComponent():System.Void) and listing a specific "Scope". You may want to try removing these; otherwise you should add this SuppressMessage to each instance of the method.
You should also upgrade to the [RTM version][1] of FxCop 1.36, the beta will not automatically detect the newer version.
[1]: http://davesbox.com/archive/2008/08/17/fxcop-1-36-released.aspx |
We have used SQL Server Express Edition in some of our smaller applications, maybe 5+ users, and smaller databases. The 4GB is very limiting in a high transaction environments, and in some cases we have had to migrate our customer to SQL Server Standard Edition. |
I would second: Programming Game AI by example (Matt Buckland)
This book gives great algorithms that should easly port to XNA. |
It's a regular sql server, it just has a limit. SharePoint by default uses the sql server express if that gives you any idea. We have our entire office (80+) people running on that instance. |
If you just want want the highest recursion depth couldn't you do something like this?
WITH cteLevelOne (ParentID, CustID, Depth) AS
(
SELECT a.ParentID, a.CustID, 1
FROM tblCustomer AS a
WHERE a.CustID = @LookupID
UNION ALL
SELECT a.ParentID, a.CustID, max(c.Lvl) + 1
FROM tblCustomer AS a
INNER JOIN cteLevelOne AS c ON a.CustID = c.ParentID
WHERE c.CustID <> a.CustomerID
)
Then, when you actually query the CTE just look for the record with max(Depth)?
|
There's a course for such things at my university: [CSE 326][1]. I didn't think the book was too useful, but the projects are fun and teach you a fair bit about implementing some of the simpler structures.
As for examples, one of the most common problems (by number of people using it) that's solved with trees is that of cell phone text entry. You can use trees, not necessarily binary, to represent the space of possible words that can come out of any given list of numbers that a user punches in very quickly.
[1]: http://www.cs.washington.edu/education/courses/326/ |
The first thing I think about when I read this question is: *what types of things use graphs/trees?* and then I think backwards to how I could use them.
For example, take two common uses of a tree:
- The DOM
- File systems
The DOM, and XML for that matter, resemble tree structures. <br>
![alt text][1]
It makes sense, too. **It makes sense because of how this data needs to be arranged**. A file system, too. On a UNIX system there's a root node, and branching down below. When you mount a new device, you're attaching it onto the tree.
You should also be asking yourself: does the data fall into this type of structure? Create data structures that make sense to the problem and the rest will follow.
As far as being easier, I think thats relative. Are you good with recursive functions to traverse a tree/graph? What if you need to balance the tree?
Think about a program that solves a word search puzzle. You could map out all the letters of the word search into a graph and check surrounding nodes to see if that string is matching any of the words. But couldn't you just do the same with with a single array? All you really need to do is move an index to check letters to the left and right, and by the width to check above and below letters. Solving this problem with a graph isn't difficult, but it can create a lot of extra work and difficulty if you're not comfortable with using them - of course that shouldn't discourage you from doing it, especially if you are learning about them.
I hope that helps you think about these structures. As for a book recommendation, I'd have to go with **[Introduction to Algorithms][2]**.
[1]: http://www.w3.org/TR/DOM-Level-2-Core/images/table.gif
[2]: http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262032937 |
You can try the BringWindowToTop function to not steal focus. I haven't used it, but it seems to be what you're looking for. |
Unfortunately, I do not think that there is a clean way to do this in SQL2000. If you narrow your requirements to SQL2005+, then you are in business. You can use the SQLDependency class in System.Data.SqlClient. See <http://msdn.microsoft.com/en-us/library/t9x04ed2.aspx> |
You need a reverse DNS entry. You need to not send the same content to the same user twice. You need to test it with some common webmail and email clients.
Personally I ran mine through a freshly installed spam assassin, a trained spam assassin, and multiple hotmail, gmail, and aol accounts.
But have you seen that spam that doesn't seem to link to or advertise anything? That's a spammer trying to affect your Bayesian filter. If he can get a high rating and then include some words that would be in his future emails it might be automatically learned as good. So you can't really guess what a user's filter is going to be set as at the time of your mailing.
Lastly, I did not sort my list by the domains, but randomized it. |
There are all sorts of icons, cursors, and images in use throughout the Windows UI which are not publicly available to 3rd-party software. Of course, you could still load up the module in which they reside and use them, but there's really no guarantee your program will keep working after a system update / upgrade.
Include your own. The last thing you want is adding an extra dependency over a tiny little cursor. |
Practical Experience using Stripes? |
|java|stripes| |
I am coming from an Enterprise Java background which involves a fairly heavyweight software stack, and have recently discovered the
[Stripes framework](http://www.stripesframework.org/); my initial impression is that this seems to do a good job of minimising the unpleasant parts of building a web application in Java.
Has anyone used Stripes for a project that has gone live? And can you share your experiences from the project? Also, did you consider any other technologies and (if so) why did you chose Stripes? |
I just ended up reading the vim manual a few times, over the years, picking up useful features on each iteration.
One thing that really made vim work for me as a perl IDE was starting to use tags, as explained here: http://www.vim.org/tips/tip.php?tip_id=94. Using the pltags script that ships with vim, you can jump around between modules to find your functions, methods, etc. |