text:
Q: Error :No CMAKE_Fortran_COMPILER could be found. Visual studio 2017 enterprise instead of MinGW I have a project,configured and Generated in cmake-gui with mingw succesfully .
but when I want to configure or build it (cmake -G "Visual Studio 15 2017"
) with Visual Studio 2017 Enterprise and Intel Parallel Studio 2017 (Visual Fortran Compiler) I get this errors:
The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:17 (PROJECT):
  No CMAKE_Fortran_COMPILER could be found.

so what should I do?
EDIT:
When I use cmake -G "Visual Studio 15 2017" I get:
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:17 (PROJECT):
  No CMAKE_Fortran_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "F:/FreshElmer - Copy (3)/elmerfem/CMakeFiles/CMakeOutput.log".
See also "F:/FreshElmer - Copy (3)/elmerfem/CMakeFiles/CMakeError.log".

CMakeLists.txt:
#
# CMake configuration script for Elmer
#
# Authors:
#  Sami Ilvonen, CSC - IT Center for Science, Ltd.
#  Phil Weir, NUMA Engineering Services, Ltd.
#  Mikko Byckling, CSC - IT Center for Science Ltd.
#  Juhani Kataja, CSC - IT Center for Science Ltd.
#
# First public beta release 11th of October, 2013
#

IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Build type (Release, Debug, RelWithDebugInfo, MinSizeRel)")
ENDIF()

PROJECT(Elmer Fortran C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)

IF(APPLE)
  SET(CMAKE_MACOSX_RPATH 1)
ENDIF()

SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules" ${CMAKE_ROOT}/Modules)

# Defaults to cache variables
SET(WITH_MPI TRUE CACHE BOOL "Use MPI parallelization")
SET(MPI_TEST_MAXPROC 8 CACHE STRING "Maximum number of tasks used in parallel tests")
SET(MPI_TEST_MINPROC 1 CACHE STRING "Minimum number of tasks used in parallel tests")
SET(WITH_OpenMP FALSE CACHE BOOL "Use OpenMP thread parallelization")
SET(WITH_MKL FALSE CACHE BOOL "Use Intel Math Kernel library")
SET(WITH_Mumps FALSE CACHE BOOL "Use Mumps sparse direct solver")
SET(WITH_Hypre FALSE CACHE BOOL "Use Hypre linear algebra library")
SET(WITH_ELMERGUI FALSE CACHE BOOL "Include ElmerGUI")
SET(WITH_ElmerIce FALSE CACHE BOOL "Include ElmerIce")
SET(WITH_ELMERGUITESTER FALSE CACHE BOOL "Include ElmerGUI tester")
SET(WITH_ELMERGUILOGGER FALSE CACHE BOOL "Include ElmerGUI logger")
SET(ELMER_INSTALL_LIB_DIR "lib/elmersolver" CACHE PATH "Location of elmer shared libraries relative to prefix.")
SET(WITH_Trilinos FALSE CACHE BOOL "Use Trilinos")
SET(WITH_FETI4I FALSE CACHE BOOL "Use FETI4I")
SET(WITH_ELMERPOST FALSE CACHE BOOL "Include ElmerPost (DEPRECATED)")
SET(WITH_CONTRIB FALSE CACHE BOOL "Include contributed solvers")

MARK_AS_ADVANCED(WITH_ELMERPOST)

if("${CMAKE_VERSION}" VERSION_GREATER 2.8.12)
  CMAKE_POLICY(SET CMP0022 OLD)
ENDIF()

MARK_AS_ADVANCED(ELMER_INSTALL_LIB_DIR)

ENABLE_TESTING()

SET(ELMER_FEM_MAJOR_VERSION 8)
SET(ELMER_FEM_MINOR_VERSION 3)
SET(ELMER_FEM_VERSION
  ${ELMER_FEM_MAJOR_VERSION}.${ELMER_FEM_MINOR_VERSION})

IF(NOT(ELMER_FEM_REVISION))
  SET(RESET_ELMER_REVISION TRUE CACHE BOOL "")
  MARK_AS_ADVANCED(RESET_ELMER_REVISION)
ENDIF()

IF(RESET_ELMER_REVISION)
  execute_process(
    COMMAND "git" "--no-pager" "log" "-1" "--pretty=format:%h"
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    OUTPUT_VARIABLE ELMER_FEM_REVISION_
    RESULT_VARIABLE RUN_RETURN_VALUE)
  IF(RUN_RETURN_VALUE EQUAL 0)
    SET(ELMER_FEM_REVISION ${ELMER_FEM_REVISION_} CACHE STRING "" FORCE)
    MARK_AS_ADVANCED(ELMER_FEM_REVISION)
  ENDIF()
ENDIF()

SET(VERSION ${ELMER_FEM_VERSION})
SET(REVISION ${ELMER_FEM_REVISION})
SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
STRING(TIMESTAMP ELMER_FEM_COMPILATIONDATE "%Y-%m-%d")
SET(COMPILATIONDATE ${ELMER_FEM_COMPILATIONDATE})

# Check that the gfortran version is >= 4.8
IF(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
  INCLUDE(testGFortranVersion)
  IF(NOT CMAKE_Fortran_COMPILER_GNU_VERSION_OK)
    MESSAGE(FATAL_ERROR "GNU Fortran version is too old, should be at least 4.8")
  ENDIF()
ENDIF()

IF(WITH_OpenMP)
  # Advanced properties
  MARK_AS_ADVANCED(
    OpenMP_C_FLAGS
    OpenMP_Fortran_FLAGS
    OpenMP_CXX_FLAGS
    )

  FIND_PACKAGE(OpenMP REQUIRED)
  # Add OpenMP flags to compilation flags
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
ENDIF()

IF(WITH_MPI)
  # Advanced properties
  MARK_AS_ADVANCED(
    MPI_EXTRA_LIBRARY
    MPI_LIBRARY
    )

  FIND_PACKAGE(MPI REQUIRED)
  # Workaround if MPI is found but MPI_FOUND is not set (windows+msmpi+findmpi)
  SET(MPI_FOUND TRUE CACHE BOOL "")
  MARK_AS_ADVANCED(MPI_FOUND)
  INCLUDE_DIRECTORIES(${MPI_Fortran_INCLUDE_PATH})
  # MPI libraries may be needed for testing
  SET(CMAKE_C_REQUIRED_LIBRARIES ${MPI_C_LIBRARIES})
  SET(CMAKE_CXX_REQUIRED_LIBRARIES ${MPI_CXX_LIBRARIES})
  SET(CMAKE_Fortran_REQUIRED_LIBRARIES ${MPI_Fortran_LIBRARIES})
ENDIF(WITH_MPI)

IF(WITH_MKL)
  # Find MKL
  FIND_PACKAGE(MKL REQUIRED)
  SET(HAVE_MKL TRUE)
  MARK_AS_ADVANCED(HAVE_MKL)
  # Set BLAS and LAPACK to point to MKL
  SET(BLAS_LIBRARIES ${MKL_BLAS_LIBRARIES} CACHE FILEPATH "")
  SET(LAPACK_LIBRARIES ${MKL_LAPACK_LIBRARIES} CACHE FILEPATH "")
  IF(MPI_FOUND)
    SET(SCALAPACK_LIBRARIES ${MKL_SCALAPACK_LIBRARIES})
    # Versions >11.1 of MKL include Cluster PARDISO direct solver
    IF(WITH_OpenMP AND MKL_CPARDISO_FOUND)
      SET(HAVE_CPARDISO TRUE)
      MARK_AS_ADVANCED(HAVE_CPARDISO)
    ENDIF()
  ENDIF()
  INCLUDE_DIRECTORIES(${MKL_INCLUDE_DIR})
  SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MKL_Fortran_FLAGS}")
ENDIF()

# MARK_AS_ADVANCED(WITH_Trilinos)
IF(WITH_Trilinos)
  FIND_PACKAGE(ML REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/ML ${TRILINOS_PATH})
  FIND_PACKAGE(Trilinos REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/Trilinos ${TRILINOS_PATH})
  FIND_PACKAGE(Belos REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/Belos ${TRILINOS_PATH})
  IF(ML_DIR)
    ADD_DEFINITIONS(-DHAVE_TRILINOS)
  ENDIF()
ENDIF()

# MPI and LAPACK
FIND_PACKAGE(BLAS REQUIRED)
FIND_PACKAGE(LAPACK REQUIRED)
# BLAS and LAPACK libraries may be needed for testing
SET(CMAKE_REQUIRED_LIBRARIES
  ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})

IF(MPI_FOUND)
  # Mumps
  IF(WITH_Mumps)
    FIND_PACKAGE(Mumps REQUIRED)
  ENDIF()
  # Hypre
  IF(WITH_Hypre)
    FIND_PACKAGE(Hypre REQUIRED OPTIONAL_COMPONENTS Euclid parcsr_ls ParaSails IJ_mv QUIET)
  ENDIF()

  # Permon
  IF(WITH_FETI4I)
    FIND_PACKAGE(FETI4I REQUIRED)
  ENDIF()
ENDIF()

IF(Mumps_FOUND)
  SET(HAVE_MUMPS TRUE)
  MARK_AS_ADVANCED(HAVE_MUMPS)
  # LINK_DIRECTORIES(${MUMPS_LIBRARIES})
ENDIF()

IF(Hypre_FOUND)
  SET(HAVE_HYPRE TRUE)
  MARK_AS_ADVANCED(HAVE_HYPRE)
  INCLUDE_DIRECTORIES(${Hypre_INCLUDE_DIR})
  # LINK_DIRECTORIES(${Hypre_LIBRARIES})
ENDIF()

IF(FETI4I_FOUND)
  SET(HAVE_FETI4I TRUE)
  MARK_AS_ADVANCED(HAVE_FETI4I)
  ADD_DEFINITIONS(-DHAVE_FETI4I)
ENDIF()

# Check if Fortran compiler supports procedure pointer
INCLUDE(testProcedurePointer)
IF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_PROCEDUREPOINTER)
  MESSAGE(FATAL_ERROR "Fortran compiler does not seem to support the PROCEDURE statement.")
ENDIF()

# Check if Fortran compiler supports contiguous keyword
INCLUDE(testContiguous)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_CONTIGUOUS)
  ADD_DEFINITIONS(-DCONTIG=,CONTIGUOUS)
ELSE()
  ADD_DEFINITIONS(-DCONTIG=)
ENDIF()

# Check if this is mingw toolchain.
IF(MINGW)
  ADD_DEFINITIONS(-DMINGW32)
ENDIF()

IF(WIN32)
  ADD_DEFINITIONS(-DWIN32)
ENDIF()

