how to branch on generic at compile time?
hello fellow rustaceans! :slight\_smile:

i don't know how to formulate the question so here is my problem:

in a simple entity component system, i want to get a component calling its type.

let pos = &mut ecs.component<position>(entity\_id);

pos.x = 3.0;

a pseudo code would be this:

pub fn componen…
i don't understand why you're not putting the componenttrait-specific behavior inside the componenttrait impl. i interpreted [@ixrec](/u/ixrec)'s suggestion to mean something like (signatures slightly tweaked to compile):

struct position {}

struct velocity {}

struct whatever {

component\_pool\_position: ve…
functions prefixed with “common” are part of our example framework and not part of fmod itself. this code is added to the examples via common.cpp and common\_platform.cpp. developers would usually replace this code with their own application code. I have the same problem and added this to the DbContext:



```
private void PrintStackTrace()
{
  var st = new StackTrace();
  foreach (var sf in st.GetFrames())
    Console.WriteLine($"{sf.GetMethod().DeclaringType.Assembly.GetName().Name} {sf.GetMethod().DeclaringType.Name} {sf.GetMethod().Name}");
}

```

and call this function in the contructor and Dispose of the DbContext.


It seems to be a problem, if the DbContext is added with scoped lifetime to the dependency injection. I filed an issue for that.


<https://github.com/aspnet/EntityFrameworkCore/issues/10693> 1. You delete your old .tt files
2. You open your edmx file in designer mode (so you can see your model)
3. Right click on a free space
4. Select Add Code Generation Item
5. In the dialog select "EF 6.x DbContext Code Generation Item" (something like this)
6. Save your edmx and all classes will be generated for you, with the new namespaces and so on i used to do this in logstash pipelines during development debugging, but i've removed the code since then.

you would need to template your beats config files, then it would be something like this:

processors:

- add\_tags:

tags: [ {{ ansible\_fqdn }} ]

you could use ansible\_hostname for the sho… hi,

you can use gpi/o to start/pause/stop your program by using field bus.

please see the following setting.

[\_20210611\_134829] Copy Code

```
This is an example
```
  

C#Copy Code

```
public partial class Default2 : System.Web.UI.Page
{
    protected void Page\_Load(object sender, EventArgs e)
    {
        //calling your derived class
        MyClass objMyClass = new MyClass();
        objMyClass.DoSomthing();
    }
}
//Abstract Class
public abstract class MyAbstractClass
{
    public abstract void DoSomthing();
}
//derived class
public class MyClass:MyAbstractClass
{
    public MyClass()
    { }
    public override void DoSomthing()
    {
        //add your implimentation here
    }
}
```
  

  

[edit] added a small comment[/edit] Here is a sample of traversing a simple xml structure

 
```
    Dim myxml = <root>
                    <level id="1">
                        <prop n="PROPERTY" v="VALUE"/>
                    </level>
                    <level id="2">
                        <prop n="PROPERTY" v="VALUE"/>
                    </level>
                </root>

    For Each level In myxml.Elements
        Debug.WriteLine("id=" & level.@id.ToString)
        For Each prop In level.Elements
            Debug.WriteLine("n=" & prop.@n.ToString & "  v=" & prop.@v.ToString)
        Next
    Next

``` > how can I access the getStick() method defined within the chopStick class
> 
> 


To access any part of an instance of a class, you need a reference to that instance.  

Some where you create an instance:  

AnObject aRef= new AnObject(); // create an instance and set reference to that object



then you need to make that reference available where you want to call its methods:  

aRef.aMethod(); // call a method in the AnObject class [this example](https://github.com/bpmn-io/bpmn-js-disable-collapsed-subprocess/blob/master/src/disabledcollapsedsubprocesspopupprovider.js#l33) is related to the replace menu, but it can easily mapped to the context pad provider.

so your getcontextpadentries can return a function like this

getcontextpadentries(element) {

/* ... */

return function(entries) {

// entries includes all already registered context pad entr… hi there! a member variable (or field) is simply a variable that belongs to that class. you create it just like you would any other. in this case, it wants a public string.
```java
public string title;
```
this creates a field/member variable that belongs to this class. it is public, of type string and has the name title. 
hope this helps! :sparkles: