## asp.net core – Do I need a service layer if my current service layer looks like this? Also asking about other basic controller service-repository patterns questions

I currently have a service class RoutineService.cs that contains methods that each perform one thing, call the repository and return that exact same object.

1. With how simple it is, is my service layer necessary?
2. I feel like it is better to inject the RoutineRepository Service into the controller and skip the service layer. But of course, there may be future extensions that I have not considered. What are some possible reasons (or whataboutisms) to keep the service layer?
3. More questions below code:
using System;
using Project.Services.Models;
using Project.Services.Interfaces.Services;
using Project.Services.Interfaces.Repositories;
using ProjectContracts.Models.Responses;

namespace Project.Services.Services
{
public class RoutineService : IRoutineService
{
public IRoutineRepository _routineRepository { get; }

public RoutineService(IRoutineRepository routineRepository)
{

_routineRepository = routineRepository;
}

public async Task<Routine> CreateRoutineAsync(int groupId, Routine routine)
{
return await _routineRepository.CreateRoutineAsync(routine, groupId: groupId);
}
}
}

I am currently consuming this service in my controller like so:

namespace Project.Controllers
{
(Route("api/(controller)"))
(ApiController)
public class GroupsController : ControllerBase
{
public IRoutineService _routineService { get; }

public GroupsController(IRoutineService routineService)
{
_routineService = routineService;
}

// POST api/<GroupsController>/{id}/Routine
(HttpPost("{groupId}/Routine"))
public async Task<ActionResult<RoutineResponse>> Post(int groupId, RoutineRequest request)
{
var routine = new Routine
{
Name = request.RoutineName
};

var routineCreated = await _routineService.CreateRoutineAsync(groupId, routine);

return routineCreated == null ? Conflict() : Ok(new RoutineResponse
{
RoutineName = routineCreated.Name,
RoutineId = routineCreated.RoutineId
});
}
}
}

I have Routine, RoutineResponse and RoutineRequest objects. The Routine object is mapped to a RoutineResponse object in the controller.

1. Should the RoutineService return a Routine object or RoutineResponse object? I’ve been reading this for hours but it’s hard to understand what people are saying without the actual code. For instance, this comment describes the different kinds of objects (DTO, Domain Entities, etc) but does not post code:
2. Is the Routine object considered a “Domain Model”?
3. Is it appropriate to call the RoutineResponse and RoutineRequest objects as “Data contract models”? Would a better name be “presentation models”? Or is there already a name of them and please say what the categories are.
public class Routine {
public int Id { get; set; }
public string Name { get; set; }
public string HideFromDataContract { get; set; }
}

public class RoutineResponse {
public int RoutineId { get; set; }
public string RoutineName { get; set; }
}

public class RoutineRequest {
public string RoutineName { get; set; }
}

## currencies – Current sentiment: Positive (Both stock market and bitcoin)…. Can you use bitcoin to invest in Stocks?

I was playing with the idea of enhancing portfolio risk/return characteristics. And one thing institutions do is hedge currency risk by investing in multiple different currency denominated assets. (Using complex solutions, swaps, derivatives, etc).
So. What exchanges if any allow you to use bitcoin / crytpto deposits to purchase stock market public equities or etf’s?
And wouldn’t this equate to bitcoin denominated ownership in Apple / MSFT / ADBE / KO / JNJ etc?

Stock market goes up – you win.
Bitcoin goes up – you win.

## lightning network daemon – How do I explore the current commitment transaction for a channel?

