E
E
Evgeny Petryaev2021-12-05 04:03:59
MATLAB
Evgeny Petryaev, 2021-12-05 04:03:59

How to make reading into an array of characters?

Here is the code that throws an error:
c(jj) = fgets(F(jj));
The error is:

Unable to perform assignment because the left and right sides have a different number of elements.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2015-05-25
@DarkLynx91

Even without being familiar with Socket.io, I can say that every time you instantiate a controller, you subscribe to an event.
Who will unsubscribe? Or do you think that he will somehow magically unsubscribe to you when the controller is removed?

function onGetOne() {
}

socket.on('tickets:getOne:success', onGetOne);

$scope.$on('$destroy', function() {
  socket.removeListener('tickets:getOne:success', onGetOne);
});

M
Mikhail Osher, 2015-05-25
@miraage

Socket work should be encapsulated in a separate service with a higher abstraction for controllers, directives, and other services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question