File Viewer Zoom capabilities

I have a PDF loaded in a File Viewer Modern Webpart. There are zoom buttons on the control bar which zoom in/out. The problem is it only zooms into the center and you cannot drag the document around so it’s pretty much useless. Is there a better webpart that allows a lightbox dialog or a way to zoom in and drag an image // pdf smoothly?

Target links to open in page viewer web part from list view

I have a document library, and use office web apps to open the documents for reading. I would like the document to open inside a page viewer web part. Thus one could click a document in the library, and it will be visible in the word viewer app in a webpart on the same page, instead of opening a new page. Is this possible? And how?

regards

Googke K8s – Stackdriver Kubernetes Engine Monitoring is enabled but cant see logs in Logs Viewer

Google K8S – Master version 1.13.6-gke.6

On my K8S cluster is Stackdriver Kubernetes Engine Monitoring Enabled, Legacy Stackdriver Logging Disabled, Legacy Stackdriver Monitoring Disabled.

PROBLEM: I get monitoring information in stackdriver dashboards but I cant see logs in google Logs Viewer (also nothing with gcloud logging read “resource.type=k8s_container” to this cluster)

If I switch to Legacy Stackdriver Monitoring and Legacy Stackdriver Logging, it works (with resource.type=container).

Cluster use service with permission (Role editor (owner not help))

  • https://www.googleapis.com/auth/logging.write
  • https://www.googleapis.com/auth/monitoring

Permissions for cluster

  • Stackdriver Logging API – Write Only
  • Stackdriver Monitoring API – Full

On every node runing fluentd-gcp-*

TigerVNC viewer unfocus from screen

I’ve got serveral questions regarding TigerVNC Viewer. Is there an option similar to Hyper-v where you can press CTLR+ALT+LEFT to unfocus from the screen?

And also make the mouse still visible in the client? i tryed F8>options>Show dot when no cursor but that doesn’t seem to work.

Lastly, im wondering if it’s possible that when you regain focus and when the mouse is on a fixed position that the fysical mouse pointer starts where the VNC mouse is located?

SharePoint report viewer error There are no addresses available for this application

i have single server (sql 2016 +all SharePoint 2016 role) when i click on a report to run (uploaded rdl file) SharePoint give me error There are no addresses available for this application

error

and in Manage Reporting Services Application when i click on system setting i got The remote server returned an error: (503) Server Unavailable.

reconfiguration SSRS application dos not help

please help me

Can I add report viewer webpart to SharePoint 2013 foundation?

I created a application page with report viewer in it, but when I am trying to view it in sharepoint Foundation 2013, I get this error,

