repair – How do I find out the order of the lens elements in the rear group?

I bought a used Canon 100D after I started taking pictures this summer and used a vintage lens that was still attached to my dad's Pentax ME Super (Asahi Pentax-M 50mm 1.4 SMC) big improvement over the Canon kit) lens that came with the camera).

Now I have recently received a good deal on some vintage K-mount lenses, € 30 for an Asahi Pentax-M 135mm 3.5 SMC in pristine condition, some Pentax 28-80 3.5-4.5 zoom – / Macro Lenses with Fixed Apertures and a Makinon Zoom 35-105 f3.5-4.5 MC. The latter is the objective in question …

I could not focus on the lens and it showed signs of tampering (some half-worn screw heads and the metal was scratched on the back because no suitable tool was used to open the lens), but it still felt smooth and had no scratches the glass and just seems to work well. So I checked it out and everything seemed fine. The only thing I can tell is that the rear lens element / rear lens group has been clearly opened (light fingerprints on the inside of the assembly), so I took everything apart and cleaned it thoroughly, but still no focus.

My theory, then, is that the person who first took this apart did not leave all the lens parts in the right order and therefore can not be focused.

I did my research, but I can not find any diagrams of this lens, so I can not verify it. Does my theory sound right for someone with more experience in the field? Or what else could be to blame?

And does anyone have a way to find the right order of assembly? Because there are a total of 8 glass lenses, about 5 spacer rings and an inner tube piece to center the smaller lenses, resulting in a lot of combinations of orders.Enter image description here

Measurement – How to find surface roughness values ​​in Mathematica

Thank you for your reply to Mathematica Stack Exchange!

  • Please be sure too answer the question, Provide details and share your research!

But avoid

  • Ask for help, clarify or respond to other answers.
  • Make statements based on opinions; Cover them with references or personal experience.

Use MathJax to format equations. Mathjax reference.

For more information, see our tips for writing great answers.

select – Word file executing an SQL command – How do I find the SQL source database?

A Word 2013 file has a merge feature that is activated whenever it is open. It is "SELECT * FROM & # 39; database & # 39;".

Since the final results contain errors (the final Word document feeds come from the wrong field names), I'd like to edit the database to change a few things.

The problem is that I have the & # 39; database & # 39; can not find, because it is not in the same folder as the Word file mentioned above.

We use Access 2003 and this code was created by a person who does not work with us anymore.

Is there a way to determine the source database from the Word file (Word 2013 uses only Access for Office 2003)?

Many thanks.

Transport – Where can I find some maps showing where the stations and lines of micros and other types of minibuses (eg station wagons) are located in Lima, Peru?

According to the Wikipedia page about transport in Lima:

Minibuses are the most common public transport in Lima.

I was able to find some tickets for the stations / lines of the Metropolitano (opened in 2010 bus express train) and the subway (opened bus in 2011) in Lima, but could not find similar tickets for minibuses easily.

Where can I find some maps showing where the stations and lines of microphones and other types of minibuses (eg station wagons) are located in Lima?

java sorting algorithms – find comparisons and motions

    package faculdade;

import java.util.Random;

public class Ordenacao {

    public static long comparacao;

    public static long movimentacao;

    public static void main(String() args) {
        int() vetor = new int(1000);
        fill(vetor);
        System.out.println("Vetor criado:");
        // show(vetor);
        // tempo inicial
        long tempoInicial = System.currentTimeMillis();
        //selectionSort(vetor);
        bubbleSort(vetor);
        //insertionSort(vetor);
        //quickSort(vetor, 0, vetor.length - 1);
        // tempo final
        long tempoFinal = System.currentTimeMillis();

        System.out.println("Executado em = " + (tempoFinal - tempoInicial) + " ms");
        System.out.println("n Comparações: " + comparacao + " Movimentaçoes: " + movimentacao);
        System.out.println("Finalizado.");


    }

    public static void selectionSort(int() vetor) {
        comparacao = 0;
        movimentacao = 0;
        for (int i = 0; i < vetor.length - 1; i++) {
            int menor = i;
            for (int j = i + 1; j < vetor.length; j++) {
                comparacao++;
                if (vetor(j) < vetor(menor)) {
                    comparacao++;
                    menor = j;
                }

            }
            swap(vetor, i, menor);
            // show(vetor);
            movimentacao++;
        }
    }

