Julia v0.6: loaded JLD file does not show full contents - julia
(Still) new to julia so bear with me. I have a file Pkg.jld that was saved with package versions from a julia v0.6 installation. I have the correct JLD installed but when I execute load("<path>/Pkgs.jld")["data"] the output is cut off. It prints
Dict{String,VersionNumber} with 139 entries:
"FFTW" => v"0.0.4"
"Gtk" => v"0.14.0"
... (more packages)
: => :
but it shows less than the claimed 139 entries. How can I see all the entries in the encoded dictionary?
You should get all entries by
show(stdout, "text/plain", yourdict)
Example:
julia> using Pkg; somedict = Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 61 entries:
"FFTW" => v"0.2.4"
"ForwardDiff" => v"0.10.0"
"Arpack" => v"0.3.0"
"Measurements" => v"1.0.2"
"Juno" => v"0.5.3"
"EllipsisNotation" => v"0.3.0"
"HTTP" => v"0.7.1"
"NPZ" => v"0.3.0"
"DataStructures" => v"0.14.0"
"Latexify" => v"0.5.1"
"SimpleWeightedGraphs" => v"1.1.0"
"PeriodicTable" => v"0.1.2"
"JLD2" => v"0.1.2"
"Knet" => v"1.1.1"
"DataFrames" => v"0.14.1"
"Distributions" => v"0.16.4"
"Helpers" => v"0.0.0"
"TimerOutputs" => v"0.4.0"
"IterativeSolvers" => v"0.7.1"
"HDF5" => v"0.10.2"
"Humanize" => v"1.0.0"
"LsqFit" => v"0.6.0"
⋮ => ⋮
julia> show(stdout, "text/plain", somedict)
Dict{String,Union{Nothing, VersionNumber}} with 61 entries:
"FFTW" => v"0.2.4"
"ForwardDiff" => v"0.10.0"
"Arpack" => v"0.3.0"
"Measurements" => v"1.0.2"
"Juno" => v"0.5.3"
"EllipsisNotation" => v"0.3.0"
"HTTP" => v"0.7.1"
"NPZ" => v"0.3.0"
"DataStructures" => v"0.14.0"
"Latexify" => v"0.5.1"
"SimpleWeightedGraphs" => v"1.1.0"
"PeriodicTable" => v"0.1.2"
"JLD2" => v"0.1.2"
"Knet" => v"1.1.1"
"DataFrames" => v"0.14.1"
"Distributions" => v"0.16.4"
"Helpers" => v"0.0.0"
"TimerOutputs" => v"0.4.0"
"IterativeSolvers" => v"0.7.1"
"HDF5" => v"0.10.2"
"Humanize" => v"1.0.0"
"LsqFit" => v"0.6.0"
"Polynomials" => v"0.5.1"
"ProgressMeter" => v"0.6.1"
"GPUArrays" => v"0.5.0"
"ApproxFun" => v"0.9.0"
"DistributedArrays" => v"0.5.1"
"CSV" => v"0.4.2"
"Revise" => v"0.7.12"
"Atom" => v"0.7.6"
"BenchmarkTools" => v"0.4.1"
"Optim" => v"0.17.1"
"ReverseDiff" => v"0.3.1"
"LinearOperators" => v"0.5.1"
"PyCall" => v"1.18.5"
"Traceur" => v"0.2.0"
"BandedMatrices" => v"0.5.2"
"DataFramesMeta" => v"0.4.0"
"JSON" => v"0.19.0"
"StatsBase" => v"0.25.0"
"IJulia" => v"1.13.0"
"Flux" => v"0.6.8"
"PyPlot" => v"2.6.3"
"Unitful" => v"0.12.0"
"StaticArrays" => v"0.9.2"
"DifferentialEquations" => v"5.3.1"
"Parameters" => v"0.10.1"
"UnicodePlots" => v"0.3.1"
"OnlineStats" => v"0.19.2"
"BlockBandedMatrices" => v"0.1.1"
"LightGraphs" => v"1.2.0"
"LinearMaps" => v"2.2.1"
"Query" => v"0.10.1"
"LaTeXStrings" => v"1.0.3"
"Rebugger" => v"0.1.4"
"OhMyREPL" => v"0.3.0"
"ProfileView" => v"0.4.0"
"AbstractTrees" => v"0.2.0"
"BlockArrays" => v"0.4.1"
"QuantumOptics" => v"0.6.1"
"Gtk" => v"0.16.4"
This in on Julia v1.0.1 but should basically work on v0.6 as well (remove the using Pkg and replace stdout -> STDOUT).
Related
Fedora 27 VTK 7.1.1 with Qt 5
I have an application that uses VTK and Qt 5. While running this I get following backtrace #0 0x00007fffec00a66b in raise () at /lib64/libc.so.6 #1 0x00007fffec00c381 in abort () at /lib64/libc.so.6 #2 0x00007fffec054a57 in __libc_message () at /lib64/libc.so.6 #3 0x00007fffec05b9aa in () at /lib64/libc.so.6 #4 0x00007fffec06490a in realloc () at /lib64/libc.so.6 #5 0x00007fffed5c6661 in QListData::realloc_grow(int) () at /lib64/libQt5Core.so.5 #6 0x00007fffed5c66ff in QListData::append(int) () at /lib64/libQt5Core.so.5 #7 0x00007fffed6856c0 in QList<QResourceRoot*>::append(QResourceRoot* const&) () at /lib64/libQt5Core.so.5 #8 0x00007fffed6814cd in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsigned char const*) () at /lib64/libQt5Core.so.5 #9 0x00007fffed558563 in _GLOBAL__sub_I_qrc_mimetypes.cpp () at /lib64/libQt5Core.so.5 #10 0x00007ffff7de5c13 in _dl_init () at /lib64/ld-linux-x86-64.so.2 #11 0x00007ffff7dd5f0a in _dl_start_user () at /lib64/ld-linux-x86-64.so.2 #12 0x0000000000000001 in () #13 0x00007fffffffdf5f in () #14 0x0000000000000000 in () It looks like there is some mismatch between QT 4 and 5 causing error in library initialization. So I checked the lddtree output simulator-ui => ./simulator-ui (interpreter => /lib64/ld-linux-x86-64.so.2) libvtkGUISupportQt.so.1 => /usr/lib64/vtk/libvtkGUISupportQt.so.1 libvtkInteractionStyle.so.1 => /usr/lib64/vtk/libvtkInteractionStyle.so.1 libvtkRenderingOpenGL2.so.1 => /usr/lib64/vtk/libvtkRenderingOpenGL2.so.1 libOSMesa.so.8 => /lib64/libOSMesa.so.8 libglapi.so.0 => /lib64/libglapi.so.0 libselinux.so.1 => /lib64/libselinux.so.1 libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 libLLVM-5.0.so => /lib64/libLLVM-5.0.so libffi.so.6 => /lib64/../lib64/libffi.so.6 libedit.so.0 => /lib64/../lib64/libedit.so.0 libncurses.so.6 => /lib64/libncurses.so.6 libtinfo.so.6 => /lib64/../lib64/libtinfo.so.6 libGLU.so.1 => /lib64/libGLU.so.1 libGL.so.1 => /lib64/libGL.so.1 libGLX.so.0 => /lib64/libGLX.so.0 libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 libz.so.1 => /lib64/libz.so.1 libjpeg.so.62 => /lib64/libjpeg.so.62 libpng16.so.16 => /lib64/libpng16.so.16 libtiff.so.5 => /lib64/libtiff.so.5 libjbig.so.2.1 => /lib64/libjbig.so.2.1 libvtkglew.so.1 => /usr/lib64/vtk/libvtkglew.so.1 libvtkIOImport.so.1 => /usr/lib64/vtk/libvtkIOImport.so.1 libQt5Svg.so.5 => /lib64/libQt5Svg.so.5 libQt5Charts.so.5 => /lib64/libQt5Charts.so.5 libmathematica++.so => /home/sensiaas/projects/senschedule/build/mathematica++/libmathematica++.so libboost_filesystem.so.1.64.0 => /lib64/libboost_filesystem.so.1.64.0 libboost_system.so.1.64.0 => /lib64/libboost_system.so.1.64.0 libboost_serialization.so.1.64.0 => /lib64/libboost_serialization.so.1.64.0 libvtkFiltersExtraction.so.1 => /usr/lib64/vtk/libvtkFiltersExtraction.so.1 libvtkFiltersStatistics.so.1 => /usr/lib64/vtk/libvtkFiltersStatistics.so.1 libvtkImagingFourier.so.1 => /usr/lib64/vtk/libvtkImagingFourier.so.1 libvtkalglib.so.1 => /usr/lib64/vtk/libvtkalglib.so.1 libvtkImagingCore.so.1 => /usr/lib64/vtk/libvtkImagingCore.so.1 libSM.so.6 => /lib64/libSM.so.6 libICE.so.6 => /lib64/libICE.so.6 libX11.so.6 => /lib64/libX11.so.6 libxcb.so.1 => /lib64/libxcb.so.1 libXau.so.6 => /lib64/libXau.so.6 libXext.so.6 => /lib64/libXext.so.6 libXt.so.6 => /lib64/libXt.so.6 * libQtGui.so.4 => /lib64/libQtGui.so.4 libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 libpcre.so.1 => /lib64/libpcre.so.1 libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 libfreetype.so.6 => /lib64/libfreetype.so.6 libbz2.so.1 => /lib64/libbz2.so.1 libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 libXi.so.6 => /lib64/libXi.so.6 libXrender.so.1 => /lib64/libXrender.so.1 libXrandr.so.2 => /lib64/libXrandr.so.2 libXfixes.so.3 => /lib64/libXfixes.so.3 libXcursor.so.1 => /lib64/libXcursor.so.1 libXinerama.so.1 => /lib64/libXinerama.so.1 libfontconfig.so.1 => /lib64/libfontconfig.so.1 libexpat.so.1 => /lib64/libexpat.so.1 * libQtNetwork.so.4 => /lib64/libQtNetwork.so.4 libssl.so.10 => /lib64/libssl.so.10 libcrypto.so.10 => /lib64/libcrypto.so.10 * libQtCore.so.4 => /lib64/libQtCore.so.4 libvtkRenderingCore.so.1 => /usr/lib64/vtk/libvtkRenderingCore.so.1 libvtkFiltersSources.so.1 => /usr/lib64/vtk/libvtkFiltersSources.so.1 libvtkFiltersGeneral.so.1 => /usr/lib64/vtk/libvtkFiltersGeneral.so.1 libvtkCommonComputationalGeometry.so.1 => /usr/lib64/vtk/libvtkCommonComputationalGeometry.so.1 libvtkCommonColor.so.1 => /usr/lib64/vtk/libvtkCommonColor.so.1 libvtkFiltersGeometry.so.1 => /usr/lib64/vtk/libvtkFiltersGeometry.so.1 libvtkFiltersCore.so.1 => /usr/lib64/vtk/libvtkFiltersCore.so.1 libvtkIOImage.so.1 => /usr/lib64/vtk/libvtkIOImage.so.1 libvtkCommonExecutionModel.so.1 => /usr/lib64/vtk/libvtkCommonExecutionModel.so.1 libvtkCommonDataModel.so.1 => /usr/lib64/vtk/libvtkCommonDataModel.so.1 libvtkCommonTransforms.so.1 => /usr/lib64/vtk/libvtkCommonTransforms.so.1 libvtkCommonMisc.so.1 => /usr/lib64/vtk/libvtkCommonMisc.so.1 libvtkCommonMath.so.1 => /usr/lib64/vtk/libvtkCommonMath.so.1 libvtkCommonSystem.so.1 => /usr/lib64/vtk/libvtkCommonSystem.so.1 libvtkCommonCore.so.1 => /usr/lib64/vtk/libvtkCommonCore.so.1 libvtksys.so.1 => /usr/lib64/vtk/libvtksys.so.1 libvtkDICOMParser.so.1 => /usr/lib64/vtk/libvtkDICOMParser.so.1 libvtkmetaio.so.1 => /usr/lib64/vtk/libvtkmetaio.so.1 libQt5Widgets.so.5 => /lib64/libQt5Widgets.so.5 libQt5Gui.so.5 => /lib64/libQt5Gui.so.5 libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 libgraphite2.so.3 => /lib64/libgraphite2.so.3 libQt5Core.so.5 => /lib64/libQt5Core.so.5 libsystemd.so.0 => /lib64/libsystemd.so.0 libgcrypt.so.20 => /lib64/libgcrypt.so.20 libgpg-error.so.0 => /lib64/libgpg-error.so.0 liblzma.so.5 => /lib64/liblzma.so.5 liblz4.so.1 => /lib64/liblz4.so.1 libicui18n.so.57 => /lib64/libicui18n.so.57 libicuuc.so.57 => /lib64/libicuuc.so.57 libicudata.so.57 => /lib64/libicudata.so.57 libpcre2-16.so.0 => /lib64/libpcre2-16.so.0 libstdc++.so.6 => /lib64/libstdc++.so.6 libpthread.so.0 => /lib64/libpthread.so.0 librt.so.1 => /lib64/librt.so.1 libdl.so.2 => /lib64/libdl.so.2 libuuid.so.1 => /lib64/libuuid.so.1 libm.so.6 => /lib64/libm.so.6 libgcc_s.so.1 => /lib64/libgcc_s.so.1 libc.so.6 => /lib64/libc.so.6 It shows the Qt4 dependencies along with Qt5 dependencies. Then I checked the Qt dependencies of libvtkGUISupportQt.so. That shows it depends on Qt4 only. $ ldd /usr/lib64/vtk/libvtkGUISupportQt.so.1 | grep -i qt libQtGui.so.4 => /lib64/libQtGui.so.4 (0x00007f153b7bd000) libQtNetwork.so.4 => /lib64/libQtNetwork.so.4 (0x00007f153b46f000) libQtCore.so.4 => /lib64/libQtCore.so.4 (0x00007f153af6b000) In vtk mailing list They say setting the variable VTK_QT_VERSION to "5" should work. But I doubt because the libvtkGUISupportQt.so depends on Qt4 as compiled. However I set that variable in my CMakeLists.txt. And as expected it didn't work. set(VTK_QT_VERSION "5" CACHE STRING "Expected Qt version") mark_as_advanced(VTK_QT_VERSION) FIND_PACKAGE(VTK 7.0 REQUIRED COMPONENTS vtkGUISupportQt vtkIOImport) message(STATUS ${VTK_MODULES_DIR}) INCLUDE(${VTK_USE_FILE}) # Find the QtWidgets library FIND_PACKAGE(Qt5 COMPONENTS Core Widgets Svg Charts REQUIRED) So now what is the solution ? I once heard VTK 7 links to Qt5. So was that wrong ? However in my Mac it worked fine even before 3 months. Now my Mac uses Vtk 8 with Qt5 (default). May be it was Vtk 7 with Qt5 few months back. I don't know because I have done some updates very recently. I prefer installing with dnf So that I can easily ship. Both Vtk and Qt are installed with dnf (in Fedora) and brew (in Mac) But If I now compile and install Vtk8 from source would that conflict ? Another tricky solution could be bypass QVTKWidget and create a QWidget that does the same job as QVTKWidget. If that is easy. I don't know how feasible that is. Related Bug Report While building Vtk with Qt5 there may be issues with other dependencies (I don't know, may be with python 3). But so far libvtkGUISupportQt can be compiled with Qt5. So I think there can be both libvtkGUISupportQt4 and libvtkGUISupportQt5 packaged in the binary distribution. The first one can be used for the dependent packages that have not been worked on yet.
QT symbol lookup error
When I run qtcreator from the command line, I get the following error: qtcreator: symbol lookup error: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: undefined symbol: _ZN16QLoggingCategoryD1Ev If I type nm -u /usr/lib/x86_64-linux-gnu/libQt5Network.so.5 I get no symbols The system is ubuntu 16.10 Edit: as requested by G.M., the results of ldd qtcreator are listed as below linux-vdso.so.1 => (0x00007ffc73fc9000) libExtensionSystem.so.1 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/qtcreator/libExtensionSystem.so.1 (0x00007f8298dc8000) libAggregation.so.1 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/qtcreator/libAggregation.so.1 (0x00007f8298bc2000) libUtils.so.1 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/qtcreator/libUtils.so.1 (0x00007f8298818000) libQt5Widgets.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libQt5Widgets.so.5 (0x00007f8297fc9000) libQt5Gui.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libQt5Gui.so.5 (0x00007f8297820000) libQt5Concurrent.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libQt5Concurrent.so.5 (0x00007f829761a000) libQt5Network.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libQt5Network.so.5 (0x00007f82972bc000) libQt5Core.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libQt5Core.so.5 (0x00007f8296ba0000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f82968fb000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f82966de000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f829635b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8296052000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8295e3c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8295a72000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f829586e000) /lib64/ld-linux-x86-64.so.2 (0x000055c6ee10e000) libQt5Qml.so.5 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/qtcreator/../Qt/lib/libQt5Qml.so.5 (0x00007f8295274000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f829505a000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8294e51000) libicui18n.so.56 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libicui18n.so.56 (0x00007f82949b7000) libicuuc.so.56 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libicuuc.so.56 (0x00007f82945fe000) libicudata.so.56 => /home/milo/Qt5.7.0/Tools/QtCreator/bin/./../lib/Qt/lib/libicudata.so.56 (0x00007f8292c1b000) libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f8292a19000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f8292707000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f82924de000) libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f82922db000) libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f82920d7000) libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f8291ed0000) libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f8291ccd000) libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f8291a9d000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f829188b000) libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f8291688000) libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f8291481000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f829127f000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8290f45000) libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f8290d2b000) libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f8290b26000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f8290904000) libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f82906fd000) libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f82904ee000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f829027d000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8290079000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f828fe72000)
Having trouble with Symfony2 uploading file from external program - 'mimeType' => 'application/octet-stream'
I have a Symfony2 endpoint that needs to accept a post request with a few text parameters and a zip file delivered by a 3rd party program. For quick development I started out by just using a Chrome POST plugin to spoof sending the form data. I was able to retrieve the file just fine when using that method. However, when I switched to the 3rd party Windows application for uploading reports, I'm no longer able to retrieve the file. Instead of figuring out that it's a zip file, I now get mimeType' => 'application/octet-stream', and the file size is 0. I read here in the following link that I needed to make sure my post_max_size and upload_max_filesize were large enough to handle the file. Can't upload image with mime-type "application/octet-stream" in Symfony2 I didn't want to mess around, so I set it to 100mb, but still no luck. Here is a dump of the Request: [2016-08-24 10:15:48] app.INFO: Request dump: Symfony\Component\HttpFoundation\Request::__set_state(array( 'attributes' => Symfony\Component\HttpFoundation\ParameterBag::__set_state(array( 'parameters' => array ( '_format' => 'xml', '_controller' => 'Company\\Bundle\\CompanyBundle\\Controller\\DefaultController::cloudTransferReport', '_route' => 'hg_cloudtransfer_report', '_route_params' => array ( '_format' => 'xml', ), '_method' => Sensio\Bundle\FrameworkExtraBundle\Configuration\Method::__set_state(array( 'methods' => array ( 0 => 'POST', 1 => 'GET', ), )), ), )), 'request' => Symfony\Component\HttpFoundation\ParameterBag::__set_state(array( 'parameters' => array ( 'submitter' => 'hgis', 'version' => '5.1.26.0', 'userName' => 'admin', 'password' => 'kitten', ), )), 'query' => Symfony\Component\HttpFoundation\ParameterBag::__set_state(array( 'parameters' => array ( ), )), 'server' => Symfony\Component\HttpFoundation\ServerBag::__set_state(array( 'parameters' => array ( 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SSL_TLS_SNI' => 'example.com', 'REDIRECT_STATUS' => '200', 'HTTPS' => 'on', 'SSL_TLS_SNI' => 'example.com', 'CONTENT_TYPE' => 'multipart/form-data, boundary=AaBbCcDdHhGg40', 'HTTP_USER_AGENT' => 'Some software v 5.1.26.0', 'HTTP_HOST' => 'example.com', 'CONTENT_LENGTH' => '3592731', 'HTTP_CACHE_CONTROL' => 'no-cache', 'PATH' => '/usr/bin:/bin:/usr/sbin:/sbin', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache/2.4.18 (Unix) PHP/5.5.36 LibreSSL/2.2.7', 'SERVER_NAME' => 'example.com', 'SERVER_ADDR' => '192.168.1.100', 'SERVER_PORT' => '443', 'REMOTE_ADDR' => '192.168.1.223', 'DOCUMENT_ROOT' => '/Users/user/Documents/symphony/cpsrecall/web', 'REQUEST_SCHEME' => 'https', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/Users/user/Documents/symphony/cpsrecall/web', 'SERVER_ADMIN' => 'chris#yourcontactpoint.com', 'SCRIPT_FILENAME' => '/Users/user/Documents/symphony/cpsrecall/web/app.php', 'REMOTE_PORT' => '51248', 'REDIRECT_URL' => '/hg/cloudtransfer/upload-report', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'POST', 'QUERY_STRING' => '', 'REQUEST_URI' => '/hg/cloudtransfer/upload-report', 'SCRIPT_NAME' => '/app.php', 'PHP_SELF' => '/app.php', 'REQUEST_TIME_FLOAT' => 1472055346.6129999, 'REQUEST_TIME' => 1472055346, ), )), 'files' => Symfony\Component\HttpFoundation\FileBag::__set_state(array( 'parameters' => array ( 'file1' => Symfony\Component\HttpFoundation\File\UploadedFile::__set_state(array( 'test' => false, 'originalName' => '00000003-1.zip', 'mimeType' => 'application/octet-stream', 'size' => 0, 'error' => 1, )), ), )), 'cookies' => Symfony\Component\HttpFoundation\ParameterBag::__set_state(array( 'parameters' => array ( ), )), 'headers' => Symfony\Component\HttpFoundation\HeaderBag::__set_state(array( 'headers' => array ( 'content-type' => array ( 0 => 'multipart/form-data, boundary=AaBbCcDdHhGg40', ), 'user-agent' => array ( 0 => 'Some software v 5.1.26.0', ), 'host' => array ( 0 => 'example.com', ), 'content-length' => array ( 0 => '3592731', ), 'cache-control' => array ( 0 => 'no-cache', ), 'x-php-ob-level' => array ( 0 => 1, ), ), 'cacheControl' => array ( 'no-cache' => true, ), )), 'content' => '', 'languages' => NULL, 'charsets' => NULL, 'encodings' => NULL, 'acceptableContentTypes' => NULL, 'pathInfo' => '/hg/cloudtransfer/upload-report', 'requestUri' => '/hg/cloudtransfer/upload-report', 'baseUrl' => '', 'basePath' => NULL, 'method' => 'POST', 'format' => NULL, 'session' => Symfony\Component\HttpFoundation\Session\Session::__set_state(array( 'storage' => Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage::__set_state(array( 'bags' => array ( 'attributes' => Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::__set_state(array( 'name' => 'attributes', 'storageKey' => '_sf2_attributes', 'attributes' => array ( ), )), 'flashes' => Symfony\Component\HttpFoundation\Session\Flash\FlashBag::__set_state(array( 'name' => 'flashes', 'flashes' => array ( ), 'storageKey' => '_sf2_flashes', )), ), 'started' => false, 'closed' => false, 'saveHandler' => Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy::__set_state(array( 'handler' => SessionHandler::__set_state(array( )), 'wrapper' => true, 'active' => false, 'saveHandlerName' => 'files', )), 'metadataBag' => Symfony\Component\HttpFoundation\Session\Storage\MetadataBag::__set_state(array( 'name' => '__metadata', 'storageKey' => '_sf2_meta', 'meta' => array ( 'c' => 0, 'u' => 0, 'l' => 0, ), 'lastUsed' => NULL, 'updateThreshold' => '0', )), )), 'flashName' => 'flashes', 'attributeName' => 'attributes', )), 'locale' => NULL, 'defaultLocale' => 'en', )) [] [] and for those who don't want to read that big long line, here's just the FileBag: [2016-08-24 10:15:48] app.INFO: file1dump: Symfony\Component\HttpFoundation\File\UploadedFile::__set_state(array( 'test' => false, 'originalName' => '00000003-1.zip', 'mimeType' => 'application/octet-stream', 'size' => 0, 'error' => 1, )) [] [] Here is my code up that should grab the file, but perhaps I'm going about it wrong: public function cloudTransferReport(Request $request) { $logger = $this->get('logger'); $em = $this->getDoctrine()->getManager(); $data = $request->request; $files = $request->files; $submitter = $data->get('submitter'); $version = $data->get('version'); $memberName = $data->get('userName'); $password = $data->get('password'); $file1 = $files->get('file1'); $logger->info("file string: " . var_export($stuff, true)); $logger->info("file1dump: " . var_export($file1, true)); If you need more code from that controller let me know, but I thought I should at least be able to have the file in memory at this point.
Ok Mac users who run into an issue like this, especially those who have used homebrew, and may or may not have more than one version of PHP installed. You may have more than one php.ini file on your computer. I ran the php --ini, and it came up with Loaded Configuration File: /usr/local/etc/php/5.6/php.ini. IT WAS WRONG! Ends up the real php.ini file that Apache was using was in /etc/php.ini, so please, please, please don't waste a whole day banging your head against the keyboard. Make sure you're in the file that Apache is actually using! That is all. I'm going to crawl under my desk and cry now.
Wordpress and the syntax
$users = get_users(array('role' => '','orderby' => 'meta_value','meta_key' => 'description' ,'order' => 'ASC','meta_query' => array(array('orderby' => 'meta_value' ,'meta_key'=> 'nummer','order' => 'ASC', )))); Working on a website and need to sort players by numbers and position they play in floorball. The code work separately but not together can anyone help?
Could you be more specific please. Anyway you have a comma in addition at the end. $users = get_users(array('role' => '','orderby' => 'meta_value','meta_key' => 'description','order' => 'ASC','meta_query' => array(array('orderby' => 'meta_value','meta_key' => 'nummer','order' => 'ASC'))));
woocommerce get_woocommerce_currency_symbol()
I am developing an extension for woocommerce WordPress plugin. I would like to display the currency symbol outside of the loop in a custom function I have the following: function my_function( ) { global $woocommerce; echo get_woocommerce_currency_symbol(); } I am not sure why but this doesn't output the symbol? Am I missing something?
Your code should work, which means the issue might be in the database. You can check these 2 functions:get_woocommerce_currency() and get_woocommerce_currency_symbol() from the WooCommerce docs that shows that you are using the functions correct. What is left is for you to start some troubleshooting steps to see what causes the error: What is get_option('woocommerce_currency') returning? If nothing, then you have no currency set and that is why you get nothing from get_woocommerce_currency_symbol(); What happens if you add a currency as a parameter to get_woocommerce_currency_symbol? it gets displayed? something like echo get_woocommerce_currency_symbol("USD"); You should add to your script some error handling lines, to inform the user that he needs to have the currency set before using your extension.
use this to show price with currency $product->get_price_html(); OR use echo get_woocommerce_currency_symbol(); to show the currency only
You should always price under wc_price function, it will automatically add currency symbol along with the default span of woo commerce For ex.. $product_price = 60; echo wc_price($product_price);
get_option('woocommerce_currency') will help you lot.
function get_woocommerce_currency_symbol( $currency = '' ) { if ( ! $currency ) { $currency = get_woocommerce_currency(); } $symbols = apply_filters( 'woocommerce_currency_symbols', array( 'AED' => 'د.إ', 'AFN' => '؋', 'ALL' => 'L', 'AMD' => 'AMD', 'ANG' => 'ƒ', 'AOA' => 'Kz', 'ARS' => '$', 'AUD' => '$', 'AWG' => 'ƒ', 'AZN' => 'AZN', 'BAM' => 'KM', 'BBD' => '$', 'BDT' => '৳ ', 'BGN' => 'лв.', 'BHD' => '.د.ب', 'BIF' => 'Fr', 'BMD' => '$', 'BND' => '$', 'BOB' => 'Bs.', 'BRL' => 'R$', 'BSD' => '$', 'BTC' => '฿', 'BTN' => 'Nu.', 'BWP' => 'P', 'BYR' => 'Br', 'BZD' => '$', 'CAD' => '$', 'CDF' => 'Fr', 'CHF' => 'CHF', 'CLP' => '$', 'CNY' => '¥', 'COP' => '$', 'CRC' => '₡', 'CUC' => '$', 'CUP' => '$', 'CVE' => '$', 'CZK' => 'Kč', 'DJF' => 'Fr', 'DKK' => 'DKK', 'DOP' => 'RD$', 'DZD' => 'د.ج', 'EGP' => 'EGP', 'ERN' => 'Nfk', 'ETB' => 'Br', 'EUR' => '€', 'FJD' => '$', 'FKP' => '£', 'GBP' => '£', 'GEL' => 'ლ', 'GGP' => '£', 'GHS' => '₵', 'GIP' => '£', 'GMD' => 'D', 'GNF' => 'Fr', 'GTQ' => 'Q', 'GYD' => '$', 'HKD' => '$', 'HNL' => 'L', 'HRK' => 'Kn', 'HTG' => 'G', 'HUF' => 'Ft', 'IDR' => 'Rp', 'ILS' => '₪', 'IMP' => '£', 'INR' => '₹', 'IQD' => 'ع.د', 'IRR' => '﷼', 'IRT' => 'تومان', 'ISK' => 'kr.', 'JEP' => '£', 'JMD' => '$', 'JOD' => 'د.ا', 'JPY' => '¥', 'KES' => 'KSh', 'KGS' => 'сом', 'KHR' => '៛', 'KMF' => 'Fr', 'KPW' => '₩', 'KRW' => '₩', 'KWD' => 'د.ك', 'KYD' => '$', 'KZT' => 'KZT', 'LAK' => '₭', 'LBP' => 'ل.ل', 'LKR' => 'රු', 'LRD' => '$', 'LSL' => 'L', 'LYD' => 'ل.د', 'MAD' => 'د.م.', 'MDL' => 'MDL', 'MGA' => 'Ar', 'MKD' => 'ден', 'MMK' => 'Ks', 'MNT' => '₮', 'MOP' => 'P', 'MRO' => 'UM', 'MUR' => '₨', 'MVR' => '.ރ', 'MWK' => 'MK', 'MXN' => '$', 'MYR' => 'RM', 'MZN' => 'MT', 'NAD' => '$', 'NGN' => '₦', 'NIO' => 'C$', 'NOK' => 'kr', 'NPR' => '₨', 'NZD' => '$', 'OMR' => 'ر.ع.', 'PAB' => 'B/.', 'PEN' => 'S/.', 'PGK' => 'K', 'PHP' => '₱', 'PKR' => '₨', 'PLN' => 'zł', 'PRB' => 'р.', 'PYG' => '₲', 'QAR' => 'ر.ق', 'RMB' => '¥', 'RON' => 'lei', 'RSD' => 'дин.', 'RUB' => '₽', 'RWF' => 'Fr', 'SAR' => 'ر.س', 'SBD' => '$', 'SCR' => '₨', 'SDG' => 'ج.س.', 'SEK' => 'kr', 'SGD' => '$', 'SHP' => '£', 'SLL' => 'Le', 'SOS' => 'Sh', 'SRD' => '$', 'SSP' => '£', 'STD' => 'Db', 'SYP' => 'ل.س', 'SZL' => 'L', 'THB' => '฿', 'TJS' => 'ЅМ', 'TMT' => 'm', 'TND' => 'د.ت', 'TOP' => 'T$', 'TRY' => '₺', 'TTD' => '$', 'TWD' => 'NT$', 'TZS' => 'Sh', 'UAH' => '₴', 'UGX' => 'UGX', 'USD' => '$', 'UYU' => '$', 'UZS' => 'UZS', 'VEF' => 'Bs F', 'VND' => '₫', 'VUV' => 'Vt', 'WST' => 'T', 'XAF' => 'Fr', 'XCD' => '$', 'XOF' => 'Fr', 'XPF' => 'Fr', 'YER' => '﷼', 'ZAR' => 'R', 'ZMW' => 'ZK', ) ); $currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : ''; return apply_filters( 'woocommerce_currency_symbol', $currency_symbol, $currency ); } [1]: http://woocommerce.wp-a2z.org/oik_api/get_woocommerce_currency_symbol/
You want to show the WooCommerce curency symbol in your Custom WordPress Theme or Plugin but don’t know how? Worry no more. Here is all you need to know. For Custom WooCommerce WordPress Plugin: function show_currency_symbol( ) { global $woocommerce; echo get_woocommerce_currency_symbol(); } For Custom WooCommerce WordPress Theme: <?php global $woocommerce; echo get_woocommerce_currency_symbol(); ?>
This short code uses the woocommerce_price function; it will automatically add currency symbol along with the default span of woo commerce. /* Custom price */ $price = 100; echo woocommerce_price($price);
You can change the symbol in you ftp files by going to WP-Content > Plugins > Woocommerce > Includes > WC.Core.Functions.php it starts on line 662 for me.