# Check if Fortran compiler supports execute_command_line
INCLUDE(testExecutecommand)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_EXECUTECOMMANDLINE)
  ADD_DEFINITIONS(-DHAVE_EXECUTECOMMANDLINE)
ENDIF()

ADD_DEFINITIONS(-DUSE_ISO_C_BINDINGS)
SET(FC_STDCALLBULL " ")
SET(ELMER_LINKTYP 1)
#SET(FC_FUNC FC_GLOBAL)
#SET(FC_FUNC_ FC_GLOBAL_)

# Add support for arpack
ADD_DEFINITIONS(-DUSE_ARPACK)

#INCLUDE(FortranCInterface)
#FortranCInterface_HEADER(FCMangle.h MACRO_NAMESPACE "FC_")
#FortranCInterface_VERIFY(CXX)

# Set up rpaths to point ELMER_INSTALL_LIB_DIR
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  SET(ELMERSOLVER_RPATH_STRING "\$ORIGIN/../${ELMER_INSTALL_LIB_DIR}")
  SET(ELMERLIB_RPATH_STRING "\$ORIGIN/")
ELSEIF(APPLE)
  SET(ELMERSOLVER_RPATH_STRING "@loader_path/../${ELMER_INSTALL_LIB_DIR}")
  SET(ELMERLIB_RPATH_STRING "@loader_path/")
ENDIF()

# Uncomment these to use rpath with linked libraries
# SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# Remove system directories (from the CMake guide)
# LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
# IF("${isSystemDir}" STREQUAL "-1")
#    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# ENDIF("${isSystemDir}" STREQUAL "-1")

ADD_SUBDIRECTORY(matc)

IF(WITH_ElmerIce)
  MESSAGE(STATUS "Adding optional package ElmerIce")
  ADD_SUBDIRECTORY(elmerice)
ENDIF(WITH_ElmerIce)

ADD_SUBDIRECTORY(umfpack)
ADD_SUBDIRECTORY(fhutiter)
ADD_SUBDIRECTORY(meshgen2d)
ADD_SUBDIRECTORY(fem)
ADD_SUBDIRECTORY(mathlibs)
ADD_SUBDIRECTORY(elmergrid)
ADD_SUBDIRECTORY(license_texts)

IF(WITH_ELMERGUI)
    MESSAGE(STATUS "  Building ElmerGUI")
    MESSAGE(STATUS "------------------------------------------------")
    ADD_SUBDIRECTORY(ElmerGUI)
ENDIF(WITH_ELMERGUI)

IF(WITH_ELMERGUITESTER)
  ADD_SUBDIRECTORY(ElmerGUItester)
ENDIF(WITH_ELMERGUITESTER)

IF(WITH_ELMERGUILOGGER)
  ADD_SUBDIRECTORY(ElmerGUIlogger)
ENDIF(WITH_ELMERGUILOGGER)

#INCLUDE(FeatureSummary)
#FEATURE_SUMMARY(WHAT ENABLED_FEATURES
#  INCLUDE_QUIET_PACKAGES
#  DESCRIPTION "Enabled Features:"
#  VAR enabledFeaturesText)
#MESSAGE(STATUS "${enabledFeaturesText}")

#
IF(CMAKE_BUILD_TYPE)
  STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPCASE)
  MARK_AS_ADVANCED(CMAKE_BUILD_TYPE_UPCASE)
ENDIF(CMAKE_BUILD_TYPE)

MESSAGE(STATUS "------------------------------------------------")
MESSAGE(STATUS "  BLAS library:   " "${BLAS_LIBRARIES}")
MESSAGE(STATUS "  LAPACK library: " "${LAPACK_LIBRARIES}")
MESSAGE(STATUS "------------------------------------------------")
MESSAGE(STATUS "  Fortran compiler:        " "${CMAKE_Fortran_COMPILER}")
MESSAGE(STATUS "  Fortran flags:           " "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE_UPCASE}}")
MESSAGE(STATUS "------------------------------------------------")
MESSAGE(STATUS "  C compiler:              " "${CMAKE_C_COMPILER}")
MESSAGE(STATUS "  C flags:                 " "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPCASE}}")
MESSAGE(STATUS "------------------------------------------------")
MESSAGE(STATUS "  CXX compiler:            " "${CMAKE_CXX_COMPILER}")
MESSAGE(STATUS "  CXX flags:               " "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPCASE}}")
MESSAGE(STATUS "------------------------------------------------")
IF(WITH_MPI)
  MESSAGE(STATUS "  MPI Fortran:             " "${MPI_Fortran_FOUND}")
  MESSAGE(STATUS "  MPI Fortran compiler:    " "${MPI_Fortran_COMPILER}")
  MESSAGE(STATUS "  MPI Fortran flags:       " "${MPI_Fortran_COMPILE_FLAGS}")
  MESSAGE(STATUS "  MPI Fortran include dir: " "${MPI_Fortran_INCLUDE_PATH}")
  MESSAGE(STATUS "  MPI Fortran libraries:   " "${MPI_Fortran_LIBRARIES}")
  MESSAGE(STATUS "  MPI Fortran link flags:  " "${MPI_Fortran_LINK_FLAGS}")
  MESSAGE(STATUS "------------------------------------------------")
  MESSAGE(STATUS "  MPI C:             " "${MPI_C_FOUND}")
  MESSAGE(STATUS "  MPI C compiler:    " "${MPI_C_COMPILER}")
  MESSAGE(STATUS "  MPI C flags:       " "${MPI_C_COMPILE_FLAGS}")
  MESSAGE(STATUS "  MPI C include dir: " "${MPI_C_INCLUDE_PATH}")
  MESSAGE(STATUS "  MPI C libraries:   " "${MPI_C_LIBRARIES}")
  MESSAGE(STATUS "  MPI C flags:       " "${MPI_C_LINK_FLAGS}")
  MESSAGE(STATUS "------------------------------------------------")
  IF(WITH_Mumps)
    MESSAGE(STATUS "  Mumps:             " "${Mumps_FOUND}")
    MESSAGE(STATUS "  Mumps include:     " "${Mumps_INCLUDE_DIR}")
    MESSAGE(STATUS "  Mumps libraries:   " "${Mumps_LIBRARIES}")
    MESSAGE(STATUS "------------------------------------------------")
  ENDIF(WITH_Mumps)
  IF(WITH_Hypre)
    MESSAGE(STATUS "  Hypre:             " "${Hypre_FOUND}")
    MESSAGE(STATUS "  Hypre include:     " "${Hypre_INCLUDE_DIR}")
    MESSAGE(STATUS "  Hypre libraries:   " "${Hypre_LIBRARIES}")
    MESSAGE(STATUS "------------------------------------------------")
  ENDIF(WITH_Hypre)
ENDIF(WITH_MPI)

IF(WITH_Trilinos)
  MESSAGE(STATUS "  Trilinos:           " "${Trilinos_FOUND}")
  MESSAGE(STATUS "  Trilinos_DIR:       " "${Trilinos_DIR}")
  MESSAGE(STATUS "  Trilinos_LIBRARIES: " "${Trilinos_LIBRARIES}")
  MESSAGE(STATUS "------------------------------------------------")
ENDIF(WITH_Trilinos)

IF(WITH_CONTRIB)
  MESSAGE(STATUS "  Building contributed solvers")
  MESSAGE(STATUS "------------------------------------------------")
ENDIF(WITH_CONTRIB)

IF(WITH_ELMERGUITESTER)
  MESSAGE(STATUS "  Building ElmerGUI tester")
  MESSAGE(STATUS "------------------------------------------------")
ENDIF(WITH_ELMERGUITESTER)

IF(WITH_ELMERGUILOGGER)
  MESSAGE(STATUS "  Building ElmerGUI logger")
  MESSAGE(STATUS "------------------------------------------------")
ENDIF(WITH_ELMERGUILOGGER)

IF(WITH_ELMERPOST)
  MESSAGE(WARNING "  Building ElmerPost")
  MESSAGE(STATUS "------------------------------------------------")
  ADD_SUBDIRECTORY(post)
ENDIF(WITH_ELMERPOST)

# Packaging
if(NOT BYPASS_CPACK)
  INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cpack/ElmerCPack.cmake)
endif(NOT BYPASS_CPACK)

CMakeError.log:
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:

The output was:
1

Microsoft Visual Studio 2017 Version 15.0.26730.10.
Copyright (C) Microsoft Corp. All rights reserved.

The system can not find the file specified.
The operation could not be completed

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:

/Build      Builds the solution or project with the specified solution
        configuration. For example "Debug". If multiple platforms
        are possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
/Clean      Deletes build outputs.
/Command    Starts the IDE and executes the command.
/Deploy     Builds and then deploys the specified build configuration.
/Edit       Opens the specified files in a running instance of this
        application. If there are no running instances, it will
        start a new instance with a simplified window layout.
/LCID       Sets the default language in the IDE for the UI.
/Log        Logs IDE activity to the specified file for troubleshooting.
/NoVSIP     Disables the VSIP developer's license key for VSIP testing.
/Out        Appends the build log to a specified file.
/Project    Specifies the project to build, clean, or deploy.
        Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig  Overrides the project configuration specified in the solution
        configuration. For example "Debug". If multiple platforms are
        possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
        Must be used with /Project.
/Rebuild    Cleans and then builds the solution or project with the
        specified configuration.
/ResetSettings  Restores the IDE's default settings, optionally resets to
        the specified VSSettings file.
/ResetSkipPkgs  Clears all SkipLoading tags added to VSPackages.
/Run        Compiles and runs the specified solution.
/RunExit    Compiles and runs the specified solution then closes the IDE.
/SafeMode   Launches the IDE in safe mode loading minimal windows.
/Upgrade    Upgrades the project or the solution and all projects in it.
        A backup of these files will be created as appropriate.  Please
        see Help on 'Visual Studio Conversion Wizard' for more
        information on the backup process.

Product-specific switches:

/debugexe   Open the specified executable to be debugged. The remainder of
        the command line is passed to this executable as its arguments.
/diff       Compares two files.  Takes four parameters:
        SourceFile, TargetFile, SourceDisplayName(optional),
        TargetDisplayName(optional)
/TfsLink    Opens Team Explorer and launches a viewer for the
        provided artifact URI if one is registered.
/useenv     Use PATH, INCLUDE, LIBPATH, and LIB environment variables
        instead of IDE paths for VC++ builds.

To attach the debugger from the command line, use:
    VsJITDebugger.exe -p <pid>

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:

The output was:
1

Microsoft Visual Studio 2017 Version 15.0.26730.10.
Copyright (C) Microsoft Corp. All rights reserved.

The system can not find the file specified.
The operation could not be completed

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:

/Build      Builds the solution or project with the specified solution
        configuration. For example "Debug". If multiple platforms
        are possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
