c# – Is there a better design of nested IOC dependencies which reduces marker interfaces?

I was building some library code and i ended up with a design and involved some marker / marker:ish interfaces. Wanted to get input if there might be better way of doing this (or if my current design is acceptable due to circumstances). Below is an illustration of the current design, simplified .

    public interface IStore
        string Get();

    public interface IService<TStore> where TStore : IStore // TStore not used, only for IOC separation 
        object GetFromService();

    public class Service<TStore> : IService<TStore> where TStore : IStore
        private readonly TStore _store;

        internal Service(TStore store)
            _store = store;

        public object GetFromService() { ... }

    public interface ISomeStore : IStore // Marker interface for IOC purpose

    internal class SomeStore : ISomeStore
        public string Get() { ... }

The code would then be injected in net core as IService<ISomeStore>. I could in theory require users to specify IService<SomeStore> but would couple implementation to IOC and force me to expose SomeService (make it public). Since Net Core built in IOC does not support named injection that option is also out of the table.

Would appreciate input on whether this looks ok / as needed, or if someone have a better suggestion for how to implement this.

html – interact with SVG Marker element with event handlers in React(JS)

see demo: https://codesandbox.io/s/svg-marker-element-ekkkx?file=/src/App.js
as you can see – the events on the marker element just do not fire.

what can do to make it work, or any idea for an easy alternative implementing arrowhead without the use of SVG marker elements, or any sort of workaround?

(you can see a more detailed explanation of the problem here )

unity – How to make an arrow / marker point to the offscreen object in 3D space?

I’m trying to create an off screen indicator. An arrow that would move around the screen to point to the target in 3D space.

Something like this:

enter image description here

I wrote this script, but the problem is that it doesn’t really work properly.

The arrow moves around the screen, but if let’s say the target is behind the player the arrow should point to the bottom of the screen, but instead it’s located somewhere in the upper corner.

using UnityEngine;
using UnityEngine.UI;

public class Pointer : MonoBehaviour

    (SerializeField) Image pointer = null;
    (SerializeField) Transform target = null;


    (SerializeField) bool rotateToTarget = false;

    private float northDir = 0f;
    private new Camera camera;

    private void Start()
        camera = Camera.main;

    private void Update()
    private void Rotate()
        float minX = pointer.GetPixelAdjustedRect().width / 2f;
        float maxX = Screen.width - minX;

        float minY = pointer.GetPixelAdjustedRect().height / 2f;
        float maxY = Screen.height - minY;

        var pos = camera.WorldToScreenPoint(target.position);

        if (Vector3.Dot(target.position - camera.transform.position, camera.transform.forward) < 0)
            if (pos.x < Screen.width / 2f)
                pos.x = maxX;
                pos.x = minY;
            if (rotateToTarget)
                northDir = target.eulerAngles.y;
                pointer.rectTransform.localEulerAngles = new Vector3(pointer.rectTransform.localEulerAngles.x, pointer.rectTransform.localEulerAngles.y, -northDir);
        pos.x = Mathf.Clamp(pos.x, minX, maxX);
        pos.y = Mathf.Clamp(pos.y, minY, maxY);

        pointer.transform.position = pos;

Python – Apply custom markers to the specific value of the parameterized Pytest marker

import pytest

@pytest.mark.parametrize('a', (0, 1))
def test_increment(a):

I want to apply a custom marker to a specific value of a marker. In the test case mentioned above, should also be run

  • a = 0 if -m one is provided.
  • a = 1 if -m two is provided.

I tried the following snippet but it doesn't work.

import pytest

@pytest.mark.parametrize('a', (pytest.mark.one(0), pytest.mark.one(1)))
def test_increment(a):

How do I wrap a line in Android Snippet Marker?

Thank you for contributing to the stack overflow in Portuguese!

  • Make sure you Answer the question. Go into your solution in detail and share what you have discovered.

But avoid

  • Ask for clarification or details on other answers.
  • Make statements based only on your opinion; Point references or previous experiences.

For more information, see our tips on writing good answers.

logarithmic scale – marker size in ListLogPlot

I have problems with one ListLogPlot Use data with error bars. I want to improve the marker size, otherwise the data points themselves cannot be identified very well.

Here are the dates:

