MS OneDrive Sharing – Super User

I cannot seem to find the answer to this online so wondered if anyone would know.

I have set up a folder in OneDrive and shared it with two colleagues. Does anyone know if, when I upload a new file to that folder, the colleagues will automatically get a notification to say that a new file has been uploaded to a folder that is shared with them? Or do I have to email the colleagues myself telling them I have put something new in the folder?

I have worked out how to set up notifications on that folder when the colleague makes changes to files already in that folder. Do I have to somehow do this the other way round for them to be notified?

Hope this makes sense.

ruby – Sharing ActiveRecord class between two Rails app with gem

We have several Rails applications using the same ActiveRecord, Book. For simplicity let us assume we have only these two:

  • BookWarehouseApp (that deals how new book are added, or other inventory processes)
  • BookLibraryApp (that deals with how book are being borrowed and returned)

BookWarehouseApp has read and write access to the books table in a Postgres DB.
BookLibraryApp has a read-only access to the same books table (in production and dev). In test env, BookLibraryApp has write access too (to allow for test setup).

Both are tested in a classical Rails + MiniTest setup.

Now there is a lot of shared behavior between BookWarehouseApp::Book and BookLibraryApp::Book (and for example BookWarehouseApp::Book has a lot of validation/creation code that is absent of
BookLibraryApp::Book, so they are not identical. Moreover, they both inherit from ApplicationRecord in their respective app and both ApplicationRecord classes have their respective life in their own app. We also have other objects that deal with books (call them BookSerializer and BookPoro).

To avoid maintaining the same code in two places, we are thinking of extracting Book, BookSerializer and BookPoro to a gem.

If Book was not an ActiveRecord, it would be fairly straightforward. But now I am bit confused about the best way to setup that gem and test it up.

Among the options, I have considered and the difficulties I see (possibly because I have never done that before):

  1. Define a Book (including ActiveModel::Model) class in the gem. It will be overridden in apps that require the gem, but it will allow us to factorize and test other poros that depend on it.

    • pros: no DB setup required to test the gem, no migration to write for future users of the gem
    • cons: we are not sharing actual Book behavior (only poros) and we are not making life easy for future users of the gem, we cannot share any ActiveRecord type hook (or at least not test it in a convincing fashion).
  2. Define a BookLike/Bookable concern/module in the scope of the gem and let BookWarehouseApp::Book and BookLibraryApp::Book extend/include it.

    • pros: no DB setup, behavior shared, no migration to write
    • cons: we are not making life easy for future users of the gem, cannot share ActiveRecord type hooks (or least not test them)
  3. Define a Book class that inherit from ActiveRecord::Base and inherit from it in the apps.

    • pros: possible to test the full behavior
    • cons: how can we deal with the fact that each app has an ApplicationRecord class with different behaviors, suppose to setup DB interaction to test the gem, suppose to write some kind of migration generator to really offer a plug and play experience to future users.

I am thinking option 2 is reasonable, but it is not obvious how to deal with the underlying schema of books. A possibility is to have a FakeBook class there (for test purposes) that uses ActiveModel attr_accessors. We could also simply give an example of migration for users of the gem (in the spirit of ‘we are all adults and can copy paste a migration’).

Any idea or suggestion on how to deal with this situation welcome.

music – Playlists looks empty in iTunes home sharing

I have a ≈70 GB music archive with playlists. I’m sharing it via home sharing. In receiver device which is also a MacBook, I can see the library, connect it and play songs. However, in the left pane I can see the playlists and in playlists I can see the song count, total hour of that playlist but can’t see the songs. I can right click the playlist name and shuffle it.

What can be the problem?

Sender device: 2012 MacBook Pro Retina With 10.15.3 MacOs Catalina

Receiver: 16″ MacBook Pro Retina with 10.15.4 MacOs Catalina

Example Screenshot
screenshot

Best File Sharing Platform? | NewProxyLists

We’re not a file host, so I can’t offer myself. But regardless the “Slow Upload” speed, why “No sales” is a problem you think is related to the file hosting? I mean if you moved into another host, would the people start buying premium? I think it makes no difference, except if you think the file host is shaving sales which is totally a different case.

I am not an expert in file hosting industry, but I am just asking to learn, what is the relationship between the file host and the sales, because I think your sales are related to your visitors and not the file host itself, or maybe there is something else that I don’t know about, yet.

 

sharepoint online – Disabling External Sharing and Item Level Permissions

We have a site that was shared with external emails but the Owner wants that reverted so no external access is allowed. I removed the external users from the Site Permissions but the question remains:

If I disable External Sharing on a Site Collection that has unique permissions on a Document, will that external user still be able to access the Document that has been explicitly shared with them in the past? Or will disabling external sharing lock them out of any document within that site regardless of the unique item level permissions?

magento2 – Sharing a wish list button is missing in my wish list magento 2

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

object oriented – sharing and decoupling data

I basically want to know how you would review this code and design.

Right now, there seems to be a tight coupling so I feel like I’ve violated some rules about data access and responsibility. Seems like there may be some

code smells

  • Config is shared by all tasks, allowing some tasks access to irrelevant services and data.
  • StatusObj used to save and share data throughout workflow. It also has state which should be contained in stateMachine.
  • Current task isnt defined any place. statusObj.task is only updated after success. Doesn’t seem right.
  • Starting whole worfklow inside of a block?
  • Also realizing the input of nextTask is emitted from publisher, but could also be accessed from self.config.statusObj.task. so I implement this stream to retrieve updated statusObj, but its not even necessary?

Also how this design could be extended handle interruptions, resume, cancel. What kind of general edge cases should I be thinking about.

Definitions:

  • TaskService – Initiates & manages workflow, and encapsulates required dependencies/services

  • Task – an async executable task.

  • StateMachine – manages state, provides next task in workflow
  • Publisher – Drives workflow by emitting completed tasks via StatusObj.task
  • StatusObj – Represents status of workflow. is updated by a task when data is fetched and task completes. Is also persisted in db.
  • TaskResponseHandler – Handles success, error, and completion of publisher stream. On success, it saves statusObj to db and publishes, so next task can take place.
  • Config– contains services, api’s, helpers needed for task to execute. So Config also contains the statusObj which contains value retrieved from last task.

Worflow:

I’ve defined a persist-able object statusObj that is updated throughout the workflow.

When a task completes successfully with data, it assigns that data to statusObj and emits to publisher.

responseHandler saves, and emits statusObj. responseHandler would also handle all possible errors related to task failure at this time.

last completed task via statusObj.task is used to map the next task, via stateMachine.

class TaskService {
    var sessionManager: SessionMaanger
    var config: Config
    var stateMachine: StateMachine
    var publisher: PassThroughSubject<Task, Never>
    var responseHandler: Subscriber

    @objc func execute() {
        sessionManager.requestSession(for: self)
        block = { _ in
            // can start workflow now.
            self.subscribe()
            self.publisher.send(self.config.statusObj!) // send initial statusObj.
        }
    }

    @objc func subscribe() {
        publisher
            .setFailureType(to: MyError.self)
            .map { self.nextTask(context: $0) }
            .flatMap { $0!.execute() }
            .subscribe(handler)
    }

    private func nextTask(_ code: TaskCode) -> Task? {
        // state machine has internal state thats not persisted right now but needs to.
        // has a table to output next task, given the internal state, and last completed task.
        switch (stateMachine.nextTask(task)) {
        case .A:
            return TaskA(self.config)
        case .B:
            return TaskB(self.config)
        default: return nil
        }
    }

    func resume() {

    }

    func abort() {
    }

}


class ResponseHandler: Subscriber {
    typealias Input = StatusObj?
    typealias Failure = MyError

    // from taskService
    var publisher: PassthroughSubject<StatusObj, Never>

    init(publisher: PassthroughSubject<StatusObj, Never>) {
        self.publisher = publisher
    }

    func receive(subscription: Subscription) {
        subscription.request(.max(3))
    }

    func receive(_ input: StatusObj?) -> Subscribers.Demand {
        input!.save()
        publisher.send(input!) // emit, for next task to execute
        return .unlimited
    }

    func receive(completion: Subscribers.Completion<MyError>) {
        print("stream completed")
        switch (completion) {
        case .failure(let err):
            print("error (err)")
        case .finished:
            //context.save()
            publisher.send(completion: .finished)
        }
    }
}


class TaskA {
    var config: Config
    var publisher: PassthroughSubject<StatusObj, MyError> // local publisher for async workaround

    init(_ config: Config) {
        self.config = config
    }
    func execute() -> PassthroughSubject<StatusObj, MyError> {
        completionBlock { data in
            self.config.statusObj.task = self.task
            self.config.statusObj.payloadFromTaskA = data
            publisher.send(data)
            // if error would handle here also. publisher(send: error)
        }
    }
}


class StatusObj {
    var state: State // stored in `state machine`, but if need to resume, state needs to be saved
    var task: TaskCode // enum of each task/event. 
    var payloadFromTaskA: Data
    var payloadFromTaskB: String
    var payloadFromTaskD: String
    var retryCount: Int
} 

class Config {
    var statusObj: StatusObj
    var serviceForTaskBAPI: API
    var authToken: String
}

social sharing buttons – What’s the unicode for the Share icon (or do I need to use SVG instead)?

A commonly recognised share icon looks like this:

Share Icon

I’m guessing there must be (surely) a Unicode symbol out there for this, but so far – despite pretty thorough searching – I’ve come up empty-handed.

I note that the approved list of new emojis for 2020 include:

  • a dodo
  • a rollerboot
  • a rainbow piñata

I’m concluding it’s unlikely that Unicode would have got as far as approving these but not yet approving a share icon.

What’s the Unicode for the share icon above, please?

Or do I need to use SVG, instead?

social sharing buttons – What’s the unicode for the Share icon?

A commonly recognised share icon looks like this:

Share Icon

I’m guessing there must be (surely) a Unicode symbol out there for this, but so far – despite pretty thorough searching – I’ve come up empty-handed.

I note that the approved list of new emojis for 2020 include:

  • a dodo
  • a rollerboot
  • a rainbow piñata

I’m concluding it’s unlikely that Unicode would have got as far as approving these but not yet approving a share icon.

What’s the Unicode for the share icon above, please?

wireless networking – Are all devices connected to either 2.4ghz vs 5ghz WIFI sharing the same subnet and able to interact?

There is 2.4ghz and 5ghz wifi connections available in many cases, if not you can manually configure different SSID for both.

Are all devices connected to either 2.4ghz vs 5ghz WIFI sharing the same subnet and able to interact – or are both bands isolated?
If some IoT devices like Fridge, TV are connected via 2.4ghz, would they be able to “see” the other devices of the Router connected via 5ghz?