differential geometry – A polygon with constant angular momentum bounds a circle

Let $alpha:(0,L) to mathbb{R}^2$ be a piecewise affine map satisfying $alpha(0)= alpha(L)$ and $|dot alpha|=1$. Supopse that $alpha(t) times dot alpha(t)$ is constant.

How to prove that $operatorname{Image}(alpha)$ is a tangential polygon, i.e. a polygon whose edges are all tangent to a fixed circle, centered at the origin?

It suffices to prove that for each subinterval $(a,b) subseteq (0,L)$ where $alpha|_{(a,b)}$ is affine, there exists a $t_0 in (a,b)$ such that $dot alpha(t_0) perp alpha(t_0)$.

Indeed, if this is the case, then $|alpha(t_0)|=|alpha(t) times dot alpha(t)|=C$ is independent of the segment $(a,b)$ chosen. Thus, every “edge” $alpha((a,b))$, contains a point $P_{a,b}=alpha(t_0)$ on the circle with radius $C$, and the edge is perpendicular to radius at $P_{a,b}$, i.e. it is tangent to the circle at $P_{a,b}$.

I am not sure how to prove the bold statement. I think we need to use somehow the fact that the polygon “closes”.


The converse implication is easy:

If there exists such a circle with radius $R$, then $|alpha(t) times dot alpha(t)|=R$ is constant: Indeed, suppose that $alpha(t_0)$ lies on the circle — so it is a tangency point.

Then $dot alpha(t_0) perp alpha(t_0)$, and $|alpha(t_0)|=R$.

Let $t$ satisfies $dot alpha(t)=dot alpha(t_0)$, i.e. $alpha(t)$ belongs to the same edge as $alpha(t_0)$. Then

$alpha(t)=alpha(t_0)+beta(t)$, where $beta(t) || dot alpha(t_0)$, so
$$
alpha(t) times dot alpha(t)=big( alpha(t_0)+beta(t) big) times dot alpha(t_0)=alpha(t_0) times dot alpha(t_0),
$$

which implies $|alpha(t) times dot alpha(t)|=R$.

javascript – No puedo obtener la URL de mi imagen en la versión angular 11

import { Component, OnInit, ElementRef, ViewChild} from '@angular/core';
import { UploadScriptsService } from 'src/app/services/upload-scripts.service';
import { finalize } from 'rxjs/operators';
/*importo el servicio conectionService para mandar datos*/
import { ConectionService } from 'src/app/services/conection.service';
/*importo el Storage de firebase */
import { AngularFireStorage } from '@angular/fire/storage';
import { Observable } from 'rxjs';

@Component({
  selector: 'app-add-card',
  templateUrl: './add-card.component.html',
  styleUrls: ('./add-card.component.css')
})
export class AddCardComponent implements OnInit {


  private script: UploadScriptsService = new UploadScriptsService;
  @ViewChild('imageUser') inputImageUser: ElementRef | undefined;

  /*Variables con las cuales envio los datos para cargar a firebase*/
  item: any = {
    title: '',
    text: '',
    image: ''
  };

  imageSrc: string = "";
  userFile: any;
  imageSelected: any;

/*  DECLARO LAS VARIABLES PARA PODER ENVIAR LA IMAGEN Y OBTENER SU URL */
  imgUrl: Observable<string | any>; 
  uploadPercent: Observable<number | any>; 
  

  constructor(private conection: ConectionService, private storage: AngularFireStorage) {
    this.uploadPercent = new Observable;
    this.imgUrl = new Observable;
  }

  


  ngOnInit(): void {
    this.script.cargaScripts(("uploadCard"))
  }


  addCard() {
    this.conection.addCard(this.item);
    this.item.title = '';
    this.item.text = '';
    this.item.image = '';

  }

  onUpload(e: any)  {
    /* console.log("subir", e.target.files(0)); */

    const id = Math.random().toString(36).substring(2);
    const file = e.target.files(0);
    const filePath = `imagesCards/${id}`;
    const fileRef = this.storage.ref(filePath);
    //Subo la foto
    const task = this.storage.upload(filePath, file);
    //observo el porcentaje de la carga de la imagen
    this.uploadPercent = task.percentageChanges();

    //obtengo el url de la foto
    task.snapshotChanges().pipe(
      finalize(() => { 
        this.imgUrl = fileRef.getDownloadURL()
      })
      )
      .subscribe()
      
      console.log('My ImageUrl' + this.imgUrl);

  }



}

angular – how to convert point coordinates to longitued and latitude

I have some coordinates of polygon in the followin format

 [740122.8820250861, 6646734.925500355, 739287.0608449555, 6643675.504576857, 747014.4642084272, 6643959.368373883, 740122.8820250861, 6646734.925500355]

how to convert them into longitude and latitude

Como hacer animacion de grafico con google charts angular?

estoy tratando de que mi grafico de dona(PieChart). Tenga animacion inicial cuando se carga el componente de angular.

