text:
Q: Easy way of running the same junit test over and over? Like the title says, I'm looking for some simple way to run JUnit 4.x tests several times in a row automatically using Eclipse.
An example would be running the same test 10 times in a row and reporting back the result.
We already have a complex way of doing this but I'm looking for a simple way of doing it so that I can be sorta sure that the flaky test I've been trying to fix stays fixed.
An ideal solution would be an Eclipse plugin/setting/feature that I am unaware of.

A: With JUnit 5 I was able to solve this using the @RepeatedTest annotation:
@RepeatedTest(10)
public void testMyCode() {
    //your test code goes here
}

Note that @Test annotation shouldn't be used along with @RepeatedTest.

A: I've found that Spring's repeat annotation is useful for that kind of thing:
@Repeat(value = 10)

Latest (Spring Framework 4.3.11.RELEASE API) doc:

*

*org.springframework.test.annotation

*Unit Testing in Spring

A: There's an Intermittent annotation in the tempus-fugit library which works with JUnit 4.7's @Rule to repeat a test several times or with @RunWith.
For example,
@RunWith(IntermittentTestRunner.class)
public class IntermittentTestRunnerTest {

   private static int testCounter = 0;

   @Test
   @Intermittent(repition = 99)
   public void annotatedTest() {
      testCounter++;
   }
}

After the test is run (with the IntermittentTestRunner in the @RunWith), testCounter would be equal to 99.

A: This works much easier for me.
public class RepeatTests extends TestCase {

    public static Test suite() {
        TestSuite suite = new TestSuite(RepeatTests.class.getName());

        for (int i = 0; i < 10; i++) {
        suite.addTestSuite(YourTest.class);
        }

        return suite;
    }
}

A: Inspired by the following resources:

*

*blog post

*this solution

*commented version
Example
Create and use a @Repeat annotation as follows:
public class MyTestClass {

    @Rule
    public RepeatRule repeatRule = new RepeatRule();

    @Test
    @Repeat(10)
    public void testMyCode() {
        //your test code goes here
    }
}

Repeat.java
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention( RetentionPolicy.RUNTIME )
@Target({ METHOD, ANNOTATION_TYPE })
public @interface Repeat {
    int value() default 1;
}

RepeatRule.java
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;

public class RepeatRule implements TestRule {

    private static class RepeatStatement extends Statement {
        private final Statement statement;
        private final int repeat;

        public RepeatStatement(Statement statement, int repeat) {
            this.statement = statement;
            this.repeat = repeat;
        }

        @Override
        public void evaluate() throws Throwable {
            for (int i = 0; i < repeat; i++) {
                statement.evaluate();
            }
        }

    }

    @Override
    public Statement apply(Statement statement, Description description) {
        Statement result = statement;
        Repeat repeat = description.getAnnotation(Repeat.class);
        if (repeat != null) {
            int times = repeat.value();
            result = new RepeatStatement(statement, times);
        }
        return result;
    }
}

PowerMock
Using this solution with @RunWith(PowerMockRunner.class), requires updating to Powermock 1.6.5 (which includes a patch).

A: Anything wrong with:
@Test
void itWorks() {
    // stuff
}

@Test
void itWorksRepeatably() {
    for (int i = 0; i < 10; i++) {
        itWorks();
    }
}

Unlike the case where you are testing each of an array of values, you don't particularly care which run failed.
No need to do in configuration or annotation what you can do in code.

A: The easiest (as in least amount of new code required) way to do this is to run the test as a parametrized test (annotate with an @RunWith(Parameterized.class) and add a method to provide 10 empty parameters). That way the framework will run the test 10 times.
This test would need to be the only test in the class, or better put all test methods should need to be run 10 times in the class.
Here is an example:
@RunWith(Parameterized.class)
public class RunTenTimes {

    @Parameterized.Parameters
    public static Object[][] data() {
        return new Object[10][0];
    }

    public RunTenTimes() {
    }

    @Test
    public void runsTenTimes() {
        System.out.println("run");
    }
}

