Hi all,
I am using AutoMapper in my project along with, NHibernate and ASP.NET MVC 2.
As the title states, if I have a list of DTOs or a DTO inside the parent DTO that I am mapping to the View Model, should I flatten out the inner DTOs as well ?
Thanks
Hi,
I've seen plenty of classes in .NET which have private constructor (Stream is one of them I think). When would I want to model a class like this?
I keep thinking that if my class has no internal state/fields, then I can make it have a private constructor.
Am I on the right track with this idea? I can understand the use of a factory (I've run into the tipping point a few times), but not with a private constructor class.
Thanks
I want to sort this block on date column:
["domain1.com" 18-Jan-2011 #"^/"
"domain2.com" 20-Aug-2011 #"^/"
"domain3.com" 23-Dec-2011 #"^/"
"domain4.com" 22-Sep-2011 #"^/"]
I can't see how to really do so with sort/skip function explained here, it's not crystal clear for me:
http://www.rebol.com/docs/words/wsort.html
How to create a new data type for Go which to can check/validate its schema when is created a new variable (of that type)?
By example, to validate if a string has 20 characters, I tried:
// Format: 2006-01-12T06:06:06Z
func date(str string) {
if len(str) != 20 {
fmt.Println("error")
}
}
var Date = date()
type Account struct {
domain string
username string
created Date
}
but it fails because Date is not a type.
In Core Data, most of the time relationships are modeled bidirectional. But the docs say in another place:
It typically only makes sense to model
a to-one relationship in one
direction.
I am running
ruby script/generate scaffold
or
ruby script/generate model
and I know the basic syntax, like
ruby script/generate scaffold Dude name:string face:boolean
but I do not know things like:
should names of variables have
underscores or be camelCased?
what
kind of variable types are
acceptable?
Where can I find such information?
THANKS!
P.S. The answers to my two questions would help for now, too :)
I want to trigger a special action in the save() method of a Django model object when I'm saving a new record (not updating an existing record.)
Is the check for (self.id != None) necessary and sufficient to guarantee the self record is new and not being updated? Any special cases this might overlook?
Hello All,
I am working with asp.net and model popup. in popup window when i edit the changes it must get reflect on paren windows grid view. so any one tell me how to refresh paren window after closing popup.
Thank in advance.
Simplified table structure (the tables can't be merged at this time):
TableA:
dts_received (datetime)
dts_completed (datetime)
task_a (varchar)
TableB:
dts_started (datetime)
task_b (varchar)
What I would like to do is determine how long a task took to complete.
The join parameter would be something like
ON task_a = task_b AND dts_completed < dts_started
The issue is that there may be multiple date-times that occur after the dts_completed.
How do I create a join that only returns the first tableB-datetime that occurs after the tableA-datetime?
Why are these used prior to defining a method for a model?
@classmethod
@staticmethod
What is the difference between them? Are there others I should be aware of?
Must I use them?
i have a table with column:
Registereddate orgid
2010-06-05 10:16:00 1
2010-06-05 10:10:00 2
2010-06-04 22:31:00 3
... .
. .....
.
.
.
i need to get only last weeek dates and orgid from today to last 7 days date..
How to create a cron job in PHP for getting the update of modified date and time of files/folders?
I am a newbie to create a cron job how to get started?
How to create a new data type which to can check/validate its schema when is created a new variable (of that type)?
By example, to validate if a string has 20 characters, I tried:
{{{
// Format: 2006-01-12T06:06:06Z
func date(str string) {
if len(str) != 20 {
fmt.Println("error")
}
}
var Date = date()
type Account struct {
domain string
username string
created Date
}
}}}
but it faills because Date is not a type.
Hi,
Is there any reason behind using this date as standard for time manipulation? I have seen this standard in Java as well as in Python. These two languages I am aware of. Is other popular languages also follows the same standard?
Please describe.
I have a table with three columns: patient_id, obs_date, and weight_val. patient_id stores patient identification #, weight_val stores a weight value, and obs_date stores the date when the weight reading was taken. So, a patient can have many different weight readings at different dates.
How do you write a query for:
select all patients whose last weight reading is 120?
I'm replacing a website that was previously HTML only.
I put a GridView on the French and the English page and I'm getting 2 fields: A date and a currency.
For the date, I need to transform it into a long date format. The English part isn't very hard, but when I get to the French page, I can't transform it into a long date format with French words (i.e.:Mardi instead of Tuesday).
Is there any way to format the string with French date words instead?
More specifically, how do you model a functional program, or one developed using the Functional Style (without classes) using a diagram, and not textual representation, is it at all possible and could someone please direct me towards the nearest application that would do this (open source, of free as in beer, if you please)
Is there a way in NHibernate to start with an unproxied model
var m = new Model() { ID = 1 };
m.Name = "test";
//Model also has .LastName and .Age
Now save this model only updating Name without first selecting the model from the session?
I am getting the MOdel.StudentID from data base in my view..
I need to put this StudentId in textaren?
<textarea> ?? </textarea>
how to assing this value?
so that in textare I can see StudentID?
thanks
What are the cakePHP usages/meanings of the model, lft, and rght fields in a acos table?
Similarly, what are the usages/meanings of the lft and rght fields in a aros table?