Basically, DAL (Data Access Layer) should provide simple CRUD (Create/Read/Update/Delete) methods but I always have a temptation to create more sophisticated methods in order to minimize database access roundtrips from Business Logic Layer.
What do you think about following extensions to CRUD (most of them are OK I suppose):
Read: GetById,…
I have a form text field that is being populated with a default value. I would like to clear the value and enter white space to assert that the expected validation occurs. I am using Selenium RC and the PHPUnit Selenium extension. How can I achieve this?
Note: I have already tried doing these, but they do not work:
$this->type('FirstName',…
Hello,
Here's how the situation looks :
I have a couple simple forms
<form action='settings.php' method='post'>
<input type='hidden' name='setting' value='value1'>
<input type='submit' value='Value1'>
</form>
Other small forms close to it have value2, value3, ... for the specific setting1, etc.
Now, I have all…
I'm on a shared webhost where I don't have permission to edit the global bash configuration file at /ect/bashrc. Unfortunately there is one line in the global file, mesg y, which puts the terminal in tty mode and makes scp and similar commands unavailable. My local ~./bashrc includes the global file as a source, like so:
# Source global…
Let's say I have this data model:
class Workflow(models.Model):
...
class Command(models.Model):
workflow = models.ForeignKey(Workflow)
...
class Job(models.Model):
command = models.ForeignKey(Command)
...
Suppose somewhere I want to loop through all the Workflow objects, and for each workflow I want to loop through its…
I need to generate a checksum over a dictionary. Keys and Values.
Is there any simple way to accomplish this in an iterative way.
foreach(var item in dic.Keys)
checksum += checksum(dic[item]) + checksum(item);
In this case, keys and values could be converted to strings, concatinated and then a single checksum applied over these…
How did Perl gain a reputation (deserved, undeserved, or used to be deserved, no longer so) of being a "write only language"?
Was it
The syntax of the language
Specific features that were available in the language
Specific features not being available in the language (or at least old versions of it)
The kind of tasks Perl was…
Does java have a built-in method to compare precedence of two operators? For example, if I have a char '/' and a char '+' is there a method I can call that compares the two and returns true/false if the first is greater than the second (e.g. true)?
Hello everybody.
Public web-site provides list of employees to Internet visitors. Contact information is hidden but visitor can send email via popup email-form.
What do you think about automated-scripts/viruses/bot spam activity? Is Capture a "must" for this functionality and what kind of precautions can you suggest also?
…
I'm just getting started with OOP PHP via PHP Object-Oriented Solutions and am a little curious about the notion of protection in OOP.
The author clearly explains how protection works, but the bit about not wanting others to be able to change properties falls a bit flat.
I'm having a hard time imagining a situation where it…
I have a fairly large application that uses WPF for its user interface. I recently found an unusual defect regarding 3D screensavers. The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. Other screensavers are fine.
My application only…
I've been quite impressed with dynamic data and how easy and quick it is to get a simple site up and running. I'm planning on using it for a simple internal HR admin site for registering people's skills/degrees/etc.
I've been watching the intro videos at www.asp.net/dynamicdata and one thing they never mention is how to…
We have a group of beta testers for iPhone app. Recently, we added in-app purchases to the app.
Before this, we would send out ad hoc builds to beta testers using a separate bundle ID and name so that they could have the store build and the ad hoc build on their phones.
However, it seems like we have to build the ad…
JavaMail requires that you specify an external SMTP server when sending mail. I want to have my java app send email directly without having to use an external SMTP server such as postfix or sendmail.
Can anyone recommend a library which provides this kind of functionality?
Ive done some googling and have come up…
I am working with the open source flash player at http://flash-mp3-player.net/ and I am trying to figure out how to limit one sound file at a time. I know this has been done on a number of sites but I am unsure how to approach it.
Scenario: A page has five different instances of the flash player. The user is…
I have a basic XML object that I'm working with. I can't figure out how to access the parts of it.
EX:<br>
<pre><code>
< FacetsData>
< Collection name="CDDLALL" type="Group">
< SubCollection name="CDDLALL" type="Row">
< Column name="DPDP_ID">D0230<…
Simply, I'm just looking to get a list of connected remote disks.
I have a script right now that compares /Volumes/ to "diskutil -list" but that only gives me the name of the remote disks, not the actual address.
Anyone have ideas as to how I might go about doing this?
Thanks in advance.
Hi all, my problem has to do with the SimpleModal jQuery plugin. I have no problem opening the modal window, but once it opens it stays where it is [centered] on the screen, however its contents are changing, making it taller and therefore no longer centered. Is there a simple way to realign it so…
Suppose you have two sets of conceptual entities:
MarketPriceDataSet which has multiple ForwardPriceEntries
PoolPriceForecastDataSet which has multiple PoolPriceForecastEntry
Both different child objects have near identical fields:
ForwardPriceEntry has
MarketPriceDataSetId (foreign key to…
I'm looking for tidy suggestions on how people organise their controller tests.
For example, take the "add" functionality of my "Address" controller,
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Add()
{
var editAddress = new DTOEditAddress();
editAddress.Address = new Address();
…
I have an XML document with companies listed in it. I want to create a link with XSLT that contains the <link> child of the next node. Sorry if this is confusing..here is some sample XML of what i'm trying to obtain:
<portfolio>
<company>
<name>Dano…
So, despite Matt's generous explanation in my last question, I still didn't understand and decided to start a new project and use an internal list.
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
codesList = [[NSString alloc]…
I want to make a URL Shortener that uses and Online URL Shortener API
I want to use this api here - http:// cut2.tk/api-about.php
So the api code is this
http://cut2.tk/api.php?url= LONG URL HERE
I want to use an User Form with 2 TextBoxes and two…
What are the best practices for securing a coldfusion webpage from malicious users? (including, but not limited to, sql injection attacks)
Is cfqueryparam enough?