data1 = {{Around[3.17, 0.1585], Around[2.41*^10, 2.41*^9]}, {Around[
4.43, 0.2215], Around[2.37*^10, 2.37*^9]}, {Around[5.54, 0.277], 
Around[2.27*^10, 2.27*^9]}, {Around[6.87, 0.3435], Around[
2.15*^10, 2.15*^9]}, {Around[8.52, 0.426], Around[
1.98*^10, 1.98*^9]}, {Around[10.5, 0.525], Around[
1.85*^10, 1.85*^9]}, {Around[13.14, 0.657], Around[
1.8*^10, 1.8*^9]}, {Around[14.74, 0.7370000000000001], Around[
1.81*^10, 1.81*^9]}, {Around[16.56, 0.828], Around[
1.83*^10, 1.83*^9]}, {Around[18.64, 0.932], Around[
1.86*^10, 1.86*^9]}, {Around[20.96, 1.048], Around[
1.88*^10, 1.88*^9]}, {Around[23.49, 1.1744999999999999`], Around[
1.88*^10, 1.88*^9]}, {Around[26.1, 1.3050000000000002`], Around[
1.84*^10, 1.84*^9]}, {Around[28.87, 1.4435000000000002`], Around[
1.73*^10, 1.73*^9]}, {Around[29.98, 1.499], Around[
1.68*^10, 1.68*^9]}};
data2 = {{Around[4.86, 0.24300000000000002`], Around[
2.67*^10, 2.67*^9]}, {Around[6.78, 0.339], Around[
2.56*^10, 2.56*^9]}, {Around[8.42, 0.42100000000000004`], Around[
2.4*^10, 2.4*^9]}, {Around[10.33, 0.5165000000000001], Around[
2.2*^10, 2.2*^9]}, {Around[12.79, 0.6395], Around[
2.04*^10, 2.04*^9]}, {Around[15.86, 0.793], Around[
1.96*^10, 1.96*^9]}, {Around[19.84, 0.992], Around[
1.91*^10, 1.91*^9]}, {Around[22.11, 1.1055], Around[
1.88*^10, 1.88*^9]}, {Around[24.62, 1.231], Around[
1.84*^10, 1.84*^9]}, {Around[27.38, 1.369], Around[
1.78*^10, 1.78*^9]}, {Around[30.16, 1.508], Around[
1.68*^10, 1.68*^9]}, {Around[31.56, 1.578], Around[
1.61*^10, 1.61*^9]}, {Around[32.87, 1.6435], Around[
1.53*^10, 1.53*^9]}, {Around[34.14, 1.707], Around[
1.45*^10, 1.45*^9]}, {Around[35.3, 1.765], Around[
1.36*^10, 1.36*^9]}, {Around[36.43, 1.8215000000000001`], Around[
1.27*^10, 1.27*^9]}, {Around[37.43, 1.8715000000000002`], Around[
1.18*^10, 1.18*^9]}, {Around[38., 1.9000000000000001`], Around[
1.12*^10, 1.12*^9]}};

I played around a lot. But couldn't find a working solution. I don't want to use the automatic option as follows: PlotMarkers -> {Automatic, Medium} I want to control marker style and marker color.

The best thing I could find out was:

ListLogPlot[{data1, data2}, PlotMarkers -> {{[FilledSmallCircle], 20},
{[EmptyUpTriangle], 20}}, PlotStyle -> {Black, Blue},
PlotLegends -> Placed[{"data1", "data2"}, {{0.02, 0.02}, {0, 0}}]]

This results in a plot in which the marker size is changed in the legend, but not in the plot.

Enter image description here

I look forward to your ideas. I cannot believe that there is no easy solution to such a problem since I assume that many people have had it before.

java – The new marker location is not recorded after OnDragListener

In me MapsPublisherActivity.java The user is looking for a place in GoogleMaps and returns that Latitude and Longitude, If this page is found, a marker is placed there. Now I want to add one OnDragListener If the user is not satisfied with his search location, he can adjust it.

The problem I have is that the new location is not saved and the search location is recorded … How can I have the new location recorded? Latitude and Longitude Did you drag the bookmark to your new site?

You have my code below MapsPublisherActivity.java,

Thanks in advance.


searchView = findViewById(R.id.sv_location);
        mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.google_map);
        fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);

        searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
            public boolean onQueryTextSubmit(String query) {
                location = searchView.getQuery().toString();
addressList = null; if (location != null || !location.equals("")) { Geocoder geocoder = new Geocoder(MapsActivityPublisher.this); try { addressList = geocoder.getFromLocationName(location, 1); } catch (IOException e) { e.printStackTrace(); } if (addressList != null) if (addressList.size() > 0) { address = addressList.get(0); latLng = new LatLng(address.getLatitude(), address.getLongitude()); if (marker == null) { marker = map.addMarker(new MarkerOptions().position(latLng).title(location).draggable(true)); } else { marker.remove(); latLng = new LatLng(address.getLatitude(), address.getLongitude()); marker = map.addMarker(new MarkerOptions().position(latLng).title(location).draggable(true)); } dragMarker(); map.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 10)); final String postid = getIntent().getStringExtra("postid"); final Button buttonDone = findViewById(R.id.button_done); buttonDone.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { DatabaseReference reference = FirebaseDatabase.getInstance().getReference("Posts"); reference.child(postid).child("latitude").setValue(address.getLatitude()); reference.child(postid).child("longitude").setValue(address.getLongitude()); startActivity(new Intent(MapsActivityPublisher.this, MainActivity.class)); finish(); } }); } else { Toast.makeText(MapsActivityPublisher.this, "Modify search", Toast.LENGTH_SHORT).show(); } } return false; } @Override public boolean onQueryTextChange(String newText) { return false; } }); mapFragment.getMapAsync(this); CheckEnableGPS(); fetchLastLocation(); } private void dragMarker() { map.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() { @Override public void onMarkerDragStart(Marker marker) { Toast.makeText(MapsActivityPublisher.this, "Place marker where Event will take place", Toast.LENGTH_LONG).show(); } @Override public void onMarkerDrag(Marker marker) { latLng = new LatLng(address.getLatitude(), address.getLongitude()); } @Override public void onMarkerDragEnd(Marker marker) { latLng = new LatLng(address.getLatitude(), address.getLongitude()); } }); }

Views – How do I add the Styles attribute to the global custom field marker?

I have created a view to display my articles and I want the article thumbnails to be used as the background.
So I added the different fields that I have hidden.

I added a relationship to the image box to get the thumbnail URI. Then I pasted the following code into the custom global field.

{{ field_categorie }}

{{ title }}

{{ created }}

However, the style is ignored in the display.

Instead of

, I have


Can someone help me please?

Thank you very much

Google Map Zoom Marker JavaScript

As you can see two markers zooming out from multiple markers, I've already created a marker list with this feature, but after calling I had to zoom in on my custom markers in the map

    var markers=();
    var boundss = new google.maps.LatLngBounds();
    for (var i = 0; i < markers.length; i++) {