This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.AddTransient<ISomeService, SomeService>(); | |
services.AddSingleton<BooksManagerActorProvider>(provider => | |
{ | |
var actorSystem = provider.GetService<ActorSystem>(); | |
var someService = provider.GetService<ISomeService>(); | |
var booksManagerActor = actorSystem.ActorOf(Props.Create(() => new BooksManagerActor(someService))); | |
return () => booksManagerActor; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ docker-compose up | |
Starting freepbx-app ... done | |
Starting freepbx-db ... done | |
Starting freepbx-db-backup ... done | |
Attaching to freepbx-db, freepbx-db-backup, freepbx-app | |
freepbx-db | s6-supervise 03-cron: warning: unable to spawn ./run - waiting 10 seconds | |
freepbx-db | s6-supervise (child): fatal: unable to exec run: Permission denied | |
freepbx-db | s6-supervise (child): fatal: unable to exec run: Permission denied | |
freepbx-db | s6-supervise 10-mariadb: warning: unable to spawn ./run - waiting 10 seconds | |
freepbx-db | s6-supervise (child): fatal: unable to exec run: Permission denied |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Akka.Actor; | |
using Akka.TestKit; | |
using Akka.TestKit.NUnit; | |
using NUnit.Framework; | |
using System; | |
using System.Linq; | |
namespace akkaSchedulerTest.Test | |
{ | |
public class RepeatedScheduleTest_Standard_Scheduler : TestKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ArtemisBucketHelper | |
{ | |
public int GetBucket(string groupId, int bucketCount) | |
{ | |
var bytes = ToBytes(groupId); | |
var hashCode = ToHashCode(bytes); | |
return (hashCode & int.MaxValue) % bucketCount; | |
} | |
private byte[] ToBytes(string groupId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alice = new Person { Name = "Alice", Age = 17 }; | |
Console.WriteLine($"Inside main => {alice.Name}'s age before function call: {alice.Age}"); | |
IncrementAge(alice); | |
if (alice != null) | |
{ | |
Console.WriteLine($"Inside main => {alice.Name}'s age after function call: {alice.Age}"); | |
} | |
else | |
{ | |
Console.WriteLine("Inside main => Object reference not set to an instance of an object"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alice = new Person { Name = "Alice", Age = 17 }; | |
Console.WriteLine($"Inside main => {alice.Name}'s age before function call: {alice.Age}"); | |
IncrementAge(alice); | |
if (alice != null) | |
{ | |
Console.WriteLine($"Inside main => {alice.Name}'s age after function call: {alice.Age}"); | |
} | |
else | |
{ | |
Console.WriteLine($"Inside main => Object reference not set to an instance of an object"); |