With the above, it is possible to even do it with a parameter-less constructor, but I'm not sure if the framework authors intended that, or if that will break in the future.
If you are implementing your own runner, then you could have the runner run the test 10 times. If you are using a third party runner, then with 4.7, you can use the new @Rule annotation and implement the MethodRule interface so that it takes the statement and executes it 10 times in a for loop. The current disadvantage of this approach is that @Before and @After get run only once. This will likely change in the next version of JUnit (the @Before will run after the @Rule), but regardless you will be acting on the same instance of the object (something that isn't true of the Parameterized runner). This assumes that whatever runner you are running the class with correctly recognizes the @Rule annotations. That is only the case if it is delegating to the JUnit runners.
If you are running with a custom runner that does not recognize the @Rule annotation, then you are really stuck with having to write your own runner that delegates appropriately to that Runner and runs it 10 times.
Note that there are other ways to potentially solve this (such as the Theories runner) but they all require a runner. Unfortunately JUnit does not currently support layers of runners. That is a runner that chains other runners.

A: With IntelliJ, you can do this from the test configuration. Once you open this window, you can choose to run the test any number of times you want,.

when you run the test, intellij will execute all tests you have selected for the number of times you specified.
Example running 624 tests 10 times:

A: This is essentially the answer that Yishai provided above, re-written in Kotlin :
@RunWith(Parameterized::class)
class MyTest {

    companion object {

        private const val numberOfTests = 200

        @JvmStatic
        @Parameterized.Parameters
        fun data(): Array<Array<Any?>> = Array(numberOfTests) { arrayOfNulls<Any?>(0) }
    }

    @Test
    fun testSomething() { }
}

A: I build a module that allows do this kind of tests. But it is focused not only in repeat. But in guarantee that some piece of code is Thread safe.
https://github.com/anderson-marques/concurrent-testing
Maven dependency:
<dependency>
    <groupId>org.lite</groupId>
    <artifactId>concurrent-testing</artifactId>
    <version>1.0.0</version>
</dependency>

Example of use:
package org.lite.concurrent.testing;

import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import ConcurrentTest;
import ConcurrentTestsRule;

/**
 * Concurrent tests examples
 */
public class ExampleTest {

    /**
     * Create a new TestRule that will be applied to all tests
     */
    @Rule
    public ConcurrentTestsRule ct = ConcurrentTestsRule.silentTests();

    /**
     * Tests using 10 threads and make 20 requests. This means until 10 simultaneous requests.
     */
    @Test
    @ConcurrentTest(requests = 20, threads = 10)
    public void testConcurrentExecutionSuccess(){
        Assert.assertTrue(true);
    }

    /**
     * Tests using 10 threads and make 20 requests. This means until 10 simultaneous requests.
     */
    @Test
    @ConcurrentTest(requests = 200, threads = 10, timeoutMillis = 100)
    public void testConcurrentExecutionSuccessWaitOnly100Millissecond(){
    }

    @Test(expected = RuntimeException.class)
    @ConcurrentTest(requests = 3)
    public void testConcurrentExecutionFail(){
        throw new RuntimeException("Fail");
    }
}

This is a open source project. Feel free to improve.

A: You could run your JUnit test from a main method and repeat it so many times you need:
package tests;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.Result;

public class RepeatedTest {

    @Test
    public void test() {
        fail("Not yet implemented");
    }

    public static void main(String args[]) {

        boolean runForever = true;

        while (runForever) {
            Result result = org.junit.runner.JUnitCore.runClasses(RepeatedTest.class);

            if (result.getFailureCount() > 0) {
                runForever = false;
               //Do something with the result object

            }
        }

    }

}


text:
Q: auto-py-to-exe cannot get rid of torch and torchvision errors I've been reading every single post I found here and online with similar problems but none solved my problem.
I am trying to convert my python app to a exe file using auto-py-to-exe.
I got rid of most of the errors exept one. The application starts, but does not work as torch isnt loaded properly. the errors I get at startup are:
C:\yolov5\VisionExe\main\torch\_jit_internal.py:750: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x000001F88C9C6EE8>.
  warnings.warn(f"Unable to retrieve source for @torch.jit._overload function: {func}.")
C:\yolov5\VisionExe\main\torch\_jit_internal.py:750: UserWarning: Unable to retrieve source for @torch.jit._overload function: <function _DenseLayer.forward at 0x000001F88C9CD048>.
  warnings.warn(f"Unable to retrieve source for @torch.jit._overload function: {func}.")
C:\yolov5\VisionExe\main\torchvision\io\image.py:11: UserWarning: Failed to load image Python extension:

The command I run to compile is this:
pyinstaller --noconfirm --onedir --console --add-data "C:/yolov5/Vision/cratedb.db3;." --add-data "C:/yolov5/Vision/database.db3;." --add-data "C:/yolov5/Vision/EPS_GB.onnx;." --add-data "C:/yolov5/Vision/EPS_GB.yaml;." --add-data "C:/yolov5/Vision/MainWindow.ui;." --hidden-import "pytorch"  "C:/yolov5/Vision/main.py"

the compiling log is this:
Running auto-py-to-exe v2.18.1
Building directory: C:\Users\video\AppData\Local\Temp\tmpzqqe649s
Provided command: pyinstaller --noconfirm --onedir --console --add-data "C:/yolov5/Vision/cratedb.db3;." --add-data "C:/yolov5/Vision/database.db3;." --add-data "C:/yolov5/Vision/EPS_GB.onnx;." --add-data "C:/yolov5/Vision/EPS_GB.yaml;." --add-data "C:/yolov5/Vision/MainWindow.ui;." --hidden-import "pytorch"  "C:/yolov5/Vision/main.py"
Recursion Limit is set to 5000
Executing: pyinstaller --noconfirm --onedir --console --add-data C:/yolov5/Vision/cratedb.db3;. --add-data C:/yolov5/Vision/database.db3;. --add-data C:/yolov5/Vision/EPS_GB.onnx;. --add-data C:/yolov5/Vision/EPS_GB.yaml;. --add-data C:/yolov5/Vision/MainWindow.ui;. --hidden-import pytorch C:/yolov5/Vision/main.py --distpath C:\Users\video\AppData\Local\Temp\tmpzqqe649s\application --workpath C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build --specpath C:\Users\video\AppData\Local\Temp\tmpzqqe649s

3645500 INFO: PyInstaller: 4.10
3645502 INFO: Python: 3.7.8
3645504 INFO: Platform: Windows-10-10.0.14393-SP0
3645506 INFO: wrote C:\Users\video\AppData\Local\Temp\tmpzqqe649s\main.spec
3645510 INFO: UPX is not available.
3645513 INFO: Extending PYTHONPATH with paths
['C:\\yolov5\\Vision']
3645883 INFO: checking Analysis
3645886 INFO: Building Analysis because Analysis-07.toc is non existent
3645888 INFO: Reusing cached module dependency graph...
3645930 INFO: Caching module graph hooks...
3646407 INFO: running Analysis Analysis-07.toc
3646410 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Users\video\AppData\Local\Programs\Python\Python37\python.exe
3646475 INFO: Analyzing C:\yolov5\Vision\main.py
3650810 INFO: Processing pre-find module path hook site from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
3650814 INFO: site: retargeting to fake-dir 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\fake-modules'
3654183 INFO: Processing pre-safe import module hook setuptools.extern.six.moves from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.moves.py'.
3657038 INFO: Processing pre-find module path hook PyQt5.uic.port_v2 from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-PyQt5.uic.port_v2.py'.
3658566 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
3659745 INFO: Processing pre-safe import module hook six.moves from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
3717974 INFO: Analyzing hidden import 'pytorch'
3717979 ERROR: Hidden import 'pytorch' not found
3717982 INFO: Processing module hooks...
3717988 INFO: Loading module hook 'hook-apscheduler.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718433 INFO: Loading module hook 'hook-backports.zoneinfo.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718470 INFO: Loading module hook 'hook-certifi.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718478 INFO: Loading module hook 'hook-cv2.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718492 INFO: Loading module hook 'hook-eel.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718634 INFO: Loading module hook 'hook-h5py.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718639 INFO: Loading module hook 'hook-pycparser.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3718644 INFO: Loading module hook 'hook-tensorflow.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3736361 INFO: Loading module hook 'hook-torch.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3736631 INFO: Loading module hook 'hook-torchvision.ops.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3736635 INFO: Loading module hook 'hook-tzdata.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
3737595 INFO: Loading module hook 'hook-difflib.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3737610 INFO: Loading module hook 'hook-distutils.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3737615 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3737632 INFO: Loading module hook 'hook-encodings.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3737701 INFO: Loading module hook 'hook-gevent.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3738265 WARNING: Unable to find package for requirement zope.event from package gevent.
3738270 WARNING: Unable to find package for requirement zope.interface from package gevent.
3738275 INFO: Packages required by gevent:
['setuptools', 'greenlet', 'cffi']
3739312 INFO: Loading module hook 'hook-heapq.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3739330 INFO: Loading module hook 'hook-importlib_metadata.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3739336 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3739382 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3740053 INFO:   Matplotlib backend "GTK3Agg": ignored
    backend Gtk3Agg requires cairo
3740378 INFO:   Matplotlib backend "GTK3Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3740702 INFO:   Matplotlib backend "GTK4Agg": ignored
    backend Gtk4Agg requires cairo
3741026 INFO:   Matplotlib backend "GTK4Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3741351 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name '_macosx' from 'matplotlib.backends' (C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\__init__.py)
3741679 INFO:   Matplotlib backend "nbAgg": ignored
    No module named 'IPython'
3742239 INFO:   Matplotlib backend "QtAgg": added
3742562 INFO:   Matplotlib backend "QtCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3743112 INFO:   Matplotlib backend "Qt5Agg": added
3743440 INFO:   Matplotlib backend "Qt5Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3744411 INFO:   Matplotlib backend "TkAgg": added
3745373 INFO:   Matplotlib backend "TkCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3745949 INFO:   Matplotlib backend "WebAgg": added
3746873 INFO:   Matplotlib backend "WX": ignored
    No module named 'wx'
3747195 INFO:   Matplotlib backend "WXAgg": ignored
    No module named 'wx'
3747520 INFO:   Matplotlib backend "WXCairo": ignored
    No module named 'wx'
3747986 INFO:   Matplotlib backend "agg": added
3748312 INFO:   Matplotlib backend "cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffi is installed
3749354 INFO:   Matplotlib backend "pdf": added
3750369 INFO:   Matplotlib backend "pgf": added
3750924 INFO:   Matplotlib backend "ps": added
3751401 INFO:   Matplotlib backend "svg": added
3752333 INFO:   Matplotlib backend "template": added
3755084 INFO: Loading module hook 'hook-matplotlib.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755422 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755439 INFO: Loading module hook 'hook-numpy.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755582 INFO: Loading module hook 'hook-packaging.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755589 INFO: Loading module hook 'hook-pandas.io.formats.style.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755605 INFO: Loading module hook 'hook-pandas.plotting.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3755868 INFO: Loading module hook 'hook-pandas.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756388 INFO: Loading module hook 'hook-pickle.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756407 INFO: Loading module hook 'hook-PIL.Image.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756697 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756715 INFO: Loading module hook 'hook-PIL.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756770 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3756789 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3757139 INFO: Processing pre-safe import module hook win32com from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
3757535 WARNING: Hidden import "pkg_resources.markers" not found!
3757555 INFO: Loading module hook 'hook-PyQt5.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3757618 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3757719 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758001 INFO: Loading module hook 'hook-PyQt5.QtNetwork.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758344 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758660 INFO: Loading module hook 'hook-PyQt5.uic.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758671 INFO: Loading module hook 'hook-PySide2.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758808 INFO: Loading module hook 'hook-PySide2.QtCore.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3758912 INFO: Loading module hook 'hook-PySide2.QtGui.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3759292 INFO: Loading module hook 'hook-PySide2.QtNetwork.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3759734 INFO: Loading module hook 'hook-PySide2.QtWidgets.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760060 INFO: Loading module hook 'hook-pytz.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760237 INFO: Loading module hook 'hook-scipy.io.matlab.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760244 INFO: Loading module hook 'hook-scipy.linalg.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760253 INFO: Loading module hook 'hook-scipy.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760266 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760277 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760341 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760349 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760358 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760368 INFO: Loading module hook 'hook-setuptools.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3760982 INFO: Loading module hook 'hook-sqlite3.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761060 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761069 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761224 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761232 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761241 INFO: Loading module hook 'hook-xml.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761250 INFO: Loading module hook 'hook-zope.interface.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761272 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761388 INFO: checking Tree
3761397 INFO: Building Tree because Tree-21.toc is non existent
3761405 INFO: Building Tree Tree-21.toc
3761475 INFO: checking Tree
3761484 INFO: Building Tree because Tree-22.toc is non existent
3761492 INFO: Building Tree Tree-22.toc
3761565 INFO: checking Tree
3761576 INFO: Building Tree because Tree-23.toc is non existent
3761584 INFO: Building Tree Tree-23.toc
3761598 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks'...
3761982 INFO: Looking for ctypes DLLs
3762184 INFO: Analyzing run-time hooks ...
3762226 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py'
3762237 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py'
3762249 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py'
3762259 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
3762273 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
3762286 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
3762296 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyside2.py'
3762308 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_mplconfig.py'
3762320 INFO: Including run-time hook 'C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
3762418 INFO: Looking for dynamic libraries
3764103 WARNING: lib not found: torch_python.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\_C.cp37-win_amd64.pyd
3764968 WARNING: lib not found: c10.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torchvision\_C.pyd
3764981 WARNING: lib not found: torch_cpu.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torchvision\_C.pyd
3765185 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\_pywrap_tf_session.pyd
3765226 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\_pywrap_debug_events_writer.pyd
3765258 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\_pywrap_device_lib.pyd
3765288 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\_pywrap_events_writer.pyd
3765342 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_op_def_registry.pyd
3765375 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\lib\io\_pywrap_record_io.pyd
3765405 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\lib\io\_pywrap_file_io.pyd
3765440 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_traceme.pyd
3765470 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_profiler.pyd
3765523 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\lib\core\_pywrap_py_func.pyd
3765542 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\lib\core\_pywrap_bfloat16.pyd
3765597 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\data\experimental\service\_pywrap_server_lib.pyd
3765630 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_checkpoint_reader.pyd
3765663 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\saved_model\pywrap_saved_model.pyd
3765847 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\platform\_pywrap_stacktrace_handler.pyd
3765876 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_test_metrics_util.pyd
3765992 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_tfprof.pyd
3766015 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_tensor_float_32_execution.pyd
3766036 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_determinism.pyd
3766073 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_dispatcher.pyd
3766097 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_nest.pyd
3766120 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\util\_pywrap_utils.pyd
3766203 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_cluster.pyd
3766235 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_optimizer.pyd
3766268 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_proto_comparators.pyd
3766296 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_dtypes.pyd
3766324 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\framework\_pywrap_python_op_gen.pyd
3766399 WARNING: lib not found: inference_engine.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\openvino\inference_engine\ie_api.cp37-win_amd64.pyd
3767760 INFO: Looking for eggs
3767772 INFO: Using Python library C:\Users\video\AppData\Local\Programs\Python\Python37\python37.dll
3767784 INFO: Found binding redirects:
[]
3767841 INFO: Warnings written to C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\warn-main.txt
3768798 INFO: Graph cross-reference written to C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\xref-main.html
3769191 INFO: Appending 'datas' from .spec
3769211 INFO: checking PYZ
3769222 INFO: Building PYZ because PYZ-07.toc is non existent
3769234 INFO: Building PYZ (ZlibArchive) C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\PYZ-07.pyz
3778078 INFO: Building PYZ (ZlibArchive) C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\PYZ-07.pyz completed successfully.
3778250 INFO: checking PKG
3778261 INFO: Building PKG because PKG-07.toc is non existent
3778273 INFO: Building PKG (CArchive) main.pkg
3778340 INFO: Building PKG (CArchive) main.pkg completed successfully.
3778353 INFO: Bootloader C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
3778365 INFO: checking EXE
3778378 INFO: Building EXE because EXE-07.toc is non existent
3778390 INFO: Building EXE from EXE-07.toc
3778402 INFO: Copying bootloader EXE to C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\main.exe.notanexecutable
3778419 INFO: Copying icon to EXE
3778432 INFO: Copying icons from ['C:\\Users\\video\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-console.ico']
3778447 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
3778461 INFO: Writing RT_ICON 1 resource with 3752 bytes
3778474 INFO: Writing RT_ICON 2 resource with 2216 bytes
3778488 INFO: Writing RT_ICON 3 resource with 1384 bytes
3778500 INFO: Writing RT_ICON 4 resource with 37019 bytes
3778514 INFO: Writing RT_ICON 5 resource with 9640 bytes
3778526 INFO: Writing RT_ICON 6 resource with 4264 bytes
3778540 INFO: Writing RT_ICON 7 resource with 1128 bytes
3778555 INFO: Copying 0 resources to EXE
3778568 INFO: Emedding manifest in EXE
3778581 INFO: Updating manifest in C:\Users\video\AppData\Local\Temp\tmpzqqe649s\build\main\main.exe.notanexecutable
3778596 INFO: Updating resource type 24 name 1 language 0
3778611 INFO: Appending PKG archive to EXE
3786949 INFO: Building EXE from EXE-07.toc completed successfully.
3786974 INFO: checking COLLECT
3786988 INFO: Building COLLECT because COLLECT-07.toc is non existent
3787000 INFO: Building COLLECT COLLECT-07.toc
3809812 INFO: Building COLLECT COLLECT-07.toc completed successfully.

Moving project to: C:\yolov5\VisionExe
Complete.

any help in solving this issue is greatly appreciated.

A: It looks like you attempted to include pytorch as a hidden import, which is good.
3717974 INFO: Analyzing hidden import 'pytorch'
3717979 ERROR: Hidden import 'pytorch' not found

However, it seems the actual module name is just torch and not pytorch, what you had. You can also include specific portions, such as
--hidden-import 'torch.jit'

I also noticed some warnings related to torch and tensorflow.
3764103 WARNING: lib not found: torch_python.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\_C.cp37-win_amd64.pyd
3764968 WARNING: lib not found: c10.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torchvision\_C.pyd
3764981 WARNING: lib not found: torch_cpu.dll dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\torchvision\_C.pyd
3765185 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of C:\Users\video\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\client\_pywrap_tf_session.pyd

I have not created an executable with these libraries before, but to play it on the safe side, I always include every library I touch (that is, I imported something in the code) in the hidden imports section. You might try modifying the .spec file that was generated in your project directory (reference) instead of typing each one out on the command line.
Finally, if the above fixes still produce the error, try debugging the imports PyInstaller thinks it needs.
Edit: To fix the issue related to "lib not found", please add the following flags to the PyInstaller command (or include in spec file). There may be more or different ones for your specific case.
--add-data="c:\users\yourusername\appdata\local\programs\python\python37\lib\site-packages\tensorflow;."
--add-data="c:\users\yourusername\appdata\local\programs\python\python37\lib\site-packages\torch\_C.cp37-win_amd64.pyd;."

Reference

redpajama_set_name: RedPajamaStackExchange


text:
Q: How many characters have appeared in both Marvel and DC comics? The Wikipedia page on Mantis (the character from Guardians of the Galaxy) says that she has appeared in both Marvel comics as Mantis and DC comics as Willow because her creator "took her with him".

After leaving Marvel Comics, writer Steve Englehart carried Mantis' tale through two other companies before returning to Marvel. In DC Comics' Justice League of America #142, she appears as Willow. Asked where she came from, Willow replies, "This one has come from a place she must not name, to reach a place no man must know." (Mantis refers to herself as "this one").

Are there any other examples of a character appearing in both Marvel and DC comics?  Especially if it's because the original creator has switched companies but still wants to utilize the same character, even under a different name?

A: Copy and pasted from Quora:

Which characters exist in both the Marvel and DC Universe?
If you are talking about the same incarnation of a person, there is only one - Access (comics). He was the one responsible for the coming together of the DC and Marvel universes in the DC vs Marvel series.

Hundreds (primarily minor ones) are listed in this exhaustive compilation
http://goodcomics.comicbookresources.com/2010/12/02/lorendiacs-lists-character-aliases-that-marvel-and-dc-have-both-used-5th-draft/

A: Listing characters that have appeared in both Marvel and DC comics is a very difficult question to nail down because of several large-scale crossovers between the universes.
For instance, there was a series of comics called DC vs Marvel where the universes collided to provide one-on-one battles between some of the major characters. The winners were fan-voted. There have also been a number of specialty crossover series, such as Superman vs The Amazing Spiderman, or Green Lantern Silver Surfer: Unholy Alliances. In addition to the official crossover series, there have been a number of unofficial breaks in the universe walls, as recounted in this article. Finally, for an incredibly detailed list of crossovers, this wikipedia article goes on at some length.
It would be a monumental task to go through and find every character in every one of these instances that crossed over.
More specifically, it would be interesting to see a list of characters that creators have been able to carry with them after leaving one of these companies. One might call them "transfer characters" as opposed to crossovers. The legalities of this are very complex these days (as is discussed in this academic paper), and I haven't been able to pin down a specific list of incidents.

A: It's difficult to truly say just how often this has happened.
First, in many cases, the characters created by a creator (especially when you go back to the 1960s and 1970s) were almost always considered to belong to the company, not the creator. So, if the creator explicitly stated that the character in question was supposed to be Character X they had created at Marvel or at DC, then there would be immediate legal issues involved.
Marvel over ownership of Blade.
If the creator has never explicitly stated it, then it may be very hard to say with certainty that character X at Marvel is "really" the same character as character Y at DC (or Image, or whatever). It's not uncommon for a creator to create titles similar to what they're best known for when they move from one company to another. Around 1980 or so, Marv Wolfman moved from Marvel to DC. While what's he's best known for from that period is The New Teen Titans, he also created Night Force. Prior to the move, one of the things he was best known for was Tomb of Dracula at Marvel. Night Force was similarly steeped in the supernatural, and there are characters in the two that are at least vaguely similar. Does that mean that (for example) Count Winters was really Quincy Harker moved to DC from Marvel? I'd say certainly not; however, I'd be surprised if there isn't someone out there who'd argue the point.
Note: I'm ignoring topics such as:

*

*authorized crossovers of characters published by two different companies;

*cameo appearances, where the character is usually not appearing in their most recognizable form, and the appearance is mostly intended as a joke/easter egg (For example, Clark Kent has been seen as a bystander in multiple Marvel comics over the years, easily recognizable by his 1970s/1980s standard outfit (blue suit, glasses, red tie));

*characters who are creator-owned, and whose adventures have been published by multiple companies (Dreadstar, for example);

*licensed characters who have been licensed to multiple companies over the years (The Shadow, Doc Savage, Tarzan, et al.); and

*"homage" characters - characters who are obviously intended to be versions of another company's characters, as an "homage" to those other characters (most notably Squadron Supreme and the Shi'ar Imperial Guard).

