def center_window(self):
        if self.dialog is not None:
            desktop = QtGui.QApplication.desktop()
            cursor_pos = QtGui.QCursor.pos()
            desktop_number = desktop.screenNumber(cursor_pos)
            desktop_rect = desktop.screenGeometry(desktop_number)

            size = self.dialog.geometry()

            self.dialog.move(
                (desktop_rect.width() - size.width()) * 0.5 + desktop_rect.left(),
                (desktop_rect.height() - size.height()) * 0.5 + desktop_rect.top()
            )
Left f_{i, c} represents the maximum value the bag has at the index i for a bag with capacity c.
dataset/ETHPy150Open eoyilmaz/anima/anima/ui/progress_dialog.py/ProgressDialogManager.center_window--crossover with--dataset/ETHPy150Open algorhythms/LintCode/Backpack.py/Solution.backPack