I would like to see how a commitment transaction for a given payment channel looks like (without actually closing the channels and transmitting the transaction to the network 🙂

I assume that all of the building blocks (such as balances) are somewhere in channel.db. Is there a way to quickly get this information out and construct the commitment transaction out of it without much coding?

## What is the current status of representation theory of \$n\$-ary groups in terms of hypermatrices?

An $$n$$-ary group is a generalization of the usual concept of a group where the binary operation (2-argument operation) is instead an $$n$$-ary ($$n$$-argument) operation. More info here on Wikipedia.

I was thinking about how to study $$n$$-ary groups and realized a lot of our understanding of groups is dependent on the fact that we have a concrete linear representation theory of them. I.E. a group $$G$$ can be thought of very concretely as collections of matrices, and then abstract questions about the group $$G$$ become concrete questions in linear algebra/algebraic geometry about the set of matrices, and sometimes that makes the questions tractable.

There is a generalization of the concept of a matrix to a concept called a hyper matrix (it’s an $$N$$-dimensional array of numbers as opposed to just 2 dimensional). And these hypermatrices support a very natural $$N$$-ary associative multiplicative operation on them (made by splicing the $$N$$-dimensional arrays of numbers into $$N-1$$ dimensional subarrays across each index and the taking dot products) , making them a ripe candidate for generalizing linear representation theory to the $$n$$-ary world.

But after digging through google and whatever free resources I have I was not able to find any reference in the literature on using hypermatrices to create a representation theory for $$n$$-ary groups. Just resources about hypermatrices themselves or $$n$$-ary groups themselves.

Does anyone know if such a project has been conducted before? and if so what are some papers/humans to get a general idea on the status of the field?

Visualization of the multiplication protocol for three 2x2x2 hypermatrices, to compute the first element of their 3-ary product:

## 8 – How do I limit my views of “Message” to the current user registration date?

I have created a “Message” views. “Message” module for Drupal 8 :

https://www.drupal.org/project/message

I want to display only messages created after the creation date of the current user account.

I looked in the filters of my views, but I couldn’t find anything.

How can I do this ?

## info visualisation – What results to display when comparing current and past data?

Intuitively, I would expect the current list of “Top Locations” to remain in place and in the same order, but simply with an additional bar showing last week’s values.

In the case of no data for the previous week, as in your description of Australia, add an empty bar to be explicit about the “emptiness” of last week’s data, and maybe a short bit of info describing the data, or, if you feel it flows better, as a footnote.

(Still do keep the data on the right; I just didn’t mock it up. Perhaps Australia’s percentage change label is where the asterisk belongs to indicate that this data has an explanation.)

Also relevant, I would recommend considering using flat ends for your bars, specifically when comparisons are necessary. The rounded ends are more difficult to see how visually significant the difference in length is.

## I'm looking to move away from my current Host

I’m looking to move away from my current Host.
Currently I’m paying \$10US/mo for the following:

25gb disk space
1000gb bandwidth/mo

I’d like to find a shared host for a similar price with established fast and helpful support who isn’t susceptible to the IP blocking issues and downtime is. My current web host’s support used to be great but is now largely useless. Also, free cPanel migration is a must. Backup services would be great, too, if possible.
Any information on Exmasters.com and Hostry.com website hosting? Can I trust them?
What are providers can you recommend me?

.

## compatibility – How can current versions of Adobe products continue to run on the new Macs with Apple Silicon?

Apple is using Rosetta 2. Scroll down the page for this bit:

With Big Sur and M1, Mac users can run a greater range of apps than ever before. All of Apple’s Mac software is now Universal and runs natively for M1 systems. Existing Mac apps that have not been updated to Universal will run seamlessly with Apple’s Rosetta 2 technology.

## When will the current Covid-19 restrictions be raised in France and the UK visa centers open in Paris?

I want to have an idea or an estimation of when the current covid-19 restrictions (as of 09 Nov 2020) will be raised in France and when will the UK visa centers open for the public to receive applicants? I am supposed to travel soon but the UK visa center in Paris is still closed and I have no idea how much it will last (couldn’t contact them!).

## opengl – GLES3 – GL_INVALID_OPERATION: Operation illegal in current state (Unity Android native)

I use Unity(editor 2020.1.8f1). My application use android native .so lib that use GLES3. In order to use it first of all I have done these steps :

first: go to Project Settings >>> Player >>> Other Settings.

second: find "Auto Graphic API" and uncheck it.

third: Now you can see a new panel just below the "Auto Graphic API". It's a list of "Graphics APIs". Remove all graphics APIs and just add "OpenGLES3".

Then in android CMakeList.txt file I marked that I use GLES3

...
libcocodec
GLESv3               <----------------  THIS LINE
decoder_engine_lib
\${log-lib}
)
...

And there is a usage :

void RenderAPI_OpenGLCoreES::EndModifyTexture(
void* textureHandle,
int textureWidth,
int textureHeight,
int rowPitch,
void* dataPtr,
bool destroy)
{
GLuint gltex = (GLuint)(size_t)(textureHandle);
// Update texture data, and free the memory buffer
glBindTexture(GL_TEXTURE_2D, gltex);

GLenum format = GL_RG;

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, textureWidth, textureHeight, format, GL_UNSIGNED_BYTE, dataPtr);
if (destroy)
delete()(unsigned char*)dataPtr;
}

and error message I get is –

2020-11-08 10:51:46.966 1512-1930/com.co.unityandroidplayer E/Unity: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
(Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 358)

I assume that something wrong with usage of GLenum format = GL_RG;, because (just for test) – if I use GLenum format = GL_ALPHA; I don’t get any errors (as well as expected result). Looks like gles3 doesn’t know what is GL_RG format.

What am I doing wrong?