/Clean      Deletes build outputs.
/Command    Starts the IDE and executes the command.
/Deploy     Builds and then deploys the specified build configuration.
/Edit       Opens the specified files in a running instance of this
        application. If there are no running instances, it will
        start a new instance with a simplified window layout.
/LCID       Sets the default language in the IDE for the UI.
/Log        Logs IDE activity to the specified file for troubleshooting.
/NoVSIP     Disables the VSIP developer's license key for VSIP testing.
/Out        Appends the build log to a specified file.
/Project    Specifies the project to build, clean, or deploy.
        Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig  Overrides the project configuration specified in the solution
        configuration. For example "Debug". If multiple platforms are
        possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
        Must be used with /Project.
/Rebuild    Cleans and then builds the solution or project with the
        specified configuration.
/ResetSettings  Restores the IDE's default settings, optionally resets to
        the specified VSSettings file.
/ResetSkipPkgs  Clears all SkipLoading tags added to VSPackages.
/Run        Compiles and runs the specified solution.
/RunExit    Compiles and runs the specified solution then closes the IDE.
/SafeMode   Launches the IDE in safe mode loading minimal windows.
/Upgrade    Upgrades the project or the solution and all projects in it.
        A backup of these files will be created as appropriate.  Please
        see Help on 'Visual Studio Conversion Wizard' for more
        information on the backup process.

Product-specific switches:

/debugexe   Open the specified executable to be debugged. The remainder of
        the command line is passed to this executable as its arguments.
/diff       Compares two files.  Takes four parameters:
        SourceFile, TargetFile, SourceDisplayName(optional),
        TargetDisplayName(optional)
/TfsLink    Opens Team Explorer and launches a viewer for the
        provided artifact URI if one is registered.
/useenv     Use PATH, INCLUDE, LIBPATH, and LIB environment variables
        instead of IDE paths for VC++ builds.

To attach the debugger from the command line, use:
    VsJITDebugger.exe -p <pid>

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:

The output was:
1

Microsoft Visual Studio 2017 Version 15.0.26730.10.
Copyright (C) Microsoft Corp. All rights reserved.

The system can not find the file specified.
The operation could not be completed

Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:

/Build      Builds the solution or project with the specified solution
        configuration. For example "Debug". If multiple platforms
        are possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
/Clean      Deletes build outputs.
/Command    Starts the IDE and executes the command.
/Deploy     Builds and then deploys the specified build configuration.
/Edit       Opens the specified files in a running instance of this
        application. If there are no running instances, it will
        start a new instance with a simplified window layout.
/LCID       Sets the default language in the IDE for the UI.
/Log        Logs IDE activity to the specified file for troubleshooting.
/NoVSIP     Disables the VSIP developer's license key for VSIP testing.
/Out        Appends the build log to a specified file.
/Project    Specifies the project to build, clean, or deploy.
        Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig  Overrides the project configuration specified in the solution
        configuration. For example "Debug". If multiple platforms are
        possible, the configuration name must be enclosed in quotes
        and contain platform name. For example: "Debug|Win32".
        Must be used with /Project.
/Rebuild    Cleans and then builds the solution or project with the
        specified configuration.
/ResetSettings  Restores the IDE's default settings, optionally resets to
        the specified VSSettings file.
/ResetSkipPkgs  Clears all SkipLoading tags added to VSPackages.
/Run        Compiles and runs the specified solution.
/RunExit    Compiles and runs the specified solution then closes the IDE.
/SafeMode   Launches the IDE in safe mode loading minimal windows.
/Upgrade    Upgrades the project or the solution and all projects in it.
        A backup of these files will be created as appropriate.  Please
        see Help on 'Visual Studio Conversion Wizard' for more
        information on the backup process.

Product-specific switches:

/debugexe   Open the specified executable to be debugged. The remainder of
        the command line is passed to this executable as its arguments.
/diff       Compares two files.  Takes four parameters:
        SourceFile, TargetFile, SourceDisplayName(optional),
        TargetDisplayName(optional)
/TfsLink    Opens Team Explorer and launches a viewer for the
        provided artifact URI if one is registered.
/useenv     Use PATH, INCLUDE, LIBPATH, and LIB environment variables
        instead of IDE paths for VC++ builds.

To attach the debugger from the command line, use:
    VsJITDebugger.exe -p <pid>

Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" failed.
Compiler:
Build flags:
Id flags:

The output was:
1

Microsoft Visual Studio 2017 Version 15.0.26730.10.
Copyright (C) Microsoft Corp. All rights reserved.
...

...


text:
Q: How do I render a shadow? How do I render a shadow on a View? I've tried many combinations of shadowColor, shadowOffset, shadowOpacity, and shadowRadius, which seem to do nothing. I am sure the style is applied correctly, since other attributes I've set work.

A:   panel: {
    // ios
    backgroundColor: '#03A9F4',
    alignItems: 'center',
    shadowOffset: {width: 0, height: 13},
    shadowOpacity: 0.3,
    shadowRadius: 6,

    // android (Android +5.0)
    elevation: 3,
  }

or you can use react-native-shadow for android

A: All About margins
this works in Android, but did not test it in ios
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { View, Platform } from 'react-native'
import EStyleSheet from 'react-native-extended-stylesheet'

const styles = EStyleSheet.create({
    wrapper: {
        margin: '-1.4rem'
    },
    shadow: {
        padding: '1.4rem',
        margin: '1.4rem',
        borderRadius: 4,
        borderWidth: 0,
        borderColor: 'transparent',
        ...Platform.select({
            ios: {
                shadowColor: 'rgba(0,0,0, 0.4)',
                shadowOffset: { height: 1, width: 1 },
                shadowOpacity: 0.7,
                shadowRadius: '1.4rem'
            },
            android: {
                elevation: '1.4rem'
            }
        })
    },
    container: {
        padding: 10,
        margin: '-1.4rem',
        borderRadius: 4,
        borderWidth: 0,
        borderColor: '#Fff',
        backgroundColor: '#fff'
    }
})

class ShadowWrapper extends PureComponent {
    static propTypes = {
        children: PropTypes.oneOfType([
            PropTypes.element,
            PropTypes.node,
            PropTypes.arrayOf(PropTypes.element)
        ]).isRequired
    }

    render () {
        return (
            View style={styles.wrapper}
                View style={styles.shadow}
                    View style={styles.container}
                        {this.props.children}
                    View
                View
            View
        )
    }
}

export default ShadowWrapper

A: by styled component
const StyledView = styled.View`
      border-width: 1;
      border-radius: 2;
      border-color: #ddd;
      border-bottom-width: 0;
      shadow-color: #000;
      shadow-offset: {width: 0, height: 2};
      shadow-opacity: 0.8;
      shadow-radius: 2;
      elevation: 1;
`

or by styles
const styles = StyleSheet.create({
  containerStyle: {
    borderWidth: 1,
    borderRadius: 2,
    borderColor: '#ddd',
    borderBottomWidth: 0,
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 2 },
    shadowOpacity: 0.8,
    shadowRadius: 2,
    elevation: 1,
    marginLeft: 5,
    marginRight: 5,
    marginTop: 10,
  }
})

A: Use elevation to implement shadows on RN Android. Added elevation prop #27
<View elevation={5}>
 </View>

A: It appears to be a bug in React native that shadowOpacity is set to type CGFloat instead of float according to CALayer doc. use iPhone 5 simulator before it's fixed. (CGFloat is float in older devices. )
The React Native issue which is tracking this is:
https://github.com/facebook/react-native/issues/449

A:     viewStyle : {
    backgroundColor: '#F8F8F8',
    justifyContent: 'center',
    alignItems: 'center',
    height: 60,
    paddingTop: 15,
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 2 },
    shadowOpacity: 0.2,
    marginBottom: 10,
    elevation: 2,
    position: 'relative'
},

Use marginBottom: 10

A: I am using React-Native 0.40 and below code works for me both on IOS and Android.
(Android-only) Sets the elevation of a view, using Android's underlying elevation API. This adds a drop shadow to the item and affects z-order for overlapping views. Only supported on Android 5.0+, has no effect on earlier versions.
 class MainApp extends Component {
  render() {
    return (
      <View style={styles.container}>

        <View elevation={5} style={styles.buttonContainer}>
          <Text style={styles.textStyle}>Shadow Applied</Text>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#FFFFFF'
  },
  textStyle: {
    color: '#FFFFFF'
  },
  buttonContainer: {
    backgroundColor: '#2E9298',
    borderRadius: 10,
    padding: 10,
    shadowColor: '#000000',
    shadowOffset: {
      width: 0,
      height: 3
    },
    shadowRadius: 5,
    shadowOpacity: 1.0
  }
})

Tested on iPhone.

Edit
Comment from @ James. Thanks.
Note: For those on android, the backgroundColor is critical. I was using View as a container for another element and couldn't get a shadow until I specified a background color.

A: You have to give elevation prop to View
<View elevation={5} style={styles.container}>
   <Text>Hello World !</Text>
 </View>

styles can be added like this:
 const styles = StyleSheet.create({

     container:{
        padding:20,
        backgroundColor:'#d9d9d9',
        shadowColor: "#000000",
        shadowOpacity: 0.8,
        shadowRadius: 2,
        shadowOffset: {
          height: 1,
          width: 1
        }
       },
   })

A: I'm using Styled Components and created a helper function for myself.
It takes the given Android elevation and creates a fairly equivalent iOS shadow.
stylingTools.js
import { css } from 'styled-components/native';

/*
 REMINDER!!!!!!!!!!!!!
 Shadows do not show up on iOS if `overflow: hidden` is used.
 https://react-native.canny.io/feature-requests/p/shadow-does-not-appear-if-overflow-hidden-is-set-on-ios
*/

// eslint-disable-next-line import/prefer-default-export
export const crossPlatformElevation = (elevation: number = 0) => css`
  /* Android - native default is 4, we're setting to 0 to match iOS. */
  elevation: ${elevation};

  /* iOS - default is no shadow. Only add if above zero */
  ${elevation > 0
    && css`
      shadow-color: black;
      shadow-offset: 0px ${0.5 * elevation}px;
      shadow-opacity: 0.3;
      shadow-radius: ${0.8 * elevation}px;
    `}
`;

To use
import styled from 'styled-components/native';
import { crossPlatformElevation } from "../../lib/stylingTools";

export const ContentContainer = styled.View`
  background: white;
  ${crossPlatformElevation(10)};
`;

redpajama_set_name: RedPajamaStackExchange