El problema que lo que estuve viendo sirve para javascript puro pero no hay nada de Angular, en angular no tengo ese metodo "draw()" que me permitiria dibujar el elemento.

  donutChart = {
    myType: 'PieChart',
    chartColumns: ('Canal', 'Valor'),
    myData: (
      ('Mostrador', 0),
      ('Delivery', 0),
      ('Store', 0),
      ('Gastronómico', 0),
    ),
    myOptions: {
      colors: ('#B5E1F0', '#C8EFCC','#F0B5BE','#F0ECB5'),
      legend: { position: 'none' },
      isStacked: true,
      hAxis: { textStyle: { fontName: '"CamphorPro"', fontSize: 16, bold: false }},
      animation: {
        duration: 1000,
        easing: 'in',
        startup: true,
      },
      backgroundColor: {
        fill: 'transparent',
      },
      enableInteractivity: true,
    },
  };

Solo con este no puede hacer la animacion, con los graficos de barras por ejemplo. al poner lo siguiente: en las opciones ya tomaba la animacion solo

     animation: {
        duration: 1000,
        easing: 'in',
        startup: true,
      },

HTML:

<google-chart #chart class="chart" (type)="donutChart.myType" (columns)="donutChart.chartColumns" (data)="donutChart.myData" (options)="donutChart.myOptions"></google-chart>

libraries – Graphical library for Angular

I need to make graphical editor in Angular.

That editor will be able to make uml class diagrams and use case models (something as class diagrams and use case models in power designer). Does exist some Angular free library which I should use? I found something very similar, but it is not free.

angular – ¿Cómo puedo retrasar el evento de un observable en las 2 primeras ejecuciones?

se que la función delay() permite retrasar todos los eventos pero yo solo necesito que me retrase los 2 primeros por ejemplo intente esto:

const clicks = fromEvent(document, "click");
const delayedClicks = clicks.pipe(
  take(2),
  delay(500)
); // each click emitted after 1 second
delayedClicks.subscribe(x => console.log(x));

retrasa la ejecución pero luego me bloque todos los eventos, como podría retrasarlo únicamente en las 2 primeras ejecuciones?

javascript – Strategy to maintain page state/results while navigating across pages using sidebar in an angular app?

I have an angular app that is used to send notifications. It has a sidebar with the tabs : Compose, History, Users, and Maintenance. Like this:

enter image description here

As you can see, on the “history” tab, there’s an option to retrieve all the past notifications. Clicking the “Apply” button will call an API endpoint, and once the response is received, the page is populated with the data.

However, when I switch to any other tab (like “Compose” or “Users”) and back, the retrieved data on the “History” tab is gone and we get the same blank page as seen above.

What is the technique or strategy used to keep or persist the retrieved data even when moving across sidebar tabs?

angular – Opening pdf is separate window using pdfmake library in electron application

I have created an angular application that when runs in browser, on pdfMake.createPdf(docDefinition).print(); opens the document in another tab and then the printing dialog box however, this doesn’t happen in the electron app.

Please guide as to how this can be done.

main.js:

const { app, BrowserWindow} = require('electron')

let win;

function createWindow() {
    win = new BrowserWindow({
        width: 1400,
        height: 800,
        webPreferences: {
            webSecurity: false,
            devTools: false
        }
    })
    
    win.loadURL(`file://${__dirname}/dist/index.html`)

    win.on('closed', function() {
        win = null;
    })

    win.setMenuBarVisibility(false);

}

app.commandLine.appendSwitch('ignore-certificate-errors');

app.on('ready', createWindow)

app.on('window-all-closed', function() {
    app.quit()
})

app.on('activate', function() {
    if (win == null)
        createWindow()
})

SharePoint Angular Elements working in SharePoint workbench not working on SharePoint page

I have created a demo with reference to the below link,

https://gonadn.medium.com/spfx-with-angular-element-crud-operations-using-pnpjs-5a8a18ed6e43

It is working correctly in the workbench. Kindly refer to the below image,

enter image description here

It is not working correctly on the SharePoint page.

Throwing below error in SharePoint list api call

GET https://xyzsharepoint.sharepoint.com/sites/devsite/SitePages/_api/web/lists/getByTitle(‘TestList’)/items?$top=2000 404

Kindly refer to the below image,

enter image description here

Can you please help me with the same?

typescript – Enviar *ngIf al componente padre mostrar u ocultar columna en tabla de angular

Quisiera saber como puedo realizar esto:

Tengo un filtro en un componente hijo, que tiene unos checkbox lo que debe de hacer es al yo seleccionarlo mostrarme u ocultarme una columna en una tabla, como hago para poder comunicar esto al componente padre, mi código esta así:

ComponenteHijo.ts

@Output() check = new EventEmitter<boolean>();
ocultarTelefono: boolean
ocultarNombre: boolean

ComponenteHijo.html

<input type="checkbox" (checked)="!ocultarTelefono" (change)="ocultarTelefono = !ocultarTelefono"/>
<input type="checkbox" (checked)="!ocultarNombre" (change)="ocultarNombre = !ocultarNombre"/>

y en el componente padre en el html tengo lo siguiente:

<componente-hijo></componente-hijo>

    <thead>
            <tr>
                 <th *ngIf='!ocultarTelefono'>Telefono</th>
                 <th *ngIf='!ocultarNombre'>Nombre</th>
           </tr>
    </thead>
 <tbody>
          <tr>
            <td *ngIf='!ocultarTelefono'>858585858</td>
            <td *ngIf='!ocultarNombre'>Lorem ipsum</td>
          </tr>
 <tbody>

Cuando tenia todo el codigo en el componente padre funcionaba normal, pero ahora necesito pasar todo al componente hijo y que se siga ocultando o mostrando las columnas si esta o no checked el input.
no se si exista otra manera