(I will note that, over the years, certain "homage" characters have wound up as the leads of series; past a certain point, I think they aren't really actionable any more. Consider the JMS Supreme Power/Squadron Supreme series Marvel was publishing as an on-going series for several years. While the characters involved were originally barely disguised copies of the Justice League, these characters had been Marvel characters for decades at that point.)

All that said, I can think only think of two cases where the creator fairly explicitly stated that character Y was really the same character as character X published by another company.
The first was the Mantis/Willow thing noted in the original question. Steve Englehart had created Mantis during his run on Avengers at Marvel, and had told a long-running story culminating in her being the "Celestial Madonna". She married a plant pretending to be her late boyfriend, and they went of to do whatever (yeah, it sounds weird - because it was).
When he moved to DC and was writing Justice League of America, he decided he wanted to tell a story that was basically about Mantis' pregnancy - that was the Willow story in JLA #142.
Actually, the story gets even odder than that. Englehart later wrote Coyote and Scorpio Rose for an independent publisher, Eclipse Comics. In Scorpio Rose, he included a character named Lorelei, who was fairly clearly supposed to be Mantis/Willow after her child was born. (To make sure you didn't miss his intent, Lorelei lived in Willimantic, CT (not certain about the state, but I am about the city name).
Just to close the loop: Mantis was basically unused at Marvel from when Englehart left, until, well, he came back and wanted to use her again. She appeared in (at least) Fantastic Four and Silver Surfer in the late 1980s (her previous appearances having ended by the early 1980s). After his use of her, she went unused until Englehart brought her back yet again in his Avengers: Celestial Quest mini-series in 2001-2. Finally, someone else brought her back: Abnett and Lanning used her in their Guardians of the Galaxy series in 2008, which lead to her being in the "Guardians, Vol 2" movie.
The other instance also traces its origins back to Marvel in the 1970s, and to a writer named Steve. Steve Gerber created a character named Howard the Duck while writing Man-Thing for Marvel. He was well-received, and was given his own comic, initially also written by Gerber. Gerber was eventually fired from the book for missing deadlines, and moved on to other assignments at other companies.
When he heard Marvel was looking to license his creation out, he sued Marvel for ownership of Howard. The lawsuit was settled out of court, with Marvel owning the character. Given how some of those licensing deals went (the "Howard the Duck" movie, specifically), Gerber may have been fortunate.
However, Gerber had a chance to write a Spider-Man/Howard the Duck team-up (Spider-Man Team-Up #5) in 1996. As it so happened, he was also writing a crossover for Image, pairing his character Destroyer Duck (who was basically created to help finance his lawsuit in the early 1980s), and Erik Larsen's Savage Dragon.
There was an semi-official crossover in that story: both stories involved a fight in a Cleveland warehouse, with the characters from the other stories appearing as silhouettes. Marvel, however, was not happy when they read the Savage Dragon/Destroyer Duck comic. Gerber had added some scenes were the Howard silhouette was cloned. According to his story, Spider-Man went home with one of the Howard clones, while the real Howard (and his girlfriend Beverly) were in the SD/DD comic at the end. Howard changed his name to Leonard, and Gerber had "stolen" Howard back from Marvel.
He never really did anything with Leonard from there, and in fact wrote a Howard the Duck mini-series for Marvel's MAX imprint a few years later.

A: There where several characters that were published by both companys: Tarzan, Korak, The Phantom, even Doc Savage who appears also in the Marvel universe (crossover with Spider-Man) as a regular character.
Marvel had similar characters to DC-Originals: The Shi'ar Guard is an equivalent to the Legion of Super-Heroes and the Squadron Supreme to the Justice League

A: Classic fiction characters are usually stock to both companies. Hercules, Captain Marvel and various incarnations of a horned daemon are prominent examples of characters shared by Marvel and DC.
Mattel toy line characters 'Masters of the Universe' (the tales of He-Man and Skeletor, etc) have been published by both as have stories involving movie and sporting celebrities.
In terms of other media, Peter Parker referred to Superman in Sam Raimi's 'Spider-Man 2'(2004) while toy company MEGO produced an action figure line in the 1970s that saw DC and Marvel characters interact at all levels.

A: Mantis is the only one and the creator changed her name.
Steve Gerber sued Marvel for the rights to his characters then he left the company and lost.  All creations are owned by the company not the artist, so unless the company sells or releases a character it remains their property.
As far as Willow/Mantis are concerned they are technically two different characters created by a clever artist.

A: Ant- man is in an old batman comic that I have.  I'm talking really old. Like in an issue somewhere 1 - 20 ish.  I think he just got renamed "The Atom"  to  avoid copyright stuff...


text:
Q: Create a join on range from one table to a value from another table SQL server So, I need to write a join between two tables whose structures are as below.

The user will provide the value BATCHID and this will get the corresponding value of VARIABLENAME which has two properties BATCHSTART and BATCHEND which are of type datetime. Now the condition is that the value of TIMESTAMP from the table NUMERICLOG should lie in between VARIABLENAME.BATCHSTART and VARIABLENAME.BATCHEND.
Now, because there is no common column between the two tables, I am not able to figure out how to do this.
Since, I don't have much experience with database queries, am I missing something very obvious? Please help.

A: Not entirely clear you goal here, be it validating input within the NUMERICLOG table based upon the BATCH_VARIABLES START/END values, or if it is the reverse.
Ultimately you are trying to perform query that returns a range of TIMESTAMP datetime entries BETWEEN two dates.
Have a look at this SQLFiddle, which captures I believe captures the gist of your goal, of a BETWEEN query.


text:
Q: Why is jQuery Accordian making section the size of largest section even though autoHeight set to false Why is jQuery Accordian making section the size of largest section even though autoHeight set to false ?
There are two sections , the 1st contains only a small amount of text but when expanded is shown same size as the second section. Even though I've set autoHeight to false as recommended in this question accordion height issue
Am I perhaps setting this option in the wrong way, or at the wrong time ?
Complete source code below.
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="songkong.css">
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />

<link rel="stylesheet" href="/resources/demos/style.css" />

MusicBrainz Summary - Various Artists

Preview Only, no actual changes will be made to your music files

 25 Years of Rock 'n' Roll: 1964, Volume 2 - 8978a8ac-4337-4312-bcf2-58dc889ca6b4, 1 songs of 20
 DE, Cat No:MRRT CD 64, CD

8978a8ac-4337-4312-bcf2-58dc889ca6b4

Eden Kane - 01/14 - Boys Cry

 Dedicated Follower of Fashion - 4c9b2f9d-2485-45f8-a370-06f60c420295, 26 songs of 28
 GB, Castle Pulse, Cat No:PLS CD 138, CD

4c9b2f9d-2485-45f8-a370-06f60c420295

The Moody Blues - 01/02 - Go Now

The Show Stoppers - 01/03 - Ain't Nothin' But A House Party

The Lemon Pipers - 01/04 - Green Tambourine

The Tremeloes - 01/05 - Here Comes My Baby

P.P. Arnold - 01/06 - The First Cut Is the Deepest

Dave Dee, Dozy, Beaky, Mick & Tich - 01/07 - Bend It

Petula Clark - 01/08 - Downtown

Gene Pitney - 01/09 - 24 Hours From Tulsa

The Foundations - 01/10 - Back On My Feet Again

Jimmy Justice - 01/11 - Spanish Harlem

The Overlanders - 01/12 - Michelle

The Kinks - 01/13 - Tired Of Waiting For You

Small Faces - 01/14 - The Universal

Petula Clark - 01/15 - I Couldn't Live Without Your Love

Gerry & The Pacemakers - 01/16 - Ferry 'Cross The Mersey

Dave Davis - 01/17 - Susannah's Still Alive

Long John Baldry - 01/18 - Let The Heartaches Begin

Jackie Trent - 01/19 - Where Are You Now My Love

Sandie Shaw - 01/20 - Message Understood

Joe Dolan - 01/21 - Make Me An Island

Gene Pitney - 01/23 - Somewhere In The Country

Dave Dee, Dozy, Beaky, Mick & Tich - 01/24 - Last Night In Soho

Sandie Shaw - 01/25 - I'll Stop At Nothing

Joe Brown - 01/26 - It Only Took A Minute

Kenny Ball & His Jazzmen - 01/27 - March Of The Siamese Children

Lonnie Donegan - 01/28 - The Party's Over

A: pablofiumara beat me to it, but with a few lines less try:
$(function () {
    $("#accordion").accordion({
        collapsible: true,
        heightStyle: "content"
    });
});

A: Your code says:
$(function() {
$( "#accordion" ).accordion({collapsible:true});
$( "#accordion" ).accordion({autoHeight:false});
});

I think you should code this:
$(function() {
$( "#accordion" ).accordion({
  collapsible: true
});
});

$(function() {
$( "#accordion" ).accordion({
  heightStyle: "content"
});
});


text:
Q: Laravel Echo "Echo is not defined" First of all thanks for reading. Let me explain the problem that I'm facing. So I installed Pusher and Laravel Echo successfully and tried to use it in my dash.blade.php, this is how I imported the app.js file: <script src="{{ asset('js/app')}}"></script>. After that I used this:
<script>
  Echo.channel('channelDemoEvent')
    .listen('eventTrigger', (e) => {
      alert('Its working');
    });
</script>

And when running it I get this error in chrome console: Uncaught ReferenceError: Echo is not defined
I searched on the internet for this error more than 2 hours now, and when I added window. before the Echo I got a different error, that error is this:
Uncaught TypeError: Cannot read property 'channel' of undefined

I have tried to comment these on the app.js because I read that that could make this error: Vue.component('example-component', require('./components/ExampleComponent.vue'));
window.Vue = require('vue');

const app = new Vue({
el: '#app',
});`

After commenting those I get the same error.
Thanks for reading & have a nice day.

A: Here are the steps
composer
Install pusher if you are using pusher
composer require pusher/pusher-php-server "~4.0"

NPM or Yarn
npm install --save laravel-echo pusher-js

If not using pusher then
npm install --save socket.io-client

Blade
Make sure that your template has csrf token like so
<meta name="csrf-token" content="{{ csrf_token() }}">

.env
In .env you should fill in your pusher information
PUSHER_APP_ID=yourpusherappid
PUSHER_APP_KEY=yourpusherappkey
PUSHER_APP_SECRET=yourpusherappsecret
PUSHER_APP_CLUSTER=yourpusherappcluster

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

webpack.mix.js
In webpack.mix.js
Make sure you have
const mix = require("laravel-mix");
require("dotenv").config();

bootstrap.js
In resources/js/bootstrap.js
Make sure you have uncommented
/**
 * Echo exposes an expressive API for subscribing to channels and listening
 * for events that are broadcast by Laravel. Echo and event broadcasting
 * allows your team to easily build robust real-time web applications.
 */

import Echo from "laravel-echo";

window.Pusher = require("pusher-js");

window.Echo = new Echo({
    broadcaster: "pusher",
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    encrypted: true
});

Compile
Don't forget to recompile your js files
NPM run watch
NPM run dev
NPM run prod

Config Cache
Sometimes you may need to clear the cache so that changes take effect run the following command
php artisan config:clear

Thanks for upvote

A: For me the problem was in loading Echo Script before initialization,
So i had to make the listener start after the whole page is loaded
window.addEventListener('load',  () =>{
   Echo.join(`chat`)
    .here((users) => {
       console.log(users)
    })
      .joining((user) => {
          console.log(user.name);
         })
      .leaving((user) => {
           console.log(user.name);
           })
      .error((error) => {
              console.error(error);
       });

    })

A: Here are some things you can check/do that might resolve your issue:

*

*Make sure that you have uncommented these lines in bootstrap.js
bootstrap.js

import Echo from 'laravel-echo'

window.Pusher = require('pusher-js');

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: process.env.MIX_PUSHER_APP_KEY,
    cluster: process.env.MIX_PUSHER_APP_CLUSTER,
    encrypted: true
});

*

*Did you run npm run dev, npm run prod or npm run watch after making your changes?

*I am not confident with your js importation. asset('js/app') will return http://localhost/js/app. You probably have to add .js at the end to have everything imported properly.

*Check that your js/app.js importation is positioned before your <script></script> tag.

A: I have used Laravel echo in pure JS and that happened because document wasn't loaded.
document.onreadystatechange = function () {
    if (document.readyState === 'complete') {
        Echo.listen(...);
    }
}

A: Please follow the below sequence of code

*

*first set window variable

*second config vue

window.Echo = new Echo({
  broadcaster: 'socket.io',
  host: 'http://127.0.0.1:6001'
})
Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
`


text:
Q: then is not a function error - Node promise library I'm new to Node and this is the first time I've tried to use a promise library.  With that said ,this is the simple example I'm following: http://zpalexander.com/blog/javascript-promises-node-js/
This is the code that executes without error however as expected it logs "done" prior to finishing the file read and looping through the array.
    var Promise = require('bluebird');
var Converter = Promise.promisifyAll(require("csvtojson")).Converter;
var converter = new Converter({});
var Client = Promise.promisifyAll(require('node-rest-client')).Client;
var client = new Client();
var responseArray = [];

converter.fromFile("./ToterFeed.csv", function(err,result){
    for (var i = 0, len = result.length; i < len; i++) {
        var args = {
            data: JSON.stringify(result[i]),
            headers: { "Content-Type": "application/json" }
        };
        client.post("http://192.168.1.102:8080/api/ToterFeed/v1", args, function (data, response) {
            responseArray.push(data.responses);
            console.log(data.responses[0]);

        });

    }

})

console.log("done");

This is the updated code based on my interpretation.  I receive the "then is not a function" error.
  var Promise = require('bluebird');
var Converter = Promise.promisifyAll(require("csvtojson")).Converter;
var converter = new Converter({});
var Client = Promise.promisifyAll(require('node-rest-client')).Client;
var client = new Client();
var responseArray = [];

converter.fromFile("./ToterFeed.csv").then(function(err,result){
    for (var i = 0, len = result.length; i < len; i++) {
        var args = {
            data: JSON.stringify(result[i]),
            headers: { "Content-Type": "application/json" }
        };
        client.post("http://192.168.1.102:8080/api/ToterFeed/v1", args, function (data, response) {
            responseArray.push(data.responses);
            console.log(data.responses[0]);
        });
    }

}).then(console.log("done"));

My goal is to run the fill read and array iteration to completion then print "done".  Any insights is much appreciated!  Thanks.

A: You're almost there, a few small changes needed - the HTTP post will also be asynchronous, so as you've wrapped it using promisifyAll, you can return that from your first callback (which will mean subsequent calls to .then will await its completion). Note also that promisifyAll creates extra functions with a suffix of Async, so you need to call those versions to get promises back.
As you're iterating over an array and creating multiple posts, you need to use Promise.all to await the completion of all of the promises you're creating.
Lastly, your final console.log needs to be wrapped in a function (.then() always takes a function as a parameter). Something like this should work:
var Promise = require('bluebird');
var Converter = Promise.promisifyAll(require("csvtojson")).Converter;
var converter = new Converter({});
var Client = Promise.promisifyAll(require('node-rest-client').Client);
var responseArray = [];

converter.fromFileAsync("./ToterFeed.csv").then(function(result){
    var promises = [];
    for (var i = 0, len = result.length; i < len; i++) {
        var args = {
            data: JSON.stringify(result[i]),
            headers: { "Content-Type": "application/json" }
        };
        // Add a promise to the array of promises - this
        // will call the post then process the result.
        promises.push(
           Client.postAsync(
               "http://192.168.1.102:8080/api/ToterFeed/v1",
               args
           ).then(function (data) {
               responseArray.push(data.responses);
           }));
    }
    // Return Promise.all on all of our posts and
    // their response handlers
    return Promise.all(promises);
}).then(function () {
    console.log("done");
});


text:
Q: JSfiddle - add fonts from icomoon I wanted to post a problem I am having with icomoon icons.... and to show you the problem I wanted to do it on jsfiddle but now I am stuck.
How can I add the font files like icomoon.eot, icomoon.svg etc etc in JSfiddle? To be able to post my real problem here...
Thank you

A: Paste the href part of the CDN link
//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css

To External Resourses on the left side pane and click the plus sign
demo


text:
Q: Pytest, how can i make an action depending on session result? I would like to post a notification about result of whole session and not each test explicity as in:
- I've got 10 tests
- If at least one of them fail post a notification: Test session failed
- If all passed, post a notification : test session passed
For the record, i only have problem with setting it up in pytest. To call something on the end of session depending on result.


text:
Q: How to Customize a Contact Form Plugin as per Requirement I am new to wordpress. i have created a wordpress theme (for website development) where i have developed a contact page . In  Contact Page i want to add contact form which should be look like this:
Contact Form Image
I have tried to achieve this target by using Cform2 plugin and contact form 7 plugin but i failed to achieve my target .
Please help me how i can customize a contact form plugin as per requirnment. On which files i need to make changes, currently i have cform2 , contact form 7 plugin in my wordpress.

A: First of all you have to make your own html and css for contact page. And then use the contact form 7 and replace the your input field by contact form 7 input field and put class as you used in html. [text* name class:your_class]
In this way you can achieve your required answer.

A: This is my html structure of my contact form.

            Name
            [text* your-name class:form-control]

          Email
            [email* your-email class:form-control]

          Message
             [textarea your-message class:form-control]

          [submit class:submit-btn "Submit"]

You can change div structure and class are per your requirement and also you have to add css as required.

A: Yes you can use Contact Form 7, the area where the html of contact form 7 is showing you can use your own ids,and classes and can change the css in your own style sheet.


text:
Q: updating an excel file with apache metamodel I'm trying to incorporate Apache MetaModel into a project and keep running into a weird problem. I update an Excel spreadsheet row in code.  The code finds the right row, deletes it, then appends the row (with my update) to the bottom of the spreadsheet. I'd like the update to happen in-place, with the same data staying in the same row. I thought it was something I was doing wrong, then set up a stupid simple project to duplicate the behavior. Unfortunately, the problem remains.
Here's the xlsx file:
Name    Address           City          State   Zip
Bob     123 Main St.      Norman        OK      11111
Fred    989 Elm Street    Chicago       IL      22222
Mary    555 First Street  San Francisco CA      33333

Now, I want to update Bob's Zip to "None".
package MMTest;
import java.io.File;
import org.apache.metamodel.UpdateableDataContext;
import org.apache.metamodel.excel.ExcelDataContext;
import org.apache.metamodel.schema.Column;
import org.apache.metamodel.schema.Schema;
import org.apache.metamodel.schema.Table;
import org.apache.metamodel.update.Update;
public class MMTest {
    public static void main(String[] args) {
    UpdateableDataContext excel = new ExcelDataContext(new File("C:/test/test.xlsx"));
    Schema schema = excel.getDefaultSchema();
    Table[] tables = schema.getTables();
    assert tables.length == 1;
    Table table = schema.getTables()[0];
    Column Name = table.getColumnByName("Name");
    Column Zip = table.getColumnByName("Zip");
    excel.executeUpdate(new Update(table).where(Name).eq("Bob").value(Zip, "None"));
    }
}

Pretty simple right? Nope.
This is the result:
Name    Address           City          State   Zip
<blank line>
Fred    989 Elm Street    Chicago       IL      22222
Mary    555 First Street  San Francisco CA      33333
Bob     123 Main St.      Norman        OK      None

Am I missing something simple? The documentation is pretty sparse, but I've read everything the internet has to offer on this package. I appreciate your time.

A: Late to the party, but I've recently bumped into this issue and haven't spotted an answer elsewhere yet. The actual deleting takes place in ExcelDeleteBuilder.java
If you aren't concerned about maintaining row order, you could change
    for (Row row : rowsToDelete) {
        sheet.removeRow(row);
    }

to
    for (Row row : rowsToDelete) {
        int rowNum = row.getRowNum() + 1;
        sheet.removeRow(row);
        sheet.shiftRows(rowNum, sheet.getLastRowNum(), -1);
    }

See Apache POI docs for a better understanding of shiftRows().
As Adi pointed out, you'll still end up with the "updated" row being moved to the bottom, but in my use case the empty row is successfully removed.
N.B. I'm working from Apache Metamodel 4.5.4

A: You are not missing anything. The ExcelDataContext is not providing it's own update behavior. It is defaulting to use apache meta-model's default store agnostic implementation for updating the data. That implementation of UpdateCallback uses DeleteAndInsertCallback which is causing the behavior you are observing. It picks the row to be updated, updates it with a new value in memory, deletes the original row and inserts the updated row(which ends up in the bottom which is ExcelDataContext behavior).
You can open an issue at https://issues.apache.org/jira/browse/METAMODEL
Attach your sample code and data.
Best would be a failing unit test in
https://git-wip-us.apache.org/repos/asf/metamodel.git


text:
Q: chmod: changing permissions of 'my_script.sh': Operation not permitted when I'm trying to make shell script that error is shown ,what i must do ??
 [rehamadel@localhost bin]$ sudo vi my_script.sh

[sudo] password for rehamadel:

[rehamadel@localhost bin]$ ls -l my_script.sh
-rw-r--r--. 1 root root 52 Jul 30 19:25 my_script.sh
[rehamadel@localhost bin]$ chmod u+x my_script.sh
chmod: changing permissions of 'my_script.sh': Operation not permitted

A: You've created file my_script.sh with the root user as the owner (because you used sudo), which is why you're not permitted to change the permissions as yourself.
Thus, use sudo chmod u+x my_script.sh, but note that that will make the file only executable for the root user.
To make the file executable by everyone, use sudo chmod a+x my_script.sh.

A: Resolving the operation not permitted error:
sudo chmod u+x my_script.sh

You created the file via:
sudo vi my_script.sh
# editing

This means, the owner and group of the file is root. You are not allowed to change files of it by default. You need to change permission (chmod does it) or change the owner:
sudo chown you:yourgroup my_script.sh

This should do it. Save the trouble, without creating the file via sudo.

A: I faced this error because I uploaded the files via winscp and was trying to change permission on Linux window.
I was able to change permissions via winscp.


text:
Q: col-sm-2 me ocupa toda la fila con bootstrap tengo este codigo con bootstrap, en la que el div que contiene la imagen (zapatos.jpg) deberia en pantallas pequeñas ocupar un largo de 2, y en grandes un largo de 1. Pero me aparece como veis en la foto esta: https://postimg.cc/Q99tz33r , que es en una pantalla pequeña, y aparece como si ocupara toda la fila osea 12. Como se ve en la foto, aparece la imagen y coloreado en color secondary toda la columna que ocupa toda la fila.

    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">

Nombre

precio

unidades

A: parece ser que bootstrap 4 en adelante no cuenta con tamaño xs. En mi codigo no uso xs sino que uso sm, pero deberia usar xs para pantallas pequeñas. En bootstrap 4 en adelante en vez de col-xs-2 se utiliza col-2. Entonces lo he resuelto y queda asi:

    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">

Nombre

precio

unidades


text:
Q: SQL: Only output the color/colors of balls that are in every box I'm trying to solve this SQL problem, I have a dozen different colored balls and a few boxes. Now, I'm trying to write an SQL query that outputs the color of the balls that are in every box. So, if Green balls exist in Box A, B and C, but Blue and Red balls are only in 1 or 2 out of 3 boxes, I should only output Green.
I have three tables:
Box
ID  |
====|
A   |
B   |
C   |

Ball
Number | boxid | colorid |
=======|=======|=========|
1      |A      | Green   |
2      |A      | Red     |
3      |A      | Blue    |
4      |B      | Green   |
5      |B      | Red     |
6      |NULL   | Blue    |
7      |C      | Green   |
8      |NULL   | Red     |
9      |NULL   | Blue    |
10     |NULL   | Green   |
11     |NULL   | Red     |
12     |NULL   | Blue    |

NULL meaning they're not inside any of the boxes
Color
Name  |
======|
Blue  |
Red   |
Green |

Now, at first I thought I could solve this using this code:
SELECT colorid
FROM Ball
GROUP BY colorid
HAVING COUNT(colorid) = (SELECT COUNT(*) FROM Box)
OR COUNT(colorid) > (SELECT COUNT(*) FROM Box)

But then I realized that once you give a value to the rows that have NULL on boxid it'll output those colors as well because my SQL query doesn't take into account that the colored balls have to be in all three different boxes, just that all three colored balls are in any box.
I'm stumped on how to change my query so that it only counts if the ball is in a different box than another one. Please help.

A: Assuming that we know that the number of distinct boxes is 3:
  SELECT colorId
    FROM Ball
   WHERE boxid IS NOT NULL
GROUP BY colorId
  HAVING COUNT (DISTINCT boxid) = 3

Otherwise
  SELECT colorId
    FROM Ball
   WHERE boxid IS NOT NULL
GROUP BY colorId
  HAVING COUNT (DISTINCT boxid) = SELECT COUNT (DISTINCT ID) FROM Box

If the balls can be in boxes different from the three in Box, then we need a subquery to only count the balls in the boxes we care about.
  SELECT colorId
    FROM Ball
   WHERE EXISTS(SELECT 1 FROM Box WHERE ID = boxid)
GROUP BY colorId
  HAVING COUNT (DISTINCT boxid) = SELECT COUNT (DISTINCT ID) FROM Box

A: You could first create a Cross Join of possible combinations and inner join to that, grouping by colour.

A: Using INNER JOINs...to find colors that are in all 3 boxes
SELECT DISTINCT
   colorID
FROM
   Ball

   INNER JOIN (SELECT boxID, colorID FROM Ball WHERE boxID = 'A') A
   ON Ball.colorID = A.colorID

   INNER JOIN (SELECT boxID, colorID FROM Ball WHERE boxID = 'B') B
   ON Ball.colorID = B.colorID

   INNER JOIN (SELECT boxID, colorID FROM Ball WHERE boxID = 'C') C
   ON Ball.colorID = C.colorID


text:
Q: jQuery - Retrieve values from HTML elements and return their sum I got a form with several checkbox's where the user can choose multiple values, like so:

    <input id="myinput1" type="checkbox" value="choice_id_1" />
    5

    <input id="myinput2" type="checkbox" value="choice_id_2" />
    10

    <input id="myinput3" type="checkbox" value="choice_id_3" />
    10

I need to get the values from each :selected checkbox label and return their total sum (ie: total = 25).
So far I have been trying to get the strings from the labels with the .text() method, make an array with the results, converting them to int with parseFloat() and sum the array elements... obviosly with no success.
This is what i got (for sure not the best approach so I'm open to diferent solutions):
function totalSum() {
    var prices = $("input:checkbox:checked").siblings("label").text();
    var myArray = $.makeArray(prices);

    var total = 0;
    for(var i = 0; i < myArray.length; i++){
        var thisVal = parseFloat(myArray[i]);
        if(!isNaN(thisVal)){
            total += thisVal;
        }
    };

    $(".mydiv").text(total);
};

totalSum();
$("input:checkbox").change(totalSum);

A: the solution is as follow, you can go here to try out the demo
<form id="sum" action="#">

<input id="myinput1" type="checkbox" value="choice_id_1" />
5

<input id="myinput2" type="checkbox" value="choice_id_2" />
10

<input id="myinput3" type="checkbox" value="choice_id_3" />
10

<input class="submit" type="submit" value="Submit" />

</form>

A: Well for one thing change the value part of each checkbox to the same as the value of the label (if you can't do that, you can utilize the name attr of the input as shown below):

    <input id="myinput2" type="checkbox" value="choice_2" name="10"/>
    10

and then the JS can be like this:
function totalSum() {
    var prices = $("input:checkbox:checked");

    var total = 0;

    $.each(prices, function(index, obj){
        total += parseFloat($(obj).attr('name'));
    })

    $(".mydiv").text(total);
};


text:
Q: Can a question or an answer be deleted when it has a pending revision? When someone posts a bad question or answer, and it has earned some down votes,
then another user suggests an edit to it, and the post is pending:

*

*In this situation, can anyone start a delete vote on it?

*When a post is in delete voting, can anyone suggest an edit for it?

*When a suggest edit is pending, it is deleted (either via the consensus of three users or the direct action of a single moderator), then how a bout the pending version? Is it stay in suggest edit queue?

A: Yes. Delete votes can be cast on questions/answers that have pending suggested edits, and edits can be suggested on posts that have delete votes cast against them.
But of course, once a question or answer has been deleted (either via the consensus of three users or the direct action of a single moderator), you can no longer suggest edits to that post. Users who do not have full editing privileges (and thus must suggest edits for approval) also do not have sufficient privileges to view deleted questions/answers. 10k users can edit deleted posts, but since they have full editing privileges, they do not have to suggest their edits for approval.


text:
Q: Google+ sign-in: authenticating session users I have a doubt on integrating Google+ sign-in button in website.
My question is, how long is google access token obtained in signinCallback valid? Is this expiry flexible? Can I use it multiple times to pull out user information from google before expiry?
My another question is, how should I maintain session during sign-in? I have already thought of following ways,

*

*Using our own session: Get user authenticated from Google, On sign-in callback, set custom application cookies to validate further calls.
PROBLEM: If user signs out from other google service like gmail, my session is not terminated.

*Use google access token as session key: Authenticate google access token every time any PHP is requested.
PROBLEM: I have to make one extra HTTP request to google API to authenticate every PHP call. It will make my application bit slow.

*Leverage signinCallback in client side in every PHP: In signinCallback function, if user is invalid then deny him to access page.
PROBLEM: not 100% secure. User can modify my signinCallback in client-side and bypass google session validation. Then he can enjoy session even after signing out from google.

Is there another right and more secure way? Note that My website is simplistic HTML 4.0 website which performs almost every operation on server-side. There is almost no Javascript and user i/o is performed by forms. So server-side techniques are more appreciated :)

A:
how long is google access token obtained in signinCallback valid?

3600 seconds (1 hour)

Is this expiry flexible?

No. The access token will always expire after an hour. However, you can use a refresh token to replace the expired access token with a fresh token. To do this, you must request offline access on the sign-in button, send the one-time authorization code to your server, and exchange the auth code for an access token and refresh token.

Can I use it multiple times to pull out user information from google before expiry?

Unless the user disconnects from your app, you will be able to get fresh access tokens and make your API calls.

how should I maintain session during sign-in?

Use your own site's session to maintain user state for your site. It sounds like you already have sessions working on your site, if the session is present and contains whatever authorization keys are required for your site, the user should be authorized.

Use google access token as session key:

Please don't do this, you need to protect your user's access tokens. One thing you can do that is marginally safer is to pass the access token from the sign-in callback and then verify it corresponds to the session-cached user on your server.
A better way
Here's really what you should be doing. Use the sign-in button callback to determine that the user is not signed in and invalidate any sessions when they are not. Pass an ID token or one-time authorization code from the callback to your server to authenticate your user. The following code shows your average sign-in callback with the error conditions called out:
function onSignInCallback(authResult) {
  if (authResult['access_token']) {
    // User is signed in.
  } else if (authResult['error']) {
    // There was an error, which means the user is not signed in.
    // As an example, you can handle by writing to the console:
    console.log('not signed in, invalidating session');
  }
  console.log('authResult', authResult);
}

As you're aware, the authResult object contains members access_token and id_token. Sending these tokens to the OAuth.v2.verifytoken endpoint will check the token certificate is valid and the token has not expired. Verifytoken will also return to you a unique identifier for the user that you can use to verify that the user is not using the incorrect session.
The Google+ PHP Quickstart shows you how to send the authorization code to your server, accept and exchange the code, verify the token, and so on in PHP.
So, again, what you should be doing is:

*

*Pass an OAuth 2 credential to your server on client authentication

*Verify the credential on your server and disconnect the user session if it fails

*Rely on your site session once the user has been authenticated

*If you want to sign the user out whenever they sign out of Google, retrieve an OAuth 2 credential on every page load and pass the token (ID/access/one time code) on each request and verify it.

A: Now use either a listener or gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse() vs the whole process of requesting offline access on the sign-in button, sending the one-time authorization code to your server, and exchanging the auth code for an access token and refresh token.
See https://developers.google.com/identity/sign-in/web/listeners and https://developers.google.com/identity/sign-in/web/reference#googleuserreloadauthresponse.


text:
Q: Time interval - I want something to happen every x milliseconds (Arduino-not relevant) So I have a piece of code that do something every 12 seconds.
unsigned long currentMillis, previousMillis;

void loop()
{
unsigned long currentMillis = millis();
  time = currentMillis - previousMillis;

    if(time >= 0 && time <=40 ) //about this "40" I say below
      {
       do stuff;
      }

    if (time =="12 seconds"+/- 40  <- example)  previousMillis = currentMillis; //reset

}

So it goes 0,1,2,3,4....12.000,0,1,2,3...,12.000,0,1,2 and so on
(I know it isn't exactly 12.000 and not every number is consecutive but this is an example)
And my problem is:
In this interval 0-12.000 I want to do something else every x seconds (x not bigger that 12sec)
I printed in serial monitor currentMillis , time , previousMillis and it looks like this:
  currentMillis: 1   time: 1   previousMillis  0
  currentMillis: 5   time: 5   previousMillis  0
  currentMillis: 13  time: 13  previousMillis  0
  currentMillis: 21  time: 21  previousMillis  0
  currentMillis: 30  time: 30  previousMillis  0
  currentMillis: 38  time: 38  previousMillis  0
  currentMillis: 47  time: 47  previousMillis  0
  currentMillis: 56  time: 56  previousMillis  0

.....................................................
.....................................................
.....................................................
.....................................................

  currentMillis: 12536  time: 12536  previousMillis  0
  currentMillis: 12547  time: 12547  previousMillis  0
  currentMillis: 12556  time: 12556  previousMillis  0
  currentMillis: 12565  time: 12565  previousMillis  12565
  currentMillis: 12575  time: 10     previousMillis  12565
  currentMillis: 12585  time: 20     previousMillis  12565
  currentMillis: 12595  time: 30     previousMillis  12565
  currentMillis: 12605  time: 40     previousMillis  12565
  currentMillis: 12614  time: 49     previousMillis  12565
  currentMillis: 12624  time: 59     previousMillis  12565

//when I want to catch 12.000ms I use a little interval like +/- 40 in an IF statement just to be sure I catch 12sec time.

A: I understand you need a solution to execute something each 12 seconds and you think that 40 msec is a limit to stay into this time. I think the code below is a solution. It uses the Arduino environment functions setup() and loop().
I've used your idea of the 40 msec, but it's my opinion that it's better to avoid to use this kind of corrections, and it's better to use something that adjusts the time for the "next" loop (see comment in the code below).
static unsigned long timer=0,msec=0;

void setup() {
    msec=millis();
}

void loop(void)
{
    timer-=msec;
    msec=millis();
    timer+=msec;

    if (timer>=12000-40) {
        //Do something
        timer=0;

        //To solve the time oscillation you might use the code below
        //and you correct the if as if (timer>=12000)
        //timer=timer-12000;
    }
}

A: You can define some function to increase readability.
You store the next time to do your action.
You can do a function for each frequency. For example DELAY1 12000 and DELAY2 1234;
static void funct1(unsigned long now) {
  static unsigned long next;
  if (next > now)
    return;
  next = now + DELAY1;
/* here your code */
}
static void funct2(unsigned long now) {
  static unsigned long next;
  if (next > now)
    return;
  next = now + DELAY2;
/* here your code */
}

loop() {
  unsigned long now = millis();
  funct1(now);
  funct2(now);
}


text:
Q: start Selenium chrome driver minimized (or equivalent) I'm making a web scraping program, but to keep from being blocking by anti-scraping software I gotta keep the driver out of headless mode. sometimes I also need to restart the driver to clear the cookies, so whenever it opens back up I minimize it immediately, but it still gets in the way of whatever Im doing for about a second, and this program runs for hours so its incredibly annoying
Im thinking theres probably something I can add like driver.add_option("start in minimized") or driver.add_option("start in off screen") (equivalent to driver.set_window_position(-2000,0) but before the driver opens
does anyone know of an options setting I can add for this?
heres what my current code looks like, though this is more of a feature question than a bug fixing problem
import undetected_chromedriver.v2 as uc

def start_uc():
    '''opens a UC chrome driver with prefered settings'''
    options = uc.ChromeOptions()
    # just some options passing in to skip annoying popups
    options.add_argument('--no-first-run --no-service-autorun --password-store=basic')
    return uc.Chrome(options=options)

driver = start_uc()
driver.minimize_window()

for item in list:
    #scrape item info

    if blocked from page:
        driver.close()
        driver = start_uc()
        driver.minimize_window()

A: Unfortunately there is no such option / capability.
You can set driver to start maximized with
options.add_argument("start-maximized")

But there is no such option as options.add_argument("start-minimized").
As you mentioned, you can minimize the driver screen immediately after it's creating with driver.set_window_position(-2000,0) but, again, this will be applied only after the driver is opened.


text:
Q: iOS app crash on launch after installing from TestFlight I'm adding a new target to an existing iOS app.
I tested the new app with simulators and devices before uploading a new build to TestFlight and
asked some of my colleagues to test it through TestFlight.
The problem is that for 2 of my testers the app crashes as soon as they launch it and the rest have encountered no such issue.
Here is the part of the log related to the crash:
    Thread 3 Crashed:
0   libsystem_kernel.dylib          0x0000000191e0dec4 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000191d291d8 pthread_kill$VARIANT$mp + 136 (pthread.c:1458)
2   libsystem_c.dylib               0x0000000191c7d844 abort + 100 (abort.c:110)
3   libc++abi.dylib                 0x0000000191dd67d4 abort_message + 128 (abort_message.cpp:76)
4   libc++abi.dylib                 0x0000000191dd69c4 demangling_terminate_handler() + 296 (cxa_default_handlers.cpp:66)
5   libobjc.A.dylib                 0x0000000191d3e258 _objc_terminate() + 124 (objc-exception.mm:701)
6   libc++abi.dylib                 0x0000000191de3304 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7   libc++abi.dylib                 0x0000000191de329c std::terminate() + 44 (cxa_handlers.cpp:87)
8   libdispatch.dylib               0x0000000191ce3198 _dispatch_client_callout + 36 (object.m:498)
9   libdispatch.dylib               0x0000000191c8ba3c _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2484)
10  libdispatch.dylib               0x0000000191c8b190 _dispatch_async_redirect_invoke + 600 (queue.c:803)
11  libdispatch.dylib               0x0000000191c97fa4 _dispatch_root_queue_drain + 376 (inline_internal.h:2525)
12  libdispatch.dylib               0x0000000191c98770 _dispatch_worker_thread2 + 128 (queue.c:6628)
13  libsystem_pthread.dylib         0x0000000191d32b48 _pthread_wqthread + 212 (pthread.c:2364)
14  libsystem_pthread.dylib         0x0000000191d35760 start_wqthread + 8

Can someone please help me make sense of the log and explain to me what might be causing the crash?
UPDATE:
I ran the app in release mode on two devices and no crash or error found.
I added some more info from the crash log.
Date/Time:           2020-05-05 14:01:31.4587 -0500
Launch Time:         2020-05-05 14:01:30.4977 -0500
OS Version:          iPhone OS 13.3.1 (17D50)
Release Type:        User
Baseband Version:    4.01.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  3

Last Exception Backtrace:
0   CoreFoundation                  0x192016a48 __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib                 0x191d3dfa4 objc_exception_throw + 56 (objc-exception.mm:565)
2   CoreFoundation                  0x19206c360 _CFThrowFormattedException + 112 (CFObject.m:1990)
3   CoreFoundation                  0x1920756b4 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 48
4   CoreFoundation                  0x191f0373c -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 240 (NSPlaceholderDictionary.m:70)
5   CoreFoundation                  0x191ef55d0 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 64 (NSDictionary.m:604)
6   AFNetworking                    0x104fdbe04 -[AFURLSessionManager URLSession:task:didReceiveChallenge:completionHandler:] + 1160 (AFURLSessionManager.m:177)
7   CFNetwork                       0x19540d90c __68-[NSURLSession delegate_task:didReceiveChallenge:completionHandler:]_block_invoke + 136 (Session.mm:598)
8   Foundation                      0x1923db3a0 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16 (NSOperation.m:1541)
9   Foundation                      0x1922e50c8 -[NSBlockOperation main] + 100 (NSOperation.m:1560)
10  Foundation                      0x1923dd628 __NSOPERATION_IS_INVOKING_MAIN__ + 20 (NSOperation.m:2184)
11  Foundation                      0x1922e4d60 -[NSOperation start] + 732 (NSOperation.m:2201)
12  Foundation                      0x1923de020 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 20 (NSOperation.m:2215)
13  Foundation                      0x1923ddaec __NSOQSchedule_f + 180 (NSOperation.m:2226)
14  libdispatch.dylib               0x191c957dc _dispatch_block_async_invoke2 + 104 (queue.c:525)
15  libdispatch.dylib               0x191ce3184 _dispatch_client_callout + 16 (object.m:495)
16  libdispatch.dylib               0x191c8ba3c _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2484)
17  libdispatch.dylib               0x191c8b190 _dispatch_async_redirect_invoke + 600 (queue.c:803)
18  libdispatch.dylib               0x191c97fa4 _dispatch_root_queue_drain + 376 (inline_internal.h:2525)
19  libdispatch.dylib               0x191c98770 _dispatch_worker_thread2 + 128 (queue.c:6628)
20  libsystem_pthread.dylib         0x191d32b48 _pthread_wqthread + 212 (pthread.c:2364)
21  libsystem_pthread.dylib         0x191d35760 start_wqthread + 8

Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib          0x0000000191dec634 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000191debaa0 mach_msg + 72 (mach_msg.c:103)
2   CoreFoundation                  0x0000000191f94288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3   CoreFoundation                  0x0000000191f8f3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4   CoreFoundation                  0x0000000191f8eadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5   GraphicsServices                0x000000019bf2f328 GSEventRunModal + 104 (GSEvent.c:2246)
6   UIKitCore                       0x000000019609c63c UIApplicationMain + 1936 (UIApplication.m:4773)
7   F********                       0x0000000104f4b6d4 main + 76 (main.m:14)
8   libdyld.dylib                   0x0000000191e18360 start + 4

Thread 1:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 2:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 3 name:
Thread 3 Crashed:
0   libsystem_kernel.dylib          0x0000000191e0dec4 __pthread_kill + 8
1   libsystem_pthread.dylib         0x0000000191d291d8 pthread_kill$VARIANT$mp + 136 (pthread.c:1458)
2   libsystem_c.dylib               0x0000000191c7d844 abort + 100 (abort.c:110)
3   libc++abi.dylib                 0x0000000191dd67d4 abort_message + 128 (abort_message.cpp:76)
4   libc++abi.dylib                 0x0000000191dd69c4 demangling_terminate_handler() + 296 (cxa_default_handlers.cpp:66)
5   libobjc.A.dylib                 0x0000000191d3e258 _objc_terminate() + 124 (objc-exception.mm:701)
6   libc++abi.dylib                 0x0000000191de3304 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7   libc++abi.dylib                 0x0000000191de329c std::terminate() + 44 (cxa_handlers.cpp:87)
8   libdispatch.dylib               0x0000000191ce3198 _dispatch_client_callout + 36 (object.m:498)
9   libdispatch.dylib               0x0000000191c8ba3c _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2484)
10  libdispatch.dylib               0x0000000191c8b190 _dispatch_async_redirect_invoke + 600 (queue.c:803)
11  libdispatch.dylib               0x0000000191c97fa4 _dispatch_root_queue_drain + 376 (inline_internal.h:2525)
12  libdispatch.dylib               0x0000000191c98770 _dispatch_worker_thread2 + 128 (queue.c:6628)
13  libsystem_pthread.dylib         0x0000000191d32b48 _pthread_wqthread + 212 (pthread.c:2364)
14  libsystem_pthread.dylib         0x0000000191d35760 start_wqthread + 8

Thread 4:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 5 name:
Thread 5:
0   libsystem_kernel.dylib          0x0000000191dec634 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000191debaa0 mach_msg + 72 (mach_msg.c:103)
2   CoreFoundation                  0x0000000191f94288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3   CoreFoundation                  0x0000000191f8f3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4   CoreFoundation                  0x0000000191f8eadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5   Foundation                      0x00000001922ce784 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 (NSRunLoop.m:374)
6   Foundation                      0x00000001922ce664 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:421)
7   UIKitCore                       0x0000000196134e80 -[UIEventFetcher threadMain] + 152 (UIEventFetcher.m:637)
8   Foundation                      0x00000001923ff09c __NSThread__start__ + 848 (NSThread.m:724)
9   libsystem_pthread.dylib         0x0000000191d31d8c _pthread_start + 156 (pthread.c:896)
10  libsystem_pthread.dylib         0x0000000191d3576c thread_start + 8

Thread 6:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 7:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 8:
0   libsystem_pthread.dylib         0x0000000191d35758 start_wqthread + 0 (pthread_dependency.c:69)

Thread 3 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000191de65d8   x5: 0x000000016b06a960   x6: 0x000000000000006e   x7: 0xffffffffffffffec
    x8: 0x000000016b06b000   x9: 0xd728e66b90d236e5  x10: 0x0000000191d29150  x11: 0x000000000000000b
   x12: 0x00000001ca117080  x13: 0x0000000000000001  x14: 0x0000000000000010  x15: 0x0000000000000011
   x16: 0x0000000000000148  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000002603  x21: 0x000000016b06a960  x22: 0x000000016b06b0e0  x23: 0x000000016b06b0e0
   x24: 0x0000000000000000  x25: 0x0000000000000134  x26: 0x00000001daa99380  x27: 0x000000016b06b180
   x28: 0x00000000000005ff   fp: 0x000000016b06a8c0   lr: 0x0000000191d291d8
    sp: 0x000000016b06a8a0   pc: 0x0000000191e0dec4 cpsr: 0x40000000
   esr: 0x56000080  Address size fault


text:
Q: Проблемы с версткой сайдбара Верстаю макет:

Главная проблема в том, что он должен быть адаптивный, и я не пойму, как сделать, что бы расстояние уменьшалось, если уменьшается высота окна браузера.Может кто то помочь советом?
Попытка №2:
Ссылки и лого это один блок и он прижат к верху, контакты это еще один блок и он будет прижат к низу. Как для остальных блоков сделать: что бы они занимали все оставшиеся пространство, а их содержимое было по центру.

A: Тут можно поступить также как и с шириной - через медиа запросы, например:
@media(min-height:401px){
  div{
    color:red;
  }
}
@media(max-height:400px){
  div{
    color:blue;
  }
}

При высоте больше 400px цвет шрифта красный, при высоте меньше - синий.

A: Вариант 1: Логотип и Футер на position:fixed. Остальное скролится. Что является в общем предпочтительным. Так как что вы сможете сделать на телефоне в положении горизотнальном? Клиент ничего не увидит.
Вариант 2: использовать vh для разметки высоты.
#logo{height:50vh}
#footer{height:100vh;}
#middle{height:calc(100vh - 150vh);}

И дальше уже таким же образом для детей #middle стили писать. Только как выше написал, это нерешит проблему с горизонтальным положением телефона.

A: Если нужно при изменении положения телефона
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css">

Тут подробнее https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Managing_screen_orientation

A:

body,
html {
  height: 100%;
}

.wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
}

.another {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
  -ms-flex: 1 0 auto;
  flex: 1 0 auto;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.header,
.footer {
  height: 100px;
}

.footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
}

Лого + меню

Остальное

Контакты + копирайт

http://codepen.io/deadrime/pen/EWweYK/ - вот мой вариант через flexbox.
Подробнее о том, как его использовать можно почитать тут - http://frontender.info/a-guide-to-flexbox/