text:
Q: Windows 10 Media Creation Tool unable to boot in UEFI mode I've downloaded the last Windows 10 Media Creation Tool (https://www.microsoft.com/it-it/software-download/windows10) in order to install Windows 10 in UEFI mode (before it was Legacy)
The USB stick looks good, it is FAT32 and it has the correct EFI boot files: efi/boot/bootx64.efi as well as efi/boot/windows/BCD etc..
So it looks like a UEFI bootable USB.
However, I can enter the Windows setup only in Legacy mode with the CSM enabled.
MY mobo is an AsRock AB350 pro4 and I've already installed the last good firmware for my Ryzen5 1600x.
If I install windows 10 in this way, the result will be a Legacy installation.
If I try to disable the CSM, I can choose to boot from the UEFI:<USB stick name>, however it displays the AsRock logo and keep restarting.
I've also tried to burn the iso with Rufus yet I got the same result...
In all of my thousands of tries, I've also checked another UEFI boot image (Gandalf's Windows 10PE x64 Redstone 5) and with that I was able to boot in UEFI.
In BIOS I've tried to disable Secure Boot and fTPM without success...
Why does my system does not sees Windows 10 bootable in UEFI mode?
Thank you in advance.

A: Thanks for your suggestions, yet they were not usefull.
Finally, the way I solved my problem, was to update the BIOS of my AsRock AB350 pro4 to version P5.00. Previously it was P4.60.
After the update, it was able to correctly detect the UEFI Windows 10 USB.


text:
Q: FileSystemWatcher: Insufficient system resources exist to complete the requested service when monitoring 1000 network folders I created a Windows-based application to monitor the file changes from network-shared folders using .NET FileSystemWatcher. The Application is running on AWS EC2 ts.large Windows Server 2016 Datacenter, 8 GB RAM.
The application works well when monitoring 500 network shared folders, but it constantly raises the exception as below when monitoring 1000 network shared folders.

System.ComponentModel.Win32Exception (0x80004005): Insufficient system
resources exist to complete the requested service

In Windows Task Manager, it shows high CPU usage up to 70 - 90% even no any file change in the folders, the RAM looks normal, around 120 MB.
Additionally, if I use the application to monitor 1000 local folder. It works well without any issue.
I guess it might be related to how Windows manages the memory (non-paged memory). But I am not sure exactly how to fix this issue. Very appreciate your suggestion!


text:
Q: MPMoviePlayerViewController running in background and using Remote Controls I'm currently running on iOS 4.3.5 and trying to get my MPMoviePlayerViewController to continue playing after entering background.
I implemented everything as it is described on
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html
and
http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/RemoteControl/RemoteControl.html
I have also set the UIBackgroundMode to audio.
My custom MPMoviePlayerViewController class is called like this from a TabBarApplication:
    NSURL *streamUrl = [NSURL URLWithString:STREAM_URL];

self.playerViewController = [[CustomMoviePlayerViewController alloc] initWithContentURL:streamUrl];

// Register for the playback finished notification
[[NSNotificationCenter defaultCenter] addObserver:self
                                            selector:@selector(myMovieFinishedCallback:)
                                            name:MPMoviePlayerPlaybackDidFinishNotification
                                            object:self.playerViewController.moviePlayer];
// Present
[self presentMoviePlayerViewControllerAnimated:self.playerViewController];

// Play the movie!
self.playerViewController.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
[self.playerViewController.moviePlayer prepareToPlay];
[self.playerViewController.moviePlayer play];

Inside my CustomMovePlayerController looks like the following:
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}

-(void)viewWillAppear:(BOOL)animated {
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
}

-(void)viewWillDisappear:(BOOL)animated {
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];

[self resignFirstResponder];
[super viewWillDisappear:animated];
}

-(BOOL)canBecomeFirstResponder {
return YES;
}

-(void)remoteControlReceivedWithEvent:(UIEvent *)event {
[super remoteControlReceivedWithEvent:event];
NSLog(@"remoteControlReceived");
NSLog(@"%d", [[AVAudioSession sharedInstance] isActive]);
if (event.type == UIEventTypeRemoteControl) {
    switch (event.subtype) {
        case UIEventSubtypeRemoteControlPlay:
            [self.moviePlayer play];
            break;

        case UIEventSubtypeRemoteControlPause:
            [self.moviePlayer pause];
            break;
        default:
            break;
    }
}
}

The main problem with my MPMoviePlayerViewController is, that it doesn't respond to the remoteControlReceivedWithEvent message, why is that? Am I subclassing the wrong thing? Does my Tabbar based app prevent me from doing that?
Last but not Least - applicationDidFinishLaunchingWithOptions contains following:
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
[audioSession setActive:YES error:nil];

I just can't figure out what's missing... all help is greatly appreciated!

A: I think I can answer both questions :)
The background issue:
What file format are you trying to play? My app has been using a MPMoviePlayerViewController for background audio for a while, but recently had reports that it wasn't playing in the background anymore.
Turns out it was AAC files; they're podcasts with chapters and cover art per chapter... iOS 5 added improved support for them, but it must make the MPMoviePlayerViewController think it's playing video. Background video was turned off around iOS 4.3, from what I can find.
Try it with a plain MP3 file, that still works for me. I'm about to log the AAC problem as a bug with Apple.
The remote control issue:
Both the lock screen and notification bar remote control buttons send the UIEventSubtypeRemoteControlTogglePlayPause event, not play and pause separately. So I handle events like this:
- (void)remoteControlReceivedWithEvent:(UIEvent *)event {
  switch (event.subtype) {
    case UIEventSubtypeRemoteControlTogglePlayPause:
      if (controller.playbackState == MPMusicPlaybackStatePlaying) {
          [controller pause];
      } else {
          [controller play];
      }
      break;
     //etc
}


text:
Q: reversing list using slicing [ : 0:-1] in Python I am confused in the list slicing in Python.
For a list
L=[0,1,2,3,4,5,6,7,8,9,10]

I wanted to reverse the list and could get the answer by
L[::-1]

getting [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].
However, when I tried
L[10:0:-1]

I got [10,9,8,7,6,5,4,3,2,1] without 0.
Neither L[10:1:-1] nor L[10:-1:-1] give the answer.
On the other hand, L[200::-1], L[10:-12:-1]
gives correct answer, though L[200], L[-12] is out of bounds.
I would like to understand the underlying logic of Python
for this case.
Thank you.

A: Let's take a list for example,
a = [1, 2, 3, 4, 4, 5, 6, 9]

If you try to slice it using positive indices,
newa = a[1:5]

This will result in
newa = [2, 3, 4, 4]

This is because, in the above case slicing occurs like this, a[inclusive : exclusive], first index is included and slicing begins from this index, and end just one index before the index(5), exclusive(remember). This is just the way how list slicing works.
To get last two values of the list a,
newa = [6 : ]

Here, the index starts from 6(inclusive) and ends till end of the list.
If you are keen in using negative indexing in lists as Python offers to ease up indexing, know once and for all the inclusive and exclusive thing about slicing.
For same example above, to get last two numbers of the list using negative index, what we do is,
newa = a[-2 : ]

In the case of positive indexing, the index begins at 0 while for negative indexing, the index is at -1, -2 and so on. So in the above example, starting from second last number in the list, slice till the end of the list, is what is understood.
Now, to reverse the list, one could do,
print a.reverse()
[9, 6, 5, 4, 4, 3, 2, 1]

In slicing way, list can be reversed by giving it a [start, end, step] like mentioned above, but I would like to clarify it further.
 r = a[2: : -1]

This will make a new list starting with number from index 2, and till the end of the list, but since the step is -1, we decrease from index 2, till we reach 0. Hence we come up with a  reversed list of first three numbers as below:
r = [3, 2, 1]

Also, to get a whole of the list as reversed,
r = a[len(a): : -1]

This will start from 8, the length of the list, but in indices terms which begins from 0, we have 0 till 8 indices, so starting from 8th indices, it goes on decreasing in steps of -1, till the end of the list. The result is as:
[9, 6, 5, 4, 4, 3, 2, 1]

I personally prefer to use this for reversing the list.

A: For the Python list slicing syntax, list[start:end:step] will get a sliced list with items starting with list[start], but list[end] is excluded. As a result, in your case, L[10:0:-1] will exclude L[0], i.e., 0, and L[10::-1] will work as you expect.
When the start or end is a negative number, it means it counts from the end of the list. So list[-1] will get the last item in the list. In your case, L[10:-1:-1] is equivalent to L[10:10:-1]. So L[10:-1:-1] will get [].

A:  >>> L = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
 >>> L[1:3]
 [1, 2]

index 3 is excluding
>>> L[0:10:1]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

index 10 is excluding, and if you want to select all,you should use:
>>>L[0:11:1]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

but you can not get L[11],it will be throw IndexError,because you only have 11 elements,the max index is 10, the reason L[0:11:1] will not out of bound because this slice will not access to L[11] only from index 0 to 10.
>>> L[10:0:-1]
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

-1 is a step of slice reversely,also 0 is excluding,
and L[10:-1:-1] is equivalent to L[10:10:-1] ,because the first -1 means the last index of L
>>> L[10:-12:-1]
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

index -11 is equivalent to index 0, index -12 is equivalent to index before 0

A: The above answers correctly explain what happens when list slices are used. However, I would like to touch upon the final part of the question - how does L[200::-1] or L[10:-12:-1] work even though both 200 and 12 are out of bounds of the array?
You can simply understand it this way - When slices are used to extract elements from a sequence, python ensures that the indices used within the slice are within the the length of the sequence. Hence in your case, when you specify L[200::-1], what happens internally is that Python checks that the length of the sequence L is only 11 and hence treats the above statement as L[10::-1] instead. Similar argument applies to L[10:-12:-1].
This link provides a good insight into section-slices. Typically at the end of this page there is a description and an example on how to implement sequences that support extended slicing. To quote:

slice objects now have a method indices(length) which, given the
  length of a sequence, returns a (start, stop, step) tuple that can be
  passed directly to range(). indices() handles omitted and
  out-of-bounds indices in a manner consistent with regular slices
  (and this innocuous phrase hides a welter of confusing details!).


text:
Q: how to abstract and re-use a describe() block in jasmine? I work on an app that handles CRUD on a certain type of documents. Therefore we want often to test the conformity of that document against a set of values. I have a describe() block with it() inside that are testing each field of that document.
I would like to make that re-usable, but simply wrapping a function around that describe block leads to timing issues, and the following test are running too early, before the tests in that wrapping function.
Is there a pattern to do this ? Should it be a promise ?
Should I make of it a matcher ? docToBeEqualTo() ? I haven't seen it() used within matchers, it does not seems to be the right place for this
I guess I am missing a common pattern here. can you help ?
thanks a lot
edit: requested code exemple :
function compareDocs(targetData, timeout){
        describe('the doc should contain : ', function(){
            it('The amount field should be : "' + targetData.amount + '". ', function(){
                expect(element(by.css(selector)).getAttribute('value')).toEqual(targetData.amount);
            }, timeout);

            it('The foo bar number  should be : "' + targetData.fooBar + '". ', function(){
                expect(element(by.css(selector)).getAttribute('value')).toEqual(targetData.fooBarNumber);

            }, timeout);

            return browser.waitForAngular();
        });
});