Microsoft.Reporting.WebForms.InvalidConfigFileTypeException: The type ‘Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ could not be found at Microsoft.Reporting.WebForms.ConfigFilePropertyInterface`1.EnsurePropertyLoaded()

It looks like only way to make Report Viewer webpart in SharePoint is following this guide.

Does anyone aware of any alternatives ?

Java Mandelbrot Set Viewer

I’m writing my own version of a Mandelbrot set generator, with pan and zoom functionality. (There’s not yet a color overlay of sets generated with various beta values; the beta value is changed manually with a spinner.)

  • Pan: drag left-click
  • Zoom: roll mouse wheel

The main problem with this code is that after zooming in ~500 times, the generated shape will jump around on the canvas, rather than staying centered on the mouse cursor. I’ve tried debugging and the best idea I have is that this error is due to the limits of floating-point precision.

(As a self-taught Java programmer) I’m looking for suggestions regarding:

  • How to zoom in indefinitely without losing precision
  • Improving performance
  • Class structure and overall code style
  • Any other improvements

Mandelbrot.java:

import java.awt.geom.Point2D;  public class Mandelbrot {     private int beta = 50;     private volatile boolean abort = false;     private volatile boolean generating = false;     private volatile int genCount = 0;      private Mandelbrot()     {         new GUI(this);     }      /**      * @return Whether the given complex number diverges from the origin-centered      * circle of radius 2 after {@code beta} number of tries.      */     private boolean diverges(double real, double complex)     {         ComplexNumber cn = new ComplexNumber(real, complex);         ComplexNumber z = new ComplexNumber(0);         for(int i = 0; i < beta; i++)         {             z.add(z.square(), cn);             if(z.real*z.real + z.complex*z.complex > 4)                 return true;         }         return false;     }      private void generatePoints(Point2D.Double tl, Point2D.Double br, int[] pixels, int threadID)     { //      final long startTime = System.nanoTime();          Point2D.Double start = GUI.wtc(tl);         Point2D.Double end = GUI.wtc(br);         double increment = (end.x - start.x)/(double)(GUI.SIZE - 1);          for(double y = start.y, cy = 0; cy < GUI.SIZE; y += increment, cy++)         {             // Stop computing if a new zoom/pan is commanded             if(abort)             {                 abort = false;                 System.out.printf("(%d) Aborting at cy %d\n", genCount, (int)cy);                 break;             }             for(double cx = 0, x = start.x; cx < GUI.SIZE; x += increment, cx++)             {                 if(x*x + y*y > 4)                     continue;                 if(!diverges(x, y))                     pixels[(int) (cy*GUI.SIZE + cx)] = 0xFF000000;             }         }  //      long elapsedTime = System.nanoTime() - startTime; //      System.out.printf("thread %d time: %.3fs\n", threadID, elapsedTime / 1000000000.0);     }      int[] generatePoints(Point2D.Double tl, Point2D.Double br)     {         System.out.printf("(%d) Generating on thread: %s\n",                 genCount, Thread.currentThread().getName());         long startTime = System.nanoTime();         int[] pixels = new int[GUI.SIZE*GUI.SIZE];          generating = true;         //TODO multithreaded Mandelbrot calculation         generatePoints(tl, br, pixels, 0);         generating = false;          long elapsedTime = System.nanoTime() - startTime;         System.out.printf("(" + genCount++ + ") Done. Took %.3fs\n\n", elapsedTime / 1000000000.0);          return pixels;     }      void abortProcessing()     {         if(generating)         {             abort = true;         }     }      void setBeta(int beta)     {         this.beta = beta;     }      int getBeta()     {         return beta;     }      public static void main(String[] args)     {         new Mandelbrot();     } } 

GUI.java:

import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; import java.awt.geom.AffineTransform; import java.awt.geom.Ellipse2D; import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Point2D; import java.awt.image.BufferedImage;  import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.SpinnerModel; import javax.swing.SpinnerNumberModel; import javax.swing.WindowConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener;  @SuppressWarnings("serial") final class GUI {     public static final int SIZE = 992; // Must be divisible by 4     public static final double ZOOM_FACTOR = 1.1;     private BufferedImage image = new BufferedImage(SIZE, SIZE, BufferedImage.TYPE_INT_ARGB);     private Canvas canvas;      GUI(Mandelbrot man)     {         canvas = new Canvas(man);         refresh(man);          JFrame frame = new JFrame("MandelBrot Set Viewer");         frame.setContentPane(setupPanel(man));         frame.pack(); //      frame.setLocation(5456, 5); //      frame.setLocation(4200, 975); //      frame.setLocation(4200, 5);         frame.setVisible(true);         frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);     }      /**      * Converts from window coordinates to Cartesian coordinates.      */     public static Point2D.Double wtc(Point2D.Double window)     {         return new Point2D.Double((window.x * 4 / (double)GUI.SIZE) - 2,                 (window.y * 4 / (double)GUI.SIZE) - 2 );     }      private JPanel setupPanel(final Mandelbrot man)     {         SpinnerModel betaModel = new SpinnerNumberModel(man.getBeta(), 1, Integer.MAX_VALUE, 1);         JSpinner betaSpinner = new JSpinner(betaModel);         betaSpinner.addChangeListener(new ChangeListener()         {             @Override             public void stateChanged(ChangeEvent e)             {                 man.setBeta((int)((JSpinner) e.getSource()).getValue());                 refresh(man);             }         });         JLabel betaLabel = new JLabel("Beta value:");         JPanel betaPanel = new JPanel();         betaPanel.add(betaLabel);         betaPanel.add(betaSpinner);          JButton resetButton = new JButton("Reset");         resetButton.addActionListener(new ActionListener()         {             @Override             public void actionPerformed(ActionEvent arg0)             {                 canvas.reset();             }         });         JPanel resetPanel = new JPanel();         resetPanel.add(resetButton);          JPanel sidePanel = new JPanel(new BorderLayout(10, 10));         sidePanel.add(betaPanel, BorderLayout.NORTH);         sidePanel.add(resetPanel, BorderLayout.SOUTH);         JPanel mainPanel = new JPanel();         mainPanel.add(sidePanel);         mainPanel.add(canvas);         return mainPanel;     }      void refresh(Mandelbrot man)     {         //TODO use a Thread pool rather than creating a new Thread for each pan/zoom         new Thread(new Runnable()         {             @Override             public void run()             {                 // Calculate Mandelbrot shape in the current viewing area                 image.getRaster().setDataElements(0, 0, image.getWidth(), image.getHeight(),                         man.generatePoints(canvas.tlClip, canvas.brClip));                 canvas.repaint();             }         }).start();     }      private final class Canvas extends JPanel     {         final Point2D.Double tl = new Point2D.Double(0, 0);         final Point2D.Double br = new Point2D.Double(SIZE, SIZE);         // Point in Cartesian space at the top left of the viewing window         volatile Point2D.Double tlClip = new Point2D.Double(0, 0);         // Point in Cartesian space at the bottom right of the viewing window         volatile Point2D.Double brClip = new Point2D.Double(SIZE, SIZE);         AffineTransform transform = new AffineTransform();         Ellipse2D.Double backgroundCircle = new Ellipse2D.Double(0, 0, SIZE, SIZE);         int prevX, prevY;         double scale = 1;          Canvas(Mandelbrot man)         {             setPreferredSize(new Dimension(SIZE, SIZE));             addMouseListener(new MouseAdapter()             {                 @Override                 public void mouseClicked(MouseEvent e)                 {                     // For debugging                     System.out.println("tlClip: " + tlClip);                     System.out.println("brClip: " + brClip);                 }             });             addMouseMotionListener(new MouseAdapter()             {                 @Override                 public void mouseMoved(MouseEvent e)                 {                     prevX = e.getX();                     prevY = e.getY();                 }                  @Override                 public void mouseDragged(MouseEvent e)                 {                     pan(man, e);                 }             });             addMouseWheelListener(new MouseAdapter()             {                 @Override                 public void mouseWheelMoved(MouseWheelEvent e)                 {                     zoom(man, e);                 }             });         }          private void pan(Mandelbrot man, MouseEvent e)         {             man.abortProcessing(); // Stop processing the previous request--we have a new one              int x = e.getX();             int y = e.getY();             double translateX = (x - prevX)/scale;             double translateY = (y - prevY)/scale;             transform.translate(translateX, translateY);              updateClip();             refresh(man);              prevX = x;             prevY = y;         }          private void zoom(Mandelbrot man, MouseWheelEvent e)         {             man.abortProcessing(); // Stop processing the previous request--we have a new one              int rotation = e.getWheelRotation();             Point2D p1 = e.getPoint();             Point2D p2 = null;             try             {                 p2 = transform.inverseTransform(p1, null);             }             catch(NoninvertibleTransformException ex)             {                 // Should not happen                 ex.printStackTrace();                 return;             }             transform.setToIdentity();             scale = (rotation < 0) ? scale * ZOOM_FACTOR : scale / ZOOM_FACTOR;             transform.translate(p1.getX(), p1.getY());             transform.scale(scale, scale);             transform.translate(-p2.getX(), -p2.getY());              updateClip();             refresh(man);         }          private void updateClip()         {             try             {                 AffineTransform inv = transform.createInverse();                 inv.transform(tl, tlClip);                 inv.transform(br, brClip);             }             catch(NoninvertibleTransformException nte)             {                 nte.printStackTrace();             }         }          private void reset()         {             transform.setToIdentity();             scale = 1;             repaint();         }          @Override         public void paint(Graphics g)         { //          final long startTime = System.nanoTime();             super.paint(g);             Graphics2D g2d = (Graphics2D) g;             g2d.setRenderingHint(RenderingHints.KEY_RENDERING,                 RenderingHints.VALUE_RENDER_SPEED);             g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,                 RenderingHints.VALUE_COLOR_RENDER_SPEED);              g2d.setColor(Color.GRAY);             g2d.fill(transform.createTransformedShape(backgroundCircle));              g2d.drawImage(image, 0, 0, null);  //          long elapsedTime = System.nanoTime() - startTime; //          System.out.printf("painting time: %.3fs\n\n", elapsedTime / 1000000000.0);         }     } } 

ComplexNumber.java:

package mandelbrot;  public class ComplexNumber {     public double real, complex;      public ComplexNumber(double real, double complex)     {         this.real = real;         this.complex = complex;     }      public ComplexNumber(double real)     {         this.real = real;         complex = 0;     }      public void add(ComplexNumber cn1, ComplexNumber cn2)     {         real = cn1.real + cn2.real;         complex = cn1.complex + cn2.complex;     }      public ComplexNumber square()     { //      double f = real * real; //      double o = real * complex; //      double i = real * complex; //      double l = -(complex * complex);         double realTemp = real;         real = real * real - complex * complex;         complex = realTemp * complex * 2;         return this;     }      @Override     public String toString()     {         return real + " + " + complex + "i";     } } 

“File Viewer” modern web part zoom level for an excel sheet

I have an excel sheet inside my PC, and i set its zoom to 50% and save it. then i upload it to our sharepoint online document library >> then i show it inside a modern page using “File Viewer” modern part. but the problem is that the excel sheet is showing with extra zoom level, and did not preserve the zoom level saved inside the source excel sheet (50%). which caused the excel sheet to become hard to read inside the file viewer, as only small part of it will be shown inside the page , and users need to scroll horizontally to be able to view the columns, unlike when i set its zoom level to 50%.

so can anyone advice if i can control the zoom level for the excel sheet inside the “file viewer” modern web part? if the answer is No, the what is the best way to view the excel sheet in this case? keeping in mind if i directly view the excel sheet inside the browser (by clicking on it inside the document library), the will face the same zoom level problem.