Displaying 10 results from an estimated 10 matches for "worktim".
Did you mean:
worktime
2007 Aug 04
2
Problems using "lm" in combination with "predict"
Hello everybody,
I'm trying to predict a linear regression model but it does not work.
My Model: y = Worktime + Vacation + Illnes + Bankholidays
My modelmatrix is of dimension 28x4
Then I want to make use of the function predict because there confidence.intervals are include.
My idea was:
mod <- lm(y~Worktime+Vacation+Illnes+Bankholidays)
newdate=data.frame(x=c(324,123,0.9,0.1))
predict(y,newdate...
2013 Mar 30
1
How to use group in nested associations
The below query fails:
Timesheet.joins(:time_entries).select("timesheets.*,
sum(time_entries.worktime) as total").group("timesheets.start_date")
The models have the following relations:
Timesheet < AR
has_many :activities, dependent: :destroy, inverse_of: :timesheet
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities, allow_destroy: true...
2013 Mar 04
0
fields_for with accepts_nested_attributes: how to pass a value to a label
...ime_entries.build(:workdate; date)
end
end
...
In the Timesheet model I defined accepts_nested_attributes for time_entries
association:
class Timesheet < AR
has_many :time_entries, :dependent: :destroy
accepts_nested_attributes_for :time_entries, reject_if: proc { |attr|
attr[''worktime].blank? }
end
in the Timesheet ''new'' page:
<%= form_for @timesheet do |f|%>
<%= f.label :status%>
<%= f.text_field :status %>
<%= fields_for :time_entries do | entry_form| %>
# how to display at this place the needed workdate for every time entry ?...
2013 Mar 26
0
nested forms: use validate :some_method works in update mode only
...:activities, dependent: :destroy, inverse_of: :timesheet
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities, allow_destroy: true
validates :user_id, presence: true
validates :status, presence: true, inclusion: {in: STATUS_VALUES}
validate :maximum_worktime_per_day
after_update :check_an_activity_present
after_initialize :init_working_week
..
private
def maximum_worktime_per_day
time_entries_by_date = time_entries.group_by(&:workdate)
time_entries_by_date.each do |key, value|
errors[:base] << "Maximum d...
2013 Mar 04
2
accepts_nested_attributes: undefined method 'association'_attributes
I have 2 models Timesheet and TimeEntry:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :time_entries_attributes
has_many :time_entries, dependent: :destroy
accepts_nested_attributes_for :time_entries, :reject_if => proc {
|attributes| attributes[''worktime''].blank? }
end
class TimeEntry < ActiveRecord::Base
attr_accessible :task_id, :timesheet_id, :workdate, :worktime
belongs_to :timesheet
end
As explained in Rails API:
```
Using with attr_accessible
The use of attr_accessible can interfere with nested attributes if you’re
n...
2013 Mar 25
1
validates presence of foreign key fails in nested form
...utes
validates :task_id, presence: true, uniqueness: { scope: ''timesheet_id''}
belongs_to :timesheet
belongs_to :task
has_many :time_entries, order: :workdate, dependent: :destroy
accepts_nested_attributes_for :time_entries, allow_destroy: true,
reject_if: proc { |a| a[:worktime].blank? }
end
As you see, I didn''t define any validation for timesheet_id presence in
Activity model. It works fine in the browser, but it is still possible to
create an activity without timesheet_id assigned.
If I add:
validates :timesheet_id, presence: true
to the Activity model,...
2009 Jun 22
10
Could not find an installable distribution
Hi all,
I am trying to install OpenSUSE 11.1 as a para-virtualized DomU on an opensolaris2009.06 guest using the xvm packages provided via IPS.
I followed the instructions available here:
http://www.opensolaris.org/os/community/xen/docs/virtinstall/
but I get the following error when trying to install from a NFS share where I mounted the iso (as far as I understand the only way to get a Linux
2015 Dec 10
0
Authentication to Secondary Domain Controller initially fails when PDC is offline
...he server.
Just change the cname, wait out the ttl, and your done.
I do the same with my ldap and proxy and web servers.
If i need to maintain them, i change the cname, down the servers,
do my work, up the again, and change it back when done.
Keeps my users happy.. i do down server etc. during worktime..
nobody notices it. :-)
and a setup like above make you very flexible to move things around,
if you slit up a server in 2 different servers(with services), I only change cnames for the services.
Greetz,
Louis
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces...
2015 Dec 11
2
Authentication to Secondary Domain Controller initially fails when PDC is offline
...change the cname, wait out the ttl, and your done.
> I do the same with my ldap and proxy and web servers.
> If i need to maintain them, i change the cname, down the servers,
> do my work, up the again, and change it back when done.
> Keeps my users happy.. i do down server etc. during worktime..
> nobody notices it. :-)
> and a setup like above make you very flexible to move things around,
> if you slit up a server in 2 different servers(with services), I only
> change cnames for the services.
>
>
>
> Greetz,
>
> Louis
>
>
>
>
> > -----Oo...
2015 Dec 10
4
Authentication to Secondary Domain Controller initially fails when PDC is offline
On 10/12/15 14:40, Ole Traupe wrote:
>
>>> However, my 2nd DC is not that new, I restarted it many times, just
>>> again (samba service). No DNS records are created anywhere.
>>>
>>> If I go through the DNS console, in each and every container there
>>> is some entry for the 1st DC, but none for the 2nd (except on the
>>> top levels: FQDN