used like this:
describe('first describe', function(){
            it('compare docs', function(){
               compareDocs(currentData,targetData);
            }, timeout);
});
describe('second describe where the doc is deleted', function(){
        it('should remove payment from list', function(){
              deleteDoc();//this runs too early, and delete the doc before compareDocs() has finished
              expect(element(by.css(selector)).isPresent).toBe(false);
            }, timeout);
        });

TL;DR : how to prevent deleteDoc() to run before compareDoc() has finished ?

A: Jasmine always checks for blocks of describe and nested describe functions. However, when you define a suite(describe) or spec(it) inside a function that executes only on being called, protractor doesn't recognise the suite or spec in the function specified. You can either use loops or self executing functions to execute suites and specs (This wouldn't solve your problem i suppose). Only possible solution is to call a function that has block of code without any suites or specs in it. Here's an example -
function compareDocs(targetData, timeout){
    console.log('The amount field should be : "' + targetData.amount + '". ');
    expect(element(by.css(selector)).getAttribute('value')).toEqual(targetData.amount);
    console.log('The foo bar number  should be : "' + targetData.fooBar + '". ');
    expect(element(by.css(selector)).getAttribute('value')).toEqual(targetData.fooBarNumber);
    return browser.waitForAngular();
};

NOTE: A describe suite nested inside an it spec won't execute.
Hope it helps.


text:
Q: Logs, Risk/Issue Log How does one create a Log of various discussion points on SharePoint?  How does another user add comments to a specific point on the Log?  Is there a Template for SharePoint users to upload that is a Log format?

A: There are no list templates from Microsoft for this purpose. Various products (free or paid) provide this functionality. I prefer creating a custom list and add a column 'Comments' with type 'Multiple lines of text' (set the option 'Append Changes to Existing Text' to 'Yes'). You need to enable versioning for this list otherwise this field will only capture the last comment.


text:
Q: Aligning content in a WPF Viewbox I have a Viewbox with Stretch=Uniform in order to not distort the content.
However, when the frame window is wider or taller than the content, the Viewbox content is always centered.
I cannot seem to find any content alignment options on the Viewbox.
Is there a way to do this?

A: Try VerticalAlignment="Top" and HorizontalAlignment="Left" on your viewbox. It will cause it to be anchored to the top and left side.
<Grid>
    <Viewbox VerticalAlignment="Top" HorizontalAlignment="Left">
    ...
    </Viewbox>
</Grid>

If you want it to completely fill (but keep it uniform) you can use Stretch="UniformToFill"

A: According to MSDN the Viewbox is used to stretch the child elements.  Since the child elements would be stretched, you would have to set the content alignment of the children.
You may want to look at this for more information on the Viewbox: How do I keep aspect ratio on scalable, scrollable content in WPF?


text:
Q: Docker Oracle Instant Client I have been trying for 4 days to:

*

*Deploy Oracle Instant Client with Docker. I can give you the Dockerfile but it is 96 lines

*To use Oracle Instant Client on my Linux Ubuntu latest.
In the end I arrive at the same two issues.
When installing OCI 8 with the command:

*

*Docker:

RUN echo 'instantclient, / usr / local / instantclient' | pecl install
oci8

*

*Ubuntu:

echo "instantclient, / opt / oracle / instantclient_12_2" | sudo pecl
install oci8

