-XX:ActiveProcessorCount=4
I am using Rubymine, but probably all Jetbrains products have a similar `.vmoptions` file.
Hope it helps!
An example on how turbo_stream is rendered:
= turbo_stream.append :messages, @message
Where :messsages is the target and @message renders the partial _message.html.haml. Then it is rendered to:
// This div will be append to element with id="messages"
7 possible Actions
def create
@message = Message.find(....)
respond_to do |format|
format.turbo_stream # renders template in: create.turbo_stream.haml
format.html { redirect_to messages_url }
end
end
Reusing server side templates inline:
format.turbo_stream do
render turbo_stream: turbo_stream.append(:messages,
partial: "messages/message", locals: { message: @message})
end
Both "partial:" and "locals:" can be replaced by @message (Great Rails code!!!).
address owner;
bool public paused;
constructor() public {
owner = msg.sender;
}
function setPaused(bool _paused) public {
require(msg.sender == owner, "you are not authorized for this action");
pause = _paused;
}
First on DEPLOYMENT you want to be sure that the owner is the only who interacts with the contract for concrete actions:
function withdrawAll(address payable _to) public {
require(msg.sender == owner, "you are not authorized for this action");
require(!paused, "Contract is paused!");
_to.transfer(address(this).balance);
}
Second during the LIFECYCLE, you can make any actions on contract balance:
function destroy (address payable _to) public {
require(msg.sender == owner, "you are not authorized for this action");
selfdestruct(_to);
}
Last, you can disable a contract by selfdestructing and sending balance to any address the owner wants.