    public static void bubbleSort(int() vetor) {
        movimentacao = 0;
        comparacao = 0;
        for (int i = vetor.length; i >= 1; i--) {
            for (int j = 1; j < i; j++) {
                if (vetor(j - 1) > vetor(j)) {
                    swap(vetor, j, j-1);
                    comparacao++;
                }
            }
            show(vetor);
        }
    }

    public static void insertionSort(int() vetor) {
        comparacao = 0;
        movimentacao = 0;
        for (int i = 1; i < vetor.length; i++) {
            int current = vetor(i);
            int j = i - 1;
            while (j >= 0 && current < vetor(j)) {
                vetor(j + 1) = vetor(j);
                j--;
                comparacao++;
            }
            // at this point we've exited, so j is either -1
            // or it's at the first element where current >= a(j)
            vetor(j + 1) = current;
        }

            show(vetor);
            movimentacao++;
    }

    public static void quickSort(int vetor(), int esquerda, int direita) {

        int esq = esquerda;
        int dir = direita;
        int pivo = vetor((esq + dir) / 2);
        int troca;

        while (esq <= dir) {
            while (vetor(esq) < pivo) {
                esq = esq + 1;

            }
            while (vetor(dir) > pivo) {
                dir = dir - 1;

            }
            if (esq <= dir) {
                troca = vetor(esq);
                vetor(esq) = vetor(dir);
                vetor(dir) = troca;
                esq = esq + 1;
                dir = dir - 1;
                movimentacao++;

            }
            comparacao++;
        }
        if (dir > esquerda) {
            quickSort(vetor, esquerda, dir);

        }

        if (esq < direita) {
            quickSort(vetor, esq, direita);

        }


    }

    public static void fill(int() vetor) {
        Random r = new Random();
        for (int i = 0; i < vetor.length; i++) {
            vetor(i) = r.nextInt(100);
        }
    }

    public static void show(int() vetor) {
        for (int i = 0; i < vetor.length; i++) {
            System.out.print(vetor(i) + " ");
        }
        System.out.println("");
    }

    public static void swap(int() vetor, int a, int b) {
        int aux = vetor(a);
        vetor(a) = vetor(b);
        vetor(b) = aux;
        movimentacao++;

    }

}

At runtime, the comparison number corresponds to the train number. I think that's wrong

Command line – Find and replace folder and file names with incompatible Windows characters

My Ubuntu (18.04) drive is synchronized with a Windows drive. Some of my Ubuntu folder and file names contain characters that are not allowed in Windows. This causes synchronization problems. I want to find these characters and either remove them from the file / folder names or replace them with an "x".

How can I do it fast?

Here are the characters forbidden in Windows (modified after Christopher Oezbek's answer):

< (less than)
> (greater than)
: (colon - sometimes works, but is actually NTFS Alternate Data Streams)
" (double quote)
 (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

Driver – Ubuntu 18.04.3 can not find second monitor via HDMI – My Labtop is Dell G3 – NVIDIA 1060 TI

I have a new Dell G3 laptop with an NVIDIA 1060 TI GPU. This system is set up for dual boot with Windows / Ubuntu. Ubuntu can not recognize the HDMI port and does not display my second monitor. However, it works well with Windows.

I tried to install all the routine updates. None of these things fix the problem.

I also recently changed my driver with this Commnad:

sudo apt install nvidia-driver-435

but it did not solve the problem.

$ lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
    Subsystem: Dell Device 0949
    Kernel driver in use: i915
    Kernel modules: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2191 (rev a1)
    Subsystem: Dell Device 0949
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation Device 1aeb (rev a1)

Artifacts – Find duplicate pixels / objects along seams

I have a seam of two photos joined by a seam alignment algorithm that occasionally creates duplicate pixels / objects / artifacts on either side of the seam in the final, aligned photograph. The images are large and currently the seams are manually checked for duplicate artifacts / objects. Is there an algorithm / software / programming package that allows me to check the seams for duplicates faster, preferably automatically? The algorithm should be able to detect any duplicates on either side of the seam. What I have to do with this is outlined below:

 |
 |
 | <---- Seam
 |
o|o <---- Duplicated object
 |
x|x <---- Duplicated object
 |
 |