Search Results

Search found 3 results on 1 pages for 'myat'.

Page 1/1 | 1 

  • Loading remote assembly from the webservice with reflection

    - by Myat Htut
    I am using Assembly.LoadFrom within a web service to load assemblies from a web site. but the problem is it is in the virutal directory and the server.mappath parses the url like \share\mydll.dll and loadform method failed. Is there anyway to reference dll from the remote location? I've tried passing the url (http:\localhost\downloadable\mydll.dll) and again it got "Could not load file or assembly 'http:\localhost\downloadable\mydll.dll' or one of its dependencies. HTTP download of assemblies has been disabled for this appdomain. (Exception from HRESULT: 0x80131048)"

    Read the article

  • Rails 3 many-to-many query on includes or joins

    - by Myat
    I have three models User, Activity and ActivityRecord. class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :first_name, :last_name, :email, :gender, :password, :password_confirmation, :remember_me # attr_accessible :title, :body has_many :activities has_many :activity_records , :through=> :activities end class Activity < ActiveRecord::Base attr_accessible :point, :title belongs_to :user has_many :activity_records end class ActivityRecord < ActiveRecord::Base attr_accessible :activity_id belongs_to :activity scope :today, lambda { where("DATE(#{'activity_records'}.created_at) = '#{Date.today.to_s(:db)}'")} end I would like to query all activities for a user together with the count for their respective activity records for today. For example, after querying and converting to json format, I would like to have something like below [ { id: 23 title: "jogging", point: "5", today_activity_records_count: 1, }, { id: 12 title: "diet dinner", point: "2", today_activity_records_count: 0, }, ] Please kindly guide me how I can achieve that. Thanks

    Read the article

1