I get the error:
make: *** [Makefile: 194: oci8.lo] Error 1
ERROR: `make 'failed

Could not find a solution.
Make is correctly installed in both cases:

GNU Make 4.2.1 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2016
Free Software Foundation, Inc. GPLv3 + license: GNU GPL version 3 or
later http://gnu.org/licenses/gpl.html This is free software: you
are free to change and redistribute it. There is NO WARRANTY, to the
extent permitted by law.

Do you have an idea ? It blocks me for the rest of my work.
BR,
Nicolas.
EDIT :
I try this :
pear download pecl/oci8
tar xvzf oci8-3.0.0.tgz
phpize
./configure --with-oci8=instantclient,/opt/oracle/instantclient_12_2/
make

Same issue :
make: *** [Makefile:194: oci8.lo] Error 1

I'm going crazy...

A: If you follow the instructions from Oracle's Github Repo for Docker you should be able to build your own instantclient.
https://github.com/oracle/docker-images/tree/master/OracleInstantClient
Another option will be to just make use of an existing image from their container-registry.
docker pull container-registry.oracle.com/database/instantclient:latest

Best of luck!

A: I did it this way:
RUN echo 'instantclient,/opt/oracle/instantclient/lib' | pecl install oci8


text:
Q: How to connect to multiple database on different docker containers from a Windows host without publishing the ports? I have multiple docker stacks for different web application running on the same machine.
I'm already using nginx-proxy to access each app with its own host name.
This spares me from publishing a different http port for each app.
Is there any way of doing something similar with other services, like databases?
I'd like to be able to connect to each database with my tools (like Mysql Workbench and such) without explicitly publishing a different port for each database.
EDIT: the MacVlan network driver seems to be an option on a Linux host, but it's not available on Windows.


text:
Q: How to use aioboto3 & asyncio to download file from S3 aws - Python I have the sync script which is running & working well, but i see some download files takes time, thought of using async approach here.
import json
import os
import io
import time
import gzip
import re
import logging
from logging.handlers import RotatingFileHandler
import boto3

AWS_KEY = "**"
AWS_SECRET = "**"
QUEUE_URL = "***"
OUTPUT_PATH = "./test"
VISIBILITY_TIMEOUT = 10
REGION_NAME = "region"

sqs = boto3.resource('sqs', region_name=REGION_NAME, aws_access_key_id=AWS_KEY, aws_secret_access_key=AWS_SECRET)
s3 = boto3.client('s3', region_name=REGION_NAME, aws_access_key_id=AWS_KEY, aws_secret_access_key=AWS_SECRET)

queue = sqs.Queue(url=QUEUE_URL)

def handle_response(msg, path):
    """Logic goes here"""
    print('message: %s' % msg)

def download_message_files(msg):
    for s3_file in msg['files']:
        s3_path = s3_file['path']
        with io.BytesIO() as f:
            s3.download_fileobj(msg['bucket'], s3_path, f)
            f.seek(0)
            for line in gzip.GzipFile(fileobj=f):
                await handle_response(line.decode('UTF-8'), s3_path)

def consume():
    while True:
        for msg in queue.receive_messages(VisibilityTimeout=VISIBILITY_TIMEOUT):
            body = json.loads(msg.body)  # grab the actual message body
            download_message_files(body)
            msg.delete()
            time.sleep(sleep_time)

if __name__ == '__main__':
    # Setup our root logger
    logging.basicConfig(level=logging.INFO, format="%(asctime)s %(name)s %(levelname)s %(message)s")
    # Create our FDR logger
    logger = logging.getLogger("Consumer")
    # Rotate log file handler
    RFH = RotatingFileHandler("test.log", maxBytes=20971520, backupCount=5)
    # Log file output format
    F_FORMAT = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
    # Set the log file output level to INFO
    RFH.setLevel(logging.INFO)
    # Add our log file formatter to the log file handler
    RFH.setFormatter(F_FORMAT)
    # Add our log file handler to our logger
    logger.addHandler(RFH)
    consume()

I have tried converting this using aioboto3 and got struck in queue approach.
    session = aioboto3.Session()
    sqs = session.resource('sqs', region_name=REGION_NAME, aws_access_key_id=AWS_KEY, aws_secret_access_key=AWS_SECRET)
    s3 = session.client('s3', region_name=REGION_NAME, aws_access_key_id=AWS_KEY, aws_secret_access_key=AWS_SECRET)
queue = sqs.Queue(url=QUEUE_URL)  <---- this gives error as 'ResourceCreatorContext' object has no attribute 'Queue'

As i could understand from this there is no attribute, but could anyone guide me to make this working with async nature.

A: You can use asyncio and aioboto3 together.
Instead of creating a resource, you can use client. The difference between an aioboto3.client and aioboto3.resource can be found in this answer.
This is a simple working example:
import aioboto3

async def consume():
  async with aioboto3.Session().client(service_name='sqs', region_name=REGION_NAME, aws_access_key_id=AWS_KEY, aws_secret_access_key=AWS_SECRET) as client:
    messages = await (client.receive_messages(VisibilityTimeout=VISIBILITY_TIMEOUT)
    for message in messages:
      # Do something

This should solve the error you are facing. This solution can also be extended to S3 as per your requirements.


text:
Q: MYSQL Query Not Working, 2 database in one php file I have other php files which accesses 2 database, one for the back end of the php site and the other is for the backup, when I update or insert to the back end database, I want that the backup also receives the same of what the back end receives, yet my code seems to not work, can anyone please help me? Newbie here.. Sorry also if wrong grammar.
php clip inside php file containing the php query
$d_id = $_POST['computer_id'];
$brand = $_POST['d_brand'];
$model= $_POST['d_model'];
$office = getOfficeId($conn,$_POST['d_office_id']);
$serial_no = $_POST['d_serial_no'];
$type = $_POST['d_type'];
$personnel = $_POST['d_personnel'];
$job_description = $_POST['job_d'];

if(isset($_POST['bundled'])){
    $checkboxOS = $_POST['bundled'];
}

$dbh1 = new mysqli($host, $user, $password, $database1);
if($dbh1->connect_errno > 0){
    die('Unable to connect to database' . $dbh1->connect_error);
}

if (mysqli_query($dbh1,"INSERT INTO computer (Computer_id, Brand, Model, Serial_no, Type, Personnel, Job_description, Status, Office_id, User_id)
                        VALUES ('$d_id','$brand', '$model', '$serial_no', '$type', '$personnel', '$job_description', 'OK', $office, 1);" ))
{
    $dbh2 = new mysqli($host, $user, $password, $database2);
    if($dbh2->connect_errno > 0){
        die('Unable to connect to database' . $dbh2->connect_error);
    }else {
            if(mysqli_query($dbh2, "INSERT INTO computer (computer_id, Brand, Model, Serial_no, Type, Personnel, Job_description, Status, Office_id, User_id)
                                     VALUES ('$d_id','$brand', '$model', '$serial_no', '$type', '$personnel', '$job_description', 'OK', $office, 1);"))
            {
                echo "<script type='text/javascript'>alert('New record created successfully');</script>";
            }
            else
            {
                die('Error!' . $dbh2->connect_error);
            }
    }
}else{
    echo "Error updating record: " . $conn->error;
}

The first query in $dbh1 works, but the insert in $dbh2 does not work, help needed please, what is wrong with my code :(

A: You should close previous connection of mysqli before creating new one.
mysqli_close($dbh1);
$dbh2 = new mysqli($host, $user, $password, $database2);

A: try to select the databases separately like this,
mysqli_select_db($database1, $dbh1);

mysqli_select_db($database2, $dbh2);


text:
Q: bootstrap-affix : Div underneath affix "jumps" to top. How do I make it smoothly scroll behind? Been playing with boostrap for a few days and amazed at the capabilities it has to offer.
Have been trying to have a "header" of some sorts, which is affixed to the top when the user scrolls down.
You can find my current work here: http://mp3dj.free.fr/affix/site/
However you will notice that, when scrolling down, the "POST 1" suddenlty jumps to the top of the page. i.e there is no smooth scroll behind like here: http://jsfiddle.net/namuol/Uaa3U/
Current code:

Samantha Sam

Post 1

 Scroll Down↓

Post 2

Post 3

Any help appreciated!

A: What happens in your code is the row at the top changes its position to fixed when its offset to the top is smaller then 60px. The consequence is that it stops to consume any space above the next row.
In the jsfiddle you introduced there is a JS code you should understand and should help you.
This one is for you:
$('#nav-wrapper').height($("#nav").height());

It requires your header to be placed yet inside another div (class called nav-wrapper in fiddle). JQuery code above sets its height based on row height during initialization of the page. The height stays the same even if the top row disappears (of getting fixed).
Another part of the JS code:
$('#nav').affix({
    offset: $('#nav').position()
});

makes you independent of the size of space above the top row, but in your case I think you do not need it (you can predict it always takes 60px).

A: when you use the solution from Marcin Skórzewski mind that if you're using a collapse in your navbar it effects the dropdown.

*

*The height of the complete navbar is set using the small piece of JS code.

*When your window gets smaller the navbar will be replaced with ||| (using default bootstrap)

*When you're using a dropdown and press ||| to show the dropdown it will be placed behind the content below. It will not slide the content down. This is because the height of the navbar is set.

Possible solution 1: remove the height of the navbar when you click on ||| and place it back again when the dropdown slides back.
Possible solution 2: add a margin-top to the next element once the navbar sticks
update:
https://stackoverflow.com/a/15177077/1059884
an excellent solution using CSS


text:
Q: UnicodeDecode 'ascii' error on end of file I'm getting a UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 24245: ordinal not in range(128) on multiple files, for all of which the position given is basically the end of the file. Chardet.detect() gives me ASCII as the codec with 1.0 confidence.
Does anyone know what encoding this should probably be? This file was written in windows so I assume that has something to do with it.
Edit: Removed hex dump.


text:
Q: How can i add pillow to yocto image rocko branch? We're working on an older yocto release, and I'm trying to add pillow to our image. Sadly it seems open-embedded lacks pillow recipe for rocko (branch), and the one found in meta-printing appears to be broken (it errors out when building). Can someone perhaps provide me with a working recipe, or other method to get pillow installed? Should be noted, we're on python 3.5.
Thanks in advance.


text:
Q: Route Local mail in EXIM Can I route all local Email (local domain to local domain) to another host ex: a spam filtering system on EXIM?

A: You can't easily do this, and normally wouldn't need to do that.  If you find a local user is spamming you it is usually easy to deal with.  Spam filtering is usually done for mail coming from servers you don't have control of.
You could try with a base configuration using the remote server as a smart host for all deliveries.  It would need to know to route the message back after scanning.  You would then need to configure your smarthost routing to skip messages arriving from the system doing spam filtering.

A: It's difficult to extrapolate exactly what you're trying to achieve by your description.  If your goal is to distribute the load of spam scanning to a seperate machine, then you can configure Exim to speak to SpamAssassin on a different machine.  Spamassassin listens on a TCP port, normally 127.0.0.1 port 783.  You can, on the other server, configure Spamassassin to listen to the IP of eth0 (or whatever is your internal network interface), and then just configure Exim as per Section 2 and Section 3 of this chapter of the Exim docs:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch43.html


text:
Q: MySQL - Delete item from two tables I'm trying to delete an item items table. And also from saves table if it exists.
This is the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'i LEFT JOIN saves s ON i.id = s.item_id
DELETE FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE i.id = ? AND s.item_id = ?
AND
NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)

A: If you want to delete from a single table, say items try this::
DELETE i FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE i.id = ? AND s.item_id = ?
AND
NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)

If you want to delete record from both the tables, try this::
DELETE i, s FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE i.id = ? AND s.item_id = ?
AND
NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)

A: DELETE i, s
FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE s.item_id = ?
AND
 NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
 NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)

A: Use the below query to delete the data from table i:
DELETE i FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE i.id = ? AND s.item_id = ?
AND
NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)

A: You just have to add i before the FROM in your query
DELETE i FROM items i
LEFT JOIN saves s
ON i.id = s.item_id
WHERE i.id = ? AND s.item_id = ?
AND
NOT EXISTS (SELECT id FROM pending_wins WHERE item_id = ?)
AND
NOT EXISTS (SELECT id FROM bids WHERE item_id = ?)


text:
Q: Does Git generate the content of files in the Working Tree on the fly? Say I have two files in the repo: a.txt and b.txt.
In branch hotfix, I updated b.txt. I commit the change (C1).
Then, in branch master, I updated a.txt. I commit the change (C2).
Then I merge hotfix into master. The resulting branch merge commit has two parents, pointing to C1 and C2. C1's tree object links to the blob for the updated b.txt. C2's tree object links to the blob for the updated a.txt. There is no single commit that contains a tree pointing to the latest version of a.txt and b.txt.
When master is checked out, are the files in the working tree generated on the fly from the different branches?
It is a similar situation when the same file was updated in two branches and subsequently merged successfully. There is no blob object in the database for the final merged version of the file. Is my understanding correct?

A: When you merge into master, the master label is re-hung on the new merge commit, of a tree with the merge results, as with any commit that's a full snapshot. All files.


text:
Q: Linq call to stored procedure returning to quickly I'm attempting to call this method:
private async Task<int> RemoveAllCurrentEntries()
{
  using (var ent = new WebPortalEntities())
  {
    // remove all existing price file entries based on a corporationid
    var NewOrderIdOut = new SqlParameter(Settings.Default.CorporationId.ToString(),
      System.Data.SqlDbType.UniqueIdentifier);
    NewOrderIdOut.Direction = System.Data.ParameterDirection.Output;

    return await ent.Database.ExecuteSqlCommandAsync(
      "exec [dbo].[DeleteAllCorpCustomersFromCustomerPrice] @NewOrderIdOut output",
      NewOrderIdOut);
  }
}

From this method:
private async Task ExecutePriceFile()
{
  try
  {
    var pricefile = Path.Combine(
      Settings.Default.PriceFileDirectory,
      Settings.Default.PriceFileName);

    // verify file exists other no point in running the rest of the code
    if (!File.Exists(pricefile)) return;

    var parsedfile = ParsePriceFile(pricefile);

    if (!parsedfile.Any()) return;

    using (var ent = new WebnPortalEntities())
    {
      var deleteEntries = RemoveAllCurrentEntries();

      if (deleteEntries == Task.CompletedTask)
      {
        foreach (var priceFile in parsedfile)
        {
          var pf = new CustomerPrice();
          pf.CorporationId = Settings.Default.CorporationId;
          pf.CustomerPriceId = Guid.NewGuid();

          pf.AccountNumber = priceFile.AccountNumber;
          pf.BranchNumber = priceFile.BranchNumber;
          pf.BudgetBalance = priceFile.BudgetBalance;
          pf.BudgetRate = priceFile.BudgetRate;
          pf.ContractDepositQuantity = priceFile.ContractDepositQuantity;
          pf.ContractGasPercent = priceFile.ContractGasPercent;
          pf.ContractGasQuantity = priceFile.ContractGasQuantity;
          pf.ContractGasTenths = priceFile.ContractGasTenths;
          pf.CreditLimit = priceFile.CreditLimit;
          pf.CurrentDate = priceFile.CurrentDate;
          pf.CurrentDiscountDays = priceFile.CurrentDiscountDays;
          pf.CurrentDiscountRate = priceFile.CurrentDiscountRate;
          //pf.CurrentDiscountRate2 = columns[22].ToDecimal();
          pf.CurrentDiscountRateDays = priceFile.CurrentDiscountRateDays;
          pf.CurrentDiscountRateType = priceFile.CurrentDiscountType;
          pf.CurrentDiscountType = priceFile.CurrentDiscountType;
          // pf.CurrentPrice2 = columns[19];
          pf.CurrentPrice = priceFile.CurrentPrice;
          pf.LastPaymentDate = priceFile.LastPaymentDate;
          pf.NonBudgetBalance = priceFile.NonBudgetBalance;
          pf.OldestDiscountDays = priceFile.OldestDiscountDays;
          pf.OldestDiscountRate = priceFile.OldestDiscountRate;
          pf.OldestDiscountType = priceFile.OldestDiscountType;
          pf.OldestPrice = priceFile.OldestPrice;
          pf.PastDueBalance = priceFile.PastDueBalance;
          pf.PaymentAmount = priceFile.PaymentAmount;
          pf.PreviousDate = priceFile.PreviousDate;
          pf.PreviousDiscountDays = priceFile.PreviousDiscountDays;
          pf.PreviousDiscountRate = priceFile.PreviousDiscountRate;
          pf.PreviousDiscountType = priceFile.PreviousDiscountType;
          pf.PreviousPrice = priceFile.PreviousPrice;
          pf.ProductCode = priceFile.ProductCode;
          pf.IsActive = priceFile.Status.ToActive();
          pf.UnitOfIssue = priceFile.UnitOfIssue;
          ent.CustomerPrices.Add(pf);

        }

        ent.SaveChanges();
      }
      else
      {
        throw new Exception(deleteEntries.Result.ToString());
      }
    }
  }
  catch (Exception exception)
  {
    Console.WriteLine(exception);
    throw;
  }
}

I'm not having the code wait until the task completes, it immediately returns and issues this message:

Id = 11, Status = WaitingForActivation, Method = "{null}", Result =
"{Not yet computed}"

I want it to wait until it's complete then return. Any ideas what I am doing wrong?

A: await RemoveAllCurrentEntries();

Or (if ur main function is not async)
Var _task = RemoveAllCurrentEntries();
_task.Wait();
Var result = _task.Result;


text:
Q: Refresh Parent Window from child window in IE8 I create a link with window.open, in new opened window i add a button for close window. I want when my window is close then parent window will refresh, so i use this script :

window.opener.location.href="https://qa.bloom.com/products/customer/account/profile/";
window.close();

In my application parent window use secure server like as https://examples.com but child window not use secure server.
This is working in ff and but in IE 8 it's not working.
Why is IE8 opening a new window instead of just refreshing the existing one?
Please give your suggestion.
Thanks

A: Try following code:
window.opener.location = self;
window.opener.location.reload();
window.close();

It works great in my IE v8.0


text:
Q: Smallest $x$ for which $\sum_{n=1}^{\infty}\dfrac{1}{n^x}$ converges Consider the series
$$S_x = \sum_{n=1}^{\infty}\dfrac{1}{n^x}$$
for $x > 0$.
Then

*

*$S_1$ is the harmonic series, which is known to diverge.

*$S_2 = \dfrac{\pi^2}{6}$; this is the Basel problem solved by Euler

*$S_x$ appears to be well-studied or to have a famous history for a handful of other values of $x$ as well

My question is, is there a minimum known $x$ for which $S_x$ converges, or a maximum known value for which it diverges? And if the former, what is the sum $S_x$ for that minimum value of $x$?

A: I'm positive this has been answered before, but it converges for all $x > 1$. This is easy to see with the integral test:
$$
\int_2^\infty t^{-x} \, dt = \left[ \frac{1}{1-x}t^{1-x} \right]_2^\infty < \infty
$$
You can use this to show that as $x \to 1$ the sum increases to infinity, too. Just bound the sum below by the integral.

A: Yes, you can upper-bound the series with the integral
$$I_p = \int_1^\infty x^{-p} dx$$
The integral will converge $\forall p > 1$, by simply integrating it like so:
$$
I_p = \int_1^\infty x^{-p} dx = \frac{x^{-1 - p}}{1 - p} \bigg |_1^\infty = \frac{1}{1 - p} \left ( \infty^{1 - p} - 1\right)
$$
which will be equal to
$$\frac{-1}{1 - p} = \frac{1}{p - 1}$$
if $p > 1$ since the first term of the evaluation, $\infty^{1 - p} = 0$  since $1 - p< 0$, hence the term becomes 0. (Note that the infinity business is not strictly rigourous, and I should actually take limits, but it's a good enough explanation)
If $p < 1$, then the term $\infty^{1 - p}$ is raised to some positive power, so the integral is divergent.
When $p = 1$, the integral becomes
$$I_1 = \int_1^\infty \frac{1}{x} dx = \ln x \bigg |_1^\infty = \ln \infty - \ln 1 = \text{divergent}
$$
Hence, $p = 1$ also diverges


text:
Q: What kind of overhead is involved in a Hashtable? I understand that since allocation is at run-time there must be some house-keeping operations involved. But other than that what is the overhead ? Also, would it be wise to create a hashtable Vs array when you need to store the number of times an integer element appears in an infinite stream of numbers ?

A: Theoretically, it depends on how many unique numbers there are in the stream of numbers.  But any real life scenario I can imagine, an array would be ridiculously slower.  The more unique numbers you process, the slower the array solution will become.
A HashTable generally maintains the same access speed no matter how large it becomes.  For an 'infinite stream', I can't imagine how a HashTable won't be the better solution.  How do you intend to search the array?

A: As Neil's comment implies, the overhead in hashtable implementations depends heavily on the particular implementation of a hash table.  Typically, though, there will be storage overhead from unused hashes, and both storage and time overhead from dealing with hash collisions.  There is of course also time overhead from computing the hash values.
In answer to your second question, this depends very much on the details of your stream of numbers, and the other aspects of your program.  Some questions to consider:

*

*Is the set of possible numbers large or small?  (How big an array would you need to create?)

*Out of the range of possible numbers, do you expect most of them to be used, or only a few?  If you expect most of the possible numbers in the range to be used, then using a hash table will not save you much space.

*Do you know the range of possible numbers before you start?  Or is this unknown?  Hash tables can deal with unknown ranges much more easily.

*How important is saving storage space in this program?  Can you easily afford to allocate an array of the necessary size?  If you can easily afford to allocate the array, why bother with a hash table?

*How important is runtime speed in this program?  Arrays will be usually be faster.

A: Hashtables are pretty fast.  Just as an experiment, I get about 50x slowdown between a raw array and a c++ hash_map (compile with the #if toggled both ways and try it yourself).
#include <ext/hash_map>
using namespace __gnu_cxx;

int main() {
#if 0
  hash_map<int,int> table;
  for (int i = 0; i < 256; i++) table[i] = 0;
#else
  int table[256];
#endif

  for (int i = 0; i < 100000000; i++) {
    table[i&0xff]++;
  }
}


text:
Q: android showing error org.json.JSONException: End of input at character 0 of when I run the code below by getting an object from my server, I get an error like this
org.json.JSONException: End of input at character 0 of
at org.json.JSONTokener.syntaxError(JSONTokener.java:449)
at org.json.JSONTokener.nextValue(JSONTokener.java:97)
at org.json.JSONObject.<init>(JSONObject.java:159)
at org.json.JSONObject.<init>(JSONObject.java:176)
at com.halimlab.koneksicrud.TampilBarang.showBarang(TampilBarang.java:89)
at com.halimlab.koneksicrud.TampilBarang.access$000(TampilBarang.java:22)
at com.halimlab.koneksicrud.TampilBarang$1GetBarang.onPostExecute(TampilBarang.java:72)
at com.halimlab.koneksicrud.TampilBarang$1GetBarang.onPostExecute(TampilBarang.java:60)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.access$600(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6739)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:859)

I only write this in accordance with the guidelines of my homework, but it all returns an error that I understand
the java code that I entered shows an error leading to one of these lines
private void getBarang() {
        class GetBarang extends AsyncTask<Void,Void,String> {
            ProgressDialog loading;
            @Override
            protected void onPreExecute() {
                super.onPreExecute();
                loading = ProgressDialog.show(TampilBarang.this,"Fetching...","Wait...",false,false);
            }

            @Override
            protected void onPostExecute(String s) {
                super.onPostExecute(s);
                loading.dismiss();
                showBarang(s);
            }

            @Override
            protected String doInBackground(Void... params) {
                RequestHandler rh = new RequestHandler();
                String s = rh.sendGetRequestParam(konfigurasi.URL_GET_BARANG,id);
                return s;
            }
        }
        GetBarang gb = new GetBarang();
        gb.execute();
    }

    private void showBarang(String json){
        try {
            JSONObject jsonObject = new JSONObject(json);
            JSONArray result = jsonObject.getJSONArray(konfigurasi.TAG_JSON_ARRAY);
            JSONObject c = result.getJSONObject(0);
            String nama = c.getString(konfigurasi.TAG_NAMA);
            String kode = c.getString(konfigurasi.TAG_KODE);
            String stok = c.getString(konfigurasi.TAG_STOK);

            editTextName.setText(nama);
            editTextKode.setText(kode);
            editTextStok.setText(stok);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

and the php code that refers to it returns a json object like this
{
 result: [
  {
   id_barang: "5d336a0b676fb",
   nama_barang: "Nama",
   kode_barang: "kode",
   stok_barang: "123"
  }
 ]
}

help me to do it, thank you

A: Format of json response which you pasted here is invalid. Json fields should be wrapped in double quotes.
{
 "result": [
  {
   "id_barang": "5d336a0b676fb",
   "nama_barang": "Nama",
   "kode_barang": "kode",
   "stok_barang": "123"
  }
 ]
}


text:
Q: Cannot call value of non-function type 'CGFloat' I am new to sprite kit 2d game development. it's existing swift2 project working well but unfortunately after update swift4 flowing code getting error. How can i resolve this
class SGScene : SKScene {
      override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        for touch: AnyObject in touches {
            //let location = touch.locationInNode(self) //swift2
            let location = touch.location(self) //getting error update Xcode suggestion
            screenInteractionStarted(location)
        }
    }

       func screenInteractionStarted(_ location : CGPoint) {
            /*Overridden by Subclass*/
        }
}

currently I try to update this project swift4

A: Replace your method with this:
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
    touches.forEach { touch in
        let location = touch.location(in: self)
        screenInteractionStarted(location)
    }
}

A: You´re missing the parameter name: in. Repalce this line:
let location = touch.location(self)

With:
let location = touch.location(in: self)

And it will work.
The entire class:
import Foundation
import SpriteKit

class SGScene : SKScene {
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        for touch in touches {
            let location = touch.location(in: self)
            screenInteractionStarted(location)
        }
    }

    func screenInteractionStarted(_ location : CGPoint) {
        /*Overridden by Subclass*/
    }
}


text:
Q: What's the best way to loop this program in python? pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print original
    word = original.lower()
    first = word[0]
    second = word[1]
    new_word = word + first + pyg
    new_word = new_word[1:len(new_word)]
    print new_word
else:
    print 'empty'

I need this to loop and and when the user inputs 'Quit' with any combination of lower or capital letters. (qUit, QUIT, quIT, i.e.)
any tips are appreciated. Thanks.

A: Try something like this:
pyg = 'ay'
original = raw_input('Enter a word:')

while original and original.strip().upper() != 'QUIT':
    # loop body
    if len(original) > 0 and original.isalpha():
        print original
        word = original.lower()
        first = word[0]
        second = word[1]
        new_word = word + first + pyg
        new_word = new_word[1:len(new_word)]
        print new_word
    else:
        print 'empty'
    # read again, for next loop
    original = raw_input('Enter a word:')

A: try this
pyg = 'ay'

while True:

    original = raw_input('Enter a word:')

    if original.upper() == 'QUIT':
        break

    if len(original) > 0 and original.isalpha():
        print original
        word = original.lower()
        first = word[0]
        second = word[1]
        new_word = word + first + pyg
        new_word = new_word[1:len(new_word)]
        print new_word
    else:
        print 'empty'
        break

A: new_word = new_word[1:]

## it's better!

#to split the first word

nom = 'AlassaneAli'
mylist = list()
for i in nom:
    mylist.append(i)

for a in range(len(mylist)):
print(mylist[a])

print(mylist[1:])


text:
Q: Google Search Appliance Meta Value Arrays? I'm trying to write a Google Search Appliance emulator/wrapper that uses Lucene internally (so likely more questions to come), and I'm trying to understand how exactly the GSA handles meta values that seem to be arrays.  The GSA response includes:
<MT N="FIELD_NAME" V="VAL1 | VAL2 | VAL3"/>

A query with the following parameter will hit this result:
requiredfields=field_name:val1.field_name:val2

However, the GSA documentation mentions nothing about handling of arrays or multiple values for meta fields.  Can anyone confirm that this is standard GSA behavior, despite being apparently undocumented?  Or is it possible there is custom handling going on?
Unfortunately, I do not know what GSA version we're using or how to check.  I expect it was purchased between 2 and 5 years ago.

A: The new GSA version (7.0) allows for splitting up the values in metadata fields based on a seperator. In your case "|" seems to be the case.
That will instruct the GSA to index those values as separate field/values like FIELD_NAME=VAL1, FIELD_NAME=VAL2 etc.
From there on you can use these values in facets and/or fieldsearches with the requiresfields parameter.


text:
Q: Is it possible to develop chrome extensions with web3.js or Ethers.js? I want to develop an ethereum wallet chrome extension.
While developing a simple prototype, I noticed that the node.js module cannot be run directly from the chrome extension.
But I must use web3.js or ethers.js.
Is there any way to develop Chrome extensions using web3.js or ethers.js?

A: Of course, when we check the packages of the MetaMask we will see both web3 & ethjs libraries which is also an extension:
// ...
    "web3": "^..."
// ...
    "ethjs": "^...",
    "ethjs-contract": "^...",
    "ethjs-ens": "^...",
    "ethjs-query": "^...",
// ...

What we might do either we can compile it via a tool like browserify or import the minified browser version like this(I tested it is working with metamask-extension-provider package*):
import Web3 from 'web3/dist/web3.min.js';

// or

const Web3 = require('web3/dist/web3.min.js');

*A specific version of provider for extensions, check its docs.


text:
Q: JBPM: Add MySQL connector dependency to kie workbench [ver 6.2] I'm trying to add mysql connector dependency to kie workbench. I added it by uploading the jar to the artifact repository and adding the dependency by going to project settings. When the service task that uses the connector executes, it's not able to load the mysql's Driver class. Here's more detail on how I'm using the service task - Service task using Hibernate
When the service task execute I get this message on the workbench - Unexpected error encountered : [com.sample.bpmn.hello:36 - GetData:3] -- Unable to build entity manager factory
When I look at wildfly's server.log, it seems the jar didn't get added properly - java.lang.ClassNotFoundException: Could not load requested class : com.mysql.jdbc.Driver
When I add the dependency on the workbench, I see the following warnings. I'm not able to figure out what they mean -
Verification of class com.mysql.jdbc.integration.c3p0.MysqlConnectionTester failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.

Verification of class com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.

Verification of class com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker failed and will not be available for authoring. Please check the necessary external dependencies for this project are configured correctly.

Please let me know if more info is needed.
Much appreciated.
[PS] - I must say that I just got started with hibernate as well with no prior experience. So it could be a basic thing I'm missing there.


text:
Q: Problems with getters and setters in C++ I have a problem with my getters and setters in C++. I implemented a Queue, I also implememented a class Process. My queue saves processes. My class Process has two attributes: "Identifier" and "Time" and also has setters and getters. I set 80 as its Time. The problem then is that I want to modify the time to 50 and it doesn't change. I think that the problem is the Queue, but I don't know where. Heres is my fragment of code
Queue<Process> process;
Process x;
x.setIdentifier("Hi");
x.setTime(80);
process.enqueue(x);
process.getElementFront().setTime(50);
process.print();

Here is my Queue code:
class Queue{
private:
    int size;
    Node <L> *front;
public:
     .
     .
     .
    //front()

    L getElementFront() const{
        return this->front->getElement();
    }

Here is my Node code:
class Node{
private:
    L elem;
    Node *next;
public:
    .
    .
    .
    L getElement() {
        return this->elem;
    }

This is my Process Class:
class Process{
private:
    string identifier;
    int time;
public:
    Process(){
        identifier = "";
        time = 0;
    }
    string getIdentifier(){
        return identifier;
    }
    int getTime(){
        return time;
    }
    void setTime(int time){
        this->time = time;
    }
    void setIdentifier(string identifier){
        this->identifier = identifier;
    }

    friend ostream &operator<<(ostream &o, const Process &p);

  };
  ostream &operator<<(ostream &o, const Process &p){
    o<<"Identifier: "<<p.identifier<<"\n";
    o<<"Time:"<<p.time<<"\n";
  return o;
  }

The output of the first code is: Time = 80. I should be Time = 50, but time wasn't modified.

A: I believe your function "getElementFront" returns a copy of your element, So your queue will never be affected. You can write a function like "setElementFront(int)" to affect the element directly or something like this.


text:
Q: pytest: Test runs twice and is then stuck after having passed So I was trying to run some tests using pytest, where we want to get an HTML report and have inputs in the function that has to be done manually every time. Pytest is run with the following command: --capture=tee-sys --html=report.html --self-contained-html.
The function looks like this:
    def test_sn(self):
        response = get_endpoint(path)
        expected_sn = input("Please type the S/N on the label\n")
        assert expected_sn == response, "Entered S/N does not match the system's S/N"

If there is a discrepancy between the string returned by get_endpoint and the user input, it should be recorded in the HTML report. The problem is that when running this, the test is run twice if it passes and never finishes the second time, just gets stuck, the output looking like this:
Please type the S/N on the label
00001
PASSED                          [100%]Please type the S/N on the label
00001

What am I doing wrong? Is there another way than to use the --capture=tee-sys flag?
Thank you in advance!


text:
Q: NoClassDefFoundError with LWUIT I wrote a J2ME application in Eclipse by using LWUIT. In order to use LWUIT, I had to add LWUIT.jar to my project. The project compiles successfully, but could not run, giving a NoClassDefFoundError for the com.sun.lwuit.impl.midp.VKBImplementationFactory class.
I explored LWUIT.jar, and the VKBImplementationFactory.class file is present there. I don't get where I went wrong.

A: I investigated the issue further and I found the answer. See this EclipseME documentation page.


text:
Q: Find the Riemann sums of $f(x)=x^2$ on the closed interval [1,b] for b>1 Let $b>1$ be a real number and let $f$ be given on the interval $[1,b]$ by $f(x)=x^2$. A partition $P_n$ are defined for every postive whole number $n$ as follows:
$P_n: x_0=1, x_1=b^{\frac{1}{n}}, x_2=b^{\frac{2}{n}}+...+x_{n-1}=b^{\frac{n-1}{n}}, x_n=b^{\frac{n}{n}}=b $.
Show that the upper- and lower Riemann sum is given by:
$U(f,P_n)=b^{\frac{2}{n}}(\frac{b^{1/n}-1}{b^{3/n}-1})(b^3-1)$ and $L(f,P_n)=(\frac{b^{1/n}-1}{b^{3/n}-1})(b^3-1)$
Hint: Use the formula $\sum_{i=1}^{n}b^{3(i-1)/n}=\frac{b^{3}-1}{b^{3/n}-1}$
What I have tried so far:
$U(f,P_n)=f(u_1)\Delta x_1+f(u_2)\Delta x_2+f(u_3)\Delta x_3+...+$
$=1^2(b^{1/n}-1)+b^{2/n}(b^{2/n}-b^{1/n})+b^{4/n}(b^{3/n}-b^{2/n})+b^{6/n}(b^{4/n}-b^{3/n})+...+b^{\frac{2n-2}{n}}(b-b^{\frac{n-1}{n}})$
$=b^{1/n}-1+b^{4/n}-b^{3/n}+b^{7/n}-b^{6/n}+b^{10/n}-b^{9/n}+...+b^{3n-2/n}-b^{3n-3/n}$
From here, I am not able to see any "obvious" traits on the sequence


text:
Q: Клик по классу событие для extensions chrome Пересмотрел много разных страниц с инфой, но так и не понял можно ли сделать расширение для chrome которое при клике на определённое поле класса выводил бы alert.
файл подключения расширения manifest.json
{
     "manifest_version": 2,

     "name": "Тест",
     "description": "Тест",
     "version": "1.0",

     "browser_action": {
         "default_icon": "icon.png"

     },

     "content_scripts": [
     {
       "matches": [
         "https://google.com/*"
       ],
       "js": [
         "script.js"
       ]
     }   ]
}

A: Укажите контент скрипт и url по который его вставить в manifest.json

  "content_scripts": [
    {
      "matches": [
        "<all_urls>" //на всех страницах
      ],
      "js": [
        "src/inject/inject.js"
      ]
    }
  ]


text:
Q: Apple Match-O Linker Error / clang: error: no such file or directory - Xcode 11 I am working on a React Native application and whenever I try to build the application I am encountering these errors. I know there are many similar questions on this matter but the solutions given there are not working for me.
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTRestart.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libReactNativePermissions.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNCPushNotificationIOS.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNReanimated.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNGestureHandler.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNMixpanel.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNCAsyncStorage.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTAnimation.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNVectorIcons.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNReactNativeDocViewer.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNFS.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libCodePush.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNDocumentPicker.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNImagePicker.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNI18n.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNBlur.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libART.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTVideo.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTImage.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTLinking.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTNetwork.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTSettings.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTText.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTVibration.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNSpinkit.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNSentry.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNGeocoder.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRCTContacts.a'
clang: error: no such file or directory: '/Users/FaisalHussain/Library/Developer/Xcode/DerivedData/blonk-eatmzbgmhuzfadfqxgotpiqwsapb/Build/Products/Debug-iphonesimulator/libRNOpenAppSettings.a'

I have searched but I am still stuck here. I have tried linking using react-native link. I have tried deleting the DerivedData folder for the application. Hence I have tried everything but can't seem to find a solution for this. So I turned to you guys please suggest any solution to fix this. Looking forward to your answers. Thank you in advance.

A: If you're using cocoapods, which is very likely the case given the recent versions of rn, try the following:

*

*Enter the ios folder.

$ cd ios

*If you don't have cocoapods installed, try running:

$ gem install cocoapods # Try with `sudo` if it doesn't work.

You may also consider locking the cocoapods version for your project, read more here.

*Run pod install.

*Then make sure to open the file with the .xcworkspace extension.

Finally, try building again.

A: I have seen that you upgraded from 0.48 to 0.59. That is a lot of versions and a lot of breaking changes to jump to.
My suggestion, create a new, clean 0.59.10 project and then slowly move all your code and dependencies to the new one. There are so many things to try and check. Probably your header search paths are wrong or outdated.
Perhaps a dependency does not support your RN version anymore. Or maybe you have a missing library in the linked-libraries list.
To be honest, too many things to try. Just do a new project, from scratch, and start adding your dependencies one by one.

A: Can you go through following steps:
Delete node_modules
Delete package-lock.json
Delete ios/Pods directory
Delete Podfile.lock file

Then run following commands one by one from your terminal.
cd root/project directory
npm install
cd ios/ && pod install && cd ..

Then try to build your app
react-native run-ios


text:
Q: Cant access all files and directories on my Raspberry Pi from Notepad++ I can only see and access files saved in the home directory, and I need to edit files that are placed elsewhere on my Raspberry.

A: You can't edit other files, just with sudo commands. If you want to edit a file like this, you need to use: sudo nano <path to file>