uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
static-libraries@linker@83
static-libraries -- a set of variables and functions packed in a file read by the @placeholder during the program build and included in the resulting executable .
{ "confidence": [ 34.57889938354492, 33.52486801147461, 31.32625961303711, 31.14311981201172, 31.07766342163086, 30.963483810424805, 30.280216217041016, 30.108396530151367, 29.220335006713867, 29.095184326171875, 29.051191329956055, 28.973724365234375, 28.62588882446289, 28.608966827392578, 28.331714630126953, 28.323928833007812, 28.133228302001953, 28.056156158447266, 28.056156158447266, 27.855913162231445, 27.668716430664062, 27.496540069580078, 27.357471466064453, 27.330524444580078, 27.29718780517578, 27.287158966064453, 27.287158966064453, 27.287158966064453, 27.127403259277344, 26.850711822509766, 26.838727951049805, 26.795269012451172, 26.678386688232422, 26.6037540435791, 26.51224136352539, 26.441360473632812, 26.4371280670166, 26.431243896484375, 26.270610809326172, 26.056865692138672, 26.016063690185547, 25.874134063720703, 25.871322631835938, 25.871322631835938, 25.72498321533203, 25.72498321533203, 25.635074615478516, 25.54037094116211, 25.44255828857422, 25.393436431884766, 25.369190216064453, 25.349735260009766, 25.349735260009766, 25.293228149414062, 25.291975021362305, 25.291975021362305, 25.291975021362305, 25.217113494873047, 25.189552307128906, 25.164230346679688, 25.139463424682617, 25.04684829711914, 25.04684829711914, 25.04559326171875, 24.98782730102539, 24.923797607421875, 24.898160934448242, 24.869155883789062, 24.869155883789062, 24.869155883789062, 24.806346893310547, 24.674304962158203, 24.674304962158203, 24.6077823638916, 24.567859649658203, 24.43099594116211, 24.42951202392578, 24.35957145690918, 24.345325469970703, 24.334945678710938, 24.297395706176758, 24.26030158996582, 24.223304748535156, 24.202682495117188, 24.202682495117188, 24.15061378479004, 24.134288787841797, 24.06503677368164, 24.042577743530273, 24.03795623779297, 24.03795623779297, 23.928756713867188, 23.90230941772461, 23.88071632385254, 23.88071632385254, 23.863204956054688, 23.85738182067871, 23.85738182067871, 23.85738182067871, 23.844097137451172 ], "content": [ "Yes you need static-libraries to build a statically linked executable .", "Static libraries must be linked into the final executable .", "Static libraries are just simple archives of compiled objects and so when you build a static library there will be no linking process as making a shared library or an executable will do .", "The build is structured with multiple static-libraries .", "don t have static-libraries as build products at all .", "unreferenced functions in static-libraries .", "If you want to build your application with static IPP libraries and at the same time decrease application executable size you need to limit the CPU optimization included into your application simultaneously .", "The solution Testbed contains several static-libraries and an executable .", "Some static-libraries are prebuilt and not included in the solution e.g .", "These are linked with the libraries containing C standard-library functions to form an executable binary .", "I have read about static and dynamic libraries .", "A bundle is a directory that may contain all manner of files including resource files xib executable files and static-libraries .", "Add the static library as a framework under Build Phases Link Binary With Libraries and add the libLibraryName.a file for whatever static library you want to use .", "Use CMAKE ARCHIVE OUTPUT DIRECTORY for the static-libraries .", "For a static link all of the obj files that an executable uses are combined into one file .", "Is it possible to have xib files and other resources included in static-libraries that can be referenced by code in that same library and if so how", "Note here that static-libraries are linked in like object code so it does not make any difference if you create one big executable or multiple static-libraries and an executable .", "However what I want is to build a static library from registry.cpp and member.cpp and link that against the executable built from shell.cpp .", "How to only build a static library with clion http : www.jetbrains.com clion without having an executable", "Libraries : the static library file that was created for me when I used CMake to build OpenCV called ippicvmt.lib is included correctly and loads without issue .", "When building a program with static-libraries you need to link in more libraries .", "In the same area find User Header Search Paths and add : .. . .. . PROJECT TEMP DIR . . UninstalledProducts include .. . .. . This tells Xcode to look for static-libraries within the intermediate build folder that Xcode creates during the build-process .", "I have included the NSDictionary category header file and the implementation file of the extension is definitely in the compiled resources list of the static library .", "All libraries you link into a statically linked program must be the static variant .", "This is because of the nature of static-libraries .", "We build two static-libraries let s call them LibA and LibB .", "I am using static linking to build my libraries for a qt app .", "I d like to build both static and shared-libraries in a project .", "Possible duplicate of Linking static-libraries to other static-libraries http : stackoverflow.com questions 2157629 linking-static-libraries-to-other-static-libraries", "Read this : Building Objective-C static-libraries with categories https : developer.apple.com library ios qa qa1490 index.html", "If you have a static library that depends on another static library then you need to build with the other library as well for the final executable or dynamic library .", "AccessLib : A static library build using cryptopp functions .", "Not 100 automatic but it will work if you somehow would add a reference to the static variable from any code or variables that are included in the application .", "@ManishShukla The question is specifically about static-libraries", "Use Lib command something like lib OUT : filename.lib input1.lib input2.lib ... . .. . .. . This is the reference page https : msdn.microsoft.com en-us library 7ykb2k5f.aspx .. . .. . And this may help : Linking static-libraries to other static-libraries http : stackoverflow.com questions 2157629 linking-static-libraries-to-other-static-libraries", "Originally there were only static-libraries .", "While the dynamic libfoo.so and static libfoo.a libraries have the same functions in them they are different format files and so you need the matching type for your program .", "I actually have 4 other libraries I build that are included that look fine appear black but one that did not .", "A lib files is read by the linker and a dll file is used during execution .", "Afaik dlsym doesn t work with functions included in a static library .", "Is the linker still able to eliminate unused library functions from the output executable when the library is directly included in this way", "I have a shared library-project that is built from 4 static-libraries .a and one object .o file .", "This tells the scheme to compile the libraries for the static library whenever you build your app .", "This works but doesn t build static versions of boost libraries maybe i am wrong", "And for that you need static-libraries .", "libboost xxxx.lib are static Boost libraries .", "I have a set of static-libraries .a and I want to make an OSX framework which combines all of this libraries .", "A static library is a single file that contains classes code and variables that were linked together by the library creator .", "Static libraries in Xcode 4 1 1 : stackoverflow.com questions 6074576 static-libraries-in-xcode-4 http : stackoverflow.com questions 6074576 static-libraries-in-xcode-4 8123606 8123606", "You do have to link-to all the libraries depended by other libraries directly used by your program in the linking phase .. . When linking to static-libraries you should order them according to dependency .", "I read in this http : stackoverflow.com a 311889 4480139 SO answer that .. . .. . When you statically link a file into an executable the contents of that file are included at link time .", "Have you build static Qt already", "Is there a way to build a full libpq static library", "I followed my logic and answers I saw here and added the .a file in the project s Properties - Build - Linker - libraries .", "Can distributed static-libraries also contain headers", "Static library usually is not linked to any of external libraries .", "Frameworks are not used on the iPhone static-libraries are employed in their place .", "the preprocessor the program or part of the compiler which read all the lines beginning with a and replace macro and insert included headers .", "Whenever you have a static LIB file and see all it s exported functions in a DLL that uses this LIB file to build the solution is simple : .. . .. . Recompile the static LIB project without declspec dllexport and then recompile the DLL project .", "The vmalloc.h is included in the build of libvmalloc.a .", "Are the functions that work calling other functions in the libraries", "static library names for finer granularity on which libraries to hide symbols from .", "Also --exclude-libs is only applicable on static libs not on dynamic libraries .", "In case of shared-libraries this doesn t necessarily mean that the exact same libraries will be used during program execution that depends on the configuration of the dynamic loader .", "Remember when you were told to set Skip Install to YES for static-libraries", "A LIB file is used to build your program it only exists on your build machine and you don t ship it .", "For each .o file of the libraries that is included by the master library the following error is reported for example the FBConnectGlobal.o file : .. . .. . In the end Xcode tells that the build has succeeded .", "Ship all the static-libraries separately .", "Static libraries are bundles of compiled objects .", "Static libraries have their problems as well .", "So I think that library was compiled properly and all GOST engine functions were included in the static library .", "What is the proper way to build programs that use shared-libraries that also have dependancies on static-libraries", "What is the proper way to build programs that use shared-libraries that also have dependancies on static-libraries", "It turns out that the linker isn t clever enough to figure out what default runtime library is needed for the executable if only static-libraries are given to link with no discrete object-files .", "So libraries can be either static and dynamic and frameworks are simply a group of libraries which can also be either dynamic or static is that the correct understanding", "There are several good questions on creating and using static-libraries here including the following : .. . .. . Implementing Static Libraries In iPhone http : stackoverflow.com questions 1124579 implementing-static-libraries-in-iphone .. . How SHOULD you make and use static-libraries on the iPhone http : stackoverflow.com questions 1563623 how-should-you-make-and-use-static-libraries-on-the-iphone .. . Creating static library for iPhone http : stackoverflow.com questions 348051 creating-static-library-for-iphone .. . .. . For examples of static-libraries out there I d direct you to the Three20 http : github.com joehewitt three20 and Core Plot http : code.google.com p core-plot projects .", "A similar question I asked a while ago : What is the correct way to set build configurations in an ios project using static-libraries for creating an archive in xcode 4", "Third party static-libraries should never link other third party static-libraries themselves .", "If they were dynamic libraries then that s fine but they are static-libraries i.e .", "We have a program that links in a number of static-libraries which may or may not define a number of symbols depending on compilation options .", "In dll s are things like in an exe there can be any kind of data imports exports read-write executable sections but the difference is that an exe file exports only the entry-point function but dll s export one many functions .", "So my recommendation is to completely remove the value at project level for Build Active Architecture Only from all of your static-libraries project build settings .", "In my case solved a problem of libraries depending on another built dynamic library which was depending on a static library : the depending libraries were also trying to link-to this static library .", "But this makes the executables static I want to have static-libraries .so .a .", "Static libraries are not delivered in app bundles you are thinking of static frameworks perhaps", "What do you mean by function is not getting included in executable and the callback function address is present which matches the address in map file", "Yes you can create static library see Blog Using static-libraries with iPhone SDK http : blog.stormyprods.com 2008 11 using-static-libraries-with-iphone-sdk.html", "Note that I d tried this before when there was no workspace and no common build dir and the result was that XCode couldn t find the .a file during link .", "Since this temporary build directory exists for both Debug and Release configurations you only need a single path for Xcode to search for static-libraries .", "I ll build a static version of Qt and try with that .", "I m trying to build a static cryptopp library for ios .", "In a static library the lib file contains the actual object code for the functions provided by the library .", "You then link the DLL against the .exp file for the executable .", "Are these all static-libraries", ".a files are static-libraries .", "It s the linker so it s already implementing a static linker and it knows the file-format of the executable and of the dynamic library etc .", "Or you just link too many static-libraries instead of shared-libraries DLLs very common in open-source .", "In fact on Mac OS X most frameworks do not contain static-libraries they contain dynamic libraries instead .", "I m assuming you are using Xcode 4 which no longer builds libraries into universal static-libraries .", "For whatever reason Apple are being particularly obtuse about this - I can t see a reason for them to be so in the case of static-libraries dynamic libraries fair enough ." ] }
{ "confidence": [ 40.57681655883789, 39.37849807739258, 38.178977966308594, 36.802223205566406, 36.62206268310547, 35.76061248779297, 35.52863311767578, 35.391075134277344, 35.386653900146484, 35.205787658691406, 34.96036148071289, 34.333778381347656, 33.96574401855469, 33.51848602294922, 33.37085723876953, 33.350486755371094, 33.16493225097656, 33.141944885253906, 33.09407043457031, 33.065155029296875 ], "content": [ "Question : I have a static library that is linked to IPP 7.1 for 4 calls to ippi Mul . The project is built-in Visual Studio . This was previously a dynamic link but it turns out that in IPP 7.1 dynamic libraries are internally multi-threaded which is disallowed for me so I changed it to a static link-to single-threaded IPP . The size of the lib then increased from several MB to about 150MB . Is this normal for such a link I am only calling one function from IPP as I said . In the latest IPP 8.2 multi-threading is deprecated https : software.intel.com en-us node 503931 so updating would solve the problem for me . However I am still intrigued by this . If I am only using a single function from the library wouldn t static linking be a more correct option And is such an inflation of the lib size to be expected .. . Answer : First need to clarify the your project model . Static library usually is not linked to any of external libraries . Static library is just an archive of object modules if we talk about Windows .lib files of course . You use linker only when producing application executible .exe file or dynamic library .dll . I can assume that your solution has two projects - one for static library and the default project for application . In this case linking to dynamic IPP library definitely minimizes application footprint because application does not contain IPP function code only calls to external function from dynamic library . The functions are stored in dynamic library files there are hundreds of MBs . If you want to build your application with static IPP libraries and at the same time decrease application executable size you need to limit the CPU optimization included into your application simultaneously . When you do nothing special just use static IPP libraries in the command-line to the linker the application object file is linked with all function variants optimized for different CPU architectures from SSE to AVX2 . For example if you included function ippSomeFunction into your source code the linker will add ippSomeFunction SSE + ippSomeFunction SSE2 + .. . + ippSomeFunction AVX2 to application executable . This will increase application size but will allow execute your application on any of Intel CPUs with most optimization for current CPU . The dispatcher will turn on the most appropriate function variants for CPU . If you know the target CPU architecture you can make linker to add only required optimization of the functions . Read readme.htm doc in your IPP installation directory ipp tools ia32 or intel64 staticlib . In this case the only change you need to do for the source code is to add include ipp cpuletter .h file before including of other IPP-related .h files e.g .", "Question : I m trying to write a program for an exercise that uses a static library - .a and .h files provided by the school . I followed my logic and answers I saw here and added the .a file in the project s Properties - Build - Linker - libraries . The program includes the file with file.h and all files are in the same folder . Although everything appears to be in order and the console shows that the .a file is added to the linker command I get undefined-reference to functions from library errors . Please help Comment : Can you obtain and post the full compiler command-line invocation Comment : @MartinhoFernandes This is the jist of it . I removed the full path from the object-files but that s it . g++.exe -o PrintQ2.o Q2.o RandomDouble.o randomaelf64.a -static .. . Answer : Check this http : www.adp-gmbh.ch cpp gcc create lib.html about what parameters you have to pass during the linking", "Question : I have some code that I reuse for different embedded projects so I decided to create a library . The library is built on another much more extensive static library libopencm3 .. . .. . I just have one for now c file compiled to one object file that is then archived . I m not sure if I should be linking the object-files in the library with libopencm3 or if that should be done when I link my application later . I assumed the former but the linker complains that main is not defined it s referenced in libopencm3 : .. . .. . So Instead don t link things . And try linking everything when I build my program lsm303.bin . But when I do it looks like libopencm3 is not linked to my static library . Any insight on this Should I be linking my library when I build it Comment : Static libraries are just simple archives of compiled objects and so when you build a static library there will be no linking process as making a shared library or an executable will do . Without linking the compiler will not check for symbol reference and so even though your static library make use of libopencm3 libopencm3 will not get packed into your library . And to make all short when you compile a program using your static library you should link-to both your library and libopencm3 . But of course you can unarchive libopencm3.a and pack it into your own library . Comment : Thanks TwilightSun for answering my question regarding linking the static library at build time . But I m actually trying to link everything in the final stages there . It s not working for some reason . Comment : Try reversing -lopencm3 stm32f4 -ldatmos to -ldatamos -lopencm3 stm32f4 . This answer to an interesting question may help you understand why : stackoverflow.com a 409470 1579514 http : stackoverflow.com a 409470 1579514 . I ll organize these to an answer . .. . Answer : These are my summarized statements : .. . .. . You won t get dependencies issues when packing compiled object-files to static library because the the linker is not involved yet . You do have to link-to all the libraries depended by other libraries directly used by your program in the linking phase .. . When linking to static-libraries you should order them according to dependency . If A rely on B then A goes before B . TIP : if A rely on B while B also rely on A use -lA -lB -lA .. . .. . Links to other related questions : .. . .. . GCC Static library linking order : Linker order - GCC http : stackoverflow.com questions 45135 linker-order-gcc lq 1 see the 150+ answer not the answer the questioner marked correct .. . Recursive dependency : How to deal with recursive dependencies between static-libraries using the binutils linker http : stackoverflow.com questions 2738292 how-to-deal-with-recursive-dependencies-between-static-libraries-using-the-binut Both answers are helpful Comment : The ordering was the issue for me . Thank you .", "Question : Why is it that some static-libraries lib .a can be linked in the same way that shared-libraries lib .so are linked ld -l switch but some can not I had always been taught that all libraries static or not can be linked with -l.. . however I ve run into one library so far GLFW which does nothing but spew undefined-reference link errors if I attempt to link it this way . According to the response on this question http : stackoverflow.com questions 7132340 static-build-glew-glfw-on-linux the proper way to link static-libraries is to include them directly along with my own object-files rather than using -l . And in the case of the GLFW library this certainly solves the issue . But every other static library I m using works just fine when linked with -l . .. . .. . So : .. . .. . What could cause this one library to not work when linked rather than included directly If I knew the cause maybe I could edit and recompile the library to fix the issue . Is it true that you re not supposed to link static-libraries the same way you link shared-libraries And if not why not Is the linker still able to eliminate unused library functions from the output executable when the library is directly included in this way .. . Answer : The correct way to link a static library is using -l but that only works if the library can be found on the search path . If it s not then you can add the directory to the list using -L or name the file by name as you say . The same is true for shared-libraries actually although they re more likely to be found perhaps .", "Question : Why is it that some static-libraries lib .a can be linked in the same way that shared-libraries lib .so are linked ld -l switch but some can not I had always been taught that all libraries static or not can be linked with -l.. . however I ve run into one library so far GLFW which does nothing but spew undefined-reference link errors if I attempt to link it this way . According to the response on this question http : stackoverflow.com questions 7132340 static-build-glew-glfw-on-linux the proper way to link static-libraries is to include them directly along with my own object-files rather than using -l . And in the case of the GLFW library this certainly solves the issue . But every other static library I m using works just fine when linked with -l . .. . .. . So : .. . .. . What could cause this one library to not work when linked rather than included directly If I knew the cause maybe I could edit and recompile the library to fix the issue . Is it true that you re not supposed to link static-libraries the same way you link shared-libraries And if not why not Is the linker still able to eliminate unused library functions from the output executable when the library is directly included in this way .. . Answer : The reason is historical . The ar tool was original the file archive tool on PDP11 unix though it was later replaced entirely by tar for that purpose . It stores files object-files in this case in a package . And there s a separate extension containing the symbol-table for the linker to use . It s possible if you are manually managing files in the archive that the symbol-table can get out of date . The short answer is that you can use the ranlib tool on any archive to recreate the symbol-table . Try that . More broadly try to figure out where the corrupt libraries are coming from and fix that . Comment : I think the OP means link against a library not create a library .", "Question : In my app i currently have all my code separated into a static library to make it easier to set up the xcode project targets for the actual app and for unit tests for my code . The problem with this is that i want to put most of my xib files in the static library as well but it seems that when i run my app and try to reference the xib it can t find it unless it is included in the actual app s target instead of the static library target . Is it possible to have xib files and other resources included in static-libraries that can be referenced by code in that same library and if so how .. . Answer : No it isn t possible because a static library is not the same as a bundle . A bundle is a directory that may contain all manner of files including resource files xib executable files and static-libraries . It exists on the filesystem as a group of individual files . A static library is a single file that contains classes code and variables that were linked together by the library creator . It does not contain other files it is essentially a database of compiled code . Although it would be possible to put the data for the xibs in there Xcode would have no way of knowing that it was in there as it looks for them as individual files on the filesystem . In Mac OS you may create a Framework which is essentially a bundle of code resources settings etc which may be reused by multiple-projects . However Apple does not seem to support custom framework creation for iPhone OS . Bundles http : developer.apple.com iphone library documentation CoreFoundation Conceptual CFBundles CFBundles.html .. . .. . Static Libraries http : en.wikipedia.org wiki Static library Comment : Thanks for the links . Would it be possible to organize my xibs into their own bundle and have my library code be dependent on that Sorry if the answer is in that apple doc you provided i don t have much time to peruse it at the moment . Comment : Just found this may be of use : landonf.bikemonkey.org code iphone http : landonf.bikemonkey.org code iphone iPhone Framework Support.20081202.html Comment : Unless the Xcode Wizards or whatever we call them on OSX are wrong there is no bundle on iOS either leaving me in a marginally suicidal state . Comment : @Yar hopefully you didn t kill yourself I think you can add frameworks to iOS projects in Xcode 6 Comment : @AlexanderN link Thanks", "Question : I m trying to set up a VS2015 solution I have with OpenCV 3.0.0 and I m trying to do so using static-libraries only . Header files : the OpenCV header-files are included correctly and I can reference them in my source files without issue . Libraries : the static library file that was created for me when I used CMake to build OpenCV called ippicvmt.lib is included correctly and loads without issue . Using OpenCV in code : when I try to use OpenCV classes functions in my solution I get linker errors when building similar to .. . .. . I can right-click and choose Go to definition on my use of this function and it opens videoio.hpp and shows the declaration of the virtual method . The linker-error I see is likely caused by the inability for visual-studio to find the actual implementation of the method in the static library I have included in my solution . It is my understanding that the only .lib file I need to include is the one static library file . That is all I have included right now . Does anybody know why VS can t find the implementations of this code in the OpenCV static library Comment : When you used CMake did you specify if you wanted to build shared libs It should have generated way more libs than just ippicvmt . Also are you building a debug or release version Comment : I m currently trying to build for release and the project settings are all for release build . I did not touch the CMake settings so I m not sure . Should I have it build shared libs Comment : Remake the openCV solution and uncheck build shared libs . That will tell openCV to compile static libs rather than DLLs Comment : I see the other libs it generated in .. . opencv .. . lib my understanding is that these were only useful if I was going to use the .dll s Comment : That is incorrect . When building a program with static-libraries you need to link in more libraries . You can see this post for more info : stackoverflow.com questions 16830842 http : stackoverflow.com questions 16830842 using-static-libraries-instead-of-dynamic-libraries-in-opencv An easy fix would be to include all the non-debug libs ones that don t end in d . You can also include just the ones you need which I believe would be core300 and video300 . Building a program with static libs is a pain but once you get all of the libs you need linked then it isn t too bad . .. . Answer : I fixed my issue by disabling the flag for building with shared libs in CMake after that way more .lib files show up in the sharedlib folder in my install . I added each .lib file I wanted to use to my additional dependencies in my project properties and my project built .", "Question : Why is it that some static-libraries lib .a can be linked in the same way that shared-libraries lib .so are linked ld -l switch but some can not I had always been taught that all libraries static or not can be linked with -l.. . however I ve run into one library so far GLFW which does nothing but spew undefined-reference link errors if I attempt to link it this way . According to the response on this question http : stackoverflow.com questions 7132340 static-build-glew-glfw-on-linux the proper way to link static-libraries is to include them directly along with my own object-files rather than using -l . And in the case of the GLFW library this certainly solves the issue . But every other static library I m using works just fine when linked with -l . .. . .. . So : .. . .. . What could cause this one library to not work when linked rather than included directly If I knew the cause maybe I could edit and recompile the library to fix the issue . Is it true that you re not supposed to link static-libraries the same way you link shared-libraries And if not why not Is the linker still able to eliminate unused library functions from the output executable when the library is directly included in this way .. . Answer : Have you cared to indicate to GCC the path of your library using -L By using -l solely GCC will only be able to link libraries available in standard directories . Comment : Yes the paths to each library are provided using -L before the corresponding -l flag . GCC can find the library but gives a large number of undefined-reference errors from within the library .", "Question : What is inside of a .lib file of Static library Statically linked dynamic library and dynamically linked dynamic library How come there is no need for a .lib file in dynamically linked dynamic library and also that in static linking the .lib file is nothing but a .obj file with all the methods . Is that correct Comment : It could be noted that the question is about MS Windows platform . .. . Answer : A lib files is read by the linker and a dll file is used during execution . A lib file is essentially useless during execution and a linker is incapable of reading a dll file except possibly in a manner irrelevant here . The differences between the use of lib files for static and dynamic linking might be confusing but if you understand a little history then it becomes very clear . Originally there were only static-libraries . For a static library the .lib file contains obj files . Each obj file is the output of one and only one compiler source code input file . A lib file is just a collection of related obj files much like putting obj files in a directory . That is essentially what a lib file is a library of obj files . For a static link all of the obj files that an executable uses are combined into one file . Compare that to a dynamic link in which the executable is in a file separate from the other code it uses . To implement dynamic linking Microsoft modified the use of lib files such that they refer to a dll file instead of locations in an obj file . Other than that all the information that is in a library for a static link is the same as for a dynamic link . They are all the same as far as the information in them except that a lib file for a dynamic link specifies the dll file .", "Question : Why is it that some static-libraries lib .a can be linked in the same way that shared-libraries lib .so are linked ld -l switch but some can not I had always been taught that all libraries static or not can be linked with -l.. . however I ve run into one library so far GLFW which does nothing but spew undefined-reference link errors if I attempt to link it this way . According to the response on this question http : stackoverflow.com questions 7132340 static-build-glew-glfw-on-linux the proper way to link static-libraries is to include them directly along with my own object-files rather than using -l . And in the case of the GLFW library this certainly solves the issue . But every other static library I m using works just fine when linked with -l . .. . .. . So : .. . .. . What could cause this one library to not work when linked rather than included directly If I knew the cause maybe I could edit and recompile the library to fix the issue . Is it true that you re not supposed to link static-libraries the same way you link shared-libraries And if not why not Is the linker still able to eliminate unused library functions from the output executable when the library is directly included in this way .. . Answer : Thanks for the replies Turns out the problem was due to link order . Apparently if you use a library which in turn has other library dependencies those other dependencies must be listed after the library not before as I had been doing . Learned something new", "Question : today i found out that the compiled static library i m working on is much larger in Release mode than in Debug . I found it very surprising since most of the time the exact opposite happens as far as i can tell . The size in debug mode is slightly over 3 MB its a fairly large project but in release it goes up to 6 5 MB . Can someone tell me what could be the reason for this I m using the usual Visual Studio 2008 settings for a static library-project changed almost nothing in the build configuration settings . In release i m using O2 and Favor size or speed is set to Neither . Could the O2 Maximize speed cause the final .lib to be so much larger than the debug version with all the debugging info in it EDIT : Additional info : .. . Debug : .. . - whole program optimization : No .. . - enable function level linking : No .. . .. . Release : .. . - whole program optimization : Enable link-time code generation .. . - enable function level linking : Yes Comment : What about whole program optimization and function-level linking settings in both configurations Comment : Updated the info . .. . Answer : The difference is specifically because of link-time code generation . Read the chapter Link-Time Code Generation in Compilers - What Every Programmer Should Know About Compiler Optimizations https : msdn.microsoft.com en-us magazine dn904673.aspx on MSDN - it basically says that with LTCG turned on the compiler produces much more data that is packed into the static library so that the linker can use that extra data for generating better machine code while actually linking the executable file . Since you have LTCG off in Debug configuration the produced library is noticeably smaller since it doesn t have that extra data . PS : Original Link not working at 11 09 2015 http : msdn.microsoft.com en-us magazine cc301698.aspx Comment : Thank you this explained a lot", "Question : I m compiling C++ static library with g++ and using the -fPIC option . I must use the -fPIC option because eventually this library will be linked with other static-libraries to form a dynamic library . When I test the static library locally it works completely fine when I don t include the -fPIC option . But as soon as I compile the library with -fPIC I receive a segmentation-fault error at run-time when calling one of the functions . What reasons could including -fPIC to compile a static library cause a segementation fault at run-time Comment : This is very generic I know but if your code contains Undefined Behaviour then anything may happen and changing a compiler flag may cause the compiler to exploit that UB in a new way - in any case the bug is in your code if UB is involved . Just a long-shot guess.. . Comment : That s along the lines I was thinking too . I did a fair bit of reading on -fPIC and couldn t find anyone else reporting run-time errors in their code by including it in most cases it was including -fPIC that was the solution to their problems Comment : Maybe you could provide a minimal reproducible compilable test case that we could try . That would help diagnosing the problem . See sscce.org http : sscce.org Comment : I agree I ll look into creating one . The problem is the static library is compiled from a very large codebase and is not something that can be made public . .. . Answer : A dynamic library is supposed to be loaded at run-time and can therefore not have position-dependent code . A static library on the other hand is just an archive of object-files . When linking with a dynamic library the linker adds the name of the library in the executable file so the loader can load it when it loads the program . When the linker links with a static library it basically extracts the object-files and links with them like any other object file . So unless you create an executable where all other object-files are position-independent you use -fPIC for your the programs code then you can t link with a static library which uses position-independent code the generated executable is simply not set up for it . Comment : So let s say I compile a static library with the -fPIC option . Now I want to compile that static library with Test.cpp which has a main method . When I run the generated executable only ONE of my functions callled by main causes a segmentation-fault while the rest of the code works fine . But when the static library is compiled WITHOUT -fPIC then all of the code in the generated executable works g . So why does the inclusion of -fPIC cause only some of the code to fail Comment : @ConnorFlood It s really impossible to say without more information and depends on what all your functions are doing . Are the functions that work calling other functions in the libraries Do the function that crashes do that", "Question : I have an Xcode project that has a master static library target that includes links to a bunch of other static-libraries from other Xcode projects . When building the master library target for Optimized armv6 armv7 an error occurs in the last phase during the CreateUniversalBinary step . For each .o file of the libraries that is included by the master library the following error is reported for example the FBConnectGlobal.o file : .. . .. . In the end Xcode tells that the build has succeeded . However when using the final static library in an application project it won t build because it finds duplicate symbols in one part of build armv6 and misses symbols in the other part of the build armv7 . Any ideas how to fix this M Comment : Don t build libraries into other libraries - it s a recipe for confusion duplicate symbol errors and hard-to-debug results . Check out this question : stackoverflow.com questions 2300867 http : stackoverflow.com questions 2300867 how-can-i-avoid-duplicate-symbol-errors-in-xcode-with-shared-static-libraries 2300873 2300873 Comment : Carl thanks . Perhaps you could post that as an answer to my question instead of the comment so I could mark it as answered . .. . Answer : Don t build libraries into other libraries - it s a recipe for confusion duplicate symbol errors and hard-to-debug results . Check out this question : http : stackoverflow.com questions 2300867 how-can-i-avoid-duplicate-symbol-errors-in-xcode-with-shared-static-libraries 2300873 2300873 Comment : I have to agree here . I don t know what s best in theory but in practice I just spent a couple of weeks tweaking toggling and cajoling every build setting and config arrangement under the sun . In the end the only thing that works was remove ALL static-libraries both binary files AND dependent projects to build static-libraries from the static library that depended on my app . Don t link libraries to libraries . Don t be a hero . Just attach everything to your app directly . Save yourself heaps of time in the process .", "Question : At least on Linux and Solaris static-libraries are really just a bunch of compiled .o s tossed into one big file . When compiling a static library usually the -fpic flag is ommited so the generated code is position dependent . Now say my static library is B . I ve built it and have the resulting .a file which is really just a glob of all of the position dependent .o files . Now I have a shared library I d like to build A and I want it to statically link B . When I build A naturally I ll use the -fpic flag to make the generated code position independent . But if I link against B aren t I mixing position dependent and position independent object-files I m getting a lot of text relocation errors unless I also specify -mimpure-text and I think this maybe the cause . It seems when I compile a library I really need to compile it 3 times a shared version a static version and a static-that-can-be-used-by-shared-libs version . Am I right I could just keep using -mimpure-text but the g++ man page says that if you do that the object doesn t actually end up being shared it s unclear if it s all unshared or just the statically linked parts though does anyone know . Comment : Mixup - In your first paragraph you say -fpic makes code position dependent but in your second paragraph you say the same flag makes code position independent I suspect one of these is wrong . Comment : I don t think a .a file in Linux is a compressed file . AFAIK a .a archive is still the simple format from vintage Unix . Comment : The question is stated correctly he omits -fpic in the first paragraph leading to position-dependent code then uses it in the second paragraph leading to position-independent code . Comment : @lhf : you are correct fixed . .. . Answer : As an alternative approach ship two libraries : your shared one and the static you re linking against alongside . They should link into the final executable correctly .", "Question : How to add GMP to my static library In MyLib.h I have .. . .. . and some functions like : .. . .. . My static library I have created by .. . .. . I have linked mbib.o and when i dont use functions from there it works . But when I m trying to use any of them i have : .. . .. . I have tried add .. . .. . but it doesnt work . .. . Answer : It s simple : You can t . You can t because you don t link with other libraries when you create a static library a static library is nothing more than an archive collecting object-files you don t actually use a linker to create a static library . The command ar and the filename suffix .a all stands for archive . If you have a static library that depends on another static library then you need to build with the other library as well for the final executable or dynamic library . Comment : To be fair you can . As you say the .a is just an archive and you can take 2 archives and merge them into one.. .", "Question : On C Linux .. . .. . Do I need static-libraries to statically link or the shared ones I have suffice If not why not Don t they contain the same data .. . Answer : Yes you need static-libraries to build a statically linked executable . Static libraries are bundles of compiled objects . When you statically link with to library it is effectively the same as taking the compilation results of that library unpacking them in your current project and using them as-if they were your own objects . Dynamic libraries are already linked . This means that some information like relocations have already been fixed up and thrown out . Additionally dynamic libraries must be compiled as position-independent code . This is not a restriction on static-libraries and results in a significant difference in performance on some common platforms like x86 . There exist tools like ELF Statifier http : statifier.sourceforge.net which attempt to bundle dynamically-linked libraries into a dynamically-linked executable but it is very difficult to generate a correctly-working result in all circumstances . Comment : Thanks for a great answer . But why is it so difficult Comment : ELF Statfier loads the executable and all its libraries then takes a snapshot of the process memory . When the output image is run anything which would cause the memory layout to change e.g . randomized VDSO will result in incorrect operation . Any other approach requires re-inventing the dynamic linker . Comment : Why would it be hard to reimplement the dynamic linker Isn t there just two tables of the library s imports and exports to be relocated It s the linker so it s already implementing a static linker and it knows the file-format of the executable and of the dynamic library etc . Comment : The operations of the static compile-time linker and the dynamic runtime linker are very different . The static linker rewrites references to symbols in objects to fixed references -- either to the relocated symbol within the same image or to a stub that jumps to the correct entry in the symbol-table . The dynamic linker opens files and maps them with specific rules to various parts of memory fills in the symbol tables and then jumps to initializing code .", "Question : I am using eclipse CDT in Ubuntu OS and have created a C project with external static library libtomcrypt linked to it . It runs and gives the output correctly but I want to know definition of the library functions the call hierarchy of the functions and their implementation . So turned on debugging mode and started looking into execution steps line by line using step into button and it works with the functions that I defined in main i.e . step into works for test function in this example but step into is not working for the library functions that I m calling register hash sha256 desc find hash sha256 functions in this example . It just skips the the line without stepping into and moves onto next line . Please help me solve this problem . Comment : Related : why can t step into a function http : stackoverflow.com questions 10167484 why-cant-step-into-a-function-in-gdb . Comment : what does it mean by standard-library with debugging information Can you please elaborate In my case I m linking tomcrypt library but not any standard C library . Comment : does it have to do anything with .d files Comment : Do you ve the source code of the library If yes recompile it with debug info . Comment : yes I do have the source code of the library i am unable to understand the part-recompile with debug info . When I compiled it using the makefile provided by the API it created the following library files : libtomcrypt.so.0.0.117.debug libtomcrypt.so.0.debug libtomcrypt.so.debug libtomcrypt.a And I have set the path of these libraries and included the library libtomcrypt.a in eclipse excluding lib prefix and .a extension . Do i need to change the library included .. . Answer : In order to debug your code debugger will need some information eg which line of code corresponds to this object code in a executable . To make this information available you need to specifically instruct your compiler with -g option in gcc g++ . Suppose you have a library which you compile using makefile as in your case . You need to look in the makefile of library for flags used for compilation . As in .. . .. . And then you add -g option in flags : .. . .. . Incase your makefile doesn t use CFLAGS you need to look for lines where compilation takes place and add -g option to all those lines manually . Then make your library . Now you can compile you test programs like this : .. . .. . EDIT : Also note that -g option should be included during compilation and not during linking as you did . Comment : that solved the problem and just to know more about modes of -g option . My library makefile already has -g3 option maximum debugging included in CFLAGS but after including -g option only this thing got fixed and a library file with debugging options is generated . Is it any version compatibility issue or -g3 is not the appropriate option for debugging thanks for your help Comment : -g3 should be fine . I think the problem was that you included -g during linking except that it should be done during compilation . -g3 means extra debugging information also get stored which should work perfectly with all debuggers .", "Question : I want the users to be able to re-link my Qt-using application to their own build of Qt without being forced to rebuild all of the sources . This could be used for LGPL compliance for example . To do this I need to provide object-files for all of my sources . To make it easy using qmake I ve partitioned the project internally into : .. . .. . 1 . A static library-project that contains objects for all of the source files including the file that has int main int char . 2 . An application project that links the static library above with Qt . Qt may be either a static library or dynamic . There are no source files for this project . I then distribute the static library .lib and the application project file so that anyone can relink the application with their own version of Qt in whichever fashion they prefer either statically linked Qt or dynamically linked Qt as long as they have the necessary version of MSVC . I m doing the build under both MSVC 2008 Qt 4 and 2012 Qt 5 . The makefiles are generated by qmake . The problem is that the linking fails when building the application project . As soon as I add a dummy source file dummy.cpp to the application project the linking succeeds . Is there a way of avoiding this workaround .. . Answer : It turns out that the linker isn t clever enough to figure out what default runtime library is needed for the executable if only static-libraries are given to link with no discrete object-files . This can be corroborated by asking the linker to be verbose in the .pro file : .. . .. . When the dummy file is present in the application project the linker lists the following default libraries : .. . .. . Without the dummy file no default libraries are chosen by the linker at all . It is then unable to find the entry-point since the C runtime is not linked in . Adding the relevant C runtime library http : support.microsoft.com kb 154419 is sufficient to link the application . In the application project file one adds :", "Question : Consider this synthetic example . I have two native C++ projects in my Visual Studio 2010 solution . One is console exe and another is lib . There are two files in lib : .. . .. . and .. . .. . And one file in exe : .. . .. . I know I shouldn t actually do like this but this is just for understanding what is happening . And that s what happens : .. . .. . So how exactly this happened that linker overrides lib s version of TImage char with exe s version of TImage char But since there is no exe s version of TImage int it preserves lib s version of TImage int . . Is this behavior standardized and if so where can I found the description Update : Explanations of the effect given below are correct thanks . But the question was how exactly this happened . . I expected to get some linker-error like multiply defined symbols . So the most suitable answer is from Antonio P rez s reply http : stackoverflow.com questions 6869780 template-class-specialized-inside-and-outside-lib 6869869 6869869 . Comment : I believe your program is technically ill-formed and does not have to compile at all . Templates can and generally must violate the one-definition rule but the multiple definitions have to be identical . Your TImage violates that rule . .. . Answer : I am assuming here that you are building a static library because you do not have any decelspec dllexport or extern C in the code . What happens here is the following . The compiler create an instance of TImage char and TImage int for your lib . It also creates an instance for the your executable . When the linker joins the static library and the objects of the executable together duplicate code gets removed . Note here that static-libraries are linked in like object code so it does not make any difference if you create one big executable or multiple static-libraries and an executable . If you would build one executable the result would be dependent on the order the objects are linked in aka not defined . If you change the library to a DLL the behavior changes . Since you are calling over the boundary of a DLL each needs their copy of TImage char . In most cases DLLs behave more as you would expect a library to work . Static libraries are normally just a convenience so you need not put the code into your project . Note : This only applies on Windows . On POSIX systems .a files behave like .so file which creates quite some head aches for compiler developers . Edit : Just never ever pass the TImage class over a DLL boundary . That will ensure a crash . That is the same reason why Microsoft s std : : string implementation crashes when mixing debug and release builds . They do exactly what you did only with the NDEBUG macro . Comment : I didn t know about that dynamic-static differences for Windows systems . Good to know it .", "Question : I have an Xcode project that has a master static library target that includes links to a bunch of other static-libraries from other Xcode projects . When building the master library target for Optimized armv6 armv7 an error occurs in the last phase during the CreateUniversalBinary step . For each .o file of the libraries that is included by the master library the following error is reported for example the FBConnectGlobal.o file : .. . .. . In the end Xcode tells that the build has succeeded . However when using the final static library in an application project it won t build because it finds duplicate symbols in one part of build armv6 and misses symbols in the other part of the build armv7 . Any ideas how to fix this M Comment : Don t build libraries into other libraries - it s a recipe for confusion duplicate symbol errors and hard-to-debug results . Check out this question : stackoverflow.com questions 2300867 http : stackoverflow.com questions 2300867 how-can-i-avoid-duplicate-symbol-errors-in-xcode-with-shared-static-libraries 2300873 2300873 Comment : Carl thanks . Perhaps you could post that as an answer to my question instead of the comment so I could mark it as answered . .. . Answer : Another fix I found is to set Architectures to armv6 . ARCHS STANDARD 32 BIT changed from armv6 to armv6 armv7 which aggravates the libtool bug you describe above . Obviously it won t be producing armv7 optimized binaries but it should still work fine on iPhone 4 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linker
UNK_RELATION
google-cloud-endpoints@ios@248
google-cloud-endpoints -- google-cloud-endpoints is a technology developed by google for use on google-app-engine to allow developers to develop and host apis easily and to generate strongly-typed client libraries for java android and objective-c @placeholder and dynamically-typed libraries for javascript .
{ "confidence": [ 87.60633087158203, 87.29071044921875, 85.82624053955078, 81.59679412841797, 81.00299835205078, 80.72198486328125, 79.04991912841797, 78.58309173583984, 78.22598266601562, 77.27741241455078, 77.24559783935547, 77.1279067993164, 76.84989166259766, 76.84989166259766, 76.13703155517578, 75.79946899414062, 75.46875, 75.2583236694336, 74.64566040039062, 74.21142578125, 74.15313720703125, 74.0728759765625, 73.94981384277344, 72.28558349609375, 71.31303405761719, 71.12384796142578, 70.76445007324219, 70.22310638427734, 69.8645248413086, 69.80333709716797, 69.80333709716797, 69.56417846679688, 69.56417846679688, 69.14812469482422, 69.13191986083984, 69.07643127441406, 68.67500305175781, 68.306884765625, 68.2900619506836, 68.260498046875, 67.9384765625, 67.66316986083984, 67.02631378173828, 67.02631378173828, 67.02631378173828, 67.02631378173828, 66.99311065673828, 65.92095947265625, 65.14498901367188, 64.12281799316406, 63.90306091308594, 63.77631759643555, 63.58619689941406, 62.65642547607422, 62.38101577758789, 61.87133026123047, 61.61153030395508, 61.604637145996094, 61.6016845703125, 61.6016845703125, 61.5848388671875, 61.17634963989258, 61.16899871826172, 60.95237350463867, 60.31166076660156, 60.31166076660156, 60.31166076660156, 60.31166076660156, 60.248714447021484, 60.14404296875, 59.993865966796875, 59.821197509765625, 59.628875732421875, 59.3577995300293, 59.063873291015625, 58.75202941894531, 58.54498291015625, 58.40757369995117, 58.0738639831543, 57.660057067871094, 57.53464126586914, 57.53464126586914, 57.53464126586914, 57.53464126586914, 57.53464126586914, 56.751888275146484, 56.34382629394531, 56.32667922973633, 56.22555923461914, 55.943077087402344, 54.69529342651367, 54.58270263671875, 54.44819259643555, 54.407127380371094, 54.407127380371094, 54.365943908691406, 54.327247619628906, 54.186397552490234, 54.03218078613281 ], "content": [ "I am using a Google App Engine Java with Google Cloud Endpoints .", "I m using Android Studio to generate Google Cloud Endpoints for an Android app .", "http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app", "My setup : .. . .. . Java backend hosted on Google App Engine containing APIs that were created using Google Cloud Endpoints .. . Mobile client applications containing generated client libraries for the endpoints mentioned above .", "Snapchat uses google-app-engine and I presume cloud endpoints", "Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints", "I have an app that uses Google Cloud Endpoints .", "I deployed this repo to Google App Engine which is an example of Google Cloud Endpoints Java server .", "TagAlone-AppEngine Unknown Google App Engine Cloud Endpoints Problem Marker", "I use ReactJS + Redux + Google Cloud Endpoints .", "I m trying to use Google Cloud Endpoints with Android client built by Maven .", "Not much written about using Google Cloud endpoints from a Java client .", "I am using Google Cloud Endpoints with objectify .", "I am playing with flexjson and Google Cloud Endpoints .", "I m using google-cloud-endpoints as the backend server and google-cloud-storage to host the images for the project .", "If you created your your cloud-endpoints projects using WTP then Right click on the cloud-endpoints project Google App Engine WTP Generate Cloud Endpoint Client Library .. . .. . You get the error if you right-click on the cloud-endpoints project Google Generate Cloud Endpoint Client Library .", "I have a little background with Google Cloud Endpoints on App Engine and the Web Application iOS and Android Client Id s .", "Google Cloud Endpoints are an experimental technology so they are pretty subject to this kind of issues.. .", "please confirm with sample code for google-cloud-endpoints using java .", "We have a GWT app that exposes an API using Google Cloud Endpoints .", "Custom Authentication for Google Cloud Endpoints instead of OAuth2 http : stackoverflow.com questions 16970327 custom-authentication-for-google-cloud-endpoints-instead-of-oauth2 rq 1 .. . .. . Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . Google Cloud Endpoints without Google Accounts http : stackoverflow.com questions 19224728 google-cloud-endpoints-without-google-accounts .. . .. . EDIT : We used Gold Support for the Google Cloud Platform and have been talking back and forth with their support team for weeks .", "Why there is no Google Cloud Endpoints support for Golang .", "Google Plugin for Eclipse includes a facility to automatically generate the cloud endpoints client library .", "I am making calls with the Google Cloud Endpoints JS client as so .", "See also Error connecting android app to Google Cloud Endpoints : could not find class http : stackoverflow.com questions 15088110 error-connecting-android-app-to-google-cloud-endpoints-could-not-find-class .. . .. . Does anyone know of a way to actually use the sources.jar file directly in the Android project", "I am developing an android application using google-app-engine cloud endpoints datastore and objectify .", "Python google-app-engine using endpoints-proto-datastore .. . 2 . iOS endpoints Obj-C client library generator .. . .. . Background .. . .. . I ve setup a test Google cloud endpoints api and had it running pretty quickly .", "We are super excited about App Engine s support for Google Cloud Endpoints https : developers.google.com appengine docs python endpoints .", "Is there a way to use another OAuth2 provider with Google Cloud Endpoints", "I am using google-cloud-endpoints and my problem begins here .", "From my understanding Google Cloud Endpoints provides a way to implement a RESTful", "I m new to JDO Google Cloud Endpoints App Engine and have been struggling a bit with storage and retrieval .", "Im using Google App Engine Cloud Endpoints and Im trying to receive a collection parameter .", "1 https : cloud.google.com solutions mobile google-cloud-endpoints-for-android", "Do you guys use the Google Cloud Platform specifically the APP ENGINE ENDPOINTs for professional production purposes", ".. . .. . How to implement 0Auth in the Google Cloud Endpoints JavaScript client is detailed here https : developers.google.com appengine docs java endpoints consume js .", "I am trying to create a Google Cloud Endpoints API and use multiclass APIs https : cloud.google.com appengine docs java endpoints multiclass .", "The app returned an error when the Google Cloud Endpoints server attempted to communicate with it .", "I am developing an android app which uses google-cloud-endpoints as a backend .", "When using OAuth in the Google Cloud Endpoints JavaScript client how do you preserve the secrecy of the client ID", "A few days ago I ve started developing a Backend for Mobile Applications using Google App Engine and Google Cloud Endpoints https : developers.google.com appengine docs java endpoints .", "Here s another similar post Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app .. . .. . This is the reference Iam using - https : developers.google.com appengine docs java endpoints auth .. . .. . Has anyone here done this before", "I have made my REST api with the Google Cloud Endpoints framework .", "I m needing some help setting up unittests for Google Cloud Endpoints .", "And I want it works with Google Cloud Endpoints to create a backend interface .", "I am using it to serialize objects generated by Google Cloud Endpoints .", "Has anyone successfully been able to use Stetho with Google Cloud Endpoints on Android with or without OkHttp", "I m trying to build an Endpoints application but am new to Google App Engine .", "Backend is Google App Engine Java .. . Using Goole Cloud Endpoints to build my API .. . Using the Google Cloud Endpoints JavaScript web client loaded as follows gapi.client.load myApi v1 resourceLoaded https : my-project-id.appspot.com ah api .. . .. . I have already configured Google Cloud Endpoints on the backend to allow cookies .", "Here you have details on how to use angularjs with google endpoints : .. . .. . https : cloud.google.com developers articles angularjs-cloud-endpoints-recipe-for-building-modern-web-applications hl es", "Could somebody provide me with a quick checklist of the steps required to set up google-cloud-endpoints with an android client for both the backend and client-side", "i have a google-cloud-endpoints project uses sound cloud api java-api-wrapper .", "Does this method work with google endpoints .", "I am starting to use Google Cloud Endpoints and I am running in a problem when specifying multiple services classes .", "Google Cloud Endpoints allow you to recover User HttpServletRequest and HttpServletContext into you API methods by injecting it as parameters .", "It appears that Android Studio generates correct Google Cloud Endpoints only for Objectify annotated classes .", "Normally when I right-click my app engine project and choose Generate cloud endpoint client library using the Google plugin for Eclipse it generates the client libraries and automatically copies them into the Android client project .", "For those looking to use @bossylobster s answer in Java use the the SO Answer here : Getting raw HTTP Data Headers Cookies etc in Google Cloud Endpoints http : stackoverflow.com questions 15056830 getting-raw-http-data-headers-cookies-etc-in-google-cloud-endpoints .. . .. . P.S .", "My android app uses google endpoints as a scalable backend solution .", "I am developing an android app which used google endpoints as a backend .", "Endpoints : can thy be used in Google Compute Engine", "During last weeks I ve been developing an app using GAE J and Google Cloud Endpoints .", "I have a backend written with Java App Engine Gradle and Cloud Endpoints .", "Right clicked to Generate Google Cloud Endpoint Class .", "I have used this ErrorField as one of the field in response class of Google cloud endpoints .", "When locally testing Google cloud endpoints from none localhost address --address 0.0.0.0 setting might not be sufficient .", "How do I protect my API that was built using Google Cloud Endpoints", "stackoverflow.com questions 18716674 http : stackoverflow.com questions 18716674 facebook-login-in-google-cloud-endpoints 18728482 18728482", "I am trying to use google endpoints .", "I have actually used Google Cloud SQL with App Engine + Endpoints Java so I can weigh in here a little .", "I am referencing @MinWan s awesome answer in this post Google Cloud Endpoints and user s authentication http : stackoverflow.com questions 25365858 google-cloud-endpoints-and-users-authentication where he describes a way to add custom headers to a request against App Engine s Cloud Endpoints .", "I m developing a server using google endpoints api .", "In my android app which uses google-cloud-endpoints as a scalable backend solution I am getting a NullPointerException when making a call to get the users friends in the exposed endpoints api .", "But if I define the entity class with JDO annotation the option of generating endpoint is disabled Tool- Google Cloud Endpoints - generate Endpoint .", "How does one initialise the Firebase library in Google Endpoints as a singleton", "I want to build a python client to talk to my python Google Cloud Endpoints API .", "Preferably I will try not to use the client part of Google Cloud Endpoints but rather use the manual handling of Oauth 2.0 to minimise code restructuring .", "If Yes is there any sample code to refer to implement using a . java script + google-cloud-endpoints", "It seems to be a general issue with the JS Client library at the moment not limited to Endpoints APIs but affecting all Google APIs .", "ApiResourceProperty annotation does not work for Google Emdpoints+Objectify combinations as Ref or Key is Objectify specific class and Google Endpoints does not recognize them and will give a error when you try to generate the Client Libraries .", "Google Cloud Endpoints is unable to serialise the Ref object because it is an arbitrary object defined by objectify therefore not supported as the error indicates .", "This guy http : stackoverflow.com questions 15872240 google-cloud-endpoints-with-another-oauth2-provider says it can t be done .", "As my question title says is Memcache supposed to play well with Google cloud endpoints", "I can t find any example projects using Google Cloud Endpoints AND GWT in one project :", "Check this out : stackoverflow.com questions 18716674 http : stackoverflow.com questions 18716674 facebook-login-in-google-cloud-endpoints 22495862 22495862", "So I want to use Plus.me or lets say userinfo.profile scope with Google Cloud Endpoints with python as a backend .", "I am finding it really difficult to set up google endpoints for android and must be missing out some setup step to allow the connection between the endpoints api and the android client .", "A cloud endpoints python project using the latest App Engine version .", "I add the cloud endpoints code at helloworld.py like this : .. . .. . According to Google s document cloud endpoints have to be app.yaml .", "I want to connect to the Google Cloud SQL from my android app .", "Why the hell they need a cloud generator to generate the code of the endpoints if they have all the necessary info locally code libraries etc.. .", "No problem in simulation localhost or google cloud .", "How can I pass more than one Entity from a client to a Google Cloud Endpoint", "Google Cloud Endpoints has it s own authentication process in which the backend endpoint method is simply passed a com.google.appengine.api.users.User object .", "I m not using the google-cloud-endpoints but just my own rest based api but it should be the same idea either way .", "You can create a helper class in App Engine and easily connect to Google Cloud SQL .", "I Just started using google-app-engine today and I have fallen in love with endpoints .", "Hello I m Mario and a representative of Google Cloud Platform .", "I have been doing extensive research on how to authenticate your client Android iOS web-app with Cloud Endpoints without requiring your user to use their Google account login the way the documentation https : cloud.google.com appengine docs java endpoints auth shows you ." ] }
{ "confidence": [ 100.03963470458984, 97.42536163330078, 97.20220184326172, 97.101318359375, 94.89208984375, 93.51461791992188, 92.0265121459961, 91.82571411132812, 91.71138763427734, 91.36338806152344, 91.21117401123047, 90.45122528076172, 89.59004211425781, 88.77155303955078, 88.40855407714844, 87.86981964111328, 87.51777648925781, 87.48979187011719, 87.47262573242188, 87.28372192382812 ], "content": [ "Question : Google Plugin for Eclipse includes a facility to automatically generate the cloud endpoints client library . But there doesn t seem to be an easy way to move the generated source.jar file into your Android source . The documentation https : developers.google.com appengine docs java endpoints consume android says .. . .. . The Endpoints generation results in a sources jar file . Add the contents of this jar file to your Android project . It doesn t seem possible to put the source.jar file into an Android lib or libs since the source is .java rather than .class form . So I just manually copy over the source generated by GPE which they put in an endpoints-lib folder in your AppEngine project . This can be extremely cumbersome especially when you have more than one endpoint and are editing it often . See also Error connecting android app to Google Cloud Endpoints : could not find class http : stackoverflow.com questions 15088110 error-connecting-android-app-to-google-cloud-endpoints-could-not-find-class .. . .. . Does anyone know of a way to actually use the sources.jar file directly in the Android project Thanks . .. . Answer : This problem is solved in Eclipse by adding a linked resource to the directory at .. . .. . your-appengine-project endpoint-libs libYourEndpoint-v1 yourendpoint yourendpoint-generated-source .. . .. . You can do this in Eclipse by adding a source link in Properties- Java Build Path- Source Link .. . .. . After this your Android or client project will see any changes generated using Google- Generate Client Endpoint Library Comment : I am having the same problem . You seem to be bypassing the process . Does your app still work after you deploy it to the playstore I mean the idea is that your appengine code should be remote on a server somewhere and that the android code is supposed to be able to access it that way . Comment : I think by your-appengine-project you really mean your-android-project Comment : I do really mean your-appengine-project because that s where the library is that you are linking to . When the .apk file is made for Android it includes all the necessary parts of the libraries however you have linked to them in your source code . I ve been sharing folders like this with appengine connected android projects all the time . Have you tried this yet It works great for me . No moving code around every time I regenerate the endpoint library . Comment : I agree that sharing folders like that works well but I think there is a problem with your solution . You are generating the Android endpoint libraries into your app-engine project rather then the usual solution of generating them into an Android project . So what happens when you generate iOS or javascript libraries It appears to me that Google made the mistake of using the same paths for all . Comment : Why could you not just use the same exact technique as I described in the case of iOS or javascript Just do a linked resource to the proper directory .", "Question : I am an Android developer building my first Google App Engine java back-end for my apps . I don t want anybody else to access this API other than my app . I plan to use App engine for verifying InApp purchases in my Android app . My data is not relevant to users so I don t want users to be able to access my API even if they are logged in with their Google accounts on web or Android devices . I followed the steps mentioned in - Specifying authorized clients in the API backend https : developers.google.com appengine docs java endpoints auth like generating client IDs and add them in @Api clientIds and audiences except Add a User parameter - since I don t need user authentication . Then I deployed App engine and I am still able to access the API through API explorer https : your app id.appspot.com ah api explorer I haven t added API EXPLORER client ID .. . .. . I tested with the APK that was built with the endpoint libs before adding client IDs and can still access the API . Is adding a User parameter to all endpoint APIs a must to achieve my purpose restrict API to only my Android apps . Can I pass null as userAccount name from Android client and ignore user parameter value on server since it will be null Will this ensure that the API is accessible only from my android apps since the client ID is generated for my package name and SHA1 of the APK Should I use something like a service account for this purpose The documentation says for Android both Android and Web client IDs must be added and audience must be the same as web client ID . Does this open access to any other web client can I skip mentioning web client ID and still achieve my purpose Appreciate your time and help . ..... . updating with my further investigation .. . I did the following : .. . .. . Added User parameter to APIs on backend - but did not check for null value . API can still be accessed without passing any credentials from Android debug APK and API explorer .. . .. . Then I tried .. . .. . mCredential GoogleAccountCredential.usingAudience this server : client id : + WEB CLIENT ID mCredential.setSelectedAccountName null .. . .. . and passed this credential to API builder as suggested in some other posts Caused FATAL EXCEPTION . So we can t pass null account name . I could call the API using API explorer without OAuth . But when I enabled OAuth it gave error saying this client ID is not allowed I haven t yet added com.google.api.server.spi.Constant.API EXPLORER CLIENT ID in client ids .. . .. . Then I added code to throw OAuthRequestException on the backend if the user is null . This resulted in API explorer getting errors without OAuth . It works with OAuth enabled after adding API EXPLORER CLIENT ID to client ids .. . .. . Added code to pass valid user account name email from my Android app . Then I am able to access API only with my release APK . Even the debug APK gets exceptions - which is what I expected..So I assume no other Android apps will be able to access this API . So not checking for null user on back-end API is a bad idea as suggested in other posts . It is as good as not mentioning any client ids and not having User param . Only question I have at this moment is : If some one can figure out the WEB CLIENT ID from the APK will they be able to use it to build a web client to access my API I haven t mentioned client secret anywhere in the code . So I am thinking this is not possible . .. . .. . I did search Google groups and Stackoverflow but still it is not clear . Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints How do I protect my API that was built using Google Cloud Endpoints http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app Comment : See my answer to this problem in this post : stackoverflow.com questions 16890175 http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints 26133926 26133926 .. . Answer : Facing the same problem than you Authenticate Android End point without Google User Account is just impossible So here is my way to resolv this problem without any user interaction Maybe not the right but that works and you ve got strong authentication SHA1 + Google Account : .. . .. . HERE IS MY ANDROID CODE .. . .. . Get and Build Valid Credential .. . .. . Use this credential for secure calls .. . .. . HERE IS MY API BACKEND CODE : API Annotation .. . .. . Method code : .. . .. . For the moment it only works on Android I don t know how we gonna do on IOS. . . . .. . .. . Hope It will help you Comment : How about if I am not using google Email i.e @gmail.com Will that work too Comment : No sorry credentials are available only with Google Account. . So if you use other email it doesnt works . I have to find an other ways with IOS for example", "Question : I am an Android developer building my first Google App Engine java back-end for my apps . I don t want anybody else to access this API other than my app . I plan to use App engine for verifying InApp purchases in my Android app . My data is not relevant to users so I don t want users to be able to access my API even if they are logged in with their Google accounts on web or Android devices . I followed the steps mentioned in - Specifying authorized clients in the API backend https : developers.google.com appengine docs java endpoints auth like generating client IDs and add them in @Api clientIds and audiences except Add a User parameter - since I don t need user authentication . Then I deployed App engine and I am still able to access the API through API explorer https : your app id.appspot.com ah api explorer I haven t added API EXPLORER client ID .. . .. . I tested with the APK that was built with the endpoint libs before adding client IDs and can still access the API . Is adding a User parameter to all endpoint APIs a must to achieve my purpose restrict API to only my Android apps . Can I pass null as userAccount name from Android client and ignore user parameter value on server since it will be null Will this ensure that the API is accessible only from my android apps since the client ID is generated for my package name and SHA1 of the APK Should I use something like a service account for this purpose The documentation says for Android both Android and Web client IDs must be added and audience must be the same as web client ID . Does this open access to any other web client can I skip mentioning web client ID and still achieve my purpose Appreciate your time and help . ..... . updating with my further investigation .. . I did the following : .. . .. . Added User parameter to APIs on backend - but did not check for null value . API can still be accessed without passing any credentials from Android debug APK and API explorer .. . .. . Then I tried .. . .. . mCredential GoogleAccountCredential.usingAudience this server : client id : + WEB CLIENT ID mCredential.setSelectedAccountName null .. . .. . and passed this credential to API builder as suggested in some other posts Caused FATAL EXCEPTION . So we can t pass null account name . I could call the API using API explorer without OAuth . But when I enabled OAuth it gave error saying this client ID is not allowed I haven t yet added com.google.api.server.spi.Constant.API EXPLORER CLIENT ID in client ids .. . .. . Then I added code to throw OAuthRequestException on the backend if the user is null . This resulted in API explorer getting errors without OAuth . It works with OAuth enabled after adding API EXPLORER CLIENT ID to client ids .. . .. . Added code to pass valid user account name email from my Android app . Then I am able to access API only with my release APK . Even the debug APK gets exceptions - which is what I expected..So I assume no other Android apps will be able to access this API . So not checking for null user on back-end API is a bad idea as suggested in other posts . It is as good as not mentioning any client ids and not having User param . Only question I have at this moment is : If some one can figure out the WEB CLIENT ID from the APK will they be able to use it to build a web client to access my API I haven t mentioned client secret anywhere in the code . So I am thinking this is not possible . .. . .. . I did search Google groups and Stackoverflow but still it is not clear . Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints How do I protect my API that was built using Google Cloud Endpoints http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app Comment : See my answer to this problem in this post : stackoverflow.com questions 16890175 http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints 26133926 26133926 .. . Answer : Access this site https : code.google.com apis console .. . .. . Choose your project go to credentials section .. . .. . Create a new api-key .. . .. . Create a new android key .. . .. . Click on Edit allowed android applications and enter your SHA1 key your android package name .. . .. . Let me know if this solves the issues . Comment : What do you have to specify in the Android application though Nothing Is setting the Package name the way you said all you need to do Where does the SHA1 key come from", "Question : I am an Android developer building my first Google App Engine java back-end for my apps . I don t want anybody else to access this API other than my app . I plan to use App engine for verifying InApp purchases in my Android app . My data is not relevant to users so I don t want users to be able to access my API even if they are logged in with their Google accounts on web or Android devices . I followed the steps mentioned in - Specifying authorized clients in the API backend https : developers.google.com appengine docs java endpoints auth like generating client IDs and add them in @Api clientIds and audiences except Add a User parameter - since I don t need user authentication . Then I deployed App engine and I am still able to access the API through API explorer https : your app id.appspot.com ah api explorer I haven t added API EXPLORER client ID .. . .. . I tested with the APK that was built with the endpoint libs before adding client IDs and can still access the API . Is adding a User parameter to all endpoint APIs a must to achieve my purpose restrict API to only my Android apps . Can I pass null as userAccount name from Android client and ignore user parameter value on server since it will be null Will this ensure that the API is accessible only from my android apps since the client ID is generated for my package name and SHA1 of the APK Should I use something like a service account for this purpose The documentation says for Android both Android and Web client IDs must be added and audience must be the same as web client ID . Does this open access to any other web client can I skip mentioning web client ID and still achieve my purpose Appreciate your time and help . ..... . updating with my further investigation .. . I did the following : .. . .. . Added User parameter to APIs on backend - but did not check for null value . API can still be accessed without passing any credentials from Android debug APK and API explorer .. . .. . Then I tried .. . .. . mCredential GoogleAccountCredential.usingAudience this server : client id : + WEB CLIENT ID mCredential.setSelectedAccountName null .. . .. . and passed this credential to API builder as suggested in some other posts Caused FATAL EXCEPTION . So we can t pass null account name . I could call the API using API explorer without OAuth . But when I enabled OAuth it gave error saying this client ID is not allowed I haven t yet added com.google.api.server.spi.Constant.API EXPLORER CLIENT ID in client ids .. . .. . Then I added code to throw OAuthRequestException on the backend if the user is null . This resulted in API explorer getting errors without OAuth . It works with OAuth enabled after adding API EXPLORER CLIENT ID to client ids .. . .. . Added code to pass valid user account name email from my Android app . Then I am able to access API only with my release APK . Even the debug APK gets exceptions - which is what I expected..So I assume no other Android apps will be able to access this API . So not checking for null user on back-end API is a bad idea as suggested in other posts . It is as good as not mentioning any client ids and not having User param . Only question I have at this moment is : If some one can figure out the WEB CLIENT ID from the APK will they be able to use it to build a web client to access my API I haven t mentioned client secret anywhere in the code . So I am thinking this is not possible . .. . .. . I did search Google groups and Stackoverflow but still it is not clear . Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints How do I protect my API that was built using Google Cloud Endpoints http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app Comment : See my answer to this problem in this post : stackoverflow.com questions 16890175 http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints 26133926 26133926 .. . Answer : Facing the same problem here are the result-of my research : .. . .. . Added Android cliend id with SHA1 fingerprint in Google console .. . Use of it in the API annotation .. . .. . BUT : .. . .. . If i dont add user parameter to methods : the check about android app client id does not work .. . .. . If I add the USER parameter but do not ask the user to choose its google account to create the credential .. . also it does not work .. . Conclusion : It seems to be mandatory to connect a user account for the check about the app client id to be executed .. . I really do not understand why because no link exist between the 2 processes Comment : Does this solve the problem Because your conclusion is a bit inconclusive on these terms Comment : Same problem than you Comment : Were you ever able to figure this out It was my impression that you don t need a user account as well but I cannot figure out how not to have one.. .", "Question : A few days ago I ve started developing a Backend for Mobile Applications using Google App Engine and Google Cloud Endpoints https : developers.google.com appengine docs java endpoints . This tutorial http : www.youtube.com watch v NU wNR UUn4 shows how the endpoints are getting generated automatically as well as the client library for Android . So we have our Entity : .. . .. . And the endpoint for this class : .. . .. . Besides using the generated Android Endpoint Library that uses the REST API I would like to add a User Interface on the Server build with Google Web Toolkit GWT . But how should I manipulate the date on Server Side I can see different approaches.. . .. . .. . Option A1 : Adding an RPC Service in GWT .. . .. . But now my PersonServiceImpl and PersonEndpoint do roughly the same . So we didn t follow DRY http : en.wikipedia.org wiki Don 27t repeat yourself : Besides that Person is not allowed to have com.google.appengine.api.datastore.Key so we would have to change our Entities . Option A2 : Service calls endpoint class .. . .. . Should work but still no com.google.appengine.api.datastore.Key Type in the Entity and since Endpoints are using CollectionResponse Person we would have to transform this into an Collection Person in case of listPerson . Option B1 : Using the Java Endpoint Client Library .. . .. . We could split the GWT Client from our App Engine API Backend and use the generated Endpoint Client Libraries for Java . So we call the REST Endpoint-API from within a RemoteServiceServlet . But wouldn t this end up in two Requests even if the GWT client and Endpoints are on the same server or even in the same project GWT Client -- RPC -- GWT Server -- HTTP Request -- App Engine Backend Server .. . .. . Option B2 : Using the JavaScript Endpoint Client Library .. . .. . Might be the best approach but would end up in massive JSNI . .. . .. . So what s best practice I can t find any example projects using Google Cloud Endpoints AND GWT in one project : Comment : Have you seen code.google.com p gwt-google-apis https : code.google.com p gwt-google-apis Comment : Yes but they are in an early Alpha Version and for the Google API . I m talking about your own API Endpoint generated by GAE . Comment : That library is for any discovery based API which your API Endpoint happens to be discovery based that is . Comment : I m having the same dilemma . We are looking to use the Endpoint API but develop a GWT front end . I have a feeling it may have to be one or the other.. . Comment : Also looking for solution . Using JSNI for now . .. . Answer : Maybe i don t understand something . But everything seems for me to be very easy . 1 . GWT client is not on the server . It is compiled Javascript executed in client s browser . 2 . Google plugin generates Javascript client code that calls Endpoint with suitable JSON . 3 . Above code can be called from GWT . Voila Comment : Yepp so this would be Option B2 . But as I mentioned it would work but ends up in a lot JSNI . Because the most part of the Client is written defined in Java GWT but the logic calling the endpoint is the generated Javascript code . Works but is not really nice .", "Question : When I attempt to generate an endpoint client library in Eclipse GPE 3.5.1 GAE SDK 1.9.4 I get this error : Not an App Engine project . The project is an App Engine project and is deployed . The project is configured as an EAR project with backend and frontend modules . I don t get any errors in the Error Log . GAE SDK 1.9.3 gives me the same error . I ve also tried the command-line but simply get Error . .. . Answer : If you created your your cloud-endpoints projects using WTP then Right click on the cloud-endpoints project Google App Engine WTP Generate Cloud Endpoint Client Library .. . .. . You get the error if you right-click on the cloud-endpoints project Google Generate Cloud Endpoint Client Library . If you do not see the Google App Engine WTP menu item ensure you are using the Java EE perspective .", "Question : I am an Android developer building my first Google App Engine java back-end for my apps . I don t want anybody else to access this API other than my app . I plan to use App engine for verifying InApp purchases in my Android app . My data is not relevant to users so I don t want users to be able to access my API even if they are logged in with their Google accounts on web or Android devices . I followed the steps mentioned in - Specifying authorized clients in the API backend https : developers.google.com appengine docs java endpoints auth like generating client IDs and add them in @Api clientIds and audiences except Add a User parameter - since I don t need user authentication . Then I deployed App engine and I am still able to access the API through API explorer https : your app id.appspot.com ah api explorer I haven t added API EXPLORER client ID .. . .. . I tested with the APK that was built with the endpoint libs before adding client IDs and can still access the API . Is adding a User parameter to all endpoint APIs a must to achieve my purpose restrict API to only my Android apps . Can I pass null as userAccount name from Android client and ignore user parameter value on server since it will be null Will this ensure that the API is accessible only from my android apps since the client ID is generated for my package name and SHA1 of the APK Should I use something like a service account for this purpose The documentation says for Android both Android and Web client IDs must be added and audience must be the same as web client ID . Does this open access to any other web client can I skip mentioning web client ID and still achieve my purpose Appreciate your time and help . ..... . updating with my further investigation .. . I did the following : .. . .. . Added User parameter to APIs on backend - but did not check for null value . API can still be accessed without passing any credentials from Android debug APK and API explorer .. . .. . Then I tried .. . .. . mCredential GoogleAccountCredential.usingAudience this server : client id : + WEB CLIENT ID mCredential.setSelectedAccountName null .. . .. . and passed this credential to API builder as suggested in some other posts Caused FATAL EXCEPTION . So we can t pass null account name . I could call the API using API explorer without OAuth . But when I enabled OAuth it gave error saying this client ID is not allowed I haven t yet added com.google.api.server.spi.Constant.API EXPLORER CLIENT ID in client ids .. . .. . Then I added code to throw OAuthRequestException on the backend if the user is null . This resulted in API explorer getting errors without OAuth . It works with OAuth enabled after adding API EXPLORER CLIENT ID to client ids .. . .. . Added code to pass valid user account name email from my Android app . Then I am able to access API only with my release APK . Even the debug APK gets exceptions - which is what I expected..So I assume no other Android apps will be able to access this API . So not checking for null user on back-end API is a bad idea as suggested in other posts . It is as good as not mentioning any client ids and not having User param . Only question I have at this moment is : If some one can figure out the WEB CLIENT ID from the APK will they be able to use it to build a web client to access my API I haven t mentioned client secret anywhere in the code . So I am thinking this is not possible . .. . .. . I did search Google groups and Stackoverflow but still it is not clear . Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints How do I protect my API that was built using Google Cloud Endpoints http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app Comment : See my answer to this problem in this post : stackoverflow.com questions 16890175 http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints 26133926 26133926 .. . Answer : Google provides ways to do this for Android web and iOS The steps involves : .. . .. . 1 . Specifying a client Id for apps you want to allow to make requests to your API .. . 2 . Adding a User parameter to all exposed methods to be protected by authorization . 3 . Generating the client library again for any Android clients .. . 4 . Redeploying your backend API . 5 . Updating the regenerated jar file to your Android project for your Android client . These steps are laid out in clear detail on Google s Using Auth with Endpoints https : cloud.google.com appengine docs java endpoints auth and also on this blog http : android-developers.blogspot.com 2013 01 verifying-back-end-calls-from-android.html Comment : yes but is there anyway to lock down the api so that you do not have to require your android user to have a google account to use the app Comment : I don t think so . Comment : Then how does Snapchat do it Snapchat uses google-app-engine and I presume cloud endpoints Comment : That app was built by professionals who find their way around almost anything.So anything I tell you would be mere speculation . Comment : Let s speculate", "Question : I have successfully created an app-engine connected android project . So now I want to take it to the natural next level : one endpoint api many different android apps . My question is this : Does the eclipse-plugin allow for this If so how would I do that using the google eclipse-plugin Comment : I actually thought this was going to be an easy one for the Google developer relations team . Is this really not doable It s been 8 hours without even one attempt at a reply . Comment : I think that GPE does not directly support this : your backend can not be configured to generate code to multiple Android projects so you will need to manually copy or sync the generated code between your Android projects . This seems like an oversight to me and I figure they will fix this eventually . .. . Answer : Try the below steps to ready your 2nd android app to use the same app engine backend with cloud endpoints : .. . .. . 1 Generate a client id for your 2nd android app in the api console .. . .. . 2 Update the existing app engine code generated from 1st app to include the id of the 2nd app in the list of allowed clients and deploy this code .. . .. . .. . .. . 3 Add the client libraries generated earlier from your app engine backend code to the 2nd app . Refer this link-to reconfirm the required libraries : Consuming endpoints in android https : developers.google.com appengine docs java endpoints consume android . You can also do a comparison between the libs folder of your 1st app and 2nd app to ensure all libraries are added . 4 In the 2nd app add the classes representing the models in your backend request initialisers etc same as in your first app . 5 In the 2nd app at required areas in your application logic you can access the api by creating the service object and then calling the api exposed by the endpoint", "Question : Google Plugin for Eclipse includes a facility to automatically generate the cloud endpoints client library . But there doesn t seem to be an easy way to move the generated source.jar file into your Android source . The documentation https : developers.google.com appengine docs java endpoints consume android says .. . .. . The Endpoints generation results in a sources jar file . Add the contents of this jar file to your Android project . It doesn t seem possible to put the source.jar file into an Android lib or libs since the source is .java rather than .class form . So I just manually copy over the source generated by GPE which they put in an endpoints-lib folder in your AppEngine project . This can be extremely cumbersome especially when you have more than one endpoint and are editing it often . See also Error connecting android app to Google Cloud Endpoints : could not find class http : stackoverflow.com questions 15088110 error-connecting-android-app-to-google-cloud-endpoints-could-not-find-class .. . .. . Does anyone know of a way to actually use the sources.jar file directly in the Android project Thanks . .. . Answer : The idea is that the wizard that generates the client library also copies it into your client project . But that depends on e.g . how you initially created your projects and even if it does work what if you have multiple clients projects or change your client project.. . so here are some ideas : .. . .. . I found a file that specifies which project the client libraries will get copied to in the .settings folder : com.google.gdt.eclipse.appengine.swarm.prefs : .. . .. . connectedProject target-android-project-name .. . eclipse.preferences.version 1 .. . .. . Manually changing this file worked for me but I haven t tried manually creating it if it doesn t exist . The other solution which you asked about is to manually copy the file . In my case I was able to copy the generated files from gae-project endpoint-libs to android-project endpoint-libs . If I remember correctly you must then find the sources jar file it is amongst the file you copied and will be easy to find and extract those into endpoint-name -v1-generated-source folder . You create this folder in the same folder where you found the jar . Clearly that is is not a great solution so. . .. . .. . There is an endpoints.cmd bat that can be used instead of the GPE Wizard - I suggest you look to see if it has a command for copying and extracting the generated library . I believe you would find it in the bin folder of the GAE J SDK . Comment : Thanks Tom . I think I have finally found a simple solution see my answer Comment : Creating it by hand and restarting Eclipse worked perfectly .", "Question : I have a problem with getting the userid for a cloud endpoint method . I have used oauth2 authentication in my android client and passed the credentials to my service . The below is similar to what my method looks like simplified to make it more clear . I note that issue 8848 https : code.google.com p googleappengine issues detail id 8848 makechanges for python seems to be very similar to this problem . Is the same issue a problem in java-api as well The method .. . .. . will show null for federated-identity and userId even though credentials in android client have had oauth2 authentication performed . The email-address shows up correctly in the log . This is all on a deployed application btw . Anybody have any other suggestions as to what is wrong Any known workarounds for the issue I have followed the method suggested in https : developers.google.com appengine docs java endpoints consume android making-authenticated-calls to set up my android client . .. . Answer : I followed the same document reference in the question and had the same exact problem . Finally got the Endpoints working with OAuth2 by doing the following : .. . .. . There was an update for Google Play Services which I updated to now on version 15 Android SDK . The endpoint documentation was updated to state that you should enable the Google Plus APIs for your application even if you just using userinfo.email scope for your app engine endpoints . I did this via the Cloud Console . Also finally there was a new note stating that OAuth2 does not work from the emulator . I confirmed this . I still get the null user error from an Android Emulator even when pointing to the production app engine . So I can still only test endpoints from a real device . I was able to confirm that I needed all three of the above steps . Comment : Could you please provide links to mentioned statements I have started developing app using endpoint but I never seen anything about enabling Google+ API . Comment : This solution seems irrelevant to the question . The problem stated is in the backend appengine cloud endpoints . What you re describing is in the frontend android code .", "Question : What Iam trying to do is to authenticate my android app to the Google cloud endpoint . Basically the endpoints should only allow my android app to access the methods and nothing else . I have done these things - .. . .. . 1 . Create a client id using my SHA1 value in Eclipse in the google-cloud-console . 2 . Create a web client id in the Google cloud console for my endpoint project .. . .. . 3 . Add both these client id s in the @Api mentioned on each endpoint . 4 . Add an extra user parameter in the endpoint methods . 5 . Regenerate and Deploy the backend to the cloud . But when iam running this the user is always coming as null . I m at my wits end trying to find a proper working method for doing all this . I ve searched many forums but no proper answers anywhere . Here s another similar post Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app .. . .. . This is the reference Iam using - https : developers.google.com appengine docs java endpoints auth .. . .. . Has anyone here done this before My main goal is to not allow unauthenticated apps and outside world to access the endpoints for obvious security reasons . I don t want to use end-user based authentication since I want to keep my app very simple . Comment : Did you ever get this working as desired I m facing the same problem . Comment : This was a long time back but if I remember correctly the short answer was no you cannot do a allow just my app thing unless you have a user being sent alongwith it. . If you had a user also being sent everything works perfect...and with IOS and Cloud endpoints it got even weirder . . I just moved away from GCL in the end Comment : Any news info on this I really am trying to do the same thing.. . Comment : Not working on this anymore so no new info .. . Answer : You need to call authenticate on the client then possibly the library you re using will inject the user information .", "Question : Old .. . .. . I need to work on the iOS version of my app . The App-Engine and Android portions are completed using the Google Eclipse Plugin GPE . In the Official Google Documentations https : developers.google.com appengine docs java endpoints gen clients generating a discovery doc for ios using maven I am told the easiest way is to use maven . Does anyone know how I might add maven to the App-Engine portion of my connected project Apparently I only need to add the following one line in the maven file .. . .. . Update .. . .. . Again I need to get the iOS client for an endpoint project that I created with the Google Eclipse Plugin as an App-engine Connected Android Project . From eclipse I simply do Right Click Google Generate Cloud Endpoint Client Library and it generates the library for android . But now I just look in my war directory and I see three files : myendpoint-1-rest.discovery myendpoint-1-rcp.discovery myendpoint-1-rest.api . Now this is a wild guess but are these the files I need for iOS and JavaScript Or must I follow the instructions in the official docs to get the discovery files for iOS What I mean is I have not generated the files per the instructions but I have used the GPE for creating the endpoints for android . Does GPE create the necessary clients for iOS and JavaScript as well I cannot find any documentation on that . .. . Answer : Javascript client only needs to include script https : apis.google.com js client.js https : developers.google.com appengine docs java endpoints consume js enabling a javascript client for endpoints . You can load your API using .. . .. . Objective-C client needs some extra work after generating your discovery doc https : developers.google.com appengine docs java endpoints consume ios .", "Question : I have been doing extensive research on how to authenticate your client Android iOS web-app with Cloud Endpoints without requiring your user to use their Google account login the way the documentation https : cloud.google.com appengine docs java endpoints auth shows you . The reason for this is that I want to secure my API or lock it down to only my specified clients . Sometimes I will have an app that does not have a user login . I would hate to pester my user to now sign in just so my API is secure . Or other times I just want to manage my own users like on a website and not use Google+ Facebook or whatever else login authentication . To start let me first show the way you can authenticate your Android app with your Cloud Endpoints API using the Google Accounts login as specified in the documentation https : cloud.google.com appengine docs java endpoints auth . After that I will show you my findings and a potential area for a solution which I need help with . 1 Specify the client IDs clientIds of apps authorized to make requests to your API backend and 2 add a User parameter to all exposed methods to be protected by authorization . 3 In Android call the API method in an Asynctask making sure to pass in the credential variable in the Builder : .. . .. . What is happening is that in your Android app you are showing the Google account picker first storing that Google account email in you shared preferences and then later setting it as part of the GoogleAccountCredential object more info on how to do that here https : cloud.google.com appengine docs java endpoints consume android . The Google App Engine server receives your request and checks it . If the Android Client is one of the ones you specified in the @Api notation then the server will inject the com.google.api.server.spi.auth.common.User object into your API method . It is now your responsibility to check if that User object is null or not inside your API method . If the User object is null you should throw an exception in your method to prevent it from running . If you do not do this check your API method will execute a no-no if you are trying to restrict access to it . You can get your ANDROID CLIENT ID by going to your Google Developers Console . There you provide the package name of your Android App and the SHA1 which generates for you an android client id for you to use in your @Api annotation or put it in a class Constants like specified above for usability . I have done some extensive testing with all of the above and here is what I found : .. . .. . If you specify a bogus or invalid Android clientId in your @Api annotation the User object will be null in your API method . If you are doing a check for if user null throw new UnauthorizedException User is Not Valid then your API method will not run . This is surprising because it appears there is some behind the scenes validation going on in Cloud Endpoints that check whether the Android ClientId is valid or not . If it is invalid it won t return the User object - even if the end user logged in to their Google account and the GoogleAccountCredential was valid . My question is does anyone know how I can check for that type of ClientId validation on my own in my Cloud Endpoints methods Could that information be passed around in an HttpHeader for example Another injected type in Cloud Endpoints is the javax.servlet.http.HttpServletRequest . You can get the request like this in your API method : .. . .. . But I am not sure if the necessary information is there or how to get it . Certainly somewhere there must be some data that tells us if the Client is an authorized and specified one in the @Api clientIds . This way you could lock-down your API to your Android app and potentially other clients without ever having to pester your end users to log in or just create your own simple username + password login . For all of this to work though you would have to pass in null in the third argument of your Builder like this : .. . .. . MyApi.Builder builder new MyApi.Builder AndroidHttp.newCompatibleTransport new AndroidJsonFactory null .. . .. . Then in your API method extract whether or not the call came from an authenticated client and either throw an exception or run whatever code you wanted to . I know this is possible because when using a GoogleAccountCredential in the Builder somehow Cloud Endpoints knows whether or not the call came from an authenticated client and then either injects its User object into the API method or not based on that . Could that information be in the header or body somehow If so how can I get it out to later check if it is there or not in my API method Note : I read the other posts on this topic . They offer ways to pass in your own authentication token - which is fine - but your .apk will still not be secure if someone decompiles it . I think if my hypothesis works you will be able to lock-down your Cloud Endpoints API to a client without any logins . Custom Authentication for Google Cloud Endpoints instead of OAuth2 http : stackoverflow.com questions 16970327 custom-authentication-for-google-cloud-endpoints-instead-of-oauth2 rq 1 .. . .. . Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . Google Cloud Endpoints without Google Accounts http : stackoverflow.com questions 19224728 google-cloud-endpoints-without-google-accounts .. . .. . EDIT : We used Gold Support for the Google Cloud Platform and have been talking back and forth with their support team for weeks . This is their final answer for us : .. . .. . Unfortunately I haven t had any luck on this . I ve asked around my team and checked all of the documentation . It looks like using OAuth2 is your only option . The reason is because the endpoint servers handle the authentication before it reaches your app . This means you wouldn t be able to develop your own authentication flow and would get results much like what you were seeing with the tokens . .. . I would be happy to submit a feature request for you . If you could provide a little more information about why the OAuth2 flow doesn t work for your customers I can put the rest of the information together and submit it to the product manager . frowny face - however maybe it is still possible .. . Answer : I have implemented Endpoint Auth using a custom header Authorization and it works just fine . In my case this token is set after login but should work all the same with your app . Check your tests because the value should be there . The way to retrieve that header is indeed : .. . .. . String Auth req.getHeader Authorization .. . .. . You could take it a step further and define your own implementations of an Authenticator https : cloud.google.com appengine docs java endpoints javadoc com google-api server spi config Authenticator and apply it to your secure API calls . Comment : req.getHeader Authorization is null if you do not pass in a google credential from the Android client . I have also tried passing in my own implementation of an Authenticator but the problem still exists : if someone de-compiles your app they could spoof your app because your Authenticator is spelled out in black and white there.. . So I was hoping there was some way else.. . Comment : @micror thats not true . I have populated custom headers like auth with user defined values eg from an angular js client Comment : What part is not true Yes you can populate custom headers like auth by yourself but the fact remains : your app can be decompiled and spoofed . Please read my question again - the question shows how there is some sort of authentication Cloud Endpoints is doing to verify the Android client that they are not telling us about so maybe we can fish out the answer . Comment : there is some sort of authentication Cloud Endpoints is doing to verify the Android client that they are not telling us they send a bunch of headers set by Andoird in order to validate request origin there s no way to tap into that logic though . Comment : Then maybe we can replicate this authentication method ourselves Perhaps this turns then into a question of whether or not you can uniquely identify the exact Android app a request is coming from .", "Question : We are super excited about App Engine s support for Google Cloud Endpoints https : developers.google.com appengine docs python endpoints . That said we don t use OAuth2 yet and usually authenticate users with username password so we can support customers that don t have Google accounts . We want to migrate our API over to Google Cloud Endpoints because of all the benefits we then get for free API Console Client Libraries robustness but our main question is .. . .. . How to add custom authentication to cloud endpoints where we previously check for a valid user session + CSRF token in our existing API . Is there an elegant way to do this without adding stuff like session information and CSRF tokens to the protoRPC messages Comment : Will work on a real answer but TL DR if you re using your own accounts you ll need to mint your own OAuth tokens if you want to use OAuth 2.0 . Comment : Anything new tosh and @bossylobster about this has anyone done it successfully Comment : Nothing new right now but I provided slightly more information on how to do this here but @tosh I think you already knew this . stackoverflow.com questions 18716674 http : stackoverflow.com questions 18716674 facebook-login-in-google-cloud-endpoints 18728482 18728482 .. . Answer : From my understanding Google Cloud Endpoints provides a way to implement a RESTful API and to generate a mobile client library . Authentication in this case would be OAuth2 . OAuth2 provides different flows some of which support mobile clients . In the case of authentication using a principal and credentials username and password this doesn t seem like a good fit . I honestly think you would be better off by using OAuth2 . Implementing a custom OAuth2 flow to support your case is an approach that could work but is very error prone . I haven t worked with OAuth2 yet but maybe an API key can be created for a user so they can both use the front-end and the back-end through the use of mobile clients . Comment : OAuth2 always requires to have Google account which is the most troublesome problem to user .", "Question : I am an Android developer building my first Google App Engine java back-end for my apps . I don t want anybody else to access this API other than my app . I plan to use App engine for verifying InApp purchases in my Android app . My data is not relevant to users so I don t want users to be able to access my API even if they are logged in with their Google accounts on web or Android devices . I followed the steps mentioned in - Specifying authorized clients in the API backend https : developers.google.com appengine docs java endpoints auth like generating client IDs and add them in @Api clientIds and audiences except Add a User parameter - since I don t need user authentication . Then I deployed App engine and I am still able to access the API through API explorer https : your app id.appspot.com ah api explorer I haven t added API EXPLORER client ID .. . .. . I tested with the APK that was built with the endpoint libs before adding client IDs and can still access the API . Is adding a User parameter to all endpoint APIs a must to achieve my purpose restrict API to only my Android apps . Can I pass null as userAccount name from Android client and ignore user parameter value on server since it will be null Will this ensure that the API is accessible only from my android apps since the client ID is generated for my package name and SHA1 of the APK Should I use something like a service account for this purpose The documentation says for Android both Android and Web client IDs must be added and audience must be the same as web client ID . Does this open access to any other web client can I skip mentioning web client ID and still achieve my purpose Appreciate your time and help . ..... . updating with my further investigation .. . I did the following : .. . .. . Added User parameter to APIs on backend - but did not check for null value . API can still be accessed without passing any credentials from Android debug APK and API explorer .. . .. . Then I tried .. . .. . mCredential GoogleAccountCredential.usingAudience this server : client id : + WEB CLIENT ID mCredential.setSelectedAccountName null .. . .. . and passed this credential to API builder as suggested in some other posts Caused FATAL EXCEPTION . So we can t pass null account name . I could call the API using API explorer without OAuth . But when I enabled OAuth it gave error saying this client ID is not allowed I haven t yet added com.google.api.server.spi.Constant.API EXPLORER CLIENT ID in client ids .. . .. . Then I added code to throw OAuthRequestException on the backend if the user is null . This resulted in API explorer getting errors without OAuth . It works with OAuth enabled after adding API EXPLORER CLIENT ID to client ids .. . .. . Added code to pass valid user account name email from my Android app . Then I am able to access API only with my release APK . Even the debug APK gets exceptions - which is what I expected..So I assume no other Android apps will be able to access this API . So not checking for null user on back-end API is a bad idea as suggested in other posts . It is as good as not mentioning any client ids and not having User param . Only question I have at this moment is : If some one can figure out the WEB CLIENT ID from the APK will they be able to use it to build a web client to access my API I haven t mentioned client secret anywhere in the code . So I am thinking this is not possible . .. . .. . I did search Google groups and Stackoverflow but still it is not clear . Authenticate my app to Google cloud endpoints not a user Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . How do I protect my API that was built using Google Cloud Endpoints How do I protect my API that was built using Google Cloud Endpoints http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints .. . .. . Restrict access to google-cloud-endpoints to Android app Restrict access to google-cloud-endpoints to Android app http : stackoverflow.com questions 17873993 restrict-access-to-google-cloud-endpoints-to-android-app Comment : See my answer to this problem in this post : stackoverflow.com questions 16890175 http : stackoverflow.com questions 16890175 how-do-i-protect-my-api-that-was-built-using-google-cloud-endpoints 26133926 26133926 .. . Answer : I had a similar issue not between Android and App Engine but between a separate server and App Engine . The way I handled it was to add a signature hash field as a parameter to each API call . If the request had an improper signature it would be denied . For example suppose your API end-point is example.com api do thing param1 foo . I would hash the entire url along with a secret-key and then append the result-of the hash to the request : example.com api do thing param1 foo hash some long hex value . Then on the server-side I would first remove the hash from the url request then run the hash on everything that was remaining . Finally you check whether the calculated hash matches the one that was sent with the request and if they don t you can deny the request . It is very important however that your secret-key remain secret . You have to be careful with this on Android because someone could attempt to decompile your APK . Comment : Could you show some code what you used as your hash and secret Just want to get some more information on how this was done with cloud endpoints .", "Question : I have been doing extensive research on how to authenticate your client Android iOS web-app with Cloud Endpoints without requiring your user to use their Google account login the way the documentation https : cloud.google.com appengine docs java endpoints auth shows you . The reason for this is that I want to secure my API or lock it down to only my specified clients . Sometimes I will have an app that does not have a user login . I would hate to pester my user to now sign in just so my API is secure . Or other times I just want to manage my own users like on a website and not use Google+ Facebook or whatever else login authentication . To start let me first show the way you can authenticate your Android app with your Cloud Endpoints API using the Google Accounts login as specified in the documentation https : cloud.google.com appengine docs java endpoints auth . After that I will show you my findings and a potential area for a solution which I need help with . 1 Specify the client IDs clientIds of apps authorized to make requests to your API backend and 2 add a User parameter to all exposed methods to be protected by authorization . 3 In Android call the API method in an Asynctask making sure to pass in the credential variable in the Builder : .. . .. . What is happening is that in your Android app you are showing the Google account picker first storing that Google account email in you shared preferences and then later setting it as part of the GoogleAccountCredential object more info on how to do that here https : cloud.google.com appengine docs java endpoints consume android . The Google App Engine server receives your request and checks it . If the Android Client is one of the ones you specified in the @Api notation then the server will inject the com.google.api.server.spi.auth.common.User object into your API method . It is now your responsibility to check if that User object is null or not inside your API method . If the User object is null you should throw an exception in your method to prevent it from running . If you do not do this check your API method will execute a no-no if you are trying to restrict access to it . You can get your ANDROID CLIENT ID by going to your Google Developers Console . There you provide the package name of your Android App and the SHA1 which generates for you an android client id for you to use in your @Api annotation or put it in a class Constants like specified above for usability . I have done some extensive testing with all of the above and here is what I found : .. . .. . If you specify a bogus or invalid Android clientId in your @Api annotation the User object will be null in your API method . If you are doing a check for if user null throw new UnauthorizedException User is Not Valid then your API method will not run . This is surprising because it appears there is some behind the scenes validation going on in Cloud Endpoints that check whether the Android ClientId is valid or not . If it is invalid it won t return the User object - even if the end user logged in to their Google account and the GoogleAccountCredential was valid . My question is does anyone know how I can check for that type of ClientId validation on my own in my Cloud Endpoints methods Could that information be passed around in an HttpHeader for example Another injected type in Cloud Endpoints is the javax.servlet.http.HttpServletRequest . You can get the request like this in your API method : .. . .. . But I am not sure if the necessary information is there or how to get it . Certainly somewhere there must be some data that tells us if the Client is an authorized and specified one in the @Api clientIds . This way you could lock-down your API to your Android app and potentially other clients without ever having to pester your end users to log in or just create your own simple username + password login . For all of this to work though you would have to pass in null in the third argument of your Builder like this : .. . .. . MyApi.Builder builder new MyApi.Builder AndroidHttp.newCompatibleTransport new AndroidJsonFactory null .. . .. . Then in your API method extract whether or not the call came from an authenticated client and either throw an exception or run whatever code you wanted to . I know this is possible because when using a GoogleAccountCredential in the Builder somehow Cloud Endpoints knows whether or not the call came from an authenticated client and then either injects its User object into the API method or not based on that . Could that information be in the header or body somehow If so how can I get it out to later check if it is there or not in my API method Note : I read the other posts on this topic . They offer ways to pass in your own authentication token - which is fine - but your .apk will still not be secure if someone decompiles it . I think if my hypothesis works you will be able to lock-down your Cloud Endpoints API to a client without any logins . Custom Authentication for Google Cloud Endpoints instead of OAuth2 http : stackoverflow.com questions 16970327 custom-authentication-for-google-cloud-endpoints-instead-of-oauth2 rq 1 .. . .. . Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . Google Cloud Endpoints without Google Accounts http : stackoverflow.com questions 19224728 google-cloud-endpoints-without-google-accounts .. . .. . EDIT : We used Gold Support for the Google Cloud Platform and have been talking back and forth with their support team for weeks . This is their final answer for us : .. . .. . Unfortunately I haven t had any luck on this . I ve asked around my team and checked all of the documentation . It looks like using OAuth2 is your only option . The reason is because the endpoint servers handle the authentication before it reaches your app . This means you wouldn t be able to develop your own authentication flow and would get results much like what you were seeing with the tokens . .. . I would be happy to submit a feature request for you . If you could provide a little more information about why the OAuth2 flow doesn t work for your customers I can put the rest of the information together and submit it to the product manager . frowny face - however maybe it is still possible .. . Answer : So you don t have any user specific info but just want to ensure that only your app is able to communicate with your backend.. . This is what i think .. . .. . change .. . .. . to .. . .. . The Client ID is generated from the signature of your app . It can t be replicated . If you only allow your endpoints to accept requests from the Android App your problem would be solved . Tell me if this works . Comment : Thank you for your reply but this does not work . Removing Constants.WEB CLIENT ID Constants.IOS CLIENT ID Constants.API EXPLORER CLIENT ID doesn t do anything . Comment : @MicroR yeah maybe it s only for the OAuth itself . For your problem you will need a custom authentication . Why not use something based on RSA", "Question : I am currently making API calls to my backend using the Google Cloud Endpoint generated JavaScript Client . The problem is the cookies for my page are not being added to the HTTP requests . How can I add the Gitkit gtoken cookie to my request . Backend is Google App Engine Java .. . Using Goole Cloud Endpoints to build my API .. . Using the Google Cloud Endpoints JavaScript web client loaded as follows gapi.client.load myApi v1 resourceLoaded https : my-project-id.appspot.com ah api .. . .. . I have already configured Google Cloud Endpoints on the backend to allow cookies . auth @ApiAuth allowCookieAuth AnnotationBoolean.TRUE .. . .. . My endpoint looks as follows . I am making calls with the Google Cloud Endpoints JS client as so . Is there something I have to do to make sure the Endpoints JS client includes the gtoken cookie in it s request Comment : Open bounty and still no answers Is there something I can do to make this question more clear Comment : Hi Marc you can add screenshots of cookies storage + request headers and create a plunker jsfiddle jsbin to reproduce the problem . Comment : @AlexanderTrakhimenok Do you mean cookies storage on the browser side Comment : Yes there are chances that cookies are not set or not send to server . You need to localize where is a problem . If it s sent over wire by browser then issue is on server-side . If it s in cookies storage but not sent it s client issue . If it s not in storage there is just nothing to sent and it s a different problem to find out why they are not at client at all . Comment : You can view cookies requests headers in dev tools of your browser . And yes cookies are send automatically if not expired and match to host path prefix . .. . Answer : You better add screenshots of cookies storage + request headers and create a plunker jsfiddle jsbin to reproduce the problem . There are chances that cookies are not set or not send to server . You need to localize where is a problem . If it s sent over wire by browser then issue is on server-side . If it s in cookies storage but not sent it s client issue . If it s not in storage there is just nothing to sent and it s a different problem to find out why they are not at client at all . You can view cookies requests headers in devtools of your browser . And yes cookies are send automatically if not expired and match to host path prefix . Comment : Solved my problem . The problem was that I was making calls to my API hosted on a remote GAE server from my localhost : 8080 dev server . I thought that any cookie for that page would be included in all request to any server . I did not understand that the request destination needed to match the cookie s domain .", "Question : Can someone explain steps to implement login process with other OAuth2 providers This link Google Cloud Endpoints with another oAuth2 provider http : stackoverflow.com questions 15872240 google-cloud-endpoints-with-another-oauth2-provider gives little info about writing custom authentication but I guess for beginner like me that s not enough please give detailed steps . Especially interested in Facebook . .. . Answer : You need to implement Facebook s client-side APIs according to their documentation and the environment you are deploying your client app to Browser vs iOS vs Android . This includes registering your app with them . Your registered app will direct the user to go through an authentication flow and at the end of it your client app will have access to a short-lived access token . Facebook has multiple types of access tokens but the one it sounds like you re interested in is called a User Access Token since it identifies an authorized user . Pass the access token to your Cloud Endpoints API via a field or header . Inside of your API code receive the access token and implement Facebook s API that checks the validity of the access token . The first answer on this SO question http : stackoverflow.com questions 5406859 facebook-access-token-server-side-validation-for-iphone-app makes it look rather easy but you probably want to reference their documentation again . If that check passes then you would run your API code otherwise throw an exception . You will typically also want to implement a caching mechanism to prevent calling the Facebook server-side validation API for each Cloud Endpoints request . Finally I mentioned that your client app has a short lived token . If you have a client app that is browser-based then you will probably want to upgrade that to a long lived token . Facebook has a flow for that as well which involves your API code requesting a long lived token with the short lived one . You would then need to transfer that long lived token back to the client app to use for future Cloud Endpoints API calls . If your client app is iOS or Android based then your tokens are managed by Facebook code and you simply request access tokens from the respective APIs when you need them . Comment : thanks @PaulR if no other more detailed answer will be given I will check yours as answer : thanks again Comment : @user1831986 Did you ever get this working This guy http : stackoverflow.com questions 15872240 google-cloud-endpoints-with-another-oauth2-provider says it can t be done . Comment : I havent tried even Comment : It can t be done if you try to use the native Google App Engine User object . Managing the tokens yourself should work .", "Question : null .. . Answer : I am finding it really difficult to set up google endpoints for android and must be missing out some setup step to allow the connection between the endpoints api and the android client . In a previous question http : stackoverflow.com questions 38031728 connection-refused-when-calling-endpoints-from-android-client I mentioned that my android app could not call the endpoint methods because the connection was refused . I am thinking that my code is not wrong it is just the setup which is incomplete . Could somebody provide me with a quick checklist of the steps required to set up google-cloud-endpoints with an android client for both the backend and client-side Cheers .. . .. . Tom", "Question : I have been doing extensive research on how to authenticate your client Android iOS web-app with Cloud Endpoints without requiring your user to use their Google account login the way the documentation https : cloud.google.com appengine docs java endpoints auth shows you . The reason for this is that I want to secure my API or lock it down to only my specified clients . Sometimes I will have an app that does not have a user login . I would hate to pester my user to now sign in just so my API is secure . Or other times I just want to manage my own users like on a website and not use Google+ Facebook or whatever else login authentication . To start let me first show the way you can authenticate your Android app with your Cloud Endpoints API using the Google Accounts login as specified in the documentation https : cloud.google.com appengine docs java endpoints auth . After that I will show you my findings and a potential area for a solution which I need help with . 1 Specify the client IDs clientIds of apps authorized to make requests to your API backend and 2 add a User parameter to all exposed methods to be protected by authorization . 3 In Android call the API method in an Asynctask making sure to pass in the credential variable in the Builder : .. . .. . What is happening is that in your Android app you are showing the Google account picker first storing that Google account email in you shared preferences and then later setting it as part of the GoogleAccountCredential object more info on how to do that here https : cloud.google.com appengine docs java endpoints consume android . The Google App Engine server receives your request and checks it . If the Android Client is one of the ones you specified in the @Api notation then the server will inject the com.google.api.server.spi.auth.common.User object into your API method . It is now your responsibility to check if that User object is null or not inside your API method . If the User object is null you should throw an exception in your method to prevent it from running . If you do not do this check your API method will execute a no-no if you are trying to restrict access to it . You can get your ANDROID CLIENT ID by going to your Google Developers Console . There you provide the package name of your Android App and the SHA1 which generates for you an android client id for you to use in your @Api annotation or put it in a class Constants like specified above for usability . I have done some extensive testing with all of the above and here is what I found : .. . .. . If you specify a bogus or invalid Android clientId in your @Api annotation the User object will be null in your API method . If you are doing a check for if user null throw new UnauthorizedException User is Not Valid then your API method will not run . This is surprising because it appears there is some behind the scenes validation going on in Cloud Endpoints that check whether the Android ClientId is valid or not . If it is invalid it won t return the User object - even if the end user logged in to their Google account and the GoogleAccountCredential was valid . My question is does anyone know how I can check for that type of ClientId validation on my own in my Cloud Endpoints methods Could that information be passed around in an HttpHeader for example Another injected type in Cloud Endpoints is the javax.servlet.http.HttpServletRequest . You can get the request like this in your API method : .. . .. . But I am not sure if the necessary information is there or how to get it . Certainly somewhere there must be some data that tells us if the Client is an authorized and specified one in the @Api clientIds . This way you could lock-down your API to your Android app and potentially other clients without ever having to pester your end users to log in or just create your own simple username + password login . For all of this to work though you would have to pass in null in the third argument of your Builder like this : .. . .. . MyApi.Builder builder new MyApi.Builder AndroidHttp.newCompatibleTransport new AndroidJsonFactory null .. . .. . Then in your API method extract whether or not the call came from an authenticated client and either throw an exception or run whatever code you wanted to . I know this is possible because when using a GoogleAccountCredential in the Builder somehow Cloud Endpoints knows whether or not the call came from an authenticated client and then either injects its User object into the API method or not based on that . Could that information be in the header or body somehow If so how can I get it out to later check if it is there or not in my API method Note : I read the other posts on this topic . They offer ways to pass in your own authentication token - which is fine - but your .apk will still not be secure if someone decompiles it . I think if my hypothesis works you will be able to lock-down your Cloud Endpoints API to a client without any logins . Custom Authentication for Google Cloud Endpoints instead of OAuth2 http : stackoverflow.com questions 16970327 custom-authentication-for-google-cloud-endpoints-instead-of-oauth2 rq 1 .. . .. . Authenticate my app to Google cloud endpoints not a user http : stackoverflow.com questions 20396577 authenticate-my-app-to-google-cloud-endpoints-not-a-user .. . .. . Google Cloud Endpoints without Google Accounts http : stackoverflow.com questions 19224728 google-cloud-endpoints-without-google-accounts .. . .. . EDIT : We used Gold Support for the Google Cloud Platform and have been talking back and forth with their support team for weeks . This is their final answer for us : .. . .. . Unfortunately I haven t had any luck on this . I ve asked around my team and checked all of the documentation . It looks like using OAuth2 is your only option . The reason is because the endpoint servers handle the authentication before it reaches your app . This means you wouldn t be able to develop your own authentication flow and would get results much like what you were seeing with the tokens . .. . I would be happy to submit a feature request for you . If you could provide a little more information about why the OAuth2 flow doesn t work for your customers I can put the rest of the information together and submit it to the product manager . frowny face - however maybe it is still possible .. . Answer : Faced the same problem to find a solution to call my API safely from my endpoints without using Google Account . We can t decompile an IOS App Bundle but decompile an Android App is so simple. . The solution I found is not perfect but do the job pretty good : .. . .. . 1 . On android APP I just create an constant String variable named APIKey with simply content For example helloworld145698 .. . 2 . Then I encrypt it with sha1 next md5 and finally sha1 Order and frequency of encryption up to you and store the variable on SharedPref For Android in private mode Do this action on an random class in your App It s this result encrypted I authorize on my Backend 3 . On my backend I just add a parameter named token for exemple on every request .. . .. . Example : .. . .. . 4 . On android active ProGuard for obfuscated your code . It will be really unreadable for anyone who tried to decompile your app Reverse engineering is really hardcore .. . .. . Not THE perfect secure solution but it works and it will be really really really difficult to find the real API key for anyone who try to read your code after decompilation . Comment : Thanks for the suggestion ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
bindgen@ognl@83
bindgen -- bindgen is a type-safe alternative to expression languages like ul and @placeholder .
{ "confidence": [ 45.60608673095703, 45.60608673095703, 41.71633529663086, 41.71633529663086, 36.476863861083984, 14.176373481750488, 14.176373481750488, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711, 11.579793930053711 ], "content": [ "For more information : .. . .. . http : github.com frgomes scala-bindgen", "Otherwise : no scala-bindgen does not understand anything else .", "I ve recently found scala-bindgen from a Gitter room on Scala Native .", "This use-case would be very interesting in the testsuite of scala-bindgen .", "Note : at the time of this writing scala-bindgen is still a work in progress and not yet really usable .", "Seems like at the present point in time they are developing a tool for generating Scala bindings for C header-files .", "Eduardo : Please let me know if there s some sort of JavaFX.h or something like that .", "Are there plans for generating Scala bindings for Objective-C and C++ too", "The initial plan consists only on Scala bindings for C language .", "Bindings for Objective-C is something planned for future .", "Bindings for C++ are pretty unlikely to happen due to the complexity involved in such task .", "Given that there are compiled versions of the JavaFX SDK for mobile http : gluonhq.com labs javafxports downloads iOS and Android how feasible is it to generate Scala bindings from those files and be able use them from a Scala-Native application", "I don t have any specific knowledge on JavaFX in particular .", "Neither I ve tried to compile it to a native library .", "However there s a general answer : .. . .. . Given you have a native library which adheres to C calling conventions which means that you can call easily from C you can call it easily from Scala Native too .", "In a nutshell all you have to do is defining the bindings for it .", "And I suppose it is where problems start and I suppose it is the context of your question .", "Rephrasing your question : .. . .. . Can I automagically generate bindings for JavaFX", "Well.. . it depends.. . if you have a header file .h .. . the answer is : very probably yes .", "I have done a bit of digging and have found nothing .", "RoboVM was able to do it but I have been unable to understand how by looking at their source code or JavaFX s source code .", "No Scala Native currently doesn t provide JavaFX API .", "I know it is currently not possible to use the JavaFX library as is from a standard Java distribution .", "My question was about the library in its compiled form to native-code which already exists and has been used before with RoboVM ." ] }
{ "confidence": [ 53.17566680908203, 47.02684783935547, 11.028704643249512 ], "content": [ "Question : I ve recently found scala-bindgen from a Gitter room on Scala Native . Seems like at the present point in time they are developing a tool for generating Scala bindings for C header-files . Are there plans for generating Scala bindings for Objective-C and C++ too .. . Answer : The initial plan consists only on Scala bindings for C language . Bindings for Objective-C is something planned for future . Bindings for C++ are pretty unlikely to happen due to the complexity involved in such task . For more information : .. . .. . http : github.com frgomes scala-bindgen", "Question : Given that there are compiled versions of the JavaFX SDK for mobile http : gluonhq.com labs javafxports downloads iOS and Android how feasible is it to generate Scala bindings from those files and be able use them from a Scala-Native application .. . Answer : I don t have any specific knowledge on JavaFX in particular . Neither I ve tried to compile it to a native library . However there s a general answer : .. . .. . Given you have a native library which adheres to C calling conventions which means that you can call easily from C you can call it easily from Scala Native too . In a nutshell all you have to do is defining the bindings for it . And I suppose it is where problems start and I suppose it is the context of your question . Rephrasing your question : .. . .. . Can I automagically generate bindings for JavaFX Well.. . it depends.. . if you have a header file .h .. . the answer is : very probably yes . Otherwise : no scala-bindgen does not understand anything else . Note : at the time of this writing scala-bindgen is still a work in progress and not yet really usable . Comment : Eduardo : Please let me know if there s some sort of JavaFX.h or something like that . This use-case would be very interesting in the testsuite of scala-bindgen . Comment : I have done a bit of digging and have found nothing . RoboVM was able to do it but I have been unable to understand how by looking at their source code or JavaFX s source code .", "Question : Given that there are compiled versions of the JavaFX SDK for mobile http : gluonhq.com labs javafxports downloads iOS and Android how feasible is it to generate Scala bindings from those files and be able use them from a Scala-Native application .. . Answer : No Scala Native currently doesn t provide JavaFX API . Comment : I know it is currently not possible to use the JavaFX library as is from a standard Java distribution . My question was about the library in its compiled form to native-code which already exists and has been used before with RoboVM ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ognl
UNK_RELATION
cinch@mvvm@44
cinch -- cinch may refer to an open-source @placeholder framework for .net available in a wpf and silverlight flavor or a ruby based irc bot framework .
{ "confidence": [ 60.92179870605469, 60.72176742553711, 58.9242057800293, 57.20962142944336, 56.547550201416016, 54.7499885559082, 54.6121826171875, 52.20042037963867, 49.016143798828125, 48.58662033081055, 47.21879196166992, 45.80840301513672, 44.727115631103516, 43.94581604003906, 43.22759246826172, 40.63869094848633, 38.055973052978516, 38.055973052978516, 38.055973052978516, 38.055973052978516, 38.055973052978516, 36.863460540771484, 36.26364517211914, 35.57547378540039, 35.4527587890625, 35.289405822753906, 33.491844177246094, 33.491844177246094, 33.491844177246094, 33.491844177246094, 33.491844177246094, 33.22487258911133, 31.968196868896484, 30.957538604736328, 30.698501586914062, 30.698501586914062, 30.698501586914062, 30.684024810791016, 29.725643157958984, 29.725643157958984, 29.50598907470703, 28.533130645751953, 28.184886932373047, 25.109527587890625, 25.109527587890625, 25.025863647460938, 24.402088165283203, 23.588481903076172, 23.15261459350586, 21.636383056640625, 21.53963851928711, 21.53963851928711, 21.53963851928711, 21.1058349609375, 20.70571517944336, 20.660402297973633, 20.462005615234375, 20.285703659057617, 20.124080657958984, 19.98775863647461, 19.85837745666504, 19.38069725036621, 19.350845336914062, 19.350845336914062, 18.88125228881836, 18.79524803161621, 18.273855209350586, 18.26576805114746, 17.3564395904541, 16.686506271362305, 16.46610450744629, 16.365903854370117, 16.138797760009766, 16.138797760009766, 16.0544376373291, 15.818167686462402, 15.087343215942383, 15.087343215942383, 14.818703651428223, 13.744134902954102, 13.601451873779297, 13.601451873779297, 13.601451873779297, 13.601451873779297, 13.601451873779297, 13.601451873779297, 13.601451873779297, 13.601451873779297, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458, 11.8038911819458 ], "content": [ "It is in a Cinch Bot .", "i just started using this cinch gem and using this framework to develop a bot .", "Am trying to match a particular string in Cinch bot framework .", "I m developing an application with Sasha Barber s Cinch Framework for MVVM in WPF .", "I am using cinch framework v1 .", "I decided to try CINCH v2 as my framework .", "I want to write a cinch IRC bot that sends information to a rails application .", "I m not familiar with Cinch but your models should not depend on any framework except the .Net Framework .", "github.com cinchrb cinch https : github.com cinchrb cinch", "p.s . I m using .net wpf-4.0 using Cinch for MVVM .", "I m currently experimenting with the Cinch framework though I m not committed to it as of yet .", "This is coupled with the use of Cinch .", "Comparing this to the structure of my cinch bot I d try the following : .. . .. . 1 Make get answer a helper block and place it inside the bot Cinch : : Bot.new block : .. . .. . 2 Replace .. . .. . with .. . .. . 3 Replace .. . .. . with .. . .. . I suspect this should work .", "doesn t have to be Cinch specific. . .. . .. . thanks .", "MVVM should I use Cinch MVVM Framework or roll my own code", "It is the command used in Cinch in order to match a user input into an IRC chat room and return whatever i specify .", "What exactly does it mean when it says This is no longer possible in Cinch V2", "It is no longer preferred to write a Model that is inherited from a Cinch base-class .", "I used : https : github.com benmanns cleverbot and https : github.com cinchrb cinch", "I am stuck on how I would be able to do this if at all with cinch .", "Cinch doesn t destroy the Plugin class until it s told to disconnect", "It s from Cinch which is not something I ve used much .", "Now looking at the documentation for CinchV2 all I can find out about models is this : .. . .. . 4 Developing Models Using Cinch .. . .. . .. . NOTE : This is no longer possible in Cinch V2 .. . .. . .. . Clearly I am missing something right", "That being said many of the frameworks ie : Cinch really steer you into working a specific way - which may or may not be ideal given your circumstances .", "This part of an IRC bot .", "I m not sure what your post message command is but if it s something you found in Cinch don t use it .", "I know Prism injects views into regions however is there a way of doing a similar sort of thing with Cinch on a view first basis", "CINCH has some nice UI services among them the OpenFileService that implements the IOpenFileService interface .", "In CinchV1 there was a section of Sacha s CodeProject post which described how to develop Models with Cinch .", "To be honest where to start as I cant find anything in cinch docs about a way for it to save state inbetween commands .", "I cant use variables as of course cinch runs each command as a thread that gets destroyed after the function returns", "I am new to MVVM I am trying to use CINCH v2 MVVM framework by Sacha Barber and I have doubts of how to extend one of the framework services in the correct way I hope I can get some advice from your experiences .", "Here is what it says : .. . .. . As I just stated Cinch does actually allow you to either expose a CurrentXXXModel off your ViewModel which supports DataWrappers Validation Rules IDataErrorInfo ViewMode changes IEditableObject operations by use of the two Cinch Model classes mentioned above .", "With MVVM and WPF personally I would recommend starting without a framework .", "Without wanting to bug sacha too much does anyone know what the Cinch V2 way of closing a View from a ViewModel command", "This solution works but I have some doubts as how proper it is : .. . .. . 1.- In my interface project I need to make a reference to the Cinch library .", "Use Unique Prefixes for Each Setting .. . .. . Because Cinch is threaded the easiest thing to do is make your key-value pairs idempotent .", "I need to have a command that asks a user questions and records their response in pm but I am unsure how could possibly do that on cinch thanks to its thread based commands .", "I thought I d post here in the hope that maybe someone with MVVM expertise would be able to offer opinions on whether the following is a good idea : .. . .. . I m using Sacha Barber s Cinch MVVM framework which includes Marlon Grech s SimpleCommand class .", "So I added a new interface in my project that implements the IOpenFileService from Cinch and extend it hoping that I will be able to use the testing services provided by the framework .. . .. . Then I created a service in my project that implements this new interface and add the extended functionality .", "@aealvarez3 Ok reading up on Cinch the match command is simply a listener that waits for a message to match the input then calls execute m using the message that was provided .", "After some time researching I ve come to a very satisfying solution : .. . .. . Since I m using the Cinch MVVM Framework by Sacha Barber http : cinch.codeplex.com the properties in my ViewModel that require validation use a very handy class that is called DataWrapper .", "Use a framework .", "I personally don t use a single framework .", "For a hobby project yeah why not make a framework .", "I have the basic IRC bot working on it s own and have written standalone rails applications before .", "If you re allowed to use a Framework for the project and assembly size really isn t that important I d almost always recommend going with the framework academic projects not included .", "When should you use a library or a framework vs your own implementation .", "I wrote this auto-reply bot with ruby it is supposed to autoreply with cleverbot messages when im away : .. . .. . It works fine but the session id changes every message .", "Furthermore my IDE RubyMine complains that it is Unable to find the rails model for : notes association field .. . .. . Something tells me this would not be happening if I weren t constrained from operating as a class of the bot framework but that is only a wild guess at this point .", "I ll borrow ideas and inspiration from a framework if required but have found that most of the frameworks try to do too much .", "Writing your own framework on for a project that has a deadline is not a very good idea in most cases .", "In your case you can look here : .. . .. . http : stackoverflow.com questions 1280462 what-mvvm-framework-are-you-using", "facing an issue in this .I Wanted to bot send a message to a channel when anybody joins channel .. . .. . Could anybody help me on this .", "Yes m.reply input is what is returned in the irc channel if a matching regex is inputed .", "At present my tab control is defined as below : .. . .. . And my Main Window ViewModel is setup in the following way once the View has been loaded : .. . .. . The MainWindow ViewModel inherits the ViewModelBase Class which is configured as below Cinch Class : .. . .. . Now what I want to be able to do is from a button click within the loginWorkspace which is a UserControl with a ViewModel is add the Admin tab to the MainWindow s Views ObservableCollection from the LoginViewModel .", "I m pretty new to ruby .", "I am currently using the MEFedMVVM framework to get access to ViewModels and want to know how to get data from another ViewModel currently being used .", "I am writing a WPF app using MVVM .", "But I m a relatively new to Ruby as well .", "Instead use a control that restrict what input format is valid such as IntegerUpDown DecimalUpDown DoubleUpDown from the WPF Control Toolkit - available via Nuget .", "Instead I ve decided to use the ChildWindow class in the WPF Extended Toolkit where you can purely bind to the WindowState open closed property and specify everything else in XAML .", "I m trying to play a bit with ruby-mplayer .", "I m not really that good with ruby and yaml writing", "It s different with the RoutedUICommands provided in the framework or similar custom static commands because they are reused everywhere and if the translation of Exit were to change on that command it would be reflected throughout the application .", "Is it not the typical Ruby Regex match function", "I m trying to set up an IRC bot using ActiveRecord on the back end to handle all the data heavy lifting probably overkill but this is partly a learning experience for me : 3 .. . .. . The issue I m running in to is that after defining my database-schema later on in the same script when I try to reference the table I created I get an error from the SQLite gem saying that it could not find the table .", "Ideally the bot puts something in a queue that the rails app consumes .", "For example MVVM Light http : mvvmlight.codeplex.com provides a fantastic well thought out and tested messaging framework that dramatically simplifies many difficult tasks in MVVM so it s a great way to get some functionality in-place which is quite robust .", "Using sidekiq could start the bot but it does not give me a clean way to connect back into the website .", "It s pure MVVM based : D and pretty SOLID", "Then the executed delegate may maynot run some reusable code to satisfy the command .", "In my view I need to open a file dialog box and allow the selection of multiple-files .", "My problem is that this service only opens one file at a time and I need to allow multiple to open multiple-files .", "It may be diverging from the original intention design of commands From what I ve seen it may in general be the case that command-objects were intended to be stateless as they are the verbs of the system .", "To extract the target from within the message use this regex : .. . .. . I looks like you re using ruby so here s the code to get the target from a longer string :", "Starting down this path though it occurs to me that there may be other variations of this pattern whereby the UI needs to be altered according to command state .", "For example in addition to changing the command s text according to connection state you may have places where an icon needs to change according to connection state .", "My code is python though but the same principle should apply .. . .. . See http : code.google.com p jsonbot source browse jsb lib users.py if you want to see my version .", "On the flip side you may want to use a more generic delta e.g .", "I have exposed a public property CurrentSuppier and binded that property to the selecteditem of my combo box . . after I update the the combobox display doesn t change to the current value of the supplier . . below is some code snippets. . .. . .. . XAML CODE : .. . .. . I tried binding the CurrentSupplier to a TextBox just to see if the binds works . . and it does . . the textbox gets updated with the current value of my CurrentSupplier property . . but it wont work on the combobox . .", "There is a difference between SelectedItem and SelectedValue .", "Have you tried to use SelectedValue instead", "Code : .. . .. . could you please check and let me know is anything missing on this .", "Could you explain what goes wrong when you try it", "I can see that the def is missing an end but not sure if that is your problem", "Hello nothing happens means it does not greet on joining .", "Instead use the built-in commands to respond to messages .. . .. . And then :", "Read up about using the Mediator .", "You can send a message from your loginviewmodel .", "Then have the mainwindowview model can listen for the appropriate message .", "One thing this class doesn t have which some other alternatives have is a Text property which can be commonly used to bind UI elements to the Title of the command operation .", "Consequently I ve been writing an extension to this class which exposes a Text property .", "Now what I ve run into is a use-case where I m using a command to toggle connectivity to a device .", "There s a bunch of different ways I could implement this aren t there always - it s software .", "One way would be to expose multiple command-objects from my ViewModel - one for Disconnect and one for Connect have the view model expose a property which indicates the connection state IsConnected and have the view conditionally bind to either the Connect command or Disconnect command .", "My reaction to this option though is .. . yuck", "What I initially started looking at instead was not only providing a Text property but also having the command object implement INotifyPropertyChanged so that the text property can be dynamically altered by the viewmodel to Connect or Disconnect according to system state .", "Doing this I can avoid having multiple commands and just expose a single ToggleConnection command object .", "So I started writing a Stateful class which implements INotifyPropertyChanged and exposes two properties - Text and State ." ] }
{ "confidence": [ 63.18193817138672, 62.60017776489258, 61.765167236328125, 61.04594802856445, 58.888580322265625, 58.1368408203125, 51.0858154296875, 50.51183319091797, 49.243316650390625, 47.71546173095703, 47.304161071777344, 46.88031768798828, 46.82791519165039, 44.865352630615234, 43.696693420410156, 39.51108932495117, 38.98432159423828, 38.19898986816406, 37.56103515625, 37.56103515625 ], "content": [ "Question : I wrote this auto-reply bot with ruby it is supposed to autoreply with cleverbot messages when im away : .. . .. . It works fine but the session id changes every message . What do i have to change to keep it best case scenario is every user writing me gets a different session id at cleverbot so they have individual conversations . I m pretty new to ruby . I used : https : github.com benmanns cleverbot and https : github.com cinchrb cinch .. . Answer : Comparing this to the structure of my cinch bot I d try the following : .. . .. . 1 Make get answer a helper block and place it inside the bot Cinch : : Bot.new block : .. . .. . 2 Replace .. . .. . with .. . .. . 3 Replace .. . .. . with .. . .. . I suspect this should work . But I m a relatively new to Ruby as well .", "Question : This part of an IRC bot . I am trying to have the matched regex that the user inputs directly inputed to the @db.execute to be able perform the query . Any help or suggestions for a different way to go would be appreciated . Comment : is there some reason you can t take the string the user supplied and just use that What would be an example input from the user Comment : I want to use regex because there could be multiple inputs . An example input would be select from gears where Lab like Primary another example would be select from gears where RU like 40 . The differences are in the regex where the . are . If I where to use a string instead i would have to code for all query possibilities instead of just a fill in the blank situation . @Micah Comment : Alright then it should be fairly simple . I assume execute m is the method we re working on where m is the string input Comment : Yes m.reply input is what is returned in the irc channel if a matching regex is inputed . .. . Answer : Something along these lines should work : Comment : No luck : . Match needs to be called outside of the function . If i place it inside it does not recognize the match . Comment : @aealvarez3 your match function seems strange to me then . Is it not the typical Ruby Regex match function Comment : I am not 100 positive but I want to say it is not . It is the command used in Cinch in order to match a user input into an IRC chat room and return whatever i specify . github.com cinchrb cinch https : github.com cinchrb cinch Comment : Ah That explains my confusion . It s from Cinch which is not something I ve used much . Lemme do some research . Comment : @aealvarez3 Ok reading up on Cinch the match command is simply a listener that waits for a message to match the input then calls execute m using the message that was provided . regex.match is different from your other match function . As such my example WILL work as long as you can get the inputted message at the point I mentioned . So the question is : can you get the user input within execute m", "Question : null .. . Answer : I am new to MVVM I am trying to use CINCH v2 MVVM framework by Sacha Barber and I have doubts of how to extend one of the framework services in the correct way I hope I can get some advice from your experiences . I am writing a WPF app using MVVM . I decided to try CINCH v2 as my framework . In my view I need to open a file dialog box and allow the selection of multiple-files . CINCH has some nice UI services among them the OpenFileService that implements the IOpenFileService interface . My problem is that this service only opens one file at a time and I need to allow multiple to open multiple-files . It is as simple as using the Multiselect property from the Microsoft.Win32.Openfiledialog class . So I added a new interface in my project that implements the IOpenFileService from Cinch and extend it hoping that I will be able to use the testing services provided by the framework .. . .. . Then I created a service in my project that implements this new interface and add the extended functionality . This solution works but I have some doubts as how proper it is : .. . .. . 1.- In my interface project I need to make a reference to the Cinch library . I am not sure if that is a problem but I felt strange .. . .. . 2.- Is this the right way of solving this problem or is there another way Thanks for your advice .", "Question : i just started using this cinch gem and using this framework to develop a bot . facing an issue in this .I Wanted to bot send a message to a channel when anybody joins channel .. . .. . Could anybody help me on this . Code : .. . .. . could you please check and let me know is anything missing on this . Comment : Could you explain what goes wrong when you try it I can see that the def is missing an end but not sure if that is your problem Comment : Hello nothing happens means it does not greet on joining . .. . Answer : I m not sure what your post message command is but if it s something you found in Cinch don t use it . Instead use the built-in commands to respond to messages .. . .. . And then :", "Question : When should you use a library or a framework vs your own implementation . For example . MVVM should I use Cinch MVVM Framework or roll my own code .. . Answer : With MVVM and WPF personally I would recommend starting without a framework . Once you see the sticking points the different frameworks will start to make a lot more sense . Remember the various frameworks for MVVM are meant to be helpers to ease some of the pain points when dealing with MVVM such as dialog service handling messaging etc . That being said many of the frameworks ie : Cinch really steer you into working a specific way - which may or may not be ideal given your circumstances . I personally don t use a single framework . I ll borrow ideas and inspiration from a framework if required but have found that most of the frameworks try to do too much . That being said once you understand the different frameworks they are very useful provided the one you choose fits with your development goals . For example MVVM Light http : mvvmlight.codeplex.com provides a fantastic well thought out and tested messaging framework that dramatically simplifies many difficult tasks in MVVM so it s a great way to get some functionality in-place which is quite robust .", "Question : In CinchV1 there was a section of Sacha s CodeProject post which described how to develop Models with Cinch . Now looking at the documentation for CinchV2 all I can find out about models is this : .. . .. . 4 Developing Models Using Cinch .. . .. . .. . NOTE : This is no longer possible in Cinch V2 .. . .. . .. . Clearly I am missing something right I mean it s not the VVM Pattern is it What exactly does it mean when it says This is no longer possible in Cinch V2 .. . .. . If Models are no longer used what should I do in-place of using them Comment : I m not familiar with Cinch but your models should not depend on any framework except the .Net Framework . Models should be POCO classes and not inherit from anything except maybe implement INotifyPropertyChanged but that s it Comment : HighCore thanks for your feedback . I am aware that I can make a Model class just using INPC but my real question is more about why the documentation doesn t speak of it at all . Also there s a sample project for V2 and it doesn t use any models only ViewModels . Comment : I guess that s a matter of the M part of MVVM is up to you .. . you re free to implement it in any way you want .. . Answer : So the answer was buried in a part of the CodeProject post I didn t see . Here is what it says : .. . .. . As I just stated Cinch does actually allow you to either expose a CurrentXXXModel off your ViewModel which supports DataWrappers Validation Rules IDataErrorInfo ViewMode changes IEditableObject operations by use of the two Cinch Model classes mentioned above . .. . But as I also stated above I no longer recommend that approach and think that the Model should be left alone and that you should do all your DataWrappers Validation Ruless IDataErrorInfo ViewMode changes IEditableObject operations in your ViewModel . 1 . It is no longer preferred to write a Model that is inherited from a Cinch base-class . Models are still used in CinchV2 but binding a View to a Model is no longer preferred . .. . .. . 2 . Write Models as you normally would but only use DataWrappers and such in the ViewModel . Comment : Isn t this precisely what I was talking about", "Question : When should you use a library or a framework vs your own implementation . For example . MVVM should I use Cinch MVVM Framework or roll my own code .. . Answer : Use a framework . Writing your own framework on for a project that has a deadline is not a very good idea in most cases . For a hobby project yeah why not make a framework . In your case you can look here : .. . .. . http : stackoverflow.com questions 1280462 what-mvvm-framework-are-you-using", "Question : When should you use a library or a framework vs your own implementation . For example . MVVM should I use Cinch MVVM Framework or roll my own code .. . Answer : If you re allowed to use a Framework for the project and assembly size really isn t that important I d almost always recommend going with the framework academic projects not included . You ll get something that has been usually thoroughly tested and documented rather than experimenting and troubleshooting your own hand rolled version .", "Question : I am currently using the MEFedMVVM framework to get access to ViewModels and want to know how to get data from another ViewModel currently being used . This is coupled with the use of Cinch . At present my tab control is defined as below : .. . .. . And my Main Window ViewModel is setup in the following way once the View has been loaded : .. . .. . The MainWindow ViewModel inherits the ViewModelBase Class which is configured as below Cinch Class : .. . .. . Now what I want to be able to do is from a button click within the loginWorkspace which is a UserControl with a ViewModel is add the Admin tab to the MainWindow s Views ObservableCollection from the LoginViewModel . .. . Answer : Read up about using the Mediator . You can send a message from your loginviewmodel . Then have the mainwindowview model can listen for the appropriate message .", "Question : I need to have a command that asks a user questions and records their response in pm but I am unsure how could possibly do that on cinch thanks to its thread based commands . Something like this .. . .. . Etc . I am stuck on how I would be able to do this if at all with cinch . Comment : What have you tried already Comment : To be honest where to start as I cant find anything in cinch docs about a way for it to save state inbetween commands . I cant use variables as of course cinch runs each command as a thread that gets destroyed after the function returns Comment : You can use instance-level variables in your plugins to save state . Cinch doesn t destroy the Plugin class until it s told to disconnect .. . Answer : Use Unique Prefixes for Each Setting .. . .. . Because Cinch is threaded the easiest thing to do is make your key-value pairs idempotent . For example running setup could prompt the user to enter prefixed values each of which is handled as a separate event rather than chained together . Consider the following : .. . .. . While you could certainly chain your prompts by making each setting prompt for the next key-value pair you ll make life easier on yourself and your users by responding to setup with a list of asynchronous commands that can be handled in any order . You still have to ensure that each event writes to a collection in a thread-safe manner and that you serialize the collection at some point . In the meantime this should definitely get you headed in the right direction . Comment : That s what I did in the end I was hoping I wouldn t have to .", "Question : null .. . Answer : I m trying to play a bit with ruby-mplayer . It is in a Cinch Bot . I actually do : .. . .. . Please note the code is a brief section . As far as I see that would cause next time I issue the request the @player is not null it closes and plays again . The first petition does start mplayer but the next does nothing . If I do not set the EM : : Synchrony.add timer 0.1 a RootFiber error is thrown . Any Ideas of why it is not working . Comment : Did you start EventMachine EM.start I mean Comment : I do not know this library but it seems strange to me that you close the player before calling play . Maybe that s the problem Comment : @padde sorry copy mistake . I updated the question . What about EM.start", "Question : This has been giving me pain for some time . I know Prism injects views into regions however is there a way of doing a similar sort of thing with Cinch on a view first basis For example I have a container effectively a region which can contain any view at runtime - I don t particularly want to set the view explicitly in XAML as this will load it up and it s a bit messy . Is there a container that I can use for this And how would I go about it doesn t have to be Cinch specific. . .. . .. . thanks . .. . Answer : To answer my own question I ve found that Prism v4 has provided a useful solution - a RegionExtension called RequestNavigate . I have used RequestNavigate for opening a new window check out StockTrader RI however this seems extremely cumbersome if following the proper MVVM methodology . Instead I ve decided to use the ChildWindow class in the WPF Extended Toolkit where you can purely bind to the WindowState open closed property and specify everything else in XAML . I ve also used RequestNavigate for injecting views into Regions - I m now using MEF at the time I was using Unity . I find the approach a lot more flexible if slightly magic regarding debugging .", "Question : I am using cinch framework v1 . I have exposed a public property CurrentSuppier and binded that property to the selecteditem of my combo box . . after I update the the combobox display doesn t change to the current value of the supplier . . below is some code snippets. . .. . .. . XAML CODE : .. . .. . I tried binding the CurrentSupplier to a TextBox just to see if the binds works . . and it does . . the textbox gets updated with the current value of my CurrentSupplier property . . but it wont work on the combobox . . .. . Answer : There is a difference between SelectedItem and SelectedValue . Have you tried to use SelectedValue instead", "Question : I want to write a cinch IRC bot that sends information to a rails application . The rails application will essentially function as a monitor for users and theoretically the data displayed will continually refresh . I have the basic IRC bot working on it s own and have written standalone rails applications before . I do not know what the best way to integrate them together is though Using sidekiq could start the bot but it does not give me a clean way to connect back into the website . Comment : sounds like you should build an api rest api maybe into your rails app . Comment : I don t want to have to send packets to the local webserver . That s extra delay that seems wasteful . .. . Answer : I see three options : .. . .. . 1 . Build an api and let your script send requests to that api endpoint .. . 2 . Use script runner to call your methods in your app directly .. . 3 . Let the script store data directly into the apps database .. . .. . I think the api solution is the only reasonable option for security and maintainablity reasons . Comment : Think performance will be good enough if I m using the api system Comment : The apis I have in use have average response times between 10-30ms . That depends a bit on what transformations or calculations you need to do before you can store the payload . How many requests to you expect per hour minute second Comment : We are integrating with twitch but doubt that our channels will be too popular . At most a hundred probably . Ideally the bot puts something in a queue that the rails app consumes .", "Question : I m developing an application with Sasha Barber s Cinch Framework for MVVM in WPF . This application shows two tabs . The MainWindowViewModel started a background worker that listens for incoming socket connections . If a client connects via the socket connection to the application the application should show up another tab . I setted up everything well but when I try to add the new Worskspace to the Views collection I receive an error that this can only be done in an dispatcher thread but there is no dispatcher in the MainWindowViewModel . So here s my question : How can I add this workspace to the views collection Greets and thanks Knutman .. . Answer : You could add a property with the following implementation to your VM base-class . Now you have a dispatcher in your VM . For more information please have a look here http : msdn.microsoft.com en-us library system.windows.application.aspx . Or you simply use Application.Current.Dispatcher at the place where you re needing it . Comment : Thanks DHN you made my day . Comment : You re welcome . Please note that if a post answers your question it should be marked as one . o", "Question : Am trying to match a particular string in Cinch bot framework . So my current code works fine but only fails if the string comes with some extra words .e.g .. . .. . say am trying to match only hello-1234 then it responds properly but if am putting like common hello-1234 or hello-1234 closing then the code fails . Could anybody can guide my how i can get rid of this . Code : .. . .. . config.jira.regex b ora - d 0 7 b i .. . .. . with this regex its matching ora-1234567 . say i have start ora-1234 or ora-1234 end in above case how it should ignore the start and end and match only ora-1234 Comment : Seeing some of the relevant code would be very helpful including the exception stack-trace or unexpected output . Comment : it sounds like you want it to match whether or not it is the whole string or a substring within a string and it sounds like it s failing because your current regex is using anchor chars e.g . string but you need to post code if you want more than random guessing Comment : @aliteralmind -updated thread . Comment : I see some code but I don t see what s being matched ora-1234 nor the code that s actually trying to do the match that uses config.jira.regex .. . Comment : but to be clear those b things are word boundaries so it will match if the string is at the beginning or end of the content or surrounded by non-word chars . But it s not going to match on for example using your original regex with hardcoded ora fooora-1234bar . b is a word-boundary assertion that looks for a change from a non-word char to a word char or visa versa . .. . Answer : To obtain the portion of a message as a variable just do something like this : .. . .. . Any regex groups the bits in s are passed to any relevant plugin methods as extra arguments .", "Question : Am trying to match a particular string in Cinch bot framework . So my current code works fine but only fails if the string comes with some extra words .e.g .. . .. . say am trying to match only hello-1234 then it responds properly but if am putting like common hello-1234 or hello-1234 closing then the code fails . Could anybody can guide my how i can get rid of this . Code : .. . .. . config.jira.regex b ora - d 0 7 b i .. . .. . with this regex its matching ora-1234567 . say i have start ora-1234 or ora-1234 end in above case how it should ignore the start and end and match only ora-1234 Comment : Seeing some of the relevant code would be very helpful including the exception stack-trace or unexpected output . Comment : it sounds like you want it to match whether or not it is the whole string or a substring within a string and it sounds like it s failing because your current regex is using anchor chars e.g . string but you need to post code if you want more than random guessing Comment : @aliteralmind -updated thread . Comment : I see some code but I don t see what s being matched ora-1234 nor the code that s actually trying to do the match that uses config.jira.regex .. . Comment : but to be clear those b things are word boundaries so it will match if the string is at the beginning or end of the content or surrounded by non-word chars . But it s not going to match on for example using your original regex with hardcoded ora fooora-1234bar . b is a word-boundary assertion that looks for a change from a non-word char to a word char or visa versa . .. . Answer : To extract the target from within the message use this regex : .. . .. . I looks like you re using ruby so here s the code to get the target from a longer string : Comment : How can i overcome this say starting ora-1234 so it should ignore the starting and only match ora-1234 or ora-1234 closed and in this case it should match ora-1234 and ignore closed . Comment : I don t understand what you mean . With regex the best way of describing the problem is to give examples of input that should match and some examples of input that should not match . Chose your examples so they demonstrate the edge cases . Update your question to include these then leave me a message here to let me know you ve done it . Comment : Sorry for not making it clear or you .Updated the original question can you please have a look and let me know if it make sense . Comment : Is it that you want to extract ora-nnnn from the message Comment : yes i need to extract the ora-nnnn", "Question : Without wanting to bug sacha too much does anyone know what the Cinch V2 way of closing a View from a ViewModel command Previously I have used a RelayCommand in the ViewModel base to accept the Escape keybinding command action and wired up a RequestClose event in the View code-behind to do this . .. . Answer : Use CloseActivePopUpCommand.Execute true in the execute method to close a view . I ve included a short sample below .", "Question : OK I ve figured out how to get my Grid of UI elements to zoom by using LayoutTransform and ScaleTransform . What I don t understand is how I can get my View to respond to CTRL+MouseWheelUp Down to do it and how to fit the code into the MVVM pattern . My first idea was to store the ZoomFactor as a property and bind to a command to adjust it . I was looking at something like : .. . .. . but I see 2 issues : .. . .. . 1 I don t think there is a way to tell whether the wheel was moved up or down nor can I see how to determine by how much . I ve seen MouseWheelEventArgs.Delta but have no idea how to get it . 2 Binding to a command on the viewmodel doesn t seem right as it s strictly a View thing . Since the zoom is strictly UI View only I m thinking that the actual code should go in the code-behind . How would you guys implement this p.s . I m using .net wpf-4.0 using Cinch for MVVM . .. . Answer : the real anwser is to write your own MouseGesture which is easy .", "Question : OK I ve figured out how to get my Grid of UI elements to zoom by using LayoutTransform and ScaleTransform . What I don t understand is how I can get my View to respond to CTRL+MouseWheelUp Down to do it and how to fit the code into the MVVM pattern . My first idea was to store the ZoomFactor as a property and bind to a command to adjust it . I was looking at something like : .. . .. . but I see 2 issues : .. . .. . 1 I don t think there is a way to tell whether the wheel was moved up or down nor can I see how to determine by how much . I ve seen MouseWheelEventArgs.Delta but have no idea how to get it . 2 Binding to a command on the viewmodel doesn t seem right as it s strictly a View thing . Since the zoom is strictly UI View only I m thinking that the actual code should go in the code-behind . How would you guys implement this p.s . I m using .net wpf-4.0 using Cinch for MVVM . .. . Answer : If you don t want to use code-behind you can use the EventToCommand functionality of mvvm-light : .. . .. . View : .. . .. . ViewModel : .. . .. . I hope this helps someone . I know the question is kind of old.. . Comment : I find it odd your VM would have a routed event" ] }
[ "yes-answer-long", "yes-answer-short" ]
mvvm
UNK_RELATION
google-container-engine@virtual-machine@110
google-container-engine -- google-container-engine takes care of provisioning and maintaining the underlying @placeholder cluster scaling your application and operational logistics like logging monitoring and health management .
{ "confidence": [ 60.71407699584961, 60.58525085449219, 59.73722839355469, 59.73722839355469, 59.41735076904297, 58.59034729003906, 58.17018508911133, 57.49363327026367, 57.28003692626953, 55.841548919677734, 55.51252365112305, 55.13199996948242, 55.031982421875, 54.91333770751953, 54.37461853027344, 53.980796813964844, 53.350318908691406, 53.29345703125, 53.141387939453125, 52.93027877807617, 51.506839752197266, 51.4349250793457, 51.143592834472656, 51.01216125488281, 50.776023864746094, 50.497474670410156, 50.19679260253906, 49.8891716003418, 48.92426681518555, 48.77586364746094, 48.77586364746094, 48.73552703857422, 48.52642822265625, 48.52642822265625, 48.41764450073242, 48.41558074951172, 48.356346130371094, 48.321380615234375, 48.284793853759766, 48.11722183227539, 48.01337814331055, 47.64069366455078, 45.993492126464844, 45.97476577758789, 45.625732421875, 45.625732421875, 45.46743392944336, 45.14946365356445, 44.93550491333008, 44.62525177001953, 44.438819885253906, 43.9753303527832, 43.96368408203125, 43.96368408203125, 43.72892379760742, 43.478614807128906, 42.629478454589844, 42.628929138183594, 42.524452209472656, 42.34861373901367, 42.02867126464844, 42.02867126464844, 42.02867126464844, 41.52126693725586, 41.38541793823242, 41.026405334472656, 40.81843185424805, 40.54314041137695, 40.0680046081543, 39.98469543457031, 39.888633728027344, 39.75689697265625, 39.36961364746094, 38.87157440185547, 38.73379898071289, 38.68317413330078, 38.62217330932617, 38.212745666503906, 38.14564514160156, 38.051910400390625, 38.01396942138672, 37.97658920288086, 37.953216552734375, 37.850337982177734, 37.81789016723633, 37.80695343017578, 37.37071228027344, 36.55794143676758, 36.40666961669922, 36.04655838012695, 35.89486312866211, 35.666465759277344, 35.473934173583984, 35.473934173583984, 35.473934173583984, 35.473934173583984, 35.42201232910156, 35.37811279296875, 35.246253967285156, 35.246253967285156 ], "content": [ "In that example a cluster with 3 nodes instances is created on Google Container Engine .", "In a Google Container Engine cluster all of the standard out of the pods are aggregated and send to Google Cloud Logging .", "I began to try Google Container Engine recently .", "I am using Google container engine .", "See also : Google container engine cluster showing large number of dns errors in logs http : stackoverflow.com questions 38487428 google-container-engine-cluster-showing-large-number-of-dns-errors-in-logs 38494636 38494636", "I am running a Kubernetes cluster on Google container engine .", "By default Google Container Engine runs cluster add-ons logging monitoring that take up some of the resources in your cluster you can disable these if you wish .", "All steps are at Google Container Engine GKE node pools https : cloudplatform.googleblog.com 2016 05 introducing-Google-Container-Engine-GKE-node-pools.html .", "Once you launch your container cluster on Google Container Engine you will have a master running the kubernetes API on a VM in your GCP project .", "DNS is enabled by default in Google Container Engine .", "I m running a gunicorn+flask service in a docker-container with Google Container Engine .", "When logging on Google Container Engine https : cloud.google.com container-engine how do I communicate to the logging platform https : cloud.google.com logging docs which level each message corresponds to", "Is there a recommended practice to rebuild the container engine template for larger instances after the container engine cluster has been created", "Is it possible to access the Kubernetes API when using Google Container Engine", "gcloud comes bundled with a recent version of kubectl and the ability to execute it for any container cluster you have launched with Google Container Engine .", "GKE Google Container Engine https : cloud.google.com container-engine docs is only container platform which Kubernetes can manage .", "@Jonathan nope -- this is specific to kubernetes and or google-container-engine", "Can these Stackdriver plugins work on a Google Container Engine GKE Kubernetes cluster", "I am using Fabric8 on Google Container Engine with Kubernetes .", "I am using Kubernetes to deploy a Rails application to Google Container Engine .", "I am using Google Container Engine https : cloud.google.com container-engine GKE how do I configure the amount of logs Stackdriver logging https : cloud.google.com logging docs will retain preferably : the number of days", "How do I run a docker image that I built locally on Google Container Engine https : cloud.google.com container-engine", "After creating a small three node-cluster with some pods on Google Container Engine I try to view pod logs in Cloud Logging .", "I m using Google Container Engine and I m noticing entries like the following in my logs .. . .. . Is this an actual error or is the severity incorrect", "Create is hanging while creating the google-container-engine cluster or creating the new instance template", "Been using google-container-registry and google-container-engine for some time with my own created deploy script .", "But I cannot view the container cluster page on the Container Engine Console - it just gets stuck with a spinning circle symbol .", "Using a Google Container Engine cluster running Kubernetes what would the process be in order to point http : mydomain.co.uk onto a LoadBalanced ReplicationController", "I am trying to connect to a Docker container on Google Container Engine GKE from my local machine through the internet by TCP protocol .", "cloud.google.com container-engine docs kubectl https : cloud.google.com container-engine docs kubectl is probably a better link .", "Outlined here : cloud.google.com container-engine docs clusters upgrade https : cloud.google.com container-engine docs clusters upgrade", "Yet the execution sets up the Limits : cpu : 100m . . .. . .. . https : cloud.google.com container-engine docs tutorials guestbook instead of .YAML file I am using middleware-controller.json to create GKE - Google Container engine .", "this gives me the load balancer s ip on google-container-engine not the user s ip", "Now I want to deploy a rails app to Google Container Engine .", "I think the google-cloud-sql does not allow ip from google-container-engine then where to add the ip", "I am using google-container-engine and getting tons of dns errors in the logs .", "The container engine http load-balancing https : cloud.google.com container-engine docs tutorials http-balancer doc used to explain how to do this specifically for a container engine cluster but in was recently replaced with the simplified instructions using ingress .", "Resizing a cluster is now possible see the docs https : cloud.google.com container-engine docs resize-cluster", "For testing reasons I set up a 5-node cluster via Google container engine and changed my code accordingly .", "I installed Fabric8 on a Google Container Engine cluster and I used gofabric8 deploy with a custom domain and cd-pipeline app to install fabric8.io on it .", "It will not be running via App Engine but via Container Engine .", "That s at least the default when creating a container engine cluster .", "I just copied an instance template for my Google Container Engine cluster in the UI modified the only the startup script field and created a new instance template .", "Remove tags via Google Cloud Platform web UI currently no know CLI method may be later the Google Container Engine API https : cloud.google.com container-engine reference rest will support it or Docker Registry .", "How do I add VM instances to my existing Container Engine cluster", "Some of our containers run better with memory above the instance type currently deployed in our Container Engine cluster .", "My container logs for Container Engine all show up nice and pretty and divided by application in Cloud Logging but conspicuously absent are kernel messages .", "Better way to use gcs from container engine is give permission to cluster .", "As mentioned here https : cloud.google.com container-engine docs v1beta1 authorizing I created API key for using cluster operations https : cloud.google.com container-engine docs clusters operations .", "Looks like you re running the gcloud container clusters get-credentials hello-world from Google Compute Engine instance", "I wanna Google Container Engine to host some containers for development-environment and my office connects via VPN https : cloud.google.com compute docs vpn .", "If you add the 14 CIDR block for your Container Engine cluster as the source address range does that work", "I understand the Container Engine is currently on alpha and not yet complete .", "I am running a kubernetes 1.2.5 in googles container engine .", "From Cannot access google cloud SQL from google-container-engine http : stackoverflow.com questions 30665843 cannot-access-google-cloud-sql-from-google-container-engine it seems using SSL connection with that 0.0.0.0 0 CIDR is the recommended solution .", "Have you enabled the container engine API", "With a standard Kubernetes deployment on Google Container Engine to include services configured with the Kubernetes load balancer settings which creates network load balancers is it possible to access the user s or referring IP address in an application", "The Google Container Clusters GKE data is neither of these .", "To be specific I m trying to create a Redis Sentinel cluster using Kubernetes on Google Container Engine and would like to be able to enforce node IPs to be public not in the 10.x.x.x x range .", "On Google Container Engine https : cloud.google.com container-engine how do I see the logs of the included L7 load balancer explaining why errors are returned for requests", "Good day .. . .. . I am using Kubernetes to run containers on the google-container-engine .", "First because I m doing this in the google-container-engine it is impossible for me to know the internal ip-address the pod will get in advance .", "Google Container Engine GKE has moved on to Kubernetes 0.6.1 so referring to localhost no longer works .", "When performing a kubectl rolling-update of a replication controller in Kubernetes Google Container Engine the Google Stackdriver Logging agent doesn t pick up the newly deployed pod .", "How can I log kernel messages from my bare-metal Container Engine node to Cloud Logging", "If your environment has a preferred monitoring stack or vendor a common approach is to run a second container in each pod a sidecar container to push relevant metrics about the main container to your monitoring backend .", "To find the CIDR block for your cluster click on the cluster name in the Google Cloud Console http : cloud.google.com console and find the row labeled Container address range .", "I m new to Kubernetes and I m trying to do HTTP Load Balancing on Google Container Engine with TLS using the included GCE Ingress Controller .", "In the cloud console if you click on the container engine tab it will enable it automatically .", "According to Kubernetes API docs it is possible to create list delete pods replication controllers and services : .. . .. . http : kubernetes.io third party swagger-ui v1beta1 .. . .. . However in the Google Container Engine documentation they don t seem to expose this API .", "https : deis.com images blog-images first-kubernetes-cluster-gke-9.png http : i.stack.imgur.com mcNSM.png .. . .. . GKE will organize its platform through Kubernetes master https : cloud.google.com container-engine docs clusters the kubernetes master .. . .. . Every container cluster has a single master endpoint which is managed by Container Engine .", "This doc https : cloud.google.com container-engine docs clusters operations has all the CRUD operation on a cluster except the U resize while the resize doc https : cloud.google.com container-engine docs resize-cluster is detached from the other how-to guides .", "We are working on integrating Container Engine with the recently announced Managed Instance Groups and Cloud AutoScaling Service .", "Container Engine doesn t currently have an API for doing this but since it uses a Compute Engine instance group https : cloud.google.com compute docs instance-groups for the nodes in your cluster you can actually update it without needing GKE s help .", "If I m developing an application that will run on the google-container-engine but still wish for it to use cloud datastore do I have any options to simulate cloud datastore for local development", "I am trying to create a Hello Node sample application in Google Container Engine following this tutorial https : cloud.google.com container-engine docs tutorials hello-node .. . .. . However even after running the command kubectl expose rc hello-node --type LoadBalancer it is not exposing an external-IP to access the port .", "Here is a blog post http : blog.kubernetes.io 2016 03 scaling-neural-network-image-classification-using-Kubernetes-with-TensorFlow-Serving.html and a tutorial https : tensorflow.github.io serving serving inception about running TensorFlow on Kubernetes Google Container Engine .", "We ve added a section to the docs that helps delete old static ips and forwarding rules fabric8.io guide getStarted http : fabric8.io guide getStarted gke.html google-container-engine-quotas", "The problem I think arises in google-container-engine which creates a load balancer in front of my app. . making request.remote ip only get a local kubernetes cluster-ip rather than the remote ip. .", "Not sure I fully understand the question but neither kubernetes the framework on which Google Container Engine runs nor docker require a particular cloud provider .", "v2 should now be released for Google Container .", "I m running on the Google Container Engine platform have an ingress that I would like to have a default backend service for almost all of my domains there are quite a few but have another specific service for one domain on it .", "I have created a cluster using gcloud container clusters create .", "I m researching : .. . .. . Docker Container https : www.docker.com .. . Google Containers https : cloud.google.com container-engine .. . .. . The goal is to use something of these 2 on our own physical boxes with Linux in the enterprise for Dev Prod .", "If not which service Compute Engine or Container Engine would make it easier to get started", "As we work towards a Beta release we re definitely looking at integrating the Google Compute Engine AutoScaler .", "This may help you .. . .. . https : cloud.google.com container-engine docs resize-cluster .. . .. . gcloud container clusters describe CLUSTER NAME --format yaml grep -A 1 instanceGroupUrls .. . .. . gcloud compute instance-groups managed resize gke-example-b937f2ba-group --zone us-central1-f --size 4", "As described in Overview of Local SSD support https : cloud.google.com container-engine docs local-ssd you can access the local SSD using a hostPath volume .", "I have trying scaling the cluster down to 0 and then scaling it back up .", "As mentioned in Docker and Kubernetes and AppC http : blog.kubernetes.io 2015 05 docker-and-kubernetes-and-appc.html May 2015 that can change : .. . .. . Docker is currently the only supported runtime in GKE Google Container Engine our commercial containers product and in GAE Google App Engine our Platform-as-a-Service product .", "Background I d like to connect Wordpress https : hub.docker.com wordpress docker-container to a Google Could SQL instance .", "You can push your image to Google Container Registry https : cloud.google.com tools container-registry and reference them from your pod manifest .", "The documentation https : cloud.google.com container-engine docs tutorials http-balancer doesn t really seem to convey this afaict .", "I use gcloud to provision kubernetes clusters and use container engine to do so .", "Do I need to start Heapster service explicitly or is it automatically managed by container engine itself", "But oh well container engine and kubernetes seem to be cutting edge so I guess I have to live with some of this .", "There was a discussion explaining the purpose of the pause container on the Kubernertes email list here : https : groups.google.com forum topic google-containers jVjv0QK4b o", "Now that Google Container Registry migrated to v2 https : cloud.google.com container-registry you can : .. . .. . 1 .", "I thought I had figured out how to do updates of a Docker image in Google Container Engine but now it just reverts to the original version of the image .", "I am developing multiplayer game backend and I have decided to use Google Container Engine to install my docker image ." ] }
{ "confidence": [ 70.8936538696289, 70.33504486083984, 67.94573974609375, 67.2023696899414, 66.6999740600586, 66.11808776855469, 64.20110321044922, 63.95165252685547, 62.10830307006836, 60.446067810058594, 59.815696716308594, 58.220787048339844, 57.30718994140625, 56.93219757080078, 56.87689208984375, 56.35953140258789, 55.98402404785156, 55.78230285644531, 55.16846466064453, 55.020957946777344 ], "content": [ "Question : My container logs for Container Engine all show up nice and pretty and divided by application in Cloud Logging but conspicuously absent are kernel messages . How can I log kernel messages from my bare-metal Container Engine node to Cloud Logging .. . Answer : The fluentd config for the GCP logging agent on GKE is in google-fluentd.conf https : github.com kubernetes kubernetes blob master cluster addons fluentd-gcp fluentd-gcp-image google-fluentd.conf . It does not currently include var log kern.log as a log source . I ve opened Issue 18387 https : github.com kubernetes kubernetes issues 18387 to track that as a potential feature . Until then you could either add var log kern.log to the fluentd config file running inside the fluentd container on each of your nodes or run a separate GCP logging agent just for kernel logs on each node . Both of these have the downside that they would not survive node failures or cluster scaling and you d need to manually update .", "Question : .. . .. . Blockquote .. . .. . RajRajen : mytetest rajrajen kubectl describe pod lbmiddleware-6e1hi Name : lbmiddleware-6e1hi Namespace : default Image s : gcr.io helloworldnodejs-1119 mytetest Node : Labels : app mymiddleware tier mymiddleware Status : Pending Reason : Message : IP : Replication Controllers : mymiddleware 1 1 replicas created Containers : lb4btest : Image : gcr.io helloworldnodejs-1119 mytetest .. . .. . Limits : cpu : 100m .. . .. . State : Waiting Ready : False Restart Count : 0 Events : FirstSeen LastSeen Count From SubobjectPath Reason Message Thu 12 Nov 2015 11 : 05 : 01 -0800 Thu 12 Nov 2015 11 : 05 : 16 -0800 5 scheduler failedScheduling Failed for reason PodFitsResources and possibly others .. . .. . It looks my Docker size is 130MB and even after provisioning 500MB in the POD GKE - container creation . Yet the execution sets up the Limits : cpu : 100m . . .. . .. . https : cloud.google.com container-engine docs tutorials guestbook instead of .YAML file I am using middleware-controller.json to create GKE - Google Container engine . RajRajen : lb4btest rajrajen kubectl create -f middleware-controller.json replicationcontrollers lbmiddleware .. . .. . Commands earlier used : gcloud container clusters create lb4b-test-cluster --num-nodes 1 -- machine-type g1-small .. . .. . This my final result-of the Docker push in Google Cloud registry latest : digest : sha256 : 3c73d0c25e65c39164258c384b34d2cab72303375c8d3f6a2e70930000b9e171 size : 132946 .. . .. . Blockquote .. . Answer : You created a 1 node-cluster with a relatively small machine type . By default Google Container Engine runs cluster add-ons logging monitoring that take up some of the resources in your cluster you can disable these if you wish . It looks like you don t have enough remaining space in your cluster to launch a pod that requires this many resources . Try disabling the cluster add ons when you create the cluster or provisioning larger or more nodes . Comment : Yes Robert . Without getting into details i upgraded to n1-highcpu-2 cluster and it solved my problem . But from eConomics perspective I need to know how much memory left in my cluster machine type g1-small which is having 1.7GB overall and only 4 Redis serv + client each about 100mb only allocated . So i am guessing when we ask for g1-machine type we have such limitation by google cloud by themself. . I don t see such limitation in the higher machine - type cluster n1-highcpu-2 . Can you please help me finding the remaining memory available for use Comment : To see the currently allocated resource usage on your cluster first run kubectl get pods --all-namespaces to see all of the running pods . Then for each pod run kubectl describe pod --namespace NAMESPACE PODNAME and look at the Limits section near the bottom . Comment : RajRajen : lb4btest rajrajen kubectl describe pod --namespace default redis-master-hxrkp Name : redis-master-hxrkp Namespace : default Image s : redis Node : gke-lb4b-test-cluster-39a0dff9-node-bfvq 10.240.0.3 Labels : app redis role master tier backend Status : Running Reason : Message : IP : 10.200.0.8 Replication Controllers : redis-master 1 1 replicas created Containers : master : Image : redis State : Running Started : Fri 13 Nov 2015 18 : 01 : 23 -0800 Ready : True Restart Count : 0 Conditions : Type Status Ready True No events . Comment : I am not finding the Limits in this higher machine - type cluster n1-highcpu-2 . Nevertheless thanks for your time . I will try to use this if I run into an issue when I am using cluster machine type g1-small . Thanks", "Question : I am running a Kubernetes cluster on Google container engine . My metrics are not getting pushed to Stackdriver by default . Do I need to start Heapster service explicitly or is it automatically managed by container engine itself .. . Answer : If there isn t a Heapster pod running in your cluster then your cluster was created before we started enabling cluster monitoring by default . We are working on adding a way for users to retroactively turn on monitoring but if you want metrics pushed into stack driver today you will need to create a new cluster launching Heapster yourself isn t sufficient for the metrics to get collected .", "Question : Some of our containers run better with memory above the instance type currently deployed in our Container Engine cluster . Is there a recommended practice to rebuild the container engine template for larger instances after the container engine cluster has been created For example go from GCE instances n1-standard-2 to n1-highmem-8 for running containers with above 8GB RAM .. . Answer : Container Engine doesn t currently have an API for doing this but since it uses a Compute Engine instance group https : cloud.google.com compute docs instance-groups for the nodes in your cluster you can actually update it without needing GKE s help . In the Developers Console copy the instance template https : cloud.google.com compute docs instance-templates that looks like gke-- and modify the machine type in it then edit the similarly named instance group to use the new template . You can find these options under Compute Compute Engine Instance templates and Compute Compute Engine Instance groups respectively . Comment : be aware that doing an API upgrade will rollback your nodes to the previous specifications . This caused my applications to swap because of lack of memory Comment : @Andre What do you mean by API upgrade Google Cloud SDK or Kubernetes or something else Comment : gcloud container clusters upgrade CLUSTER NAME . Outlined here : cloud.google.com container-engine docs clusters upgrade https : cloud.google.com container-engine docs clusters upgrade Comment : This doesn t seem to work for me when copying the instance template and creating it the create action hangs . There seems to be a JS Error cannot read property name of null at getDiskTypeLocalizedName which is related to the disk image which is correct since it probably refers to the GKE container-vm image which is not selectable for me . So resizing is not possible anymore . Comment : Is this not a major limitation for the platform How does one deal with scaling GKE without downtime Can you create another cluster and failover", "Question : Some of our containers run better with memory above the instance type currently deployed in our Container Engine cluster . Is there a recommended practice to rebuild the container engine template for larger instances after the container engine cluster has been created For example go from GCE instances n1-standard-2 to n1-highmem-8 for running containers with above 8GB RAM .. . Answer : Create a new node pool with a custom machine type disk-size num-nodes and with any other required parameters . All steps are at Google Container Engine GKE node pools https : cloudplatform.googleblog.com 2016 05 introducing-Google-Container-Engine-GKE-node-pools.html .", "Question : I m using Google Container Engine and I m noticing entries like the following in my logs .. . .. . Is this an actual error or is the severity incorrect Where can I find the definition for the struct that is being printed .. . Answer : The severity is incorrect . This is some tracing debugging that shouldn t have been left in the binary and has been removed since 1.3 was cut . It will be removed in a future release . See also : Google container engine cluster showing large number of dns errors in logs http : stackoverflow.com questions 38487428 google-container-engine-cluster-showing-large-number-of-dns-errors-in-logs 38494636 38494636", "Question : It seems that the Google Monitoring Agent powered by Stackdriver https : cloud.google.com monitoring agent install-agent should be installed on each Node i.e . each compute instance i.e . each machine of a Kubernetes cluster . However the new plugins like Nginx https : cloud.google.com monitoring agent plugins nginx Redis https : cloud.google.com monitoring agent plugins redis ElasticSearch https : cloud.google.com monitoring agent plugins elasticsearch .. . need those agents to know the IP of these services . This means having kube-proxy running and set up which should mean running that Google Monitoring Agent on a Pod . These two conflict : On one side that agent monitors the entire machine on the other it monitor services running on one or more machines . Can these Stackdriver plugins work on a Google Container Engine GKE Kubernetes cluster .. . Answer : To monitor each machine memory CPU disk.. . it s possible to install the agent on each node i.e . on each Compute Instance of your GKE cluster . Note that it ll not work with auto-scaling in the sense that re-created nodes won t have the agent installed . To monitor services number of requests s client connection.. . it s possible to install the agent plugin in another container so that for example Nginx Pod run two containers : .. . .. . Nginx .. . Google Monitoring Agent together with the Nginx plugin .. . .. . Note : Not fully tested yet .", "Question : According to Kubernetes API docs it is possible to create list delete pods replication controllers and services : .. . .. . http : kubernetes.io third party swagger-ui v1beta1 .. . .. . However in the Google Container Engine documentation they don t seem to expose this API . The only resources you can manage through a REST API are clusters . Pods replication controllers and services have to be managed using gcloud . Is it possible to access the Kubernetes API when using Google Container Engine .. . Answer : Once you launch your container cluster on Google Container Engine you will have a master running the kubernetes API on a VM in your GCP project . If you run gcloud preview container clusters list you will see the endpoint at which the kubernetes API is available as well as the http basic auth credentials needed to access it . gcloud comes bundled with a recent version of kubectl and the ability to execute it for any container cluster you have launched with Google Container Engine . To list pods for instance you can run gcloud preview container kubectl list pods . https : cloud.google.com sdk gcloud reference preview container kubectl describes the gcloud preview container kubectl command and what flags it accepts . Comment : Sounds good Is there any documentation about how to authenticate and interact with the API Thanks Comment : github.com GoogleCloudPlatform kubernetes blob master docs https : github.com GoogleCloudPlatform kubernetes blob master docs kubectl.md is a good place to start . The kubectl- .md docs have more details . Comment : cloud.google.com container-engine docs kubectl https : cloud.google.com container-engine docs kubectl is probably a better link .", "Question : I know that GKE is driven by kubernetes underneath . But I don t seem to still get is that what part is taken care by GKE and what by k8s in the layering The main purpose of both as it appears to me is to manage containers in a cluster . Basically I am looking for a simpler explanation with an example . .. . Answer : GKE Google Container Engine https : cloud.google.com container-engine docs is only container platform which Kubernetes can manage . It is not a kubernetes-like with differences . As mentioned in Docker and Kubernetes and AppC http : blog.kubernetes.io 2015 05 docker-and-kubernetes-and-appc.html May 2015 that can change : .. . .. . Docker is currently the only supported runtime in GKE Google Container Engine our commercial containers product and in GAE Google App Engine our Platform-as-a-Service product . You can see Kubernetes used on GKE in this example : Spinning Up Your First Kubernetes Cluster on GKE https : deis.com blog 2016 first-kubernetes-cluster-gke from Rimantas Mocevicius https : twitter.com @rimusz . The gcloud API will still make kubernetes commands behind the scene . https : deis.com images blog-images first-kubernetes-cluster-gke-9.png http : i.stack.imgur.com mcNSM.png .. . .. . GKE will organize its platform through Kubernetes master https : cloud.google.com container-engine docs clusters the kubernetes master .. . .. . Every container cluster has a single master endpoint which is managed by Container Engine . The master provides a unified view into the cluster and through its publicly-accessible endpoint is the doorway for interacting with the cluster . .. . The managed master also runs the Kubernetes API server which services REST requests schedules pod creation and deletion on worker nodes and synchronizes pod information such as open ports and location with service information .", "Question : When logging on Google Container Engine https : cloud.google.com container-engine how do I communicate to the logging platform https : cloud.google.com logging docs which level each message corresponds to That is the logging platform supports associating each message with a log level but I don t know how to do this when writing log messages from my application . .. . Answer : Currently there s only one way to get severity from your application into Cloud Logging without swapping out the default logging agent on the node which actually isn t that hard : configure your app to log structured JSON . JSON will be automatically parsed by the logging agent and the severity field will be understood by the platform if it s present . Comment : Could you please explain how to swap out the default logging agent :", "Question : I understand the Container Engine is currently on alpha and not yet complete . From the docs I assume there is no auto-scaling of pods e.g . depending on CPU load yet correct I d love to be able to configure a replication controller to automatically add pods and VM instances when the average CPU load reaches a defined threshold . Is this somewhere on the near future roadmap Or is it possible to use the Compute Engine Autoscaler for this if so how .. . Answer : As we work towards a Beta release we re definitely looking at integrating the Google Compute Engine AutoScaler . There are actually two different kinds of scaling : .. . .. . 1 . Scaling up down the number of worker nodes in the cluster depending on of containers in the cluster .. . 2 . Scaling pods up and down . Since Kubernetes is an OSS project as well we d also like to add a Kubernetes native autoscaler that can scale replication controllers . It s definitely something that s on the roadmap . I expect we will actually have multiple autoscaler implementations since it can be very application specific.. . Comment : Does this include autoscaling for volumes I haven t seen in the docs that you could scale volumes with kubernetes . How would volumes scaling work I m thinking for fully auto scaling a db . Comment : How far has the work for the auto-scalers sizers go on And when do you expect it s usable Comment : I heard you can use Kubernetes to auto scale but not sure how .", "Question : When logging on Google Container Engine https : cloud.google.com container-engine how do I communicate to the logging platform https : cloud.google.com logging docs which level each message corresponds to That is the logging platform supports associating each message with a log level but I don t know how to do this when writing log messages from my application . .. . Answer : If you re using the V2 API beta LogSeverity https : cloud.google.com logging docs api ref v2beta1 rest v2beta1 LogEntry LogSeverity should be what you re looking for . V1 as well possibly . Haven t checked . Comment : Could you please post a full solution It s not considered a good idea to rely on links in SO answers .", "Question : I began to try Google Container Engine recently . I would you like to upgrade the Kubernetes Cluster to the latest version available if possible without downtime . Is there any way to do this .. . Answer : We now have a checked-in upgrade tool for master and nodes : https : github.com GoogleCloudPlatform kubernetes blob master cluster gce upgrade.sh", "Question : I began to try Google Container Engine recently . I would you like to upgrade the Kubernetes Cluster to the latest version available if possible without downtime . Is there any way to do this .. . Answer : Unfortunately the best answer we currently have is to create a new cluster and move your resources over then delete the old one . We are very actively working on making cluster upgrades reliable both nodes https : github.com GoogleCloudPlatform kubernetes issues 6079 and the master https : github.com GoogleCloudPlatform kubernetes issues 6075 but upgrades are unlikely to work for the majority of currently existing clusters . Comment : Thanks @AlexRobinson . I will closely monitor through Kubernetes repository .", "Question : I would like to enable the dns addon for my container engine cluster. . .. . .. . as described here. . http : kubernetes.io docs user-guide services dns .. . .. . How do I actually enable this clusterwide so that I can autodiscover my services instead of manually specifying IP addresses every time I relaunch a service . .. . Answer : DNS is enabled by default in Google Container Engine . You should be able to use it exactly as specified in the docs .", "Question : How do I run a docker image that I built locally on Google Container Engine https : cloud.google.com container-engine .. . Answer : You can push your image to Google Container Registry https : cloud.google.com tools container-registry and reference them from your pod manifest . Detailed instructions .. . .. . Assuming you have a DOCKER HOST properly setup a GKE cluster running the last version of Kubernetes and Google Cloud SDK https : cloud.google.com sdk installed . 1 . Setup some environment-variables .. . .. . gcloud components update kubectl .. . gcloud config set project your-project .. . gcloud config set compute zone your-cluster-zone .. . gcloud config set container cluster your-cluster-name .. . gcloud container clusters get-credentials your-cluster-name .. . .. . .. . 2 . Tag your image .. . .. . docker tag your-image gcr.io your-project your-image .. . .. . .. . 3 . Push your image .. . .. . gcloud docker push gcr.io your-project your-image .. . .. . .. . 4 . Create a pod manifest for your container : my-pod.yaml .. . .. . id : my-pod .. . kind : Pod .. . apiVersion : v1 .. . desiredState : .. . manifest : .. . containers : .. . - name : container-name .. . image : gcr.io your-project your-image .. . .. . .. . .. . .. . 5 . Schedule this pod .. . .. . kubectl create -f my-pod.yaml .. . .. . .. . 6 . Repeat from step 4 for each pod you want to run . You can have multiple definitions in a single file using a line with --- as delimiter . Comment : on gcloud preview container pods --cluster-name cluster-1 create --zone europe-west1-c --config-file registry-pod.yaml there is a resource.go : 132 The resource in the provided file has no apiVersion defined Comment : see github.com GoogleCloudPlatform kubernetes blob master examples https : github.com GoogleCloudPlatform kubernetes blob master examples gce-pd testpd.yaml for updated pod example Comment : Google Container Engine GKE has moved on to Kubernetes 0.6.1 so referring to localhost no longer works . The current workaround is to refer to your private repository by its IP . See also : github.com GoogleCloudPlatform kubernetes wiki User-FAQ https : github.com GoogleCloudPlatform kubernetes wiki User-FAQ Comment : you get the private ip from creating the registry service . gcloud preview container services list --cluster CLUSTER --zone ZONE and replacing localhost : 5000 image with registry-service-ip : 5000 image Comment : is it possible to use an image from docker hub or it has to be uploaded on gcloud registry tagged as gcr.io image I am probably missing something .", "Question : It seems that the Google Monitoring Agent powered by Stackdriver https : cloud.google.com monitoring agent install-agent should be installed on each Node i.e . each compute instance i.e . each machine of a Kubernetes cluster . However the new plugins like Nginx https : cloud.google.com monitoring agent plugins nginx Redis https : cloud.google.com monitoring agent plugins redis ElasticSearch https : cloud.google.com monitoring agent plugins elasticsearch .. . need those agents to know the IP of these services . This means having kube-proxy running and set up which should mean running that Google Monitoring Agent on a Pod . These two conflict : On one side that agent monitors the entire machine on the other it monitor services running on one or more machines . Can these Stackdriver plugins work on a Google Container Engine GKE Kubernetes cluster .. . Answer : You can install the StackDriver Agent in your Dockerfile . I have been able to get this working for a couchdb container as follows :", "Question : I m still having problems accessing the cloud SQL instance from a GCE container . When I try to open up mysql I get the following error : .. . .. . The connection works fine from my local machine though The instance has a public IP and I have added my office s IP to the allowed Networks . So the instance is accessible through the internet just fine . I guess the db s access-control is blocking my access from the gce network but I m unable to figure out how to configure this . I added my project to Authorized App Engine Applications in the Cloud SQL control panel but that doesn t seem to help . EDIT : If I add 0.0.0.0 0 to Allowed Networks all works well . This is obviously not what I want so what do I need to enter instead EDIT2 : I could also add all public IPs from my kubernetes cluster obtained through gcloud compute instances list and add them to the cloud sql access list manually . But this doesn t seem to be right does it Comment : Hi I have a same problem . How did you deal with it I think the google-cloud-sql does not allow ip from google-container-engine then where to add the ip And add which ip .. . Answer : If you add the 14 CIDR block for your Container Engine cluster as the source address range does that work To find the CIDR block for your cluster click on the cluster name in the Google Cloud Console http : cloud.google.com console and find the row labeled Container address range . Comment : Thanks for your suggestion . Unfortunately it doesn t even let me enter it . Says Private networks cannot be whitelisted . Comment : I can create a firewall rule that uses 10.0.0.0 8 or 10.28.0.0 14 as the source range .", "Question : I m still having problems accessing the cloud SQL instance from a GCE container . When I try to open up mysql I get the following error : .. . .. . The connection works fine from my local machine though The instance has a public IP and I have added my office s IP to the allowed Networks . So the instance is accessible through the internet just fine . I guess the db s access-control is blocking my access from the gce network but I m unable to figure out how to configure this . I added my project to Authorized App Engine Applications in the Cloud SQL control panel but that doesn t seem to help . EDIT : If I add 0.0.0.0 0 to Allowed Networks all works well . This is obviously not what I want so what do I need to enter instead EDIT2 : I could also add all public IPs from my kubernetes cluster obtained through gcloud compute instances list and add them to the cloud sql access list manually . But this doesn t seem to be right does it Comment : Hi I have a same problem . How did you deal with it I think the google-cloud-sql does not allow ip from google-container-engine then where to add the ip And add which ip .. . Answer : You should use the public IP addresses of the GCE instances to correctly allow traffic to your Cloud SQL instance as you mentioned in EDIT2 . You can find more information in Cloud SQL documentation : https : cloud.google.com sql docs gce-access Comment : Yes that would work . The catch is that I think I d like to have ephemeral IPs on the single nodes . That s at least the default when creating a container engine cluster . Also I would need a static IP for each and every node in the cluster as well . But oh well container engine and kubernetes seem to be cutting edge so I guess I have to live with some of this . It s just bugging me a little.. .", "Question : I m new to Kubernetes and I m trying to do HTTP Load Balancing on Google Container Engine with TLS using the included GCE Ingress Controller . The error I have is repeatable even following Google s official tutorial https : cloud.google.com container-engine docs tutorials http-balancer . For readability I summarize the procedure in config.yaml : .. . .. . Then : .. . .. . I removed the tags on the firewall rule so it will apply for all . But I get a 502 Server Error which according to the docs https : github.com kubernetes contrib tree master ingress controllers gce troubleshooting means it s likely bootstrapping but it always stays like this . I can see on the console that the backend is unhealthy . In the docs to avoid this one needs : .. . .. . a firewall rule which is done above .. . Service must respond with 200 but I tested the nginx image locally and the service via a general Load Balancer works fine .. . .. . So what is the cause of this error and how can I further debug this Comment : Can you start with creating a yaml file for your configuration Then it is more clear of what is all in there . Comment : @NorbertvanNobelen edited .. . Answer : I left the cluster overnight and it is now working . It either seems it takes quite some to bootstrap or something was fixed on the Google Cloud side ." ] }
[ "yes-answer-long", "yes-answer-short" ]
virtual-machine
UNK_RELATION
xenomai@linux-kernel@78
xenomai -- xenomai is a real-time development framework cooperating with the @placeholder to provide a pervasive interface-agnostic hard real-time support to user space applications seamlessly integrated into the linux environment it works as a kernel patch .
{ "confidence": [ 64.32451629638672, 59.50244903564453, 56.421024322509766, 54.54644775390625, 52.93811798095703, 52.734458923339844, 51.507591247558594, 49.87718963623047, 49.52442169189453, 48.787742614746094, 48.307952880859375, 48.307952880859375, 47.357521057128906, 46.93077850341797, 46.84654998779297, 46.461647033691406, 46.23724365234375, 46.235538482666016, 46.088966369628906, 44.87065887451172, 44.763893127441406, 44.50834655761719, 44.50834655761719, 44.321380615234375, 43.97071075439453, 43.97071075439453, 43.83556365966797, 43.83556365966797, 42.51327133178711, 42.51327133178711, 42.51327133178711, 42.12125778198242, 41.3139533996582, 41.020042419433594, 41.020042419433594, 40.948448181152344, 40.786434173583984, 40.70585632324219, 40.34227752685547, 39.637428283691406, 39.14878845214844, 39.14878845214844, 39.14878845214844, 38.428443908691406, 38.26277542114258, 38.072608947753906, 38.048065185546875, 37.69214630126953, 37.597068786621094, 36.832542419433594, 36.78008270263672, 36.65024185180664, 36.50379180908203, 36.4718017578125, 36.272945404052734, 36.272945404052734, 36.272945404052734, 36.272945404052734, 35.494747161865234, 35.457889556884766, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.89828872680664, 34.616844177246094, 34.493255615234375, 34.47887420654297, 34.24945068359375, 34.05833435058594, 33.819091796875, 33.612220764160156, 33.514259338378906, 33.470394134521484, 33.0980224609375, 32.88795852661133, 32.88795852661133, 32.88795852661133, 32.847686767578125, 32.5496826171875, 32.536678314208984, 32.104583740234375, 32.08546447753906, 31.9831485748291, 31.84320068359375, 31.816186904907227, 31.741004943847656, 31.741004943847656, 31.741004943847656, 31.741004943847656, 31.64081573486328, 31.012239456176758, 30.366348266601562, 30.366348266601562, 30.366348266601562, 30.25937843322754, 30.25937843322754 ], "content": [ "I am trying to make a real-time kernel by patching Xenomai framework : Xenomai 2.6.0 and Kernel 2.6.38.8 .. . .. . I patched it successfully .", "Installing xenomai-related packages xenomai-runtime http : packages.ubuntu.com quantal devel xenomai-runtime libxenomai1 http : packages.ubuntu.com quantal libxenomai1 linux-patch-xenomai http : packages.ubuntu.com quantal linux-patch-xenomai .. . 2 .", "It covers the general concepts about real-time systems how Linux kernel works for preemption the latency in Linux PREEMPT RT and Xenomai the real-time extension as the dual kernel approach .", "how could I compare different real-time Linux solutions PREEMPT RT Xenomai Ubuntu lowlatency among others .", "Xenomai and its origin RTAI both take control of your scheduler handling the linux-kernel itself as a non-real-time thread .", "The problem .. . .. . In order to build a Real Time system I need to apply the Xenomai kernel patch available for kernels 3.5.7 3.10.32 and 3.14 .", "Once in the kernel space you can setup the GPIO as an irq to trigger on rising falling edge and handle it in real-time through Xenomai .", "Installing Xenomai : http : www.xenomai.org documentation xenomai-2.6 README.INSTALL .. . Xenomai API : http : www.xenomai.org documentation xenomai-2.6 html api index.html", "Compiled a new Linux Kernel and Xenomai for my target device .", "You didn t enable the kernel part of Xenomai .", "My question is is there a safe way to get gettimeofday s information from a Xenomai real-time thread", "Can you point me to a link which talks about dos and don ts in real-time besides what Xenomai says", "If you wanna Learn how This Xenomai works and what are the skins please refer this Link http : www.cs.ru.nl lab xenomai exercises .", "Program is part of the Xenomai test suite cross-compiled from Linux PC into Linux+Xenomai ARM toolchain .", "Is that finish installing of xenomai", "I m trying to port the real-time Thread Metric from ExpressLogic in POSIX in order to benchmark PREEMPT RT patches for Linux Xenomai and RTAI for my thesis .", "I m running a Xenomai real-time thread that sometimes needs to call gettimeofday in order to find out what the current time is according to ptpd .", "I have Xenomai installed in an ARM PC Xenomai 2.5.6 - Linux Kernel 2.6.35.9 and I need to read a 10 kHz clock signal .", "From the raspberry-pi uncompress xenomai-rpi.tar.bz2 to the root of the filesystem .. . .. . Or you can do it manually : .. . .. . cd usr xenomai raspPI usr xenomai scp bin root@ip address : usr bin raspPI usr xenomai scp sbin root@ip address : usr sbin raspPI usr xenomai scp lib root@ip address : usr lib .. . .. . You have now all the modules to test the Xenomai real-time features", "In my Xenomai environment any call of kernel function turns system to secondary mode linux scheduling .. . .. . So how to switch context on x86 platform with storing FPU registers without leaving user-space", "Here are the changes I made in the graphical configuration tool : .. . .. . Toolchain - Kernel headers Manually specified Linux version - 3.5.7 .. . Kernel - Kernel version custom - 3.5.7 as Kernel version .. . Kernel - Kernel configutation Using a defconfig - bcmrpi quick .. . Kernel - Linux Kernel Extentions - Adeos Xenomai Real-time patch .. . Kernel - Linux Kernel Extentions - Path for Adeos patch file the Relative path to the correct patch .. . .. . After the make command I get the following error .", "I m having an issue while generating a xenomai kernel using yocto .", "Check in the kernel log if xenomai is indeed started : dmesg grep -i xeno", ".. . .. . I am assuming the problem is about patching Xenomai or the Xenomai i-pipe to Kernel because I could build and install the unpatched versions .", "That is using the Xenomai Native API .", "EDIT .. . .. . there is no xenomai folder in usr .", "I have an ARM kit beside me and a Linux kernel source code patched with Xenomai on my machine .", "I am trying to build linux-kernel 3.18.20 for the beaglebone black using xenomai 2.6.4 and buildroot 2015.08.1 to compile it .", "I install xenomai-runtime on ubuntu-11.04 .", "You can also install the xenomai libraries from there .", "How about this http : www.cs.ru.nl lab xenomai one", "I m testing POSIX skin in Xenomai .", "I am concerned about using these methods in a system that has a dual kernel scheduler like Xenomai-Linux .", "FWIW Gilles from the Xenomai-help mailing list says that Xenomai 2.6 will have a CLOCK HOSTRT clock feature that will satisfy this need .", "Can you run file librtdk.a in the .. . xenomai lib directory to double check you have an ARM xenomai there", "Hey I am still a noob but to install xenomai go to the website Xenomai http : www.xenomai.org and you can find the quick build steps there .", "Since in one of them I need real-time capabilities for robustness basically I patched my target kernel for Xenomai and programmed it using Xenomai s native skin .", "If you are talking about user-space real-time applications then you can have access to any drivers that is implemented in RTDM .", "Actually Xenomai is quite proud of having the opposite feature- their threads maintain the high priority in user space .", "Clean out the Xenomai build directory and rerun the build .", "2.How to write the simplest program hello world on xenomai API", "It explains everything about Xenomai how to boot Kernal Examples n all .", "by following the exercises http : www.cs.ru.nl lab xenomai exercises index.html .", "This Link explains well How to install Xenomai in Operating system Link1 http : www.blaess.fr christophe 2011 12 28 xenomai-2-6-0-sur-ubuntu-11-10 Link2 http : www.xenomai.org documentation xenomai-2.6 html README.INSTALL .", "I have worked with rtai but that shares a history with xenomai .", "Check the Xenomai API : .. . http : www.xenomai.org documentation trunk html api group clock.html .. . .. . Here s a code snippet for you tested with Xenomai 2.6 :", "For those of you who are curious to know the final working command for cross-compiling Xenomai 2.5.6 applications for an ARM machine running Linux 2.6.39.5 this is it :", "After building a vanilla kernel with Xenomai 3 Cobalt Core to my x86-based PC I reboot to choose this new kernel on GRUB .", "Found an interesting paper comparing Xenomai vs Preempt-RT with a basic GPIO test vs stock kernel .", "I m trying to cross compile C code for an embedded application that is running Xenomai 2.5.6 Linux 2.6.35.9 .", "I get no output in dmesg I haven t any module loaded and in the kernel-menuconfig there aren t any option tu enable xenomai support in the kernel or like a module", "The FAQ there talks about the preempt-rt as compared to Xenomai .", "You can use non-real-time mutexes in a real-time thread but that would break the real-time-ness of the thread since control is taken out of the hands of the real-time scheduler and is given to Linux which is run in a non-real-time context .", "However doing that appears to be unsafe : in particular it occasionally puts the Xenomai thread and the Linux kernel into a livelock situation causing gettimeofday to spin the CPU and never return as described here http : www.mail-archive.com xenomai-help@gna.org msg10626.html .", "AHH can it be the reason that Xenomai doesn t care much about the speed", "Where can I find all the test programs provided by Xenomai", "It was a pretty basic config with the exception of the Xenomai options I showed you above .", "scp xenomai-rpi.tar.bz2 root@IP Address of the RPi : .. . .. . The archive will be copied in the root directory .", "Xenomai3 has actually two approaches : either using a real-time micro kernel to manage real-time threads and interrupts or if you need less performance using it with a single preempt-rt kernel", "I m trying to benchmark Xenomai PREEMPT RT and Linux as-is in a Raspberry Pi and I m having some trouble .", "I need to compare performance between the preempt-rt patches Xenomai and RTAI .", "I m using Posix Skin and Analogy from the Xenomai API .", "If the answer is yes should I use the POSIX skin in the Xenomai one", "And what about shared mutexes between Xenomai and non-RT processes", "I have one task created for sending and one for reading in the xenomai program .", "I need to perform RT to NRT communication on a Xenomai machine .", "From what I ve read about Xenomai it gives threads personality layers .", "I need to wrap my binary with the posix skin of Xenomai .", "I created a Tiny OS for my controller ARM and installed Xenomai 2.60 on that OS .", "I suspect the problem is clock nanosleep because all other operations are arithmetic but clock nanosleep is defined in Xenomai documentation http : www.xenomai.org documentation xenomai-2.6 html api group posix time.html ga924d51d78cdcd9d7dee2613fb3a33cd1 .", "I have just started to familiarize myself with Linux and I was wondering if you guys could help me find good resources easy enough to understand with instructions on running Xenomai with Linux .", "Threads don t spend much time in kernel space .", "As you know real-time is all about guaranteeing deadline and calling Linux violates it because Linux doesn t guarantee anything .", "I don t know about Xenomai but at least in RTAI if you call a Linux system call then you get a warning like RTAI : LXRT changed mode : syscall .. . in your kernel logs .", "I find this http : brunosmartins.info xenomai-on-the-beaglebone-black-in-14-easy-steps but they don t use the mainline kernel repository they use this https : github.com RobertCNelson bb-kernel", "For example if the user space code acts as the kernel for other lower-priority user-space code or where the user-space code doesn t do much of the real work .", "So when you run export LD LIBRARY PATH usr xenomai lib as a user then sudo your next command the environment variable LD LIBRARY PATH is not set .", "Since drivers are also important in real-time systems they have implemented the real-time driver model or RTDM that helps both implementing and using device drivers in a real-time context .", "I also tried to install Xenomai in different kernels 3.18.13 or 3.14.44 the result did not change .", "Then when configuring the package there should be an option to build it or not as the source directories suggest http : svn.gna.org svn xenomai trunk src skins", "I m really a newbie when it comes to Xenomai and I want to measure the times between two points .", "How to run an infinite-loop in real-time", "Are there any real advantages too of maintaining the thread-priority in user space", "Based on my experience in RTAI you can t use real-time mutexes in non-real-time threads .", "Unfortunately there are not many real-time applications users for a wide range of information to be available on the internet .", "From : http : www.xenomai.org documentation xenomai-2.3 pdf Life-with-Adeos-rev-B.pdf .. . .. . The above behaviour is to be opposed to what happens with RTAI LXRT for instance where threads migrating to the Linux space actually lose their real - time priority in the same move by inheriting the lowest priority defined by the RTAI scheduler .", "After two days messing around with Makefiles Xenomai CFLAGS and linker configuration I ve come to a point in which both the compilation and linking works with no problem .", "Also documentation you can install by going to the software center and typing xenomai you will find 3 packages one of which is the documentation .", "I wish to understand what kind of advantages can it offer - I mean when the real-time thread is shifted to userspace it gets a low priority and therefore can be preempted by a high priority real-time thread running in kernel space .", "http : www.cs.ru.nl lab xenomai exercises ex01 Exercise-1.html .. . Following is the Makefile : .. . .. . Please help .", "I wrote a hello world program with an infinite-loop with Xenomai API as follows : This gets terminated soon .", "The only folder called xenomai is the one in the proc .. . .. . EDIT2 .. . .. . The content of output target usr bin does not contain the latency program :", "You tried to run the file latency in proc xenomai which is used to adjust the latency of the system .", "What are differences pros and cons of the three referred real-time OS framework extensions or patches", "I compile and run successful the kernel using the patch-3.18.20-arm http : xenomai.org downloads ipipe v3.x arm ipipe-core-3.18.20-arm-6.patch and the buildroot config .. . .. . but when I run latency or xeno-test I get the following error : .. . .. . I used this version because it is the last stable version at the moment and here http : article.gmane.org gmane.linux.real-time.xenomai.users 23303 match beaglebone+black said that The I-pipe patches are meant for mainline Linux kernels not for Linux kernel forks .. . .. . I am looking for a working kernel patch version for beaglebone black and xenomai but I can t find it can you point me in the right direction", "I would suggest you to use Xenomai native API to create Named Pipes such as rt pipe create and so on .", "The list of availables Xenomai patches can be found aqu http : download.gna.org adeos patches v3.x arm .", "I m trying to send through radio apc220 from a C-xenomai program to and from an arduino Mega .", "I actually wanted to test this program s real-time latency through latencytop .", "To run functions real-time we need a rtdm driver ." ] }
{ "confidence": [ 80.23571014404297, 79.09790802001953, 76.97122955322266, 73.20291137695312, 72.4328842163086, 71.00090026855469, 70.7664794921875, 68.26044464111328, 67.62919616699219, 66.07059478759766, 65.84019470214844, 64.7734375, 64.600830078125, 63.628936767578125, 63.410926818847656, 60.55067825317383, 59.09659194946289, 58.898372650146484, 56.92174530029297, 56.474464416503906 ], "content": [ "Question : null .. . Answer : I m trying to use a Raspberry Pi board with the images generated by Buildroot . I m using the raspberrypi defconfig configuration as suggested here http : stackoverflow.com questions 25858279 buildroot-system-doesnt-boot-dev-ttys0-no-such-file in order to generate the rootfs the kernel image and all files required to boot the system . The problem .. . .. . In order to build a Real Time system I need to apply the Xenomai kernel patch available for kernels 3.5.7 3.10.32 and 3.14 . The list of availables Xenomai patches can be found aqu http : download.gna.org adeos patches v3.x arm . Here are the changes I made in the graphical configuration tool : .. . .. . Toolchain - Kernel headers Manually specified Linux version - 3.5.7 .. . Kernel - Kernel version custom - 3.5.7 as Kernel version .. . Kernel - Kernel configutation Using a defconfig - bcmrpi quick .. . Kernel - Linux Kernel Extentions - Adeos Xenomai Real-time patch .. . Kernel - Linux Kernel Extentions - Path for Adeos patch file the Relative path to the correct patch .. . .. . After the make command I get the following error . Buildroot couldn t find the config file .. . .. . buildroot-2013.11 output build linux-3.5.7 arch arm configs bcmrpi quick defconfig : No such file or directory .. . .. . Which defconfig name should I use in the Kernel - Defconfig name field I will appreciate your help with this situation .", "Question : From : http : www.xenomai.org documentation xenomai-2.3 pdf Life-with-Adeos-rev-B.pdf .. . .. . The above behaviour is to be opposed to what happens with RTAI LXRT for instance where threads migrating to the Linux space actually lose their real - time priority in the same move by inheriting the lowest priority defined by the RTAI scheduler . There must be some reason behind this design decision . I wish to understand what kind of advantages can it offer - I mean when the real-time thread is shifted to userspace it gets a low priority and therefore can be preempted by a high priority real-time thread running in kernel space . Are there some assumptions behind this design decision .. . Answer : Two assumptions : .. . .. . 1 . Threads don t spend much time in kernel space . 2 . Thread in kernel space tend to hold resources that need to be released as quickly as possible . Comment : thanks for replying . Actually Xenomai is quite proud of having the opposite feature- their threads maintain the high priority in user space . Therefore I am confused . Are there any real advantages too of maintaining the thread-priority in user space Comment : If those two assumptions don t apply . For example if the user space code acts as the kernel for other lower-priority user-space code or where the user-space code doesn t do much of the real work . Comment : David but when we are talking about the hard-real-time does it make sense to think that those two assumptions don t apply AHH can it be the reason that Xenomai doesn t care much about the speed", "Question : I m running a Xenomai real-time thread that sometimes needs to call gettimeofday in order to find out what the current time is according to ptpd . However doing that appears to be unsafe : in particular it occasionally puts the Xenomai thread and the Linux kernel into a livelock situation causing gettimeofday to spin the CPU and never return as described here http : www.mail-archive.com xenomai-help@gna.org msg10626.html . My question is is there a safe way to get gettimeofday s information from a Xenomai real-time thread I m considering adding my own version of gettimeofday to my Linux kernel my version would fail if read seqretry returns true unlike the regular version http : www.google.com codesearch gufiwQeQ0iA trunk kernels linux-2.6.16-gazineu kernel time.c q do gettimeofday type cs l 528 which will loop forever when that happens . However I d just as soon not start customizing the Linux kernel if there is a better way to do it . Comment : FWIW Gilles from the Xenomai-help mailing list says that Xenomai 2.6 will have a CLOCK HOSTRT clock feature that will satisfy this need . For earlier versions one work-around is to add an ioctl to a custom driver that returns the Linux real-time-clock without trying to loop if contention is detected . Comment : can you put that as a detailed answer .. . Answer : Update Oct 2012 .. . For anyone else stumbling across this thread.. . Check the Xenomai API : .. . http : www.xenomai.org documentation trunk html api group clock.html .. . .. . Here s a code snippet for you tested with Xenomai 2.6 : Comment : That is using the Xenomai Native API . There is another call in the Posix API that allows you to get the clock based on the host time .", "Question : In Xenomai s API of Posix skin http : www.xenomai.org documentation trunk html api modules.html I find the following : .. . .. . POSIX skin . Clocks and timers services . Condition variables services . Interruptions management services . Message queues services . Mutex services . Semaphores services . Shared memory services . Signals services . Threads management services . Thread cancellation . Threads scheduling services . Thread creation attributes . Thread-specific data . I can t see anything regarding the file handling and socket programming so I am guessing that perhaps file handling and sockets are not to be dealt in the real-time Is the guess wrong Please guide . .. . Answer : Xenomai and its origin RTAI both take control of your scheduler handling the linux-kernel itself as a non-real-time thread . They have provided many services most of which as you can see is related to threads and synchornization that do NOT call Linux API in kernel space or system calls in user space . As you know real-time is all about guaranteeing deadline and calling Linux violates it because Linux doesn t guarantee anything . Since drivers are also important in real-time systems they have implemented the real-time driver model or RTDM that helps both implementing and using device drivers in a real-time context . File handling in kernel is strongly frowned upon . If you are talking about user-space real-time applications then you can have access to any drivers that is implemented in RTDM . If you don t find one for file handling or sockets then no you can t use them . Note that even a printf uses Linux system calls and is forbidden . Note that if you do use them nothing breaks you just lose your real-time-ness I personally do use files for logging but only call them in case of an error that means real-time is already ruined anyway . I don t know about Xenomai but at least in RTAI if you call a Linux system call then you get a warning like RTAI : LXRT changed mode : syscall .. . in your kernel logs . Comment : That s very helpful . Thanks . Can you point me to a link which talks about dos and don ts in real-time besides what Xenomai says Comment : @AnishaKaul let me search . Unfortunately there are not many real-time applications users for a wide range of information to be available on the internet . Comment : Yeah that is the problem . Please if you find something link up here . Thanks . Comment : This document https : www.rtai.org index.php module documents JAS DocumentManager op downloadFile JAS File id 46 is on RTAI 3.4 but it has some good info . Search for syscall in the document . Except one part in the middle of some code all the rest it finds you is worth reading . Comment : You said : Note that even a printf uses Linux system calls and is forbidden . Thanks for the new enlightenment . I think in future if your edit your answers with extra info it makes sense to inform explicitly though comment .", "Question : I am trying to build linux-kernel 3.18.20 for the beaglebone black using xenomai 2.6.4 and buildroot 2015.08.1 to compile it . I compile and run successful the kernel using the patch-3.18.20-arm http : xenomai.org downloads ipipe v3.x arm ipipe-core-3.18.20-arm-6.patch and the buildroot config .. . .. . but when I run latency or xeno-test I get the following error : .. . .. . I used this version because it is the last stable version at the moment and here http : article.gmane.org gmane.linux.real-time.xenomai.users 23303 match beaglebone+black said that The I-pipe patches are meant for mainline Linux kernels not for Linux kernel forks .. . .. . I am looking for a working kernel patch version for beaglebone black and xenomai but I can t find it can you point me in the right direction I find this http : brunosmartins.info xenomai-on-the-beaglebone-black-in-14-easy-steps but they don t use the mainline kernel repository they use this https : github.com RobertCNelson bb-kernel Comment : Check in the kernel log if xenomai is indeed started : dmesg grep -i xeno Comment : I get no output in dmesg I haven t any module loaded and in the kernel-menuconfig there aren t any option tu enable xenomai support in the kernel or like a module Comment : tried mknod dev rtheap c 10 254 .. . Answer : You didn t enable the kernel part of Xenomai . You have to enable BR2 LINUX KERNEL EXT XENOMAI in the Linux kernel extensions menu of the kernel .", "Question : the target hardware platform has limited horsepower and or you want the real-time job to put the smallest possible overhead on your system . This is where dual kernels are usually better than a native preemption system . From here : http : www.xenomai.org index.php Xenomai : Roadmap Xenomai 3 FAQ .. . .. . Preempt rt does preempt the whole Linux . In what way does preempting Linux put load on the system The FAQ there talks about the preempt-rt as compared to Xenomai . .. . Answer : Alternatively you can check this presentation : http : www.slideshare.net jserv realtime-linux for longer descriptions . It covers the general concepts about real-time systems how Linux kernel works for preemption the latency in Linux PREEMPT RT and Xenomai the real-time extension as the dual kernel approach . Comment : That link gives me a web filter violation . Better post some information here itself .", "Question : I am trying to build linux-kernel 3.18.20 for the beaglebone black using xenomai 2.6.4 and buildroot 2015.08.1 to compile it . I compile and run successful the kernel using the patch-3.18.20-arm http : xenomai.org downloads ipipe v3.x arm ipipe-core-3.18.20-arm-6.patch and the buildroot config .. . .. . but when I run latency or xeno-test I get the following error : .. . .. . I used this version because it is the last stable version at the moment and here http : article.gmane.org gmane.linux.real-time.xenomai.users 23303 match beaglebone+black said that The I-pipe patches are meant for mainline Linux kernels not for Linux kernel forks .. . .. . I am looking for a working kernel patch version for beaglebone black and xenomai but I can t find it can you point me in the right direction I find this http : brunosmartins.info xenomai-on-the-beaglebone-black-in-14-easy-steps but they don t use the mainline kernel repository they use this https : github.com RobertCNelson bb-kernel Comment : Check in the kernel log if xenomai is indeed started : dmesg grep -i xeno Comment : I get no output in dmesg I haven t any module loaded and in the kernel-menuconfig there aren t any option tu enable xenomai support in the kernel or like a module Comment : tried mknod dev rtheap c 10 254 .. . Answer : You could use mainline Linux kernel as TI now supports it : http : www.ti.com lsds ti tools-software mainlinelinux sw.page", "Question : What are differences pros and cons of the three referred real-time OS framework extensions or patches I want to measure a CPU timestamp counter TSC time in nanosecond everytime when a data frame or an ack frame of Wifi is sent or received . And I realized that one of three real-time technique is required to increase precision and reduce jitter due to preempt interrupt and context change . Currently I am applying RTAI to the kernel . As it takes a long time to compile I d like read something about those three . Could you recommend some documents or explain about it .. . Answer : Found an interesting paper comparing Xenomai vs Preempt-RT with a basic GPIO test vs stock kernel . https : www.osadl.org fileadmin dam rtlws 12 Brown.pdf .. . .. . Xenomai has better performance overall less jitter but using it will force you to redevelop custom driver using the specific RTDM api . On the other hand since Preempt RT is not in the mainline kernel it is less tested and you can also have issues . Xenomai3 has actually two approaches : either using a real-time micro kernel to manage real-time threads and interrupts or if you need less performance using it with a single preempt-rt kernel", "Question : I have Xenomai installed in an ARM PC Xenomai 2.5.6 - Linux Kernel 2.6.35.9 and I need to read a 10 kHz clock signal . The signal is electrically connected to one of my GPIO s which is mapped to a system file . If I create a task in user-space and open-read-close the file while measuring the time I get an average delay of 650 s i.e . this is the time that takes a full open-read-close cycle . This yields to a sampling rate of 1.5 kHz . Output : .. . .. . I ve read somewhere in the Internet that forcing my task to run in Kernel-space rather than user-space would enable it for a faster execution but I m not sure if this would be enough nor if what I m trying to do here is completely right . I come from an electronics engineering background where I have always been told not to treat synchronous signals like clock signals asynchronously and reading a file i.e . my sync . signal using a periodic task that may introduce jitter depending on the CPU system load doesn t look like a good approach . Is there a better way to do so Thanks .. . Answer : Here are my thoughts on a possible solution . You are right you shouldn t handle synchronous signals asynchronously . Therefore you should avoid opening a fd in userspace to read the signal level from the GPIO . Instead you should handle this in the kernel space where it s more appropriate . Once in the kernel space you can setup the GPIO as an irq to trigger on rising falling edge and handle it in real-time through Xenomai . The latency won t disappear but it should be OK for 10 KHz clock speed . Unfortunately you didn t specify what you are doing with the clock signal . I m guessing you are trying to act as a slave drive to some device Any way I hope I ve been helpful .", "Question : I m trying to cross compile C code for an embedded application that is running Xenomai 2.5.6 Linux 2.6.35.9 . I started with Xenomai examples and tried to compile them using their Makefiles but they are not working properly besides I want to cross-compile for my ARM machine . I ve followed this http : www.cs.ru.nl lab xenomai exercises ex01 Exercise-1.html tutorial and found a way to manually compile the sources that happens to be this one : .. . .. . Where arm-linux-gnueabi-gcc is the toolchain I m using to cross-compile for ARM -I home .. . is the path where the headers are and -L home .. . is the path where all libraries are located . Those headers and libraries where put in that folders during Xenomai s install so they are built for ARM . CFLAGS and LDFLAGS were generated using xeno-config as stated in the tutorial but when I execute the command I get the following linker-error : .. . .. . All rt .. . references are Xenomai s Kernel functions that are included in the libraries . .. . .. . EDIT : Adding -lrt to the command-line and ordering the arguments correctly i.e . -L at the end of the command-line does not solve the problem . In order to assure that the library does contain the functions I executed objdump and got the following result : .. . .. . Other things I did that may help finding the problem : .. . .. . 1 . Installing xenomai-related packages xenomai-runtime http : packages.ubuntu.com quantal devel xenomai-runtime libxenomai1 http : packages.ubuntu.com quantal libxenomai1 linux-patch-xenomai http : packages.ubuntu.com quantal linux-patch-xenomai .. . 2 . Removed a different toolchain . Since I was first using the ngstr m distribution in my target device I had a specialized toolchain for it . Now I moved to Debian and I am using the arm-linux-gnueabi toolchain provided in the binutils-arm-linux-gnueabi package http : packages.ubuntu.com quantal binutils-arm-linux-gnueabi . 3 . Compiled a new Linux Kernel and Xenomai for my target device . Kernel version is 2.6.35.9 and Xenomai s is 2.5.6 . Should I use an earlier version Anyway Xenomai is installed correctly since I can run the pre-compiled programs that were ironically compiled during Xenomai s installation by myself.. . Comment : Thanks @artlessnoise but I tried both adding -lrt and moving -L and -I to the end of the command-line and I still got the same error . Just as trial error method I tried writing wrong library names for instance -ltnativeee and the linker has outputted a different error cannot find -lnativeee which makes me think there is something wrong with the libraries themselves.. . What do you think Comment : Hmm . Your code is not C++ correct Can you run file librtdk.a in the .. . xenomai lib directory to double check you have an ARM xenomai there Also getting arm-linux-gnueabi-objdump -x librtdk.a grep rt print output to confirm a function is in the library Comment : Executing file librtdk.a I get librtdk.a : current ar archive while if I execute file librtdk.so.0.0.0 the output ends up being the expected librtdk.so.0.0.0 : ELF 32-bit LSB shared object ARM version 1 SYSV dynamically linked .. . . Executing the last command I get around 15 lines containing the keyword so I guess the function rt printf is present . Comment : Sure I ve added it to the question because it was too long for a comment entry . I m as stumped as you @artlessnoise.. . .. . Answer : It appears that magic has happened here . After two days messing around with Makefiles Xenomai CFLAGS and linker configuration I ve come to a point in which both the compilation and linking works with no problem . I really haven t done anything special . I haven t un installed any package other than the ones I already had nor modified any environment variable nor added any different flag or argument to my command-line . I just rebooted my computer . I didn t even do that on purpose I just left the lab yesterday with the command not working altogether and this morning everything works a treat . Strange Yes . I guess it is somehow related with exported variables in the terminal session . I remember I tinkered with LD LIBRARY PATH CFLAGS LDFLAGS and so on so I must have screwed something while trying to solve the problem . For those of you who are curious to know the final working command for cross-compiling Xenomai 2.5.6 applications for an ARM machine running Linux 2.6.39.5 this is it : Comment : Both -l and -L order is important . I d suggest you always keep -lnative the first one since my toolchain is only able to link if it is at the beginning .", "Question : null .. . Answer : I am trying to make a real-time kernel by patching Xenomai framework : Xenomai 2.6.0 and Kernel 2.6.38.8 .. . .. . I patched it successfully . And was able to build the kernel : .. . .. . After make install it creates and image in boot directory . But when I try sudo update-grub the process gets locked pc freezes and when I restart the computer I can t see that kernel image anymore . There are no errors or warnings but I cannot see my compiler image on grub menu . PS : I cannot see inside of grub.cfg process freezes Comment : Instead of running update-grub you can simply open the grub file and edit it manually . Comment : Can you move grub.cfg to another place both to backup and delete and then try update-grub Could you open ANY files in your boot or boot grub directories", "Question : I install xenomai-runtime on ubuntu-11.04 . Is that finish installing of xenomai I found that I can t find xenomai s kernel and boot from it . So my question are : .. . .. . 1.How to boot xenomai s kernel 2.How to write the simplest program hello world on xenomai API 3.Where are full of xenomai s document or examples Thank you .. . Answer : Hey I am still a noob but to install xenomai go to the website Xenomai http : www.xenomai.org and you can find the quick build steps there . They have not given the configuration there so you will have to search on the web for that . here s a link http : www.blaess.fr christophe 2011 12 28 xenomai-2-6-0-sur-ubuntu-11-10 of use its in french i can speak still very helpful . Also documentation you can install by going to the software center and typing xenomai you will find 3 packages one of which is the documentation . You can also install the xenomai libraries from there . Comment : Can you turn off APM I can t find it on linux-kernel 2.6.38.8 instructed by that webpage . Thank you", "Question : I install xenomai-runtime on ubuntu-11.04 . Is that finish installing of xenomai I found that I can t find xenomai s kernel and boot from it . So my question are : .. . .. . 1.How to boot xenomai s kernel 2.How to write the simplest program hello world on xenomai API 3.Where are full of xenomai s document or examples Thank you .. . Answer : I created a Tiny OS for my controller ARM and installed Xenomai 2.60 on that OS . This Link explains well How to install Xenomai in Operating system Link1 http : www.blaess.fr christophe 2011 12 28 xenomai-2-6-0-sur-ubuntu-11-10 Link2 http : www.xenomai.org documentation xenomai-2.6 html README.INSTALL . If you wanna Learn how This Xenomai works and what are the skins please refer this Link http : www.cs.ru.nl lab xenomai exercises . It explains everything about Xenomai how to boot Kernal Examples n all .", "Question : I need to use context switching in linux on my x86 platform similar to ucontext.h does .. . .. . But unfortunately ucontext use kernel call to do it . In my Xenomai environment any call of kernel function turns system to secondary mode linux scheduling .. . .. . So how to switch context on x86 platform with storing FPU registers without leaving user-space Comment : where did you get ucotext.h what this ucotext.h does Your questions needs to be clearer . Comment : Sorry . I mean ucontext.h . This is standard glibc function Comment : ucontext does not use a kernel call to switch contexts . It s true that it makes a kernel call but that is only to update signal masks which should have predictable performance and certainly never blocks . If even that affects Xenomai and you still prefer ucontext to the alternatives I think you could just copy the code out of glibc and remove the updating of signal masks . .. . Answer : I found solution . Using longjmp instead of swapcontext do the same but do not executing kernel call and do not switch system to secondary mode . Solution was found here : http : www.1024cores.net home lock-free-algorithms tricks fibers", "Question : I install xenomai-runtime on ubuntu-11.04 . Is that finish installing of xenomai I found that I can t find xenomai s kernel and boot from it . So my question are : .. . .. . 1.How to boot xenomai s kernel 2.How to write the simplest program hello world on xenomai API 3.Where are full of xenomai s document or examples Thank you .. . Answer : Installing Xenomai : http : www.xenomai.org documentation xenomai-2.6 README.INSTALL .. . Xenomai API : http : www.xenomai.org documentation xenomai-2.6 html api index.html", "Question : null .. . Answer : how could I compare different real-time Linux solutions PREEMPT RT Xenomai Ubuntu lowlatency among others . I am using rt-tests and cyclictest for PREEMPT RT . I read Lachesis testsuite as an option . What would be a testsuite valid . Thank you", "Question : I would like to test Xenomai features with the latency test under a specified load but when I try to execute the command the follwing error shows up . The system has been built with Buildroot . In the proc xenomai folder the version file contains : .. . .. . Here is the relevant part of the configuration file I have used to build the system : .. . .. . Is this configuration file correct Where can I find all the test programs provided by Xenomai EDIT .. . .. . there is no xenomai folder in usr . I ve noticed in usr bin the following programs : .. . .. . How can I use this files The only folder called xenomai is the one in the proc .. . .. . EDIT2 .. . .. . The content of output target usr bin does not contain the latency program : .. . Answer : This is a possible workaround for the raspberry-pi . SOURCE http : www.blaess.fr christophe 2012 08 27 xenomai-sur-raspberry-pi .. . .. . Finally copy the compressed archive to you raspberry-pi using a ssh and untar it . scp xenomai-rpi.tar.bz2 root@IP Address of the RPi : .. . .. . The archive will be copied in the root directory . From the raspberry-pi uncompress xenomai-rpi.tar.bz2 to the root of the filesystem .. . .. . Or you can do it manually : .. . .. . cd usr xenomai raspPI usr xenomai scp bin root@ip address : usr bin raspPI usr xenomai scp sbin root@ip address : usr sbin raspPI usr xenomai scp lib root@ip address : usr lib .. . .. . You have now all the modules to test the Xenomai real-time features", "Question : null .. . Answer : After building a vanilla kernel with Xenomai 3 Cobalt Core to my x86-based PC I reboot to choose this new kernel on GRUB . However the screen freezes while initializing ramdisk process . I installed modules and installed the image on my Ubuntu 14.04 OS . I also tried to install Xenomai in different kernels 3.18.13 or 3.14.44 the result did not change . Even on a different machine with the same architecture the problem persists . .. . .. . I am assuming the problem is about patching Xenomai or the Xenomai i-pipe to Kernel because I could build and install the unpatched versions .", "Question : I have just started to familiarize myself with Linux and I was wondering if you guys could help me find good resources easy enough to understand with instructions on running Xenomai with Linux . Thanks .. . Answer : How about this http : www.cs.ru.nl lab xenomai one It s up-to-date course material for a course called Design of Embedded Systems DES by a Dutch University and I found it always helpful to get started e.g . by following the exercises http : www.cs.ru.nl lab xenomai exercises index.html .", "Question : I wrote a hello world program with an infinite-loop with Xenomai API as follows : This gets terminated soon . I actually wanted to test this program s real-time latency through latencytop . How to run an infinite-loop in real-time .. . Answer : At the bottom of main also put an infinite-loop . while 1 sleep 10000 is usually good on full-blown linux don t know about RT-world . What s happening is that you re spawning off a new task and then main is immediately returning after this which exits the entire process ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linux-kernel
UNK_RELATION
hubot@hubot@67
hubot -- hubot is a an automation service application.you can use @placeholder to provide access to resources through chat rooms web-services or other interfaces.https : github.com github hubot .
{ "confidence": [ 71.77344512939453, 71.61280822753906, 69.49322509765625, 69.11399841308594, 67.6869125366211, 66.69547271728516, 66.63910675048828, 64.92835235595703, 64.69361114501953, 63.19113540649414, 61.10383224487305, 60.77703857421875, 60.76629638671875, 60.459495544433594, 60.459495544433594, 60.38435745239258, 60.29319381713867, 59.65253448486328, 59.05193328857422, 58.909976959228516, 58.830814361572266, 58.76445007324219, 58.76445007324219, 58.5391731262207, 58.43711853027344, 57.850372314453125, 57.850372314453125, 57.850372314453125, 57.78547286987305, 57.63994598388672, 57.63994598388672, 57.55083465576172, 56.880287170410156, 56.2180290222168, 56.15532684326172, 56.15532684326172, 56.15532684326172, 56.15532684326172, 55.85578918457031, 55.432029724121094, 55.41328430175781, 55.298622131347656, 55.03082275390625, 54.67270278930664, 54.623512268066406, 54.623512268066406, 54.601783752441406, 54.601783752441406, 54.601783752441406, 54.601783752441406, 54.34629821777344, 54.34629821777344, 54.34629821777344, 54.232425689697266, 54.21893310546875, 53.50129699707031, 53.47727966308594, 53.47727966308594, 53.24097442626953, 53.11962890625, 52.6512565612793, 52.6512565612793, 52.6512565612793, 52.6512565612793, 52.6512565612793, 52.57695770263672, 52.43804168701172, 52.20861053466797, 52.13382339477539, 52.13382339477539, 52.13382339477539, 52.13382339477539, 52.13382339477539, 52.12953567504883, 52.11647033691406, 51.99512481689453, 51.52675247192383, 51.52675247192383, 51.52675247192383, 51.33182907104492, 51.11832809448242, 51.0198860168457, 50.89408874511719, 50.61836624145508, 50.44367218017578, 50.44367218017578, 50.39448165893555, 50.17900848388672, 50.07429504394531, 49.76334762573242, 49.59983825683594, 49.59983825683594, 49.26997756958008, 49.26997756958008, 48.79528045654297, 48.69794845581055, 48.68345260620117, 48.574668884277344, 48.379249572753906, 48.379249572753906 ], "content": [ "The hubot-redis-brain GitHub repo https : github.com hubot-scripts hubot-redis-brain details the required setup .", "I ve got hubot https : github.com github hubot running in a campfire chatroom .", "argv usr bin nodejs usr bin npm-install hubot hubot-scripts hubot-diagnostics hubot-help hubot-heroku-keepalive hubot-google-images hubot-google-translate hubot-pugme hubot-maps hubot-redis-brain hubot-rules hubot-shipit --save npm ERR", "There is a small chapter about it in Automation and Monitoring with Hubot https : leanpub.com automation-and-monitoring-with-hubot book shameless plug .", "1 : https : github.com hubot-scripts hubot-redis-brain", "just need a redis-server on localhost or configure it to use a remote redis : github.com hubot-scripts hubot-redis-brain https : github.com hubot-scripts hubot-redis-brain", "I am installing hubot on Linux and followed the instructions https : github.com github hubot wiki Deploying-Hubot-onto-UNIX receiving no errors .", "I m using hubot with the hubot-slack adapter .", "Relatively self explanatory should be safe to remove the following : .. . .. . hubot-diagnostics : 0.0.1 .. . hubot-google-images : 0.1.2 .. . hubot-help : 0.1.1 .. . hubot-maps : 0.0.1 .. . hubot-pugme : 0.1.0 .. . hubot-rules : 0.1.0 .. . hubot-scripts : 2.5.16 .. . hubot-shipit : 0.1.1 .. . .. . Then for the second part you have it partially right .", "I believe you can use : https : my.slack.com services new hubot .. . .. . This will create another hubot integration within your slack .", "you can try to refer to the code https : github.com hubot-scripts hubot-express blob master src hubot-express.coffee to implement the integration .", "start hubot returned the error start : Unknown job : hubot .", "github.com slackhq hubot-slack issues 197 https : github.com slackhq hubot-slack issues 197", "Does hubot support this", "I m writing a Hubot script .", "Current hubot uses node 0.8", "Looking at the Hubot documentation https : github.com github hubot blob master docs scripting.md there seems to be no way to send a formatted message to the Hipchat client from a Hubot script .", "is there any option to pin item in slack integrated with hubot by the hubot", "Also here is a link-to basic hubot scripts in case it is needed for context - https : github.com github hubot blob master docs scripting.md", "I just stumbled upon hubot-cron https : github.com miyagawa hubot-cron .", "All you have to do is tell Hubot who is who using hubot user has role role .", "Are you running Hubot as root", "hubot -n Thanks for the answer :", "https : github.com slackhq hubot-slack issues 114", "I deployed Hubot to Heroku and I tested on hipchat I typed some command-line example : @hubot help @hubot image me hubot ... . and It worked fine .", "And from the hubot documentation that syntax is correct .", "How are you pinging your hubot", "pretty sure it ships with hubot by default .", "This is a snippet from hubot-confluence plugin https : github.com amwelch-oss hubot-confluence It should be the same for authenticating with Jira .", "installed hubot and slack client .", "Hubot fails to reach the server .", "This sounds like perfect use-case for Hubot .", "Or will slack only allow one hubot to connect", "But in order to chat with the bot I need to add hubot with all the commands .", "okay it s possible with hubot-env .", "Try hubot -a slack That works for me .", "Hi I wrote hubot-cron .", "I installed hubot heroku and hipchat .", "i cannot use jquery as this coffee script is a hubot .", "On the rocketbot github page https : github.com RocketChat hubot-rocketchat it states .. . .. . Please DO NOT USE v1.x.x of the adapter .", "@LeonidBeschastny hmm I was basing my script on the one for youtube which works for me : github.com github hubot blob master src scripts https : github.com github hubot blob master src scripts youtube.coffee L16", "I used status.coffee script available on GitHub in my working hubot but I m not getting the hubot response even if user is away .", "I ve never installed hubot-slack .", "How do I setup basic user-permissions so users can t run commands like Hubot die or Hubot show storage", "I can see that hubot die is defined in the ping.coffee script .", "Can anyone shed some light on why npm can t install hubot", "Have you looked at npmjs.com package hubot-conversation https : www.npmjs.com package hubot-conversation", "Looks like your instance of Hubot is persisting the Hubot brain data store in Redis .", "I am developing a facebook-messenger bot using hubot hubot-fb adapter .", "I m using Hubot on flowdock and I m trying to make Hubot post automatically the respond of a user command .", "I m a novice in need of some Hubot CoffeeScript help .", "Installed hubot but it s not-responding to Pinging on OSX .", "Those are standard warnings and shouldn t affect hubot .", "By the way if you re building something with Hubot you may want to check out this book https : leanpub.com automation-and-monitoring-with-hubot shameless plug .", "Sample error : .. . .. . bin hubot botname Sun May 22 2016 00 : 24 : 06 GMT-0400 EDT WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 https : github.com github hubot-scripts issues 1113 in favor of packages for each script .", "For this Puppet profile manifest config that defines a HuBot server : .. . .. . Notice the dependency on a private GitHub repo my-org my-private-github-repo .. . .. . When Puppet Agent is run on the HuBot server an access denied error is thrown .", "Installed hubot on Ubuntu machine when run bin hubot i get the below error .", "What I want hubot to run is : .. . .. . but changing the folder from the hubot script doesn t work .", "Hubot should ping the deployment service when you send the deploy command .", "This is the module I was planning on using : .. . .. . https : github.com lmarkus hubot-conversation", "I have setup Hubot for our company .", "I have an instance of hubot running on heroku .", "After I removed it I was able to run hubot .", "Unfortunately it looks like this is not currently supported by the hubot .", "Hubot responds to events but is a long running process .", "Try installing from the release package https : github.com downloads github hubot hubot-2.2.0.tar.gz Instead of installing from git-clone that solved some random issues for me .", ".. . Please continue to use Hubot Adapter v0.1.x until further notice .", "Now when I try to run bin hubot I get ERROR Error loading scripts from npm package - TypeError : object is not a function at Robot.loadExternalScripts C : hubot node-modules hubot src robot.coffee : 399 : 11 at C : hubot node-modules hubot bin hubot : 128 : 26 at fs.js : 334 : 14 at FSReqWrap.oncomplete fs.js : 95 : 15", "We all want a raspberry running hubot with special abilities .", "My slack setup currently has 2 separate hubot integration running .", "As stated in the original answer you have to be a Hubot admin in order to assign roles .", "While trying to deploy hubot npm keeps complaining about unmet dependencies .", "Try running npm-install then npm-install -g hubot coffee-script .", "As references there is a experimental package project hubot-express shows that hubot as a express app-startup .", "I would like to wrap my Hubot in a windows service to deploy it .", "See the docs here : https : github.com slackhq hubot-slack configuration", "@smarx which hubot-slack version you are using", "Right now my Hubot robot is techinically working .", "How about putting nginx in front of your Hubot", "I followed the installation instructions provided here : https : github.com slackhq hubot-slack .. . .. . I can create and run a new hubot instance on my local computer calling bin hubot in a Powershell prompt but when I install the hubot-slack package and add hubot-slack to the external-scripts file I get an error .", "You can check your current robot name in bin hubot .. . .. . Looks like exec node-modules .bin hubot --name botname @ .. . .. . With above setting the bot name will be botname", "I can see there is a script called hubot-auth but that seems to be for implementing it in other scripts and not controlling existing commands .", "Thanks you all I find another option to go for hubot on azure detailed here- github.com scrumdod hubot-vsonline blob master docs https : github.com scrumdod hubot-vsonline blob master docs HOWTO-HubotForVisualStudioOnlineTeamRoomsOnAzureWebSite.md", "With the help of https : leanpub.com automation-and-monitoring-with-hubot read leanpub-auto-periodic-task-execution I ve managed to make Hubot talk at a specific time creating a cron.coffee script so no issues with that .", "https : www.npmjs.com package hubot-env .. . .. . The following command will load the file from a relative-path : .. . .. . hubot env load --filename filename .", "Example : .. . .. . The following messages would cause the robot.respond callback to be called : .. . .. . @Hubot ping .. . Hubot ping .. . .. . It would NOT be called for the following since the robot s name is not used .", "May I know how can Hubot be deployed on AWS Lambda", "should be yo hubot --defaults instead of --default", "Here is my file : .. . .. . I have started the container with Hubot but it does not seem to respond to the command within Rocket Chat .", "So theoretically you can integrate hubot with your express webapp thru the router dispatch different urls between express app and hubot .", "I was hoping to find away to get hubot to here a variable .", "Your hubot-scripts.json is empty so you just need to remove it .", "how can I enforce the hubot to perform only https requests", "How can I make hubot execute a command from a specific path", "trying to install Hubot with slack adapter as written here : https : github.com slackhq hubot-slack .. . .. . in particular running this : .. . .. . npm-install hubot-slack --save .. . .. . but I m getting this error when trying to load the bot : .. . .. . hubot -a slack .. . .. . ERROR Cannot load adapter slack - Error : Cannot find module slack-client .. . .. . tried to perform npm-install slack-client but then i get another error : see another question in Hubot with slack adapter - cannot perform rtm.start https : stackoverflow.com questions 37253381 hubot-with-slack-adapter-cannot-perform-rtm-start", "Background .. . .. . My team and I have been working on an automation project using hubot and vmware pyvmomi .", "I ve since switched to slack which can do almost everything hubot can do .", "With Hubot I am trying to access specific issues through JIRA REST api .", "I am writing a script for my company s Rocket Chat server using hubot .", "A current chat looks something like this : .. . .. . however I want my bot to be accessible without using the hubot with all the messenges ." ] }
{ "confidence": [ 87.76751708984375, 86.36811828613281, 84.45800018310547, 83.0213851928711, 81.98116302490234, 81.6463851928711, 81.32850646972656, 81.23701477050781, 79.9854736328125, 79.73393249511719, 78.98027801513672, 78.62340545654297, 77.71927642822266, 77.06043243408203, 76.5839614868164, 76.49996185302734, 76.15735626220703, 76.06084442138672, 75.47571563720703, 75.46674346923828 ], "content": [ "Question : null .. . Answer : Looking at the Hubot documentation https : github.com github hubot blob master docs scripting.md there seems to be no way to send a formatted message to the Hipchat client from a Hubot script . Does anyone know of a way to better present lines of text sent from Hubot Version 1 https : www.hipchat.com docs api method rooms message of the Hipchat API albeit deprecated suggests that a message format parameter can be used to specify an HTML message . Many thanks .", "Question : How do I setup basic user-permissions so users can t run commands like Hubot die or Hubot show storage I can see there is a script called hubot-auth but that seems to be for implementing it in other scripts and not controlling existing commands . Comment : Can the person who downvoted please explain why they ve downvoted and requested it be closed .. . Answer : There is a small chapter about it in Automation and Monitoring with Hubot https : leanpub.com automation-and-monitoring-with-hubot book shameless plug . Excerpt : .. . .. . Assigning Roles .. . .. . Only Admin users can assign roles . You don t have to create a role before assigning . All you have to do is tell Hubot who is who using hubot user has role role . And you no longer have to use those cryptic IDs anymore : .. . .. . Check the assigned roles using hubot what roles does user have : .. . .. . To remove the role from somebody use hubot user does not have role role : .. . .. . You can assign multiple roles to multiple users . Applying Roles .. . .. . Now time to break the bad news . While Hubot Auth is pretty flexible you will have to edit your scripts to apply those roles . Luckily there is not much to edit . There is a simple function that checks if user has a role - robot.Auth.hasRole msg.envelope.user role . This is how you use it in a script :", "Question : I have a pretty standard express app built using the express-generator . Now I would like to automate some of the things in the app with hubot and I have managed to successfully perform testing and run hubot with slack adapter . However I would like to have the bot be a part of a regular app . How can I change the structure of the app I have a pretty standard import of routes.js which has all of the routes for the app to allow for the two to run together This is running on azure as a WebApp and I have set up a continuous-integration with GitHub so I pretty much just push code and it gets deployed I don t run anything manually on the actual server . I would be able to run the hubot and server it on a different subdomain or path on the app if it was a regular VPS but since the azure is taking care of those things I would need the hubot somehow baked-in the actual express app . .. . Answer : As I know Hubot has a build-in express web framework that can serve HTTP requests . So theoretically you can integrate hubot with your express webapp thru the router dispatch different urls between express app and hubot . As references there is a experimental package project hubot-express shows that hubot as a express app-startup . you can try to refer to the code https : github.com hubot-scripts hubot-express blob master src hubot-express.coffee to implement the integration . The key code : robot.express app express .. . .. . And the article Automation and Monitoring with Hubot show the code that how to serving http requests please move to https : leanpub.com automation-and-monitoring-with-hubot read leanpub-auto-serving-http-requests to review it . The key code : robot.router.post hubot notify : room function req res .. .", "Question : For example if you had a question and script like .. . .. . 1 . Are you over 13+ .. . .. . a . if yes go to 2 .. . .. . b . if no end .. . .. . 2 . Please pick a chat room .. . .. . Looking at hubot it looks like it looks for specific questions but doesn t necessarily store state or allow the progression of a longer interview by remembering previous answers and doing if this then that . Does hubot support this If not is there another open-source alternative that is a better fit for the use-case Would I just store user information in the hubot brain for each user s answer building up a user s state over time I suppose with each user answer we can look up the user s state and their current progression in the hubot brain and then handle it accordingly . However if it s more of a script rather than looking for any old random question via regex matching does this take away from most of the benefit of using hubot in the first place .. . Answer : This sounds like perfect use-case for Hubot . It s basically a node chat bot with a large number of pre-built integrations . It s meant to be extensible so adding custom things like this works fine as long as you re comfortable with the service running in Node . For simplicity I recommend persisting the Hubot brain and not talking to a different db backend if you don t have to . There are several options for automatically persisting hubot s brain hubot-redis-brain 1 is often used . 1 : https : github.com hubot-scripts hubot-redis-brain", "Question : I installed hubot heroku and hipchat . I deployed Hubot to Heroku and I tested on hipchat I typed some command-line example : @hubot help @hubot image me hubot ... . and It worked fine . But in my project I need use hipchat to deploy my project to heroku . Example when I type on hipchat is : @hubot deploy app then my project will be deployed to heroku instead of tying : git-push heroku master on Terminal . Please help me I really thank you so much .. . Answer : This is a very broad questions . There is no single answer . For sure you need a deployment service that performs the deployment . Hubot should ping the deployment service when you send the deploy command . The deployment service should have access to your repository and Heroku account and perform the git-push command for the deploy . The deployment service may have a local clone of your project or download it from some centralized location E.g . GitHub and perform a push to Heroku . The deployment service can be a server you control a third party service such as this one http : dploy.io the server where Hubot is running not ideal . Heroku also offers Dropbox sync https : devcenter.heroku.com articles dropbox-sync and is experimenting deploy from GitHub . In this case the deploy doesn t require a deployment service or to be more correct the deployment service is in fact Heroku . Hubot would simply trigger a new synchronization at Heroku as long as Heroku is connected to either GitHub or Dropbox depending on where the app is stored .", "Question : I am installing hubot on Linux and followed the instructions https : github.com github hubot wiki Deploying-Hubot-onto-UNIX receiving no errors . However when I try to actually run my hubot I encounter problems . First I tried daemonizing hubot according the the instructions at the very end of the linked tutorial . start hubot returned the error start : Unknown job : hubot . So I backed up and tried opt hubot bin hubot --name Ro Bot --adapter campfire and got this series of errors : .. . .. . Attempting to install from release package instead of cloning in git results in different errors earlier in the process : .. . .. . I tried npm cache clean but it didn t help . I don t know what to make of it and I m not very familiar with Hubot or any of the frameworks it runs on so any information for how to start troubleshooting this would be helpful . .. . Answer : Try installing from the release package https : github.com downloads github hubot hubot-2.2.0.tar.gz Instead of installing from git-clone that solved some random issues for me . Comment : I tried this got different errors . Editing op to include info . Comment : after your wget you need to unpack the .tgz gunzip tar -xvf it will unpack into a hubot directory then npm-install in that new directory . HTH", "Question : null .. . Answer : Installed hubot but it s not-responding to Pinging on OSX . Sample error : .. . .. . bin hubot botname Sun May 22 2016 00 : 24 : 06 GMT-0400 EDT WARNING Loading scripts from hubot-scripts.json is deprecated and will be removed in 3.0 https : github.com github hubot-scripts issues 1113 in favor of packages for each script . Your hubot-scripts.json is empty so you just need to remove it . Sun May 22 2016 00 : 24 : 06 GMT-0400 EDT ERROR hubot-heroku-alive included but missing HUBOT HEROKU KEEPALIVE URL . heroku config : set HUBOT HEROKU KEEPALIVE URL heroku apps : info -s grep web-url cut -d -f2 Sun May 22 2016 00 : 24 : 06 GMT-0400 EDT INFO hubot-redis-brain : Using default redis on localhost : 6379 Comment : Hmmm . Those are standard warnings and shouldn t affect hubot . How are you pinging your hubot Comment : The console should start immediately after these warnings .", "Question : I have looked at the information on Hubot on their own actual website I have tried everything I have been on this problem for nearly just over a day and a half worth of hours . I am installing Hubot on a Virtual Machine using Linux I would like to get it working alongside Campfire . So far I have set up the Hubot set my own personal details for the bot it is called Tron . I have then went to export the TOKEN .. . .. . I exported the ROOMS as .. . .. . export HUBOT CAMPFIRE ROOMS 123456 .. . .. . I then exported the account : export HUBOT CAMPFIRE ACCOUNT place121 .. . .. . It has given me this error : INFO hubot-redist-brain : using default redis on localhost : 6379 .. . .. . How can I fix this I am quite frankly fed up this software clearly isn t fully operational either due to the tutorial information or the software itself . I was up late trying to get it working . The tutorial information on there is so vague the software should be pulled down and someone should make a clear tutorial on how to properly install it none of these vague commands . .. . Answer : Looks like your instance of Hubot is persisting the Hubot brain data store in Redis . This requires a running Redis instance and an environment variable providing the connection-string to Redis with authentication details . The hubot-redis-brain GitHub repo https : github.com hubot-scripts hubot-redis-brain details the required setup . Comment : I managed to get it working by removing Redis and Heroku dependencies from one of the script files Comment : That works too just note that your Hubot brain is now volatile so it will start like new every run . Comment : I noticed that I then installed Redis after I close the terminal it keeps erasing any campfire stuff so I just pasted the token room and account in the bin hubot hubot.sh file and it works Comment : Is there a way to export the commands to Redis Comment : I m not sure what you mean by commands could you please clarify a bit", "Question : I am working with a group of programmers . We all want a raspberry running hubot with special abilities . Slack only issues ONE api-key . If we have multiple raspberry pies connected would we use the same api-key Or will slack only allow one hubot to connect .. . Answer : I believe you can use : https : my.slack.com services new hubot .. . .. . This will create another hubot integration within your slack . Therefore you can have multiple bots with different nicknames etc . running in whatever channels . ie . My slack setup currently has 2 separate hubot integration running .", "Question : I am testing Rocket Chat for the first time and I am following this guide to Deploy with Docker https : github.com RocketChat Rocket.Chat wiki Deploy-with-Docker .. . .. . I have started Rocket Chat successfully and I am now trying to enable the Hubot . I have created a user called bot and I have modified the file docker-compose.yml with the updated login information . Here is my file : .. . .. . I have started the container with Hubot but it does not seem to respond to the command within Rocket Chat . I am not sure what is the expected output but it seems that he can t connect to localhost : 3000 which is the URL I use to open Rocket Chat . Do you have any suggestion Thanks .. . Answer : Unfortunately your ouput is truncated . In my case the error was not a connection problem but the fact that the dockerfile is pulling the rocketchat hubot-rocketchat image which is referring to a 1.x version . On the rocketbot github page https : github.com RocketChat hubot-rocketchat it states .. . .. . Please DO NOT USE v1.x.x of the adapter . It is experimental and in anticipation of a performance oriented sweeping change within the core which has not happened yet . .. . Please continue to use Hubot Adapter v0.1.x until further notice . So I changed the line to .. . .. . and sudddenly rocketchat bot is talking . Comment : This is an awesome fix for a different error I ll update the docs for using docker-compose .", "Question : With Hubot I am trying to access specific issues through JIRA REST api . Hubot fails to reach the server . Proxies are all set properly . The REST api works as expected through the browser once logged in . Thus I need to specify authentication . What I tried so far plain basic-authentication : .. . .. . Hubot keeps telling me that the server was not found . How do I properly pass authentication through http .. . Answer : This is a snippet from hubot-confluence plugin https : github.com amwelch-oss hubot-confluence It should be the same for authenticating with Jira . This is basic access authentication . You can look up the btoa method but what is does is convert binary to base64 encoded ascii . As far as I know there are already lots of scripts for connecting to Jira with hubot . And you have it correct for making the robot.http call", "Question : null .. . Answer : For this Puppet profile manifest config that defines a HuBot server : .. . .. . Notice the dependency on a private GitHub repo my-org my-private-github-repo .. . .. . When Puppet Agent is run on the HuBot server an access denied error is thrown . It s not clear to me what entity is attempting to pull-down from GitHub but could be Puppet Server HuBot Server or even NPM I suppose . How to include GitHub credentials in the config so that private GitHub repos may be included as HuBot dependencies", "Question : I am developing a facebook-messenger bot using hubot hubot-fb adapter . All the basic setup is done is working perfectly . But in order to chat with the bot I need to add hubot with all the commands . In case of facebook chats it doesn t make much sense . A current chat looks something like this : .. . .. . however I want my bot to be accessible without using the hubot with all the messenges . How do I achieve that TIA .. . Answer : You could use the hear method instead of the respond method . Hubot has two methods for how it interacts with with messages : .. . .. . hear - This is called whenever text in a message room matches a given regex . The robot s name is not used in this case . Example : .. . .. . The following messages would cause the robot.hear callback to be called : .. . .. . ping .. . how do I ping the server .. . .. . Note : the regex in this case is very simplistic and could be modified so the callback is not called for the how do I ping the server case . respond - this is only called when text matches a given regex AND is immediately preceded by the robot s name or alias . Example : .. . .. . The following messages would cause the robot.respond callback to be called : .. . .. . @Hubot ping .. . Hubot ping .. . .. . It would NOT be called for the following since the robot s name is not used . ping .. . how do I ping the server .. . .. . See the Hubot scripting documentation https : hubot.github.com docs scripting hearing-and-responding for more details . Comment : Hi I just found an easier way to do that . While starting the bot in command-line procfile in case of heroku you can provide a name switch . Just pass an empty string in that and it works perfectly . hubot -n Thanks for the answer : Comment : Awesome Glad you got it to work :", "Question : Background .. . .. . My team and I have been working on an automation project using hubot and vmware pyvmomi . One of the core functions I have been trying to fix is the create vm function . As a team we determined that we want hubot to ask the user a series of questions then send a packet off to the REST API https : github.com EMC-Underground vsphere-python-restapi we wrote . The branch of hubot script I m working on is found here https : github.com EMC-Underground vsphere-commands tree refactor-create-vm-function . The specific issue I m working on is the create function is generating more responses as more vms are being created and then sending multiple packets . I ve logged info about the problem in the issue tab of the repo . See the issue related to sending multiple packets . Looking through the issues logged with hubot s source code I ve found that other folks are also curious if hubot can be programmed to have a dialog issue 950 . So I decided to refactor the create function to allow me to contribute the dialog code back once I m finished . The problem .. . .. . After the re-write see the branch labeled refactor-create-vm-function I am running into a duplicate call problem . I ve posted a screenshot https : github.com EMC-Underground vsphere-commands issues 1 of the output when hubot responds to a create vm message . What I think is happening is that the function is being executed once when it s being passed and then again when it is actually responding . Not sure how to prevent the first call from happening or if I even can prevent it . If it can t be prevented what are suggestions about writing a hubot dialog I m open to both javascript and coffeescript suggestions since hubot scripts can be either . Pretty new to javascript and coffeescript for that matter so any help would be greatly appreciated Comment : Have you looked at npmjs.com package hubot-conversation https : www.npmjs.com package hubot-conversation Comment : Looking into that Thanks for the link . .. . Answer : The issue here isn t that the method is getting called repeatedly but that it attempts to recurse without having a definition to itself . Adding a reference to the other function scope where you re making the recursion call should do the trick . e.g . this.askQuestion .. . instead of askQuestion .. .", "Question : Background .. . .. . My team and I have been working on an automation project using hubot and vmware pyvmomi . One of the core functions I have been trying to fix is the create vm function . As a team we determined that we want hubot to ask the user a series of questions then send a packet off to the REST API https : github.com EMC-Underground vsphere-python-restapi we wrote . The branch of hubot script I m working on is found here https : github.com EMC-Underground vsphere-commands tree refactor-create-vm-function . The specific issue I m working on is the create function is generating more responses as more vms are being created and then sending multiple packets . I ve logged info about the problem in the issue tab of the repo . See the issue related to sending multiple packets . Looking through the issues logged with hubot s source code I ve found that other folks are also curious if hubot can be programmed to have a dialog issue 950 . So I decided to refactor the create function to allow me to contribute the dialog code back once I m finished . The problem .. . .. . After the re-write see the branch labeled refactor-create-vm-function I am running into a duplicate call problem . I ve posted a screenshot https : github.com EMC-Underground vsphere-commands issues 1 of the output when hubot responds to a create vm message . What I think is happening is that the function is being executed once when it s being passed and then again when it is actually responding . Not sure how to prevent the first call from happening or if I even can prevent it . If it can t be prevented what are suggestions about writing a hubot dialog I m open to both javascript and coffeescript suggestions since hubot scripts can be either . Pretty new to javascript and coffeescript for that matter so any help would be greatly appreciated Comment : Have you looked at npmjs.com package hubot-conversation https : www.npmjs.com package hubot-conversation Comment : Looking into that Thanks for the link . .. . Answer : After a little more debugging code thanks @heckj we discovered that the issue was caused by ill-formatted regex being passed to .respond . Since it wasn t formatted correctly it was always passing true and therefore immediately executing its callback . Hence why the function was being called before and after input . I also learned that regex are first-class citizens in javascript so you don t need to have single quotes surrounding it . With that said here is the regex before and after : .. . .. . Before .. . .. . regex : memory s mem s d 1 4 . .. . .. . After .. . .. . regex : memory s mem s d 1 4 . i", "Question : I m using Hubot on flowdock and I m trying to make Hubot post automatically the respond of a user command . With the help of https : leanpub.com automation-and-monitoring-with-hubot read leanpub-auto-periodic-task-execution I ve managed to make Hubot talk at a specific time creating a cron.coffee script so no issues with that . The thing is that I have another script trello.coffee that makes Hubot respond to the command show cards and I want the result-of this command to be posted in a specific time without the need of me telling Hubot to do this . How exactly can I do this without the need to write another script ie . trello.auto.coffee and the whole robot.emit - robot.on procedure .. . Answer : What about using the http listener This page https : hubot.github.com docs scripting has a section for HTTP Listener and has this code example : .. . .. . Would that work", "Question : I am trying to add a new hubot integration to our Slack channels . I am setting this up on a Windows machine and am deploying to a Heroku server . I followed the installation instructions provided here : https : github.com slackhq hubot-slack .. . .. . I can create and run a new hubot instance on my local computer calling bin hubot in a Powershell prompt but when I install the hubot-slack package and add hubot-slack to the external-scripts file I get an error . If I remove the value from the external-scripts file everything is fine . If I include the adapter flag for Slack I get a different error . I tried setting HUBOT SLACK TOKEN as a System Environment variable . Every example I can find is including the HUBOT SLACK TOKEN in the call to hubot but it doesn t work for me I must be missing something . To rule out something locally I deployed the application to Heroku but I got a different error . package.json : .. . .. . external-scripts.json .. . Answer : What intrigues me is this particular line : .. . .. . Did you add the other scripts from the repo aswell There also might be something wrong with the node npm coffee installation version on your windows machine . Make sure that those are installed and in a compatible version . Another thread http : stackoverflow.com a 33858433 1309035 had an issue with incompatible versions . Please tell us about the versions you use and try downgrading node to 0.12.x . The way you use the token is fine . Comment : I uninstalled node.js and reinstalled node v0.12.7 npm v2.11.3 coffee v1.10.0 . Now when I try to run bin hubot I get ERROR Error loading scripts from npm package - TypeError : object is not a function at Robot.loadExternalScripts C : hubot node-modules hubot src robot.coffee : 399 : 11 at C : hubot node-modules hubot bin hubot : 128 : 26 at fs.js : 334 : 14 at FSReqWrap.oncomplete fs.js : 95 : 15 Comment : It turns out the issue was caused because I included hubot-slack in my external-scripts.json file . After I removed it I was able to run hubot . github.com slackhq hubot-slack issues 197 https : github.com slackhq hubot-slack issues 197 Comment : Please put that up as the answer if it solved your question . And maybe explain a bit why", "Question : Hubot works when I have an adapter but when I try to do local development using Shell none of the scripts or packages are loaded . This works : .. . .. . Strangely when I try to do local development and testing with : .. . .. . None of my scripts or modules are showing when I type help in shell . But when I do this in slack I see all the available scripts and modules : .. . .. . Update 1 : I turned on debug level logging and I can see the scripts are being parsed but the scripts aren t available to me when executing their commands : .. . .. . Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading adapter shell eve Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading scripts from root hubot scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts example.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts prod deploy.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts remindme.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts team tools.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts update.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading scripts from root hubot src scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading hubot-scripts from root hubot node-modules hubot-scripts src scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading external-scripts from npm packages Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-diagnostics src diagnostics.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC INFO hubot-redis-brain : Using default redis on localhost : 6379 Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-redis-brain src redis-brain.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-auth src auth.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-help src help.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-cron src scripts cron.coffee .. . .. . Update 2 : I realized part of my problem was that in the bin hubot file explicitly has my bot name as eve while I have been trying it with evedev my development hubot name . However I m still wondering why the help command does not show all the available commands but when I m in Slack it does . .. . Answer : You can check your current robot name in bin hubot .. . .. . Looks like exec node-modules .bin hubot --name botname @ .. . .. . With above setting the bot name will be botname", "Question : Hubot works when I have an adapter but when I try to do local development using Shell none of the scripts or packages are loaded . This works : .. . .. . Strangely when I try to do local development and testing with : .. . .. . None of my scripts or modules are showing when I type help in shell . But when I do this in slack I see all the available scripts and modules : .. . .. . Update 1 : I turned on debug level logging and I can see the scripts are being parsed but the scripts aren t available to me when executing their commands : .. . .. . Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading adapter shell eve Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading scripts from root hubot scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts example.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts prod deploy.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts remindme.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts team tools.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Parsing help for root hubot scripts update.coffee Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading scripts from root hubot src scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading hubot-scripts from root hubot node-modules hubot-scripts src scripts Thu Apr 07 2016 00 : 46 : 44 GMT+0000 UTC DEBUG Loading external-scripts from npm packages Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-diagnostics src diagnostics.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC INFO hubot-redis-brain : Using default redis on localhost : 6379 Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-redis-brain src redis-brain.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-auth src auth.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-help src help.coffee Thu Apr 07 2016 00 : 46 : 45 GMT+0000 UTC DEBUG Parsing help for root hubot node-modules hubot-cron src scripts cron.coffee .. . .. . Update 2 : I realized part of my problem was that in the bin hubot file explicitly has my bot name as eve while I have been trying it with evedev my development hubot name . However I m still wondering why the help command does not show all the available commands but when I m in Slack it does . .. . Answer : As answer to your Update 2 you need to put the bot s name before you type help like this : .. . .. . vs", "Question : I am installing hubot on Linux and followed the instructions https : github.com github hubot wiki Deploying-Hubot-onto-UNIX receiving no errors . However when I try to actually run my hubot I encounter problems . First I tried daemonizing hubot according the the instructions at the very end of the linked tutorial . start hubot returned the error start : Unknown job : hubot . So I backed up and tried opt hubot bin hubot --name Ro Bot --adapter campfire and got this series of errors : .. . .. . Attempting to install from release package instead of cloning in git results in different errors earlier in the process : .. . .. . I tried npm cache clean but it didn t help . I don t know what to make of it and I m not very familiar with Hubot or any of the frameworks it runs on so any information for how to start troubleshooting this would be helpful . .. . Answer : I suspect you didn t follow the Installing dependencies section of the Deploying Hubot onto UNIX link you referenced above . Specifically it appears that a regular shell such as bash is trying to interpret the script rather than the coffee-script interpreter . If you enter .. . .. . at your shell prompt and do not get the .. . .. . prompt revisit the first part of the install instructions . Comment : I did follow the Installing dependencies section and I do get coffee as my prompt when I type coffee at my shell prompt . Should I be running my Hubot commands from the coffee prompt" ] }
[ "yes-answer-long", "yes-answer-short" ]
hubot
UNK_RELATION
guzzle@web@67
guzzle -- guzzle is an http client framework for building restful @placeholder service clients in php .
{ "confidence": [ 47.79086685180664, 45.78117370605469, 45.68113708496094, 44.24109649658203, 43.98673629760742, 42.714202880859375, 42.61234664916992, 42.33736038208008, 42.232173919677734, 42.227352142333984, 41.910640716552734, 41.37919235229492, 41.064212799072266, 40.99254608154297, 40.85934829711914, 40.692100524902344, 40.61700439453125, 40.603519439697266, 40.54069519042969, 40.464393615722656, 40.21173858642578, 40.05195236206055, 39.45247268676758, 39.45247268676758, 39.38549041748047, 39.38549041748047, 39.38549041748047, 39.38549041748047, 39.38549041748047, 39.378990173339844, 39.250858306884766, 39.132972717285156, 39.132972717285156, 38.42860412597656, 38.42860412597656, 38.36346435546875, 38.275672912597656, 38.16494369506836, 38.02287292480469, 38.02287292480469, 37.97892761230469, 37.89878845214844, 37.89878845214844, 37.84541702270508, 37.84541702270508, 37.84541702270508, 37.227203369140625, 37.227203369140625, 37.227203369140625, 37.20625305175781, 37.20625305175781, 37.004634857177734, 37.00117874145508, 36.88853073120117, 36.766136169433594, 36.06757354736328, 36.029449462890625, 35.969886779785156, 35.969886779785156, 35.86683654785156, 35.776649475097656, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.687129974365234, 35.62733459472656, 35.62733459472656, 35.59919738769531, 35.515289306640625, 35.13603210449219, 34.91946029663086, 34.710609436035156, 34.665435791015625, 34.665435791015625, 34.665435791015625, 34.665435791015625, 34.642311096191406, 34.642311096191406, 34.642311096191406, 34.642311096191406, 34.486270904541016, 34.327396392822266, 34.327396392822266, 34.303680419921875, 34.303680419921875, 34.303680419921875, 34.303680419921875 ], "content": [ "I use Guzzle Http Client .", "Due to PSR-7 : github.com guzzle guzzle issues 1106 https : github.com guzzle guzzle issues 1106", "In my PHP Guzzle http : guzzlephp.org client code I have something like .. . .. . but instead I want to have something like : .. . .. . Is it possible in Guzzle", "github.com guzzle guzzle issues 1386 https : github.com guzzle guzzle issues 1386", "Guzzle installed is guzzlehttp guzzle : v6.1.1 .", "Throws Guzzle Http Exception RequestException .. . .. . Documentation for the latest version is here : Guzzle Client Timeout http : docs.guzzlephp.org en latest clients.html timeout", "Guzzle which Goutte uses internally is an HTTP client .", "Make your factory a service and inject your guzzle client into it .", "Here s the updated solution to this problem for Guzzle version Guzzle 4 .", "Reference : https : github.com guzzle guzzle pull 1203", "I am trying to use Guzzle pool in PHP .", "Goutte uses BrowserKit https : github.com symfony browser-kit and Guzzle https : github.com guzzle guzzle .", "you need the docs for 5 github.com guzzle guzzle blob 5.3 docs quickstart.rst https : github.com guzzle guzzle blob 5.3 docs quickstart.rst", "It s Guzzle 6.2.0 .", "For example create a components which loads the Guzzle Client in a controller or loads the Guzzle Client inside the component collection .", "When this happens Guzzle freaks out and throws a guzzle exception .", "I m trying to upload a file to a RESTFUL Api through Guzzle in Laravel .", "Why is it looking for the Guzzle Client in my Controllers path", "EDIT : This was for Guzzle 3.X Now this is how you can do it using Guzzle v 4.X .. . .. . Or using Guzzle stream : .. . .. . This looks great .", "It seems that Guzzle already has https : github.com guzzle guzzle blob master src Guzzle Http Curl CurlMulti.php functionality for MultiCurl built-in .", "Client accepts just 1 parameter in the constructor https : github.com guzzle guzzle blob master src Client.php L62", "This is part of the definition of BaseOperation with one mandatory parameter foo : .. . .. . Inside ChangeMethodPlugin plugin I need to modify the value of foo at runtime : .. . .. . I can t find any method inside Parameter https : github.com guzzle guzzle blob master src Guzzle Service Description Parameter.php or AbstractCommand https : github.com guzzle guzzle blob master src Guzzle Service Command AbstractCommand.php .", "So is this a Guzzle bug", "At the core this library uses Guzzle .", "what version of guzzle are you using", "The error is happening on cURL level not Guzzle .", "It is happening in cURL code not Guzzle one .", "But the example on the Guzzle docs looks confusing .", "Thanks this worked with Guzzle 3.x.x", "Isn t there any way to register the Guzzle Client as a component", "GitHub Issue 628 for Guzzle https : github.com guzzle guzzle issues 628 seems to be exactly what I m seeing but that issue says it was fixed in 4.0.2 I m on Guzzle 5.3 : .. . .. . From my composer.lock on the server : .. . .. . Any thoughts", "For official Guzzle https : github.com guzzle guzzle you may just do following .", "I am trying to use guzzle 6.x https : github.com guzzle guzzle on a CakePHP 2.x application .", "it looks like it was fixed https : github.com guzzle guzzle issues 1121 issuecomment-111765449 in psr7", "I m using Guzzle but the question is how do I use the Cookies Plugin with Guzzle", "Since you added .. . .. . You have to use Guzzle Client like this : .. . .. . It tries to look for Guzzle Client in the Controllers path probably because your controller namespace is App Http Controllers and you are trying to use Guzzle client like new GuzzleHttp Client", "Now I m trying to build this into a PHP application with the use of Guzzle .", "Guzzle 4 .. . .. . PHP 5.4.x+ required .. . .. . Create a client : .. . .. . Get results : .. . .. . Guzzle 3 .. . .. . Install it : .. . .. . Create a client setting the base URL : .. . .. . Get your response : .. . .. . And display it : .. . .. . If you still don t get it running check the file vendor composer autoload psr4.php Guzzle must appear in it .", "Please see my code below : .. . .. . And this- client is an instance of the Guzzle class .", "In line one when initializing the guzzle client he had not passed in a url .", "Guzzle 6+ supports PRS-7 https : github.com guzzle guzzle blob master docs psr7.rst which defines a response body as a stream .", "We re making requests using Guzzle http : guzzlephp.org .", "So for example Guzzle Http Exception ClientErrorResponseException", "sorry very new in laravel and guzzle .", "According to the maintainer of Guzzle this cannot work .", "Is upgrading to Guzzle 6 an option for you", "We are uploading 1500+ files using a guzzle pool .", "Is there better proper solution when using Guzzle 4", "res- json only works in Guzzle 5.3 .", "These exceptions are not defined in guzzle officially .", "For connection I use guzzle .", "Using the following example from guzzle-services s Github page https : github.com guzzle guzzle-services : .. . .. . How and where-in the world do I add auth parameters when using the guzzlehttp guzzle-services : 0.5 .", "With Guzzle 6+ you have to set it on the client request options array .", "I m trying to connect to the WooCommerce API using Guzzle 5 Guzzle 6 seems not has oAuth options o.O .", "Since PHP has no built-in way to call the service I looked around and decided to use Guzzle .", "I m using Guzzle 5.3 via Guzzle Services via https : github.com ticketevolution ticketevolution-php to attempt to POST to an API endpoint with a JSON body that includes a PDF encoded as base64 .", "I am using php-5.4 with Guzzle 5.3 and laravel 5.0 .", "IIRC in v4 guzzle provided a default certificate see https : github.com guzzle guzzle blob 4.2.3 src cacert.pem but removed that in version 5 and now tries to discover your default system CA bundle .", "Seems like this is a bug and I m not the only one facing this issue : .. . .. . https : github.com guzzle guzzle issues 1121 .. . https : github.com guzzle psr7 commit 962735c754f2a562a619b456a3aa4e614f0e5360 .. . .. . Commit message :", "Guzzle mainly is a CURL wrapper so whatever you do with CURL you can do with Guzzle .", "Shall I create a component and then load Guzzle Client to a public property of this component .", "The body that you are var dumping is a Guzzle stream object .", "We do however have Guzzle in common .", "I seem to be running a working version of Guzzle .", "Is there a way to disable URL encoding in Guzzle 6", "I am using Goutte with Guzzle 6 .", "Using Guzzle I am hooking into an API .", "I using Guzzle request of my boss.. . .", "I ve not used the newer Guzzle APIs to verify that though .", "I was wondering if there s a way to integrate this with guzzle", "Guzzle 6 does not make use of events .", "Now the plugin OauthSubscriber is available only for Guzzle 6 .", "I set up Guzzle on my Laravel application .", "Can I send both at all with guzzle 6.0", "Guzzle throws an exception if an error occured during the request .", "Trying to execute the following code with Guzzle 5 .", "See verify http : guzzle.readthedocs.org en latest clients.html verify in Guzzle documentation .", "Guzzle implements PSR-7 http : www.php-fig.org psr psr-7 .", "Do you really need Guzzle", "But you can check the list https : github.com guzzle guzzle blob master src MessageFormatter.php L12 which variables you can use in MessageFormatter .. . .. . Also there is a guzzle-logmiddleware https : github.com rtheunissen guzzle-log-middleware which allows you to customize formatter etc .", "I am trying to create a product in drupal-commerce using guzzle and restful webservices .", "Previously in Guzzle 5.3 : .. . .. . I could easily get a PHP array from a JSON response .", "In my application I ll never be using this as a fragment so the Guzzle client could encode it for me instead of treating as a fragment .", "Did I import the Guzzle code in the right way", "Is there a way to set the correct token using Guzzle", "I m using Guzzle 6 with Laravel 5.2 .", "I was able to install Guzzle 6 but problem remains", "The MockHandler https : github.com guzzle guzzle blob master src Handler MockHandler.php does not implement the progress request option .", "CurlFactoryTest : : testEmitsProgress https : github.com guzzle guzzle blob master tests Handler CurlFactoryTest.php L259 and .. . 2 .", "CurlFactory https : github.com guzzle guzzle blob master src Handler CurlFactory.php is the default handler for non-Windows systems .", "StreamHandler https : github.com guzzle guzzle blob master src Handler StreamHandler.php is the default handler for Windows systems .", "Guzzle Http QueryString http : api.guzzlephp.org class-Guzzle.Http.QueryString.html extends Guzzle Common Collection http : api.guzzlephp.org class-Guzzle.Common.Collection.html so you should be able to use Collection s methods : .. . .. . or", "I found out that there is guzzle-cache-middleware https : github.com Kevinrob guzzle-cache-middleware that is supposed to cache responses from the remote API .", "I can t seem to find any documentation for Guzzle 6 that refers to this only guzzle 3 Where they ve changed the logging addSubscriber call .", "How post several values for one parameter by Guzzle 6", "I m using Guzzle to open a list of url-s and get the headers .", "Guzzle will throw an exception for bad responses like 4xx and 5xx .", "This worked with Guzzle 5.3.x using the save to option did the job ." ] }
{ "confidence": [ 59.69301223754883, 52.17443084716797, 50.9917106628418, 50.776100158691406, 50.667381286621094, 50.55518341064453, 50.474334716796875, 49.98130416870117, 49.95183563232422, 49.81585693359375, 49.74259567260742, 49.436248779296875, 49.20753860473633, 48.39603042602539, 48.3580436706543, 47.3635139465332, 47.27054214477539, 47.10643005371094, 47.06373977661133, 47.02495574951172 ], "content": [ "Question : I have a working PHP app running in Bluemix that I want to extend to call a RESTful service Insights for Twitter . Since PHP has no built-in way to call the service I looked around and decided to use Guzzle . I downloaded Guzzle 6.0.2 from its Git and imported the zip into my httdocs vendor path and renamed the imported path GuzzleHttp I changed my buildpack to get PHP 5.5 and updated composer.json to the Autoload.psr4 property with : .. . .. . I redeployed my app and it still worked . Then I added the following code to my MainController.php : after some other uses : .. . .. . and then later : .. . .. . Now when I redeploy the app I get : .. . .. . I don t know why it s looking in app Http Controllers but I tried copying the Guzzle src folder - which includes Client.php - there renamed it GuzzleHttp and it still fails the same way . I m neither a PHP nor a Laravel expert . I inherited the code from an intern team so I don t quite know how all the pieces fit together . I have some questions : .. . .. . Did I really need to install Guzzle in my workspace or would it be picked up automatically from the buildpack Did I import the Guzzle code in the right way Why is it looking for the Guzzle Client in my Controllers path Is there a good PHP sample program that drives Insights for Twitter I found one in Javascript but I need to run this server-side And of course most importantly what do I need to do to get this working Answers to any or all of these questions wold be greatly appreciated Comment : if you use fully qualified-name for client class you need import like that client new GuzzleHttp Client .. . or if you import from use GuzzleHttp Client - client new Client .. . .. . Answer : Since you added .. . .. . You have to use Guzzle Client like this : .. . .. . It tries to look for Guzzle Client in the Controllers path probably because your controller namespace is App Http Controllers and you are trying to use Guzzle client like new GuzzleHttp Client Comment : Thank you very much . That worked a treat . Looks like I ve got some reading to do .", "Question : In my PHP Guzzle http : guzzlephp.org client code I have something like .. . .. . but instead I want to have something like : .. . .. . Is it possible in Guzzle From the documentation and random googling it would seem it is but I can t find exactly how . .. . Answer : You can :", "Question : This is part of the definition of BaseOperation with one mandatory parameter foo : .. . .. . Inside ChangeMethodPlugin plugin I need to modify the value of foo at runtime : .. . .. . I can t find any method inside Parameter https : github.com guzzle guzzle blob master src Guzzle Service Description Parameter.php or AbstractCommand https : github.com guzzle guzzle blob master src Guzzle Service Command AbstractCommand.php . EDIT : param name changed to foo from method to avoid confusion with HTTP verbs . .. . Answer : You can use the setHttpMethod method of the Operation owned by the command but you ll need to use the command.before prepare event instead . Comment : Sorry my bad the param name is confusing . I m not talking about the HTTP method itself but about a param named method . I m going to edit the question.. .", "Question : This is part of the definition of BaseOperation with one mandatory parameter foo : .. . .. . Inside ChangeMethodPlugin plugin I need to modify the value of foo at runtime : .. . .. . I can t find any method inside Parameter https : github.com guzzle guzzle blob master src Guzzle Service Description Parameter.php or AbstractCommand https : github.com guzzle guzzle blob master src Guzzle Service Command AbstractCommand.php . EDIT : param name changed to foo from method to avoid confusion with HTTP verbs . .. . Answer : You could do something like the following : .. . .. . command- getRequest - getQuery - set foo bar .. . .. . So long as you have injected the new foo value into the plugin you should be able to accomplish what you are looking to do .", "Question : null .. . Answer : I have a pound hash symbol in a query-string and while sending the get request with PHP Guzzle 6 it is not being encoded properly . A sample request : .. . .. . https : 10.1.10.1 vmrest users query alias 20is 20UserWithAPoundSign 2318 .. . .. . is sent as : .. . .. . https : 10.1.10.1 vmrest users query alias 20is 20UserWithAPoundSign 18 .. . .. . I see there was some work in relation to this issue : .. . .. . How to disable URL encoding in Guzzle 6 http : stackoverflow.com questions 30865150 how-to-disable-url-encoding-in-guzzle-6 .. . .. . but it doesn t look like the pound hash is accounted for . Is this a bug or something I m doing wrong Comment : what version of guzzle are you using it looks like it was fixed https : github.com guzzle guzzle issues 1121 issuecomment-111765449 in psr7 Comment : It s Guzzle 6.2.0 . I checked out the commit and I don t see anything specifically for the pound symbol in that update . Comment : Why should you have a in request URI Comment : I m querying an API based on user alias which contain . Realizing I was a bit short sighted since the uri fragment uses would it be possible to have a client option to toggle whether the is treated as a fragment or literal as part of a query-string I have to imagine with REST API s this would come up once in a while . In my application I ll never be using this as a fragment so the Guzzle client could encode it for me instead of treating as a fragment .", "Question : I m trying to build an endpoint that forwards the data passed to it to an API using the Slim PHP Framework and I m having trouble getting my response from a Guzzle request . This then gives me.. . .. . .. . ...instead of the response of cool I was expecting . If I just var-dump client- sendRequest request I get a 200 OK and the url is what I expect http : localhost : 8000 test access token penises . I have another request but only using client- post .. . and it works fine without giving me the stream thing back . I ve tried reading the stream using the example at the bottom http : guzzle.readthedocs.org en latest http-client response.html but it s telling me feof doesn t exist . Anyone have any idea what I m missing or doing wrong here Comment : access token penises should be able to access everywhere .. . Answer : The body that you are var dumping is a Guzzle stream object . This object can be treated like a string or read from as needed . Documentation for Guzzle Stream here http : docs.guzzlephp.org en latest psr7.html streams Comment : Yes but it shouldn t be that s not what I m trying to do . Comment : Sorry I m being daft and reading properly . All fine now . Thanks .", "Question : I m trying to use Guzzle to consume a RESTful API https : postmates.com developer docs testing . Reading the Guzzle documentation http : guzzle3.readthedocs.org http-client request.html post-requests I call methods like get and post to configure a request then send to actually run an HTTP request . However in my case it seems an HTTP request is being sent during the call to post without the fields . Here s my code .. . .. . The request that goes out though no POST params .. . .. . and the response .. . .. . So it looks like I m authenticating but not passing any post parameters . I tried using the setPostField method to set the POST fields with no luck . As I said it seems in that case an HTTP request is being sent before call setPostField in either case an HTTP request is sent before I call send . I ve tried guzzlehttp guzzle 5.2.0 and 5.0.0 . .. . Answer : Wow looks like I was looking at 2 pieces of documentation one for the newer GuzzleHttp Client http : guzzle.readthedocs.org en latest clients.html one for the older Guzzle Http Client http : guzzle3.readthedocs.org http-client request.html . The big difference with the new library is you need to call createRequest if you want to defer invocation of the HTTP request . Working code under the new library", "Question : How can I autoload Guzzle http : guzzle.readthedocs.org en latest in Laravel 4 I am encountering the following error when I try to create a new GuzzleHttp Client : .. . .. . I have the following set up in my composer.json autoload section : Comment : Where is this located Full path and how did you install it .. . Answer : You don t need to add Guzzle to your composer.json it s already autoloaded by it s own composer.json . Guzzle 4 .. . .. . PHP 5.4.x+ required .. . .. . Create a client : .. . .. . Get results : .. . .. . Guzzle 3 .. . .. . Install it : .. . .. . Create a client setting the base URL : .. . .. . Get your response : .. . .. . And display it : .. . .. . If you still don t get it running check the file vendor composer autoload psr4.php Guzzle must appear in it . If it doesn t remove your vendor folder and install it again : Comment : Thanks Antonio this works . This seems to differ from the documentation or should I learn to rtfm properly as it suggests creating a new client by calling use GuzzleHttp Client and then client new Client which is what was giving me the errors . Can you enlighten me please Comment : To clarify the docs I was reading are located here docs.guzzlephp.org en latest http : docs.guzzlephp.org en latest Comment : Oh Looks like the docs are talking about the wrong namespace somehow.. . But it could not be so wrong right I ll try to take a look at it later . Comment : Guzzle came up with the idea to rename the namespace they were using when going from version 3 using Guzzle to 4 using GuzzleHttp . They say they did it to allow using both versions concurrently which is technically correct but in the end it behaves like a completely different product now . Comment : And I am -1 this because NEVER EVER suggest installing branches like dev-master if you can by all means avoid it . Guzzle is an excellent example of a software using semantic-versioning - there is absolutely no reason to not install a numbered version like 4.0 . Additionally using a version would make it clear that you are talking about 3.x instead of 4.x .", "Question : I m using Guzzle 5.3 via Guzzle Services via https : github.com ticketevolution ticketevolution-php to attempt to POST to an API endpoint with a JSON body that includes a PDF encoded as base64 . When the body is less than 1MB it works fine . When the body is larger it seems that the body is never sent . I have tested this with and without the Expect : 100 header and it does not seem to make a difference . I have tested with Transfer-Encoding : chunked but because the API needs the entire POST body in order to authenticate using chunked does not work . We have tested with and without the load balance between the client and the appservers . From everything we can tell the body just doesn t get sent when it is larger than 1MB . Does anyone have any ideas on how to get Guzzle 5.3 to send the body even when it is larger than 1MB Below is the log output .. . Answer : Running into the same problem a bit of debugging resulted in ending up at GuzzleHttp Ring Client CurlFactory : : applyBody https : github.com guzzle RingPHP blob dbbb91d7f6c191e5e405e900e3102ac7f261bc0b src Client CurlFactory.php L231-L249 and then this fixed the problem for me : .. . .. . Setting a default configuration on the client .. . .. . Setting the configuration when issuing the request .. . .. . Rewinding the previously fetched actual content stream .. . .. . Since I m fetching content from a remote-server this article by Matt Downling http : mtdowling.com blog 2012 01 27 chunked-encoding-in-php-with-guzzle helped me in finding out that I need to rewind the actual stream before using it as a part of the multipart form-data request : Comment : I forgot to answer my own question when I solved it but the rewinding was what fixed it for me . I did not know about or try the body as string fix .", "Question : I m using Guzzle to open a list of url-s and get the headers . Some of the urls are taking too long to respond and can t be openned and i want to ignore them . It takes me up to 20+ seconds before Guzzle throws an exception and i want to change this and limit the time for connecting to 2 sec . I have this code but it still takes much longer : .. . .. . Here s an example result . As you can see it took 13 seconds . http : takestoolongexample was a real url changed it here .. . Answer : Here s the updated solution to this problem for Guzzle version Guzzle 4 . Throws Guzzle Http Exception RequestException .. . .. . Documentation for the latest version is here : Guzzle Client Timeout http : docs.guzzlephp.org en latest clients.html timeout", "Question : I m trying to connect to the WooCommerce API using Guzzle 5 Guzzle 6 seems not has oAuth options o.O . Woocommerce requires the oAuth authentication method http : woothemes.github.io woocommerce-rest-api-docs authentication to work . This is the code I m using : .. . .. . This code returns a .. . .. . woocommerce api authentication error : Invalid Signature - provided signature does not match .. . .. . Using pure curl functions using this package https : github.com Aerendir APIConnect blob master src APIConnect.php in which I ve put some functions I found here https : github.com kloon WooCommerce-REST-API-Client-Library instead it works and I get all orders and other data I want . SOME OTHER DETAILS .. . .. . To use Guzzle 5 and oAuth I use the those composer packages : .. . .. . It seems there are some things that are different in creating the signature : the one created by the library I ve used until now https : github.com kloon WooCommerce-REST-API-Client-Library works but the one created by the oAuth plugin using the method getSignature https : github.com guzzle oauth-subscriber blob master src Oauth1.php L112-L162 for Guzzle doesn t and I m not so used to use oAuth to find the error . Is there someone who can help me identify the problem .. . Answer : Now the plugin OauthSubscriber is available only for Guzzle 6 . Testing around again I ve found the bug : it is in the method signUsingHmacSha1 that anyway adds an umpersand to the string to sign and this causes the error from WooCommerce . I ve opened a issue https : github.com guzzle oauth-subscriber issues 40 on GitHub and sent a pull request https : github.com guzzle oauth-subscriber pull 41 to fix the bug . The correct way to connect to the WooCommerce API V2 using Guzzle 6 once the bug is fixed Take care of the version of the WooCommerce API you connect : the API v3 still doesn t work is this : .. . .. . As told this connection works only with the version 2 of the WooCommerce API . .. . .. . I m investigating to understand why the V3 doesn t work .", "Question : I m using Guzzle 6 with Laravel 5.2 . I m trying to access a simple internal API : .. . .. . And I get this message : .. . .. . When I see the docs https : github.com guzzle guzzle blob master docs quickstart.rst it says : .. . .. . But PHPStorm cannot resolve GuzzleHttp .. . .. . What should I do to make it work Comment : Thats the docs for Guzze 6 i guess you need the docs for 5 github.com guzzle guzzle blob 5.3 docs quickstart.rst https : github.com guzzle guzzle blob 5.3 docs quickstart.rst Comment : I was able to install Guzzle 6 but problem remains Comment : Are you able to see the class Client in the PHPStorm Maybe composer update or composer install is needed Comment : if I delete GuzzleHttp autocompletition gives me 2 choices : use GuzzleHttp Client and use Guzzle Http Client but none of them work .. . Answer : I am also using guzzle and its working for me Try like this .. . .. . And to get response try this .. . .. . OR try this if not work Comment : doesnt work for me Comment : This is indeed working and it is actually based on the version of Guzzle you are using .", "Question : I am trying to use guzzle 6.x https : github.com guzzle guzzle on a CakePHP 2.x application . What I need to do is to initialize Guzzle Client to some of my controllers but on the controllers that it will be loaded I need it to be loaded with the same configuration . Basically what I don t know is which is the best approach to implement it . I was thinking about the following : .. . .. . 1 . Shall I create a function in AppController that will create and return a Guzzle object and then save it to a protected property inside AppController Maybe a function like setUpGuzzle and call this function on the Controllers I need to load Guzzle Client . 2 . Shall I create a component and then load Guzzle Client to a public property of this component . Then I could use it like this this- HttpClient- client- post .. . 3 . Shall I create a component and write one function for each of Guzzle public function So I will have something like this this- HttpClient- post . 4 . Thing is I don t like any of the above and I was hopping maybe there could be another way to do this . For example create a components which loads the Guzzle Client in a controller or loads the Guzzle Client inside the component collection . .. . Answer : Do you really need Guzzle I agree that the old Cake2 HTTP socket is old fashioned but is there something it can t do that requires you to add yet another lib Use a trait as long as you re not stuck to an ancient php version this is a clean solution . Here is some pseudo-code that will give you the high level idea : .. . .. . If you ever need to change the config or the whole socket implement ion you just have to change it in a single place without the overhead of a component . Also this can be use in any class not just controllers . What you re looking for is more or less a simple factory like method no need for a whole controller . If you can t use a trait then you ll have to use a component or just put the above code not inside a trait nor a component but directly inside your AppController but you won t be able to use it outside the scope of the controllers that inherit that controller then . Comment : Isn t there any way to register the Guzzle Client as a component Comment : If you re so obsessed by using it as a component just apply the same code to a component or create a proxy to guzzle inside the component through the magic call method .", "Question : I m trying to connect to the WooCommerce API using Guzzle 5 Guzzle 6 seems not has oAuth options o.O . Woocommerce requires the oAuth authentication method http : woothemes.github.io woocommerce-rest-api-docs authentication to work . This is the code I m using : .. . .. . This code returns a .. . .. . woocommerce api authentication error : Invalid Signature - provided signature does not match .. . .. . Using pure curl functions using this package https : github.com Aerendir APIConnect blob master src APIConnect.php in which I ve put some functions I found here https : github.com kloon WooCommerce-REST-API-Client-Library instead it works and I get all orders and other data I want . SOME OTHER DETAILS .. . .. . To use Guzzle 5 and oAuth I use the those composer packages : .. . .. . It seems there are some things that are different in creating the signature : the one created by the library I ve used until now https : github.com kloon WooCommerce-REST-API-Client-Library works but the one created by the oAuth plugin using the method getSignature https : github.com guzzle oauth-subscriber blob master src Oauth1.php L112-L162 for Guzzle doesn t and I m not so used to use oAuth to find the error . Is there someone who can help me identify the problem .. . Answer : Updating @Aerendir answer .. . .. . In his pull request @Aerendir wrote : .. . .. . In my case I did the editing as I were trying to connect to the WooCommerce API version 2 but that version of the API didn t implement correctly the OAuth Core 1.0a spec . In fact they fixed this issue in the version 3 of the API . See Differences between V3 and older versions . .. . source : https : github.com guzzle oauth-subscriber pull 42 issuecomment-185631670 .. . .. . So to make his answer work properly we need to use wc-api v3 instead of wc-api v2 . The following code works using Guzzle 6 oauth and WooCommerce api v3 :", "Question : I am using below code to login via facebook in laravel . Referring https : scotch.io tutorials token-based-authentication-for-angularjs-and-laravel-apps for token based authentication and using https : github.com sahat satellizer for social media integration . profile returning only fb id and user name . What changes should I do to get email from facebook . Comment : I know your question is specifically asking about Guzzle however the Laravel Socialite https : github.com laravel socialite package might be worth checking out - it offers social-authentication for a lot of providers Twitter Facebook Google Github etc and there are third party providers that you can easily add . You also might want to check out Httpful http : phphttpclient.com as a replacement to Guzzle - it has better documentation . Comment : I would have to disagree with this comment . Guzzle and its documentation appears to be good enough for the likes of Google github.com google google-api-php-client https : github.com google google-api-php-client Facebook github.com facebook facebook-php-sdk-v4 https : github.com facebook facebook-php-sdk-v4 and Goutte github.com FriendsOfPHP Goutte https : github.com FriendsOfPHP Goutte .. . Answer : Use below code in your step 2 .", "Question : It is either not being sent or not being received correctly . Using curl direct from the command-line using the -d option or from PHP using CURLOPT POSTFIELDS does work . I start with a PSR-7 request : .. . .. . I add authentication header which authenticates against the API correctly : .. . .. . Then I add the request body : .. . .. . I can send the message to the API : .. . .. . The response I get back indicates that the args parameter was simply not seen by the API . I have tried moving the authentication token to the args : .. . .. . This should work and does work with curl from the command-line -d access token 123456789 but the API fails to see that parameter also when sending cia curl 6.x as above . I can see the message does contain the body : .. . .. . So what could be going wrong here Are the parameters not being sent or are they being sent in the wrong format maybe is being encoded or is perhaps the wrong content-type being used It is difficult to see what is being sent on the wire when using Guzzle since the HTTP message is formatted and sent many layer deep . Edit : Calling up a local test script https : www.daniweb.com programming web-development code 216846 get-http-request-headers-and-body instead of the remote API I get this raw message detail : .. . .. . So it looks like the body is being sent so I guess something else is missing to tell the remote API how to interpret that body . Edit : the command-line curl that does work sent to the same test script gives me two additional header fields in the request : .. . .. . I m going to guess it is the content-type header which is missing from the Guzzle request which is the source of the problem . So is this a Guzzle bug Should it not always sent a Content-Type based on the assumptions it makes that are listed in the documentation http : guzzle3.readthedocs.org http-client request.html content-type-header .. . Answer : The GuzzleHttp Client provides all necessary wrapping . Documentation available Guzzle Request Options http : guzzle.readthedocs.org en latest request-options.html form-params .. . .. . Edit : However if your requests are being used within GuzzleHttp Pool then you can simply everything into the following : Comment : So the Guzzle client will put the correct Content-Type headers in provided you give it the raw data in the right way form params is the trigger here I guess . Guzzle will not add any headers without being given them explicitly when constructing a PSR-7 request message . My aim here was to construct a PSR-7 message that could be sent through any HTTP client supporting PSR-7 messages as much for the purity of just seeing that it can be done in as portable a way as possible so using only PSR-7 methods on the helper Guzzle PSR-7 package . Comment : There should probably be a space after Bearer within the quotes . Comment : Correct the client will automatically insert the proper content-type header and the authentication header when using the auth and form params request options . It is something one must remember to do when manually building the requests for usage with other PSR7 compliant packages .", "Question : I m trying to make curl request via guzzle lib . I have no problem with my curl request : .. . .. . How can I convert this request to Guzzle approach Comment : Have you made an attempt What problems are you having SO is not a code-writing service . .. . Answer : You can reference this document to create Guzzle type request .. . .. . http : docs.guzzlephp.org en latest quickstart.html .. . .. . http : docs.guzzlephp.org en latest quickstart.html query-string-parameters", "Question : I m trying to build an endpoint that forwards the data passed to it to an API using the Slim PHP Framework and I m having trouble getting my response from a Guzzle request . This then gives me.. . .. . .. . ...instead of the response of cool I was expecting . If I just var-dump client- sendRequest request I get a 200 OK and the url is what I expect http : localhost : 8000 test access token penises . I have another request but only using client- post .. . and it works fine without giving me the stream thing back . I ve tried reading the stream using the example at the bottom http : guzzle.readthedocs.org en latest http-client response.html but it s telling me feof doesn t exist . Anyone have any idea what I m missing or doing wrong here Comment : access token penises should be able to access everywhere .. . Answer : Just had a strange situation . Note that you can get body content only once I have expected to get same content every time I call getContents . But they are not I have missed information that Guzzle response is stream so with first getContents we read all contents and nothing is left for second call .", "Question : null .. . Answer : I am trying to create a product in drupal-commerce using guzzle and restful webservices . When i am trying to create a new product i use the following process : 1 Login as a user who has the rights to create a product succes 2 Request CSRF token succes 3 Create product : Uh oh : Client error response status code 401 reason phrase Unauthorized : Access to this operation not granted .. . .. . Now when i am doing this process trough poster Firfox add-on . I can succesfully create a product but it guzzle i always fail to acces this operation . I don t really see what i am doing wrong . I logged in added the required variables to the header . Ty Edit : solution see comments . I adjusted the code . Comment : What you ve got in session needs to be sent as a cookie not as a plain-text header . Basic cURL example here http : drupal.stackexchange.com questions 79497 new-user-registration-sequence-for-services-3-4 with a bit of Googling should be easy to convert that logic to use Guzzle Comment : You where right i adjusted the code thx", "Question : I am trying to write HTML parser with the help of Goutte . It works very well . However Goutte https : github.com FriendsOfPHP Goutte uses blocking requests . This works well if you are dealing with a single service . If I want to query lots of services which are independent from each other this causes a problem . Goutte uses BrowserKit https : github.com symfony browser-kit and Guzzle https : github.com guzzle guzzle . I have tried to change doRequest function but it failed with .. . .. . Argument 1 passed to Symfony Component BrowserKit CookieJar : : updateFromResponse must be an instance of Symfony Component BrowserKit Response .. . .. . How can I change Goutte Client.php so that it does requests asynchronously Is that is not possible how can I run my scrappers which targets different endpoints simultaneously Thanks .. . Answer : Goutte is essentially a bridge between Guzzle and Symphony s Browserkit and DomCrawler . The biggest drawback with using Goutte is that all requests are made sychronouslly .. . .. . To complete things asychronously you will have to forego using Goutte and directly use Guzzle and DomCrawler . For example : Comment : Thanks for the answer . However I am trying to run separate scrappers which has more than simple get requests . Each scrapper has its own class to do series of requests DOM parsing etc . That is why I wonder how can I call all these scrappers asynchronously . If my scrappers are localhost site1.php localhost site2.php is it a good idea to call site1.php site2.php from lets say cron.php with above code What do you suggest" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
josql@java@102
josql -- josql sql for java objects provides the ability to apply sql-like queries to collections of @placeholder objects .
{ "confidence": [ 66.38365936279297, 52.43135452270508, 51.52289581298828, 50.79774475097656, 50.156761169433594, 50.156761169433594, 44.87259292602539, 44.87259292602539, 41.638572692871094, 39.560176849365234, 38.01634979248047, 37.98428726196289, 35.7783203125, 33.28186798095703, 30.01685333251953, 22.35971450805664, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 19.763134002685547, 16.50269317626953, 16.50269317626953, 16.50269317626953, 16.50269317626953, 15.136975288391113, 12.87482738494873, 12.87482738494873, 12.87482738494873, 12.87482738494873 ], "content": [ "JoSQL currently supports the following SQL features :", "See the documentation at josql.sourceforge.net manual javadocs org josql functions http : josql.sourceforge.net manual javadocs org josql functions GroupingFunctions.html", "No its not possible joSQL is the inMemory filtering utility which uses reflection to filter out the data between two Collections .", "-values are available .. . .. . Example : .. . JoSQL-statement looks like this : .. . .. . .. . Method using the query-object : .. . .. . Method pre processing the JoSQL-statement : .. . .. . The JoSQL-statement preprocessing method bascially iterates through a given JoSQL-statement and sees whether it contains the string .", "In the end it just replaces the values within the JoSQL-statement with question marks", "I ve been reading the documentation for joSQL but I can t work out if this is possible .", "JoSQL uses gentlyweb-utils it seems to be some sort of Accessor Getter Setter framework .", "joSQL has a ColumnReference class but I ve no idea what uses it or if I can even get to instances of this class .", "I ve been using JoSQL for quite a few months now and today I came across a problem I am not sure how to solve .", "Trying to run following code in this the SQL statement trying to find values where colName2 like group test name having double quote in the end and passing the querySQL string to josql parser .", "Accessing methods such as getType is easy because getType is expected to be a method from MyObject - just that I do not write round brackets after it this is how JoSQL works as far as I know .", "Does anyone has any idea on how to pass the double quote to josql parser", "I am using JOSql for manipulation data in java I want to get the sum of values in following query .. . .. . i am trying to get the sum of value on bases of planType When i go with JOSql function as .. . .. . it is giving me sum of all values how can I get sum form list using plan type .", "Finally it creates the objects and sets them using something similar to prepared statements setObject -method .", "I ve used the following approach to solve my issue : .. . .. . 1 . create a method which picks up a given JoSQL-statement .. . 2 . mark the constants which you want to replace by say FULL PACKAGE AND CONSTANT .. . 3 . use reflections to determine the column as well as the column and value from the field .. . 4 . iteratively replace the statement until no", "I probably could solve it by binding variables placeholders but I d like to include the fields in the query .", "SELECT FROM ...MyObject WHERE getType com.mypackage.myclass.TYPE A .. . .. . This is the query that I have .", "TYPE A is a public static final int attribute in myclass class .", "Does anyone happen to have an idea how to access a public static final field", "I d love to access that attribute without having to bind variables but I haven t been able to do so .", "Thanks for your help in advance", "I really appreciate it .", "I think I have figured something out .", "First : it seems not possible to access the static-variables for whatever reason .", "If it does it does some copy and paste note the dollar-symbol right in front of the constant name .", "and sets a corresponding object in the newly created Query-object which is later used to retrieve information .", "Is it possible to get the list of column names related to a query or results set", "I don t see anything in the API to let me do this .", "But when I debug-print the query and results this information is inside the class .", "Thanks", "You can use : Query.getColumns this will return a list of : SelectItemExpression you can then use : getAlias on each to return the column name .", "So : .. . .. . Of course if the column doesn t have an alias then you could try using the toString method instead or digging around in the Expression to find more suitable data .", "plz guide me where I am missing", "i have try that but i am not able to use expression .", "try this SELECT country @total FROM Details GROUP BY country LIMIT 1 1 EXECUTE ON GROUP BY RESULTS sum amount AS total or SELECT FROM Details GROUP BY country GROUP BY ORDER : allobjs.size DESC EXECUTE ON GROUP BY RESULTS sum amount AS total", "You can use q.parse SELECT sum value planType from com.mbcl.ytd.Enrolment group-by planType", "You can should use single quotes here.. . .. . .. . Select from tabName WHERE colName1 type AND colName2 LIKE group test ORDER BY colName2 asc", "Following exception has been occurring when I run it as colName2 contains a string with double quote in it .", "Exception in thread main org.josql.parser.TokenMgrError : Lexical error at line 1 column 150 .", "Encountered : after : ORDER BY colName2 asc .. . at org.josql.parser.JoSQLParserTokenManager.getNextToken JoSQLParserTokenManager.java : 1420 .. . at org.josql.parser.JoSQLParser.jj scan token JoSQLParser.java : 3725 .. . ........ . .. . ........ . .. . .. . .. . at org.josql.parser.JoSQLParser.Query JoSQLParser.java : 298 .. . at org.josql.parser.JoSQLParser.parseQuery JoSQLParser.java : 86 .. . at org.josql.Query.parse Query.java : 2032 .. . at main.JoSqlTest.main JoSqlTest.java : 12", "Why do you need double quotes" ] }
{ "confidence": [ 81.7586669921875, 74.66939544677734, 62.56292724609375, 60.24578094482422, 58.506256103515625 ], "content": [ "Question : Is it possible to get the list of column names related to a query or results set I ve been reading the documentation for joSQL but I can t work out if this is possible . I don t see anything in the API to let me do this . But when I debug-print the query and results this information is inside the class . joSQL has a ColumnReference class but I ve no idea what uses it or if I can even get to instances of this class . Thanks .. . Answer : No its not possible joSQL is the inMemory filtering utility which uses reflection to filter out the data between two Collections . JoSQL currently supports the following SQL features :", "Question : I ve been using JoSQL for quite a few months now and today I came across a problem I am not sure how to solve . I probably could solve it by binding variables placeholders but I d like to include the fields in the query . SELECT FROM ...MyObject WHERE getType com.mypackage.myclass.TYPE A .. . .. . This is the query that I have . TYPE A is a public static final int attribute in myclass class . Accessing methods such as getType is easy because getType is expected to be a method from MyObject - just that I do not write round brackets after it this is how JoSQL works as far as I know . Does anyone happen to have an idea how to access a public static final field JoSQL uses gentlyweb-utils it seems to be some sort of Accessor Getter Setter framework . I d love to access that attribute without having to bind variables but I haven t been able to do so . Thanks for your help in advance I really appreciate it . .. . Answer : I think I have figured something out . First : it seems not possible to access the static-variables for whatever reason . I ve used the following approach to solve my issue : .. . .. . 1 . create a method which picks up a given JoSQL-statement .. . 2 . mark the constants which you want to replace by say FULL PACKAGE AND CONSTANT .. . 3 . use reflections to determine the column as well as the column and value from the field .. . 4 . iteratively replace the statement until no -values are available .. . .. . Example : .. . JoSQL-statement looks like this : .. . .. . .. . Method using the query-object : .. . .. . Method pre processing the JoSQL-statement : .. . .. . The JoSQL-statement preprocessing method bascially iterates through a given JoSQL-statement and sees whether it contains the string . If it does it does some copy and paste note the dollar-symbol right in front of the constant name . Finally it creates the objects and sets them using something similar to prepared statements setObject -method . In the end it just replaces the values within the JoSQL-statement with question marks and sets a corresponding object in the newly created Query-object which is later used to retrieve information .", "Question : I am using JOSql for manipulation data in java I want to get the sum of values in following query .. . .. . i am trying to get the sum of value on bases of planType When i go with JOSql function as .. . .. . it is giving me sum of all values how can I get sum form list using plan type . plz guide me where I am missing Comment : See the documentation at josql.sourceforge.net manual javadocs org josql functions http : josql.sourceforge.net manual javadocs org josql functions GroupingFunctions.html Comment : i have try that but i am not able to use expression . Comment : try this SELECT country @total FROM Details GROUP BY country LIMIT 1 1 EXECUTE ON GROUP BY RESULTS sum amount AS total or SELECT FROM Details GROUP BY country GROUP BY ORDER : allobjs.size DESC EXECUTE ON GROUP BY RESULTS sum amount AS total .. . Answer : You can use q.parse SELECT sum value planType from com.mbcl.ytd.Enrolment group-by planType", "Question : Trying to run following code in this the SQL statement trying to find values where colName2 like group test name having double quote in the end and passing the querySQL string to josql parser . Following exception has been occurring when I run it as colName2 contains a string with double quote in it . Does anyone has any idea on how to pass the double quote to josql parser Exception in thread main org.josql.parser.TokenMgrError : Lexical error at line 1 column 150 . Encountered : after : ORDER BY colName2 asc .. . at org.josql.parser.JoSQLParserTokenManager.getNextToken JoSQLParserTokenManager.java : 1420 .. . at org.josql.parser.JoSQLParser.jj scan token JoSQLParser.java : 3725 .. . ........ . .. . ........ . .. . .. . .. . at org.josql.parser.JoSQLParser.Query JoSQLParser.java : 298 .. . at org.josql.parser.JoSQLParser.parseQuery JoSQLParser.java : 86 .. . at org.josql.Query.parse Query.java : 2032 .. . at main.JoSqlTest.main JoSqlTest.java : 12 .. . Answer : Why do you need double quotes You can should use single quotes here.. . .. . .. . Select from tabName WHERE colName1 type AND colName2 LIKE group test ORDER BY colName2 asc", "Question : Is it possible to get the list of column names related to a query or results set I ve been reading the documentation for joSQL but I can t work out if this is possible . I don t see anything in the API to let me do this . But when I debug-print the query and results this information is inside the class . joSQL has a ColumnReference class but I ve no idea what uses it or if I can even get to instances of this class . Thanks .. . Answer : You can use : Query.getColumns this will return a list of : SelectItemExpression you can then use : getAlias on each to return the column name . So : .. . .. . Of course if the column doesn t have an alias then you could try using the toString method instead or digging around in the Expression to find more suitable data ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
quicktype@ios@56
quicktype -- quicktype is new stock keyboard for tag : @placeholder users introduced by apple with the release of tag : ios8 .
{ "confidence": [ 51.34154510498047, 47.58212661743164, 46.73910140991211, 46.4307975769043, 45.63764572143555, 44.4798469543457, 44.4798469543457, 43.85590362548828, 42.89344024658203, 42.89344024658203, 41.971923828125, 40.576873779296875, 39.488834381103516, 39.488834381103516, 38.383995056152344, 38.12863540649414, 36.08186721801758, 36.08186721801758, 35.21247482299805, 34.724029541015625, 34.724029541015625, 33.84111022949219, 25.3929443359375, 24.99555206298828, 22.01095962524414, 21.626399993896484, 20.690601348876953, 20.690601348876953, 20.690601348876953, 20.372882843017578, 19.43008804321289, 19.43008804321289, 19.167606353759766, 18.75351333618164, 18.65862464904785, 18.65862464904785, 18.65862464904785, 18.072250366210938, 18.072250366210938, 17.809768676757812, 17.603750228881836, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 15.487103462219238, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 13.440336227416992, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355, 12.082499504089355 ], "content": [ "For now I m just disabling the QuickType feature on the input tag using autocorrect off but is there a way to actually recognize QuickType inputs on an input HTML text field", "Unfortunately this messes up QuickType .", "First I thought that Keyboard and QuickType are decoupled from the UITextField .", "So I guess this isn t the smart QuickType suggestions .", "So the textField actually communicates with quicktype .", "However QuickType suggestions are not received by these methods and I m unable to find documentation on how QuickType interacts with these protocols .", "To be more clear the text that QuickType will insert get s prefixed the additional whitespace is not shown in the UI of the QuickType bar .", "It s not giving me any suggestions tested in simulator : .. . .. . Does Apple not intend to expose the QuickType suggestions to us", "I am under the assumption that there currently does not exist a QuickType API .", "I want my app to know what the QuickType suggestions are .", "I want the table view to scroll whenever the user enters a text field so I do this : .. . .. . This method normally works great but when quicktype keyboard appears the quicktype bar partially overlaps the cell .", "For example if I m trying to type Apple and I only actually type Ap and select the word Apple on QuickType only Ap is set .", "How should I implement these protocols to receive QuickType input", "Changing the position of the cursor in a filled textField actually changes quicktype suggestions .", "I m also not concerned with actually customizing the quick type replies as in this question http : stackoverflow.com questions 28315325 customise-the-quicktype-suggestions-in-ios-keyboard .", "There is no QuickType API but you can get similar functionality with the ACEAutocompleteBar https : github.com acerbetti ACEAutocompleteBar library from GitHub .", "However when I use QuickType on that text field only what I ve actually typed gets sent in the form .", "I have a simple question to ask : can we append words to the iPhone s QuickType from Javascript", "QuickType has gotten more context-aware recently and you can type something like auto r and expect to see repair and racing as suggestions .", "Each time I press space in an empty field which is then ignored by my textField the Quicktype text gets prefixed with this space .", "Does anybody know how I can prevent that or how I can reset QuickType suggestions", "I will add this to the existing questions : here http : stackoverflow.com questions 26786253 ios-quicktype-bar-add-custom-suggestion and here http : stackoverflow.com questions 28315325 customise-the-quicktype-suggestions-in-ios-keyboard .. . .. . The scenario is that I am creating an administration app https : bitbucket.org bmlt bmltadmin that is designed to allow folks to edit the values in a database on a server .", "I have a UIWebView where I m inputting text into an input tag on the HTML .", "Here is some logging to see what s happening when I press space 5 times followed by press on the I m QuickType suggestion : .. . .. . By inspecting the variables in that delegate method I can verify that the problem is indeed with the replacement string that I get from the UITextField .", "Note that I m not talking about a custom-keyboard just feeding the standard keyboard some context for it s predictions .", "Strictly inputting suggestions to the default keyboard is not possible .", "So I want to be able to feed a string to the keyboard to provide it context for prediction .", "I just want the keyboard to know what it s typing about .", "Create your custom-keyboard from scratch much more difficult .", "I suggest building a minimal example and filing a bug report with Apple .", "So if a user is asked a question that can be interpreted as polar yes no then the predictive keyboard should have the Yes No Maybe .. . .. . Is this available to developers", "However you have two options : .. . .. . Keep the standard keyboard and manually display a bar within a UIView instance on top of it .", "As there s now way to find any further information on how to do this on the Official Apple Documentation I guess it s impossible .", "From http : nshipster.com uitextchecker : .. . .. . I ve tried getting a UILexicon from a UIInputViewController but Apple s documentation says Apple intends for you to consider the words in a lexicon object as supplementary to an autocorrection suggestion lexicon of your own design link https : developer.apple.com reference uikit uilexicon .", "I m developing a messaging app and would like the predictive keyboard in iOS 8 to recognize that the user who is composing a message is replying to the previous message .", "if your user is likely to choose one of your suggestions then only present these suggestions and keep a little button to enter a custom input and dismiss the keyboard here .", "I get auto-completion from field at now but it s ugly and I m asking why cannot use the built-in system keyboard auto-completion system .", "If you do not need quick type keyboard then you can use textField.autocorrectionType UITextAutocorrectionTypeNo .", "I kind of don t want to get rid of the quick type keyboard unless there s just no other way .", "Bug at Apple : rdar : 19250739 .. . Bug at OpenRadar : 5794406481264640 http : openradar.appspot.com radar id 5794406481264640 .. . .. . In case somebody is interested in the workaround :", "Thanks for sharing your code and approach - I just wish Apple would open this up though I suppose that s a small carrot to use Messages instead of WhatsApp FB Messenger Kik etc etc", "Well I suspect that this is a forlorn question ultimately doomed to sadden and disappoint me but I want to have the question on the record for the future .", "I have a fairly zippy API http : bmlt.magshare.net semantic semantic-workshop that can be used to allow REST-style data exchange .", "I have the ability to download a list of values that the user can apply as search terms when they log in and I d like to be able to help them to enter things quickly .", "For example town names .", "If they enter B then I d like to be able to offer Bayshore Babylon and Bohemia as suggestions and so on .", "A completely legit application .", "Am I wrong", "Just for the record I have listed the steps to get this working with Swift : .. . .. . 1 Import the files from the folder ACEAutocompleteBar to your project .", "2 Create a bridging header and write import ACEAutocompleteBar.h at the top .", "3 Make your view containing the text field an ACEAutocompleteDataSource and ACEAutocompleteDelegate .", "4 Implement the minimumCharactersToTrigger function .. . .. . 5 Implement the inputView function .", "6 Implement the textField function .", "7 Call setAutocompleteWithDataSource on the textField .", "Hope that helps anyone looking for this kind of functionality", "Thanks", "It looks like an interesting library .", "I ll give it a go .", "I ve found UITextChecker which can suggest completions for a single word but isn t context-aware .", "I ve also seen this in action .", "There are two events triggered : the first with the suggested test added the second with the suggestion replaced by a space .", "However if you want to give the equivalent experience for the user I would hide the iOS suggestion bar using myTextView.autocorrectionType UITextAutocorrectionTypeNo and then replace that view with my own custom view that mimics the suggestion view until .", "Once the user types a character or selects an option then hide the custom suggestion view and re-enable the iOS suggestion bar .", "I Subclassed UIInputView just for this the transparency and the transition is a little off but everything else works pretty well .", "To implement this into a UITextField or UITextView that you ve already subclassed import the SuggestionView and implement the SuggestionViewDelegate .", "Then in the UITextFieldDelegate or UITextViewDelegate methods add : .. . .. . Then implement the SuggestionViewDelegate : .. . .. . While this isn t a perfect solution it does create the desired effect .", "While I was hoping someone would swoop in and say Yes it s possible just do XYZ this is an incredible answer .", "You can read more here https : developer.apple.com library prerelease ios documentation UIKit Reference UIInputViewController Class .", "You can also think about a totally different UX .", "For eg .", "If the user is likely to enter a custom input refer to both above alternatives .", "What a nice answer .", "This is a great succinct answer albeit not the one I wanted to hear", "arghh", "so thank you .", "I didn t create the bounty but feel obliged to choose the other answer as the most right .", "I think that a totally different UX doesn t work for me in this case as I am consciously trying to make an input that could easily be 2 buttons more of an NLP conversational input .", "No problem hope you will be able to do what you need the other answer", "The main goal right here is to prevent auto-completion with div by using some more phone ability functionality .", "We have a text-entry view implemented using the UITextInput UIKeyInput and UITextInputTraits protocols .", "Basic text entry and deletion work fine via insertText : and deleteBackward .", "I have a textField in which I don t want to allow leading whitespace .", "So I implemented textField textField : shouldChangeCharactersInRange : replacementString : and block attempts which would change the text to something that starts with whitespace .", "This works as expected .", "It already contains the suggestion prefixed with whitespace .", "A workaround would be to trim whitespace from multi character inserts but first I want to see if I m missing a way to handle the problem in a clean way .", "With some more testing I came to the conclusion that this is a bug .", "But this is actually not the case .", "So I filed a bug .", "I have a UITableViewController with custom cells that have text fields in them .", "How do I fix that overlapping issue", "If you need it why don t you scroll to row next to targeted one .", "I was hoping there are cleaner solutions than just scrolling to the cell below .", "Also what happens when you want to edit the last cell" ] }
{ "confidence": [ 70.95398712158203, 62.09275436401367, 61.30852508544922, 54.53915786743164, 54.20574951171875, 52.50678253173828, 49.98157501220703, 44.960906982421875, 44.66456604003906 ], "content": [ "Question : null .. . Answer : I have a UIWebView where I m inputting text into an input tag on the HTML . However when I use QuickType on that text field only what I ve actually typed gets sent in the form . For example if I m trying to type Apple and I only actually type Ap and select the word Apple on QuickType only Ap is set . For now I m just disabling the QuickType feature on the input tag using autocorrect off but is there a way to actually recognize QuickType inputs on an input HTML text field Comment : I ve also seen this in action . There are two events triggered : the first with the suggested test added the second with the suggestion replaced by a space . I suggest building a minimal example and filing a bug report with Apple .", "Question : null .. . Answer : I want my app to know what the QuickType suggestions are . QuickType has gotten more context-aware recently and you can type something like auto r and expect to see repair and racing as suggestions . I ve found UITextChecker which can suggest completions for a single word but isn t context-aware . From http : nshipster.com uitextchecker : .. . .. . I ve tried getting a UILexicon from a UIInputViewController but Apple s documentation says Apple intends for you to consider the words in a lexicon object as supplementary to an autocorrection suggestion lexicon of your own design link https : developer.apple.com reference uikit uilexicon . So I guess this isn t the smart QuickType suggestions . It s not giving me any suggestions tested in simulator : .. . .. . Does Apple not intend to expose the QuickType suggestions to us", "Question : I have a textField in which I don t want to allow leading whitespace . So I implemented textField textField : shouldChangeCharactersInRange : replacementString : and block attempts which would change the text to something that starts with whitespace . This works as expected . Unfortunately this messes up QuickType . Each time I press space in an empty field which is then ignored by my textField the Quicktype text gets prefixed with this space . To be more clear the text that QuickType will insert get s prefixed the additional whitespace is not shown in the UI of the QuickType bar . Here is some logging to see what s happening when I press space 5 times followed by press on the I m QuickType suggestion : .. . .. . By inspecting the variables in that delegate method I can verify that the problem is indeed with the replacement string that I get from the UITextField . It already contains the suggestion prefixed with whitespace . Does anybody know how I can prevent that or how I can reset QuickType suggestions A workaround would be to trim whitespace from multi character inserts but first I want to see if I m missing a way to handle the problem in a clean way . .. . Answer : With some more testing I came to the conclusion that this is a bug . First I thought that Keyboard and QuickType are decoupled from the UITextField . But this is actually not the case . Changing the position of the cursor in a filled textField actually changes quicktype suggestions . So the textField actually communicates with quicktype . So I filed a bug . Bug at Apple : rdar : 19250739 .. . Bug at OpenRadar : 5794406481264640 http : openradar.appspot.com radar id 5794406481264640 .. . .. . In case somebody is interested in the workaround :", "Question : Well I suspect that this is a forlorn question ultimately doomed to sadden and disappoint me but I want to have the question on the record for the future . I will add this to the existing questions : here http : stackoverflow.com questions 26786253 ios-quicktype-bar-add-custom-suggestion and here http : stackoverflow.com questions 28315325 customise-the-quicktype-suggestions-in-ios-keyboard .. . .. . The scenario is that I am creating an administration app https : bitbucket.org bmlt bmltadmin that is designed to allow folks to edit the values in a database on a server . I have a fairly zippy API http : bmlt.magshare.net semantic semantic-workshop that can be used to allow REST-style data exchange . I have the ability to download a list of values that the user can apply as search terms when they log in and I d like to be able to help them to enter things quickly . For example town names . If they enter B then I d like to be able to offer Bayshore Babylon and Bohemia as suggestions and so on . A completely legit application . I am under the assumption that there currently does not exist a QuickType API . Am I wrong .. . Answer : There is no QuickType API but you can get similar functionality with the ACEAutocompleteBar https : github.com acerbetti ACEAutocompleteBar library from GitHub . Just for the record I have listed the steps to get this working with Swift : .. . .. . 1 Import the files from the folder ACEAutocompleteBar to your project . 2 Create a bridging header and write import ACEAutocompleteBar.h at the top . 3 Make your view containing the text field an ACEAutocompleteDataSource and ACEAutocompleteDelegate . 4 Implement the minimumCharactersToTrigger function .. . .. . 5 Implement the inputView function . 6 Implement the textField function . 7 Call setAutocompleteWithDataSource on the textField . Hope that helps anyone looking for this kind of functionality Comment : Thanks It looks like an interesting library . I ll give it a go .", "Question : null .. . Answer : I have a UITableViewController with custom cells that have text fields in them . I want the table view to scroll whenever the user enters a text field so I do this : .. . .. . This method normally works great but when quicktype keyboard appears the quicktype bar partially overlaps the cell . How do I fix that overlapping issue Comment : If you do not need quick type keyboard then you can use textField.autocorrectionType UITextAutocorrectionTypeNo . If you need it why don t you scroll to row next to targeted one . Comment : I kind of don t want to get rid of the quick type keyboard unless there s just no other way . I was hoping there are cleaner solutions than just scrolling to the cell below . Also what happens when you want to edit the last cell", "Question : null .. . Answer : We have a text-entry view implemented using the UITextInput UIKeyInput and UITextInputTraits protocols . Basic text entry and deletion work fine via insertText : and deleteBackward . However QuickType suggestions are not received by these methods and I m unable to find documentation on how QuickType interacts with these protocols . How should I implement these protocols to receive QuickType input", "Question : null .. . Answer : I have a simple question to ask : can we append words to the iPhone s QuickType from Javascript I get auto-completion from field at now but it s ugly and I m asking why cannot use the built-in system keyboard auto-completion system . The main goal right here is to prevent auto-completion with div by using some more phone ability functionality .", "Question : I m developing a messaging app and would like the predictive keyboard in iOS 8 to recognize that the user who is composing a message is replying to the previous message . So I want to be able to feed a string to the keyboard to provide it context for prediction . So if a user is asked a question that can be interpreted as polar yes no then the predictive keyboard should have the Yes No Maybe .. . .. . Is this available to developers Note that I m not talking about a custom-keyboard just feeding the standard keyboard some context for it s predictions . I m also not concerned with actually customizing the quick type replies as in this question http : stackoverflow.com questions 28315325 customise-the-quicktype-suggestions-in-ios-keyboard . I just want the keyboard to know what it s typing about . .. . Answer : As there s now way to find any further information on how to do this on the Official Apple Documentation I guess it s impossible . However you have two options : .. . .. . Keep the standard keyboard and manually display a bar within a UIView instance on top of it . Create your custom-keyboard from scratch much more difficult . You can read more here https : developer.apple.com library prerelease ios documentation UIKit Reference UIInputViewController Class . You can also think about a totally different UX . For eg . if your user is likely to choose one of your suggestions then only present these suggestions and keep a little button to enter a custom input and dismiss the keyboard here . If the user is likely to enter a custom input refer to both above alternatives . Comment : What a nice answer . Comment : This is a great succinct answer albeit not the one I wanted to hear arghh so thank you . I didn t create the bounty but feel obliged to choose the other answer as the most right . I think that a totally different UX doesn t work for me in this case as I am consciously trying to make an input that could easily be 2 buttons more of an NLP conversational input . Comment : No problem hope you will be able to do what you need the other answer", "Question : I m developing a messaging app and would like the predictive keyboard in iOS 8 to recognize that the user who is composing a message is replying to the previous message . So I want to be able to feed a string to the keyboard to provide it context for prediction . So if a user is asked a question that can be interpreted as polar yes no then the predictive keyboard should have the Yes No Maybe .. . .. . Is this available to developers Note that I m not talking about a custom-keyboard just feeding the standard keyboard some context for it s predictions . I m also not concerned with actually customizing the quick type replies as in this question http : stackoverflow.com questions 28315325 customise-the-quicktype-suggestions-in-ios-keyboard . I just want the keyboard to know what it s typing about . .. . Answer : Strictly inputting suggestions to the default keyboard is not possible . However if you want to give the equivalent experience for the user I would hide the iOS suggestion bar using myTextView.autocorrectionType UITextAutocorrectionTypeNo and then replace that view with my own custom view that mimics the suggestion view until . Once the user types a character or selects an option then hide the custom suggestion view and re-enable the iOS suggestion bar . I Subclassed UIInputView just for this the transparency and the transition is a little off but everything else works pretty well . To implement this into a UITextField or UITextView that you ve already subclassed import the SuggestionView and implement the SuggestionViewDelegate . Then in the UITextFieldDelegate or UITextViewDelegate methods add : .. . .. . Then implement the SuggestionViewDelegate : .. . .. . While this isn t a perfect solution it does create the desired effect . Comment : While I was hoping someone would swoop in and say Yes it s possible just do XYZ this is an incredible answer . Thanks for sharing your code and approach - I just wish Apple would open this up though I suppose that s a small carrot to use Messages instead of WhatsApp FB Messenger Kik etc etc" ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
tweenlite@actionscript@209
tweenlite -- tweenlite is an extremely fast lightweight and flexible tweening engine that serves as the foundation of the greensock animation platform gsap which is available in javascript actionscript-3 and @placeholder 2 .learn more at http : www.greensock.comjavascript api reference : http : api.greensock.com js actionscript api reference : http : api.greensock.com as .
{ "confidence": [ 62.583473205566406, 58.103275299072266, 57.668663024902344, 50.44395446777344, 48.39690017700195, 47.62403106689453, 44.155826568603516, 42.73899459838867, 42.60070037841797, 41.58012008666992, 41.5477180480957, 41.26881408691406, 41.23073959350586, 41.23073959350586, 40.74589538574219, 40.233001708984375, 39.90486526489258, 39.894283294677734, 39.80133056640625, 39.444087982177734, 38.90102767944336, 38.78803253173828, 38.78803253173828, 38.78803253173828, 38.091888427734375, 38.091888427734375, 37.462158203125, 37.4456787109375, 36.80663299560547, 36.766571044921875, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 35.56103515625, 35.479244232177734, 35.479244232177734, 35.479244232177734, 35.479244232177734, 35.43926239013672, 34.835269927978516, 34.34516525268555, 34.15336990356445, 33.53225326538086, 33.071136474609375, 32.128578186035156, 32.128578186035156, 32.128578186035156, 32.128578186035156, 32.128578186035156, 31.873958587646484, 31.853330612182617, 31.505226135253906, 31.39594078063965, 31.359756469726562, 31.312196731567383, 31.022327423095703, 31.022327423095703, 31.022327423095703, 31.022327423095703, 31.022327423095703, 31.022327423095703, 30.97174835205078, 30.208507537841797, 29.739171981811523, 29.72787857055664, 29.696453094482422, 29.696453094482422, 29.696453094482422, 29.696453094482422, 29.411365509033203, 29.400848388671875, 29.400848388671875, 29.400848388671875, 29.400848388671875, 28.276996612548828, 28.18868637084961, 27.987659454345703, 27.986915588378906, 27.637022018432617, 27.082435607910156, 27.082435607910156, 26.96872329711914, 26.96872329711914, 26.850244522094727, 26.850244522094727, 26.39849090576172, 26.377864837646484, 26.34569549560547, 26.312957763671875, 25.9578857421875, 25.871366500854492, 25.489330291748047, 25.17477035522461, 24.909900665283203, 24.809656143188477, 24.690752029418945 ], "content": [ "I am developing an animation with GreenSock TweenLite .", "Is about the code from GreenSock TweenLite", "eyeballs http : quadradius.com stuff RandomImagesForLinking hue-adjusted-eyeballs.jpg .. . .. . I often use GreenSock Animation Platform TweenLite TweenMax but both core AS code and the TweenLite engine don t seem to handle hue as I expect .", "TweenLite does not include the CSSPlugin in TweenLite .", "I m using TweenLite to create a slide animation of 3 images .", "I use Greensock tweenlite for animation but I don t know how can I put all together .", "Why this works with TweenMax and not TweenLite", "I imported the sound to library set a classname for Export for ActionScript and I was trying to fade with TweenLite TweenMax like this : .. . .. . But it just doesn t work .", "I am trying to do a simple animation of top-margin using GreenSocks TweenLite for Javascript .", "I am curently having an issue with Tweenlite js with the background images .", "themeChannel sndTheme.play 0 99999 TweenLite.from themeChannel 2 volume : 0 onComplete : stopTheme .. . .. . edit : I got it working by Tweening a SoundTransform Object : .. . .. . thanks to : http : www.zedia.net 2008 fading-out-volume-using-tweenlite", "If you need more help don t hesitate to ask in the GreenSock forums at http : greensock.com forums .. . .. . Happy tweening", "Seems like the transformOrigin of TweenLite is not working .", "I m referring to TweenLite or TweenMax in particular .", "I can create a TweenLite like this : .. . .. . At this point it automatically plays .", "I m drawing a large shape using an array of points in a for-loop and tweenlite as found at http : www.flashperfection.com tutorials Animated-line-drawing-using-TweenLite-in-AS3-22013.html .. . .. . I would like the animation to complete before continuing but I m unable to find a way to be notified when the full animation is complete .", "no log in console or no reaction in TweenLite side", "And I use tweenlite and want it restart when done .", "If tweenlite detects that there is browser which doesn t support 3D he will do 2d .", "Using GSAP I want to create one TweenLite or TweenMax object which acts different animations intended to play in parallel on multiple different objects .", "I suspect the GreenSock platform is using Flash s own fl.motion.AdjustColor http : help.adobe.com en US FlashPlatform reference actionscript-3 fl motion AdjustColor.html which doesn t perform a particularly great transformation between RGB and HSV as you ve discovered .", "I am still new with EaselJS and TweenLite .", "And TweenLite would only use that variable as its destination .", "However is it possible purely using TweenLite or TweenMax", "P . S . You can use repeat parameter of TweenLite to repeat animation several times .", "I have added a TweenLite animation that changes svg fill-opacity from 0 to 1 .", "It might just be something specific with Tweenlite though .", "Tweenlite is great for tweening but TweenJS has some special capabilities to make it handle MovieClip-style frames when exporting from Flash .", "You can see it at the bottom of the page here : http : greensock.com tweenlite-as .. . .. . GreenSock provided the source code and said it s ok to mess around with it and use in noncommercial projects so I ve been trying some stuff .", "This error may be connected to TweenLite since all stack traces look like this : .. . .. . The version of TweenLite which I use isn t the most up to-date but I ve used it for 1.5 years in this game and it didn t have issues before .", "TweenLite is loaded in the head tags using the following line .. . .. . And it s for the following div :", "I did not know TweenLite figures 24tps on its own .", "I d rather not use TweenLite but the syntax for applying filters makes it so easy .", "I m using tweenlite library to rotate move and zoom image .", "I m using scaling rotating and moving image with tweenlite and draggable library .", "The problem is that image was scaled with tweenlite and is now expanded over the borders of svg element .", "I tried to import the volume plugin on TweenLite and still nothing .", "Put the code in a function : .. . .. . Then call the function whenever you want to start the animation again : .. . .. . To do so in an interval use a Timer http : help.adobe.com en US FlashPlatform reference actionscript-3 flash utils Timer.html .. . .. . Which would require a changing the signature of the function to", "I changed TweenLite and its deps for TweenMax and all worked well .", "In your TweenLite you would only animate to a destTop value .", "Are you trying to replace TweenJS usage in the Flash export with Tweenlite", "I m trying to use TweenLite to tween in the width of the blue sidebar down to zero .", "Not sure if TweenLite supports running 2 filters at the same time but either way you can easily do it yourself .", "The problem is after I ve ran the above tweenlite call then create a convolution filter and apply it to origBitmap it removes the initial saturation and brightness filters and just keeps the sharpen filter .. . .. . Is there a way to also incorporate the ConvolutionFilter in that TweenLite call above", "You could add name to each animation and set delay uppon to it greensock.com docs HTML5 GSAP TimelineLite http : greensock.com docs HTML5 GSAP TimelineLite", "I don t remember but TweenLite itself may use timers .", "And it would be more flexible than my solution over on the greensock forums .", "I am using TweenLite to complete some SVG animations but for some reason every time i reload the page the first time I hover the element with the animation the durration of the animation is instant .", "I added an onclick event on to the function Move .. . .. . For some reason TweenLite rejects to animate the object .", "I m in the process of creating my first WordPress theme and I m trying to integrate the TweenLite library but it s not working .", "I guess I need to use parentElement in my TweenLite lines but I m not sure how .", "I m not too familiar with TweenLite but can you add the onComplete callback to the last call only", "I am simply using TweenLite because of its easy syntax of applying brightness saturation and contrast .", "In Actionscript code executes between the rendering process .", "Is it possible to have global reusable animation properties in GSAP", "I used the following code to center the div : .. . .. . CSS .. . .. . CODE : http : jsfiddle.net 9b8uLgw5 .. . .. . When I try to animate the scaleX of that div using TweenLite the div is off centered .", "In this fiddle http : jsbin.com yucoqaxusu 1 edit html css js console output i ve copied all the code and libs of the gallery from this post article http : bassta.bg 2014 04 fullscreen-slides-with-tweenlite-cssplugin-and-scrolltoplugin comment-1380 .", "So far this is my html : .. . .. . Here is my JS I also use TweenLite : .. . .. . I also tried to use the for-loop like this. . but none of them work. .", "Having said that though ThrowPropsPlugin is part of Club GreenSock http : greensock.com club .", "About the TweenLite ScrollTo Carousel i wondering if it was possible to use a built-in drag function method given in the library it self .", "So im currently learning jquery and a little bit of tweenlite for animations I wanna keep it basic .", "This module loads all third part scripts like jQuery TweenLite CSSPlugin etc etc .", "I m trying to get a shape object to rotate around its centre using TweenLite but it rotates around its x y .", "I can t seem to figure out how to animate opacity values in canvas using TweenLite.. .", "preferably using TweenLite .. . .. . For context sake here is a small snippet of the code I m currently working with :", "How can I achieve that in GSAP or Javascript", "I have used Greensock for the animation which is a simple x value with some easing .", "As it happens there is a ThrowPropsPlugin http : greensock.com throwpropsplugin provided by GSAP which does deal with momentum -based tweens .", "You can use that to generate a matrix for a flash.filters.ColorMatrixFilter http : help.adobe.com en US FlashPlatform reference actionscript-3 flash filters ColorMatrixFilter.html then you ll probably have to write a function which takes the current tween time and run it onUpdate to use that with TweenMax .", "Hey Guys so I am using TweenLite to act as a timer for Performance with Mobile usage .", "SHould I just remove the TweenLite and add A Actual Timer and in the diffucultyController just add timer.start", "Why do AS3 or TweenLite Max not handle hues like Photoshop or an artists color wheel", "When using the built-in Hue function in the Tweenlite package I don t get those results at all circles image .", "And this ThrowPropsPlugin internally uses VelocityTracker http : greensock.com docs HTML5 GSAP Utils VelocityTracker which is again a utility provided by GSAP which you can directly hook into using its .track http : greensock.com docs HTML5 GSAP Utils VelocityTracker track method and then anytime you want to get the computed velocity you can use .getVelocity http : greensock.com docs HTML5 GSAP Utils VelocityTracker getVelocity method of the same .", "First in my child theme s function.php file I have : .. . .. . The first script is the TweenLite and the second is my custom script I m using test out of it worked or not .", "That means that anything time based should not be in a loop as loops have no concept of time .. . .. . I would suggest using the complete callback built into TweenLite .", "I am looking into how to apply those effects without tweenlite because I think I could solve the problem that way .", "I d like to be able to passively tween a property on my object so that during the tween I can update this object and TweenLite will carry on .", "This seems to be because TweenLite interprets fill : none as fill : rgba 255 255 255 0 the latter being transparent white which in itself is not visible but the steps in the transition are .", "I think what you are looking for is called force3D http : greensock.com docs HTML5 GSAP Plugins CSSPlugin .", "Many thanks to the GreenSock Forum moderator who came up with this answer :", "Here https : codepen.io GreenSock pen axzmb is an example made by the GSAP guys themselves which by the looks of it and by what I was able to understand from your question is actually very close to your own situation as well .", "There are several modes to choose from but auto is the default .. . .. . .. . Read more about it on the here http : greensock.com docs HTML5 GSAP TweenMax TweenMax .", "TimelineLite s .fromTo http : greensock.com docs HTML5 GSAP TimelineLite fromTo method can help you with that .", "Read the docs at http : greensock.com docs HTML5 GSAP Plugins BezierPlugin .. . .. . A few pointers to keep in mind : .. . .. . 1 .", "Either way I was wondering if I remove all these timers and instead replace them with TweenLite TweenLite.delayedCall funcion if it would dramatically increase performance .", "I m using tweenlite to move several objects around in my flash however I have a weird issue that seems to only affect Firefox .", "Are you loading the GSAP CSSPlugin", "Are using the latest version of GSAP", "JS Fiddle with the solution here scale the result pane and re-run to see the effect : http : jsfiddle.net 85s1hrfo 2", "Here http : stackoverflow.com help how-to-ask is a good reference on asking good questions that will get you the best response .", "Whilst this is happening I also want to update the x and y variables of target.position and I cannot do this as TweenLite seems to hog the object until it s done as in until 15 seconds have passed .", ": Color tweening was just for example", "Despite me setting the timeline or tweens to null it had no effect because as I was tweening the same element it would check the DOM element if it had the variables GSAP had saved prior .", "TimelineLite http : greensock.com docs HTML5 GSAP TimelineLite s .to http : greensock.com docs HTML5 GSAP TimelineLite to method syntax is as follows : .. . .. . This fourth position parameter is something you can use to exactly position wherever you want your tween to appear .", "I didn t know GreenSock can do this .", ".. . .. . Live example : .. . http : jsfiddle.net tccsq6e9 2", "Visit the CSSPlugin Docs for more info : greensock.com docs HTML5 Plugins CSSPlugin http : greensock.com docs HTML5 Plugins CSSPlugin . . Also see the TweenMax Docs : greensock.com docs HTML5 Animation TweenMax http : greensock.com docs HTML5 Animation TweenMax", "Check if GSAP libraries CSS plugin included are loaded .", "You could also chain with the TimelineMax constructor : .. . .. . Or just do like you were doing but with chaining : .. . .. . See TweenMax docs for more information : http : greensock.com docs HTML5 GSAP TweenMax" ] }
{ "confidence": [ 91.64021301269531, 78.06262969970703, 75.86360168457031, 75.10126495361328, 74.51203155517578, 69.9157485961914, 67.64118957519531, 64.70419311523438, 64.57530975341797, 63.705352783203125, 60.828575134277344, 59.346595764160156, 58.43376922607422, 57.02317810058594, 54.78533172607422, 53.35560607910156, 52.31000518798828, 51.540557861328125, 51.074928283691406, 49.664337158203125 ], "content": [ "Question : I want to adjust the hue of an art asset from one bright color to another one keeping the monochromatic features intact . I will be starting with either a RGBYTP red green blue yellow teal or purple color then through hue adjustments I will be able to make it look like each one of the other RGBYTP colored images . For example take any one of these colored eyeballs and through AS3 hue adjustment be able to make any of those other colored eyeballs . A common technique in web game design . eyeballs http : quadradius.com stuff RandomImagesForLinking hue-adjusted-eyeballs.jpg .. . .. . I often use GreenSock Animation Platform TweenLite TweenMax but both core AS code and the TweenLite engine don t seem to handle hue as I expect . I want to adjust the hue color wheel by an increment of 60 degrees which should adjust through all 6 secondary colors nicely and get a full bodied color result from it . But what I actually get is horrendous . In fact adjusting the hue of an RGBYTP color returns very weird results earth tones pastels even shades of gray . bad-hues http : quadradius.com stuff RandomImagesForLinking 6-colors-all-hue-adjusted.jpg .. . .. . Here is the code I use to generate all those circles with . Why do AS3 or TweenLite Max not handle hues like Photoshop or an artists color wheel What am I doing wrong Comment : Flash only supports RGB and ARGB colour formats . You ll need to cycle thru hues and convert each one to RGB format before applying it - googling should provide some algorithms for converting Comment : I m already using what many consider to be a great package of algorithms the GreenSock platform . It is used for tweening transformations timers and color manipulation and includes a hue function . But even their arguably respected hue function seems to return lacking results . The results of the algorithm are in the image with the circles I included . For example if you start with purple you can never produce yellow . .. . Answer : I suspect the GreenSock platform is using Flash s own fl.motion.AdjustColor http : help.adobe.com en US FlashPlatform reference actionscript-3 fl motion AdjustColor.html which doesn t perform a particularly great transformation between RGB and HSV as you ve discovered . You have to take into account the perceptual brightness of different colours in order for it to look right so it s somewhat subjective . This page http : beesbuzz.biz code hsv color transforms.php has a good explanation and some sample code with scaling values for a much more natural looking hue shift . You can use that to generate a matrix for a flash.filters.ColorMatrixFilter http : help.adobe.com en US FlashPlatform reference actionscript-3 flash filters ColorMatrixFilter.html then you ll probably have to write a function which takes the current tween time and run it onUpdate to use that with TweenMax . Comment : Thanks I read up on how colors are perceived with different intensities . It turns out that with the built-in Flash and Greensock hue code there is simply no way to generate certain colors depending on what color you start with . i.e . Purple will never become yellow . I had a conversation about it over on their forums and went into more detail at the time because they had a better grasp on it . forums.greensock.com topic http : forums.greensock.com topic 7052-hue-values-around-the-color-wheel-not-saturated-as-expected I ended up with similar outcome using the matrix and bypassing Adobe s hue code . Comment : That page s step 2 seems to be exactly what I could have used . And it would be more flexible than my solution over on the greensock forums . If I get a chance I will revisit my old code and use their U cos H 180 W sin H 180 examples . Great stuff", "Question : null .. . Answer : I have many shapes -not spritesheet only shapes- shape 1 shape 2 .. . shape n which are different frames of the same object . I use Greensock tweenlite for animation but I don t know how can I put all together . How can I get all my shapes displayed as a movieclip frames in EaseJS Best Regards Rosa Comment : Are you trying to replace TweenJS usage in the Flash export with Tweenlite Tweenlite is great for tweening but TweenJS has some special capabilities to make it handle MovieClip-style frames when exporting from Flash .", "Question : I am trying to make a fade in out in a music in a Flash CS5 project . I imported the sound to library set a classname for Export for ActionScript and I was trying to fade with TweenLite TweenMax like this : .. . .. . But it just doesn t work . I tried to import the volume plugin on TweenLite and still nothing . I got no error at all though . Am I doing anything wrong Plus is there any good complete AS3 library for music Thank you . : .. . Answer : sorry I kind kind of a strange behaviour from these lines-of-code . My sound fades out and yoyos back . after the soundchannel is at the same volume as before onComplete is executed normally . Any ideas themeChannel sndTheme.play 0 99999 TweenLite.from themeChannel 2 volume : 0 onComplete : stopTheme .. . .. . edit : I got it working by Tweening a SoundTransform Object : .. . .. . thanks to : http : www.zedia.net 2008 fading-out-volume-using-tweenlite", "Question : I am trying to make a fade in out in a music in a Flash CS5 project . I imported the sound to library set a classname for Export for ActionScript and I was trying to fade with TweenLite TweenMax like this : .. . .. . But it just doesn t work . I tried to import the volume plugin on TweenLite and still nothing . I got no error at all though . Am I doing anything wrong Plus is there any good complete AS3 library for music Thank you . : .. . Answer : I use TweenMax for this it s pretty straightforward .. . .. . http : www.greensock.com tweenmax Comment : Wow Thank you . Why this works with TweenMax and not TweenLite hehe : Comment : because you apply the tween to the sound not the soundChannel Comment : I didn t know GreenSock can do this . Thank you . Comment : I guess the link should be greensock.com tweenmax-as http : greensock.com tweenmax-as", "Question : I was wondering if it is possible to Repeat and Reset a loop . I m using TweenLite to create a slide animation of 3 images . Each with a delay of 3 second between them . After 6 seconds I want this loop to repeat itself so I have a slideshow . Any suggestions because so far I have ended up with endless loops causing it to crash . .. . Answer : Put the code in a function : .. . .. . Then call the function whenever you want to start the animation again : .. . .. . To do so in an interval use a Timer http : help.adobe.com en US FlashPlatform reference actionscript-3 flash utils Timer.html .. . .. . Which would require a changing the signature of the function to", "Question : I got a div with the id start . When I click on it I want to let it move . I added an onclick event on to the function Move .. . .. . For some reason TweenLite rejects to animate the object . Does anyone have an idea what may cause this Update : .. . .. . I get no errors in the console neither any warnings . The log shows up in the console though so I know that the function is executed . TweenLite is loaded in the head tags using the following line .. . .. . And it s for the following div : Comment : Could you provide additional information like any errors you might be getting any information send to console etc what have you tried to resolve the issue post more of your code if you think it will help . Here http : stackoverflow.com help how-to-ask is a good reference on asking good questions that will get you the best response . Comment : Are you loading the GSAP CSSPlugin . . It is required when you want to animate CSS properties such as x translateX . TweenLite does not include the CSSPlugin in TweenLite . But TweenMax does include the CSSPlugin for convenience . Visit the CSSPlugin Docs for more info : greensock.com docs HTML5 Plugins CSSPlugin http : greensock.com docs HTML5 Plugins CSSPlugin . . Also see the TweenMax Docs : greensock.com docs HTML5 Animation TweenMax http : greensock.com docs HTML5 Animation TweenMax Comment : I noticed you re only animating literally 1 pixel to the right x : 1 so perhaps it s animating fine but you just don t really see it because it s animating 1 pixel over the course of 1 full second . Remember x : 1 is like transform : translateX 1px which is like an offset from the element s normal position in the document flow . It s not an absolute pixel coordinate on the stage page . .. . Answer : Check if GSAP libraries CSS plugin included are loaded . Be sure your Move function is declared AFTER your div button has been loaded .", "Question : null .. . Answer : I am developing an animation with GreenSock TweenLite . All seems to work but I have a problem on iphone . In this device when on first time scroll down the screen change the height because the bottom line menu go to hide . This made reload my animation and makes my first image to animate desappear . On this moment if I push up my finger from the screen the image appear again and I can use normally all animations . Is about the code from GreenSock TweenLite Or is possible to not desappear the bottom iphone Safari menu Wait for yours opinions . Thank you", "Question : I m drawing a large shape using an array of points in a for-loop and tweenlite as found at http : www.flashperfection.com tutorials Animated-line-drawing-using-TweenLite-in-AS3-22013.html .. . .. . I would like the animation to complete before continuing but I m unable to find a way to be notified when the full animation is complete . onComplete does not work as it triggers on the first set of coords . I also tried triggering when .. . .. . but the loop finishes multiple seconds before the animation completes . I would like to avoid using a timer . Comment : You need to approach the problem a different way . In Actionscript code executes between the rendering process . Your loop needs to finish for the user to be able to see anything so you ll have to use an event-listener or a callback . Comment : The callback didn t work but your comment to approach the problem in a different way did Instead of waiting for the animation to finish I wait until dot2 gets to the final coords . if dot2.x 460 dot2.y 440 myFunction .. . Answer : You could do an asynchronous loop by doing something like the following : .. . .. . .. . .. . Now you could save yourself the trouble and just use TimelineLite http : greensock.com timelinelite made by the same author which makes sequencing multiple tweens very easy . Comment : Thank you - TimelineLite is what I needed . :", "Question : I want to adjust the hue of an art asset from one bright color to another one keeping the monochromatic features intact . I will be starting with either a RGBYTP red green blue yellow teal or purple color then through hue adjustments I will be able to make it look like each one of the other RGBYTP colored images . For example take any one of these colored eyeballs and through AS3 hue adjustment be able to make any of those other colored eyeballs . A common technique in web game design . eyeballs http : quadradius.com stuff RandomImagesForLinking hue-adjusted-eyeballs.jpg .. . .. . I often use GreenSock Animation Platform TweenLite TweenMax but both core AS code and the TweenLite engine don t seem to handle hue as I expect . I want to adjust the hue color wheel by an increment of 60 degrees which should adjust through all 6 secondary colors nicely and get a full bodied color result from it . But what I actually get is horrendous . In fact adjusting the hue of an RGBYTP color returns very weird results earth tones pastels even shades of gray . bad-hues http : quadradius.com stuff RandomImagesForLinking 6-colors-all-hue-adjusted.jpg .. . .. . Here is the code I use to generate all those circles with . Why do AS3 or TweenLite Max not handle hues like Photoshop or an artists color wheel What am I doing wrong Comment : Flash only supports RGB and ARGB colour formats . You ll need to cycle thru hues and convert each one to RGB format before applying it - googling should provide some algorithms for converting Comment : I m already using what many consider to be a great package of algorithms the GreenSock platform . It is used for tweening transformations timers and color manipulation and includes a hue function . But even their arguably respected hue function seems to return lacking results . The results of the algorithm are in the image with the circles I included . For example if you start with purple you can never produce yellow . .. . Answer : Two colors don t go straight to black on the Real Color Wheel . Yellow goes to brown first and cyan goes to blue first . The brown is reds darkest color before black . Cyan goes to blues darkest color before black . I don t know any java but I sure would like a java wheel like this one . http : acko.net blog farbtastic-jquery-color-picker-plug-in .. . .. . The yellow eye is using the RGB gradation to dark and that s why it looks greenish the same for the cyan colored eye . I have the coded gradations in a table I made on this website . http : www.realcolorwheel.com colorwheel.htm You can get the color-codes on the source page . Don RCW Comment : Nice color wheel and it looks like you know your color rules But not sure if that answers it . The top image made in photoshop is just an example of what I want . When using the built-in Hue function in the Tweenlite package I don t get those results at all circles image . For example if I start with red the hue function produces a brown Purple will never get you anything close to yellow One of blue s go to near black It s like the hue algorithm is more suited to pick another pretty color rather than a hue adjusted output . Looking more for an AS3 algorithm answer but thank you", "Question : I am trying to make a fade in out in a music in a Flash CS5 project . I imported the sound to library set a classname for Export for ActionScript and I was trying to fade with TweenLite TweenMax like this : .. . .. . But it just doesn t work . I tried to import the volume plugin on TweenLite and still nothing . I got no error at all though . Am I doing anything wrong Plus is there any good complete AS3 library for music Thank you . : .. . Answer : PatrickS is correct about the fact that you should tween the volume of the SoundChannel not the Sound itself . TweenMax automatically activates the VolumePlugin along with several others but you can do that manually for TweenLite like : .. . .. . For what it s worth you might also want to check out LoaderMax which has an MP3Loader class that makes working with external sounds easier . It has its own volume property that you can tween too . http : www.greensock.com loadermax", "Question : I m drawing a large shape using an array of points in a for-loop and tweenlite as found at http : www.flashperfection.com tutorials Animated-line-drawing-using-TweenLite-in-AS3-22013.html .. . .. . I would like the animation to complete before continuing but I m unable to find a way to be notified when the full animation is complete . onComplete does not work as it triggers on the first set of coords . I also tried triggering when .. . .. . but the loop finishes multiple seconds before the animation completes . I would like to avoid using a timer . Comment : You need to approach the problem a different way . In Actionscript code executes between the rendering process . Your loop needs to finish for the user to be able to see anything so you ll have to use an event-listener or a callback . Comment : The callback didn t work but your comment to approach the problem in a different way did Instead of waiting for the animation to finish I wait until dot2 gets to the final coords . if dot2.x 460 dot2.y 440 myFunction .. . Answer : As I said in my comment you need to use a callback . I m not too familiar with TweenLite but can you add the onComplete callback to the last call only Something like this : Comment : Sorry but this had no effect . The loop seems to run through the entire array immediately not waiting for the delay of each tween so the loop completes before the animation completes .", "Question : I can create a TweenLite like this : .. . .. . At this point it automatically plays . How can I get it to not auto-play but instead manually start it at a later time with : .. . Answer : Many thanks to the GreenSock Forum moderator who came up with this answer :", "Question : I m trying to get a shape object to rotate around its centre using TweenLite but it rotates around its x y . Seems like the transformOrigin of TweenLite is not working . I am still new with EaselJS and TweenLite . Please see this jsFiddle http : jsfiddle.net phuongle2611 n0kyvh1j 2 or take a look at the snippet below : .. . .. . Snippet : .. . .. . .. . var canvas document.getElementById mainCanvas .. . var stage new createjs.Stage canvas .. . .. . var shape new createjs.Shape .. . shape.graphics.beginFill 000 .. . shape.graphics.drawRect 0 0 220 220 .. . shape.graphics.endFill .. . shape.x 220 .. . shape.y 220 .. . stage.addChild shape .. . stage.update .. . TweenLite.ticker.setFPS 40 .. . TweenLite.ticker.addEventListener tick stage.update stage .. . .. . TweenLite.to shape 1 .. . repeat : -1 .. . rotation : 360 .. . transformOrigin : 50 50 .. . .. . .. . .. . script src cdnjs.cloudflare.com ajax libs EaselJS 0.8.0 easeljs.min.js script .. . script src cdnjs.cloudflare.com ajax libs gsap 1.17.0 TweenMax.min.js script .. . canvas id mainCanvas width 800 height 800 canvas .. . Answer : You can set regX and regY to transform something around its center check the updated jsfiddle : http : jsfiddle.net n0kyvh1j 3 Comment : Thanks guys . It works", "Question : null .. . Answer : Is it possible to have global reusable animation properties in GSAP I m referring to TweenLite or TweenMax in particular . For example if I were to have the following : .. . .. . but the paused and ease properties were used in numerous other places could they be abstracted out somehow I tried something akin to : .. . .. . but without success as Animate wouldn t inherit GSAP s play method .", "Question : I am using TweenLite to complete some SVG animations but for some reason every time i reload the page the first time I hover the element with the animation the durration of the animation is instant . Then after the first time the hover effect is added instantly the animation works properly . CodePen http : codepen.io Zlerp pen adEZzE .. . .. . Just reload the page hover the object and you will see the error I am receiving . Thanks for your time .. . Answer : The main problem is not in the javascript but in the CSS . The .social-circle class does not have a fill which means it is actually 000 . This solves the initial animation http : codepen.io foozle pen zrpBmL you may or may not have noticed that the fill -animation uses a somewhat bright-colored transition from nothing to the purple . This seems to be because TweenLite interprets fill : none as fill : rgba 255 255 255 0 the latter being transparent white which in itself is not visible but the steps in the transition are . This is why I opted for the transparent version of your color in the code above . Now that your question is answered I feel like I should take some time to help you reducing the overall complexity of your solution . The way I see it you have used two different and rather large javascript libraries to achieve what should have been a very simple CSS declaration . With this style you can drop all of the javascript as demonstrated in this pen http : codepen.io foozle pen BjJzML . Comment : Thank you for your help this works perfectly Now i can throw out some of this JS .", "Question : I am trying to do a simple animation of top-margin using GreenSocks TweenLite for Javascript . I ve used the library many times but for some reason it s not working this time . Note : The onComplete is firing but no matter what element I use I cannot animate any CSS properties on HTML elements . HTML .. . .. . JAVASCRIPT .. . .. . Here is a real quick JSFiddle I created that includes all the CSS JS and HTML . http : jsfiddle.net mBPug .. . .. . If anyone has any ideas I would appreciate it Comment : It might help if you made a jsfiddle that demonstrates the issue you are having . Comment : Good call . I just updated my post . .. . Answer : A few things : .. . .. . add the CSS plugin cdnjs.cloudflare.com ajax libs gsap latest plugins CSSPlugin.min.js to your fiddle .. . margin-top wasn t going to do much use top instead .. . .. . . http : jsfiddle.net mBPug 4 Comment : No this doesn t get the effect I m looking for . What I m trying to do is reveal the h2 and h3 . I tweaked a few things in the JS fiddle to show what I m trying to accomplish . If I use JQuery animate it works . If the only issue was the CSS plugin I might be able to get it to work now . I ll give that a shot . Comment : Since my answer is based on your original question I believe this is solved . However if you re still having problems with the animation itself you should open another question . Comment : Hey Tim- It looks like it was just the CSS plugin . I ve never included that before and I haven t had a problem . I m creating something for a legacy site so I was trying to keep the number of plugins and new JS files to a minimum . But when I added it to the site it popped up started working immediately . Thanks for your help .", "Question : I am trying to make a continuous motion . And I use tweenlite and want it restart when done . Here is the code .. . .. . and this function is called by a ENTER FRAME function which is fixedUpdate . I am lost right now . Any help will be deeply appreciated . edit : here are fixedUpdate and ENTER FRAME .. . .. . and Comment : It would help if you also showed the ENTER FRAME and fixedUpdate parts of the code . It sounds like that s where the problem is . Comment : I have edited the question . .. . Answer : Why you added this line TweenLite.to method will be fired about 24 times per second When animation completed and fixedUpdate function called you should reset cop bir and balik y position to repeat animation . P . S . You can use repeat parameter of TweenLite to repeat animation several times . Comment : Also there is an endless loop as fixedUpdate calls npcMotions which will call fixedUpdate on process completion and so on.. . This should also be fixed . Comment : Thanks for the answer . I did not know TweenLite figures 24tps on its own . Now it makes sense . Comment : @coner Remove the last line of the init function .", "Question : I am applying filters to a bitmap using something like : .. . .. . TweenLite.to origBitmap 0 colorMatrixFilter : saturation : 2 brightness : 3 .. . .. . and that works fine . I need to somehow apply a sharpen filter to origBitmap which I have successfully achieved using a ConvolutionFilter . The problem is after I ve ran the above tweenlite call then create a convolution filter and apply it to origBitmap it removes the initial saturation and brightness filters and just keeps the sharpen filter .. . .. . Is there a way to also incorporate the ConvolutionFilter in that TweenLite call above I ve searched quite a bit and found some guy made a class called TweenMan which was based around your class where ConvolutionFilter is incorporated : https : github.com danro tweenman-as3 .. . Answer : Nothing to do with TweenMax here since your code is the one making the mistake . This correctly removes all current filter and apply only one : .. . .. . Since filters property is either null or is an Array . To add a filter to the list you use array operation and reapply the array : .. . .. . EDIT : starting over since I think I understand what you are trying to do . You are avoiding creating the filter yourself and let TwennLite do it for you even tough you don t need to tween anything . Don t do that you are making everything harder for yourself . Instead create your filter that way : .. . .. . If you need to animate multiple filters remember that most tween engine can tween easily array values so you can just do that and then apply those array values to your filters . Comment : I ve tried that and it isn t working . I d rather not use TweenLite but the syntax for applying filters makes it so easy . I ve also tried doing bitmap.filters bitmaps.filters conv Comment : The tween is running at the same time and messing up the whole filters property . Not sure if TweenLite supports running 2 filters at the same time but either way you can easily do it yourself . I ll show you how if you need to . Comment : why is the tween time set to 0 Comment : I tried adding a timeout of 1 second to apply the convolution filter and no luck . I am simply using TweenLite because of its easy syntax of applying brightness saturation and contrast . I am looking into how to apply those effects without tweenlite because I think I could solve the problem that way . The 0 second tween time is because I don t need it to actually tween . Comment : then apply it directly in the filters property directly .", "Question : Using GSAP I want to create one TweenLite or TweenMax object which acts different animations intended to play in parallel on multiple different objects . How can this be done I have only seen allTo which applies same animation on an array of multiple objects . It is important to get one tween as I need to pass it to ScrollMagic . I figured I can use TimelineLite or TimelineMax to do this too since that s OK with ScrollMagic . However is it possible purely using TweenLite or TweenMax Or the timeline is the only way to go Comment : If you intend to do different animations on multiple elements then yes TimelineMax is the best option . And I believe ScrollMagic can take TimelineMax and treat it as one single tween based on the assumption that you are going to be using its setTween method . .. . Answer : If you were to just use TweenMax and not TimelineMax . . then you could just use method-chaining and chain your tweens using TweenMax .. . .. . Using TimelineMax would be give you greater control . You could also chain with the TimelineMax constructor : .. . .. . Or just do like you were doing but with chaining : .. . .. . See TweenMax docs for more information : http : greensock.com docs HTML5 GSAP TweenMax Comment : Although you can chain TweenMax or Lite the .to method in TweenMax is a static method https : greensock.com docs HTML5 GSAP TweenMax to . Hence the tweens variable will just have the last call s tween object the other animations will play but won t be controllable . There is no true chaining happening and the code is misleading . In TimelineMax or Lite the .to method is non-static https : greensock.com docs HTML5 GSAP TimelineMax to so you are in fact doing a true chaining . Comment : Also I don t see the point in your last code block . If I already assigned it to var timeline why re-assign it to another var tl What advantage does it provide I can just use timeline variable in subsequent code . Comment : its just another way to assign your timeline to a variable. . you can see that in practice here when i assign many timelines to multiple elements . Storing my timeline in a variable and then assign that variable to another var associated with each DOM element . . see this example codepen.io jonathan pen KdYqWo http : codepen.io jonathan pen KdYqWo Comment : I changed line 22 to el.animation tl and removed the assignment var t tl replaced it with just tl . The page still works the same . Both var tl and var t are actually pointing to the same TimelineMax object . It doesn t seem to offer any advantage to assign the same object to two different variables . see : codepen.io anon pen MKyWbG http : codepen.io anon pen MKyWbG PS : TweenMax chaining in your answer is misleading . You should make a note of it and strike it out . Comment : Sorry about that codepen sometimes parses javascript wrong due to their infinite-loop check which can cause it to be buggy . When i originally made that code example codepen wasnt allowing it even though it worked on my remote testing server .", "Question : I m using tweenlite library to rotate move and zoom image . The problem is that I get 3D transformations on image but I would like to have 2D transformations . If tweenlite detects that there is browser which doesn t support 3D he will do 2d . How can I force him to always do 2D It must be some setting . Or just disable 3D . 3d inside svg doesn t work in any IE browser .. . .. . This is ok : .. . .. . This is what I don t wont to have : .. . .. . transform : matrix3d 0.1082 0 0 0 0 0.1082 0 0 0 0 1 0 53.5881 48.8135 0 1 .. . Answer : I think what you are looking for is called force3D http : greensock.com docs HTML5 GSAP Plugins CSSPlugin . Navigate to this link I shared and look for section named force3D on this page . Currently force3D defaults to a value of auto which means it will automatically decide when to use transform3d and when not to . Also there is a way to set it globally instead of appending it into every tween : .. . .. . Hope this helps . Comment : Hi I don t have such option . And if I inspect CSSPlugin I have only : defaultSkewType defaultSmoothOrigin defaultTransformPerspective . Comment : can you try adding force3D : false into your tweens first . How does your code look like right now Can you edit your question and add your JS code please Comment : Yes with this it works . Thanks ." ] }
[ "yes-answer-long", "yes-answer-short" ]
actionscript
UNK_RELATION
tigase@web@83
tigase -- tigase is an open-source gpl3 collection of xmpp jabber software server @placeholder client test-suite implemented in java .
{ "confidence": [ 62.42060470581055, 57.58799743652344, 57.308021545410156, 55.86323547363281, 55.0750732421875, 52.72940444946289, 52.278594970703125, 51.515357971191406, 49.627685546875, 49.5019645690918, 48.256309509277344, 47.664756774902344, 46.728172302246094, 46.57590103149414, 46.040340423583984, 44.987674713134766, 44.94034957885742, 44.82064437866211, 44.70376205444336, 44.31557846069336, 44.31557846069336, 44.31557846069336, 44.31557846069336, 44.233341217041016, 43.91389846801758, 43.42353057861328, 43.19384765625, 43.171363830566406, 43.171363830566406, 42.82243728637695, 42.82243728637695, 42.769683837890625, 42.50857925415039, 42.444393157958984, 42.053768157958984, 41.806522369384766, 41.39830780029297, 41.39830780029297, 41.36436080932617, 40.85871124267578, 40.35886001586914, 40.35886001586914, 40.288421630859375, 40.288421630859375, 40.08176040649414, 39.953460693359375, 39.953460693359375, 39.953460693359375, 39.898860931396484, 39.17817306518555, 39.17817306518555, 39.16152572631836, 38.93754577636719, 38.93754577636719, 38.519264221191406, 38.436241149902344, 38.344261169433594, 37.889198303222656, 37.84326934814453, 37.6463737487793, 37.6463737487793, 37.6463737487793, 37.6463737487793, 37.6463737487793, 37.6463737487793, 37.6463737487793, 37.56616973876953, 37.56616973876953, 37.56616973876953, 37.40863800048828, 36.79450225830078, 36.79450225830078, 36.71147918701172, 35.92161178588867, 35.83059310913086, 35.65028381347656, 35.65028381347656, 35.65028381347656, 35.36959457397461, 35.04893112182617, 34.77739715576172, 34.77739715576172, 34.77739715576172, 34.77739715576172, 34.77739715576172, 34.640689849853516, 34.478515625, 34.478515625, 34.410865783691406, 34.27891159057617, 34.25686264038086, 34.091339111328125, 34.091339111328125, 34.091339111328125, 34.091339111328125, 34.091339111328125, 34.091339111328125, 34.091339111328125, 33.838504791259766, 33.40602111816406 ], "content": [ "The server is using Tigase XMPP .", "I am using Tigase XMPP server .", "I m trying to test my Tigase XMPP server with tsung load test .", "I am building a component for tigase XMPP server .", "How can I get a list of all the users in a Tigase Xmpp server", "QoS is a way to guarantee message delivery in Tigase XMPP .", "For Tigase scalability look at Scaling Tigase XMPP server on Amazon EC2 https : stackoverflow.com questions 8670234 scaling-tigase-xmpp-server-on-amazon-ec2 8672592 8672592 .", "I m just started looking into the tigase XMPP server and having issue configuring the server for a spark client to connect .", "we need to reroute mail as xmpp packet from postfix to tigase server .", "Exception while starting the Tigase server .", "I ve looked at tigase which is another XMPP server that leaves a smaller footprint .", "And the last thing - you run Java with default memory settings for the Tigase server .", "Using tigase .", "XEP-0198 is a important feature which Tigase xmpp client supports specially for android client implementations .", "have you installed Tigase ... .", "And Tigase support caching of server data.So I need any other information regarding voice chat implementation using tigase .", "And it seems it cannot connect with the tigase server for some reason .", "We are using Tigase XMPP server through which XMPP clients on Android and iOS Apps communicate text messages there are Android and iOS developers in my team .", "I am working in android chat app.I would like to use one of the following xmpp client Tigase Asmack .", "Is tigase the correct answer", "There are no classic roles in Tigase .", "use the Tigase Web UI .", "Tigase version : 7.0.2 .", "I looked at the documentation on the tigase website .", "I m building an android application with chat functionality which uses a XMPP server which is tigase .", "My first test script would be only registering users on the Tigase server .", "I can talk for Tigase only as I am Tigase team member .", "The problem is probably with the Tigase configuration .", "But openfire isn t salable as Tigase .", "There might be some problem in Tigase server which is not returning the first message .", "Also what version of the Tigase server do you use", "I m developing a chat application using Tigase server in the background for providing the XMPP communication .", "But only issue with tigase is lack of documentations", "I m new to xmpp in fact and I try to use tigase as client lib and openfire as server and in the simple official example if client use disconnect method of class tigase.jaxmpp.j2se.Jaxmpp the status shown in the server of this client will be offline i.e .", "@tdevinda Sorry that I didn t learn more about tigase client since then .", "There are 2 ways to gather Tigase statistics : .. . .. . 1 .", "I m trying to load a SSL certificate sign by thawte http : www.thawte.com in a XMPP server running on Tigase 5.2 .", "stackoverflow.com questions 18900306 http : stackoverflow.com questions 18900306 domain-connection-issues-with-tigase-xmpp-server", "I am form Tigase team .", "I downloaded the source for tigase and changed the timers manually in it s client-side communication .", "There is REST API available in Tigase but why do you think it would be faster than using XMPP", ".. . .. . I am just a beginner in XMPP and just have fundamental conceptual knowledge about Tigase so pardon any typos .", "One more thing about Tigase is that Tigase maintains in memory rosters once user gets login .", "I m not familiar with Tigase but it appears that its MUC service comes in a separate component http : www.tigase.net content tigase-muc .", "I read in the tigase forums that this is the typical behavior .", "I m using Tigase-5.1.5-b3164 version on ubuntu-server and Eclipse as IDE .", "Also I am able to successfully ping the Tigase server IP address .", "I have installed tigase server in my linux machine .", "I faced the similar problem on client-side we can t do anything for that as XMPP Tigase server automatically returns all the offline messages when user comes online .", "Derby database server in Tigase Server failed to start and I could see the following exception in tigase.log .", "Details : Connection Error : Unable to connect to server .. . .. . Not sure why only localhost works and not bib as domain names for the tigase server .", "I have installed Tigase Server and used following links for REST API : .. . .. . https : projects.tigase.org projects tigase-pubsub wiki REST API 7 Delete-an-item-from-a-node .. . .. . http : docs.tigase.org tigase-server snapshot Administration Guide webhelp rest api pubsub.html create a node .. . .. . I want to test those API .", "I have done similar kinds of customization in Tigase .", "Tigase allows you to include anything in the message packet .", "Usually such a filtering you speak about is done in the Tigase filter called preprocessor .", "Please use all lowercase characters in domain-name in both the Tigase configuration and in the client configuration for the user s JID .", "hi I am using Tigase and xmpp for chat application everything is working fine except i am not receiving first offline message .", "After installing Tigase on an AWS EC2 instance I keep getting the error message connection-refused when I try to connect to it using an xmpp client .", "For basic XMPP features Tigase binaries take no more than 1.5MB and if necessary it could be reduced to something below 1MB .", "I m developing an IM app use tigase as server and use asmack library in android side .", "And do you have experience on development android IM app and server-side is tigase .", "We want to filter that list on the Tigase server based on some business logic using the newly added columns in the tig users table .", "I just made up a domain BIB and tried to connect to the tigase server through the admin@BIB user account .", "Platform : Windows 8 Version : tigase-server-5.1.5-b3164 .. . .. . Any advice appreciated Thanks D", "I m using tigase-server-5.1.5-b3164 and i m where would i find the psi connection logs .", "The tigase-server logs doesn t report anything when i try to register a domain with psi .", "I am testing Tigase by using Tsung .", "More on tigase forum https : projects.tigase.org issues 2232 .", "Apparently Amazon Linux doesn t play well with Tigase .", "The other part of Tigase is you need to dig into the code on your own there isn t much help available else than Tigase http : www.tigase.org offical website .", "Can I add a http api to send broadcast message using tigase", "I have successfully installed Tigase with mysql and everything worked great .", "I don t know whether openfire and tigase use the same mechanism on this kind of client leave .", "Tigase shows last seen information which indicates that when this person was last seen by the server .", "It s my fault in client-side I must specify the MUC service name as configured in server-side It s different with tigase service name configured as below : .. . .. . So the client-side code is as below : .. . .. . Thanks to @Haider .", "I have a problem with connecting to Tigase with JMX from JBOSS 7.x .", "I will recommend you to choose Tigase if and only if you are looking for high scalability .", "After successfully installed tigase i found following in etc init.properties .", "What is the easiest way to override the OfflineMessages class in Tigase jar file without building the whole source code of the project", "Our tigase logs because thats what we re using show that the messages did actually hit the jabber server and were sent to appropriate users one at a time .", "When one of the users is offline the Tigase server saves that message and then delivers it when the user becomes online again .", "I installed and configured Tigase server for distributing device state between multiple Asterisk servers .", "As you can see i used an IP address to distinguish my Tigase server .", "I had the same problem with the Tigase server and Asterisk your problem is that you set : .. . .. . config in your xmpp.conf .", "Here is my init.properties file content which sets the option to configure Tigase server .", "The only thing I ve found after searching was that the JabberIqAuth isn t used but rather the tigase-custom-authenticator http : www.tigase.org content tigase-custom-auth-connector is actually used and this would require me to change the server and recompile it instead of using a plugin .", "You have to connect from through an admin account to the Tigase server browse service-discovery and then execute command on the Statistics provider component .", "@Haider I have used asmack library in Android side I do not if problem exist when the communication between asmack and tigase server .", "Unless you would like to specifically load test the client registration I would recommend to pre-create your userbase directly in Tigase .", "Interested in getting more pro cons with vysper in comparison to openfire and tigase as well .", "If it is not set than server set it to .. . .. . Can anyone please let me know how tigase server keep tracks of this last seen information .", "Tigase fully implements privacy lists why you do not want to use them", "In my Tigase component i have override getStatistics method to add the statistics i.e .", "You can write a very simple command-line tool which collects Tigase statistics and dumps it to a text file .", "oooopppsss sorry i forget to tell you at fist that how to address a component in TIGASE .", "We have added some extra columns to the Tigase DB Table tig users due to our business requirements .", "We do NOT want Tigase to send out details of all the users available in the tig users table .", "Artur do you mind if i ask you some questions through email about tigase if that wasn t to much trouble", "Then you can collect all the Java statistics plus the Tigase provides own bean to browse it s statistics or just download them all it might be 1 000 or more metrics from the server .", "@semis If you can paste me exact error from server Tigase logs i can help you" ] }
{ "confidence": [ 71.88186645507812, 70.9173583984375, 70.28654479980469, 68.99270629882812, 67.49622344970703, 66.39909362792969, 65.77198791503906, 65.32585906982422, 64.84967803955078, 64.70024871826172, 63.488121032714844, 63.33232498168945, 62.893341064453125, 62.743289947509766, 60.156124114990234, 59.734596252441406, 59.28181457519531, 58.63225555419922, 58.166324615478516, 58.03206253051758 ], "content": [ "Question : I m building an android application with chat functionality which uses a XMPP server which is tigase . I ran into this neat issue of which when a user s data connection drops the presence state still displays as online . I read in the tigase forums that this is the typical behavior . It takes by default about 10 minutes to update the status . But we all know that chat apps like Gtalk used to show presence correctly in this type of situations . So my questions are : .. . .. . 1 . Is this normal in XMPP What trick hack workaround will help me overcome this I have already tried editing the init.properties file and restarting for a timeout of 10s but still no response .. . .. . 2 . Is tigase the correct answer My user base would be around a couple of thousand users max if this starts up and it would not matter to change into a more simpler XMPP server 3 . Will requesting presence for a peer force the server to re-check the connection status of users will that trigger any presence updates My client library is Asmack . if that helps .. . .. . Thanks in advance : .. . Answer : I m new to xmpp in fact and I try to use tigase as client lib and openfire as server and in the simple official example if client use disconnect method of class tigase.jaxmpp.j2se.Jaxmpp the status shown in the server of this client will be offline i.e . not in the client list otherwise the status will be online for long time after client leave . I don t know whether openfire and tigase use the same mechanism on this kind of client leave . Comment : I downloaded the source for tigase and changed the timers manually in it s client-side communication . I was able to achieve this with those timers . I think the c2s XXXX settings in init.properties can be tweaked to do the same . But this will load the server for large implementations . Comment : @tdevinda Sorry that I didn t learn more about tigase client since then . Documents are not mature compared to that of aSmack . Comment : no worries . I m still to replicate this on another server . I will post the results as soon as I finish . Comment : @tdevinda Cool Good luck to you .", "Question : I am making a chat system and am new to xmpp technology.For server I am confused among ejabbered openfire or tigase.I don t know erlang.And am good at java . I am looking in a case where I have to change a user roster again and again everytimes a user logged in.And that too completely.So I am thinking to control user roster by myself and not by xmpp server.Morever I want to control what to do when a user went idle busy . And many more.And for security it will be great if it can be done on server-side rather than client-side . so how should I customize the xmpp server.And as I need to customise a lot which server should I use Based on how easy its to learn them and customise them .. . Answer : I have done similar kinds of customization in Tigase . I will recommend you to choose Tigase if and only if you are looking for high scalability . For Tigase scalability look at Scaling Tigase XMPP server on Amazon EC2 https : stackoverflow.com questions 8670234 scaling-tigase-xmpp-server-on-amazon-ec2 8672592 8672592 . The other part of Tigase is you need to dig into the code on your own there isn t much help available else than Tigase http : www.tigase.org offical website . In openfire you can get much community support in term of blogs and tutorials as compared to Tigase . But openfire isn t salable as Tigase . Also Openfire has a wide range of plugins available . One more thing about Tigase is that Tigase maintains in memory rosters once user gets login .", "Question : I m actually trying to find the best way to write a simple XMPP server or find one that leaves a really small foot print . I only care about the core features of XMPP statusing messaging group messaging . Also learning about XMPP protocol at the moment so please bear with me if i m saying something that is naive . So currently open fire is being used in our application . It s really heavy and has a lot of features that aren t necessary for our needs . I ve looked at tigase which is another XMPP server that leaves a smaller footprint . I also looked at apachi mia framework which contains or has an extension module vysper - XMPP server . I ve tried to google reviews on this when compared to other servers but can t find that much information . In general I m looking for the best way to implement a simple XMPP server either from scratch or from an already built library framework in java which leaves a smaller foot print then open fire . Interested in getting more pro cons with vysper in comparison to openfire and tigase as well . Any advice appreciated Thanks D Comment : So the question is How to implement a simple XMPP server in java Comment : Yeah sorry if that wasn t clear . I want to create a simple XMPP server handles status multi-chat . I need this to work with XMPP clients like SPARK and others out there . I plan to bridge this server with another internal chat program . I need something that is light weight smaller and less complicated then open fire . Comment : Then I suggest you edit your post and put the actual question in the title .. . Answer : I can talk for Tigase only as I am Tigase team member . For basic XMPP features Tigase binaries take no more than 1.5MB and if necessary it could be reduced to something below 1MB . We run periodic tests with small memory and all the basic features work fine even if you run Tigase with 10MB of RAM of course for no more then a few dozen online users . I think this is quite small foot print . We put a lot of effort on optimizing and testing . It is also designed to easily integrate with other systems so this is the way to go : - Of course I am biased towards Tigase which is understandable . Please wait for some more independent opinion . Comment : Thanks Artur . I ve actually had another question for you since I m exploring Tigase as the potential server now . stackoverflow.com questions 18900306 http : stackoverflow.com questions 18900306 domain-connection-issues-with-tigase-xmpp-server Comment : Do you by any chance know the footprint for openfire since you ve probably made a comparison before", "Question : I m just started looking into the tigase XMPP server and having issue configuring the server for a spark client to connect . server print out : .. . .. . I m running this version on windows and trying to connect with a XMPP client . I ve tried with both spark and the suggested PSI . I just made up a domain BIB and tried to connect to the tigase server through the admin@BIB user account . However I don t see it connect at all or any reaction from the server . I m probably missing something really small . I looked at the documentation on the tigase website . This is based off the .exe download from the website . I ve verified that the user has been created in the postgres library as well . So from that standpoint it is working . Updated------------------ So the problem has to deal with the domain-name like Artur Mentioned . However I can only get localhost to work and not sure why . Is there some external window settings i have to do to make the domain recognizable by psi .. . .. . init file : .. . .. . With this current configuration localhost can connect but when i try to add a new account - Psi : Add Account Name : bib - clicked register new account Server name : bib clicked manually specify server host port - Host : bib port : 52222 and it would complain .. . .. . There was error communicating with the XMPP server . Details : Connection Error : Unable to connect to server .. . .. . Not sure why only localhost works and not bib as domain names for the tigase server . Platform : Windows 8 Version : tigase-server-5.1.5-b3164 .. . .. . Any advice appreciated Thanks D .. . Answer : This something really small is probably the domain-name . I think this BIB domain may not be recognized and the client cannot connect to the server because it does not know where to connect . Is the client showing you any error message Also what version of the Tigase server do you use Some past versions had problems with uppercase characters in the domain-name . Please use all lowercase characters in domain-name in both the Tigase configuration and in the client configuration for the user s JID . You can also enable debug mode so it shows you more of what is going on in the server . You have to check log files to see client s connections attempts . And the last thing - you run Java with default memory settings for the Tigase server . This is fine only for development system . For any production system please refer to original startup files for recommended settings . Comment : Thanks for the response . I ve updated my entry . localhost works but bib lowercase doesn t . I m using tigase-server-5.1.5-b3164 and i m where would i find the psi connection logs . The tigase-server logs doesn t report anything when i try to register a domain with psi . THanks Comment : figured it out thanks for the help Comment : Artur do you mind if i ask you some questions through email about tigase if that wasn t to much trouble", "Question : I am working in android chat app.I would like to use one of the following xmpp client Tigase Asmack . But I don t know which one to use . Can you tell me which one is better based on performance and features available in library Comment : XEP-0198 is a important feature which Tigase xmpp client supports specially for android client implementations . As i checked asmack still doesn t support it . But only issue with tigase is lack of documentations .. . Answer : For me Asmack worked just fine . I ve had no problems with it whatsoever also smack has a very nice documentation with a lot of examples . Don t know much about Tigase all I can say is that I had a lot of fun playing around with smack . Comment : I already used asmack in my app . But it struggle in voice chat implementation using jingle . And Tigase support caching of server data.So I need any other information regarding voice chat implementation using tigase .", "Question : I m just started looking into the tigase XMPP server and having issue configuring the server for a spark client to connect . server print out : .. . .. . I m running this version on windows and trying to connect with a XMPP client . I ve tried with both spark and the suggested PSI . I just made up a domain BIB and tried to connect to the tigase server through the admin@BIB user account . However I don t see it connect at all or any reaction from the server . I m probably missing something really small . I looked at the documentation on the tigase website . This is based off the .exe download from the website . I ve verified that the user has been created in the postgres library as well . So from that standpoint it is working . Updated------------------ So the problem has to deal with the domain-name like Artur Mentioned . However I can only get localhost to work and not sure why . Is there some external window settings i have to do to make the domain recognizable by psi .. . .. . init file : .. . .. . With this current configuration localhost can connect but when i try to add a new account - Psi : Add Account Name : bib - clicked register new account Server name : bib clicked manually specify server host port - Host : bib port : 52222 and it would complain .. . .. . There was error communicating with the XMPP server . Details : Connection Error : Unable to connect to server .. . .. . Not sure why only localhost works and not bib as domain names for the tigase server . Platform : Windows 8 Version : tigase-server-5.1.5-b3164 .. . .. . Any advice appreciated Thanks D .. . Answer : K so I wasn t thinking and my knowledge of network IP is lacking . On windows you need to register the domain-name with the host file aka configure your window network to recongize the domain .. . .. . To find your host file : http : www.jafaloo.com windows-hosts-file .. . .. . Add whatever domain you want to use . For more information on what a host file does : http : en.wikipedia.org wiki Hosts 28file 29 .. . .. . This made everything work .", "Question : I am testing Tigase by using Tsung . My first test script would be only registering users on the Tigase server . But I have a strange problem of Tigase duplicating register requests for some user IDs . Take a look at the tsung.dump file below . The register request for user 43-tsung-user-2 is repeated twice . First time it is successful the second time Tigase returns conflict error 409 meaning the user is already registered . My test should take 30 seconds with users coming on 10 seconds intervals . Therefore 3 users should be created in the database . After the test finishes I can only see 2 users which is also what tsung.dump is alredy saying . Why is tsung repeating request for some users Tsung behaves similar no matter what the load is . If i raise the load numbers I will receive the similar behavior . Most of the time the number of successfully registered users will be around the half of tsung generated user count . Below is my tsung.xml .. . Answer : Tsung plays the scenario at random and will reuse some user ids . It means that each time a user is selected to play a scenario there is a risk of conflict if this is the second time that user id is used by Tsung . Unless you would like to specifically load test the client registration I would recommend to pre-create your userbase directly in Tigase . That way you can remove the registration part from you scenario and avoid registration conflicts . Comment : Wow . I would never conclude this from reading tsung docs tsung.erlang-projects.org user-manual http : tsung.erlang-projects.org user-manual conf-options.html xmpp-jabber-options . Thank you a lot . Comment : Is there any workaround for load-testing user registration scenarios Comment : Also this link indicates the issue was already fixed by ProcessOne : support.process-one.net browse TSUN-50 https : support.process-one.net browse TSUN-50 . I m a bit confused now . Comment : Indeed it should be supported since that commit for the register tag .", "Question : null .. . Answer : I am trying to host opensource im named kontalk for android . The server is using Tigase XMPP . The source code can be found here https : github.com kontalk : .. . .. . I have installed Tigase Server 7.04 downloaded from here http : www.tigase.net downloads .. . .. . on my windows 2012 server and set the server ip-address on kontalk setting to my server ip-address . But the result is kontalk cannot send message . And it seems it cannot connect with the tigase server for some reason . Maybe i missed some components or settings on my server anyone can give me guidance how to set the server Thank you very much", "Question : In my Tigase component i have override getStatistics method to add the statistics i.e . no of spam messages all process packets etc in the list . How can i access that list outside that method or component.In this Component implementation - Lesson 5 - Statistics http : www.tigase.org content component-implementation-lesson-5-statistics its written that All the server statistics are exposed and are accessible via XMPP with ad-hoc commands HTTP JMX and some selected statistics are also available via SNMP so is there any command which let me to get all the statistics . Thanks .. . Answer : There are 2 ways to gather Tigase statistics : .. . .. . 1 . Admin Ad-hoc command via XMPP . You have to connect from through an admin account to the Tigase server browse service-discovery and then execute command on the Statistics provider component . I recumbent Psi client for this . 2 . Another way is to connect via JMX protocol using JConsole or similar application . Then you can collect all the Java statistics plus the Tigase provides own bean to browse it s statistics or just download them all it might be 1 000 or more metrics from the server . 3 . Also through JMX but might be more convenient using our utility class : JavaJMXProxyOpt . You can write a very simple command-line tool which collects Tigase statistics and dumps it to a text file . The class offers a few options for a periodic statistics download etc... . Comment : thank Can you please tell me how to run bash scripts inside bash directory . Any link where i can get better understanding", "Question : null .. . Answer : I have recently been involved in studying an existing Tigase implementation that is being used as a chat room for all the users that connect to the server . Tigase version : 7.0.2 . Now in the current implementation we are registering the user through some dedicated PHP API that in turn makes use of Tigase ad-hoc commands . As i have read about Tigase it s possible to Manage all the user registration as well as their rosters automatically through some configurations or a few lines-of-code . What i am looking for is some ad-hoc commands or equivalent Java or PHP code examples for : .. . .. . 1 . Automatic User registration and Roster Management Mechanism . .. . 2 . A way to ensure that every time a user is registered he s automatically added to the roster of all other users . .. . .. . I am just a beginner in XMPP and just have fundamental conceptual knowledge about Tigase so pardon any typos .", "Question : hi I am using Tigase and xmpp for chat application everything is working fine except i am not receiving first offline message . Eg : there are 2 users A and B A send 3 messages to B but B is offline i.e . app is in Not running state but when B comes online he receive only 2 messages last 2 first message always get missed . Help me to solve this issue . Comment : when user A sends 3 messages to user B offline before user B come online check your database-table don t remember the name and make user there exists 3 xml stanza related to your 3 messages .... . .. . Answer : I faced the similar problem on client-side we can t do anything for that as XMPP Tigase server automatically returns all the offline messages when user comes online . There might be some problem in Tigase server which is not returning the first message . Because all the offline messages you will receive in .. . - void xmppStream : XMPPStream sender didReceiveMessage : XMPPMessage message and it can be checked first offline message is not returned by server .", "Question : I met a problem in my project.I used tigase to push message to android client but sometimes we should push more than 1000 users s notices at one time . Using smack api to implement this is too slow .Is anyone has new method to do this Can I add a http api to send broadcast message using tigase .. . Answer : There is REST API available in Tigase but why do you think it would be faster than using XMPP This actually depends on how you do this . Using admin ad-hoc commands either via standard XMPP or REST API you can submit 1000 or more notices with a single call . Assuming you have a list of all recipients beforehand . You can also send a message to all online users with a single admin ad-hoc command . Or maybe what you do is actually a job for a PubSub component Comment : Using admin ad-hoc commands either via standard XMPP or REST API you can submit 1000 or more notices with a single call . can you describe it in detail I want to implement this but I can t find any information about it .Can I do it use smack or the tigase client api Comment : @Arthur Hefczyc could you describe it in detail", "Question : null .. . Answer : I am quite new to XMPP with background in Java development . We are using Tigase XMPP server through which XMPP clients on Android and iOS Apps communicate text messages there are Android and iOS developers in my team . We have added some extra columns to the Tigase DB Table tig users due to our business requirements . Now when a user logs into the App installed in an Android or iOS device the XMPP server sends out a roster message showing which other users are available . We have two requirements .. . .. . 1 . We do NOT want Tigase to send out details of all the users available in the tig users table . We want to filter that list on the Tigase server based on some business logic using the newly added columns in the tig users table . 2 . We want to add custom-fields to the roster XML message which would be populated with the values from the extra columns from the tig users table . Any advice on where I should start looking to implement these requirements . Thanks and Regards Mahesh Comment : I see my question has been downvoted . Could I request the @downvoter to let me know what changes I should make to the above question what points I should add to my future posts so that they do not get down voted", "Question : After installing Tigase on an AWS EC2 instance I keep getting the error message connection-refused when I try to connect to it using an xmpp client . The instance is attached to a security group with rules to allow traffic to the necessary ports tigase needs 5223 primarily and some others for more exotic features . I ve also tried it with rules allowing all traffic to all ports from all sources but I still get the same message . I ve also checked iptables because I noticed some people needed to configure those as well in specific cases I made sure it allows all connections but still I can t connect to Tigase . Yes Tigase is running there are no relevant errors in the Tigase logs .. . SSH port 22 and HTTP port 80 work fine .. . Enabling ICMP ping on all ports works fine .. . I ve tried several xmpp clients same problem .. . I ve deleted and recreated instances several times .. . Re-installed Tigase on fresh instances several times with various configuration options .. . Tried using domain-name associated with Elastic IP normal IP and tried public DNS directly . Configured the DNS in the way necessary for Tigase as described here http : www.xmppwithtigase.org installation.html dns .. . .. . I ve looked everywhere and have not been able to find anything to fix this . Networking isn t my main area of expertise and I d really appreciate any advice . Comment : @semis First of all open your Tigase logs on server and try to connect with Pidgin and let see whether or not you requests are hitting the server if Yes then paste the error showing in logs .... . Comment : @semis If you can paste me exact error from server Tigase logs i can help you Comment : @HaiderAli thanks for offering your help I ve already managed to find a solution so it s not necessary anymore . Thanks again though much appreciated .. . Answer : Wow in case anyone runs into the same problem in the future turns out that this was related to the AMI . I was using an Amazon Linux AMI and switched to Ubuntu Server 14.04 LTS . I wish I tried this sooner but I didn t really consider this a possible solution earlier . Apparently Amazon Linux doesn t play well with Tigase .", "Question : QoS is a way to guarantee message delivery in Tigase XMPP . Can anyone please let me know if there is any XEP available for it Or any standard which can help me in guaranteed message delivery . What if i maintain a queue of every outgoing packet in XMPP and later on when i receiver delivery report from client . At that time i can cross check messages which are not delivered . I am using Tigase Please if you guide me about which is the best place for queueing and cross checking of delivery report with messages .. . .. . Thanks .. . Answer : I am afraid there is not simple answer to your question . It mostly depends what QoS means for you and what you need . I suggest you read this forums topic where your question is discussed and I think a good explanation is provided : https : projects.tigase.org boards 4 topics 313 .. . .. . In short there are quite a few mechanism in Tigase for different kinds of QoS requirements so you have to know which one to use . Comment : thank you so much for your contribution .", "Question : I m developing a chat application using Tigase server in the background for providing the XMPP communication . Besides that I m using smack asmack as a library in my application . With every message send between the users for the sake of the functionalities I want to implement I m including package extensions via smack s Presence.setProperty method which are correctly send if both of the users are online . When one of the users is offline the Tigase server saves that message and then delivers it when the user becomes online again . The thing is that Tigase don t save the message including the packet extensions so when the user is online again it receives only parts of the message send . I found the Tigase source and found the place in the OfflineMessages class part of the xmpp.impl package where I need to insert a line of code in order for msgoffline plugin to save the offline messages using extensions . What is the easiest way to override the OfflineMessages class in Tigase jar file without building the whole source code of the project I m using Tigase-5.1.5-b3164 version on ubuntu-server and Eclipse as IDE . Comment : Which line of code is it that you want to insert in OfflineMessages.java Comment : I m trying to do what Artur said .. . Answer : I do not know Smack library hence I do not know what Presence.setProperty method does . But if it does something to a presence packet adding an extra payload to the presence status then this will not be saved to offline message storage because... . presences are not stored in offline message storage . If you want to modify OfflineMessages to make it store more different data than it stores now like a specific presence packets then there is a method : savePacketForOffLineUser with a big IF at the beginning . This is where the decision is made on what to store in an offline storage . But please be careful not to store ALL presences it will kill your service and your database . The best way to add your own plugins is to make a copy of the existing Tigase plugin OfflineMessgae modify it to your preferences change a name of the plugin and ID of the plugin . Then you just put a jar with your code into Tigase jars directory and modify configuration to load your plying instead of the default one . This way you do not have to recompile Tigase sources and will be also easier for you to update to a new version . Comment : Thanks but is it possible to quick start and build Tigase plugin without compiling it s sources Some tips regarding this", "Question : null .. . Answer : How can I get a list of all the users in a Tigase Xmpp server What I d like to do is to allow a user to be able to select users from a list queried from the database and add them into their Roster contacts list . Comment : This might be a dangerous stunt to return all users to select as roster because of scalability you need to change the implementation of a databased query function called inside getRoster .. . which gets called right after login .... . i would suggest you to run Tigase in debug mode using Eclipse and start looking for this function first .... . Comment : Hi @FLow . Thank you for the help . It s been very helpful . I will be going your way . You could post it as an answer so that I can accept it . Would you please mind looking at this other question I had posted earlier still on a similar topic How to print new incoming XMPP Chat messages into Labels http : stackoverflow.com questions 31380401 how-to-print-new-incoming-xmpp-chat-messages-into-labels . I ll be very grateful . Thank you again .", "Question : I installed and configured Tigase server for distributing device state between multiple Asterisk servers . The server works fine . It s configuration file is as follows : .. . .. . The i installed two asterisk servers on two different systems . I also compiled res xmpp on both and configured it using the following configuration file : .. . .. . the username for one of my servers is server1@localhost voip1 and for the other is server2@localhost voip2 . Now the xmpp module works correctly . But pubsub events do not distribute correctly . As you can see i used an IP address to distinguish my Tigase server . If i use the same IP address in the pubsub node option of res xmpp module the server will return Feature not Implemented error with an error-code of 501 because of this i used pubsub.192.168.20.105 and set this in the etc hosts of both servers not there is not an error message but i won t get the events either How can i fix this .. . Answer : The problem is probably with the Tigase configuration . You have : .. . .. . As you can see you assigned the same number to both the MUC and PubSub component . Considering other configuration for other components a correct configuration for PubSub would be : Comment : I have done this but this does not solve my problem i get : Feature not supported yet", "Question : I installed and configured Tigase server for distributing device state between multiple Asterisk servers . The server works fine . It s configuration file is as follows : .. . .. . The i installed two asterisk servers on two different systems . I also compiled res xmpp on both and configured it using the following configuration file : .. . .. . the username for one of my servers is server1@localhost voip1 and for the other is server2@localhost voip2 . Now the xmpp module works correctly . But pubsub events do not distribute correctly . As you can see i used an IP address to distinguish my Tigase server . If i use the same IP address in the pubsub node option of res xmpp module the server will return Feature not Implemented error with an error-code of 501 because of this i used pubsub.192.168.20.105 and set this in the etc hosts of both servers not there is not an error message but i won t get the events either How can i fix this .. . Answer : I had the same problem with the Tigase server and Asterisk your problem is that you set : .. . .. . config in your xmpp.conf . This option causes auto creation of many nodes if you take a look at tig nodes in the Tigase database you will see that many nodes have been created . You must comment this option . Afterward you must redeploy your Tigase SQL schema or you have to delete all those nodes Then everything will be fine . By looking at the debug output of res xmpp module in the Asterisk CLI you will see that res xmpp will try to subscribe to many nodes at once and this causes confusion because many nodes with the same name exist and server will return 409 and 501 errors . Comment : Thx th problem solved successfully .", "Question : We ve got one superuser account that we use to send messages to selected JIDs . Lets say we ve selected ones we want to send a message to and we got ourselves a huge array of user JIDs 20k at this point . We ve got a deamon running in the background sending one message at a time to each user stopping for a minute after sending 2000 of messages 2500 minute limit . We are using xmpp4r as a client that handles sending messages . Every user has same @xmpp.address . body is the same in every message . Our tigase logs because thats what we re using show that the messages did actually hit the jabber server and were sent to appropriate users one at a time . The issue we re experiencing is that although everything seemed fine only a part of users actually got the message . for example at one point considering 100 first messages sent - 1..20 and 91..100 got delivered the middle 70 did not get delivered at all we improved couple of things in the meantime but this still might be a clue . We tried creating an array of 10000 duplicated JIDS jids of couple of users were duplicated thousands of times and every single message got delivered and in the right order . We already spent a couple of days trying different scenarios and are starting to run out of ideas what might be going wrong . Got any idea s what we might have missed .. . Answer : I am form Tigase team . First thing I recommend to use our online forums as this is where we normally respond to questions . We may not see questions posted here . Anyway.. . There are some details not included in your post . 1 . What do you connect and how Over standard XMPP connection over Bosh something else 2 . What do you mean by duplicated JIDs How did you duplicate JIDs 3 . Are all the users for which a message is sent online during the test 4 . If you can see message in Tigase logs you should also see what happens to it . Was it submitted to network socket for delivery to a client 5 . What kind of HW did you use Is there a chance that the server was overloaded and simply dropped some messages Seems unlikely if you talk about 100 messages and 70 of them not delivered . 6 . How do you actually know that a message was not delivered and are you sure the client user was connected at the time" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
geom-bar@ggplot2@84
geom-bar -- geom-bar is the geometric object description for creating a barplot in @placeholder .
{ "confidence": [ 53.6165771484375, 48.0982551574707, 41.870216369628906, 39.628273010253906, 36.2199821472168, 35.72383117675781, 35.36653137207031, 35.26375198364258, 35.26375198364258, 34.94342803955078, 34.70575714111328, 34.443328857421875, 33.850852966308594, 33.64329528808594, 33.09859085083008, 33.09859085083008, 33.09859085083008, 32.575660705566406, 32.41469955444336, 32.41469955444336, 31.64068031311035, 31.64068031311035, 31.64068031311035, 31.64068031311035, 31.396343231201172, 31.327373504638672, 31.327373504638672, 31.073476791381836, 31.04074478149414, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.75050163269043, 30.739566802978516, 30.610679626464844, 30.610679626464844, 30.59191131591797, 29.870201110839844, 29.870201110839844, 29.870201110839844, 29.7874755859375, 29.677104949951172, 29.677104949951172, 29.523353576660156, 29.132404327392578, 29.132404327392578, 29.132404327392578, 29.132404327392578, 28.946481704711914, 28.590171813964844, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.508834838867188, 28.44851303100586, 28.44851303100586, 27.760496139526367, 27.713237762451172, 27.67449188232422, 27.361186981201172, 27.206722259521484, 27.136886596679688, 27.136886596679688, 27.136886596679688, 27.136886596679688, 27.136886596679688, 27.136886596679688, 27.107288360595703, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.784313201904297, 26.704814910888672, 26.704814910888672, 26.44375991821289, 26.44375991821289, 26.44375991821289, 25.954692840576172, 25.909217834472656, 25.904014587402344, 25.904014587402344, 25.821287155151367, 25.600255966186523, 25.600255966186523, 25.600255966186523 ], "content": [ "that is my geom-bar plot without counts http : i.stack.imgur.com cD7C0.png .. . .. .", "Use geom-text as explained in this question http : stackoverflow.com questions 12018499 how-to-put-labels-over-geom-bar-for-each-bar-in-r-with-ggplot2", "geom-plot overlap http : i.stack.imgur.com pXqSz.png .. . .. . P.s .", "one option might be to write a geom that uses a textGrob with a custom drawDetails method to fit within the allocated space set by the bar width .", "enter image description here http : i.stack.imgur.com Gm1Wj.png .. . .. . facetted bar-chart .. . .. .", "I have a matrix with the following entries : .. . .. . I want to create a stacked bar plot like this one Barplot http : i.stack.imgur.com Eu7bL.png .", "http : stackoverflow.com questions 9493159 staggered-and-stacked-geom-bar-in-the-same-figure .. . .. . Except for me the categories are assets the x axis is a column of date values and the y axis is the position data for each asset .", "i.e the bar for a1 will be stack bar with stacks of height b1 and c1 .", "Then fine-tune their positioning inside the bar or outside the bar using vjust .", "You could look here http : stackoverflow.com questions 29068867 plotly-not-getting-geom-text-in-r-ggplot", "I have the same problem which is explained here Bars in geom-bar have unwanted different widths when using facet wrap http : stackoverflow.com questions 30196143 bars-in-geom-bar-have-unwanted-different-widths-when-using-facet-wrap That is when facetting my bars show a different width .", "However you can see on my graph that the colour of the intersect between the first and second bar is darker than the colour of the first bar this is the reason why we have the feeling that the first bar is over the second bar .", "I created a ggplot2 bar plot and added a label with the bar y-value above the bar .", "prepare data .. . .. . stacked bar-chart .. . .. .", "Possible duplicate of Order Bars in ggplot2 bar graph http : stackoverflow.com questions 5208679 order-bars-in-ggplot2-bar-graph", "In my cases the third bar covered the second and the second bar covered the first one always .", "Possible duplicate of ggplot2 - Stacked Bar Chart http : stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart", "I have figured out how to have a single column of bar plots with each bar plot representing a year : .. . .. . In this case my variables height weight and width are on the x-axis of each bar plot .", "The bar colors in the plot do not match df col .", "I want to plot bar plots using ggplot .", "I guess there might be a chance that actually your third bar covers the second and the second bar covers the first one like my cases .", "this link stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart http : stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart should be useful", ": learnr.wordpress.com 2009 09 24 ggplot2-back-to-back-bar-charts https : learnr.wordpress.com 2009 09 24 ggplot2-back-to-back-bar-charts", "I end up having only grey bars : Grey bars for bar plot http : i.stack.imgur.com zQGXd.png .. . .. . I would like to change the color of the bar .", "I am creating a data summary bar plot using ggplot2 plotly and ggthemes .", "barplot table 3 : 4 or a data frame", "In barplot you need to compare the heights of different bars .", "enter image description here http : i.stack.imgur.com YHRW2.png .. . .. . There is some way to change the bar colour without using the fill option only using scale fill manual", "The order of the columns horizontally is determined alphabetically by the name of the three variables in my case F is the first bar N is the second bar and XFe is the last bar but the depth of each variable is determine by they order of appearance in the dataset with the first variable appearing being the bar the most at the back and the last appearing variable being the bar the most in front see attached pictures for example I put the same colour to the 3 variable to make it more obvious .", "I want to create a plot containing a single bar per data frame .", "I am trying to make bar charts with ggplot2 with the following dataset .", "In each bar-chart the values would be plotted for each year .", "I want to create grouped bar plot while keeping order .", "If it was single column and not a grouped bar plot use of reorder function is obvious .", "but how I do ordered group bar plot ascending manner", "Had to edit the code for the facetted bar-chart to match the graph", "The default vjust of 0.5 positions the text so it overlaps with the end of the bar .", "I have the following in order to bar plot the data frame .", "I would like to avoid using grid.arrange like in this question http : stackoverflow.com questions 13865133 reordering-geom-bar-when-using-facet-wrap if possible because I like the facets but I don t understand what else to try any suggestions are very welcome .", "Then the colors of each bar should be determined by type .", "The following code generates the stacked bar with colors by type : .. . .. .", "Here is the bar-chart : .. . .. .", "I would like to have the name of each bar under each bar in my case the names are Round and they happen to be 1 2 .. . 12 .. . .. . Here is my current code : .. . .. . Here is the current output :", "So say the top bar plot in my column of bar charts is height it would show the values 5 7 and 2 with the years 1990 2000 and 2010 on the x-axis .", "I have a dataframe similar to the following .. . .. . .. . I want to create a stacked bar-chart where the x-axis is A and the bar is made up of two stacks of height B and C a top each other .", "Perhaps barplot colnames - t data -1 data 1 beside TRUE", "coord flip makes a horizontal bar-chart .", "Id prefer for the labels to be next to the bar .", "I would like to add -figures on a filled barplot .", "I want to label the second and third bar in each chart as a percent of the previous bar e.g .", "I am plotting this on a bar graph but with a text label showing the numerical values but the text are not seating on top of each bar .", "If the bar is shorter than half of the range of y the text is printed outside of the bar right to the y value .", "If the bar is longer than half of the range of y the text is printed inside the bar left to the y value .", "I have this data : .. . .. . And I want to make a bar plot .", "stacked bar chars example http : i.stack.imgur.com TmGmJ.png .. . .. . With the following example data : .. . .. . I would want the x-axis to represent the name of the tree with two bars per tree species : one bar for sample one and one bar for sample two .", "I would like to position the bars in geom-bar so that the x-axis label is to the left of the bar not the center .. . .. .", "I have been producing a bar plot in ggplot but fail to reverse the output order of my y axis .", "But maybe there is another ggplot diagram type or option where i configure to just dras a line instead of a bar", "Each bar would have a portion representing the count.up in the positive side of the plot and a portion representing the count.down in the negative side of the plot .", "I like the pos v . neg bars here a single bar that covers both and the colour differentiation of it .", "How do I set up x so that each bar is on one number", "Now I need to add numbers from different datasets on top of each bar .", "Given the following dataset : .. . .. . How do I complete a stacked bar-chart in ggplot2 that includes the negative values", "That will get rid of the ugly grey bar on the left side .", "The following code produces bar charts using facet .", "This question already has an answer here : .. . .. . Showing data values on stacked bar-chart in ggplot2 questions 6644997 showing-data-values-on-stacked-bar-chart-in-ggplot2 2 answers .. . .. . I m trying put label in geom-bar but I can t .", "Something related here http : stackoverflow.com questions 1721536 changing-the-order-of-dodged-bars-in-ggplot2-barplot .", "Ultimately I would like to have my label within the bar if it fits otherwise just outside the bar without truncating the label .", "However it is pretty straightforward to implement a barplot using geom rect .", "To avoid creating the position values yourself you can use position stack in geom-text as in this question http : stackoverflow.com questions 6644997 showing-data-values-on-stacked-bar-chart-in-ggplot2 .", "When I plot it using the below ggplot code every 12th bar for some reasons shows -100 regardless of what it should be .", "I have the following data set : .. . .. . I would like to plot a single column of bar charts with a plot for height width and weight .", "I have this table .. . .. . and I have to visualize the last two column in bar-chart using R to compare student total mark .. . .. . Data", "Here is the detail explanation with code example : .. . .. . Lets say we have following data.frame : .. . .. . plotting a simple bar plot while flipping it .", "My data frame is this one : .. . .. . I want to produce a bar plot with the bars stacked horizontally based on GROUP so that there will be three groups of bars horizontally .", "Ideally there would be two gradients of each colour one for count.up and one for count.down just to make a visual difference between the two parts of the bar .", "enter image description here http : i.stack.imgur.com IJTbQ.png .. . .. . As you can see the one bar with X label RPE1MYCN40HT is not shown completely .", "In this way you can manually assign the position you want for each bar .", "I am using ggplot2 geom-bar to make a series of bar charts .", "In this data I am value should be the label for bar 1 in all graphs .", "dum2 dum1 100 should be the label for the bar with the value of dum2 .", "dum3 dum2 100 should be the label for the bar with value dum3 .", "If horizontal bar charts are OK then the issue is not the size of the labels but the placement .", "I have added some additional space between the bar and the text .", "http : imgur.com a DQQp9 .. . .. . So far my bar-chart code is like this :", "I am trying to order the stacked bars in this bar-chart in decreasing size .", "It just plots the number of each bar like 1 2 .. . 500 but it doesn t show the chromosome .", "As you noted in the comments the dataset must be ordered by the fill variable to get the stacks in the correct order to match the bar stacks .", "barplot oral written http : i.stack.imgur.com lXBsG.png .. . .. . Comment : alpha parameter is not necessary it just deals with the transparency so that you can see when there are overlapping bars .", "I am having a problem trying to plot a barplot using ggplot2 : I would like to plot 3 variables of different colors on the same histogram .", "I m trying to change the color in a barplot in ggplot2 using scale fill manual but for some reason only works if i use the fill option inside aesthetics .", "Chart 1 http : i.stack.imgur.com ySlh2.png .. . .. . Chart 2 .. . .. . I then came across this question http : stackoverflow.com questions 24753932 geom-bar-with-annotation-inside-bars-aligned-with-x-axis which was helpful and made me realise that I was setting the label position based on my y variable so I have hardcoded it now and use hjust to pad it from the axis .", "Example of data daten see below : .. . .. . I use this data to plot a stacked barplot .", "But you can see below that only 2 of the labels fit within the bar so I would prefer the others to be placed at the end on the outside of the bar like in chart 1 .", "But i m asked to do them and as a trade-off i suggested to only make a border with a slightly darker color than the bar s on the top and the right side of the bar .", "Finally add geom-bar stat identity above this shadow to plot actually barplot .", "I am running dozens of bar graphs using R s ggplot2 and trying to follow our organizational style guide which was developed using Excel manually for each graph .", "class theme http : i.stack.imgur.com nQ5iN.png .. . .. . If I change scale y continuous expand c 0 6 to scale y continuous expand c 0 0 the label gets chopped off on the longest bar violating the organizational style guide .", "Total bar height b1+c1 .. . .. . I am using code like .. . .. . ggplot2 documentation says .. . .. . By default multiple x s occuring in the same place will be stacked a top one another by position stack ." ] }
{ "confidence": [ 54.514793395996094, 47.8135986328125, 43.987403869628906, 43.05986785888672, 42.674461364746094, 42.49820327758789, 42.328914642333984, 42.01305389404297, 42.00727844238281, 41.08607482910156, 40.229469299316406, 39.751625061035156, 39.51222229003906, 39.36607360839844, 38.60443115234375, 37.767860412597656, 37.224578857421875, 35.70361328125, 35.5910530090332, 35.18408966064453 ], "content": [ "Question : null .. . Answer : I have this graphic in ggplot2 and I would like to add-in graph counts in each segment or percentage maybe . Counts are in table here .. . .. . kod is factor of 5 groups stamg is factor 0 1 .. . .. . that is my geom-bar plot without counts http : i.stack.imgur.com cD7C0.png .. . .. . this is a table of counts http : i.stack.imgur.com Arq5s.png Comment : Use geom-text as explained in this question http : stackoverflow.com questions 12018499 how-to-put-labels-over-geom-bar-for-each-bar-in-r-with-ggplot2 Comment : I am sorry but I don t get it . How can I create y variable of counts Please write me the code geom-text thank you Comment : Your question could use some editing.. . you are using databak a data frame I presume to generate your plot right but then you provide another dataframe doesn t look like its databak . Is that last dataframe extra information which you want to use in the plot", "Question : null .. . Answer : I am creating a data summary bar plot using ggplot2 plotly and ggthemes . Here is my code : .. . .. . This is the plot that is created : .. . .. . enter image description here http : i.stack.imgur.com 4ptNY.png .. . .. . The labels over the bars show the number of samples . When I hover over - it shows the Source Genes and Type . Even when I am using position and vjust arguments in geom-text it is not working . How can I adjust the labels over the bars such that they are visible i.e . entirely above the bars or below the bars Comment : You could look here http : stackoverflow.com questions 29068867 plotly-not-getting-geom-text-in-r-ggplot Comment : Produces Error : Aesthetics must be either length 1 or the same as the data 11 : label colour position vjust x y Comment : @dww replace content in geom-text with this geom-text aes label Samples color Type position position dodge width 0.9 vjust -0.25 size 5", "Question : My data frame is this one : .. . .. . I want to produce a bar plot with the bars stacked horizontally based on GROUP so that there will be three groups of bars horizontally . And vertically I want to stack the bars based C1 PERCENTAGE and C2 PERCENTAGE . I want to use ggplot2 . I used base graphics but this is for C1 PERCENTAGE only . enter image description here http : i.stack.imgur.com gDlpB.png .. . .. . This gives plot for C1 PERCENTAGE . I would like C2 PERCENTAGE also alongside these bars . Comment : Is this not tiles plot http : docs.ggplot2.org current geom tile.html Comment : Perhaps barplot colnames - t data -1 data 1 beside TRUE Comment : Possible duplicate of ggplot2 - Stacked Bar Chart http : stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart Comment : this link stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart http : stackoverflow.com questions 21236229 ggplot2-stacked-bar-chart should be useful Comment : This is not what I want . Please see the edit .. . Answer : I have two different variants . First we need to prepare the data a add id b reshape to long format . prepare data .. . .. . stacked bar-chart .. . .. . enter image description here http : i.stack.imgur.com Gm1Wj.png .. . .. . facetted bar-chart .. . .. . enter image description here http : i.stack.imgur.com sUj7B.png Comment : @technOslerphile Thank you for accepting my answer - but which of the two variants finally did answer your question meet your requirement . Thank you . Comment : Had to edit the code for the facetted bar-chart to match the graph", "Question : I want to create grouped bar plot while keeping order . If it was single column and not a grouped bar plot use of reorder function is obvious . But not sure how to use it on a melted data.frame . Here is the detail explanation with code example : .. . .. . Lets say we have following data.frame : .. . .. . plotting a simple bar plot while flipping it . above plot will not have an order and if I want to order the plot by win I can do following : .. . .. . Now lets say we add another column to original data frame .. . .. . to generate grouped bar plot first we need to melt it : .. . .. . enter image description here http : i.stack.imgur.com uqou6.png .. . .. . above ggplot is unordered . but how I do ordered group bar plot ascending manner Comment : You reordered the factor levels the first time and it worked . Maybe try setting the factor level order on the melted data frame.. . Comment : Possible duplicate of Order Bars in ggplot2 bar graph http : stackoverflow.com questions 5208679 order-bars-in-ggplot2-bar-graph Comment : Something related here http : stackoverflow.com questions 1721536 changing-the-order-of-dodged-bars-in-ggplot2-barplot . With stacking you just need to order the dataset before plotting but that doesn t appear to work for dodging . Comment : @joran tried didn t work : melted.theTable - within d.nfl.melt Team1 - factor Team1 levels names sort table Team1 decreasing FALSE ggplot melted.theTable aes x Team1 y value + geom-bar aes fill variable position dodge stat identity + coord flip Comment : Recheck your attempt to set the level order it is wrong . .. . Answer : The challenge your question presents is how to reorder a factor Team1 based on a subset values in a melted column . The comments to your question from @alistaire and @joran link-to great answers . The tl dr answer is to just apply the ordering from your original unmelted data.frame to the new one using levels . enter image description here http : i.stack.imgur.com Ac3Vt.png", "Question : geom-bar seems to work best when it has fixed width bars - even the spaces between bars seem to be determined by width according to the documentation http : docs.ggplot2.org current geom bar.html . When you have variable widths however it does not respond as I would expect leading to overlaps or gaps between the different bars as shown here http : stackoverflow.com questions 11345943 bar-graph-in-ggplot2-with-width-as-a-variable-and-even-spacing-between-bars . To see what I mean please try this very simple reproducible example : .. . .. . What I really want is for the different bars to be just touching but not overlapping like in a histogram . I ve tried adding position stack dodge and fill but none work . Does the solution lie in geom histogram or am I just not using geom-bar correctly geom-plot overlap http : i.stack.imgur.com pXqSz.png .. . .. . P.s . to see the issue with gaps try replacing 4 with 0.5 in the above code and see the outcome . .. . Answer : Seems that there isn t any straightforward solution so we should treat x-axis as continuous in terms of w and manually compute required positions for ticks and bar centers this http : stackoverflow.com a 11354545 1320535 is useful : .. . .. . enter image description here http : i.stack.imgur.com szz4x.png Comment : That solves the problem many thanks . Perhaps a functionality for ggplot2 devs to consider adding as a position option Comment : @RobinLovelace no problem . Maybe you could try to ask https : github.com hadley ggplot2 issues for one . Comment : Thanks for the advice . I did as for this github.com hadley ggplot2 issues 890 https : github.com hadley ggplot2 issues 890 but can t see this on the ggplot issues page . Seems to have been removed - any ideas Comment : @RobinLovelace seems fine to me . I believe it will be moved to feature in case they will think this feature should be added . Comment : Wouldn t it be easier to use scale x discrete for something like this", "Question : Good afternoon . I am having a problem trying to plot a barplot using ggplot2 : I would like to plot 3 variables of different colors on the same histogram . For that I use geom-bar with a specific level of grey attributed to each variable.I am using position position dodge width 0.75 to overlay the bars and using alpha 0.85 to create transparency . However I can t figure out why the last variable appears to be on top of the second one.I would like the first variable covering the second variable as it is and the second one covering the third one which is the problem here . What does control the depth of each variable and is there a way to change this Histogram presenting my 3 variables as you can see the black variable appears on top of the dark grey one which is great but the light grey variable also appears on top of the dark grey variable instead of under it http : i.stack.imgur.com Bh5zi.jpg .. . .. . Many thanks . .. . Answer : Although I still don t know the correct answer to your question I was interested in this topic and tested some of my data varying colors and width . In my cases the third bar covered the second and the second bar covered the first one always . A tricky part is that it is very hard to tell which one covers which without adding line colors or decreasing width . I guess there might be a chance that actually your third bar covers the second and the second bar covers the first one like my cases . Please try to add colour black in your geom-bar function and see if the overlaying order is the same as you thought . enter image description here http : i.stack.imgur.com LdKBK.jpg .. . .. . enter image description here http : i.stack.imgur.com UvgIb.jpg .. . .. . enter image description here http : i.stack.imgur.com pTw0w.png enter image description here http : i.stack.imgur.com h4ChT.png Comment : Thank you for your answer . However you can see on my graph that the colour of the intersect between the first and second bar is darker than the colour of the first bar this is the reason why we have the feeling that the first bar is over the second bar . Which is not the case on your graph I checked using colour black .", "Question : null .. . Answer : I m trying to change the color in a barplot in ggplot2 using scale fill manual but for some reason only works if i use the fill option inside aesthetics . I made an example : .. . .. . Here is the result no changing in the color : enter image description here http : i.stack.imgur.com Ik81h.png .. . .. . Now using the fill option inside aesthetics it works : .. . .. . enter image description here http : i.stack.imgur.com YHRW2.png .. . .. . There is some way to change the bar colour without using the fill option only using scale fill manual Comment : scale fill manual will work only if you have a fill aesthetic inside aes . But if you don t want to map a data column to the fill aesthetic why not just set the fill color inside geom-bar : geom-bar stat identity fill lightblue Comment : Remember that aes maps aesthetics but you can set them using normal function arguments . Comment : I have the same question . Let s say I am creating a theme and want the default color of the bars to be blue . I want to theme to automate that even if the user has not declared a fill variable . Comment : I posted a similar question here : github.com jrnold ggthemes issues 67 https : github.com jrnold ggthemes issues 67 no answer yet though Comment : @LucasMation does this SO answer http : stackoverflow.com a 21175042 496488 answer your question", "Question : I am trying to create a horizontal bar-chart with category labels using ggplot . I have been able to create the plot without hassles and can put labels on however I suffer issues with the formatting . Ultimately I would like to have my label within the bar if it fits otherwise just outside the bar without truncating the label . The following are what I have tried so far . Data .. . .. . Chart 1 .. . .. . As you can see below the labels get truncated . Chart 1 http : i.stack.imgur.com ySlh2.png .. . .. . Chart 2 .. . .. . I then came across this question http : stackoverflow.com questions 24753932 geom-bar-with-annotation-inside-bars-aligned-with-x-axis which was helpful and made me realise that I was setting the label position based on my y variable so I have hardcoded it now and use hjust to pad it from the axis . But you can see below that only 2 of the labels fit within the bar so I would prefer the others to be placed at the end on the outside of the bar like in chart 1 . chart 2 http : i.stack.imgur.com XRBae.png .. . .. . Is there a programatic way I can get the best of both worlds from chart 1 and chart 2 .. . Answer : I m going to misread programmatic as pragmatic . Adding + scale y continuous limits c 0 max dt1 y +100 created sufficient room for the labels . I lack the reputation to upload the plot . Edit 2 I altered the code to retrieve the maximum value and add 100 to it . It s still not fitting the plot to include the text specifically but it ll work with fixed labels . Comment : It assists however it doesn t address the main question relating to having the best of both worlds . I was also after a programatic way to do things as I don t always know what the largest value of y will be and I would prefer not to hard code limits", "Question : I am trying to create a horizontal bar-chart with category labels using ggplot . I have been able to create the plot without hassles and can put labels on however I suffer issues with the formatting . Ultimately I would like to have my label within the bar if it fits otherwise just outside the bar without truncating the label . The following are what I have tried so far . Data .. . .. . Chart 1 .. . .. . As you can see below the labels get truncated . Chart 1 http : i.stack.imgur.com ySlh2.png .. . .. . Chart 2 .. . .. . I then came across this question http : stackoverflow.com questions 24753932 geom-bar-with-annotation-inside-bars-aligned-with-x-axis which was helpful and made me realise that I was setting the label position based on my y variable so I have hardcoded it now and use hjust to pad it from the axis . But you can see below that only 2 of the labels fit within the bar so I would prefer the others to be placed at the end on the outside of the bar like in chart 1 . chart 2 http : i.stack.imgur.com XRBae.png .. . .. . Is there a programatic way I can get the best of both worlds from chart 1 and chart 2 .. . Answer : Here is one way . It is a bit lengthy approach but you can subset your data for geom-text . In this way you can manually assign the position you want for each bar . enter image description here http : i.stack.imgur.com A8Ff2.png Comment : It d be a pain to adjust manually and the relatively positions of labels are subject to display . Comment : @KFB Yeah I know what you mean . If a graphic is like this I would not mind doing manual work . But if one has a large number of groups he she has to think something else . Comment : I thought it might be somewhat difficult to do . So far I think chart 2 in my question is going to be the best approach to avoid manual intervention for the plots . Comment : @Dan I think the choice would be either you make label position consistent with less lines or varied with more lines . I like your chart 2 . If I were you I would stick to that .", "Question : I want to create grouped bar plot while keeping order . If it was single column and not a grouped bar plot use of reorder function is obvious . But not sure how to use it on a melted data.frame . Here is the detail explanation with code example : .. . .. . Lets say we have following data.frame : .. . .. . plotting a simple bar plot while flipping it . above plot will not have an order and if I want to order the plot by win I can do following : .. . .. . Now lets say we add another column to original data frame .. . .. . to generate grouped bar plot first we need to melt it : .. . .. . enter image description here http : i.stack.imgur.com uqou6.png .. . .. . above ggplot is unordered . but how I do ordered group bar plot ascending manner Comment : You reordered the factor levels the first time and it worked . Maybe try setting the factor level order on the melted data frame.. . Comment : Possible duplicate of Order Bars in ggplot2 bar graph http : stackoverflow.com questions 5208679 order-bars-in-ggplot2-bar-graph Comment : Something related here http : stackoverflow.com questions 1721536 changing-the-order-of-dodged-bars-in-ggplot2-barplot . With stacking you just need to order the dataset before plotting but that doesn t appear to work for dodging . Comment : @joran tried didn t work : melted.theTable - within d.nfl.melt Team1 - factor Team1 levels names sort table Team1 decreasing FALSE ggplot melted.theTable aes x Team1 y value + geom-bar aes fill variable position dodge stat identity + coord flip Comment : Recheck your attempt to set the level order it is wrong . .. . Answer : This is a non-issue . The easiest way is to not discard your ordered team in the melt : .. . .. . Alternatively we can use reorder after melting and just only use the Win elements in computing the ordering : .. . .. . Yet another idea is to take the levels from the original ordered column and apply them to a melted factor : .. . .. . All three methods give the same result . I left out the coord flips because they don t add anything to the question but you can of course add them back in . enter image description here http : i.stack.imgur.com WmUig.png .. . .. . As to the easiest I would recommend just keeping the orderedTeam variable around while melting . Your code seems to work hard to leave it out it s quite easy to keep it in .", "Question : I don t know if my question clear enough.. . I have this table .. . .. . and I have to visualize the last two column in bar-chart using R to compare student total mark .. . .. . Data Comment : is that a table or matrix barplot table 3 : 4 or a data frame please dput table and add to your question Comment : sorry I am new to R .. . Its a data frame Comment : Possible duplicate of Plotting two variables using ggplot2 - same x axis http : stackoverflow.com questions 11242420 plotting-two-variables-using-ggplot2-same-x-axis .. . Answer : You can use + to combine other plots on the same ggplot object . For example :", "Question : null .. . Answer : for this project I m working on I have to plot theoretical vs . realized data grouped by asset for each day in Shiny . So for each I need a set of dodged bars for each asset that have both the theoretical and realized values that correspond to them . Both the theoretical and realized values need to line up with their corresponding y values on the plot so I need to find a way to overlay the two dodged sets of data on the same plot like the answer to this question : .. . .. . Staggered and stacked geom-bar in the same figure http : stackoverflow.com questions 9493159 staggered-and-stacked-geom-bar-in-the-same-figure .. . .. . Except for me the categories are assets the x axis is a column of date values and the y axis is the position data for each asset . Here s what my data table looks like as of now : .. . .. . Thanks Comment : Try adding a reproducible example http : stackoverflow.com questions 5963269 how-to-make-a-great-r-reproducible-example to your question . This should be an example dataset more than one line along with any code you tried .", "Question : I have the same problem which is explained here Bars in geom-bar have unwanted different widths when using facet wrap http : stackoverflow.com questions 30196143 bars-in-geom-bar-have-unwanted-different-widths-when-using-facet-wrap That is when facetting my bars show a different width . I have tried the solution proposed there but it seems I m doing something wrong because then my bars overlap . I m not an advanced R user so any explanation would be much appreciate . My code : .. . .. . Many thanks Then if I use BarWidth and DodgeWith as proposed as an answer to my original question I can t control dodge width for group of bars . That is I would like to keep some of them together as shown below for the two bars Envimat . I have changed colours so two purple bars and three red-orange bars should remain together . The new code : .. . .. . Now the problem in the red-orange bars I would like to control distance between green and purple bars : red-orange bars overlapped http : i.stack.imgur.com nC5D2.png .. . .. . If I fix the problem for the red-orange bars purple ones are separated .. . .. . Thanks a lot .. . Answer : position dodge can take a width parameter . Use it to set the dodging width and be sure to apply it to both geom-bar and to geom-text . You will probably need to adjust the limits of the y axis scale the size of the text and maybe the size of the graphics device . Also take size outside the aes statement in geom-text . Something like this : .. . .. . enter image description here http : i.stack.imgur.com R6IQc.png .. . .. . EDIT : Revised question .. . .. . Not a general solution - Solution is specific to fig3 .. . .. . enter image description here http : i.stack.imgur.com ZHOS0.png Comment : Thanks Sandy . I have used your solution but another problem shows up . I would like to control groups of bars two for envimat and three for Envimat in such a manner that they remain together when changing dodge width I ll edit the question Comment : @Pablo I ve added an edit that is specific to fig3 . The solution modifies the positions of the bars in the ggplot build data . All it does is modify the positions for the two Envimat bars . There is in need of a more general solution but I need some time to figure it out . In the meantime if someone comes along with a general solution well and good .", "Question : I would like to add -figures on a filled barplot . Here is the plot with the labels at the wrong places : .. . .. . enter image description here http : i.stack.imgur.com JCwHU.png .. . .. . Here is the dataframe : .. . .. . Now I add the sum within grp treat to the dataframe using sql sorry : .. . .. . And here is how I get the plot : .. . .. . I could add a new variable to the dataframe with cumulative percentage but I m wonder if there is a simpler way to add the labels . Comment : This question answer http : stackoverflow.com questions 6644997 showing-data-values-on-stacked-bar-chart-in-ggplot2 shows the solutions I ve seen most often . Using position stack in geom-text or creating a new variable for the position on the y axis . Comment : @aosmith Thanks . Adding position stack gives the same . I looked at other SO-entries about this issue for example your link . The main difference is that I use option position fill in geom-bar . Comment : Did you add position stack to geom-text not geom-bar That option works fine for me if I add it to your code . You may find you need to do something about the really small percentages . Something like label ifelse p .05 NA p2 might suffice . Comment : I put it erroneously within aes of geom-text . Now it works . Thank you very much . If you write your answer into the answer field I can vote it . Comment : That sounds right as I believe position stack relies on the order of the dataset in the newest versions of ggplot2 see here https : github.com hadley ggplot2 issues 1593 . .. . Answer : To avoid creating the position values yourself you can use position stack in geom-text as in this question http : stackoverflow.com questions 6644997 showing-data-values-on-stacked-bar-chart-in-ggplot2 . As you noted in the comments the dataset must be ordered by the fill variable to get the stacks in the correct order to match the bar stacks . enter image description here http : i.stack.imgur.com 9EG0y.png .. . .. . You may end up needing to remove the labels below a certain size to remove the overlap seen in the plot above . Something like geom-text aes label ifelse p .05 NA p2 y p position stack would remove labels for the very small values .", "Question : Good afternoon . I am having a problem trying to plot a barplot using ggplot2 : I would like to plot 3 variables of different colors on the same histogram . For that I use geom-bar with a specific level of grey attributed to each variable.I am using position position dodge width 0.75 to overlay the bars and using alpha 0.85 to create transparency . However I can t figure out why the last variable appears to be on top of the second one.I would like the first variable covering the second variable as it is and the second one covering the third one which is the problem here . What does control the depth of each variable and is there a way to change this Histogram presenting my 3 variables as you can see the black variable appears on top of the dark grey one which is great but the light grey variable also appears on top of the dark grey variable instead of under it http : i.stack.imgur.com Bh5zi.jpg .. . .. . Many thanks . .. . Answer : Alright For those struggling with the same problem I eventually found the way this works . The order of the columns horizontally is determined alphabetically by the name of the three variables in my case F is the first bar N is the second bar and XFe is the last bar but the depth of each variable is determine by they order of appearance in the dataset with the first variable appearing being the bar the most at the back and the last appearing variable being the bar the most in front see attached pictures for example I put the same colour to the 3 variable to make it more obvious . In my original version the order of appearance of my variables in the dataset was N F and XFe and here is what s happening when I change the order of the dataset : .. . .. . Version with dataset reorganised for having the order of appearance of the variables as F N and XFe http : i.stack.imgur.com dUSdQ.jpg .. . .. . Version with appearance of the variables in the dataset as F XFe and N http : i.stack.imgur.com u77ye.jpg", "Question : This is actually two questions in one not sure if goes against SO rules but anyway . First question is how can I force a geom-text to fit within a geom-bar dynamically according to the values plotted .. . .. . Looking around the solutions I found were changing the size of the label . That certainly works but not for every case . You can change the size for a specific plot to make the text fit within the bar but when the data changes you may need to manually change the size of the text again . My real-life problem is that I need to generate the same plot for constantly changing data daily so I cannot really manually adjust the size for each plot . I tried setting the size of the label as a function of the data . It kinda works not perfectly but works for many cases . But here s another problem even when the label fits within the bar resizing the plot messes everything up . Looking into it I also found in the ggplot documentation http : docs.ggplot2.org current geom text.html that .. . .. . labels do have height and width but they are physical units not data units . The amount of space they occupy on that plot is not constant in data units : when you resize a plot labels stay the same size but the size of the axes changes . Which takes me to my second question : Is it possible to change this default behaviour and let make the labels resize with the plot And also let me refine my first question . Is it possible to force a geom-text to fit within a geom-bar dynamically setting the size of the text using a clever relation between physical units and data units So to follow good practice here s my reproducible example : .. . .. . This code produces this plot : .. . .. . enter image description here http : i.stack.imgur.com 112SS.png .. . .. . If I simply resize the plot labels stay the same size but the size of the axes changes http : docs.ggplot2.org current geom text.html thereby making the labels fit into the bars now perhaps labels are even too small . enter image description here http : i.stack.imgur.com m0g3U.png .. . .. . So this is my second question . It would be nice that the labels resize as well and keep the aspect ration in relation to the bars . Any ideas how to accomplish this or if it is possible at all Ok but going back to how to fit the labels within the bars the simplest solution is to set the size of the labels . Again this works as shown below but it is not maintainable nor robust to changes in the data . enter image description here http : i.stack.imgur.com TKjQr.png .. . .. . For example the very same code to generate the plot with different data yields catastrophic results . enter image description here http : i.stack.imgur.com ezDNs.png .. . .. . And I can go on with the examples setting the size of the labels as a function of the number of categories on x-axis and so on . But you get the point and perhaps one of you ggplot2 experts can give me ideas . .. . Answer : one option might be to write a geom that uses a textGrob with a custom drawDetails method to fit within the allocated space set by the bar width . enter image description here http : i.stack.imgur.com Y01qi.png Comment : awesome .. . still trying to understand how it works cause I only know the basics of ggplot2 but the code works smoothly and addresses both issues : it perfectly fits the text within the bars and the text resize along with the plot . I really did not think it was possible . Many thanks", "Question : I know 3D Barcharts are a sin . But i m asked to do them and as a trade-off i suggested to only make a border with a slightly darker color than the bar s on the top and the right side of the bar . Like that the bars would have some kind of shadow urgh but at least you still would be able to compare them . Is there any way to do this .. . Answer : As you already said - 3D barcharts are bad . You can t do it directly in ggplot2 but here is a possible workaround for this . First make new data frame that contains levels of clarity and corresponding count for each level . Then in ggplot call use new data frame and clarity as x values and V1 counts as y values and add geom blank - this will make x axis with levels we need . Then add geom rect to produce shading for bars - here xmin and xmax values are made as.numeric from clarity and constant is added - for xmin constant should be less than half of bars width and xmax constant larger than half of bars width . ymin is 0 and ymax is V1 counts plus some constant . Finally add geom-bar stat identity above this shadow to plot actually barplot . enter image description here http : i.stack.imgur.com WTVyv.png Comment : +1 for a workaround but Stephen Few is crying and my eyes are bleeding . Comment : Thank you for this workaround", "Question : I don t know if my question clear enough.. . I have this table .. . .. . and I have to visualize the last two column in bar-chart using R to compare student total mark .. . .. . Data Comment : is that a table or matrix barplot table 3 : 4 or a data frame please dput table and add to your question Comment : sorry I am new to R .. . Its a data frame Comment : Possible duplicate of Plotting two variables using ggplot2 - same x axis http : stackoverflow.com questions 11242420 plotting-two-variables-using-ggplot2-same-x-axis .. . Answer : With ggplot2 as your tags suggest the syntax is : .. . .. . Where table is replaced by the name of your dataframe . Edit .. . .. . I was unsure that my first answer really answered your question multiple uses of bars . Create dummy-data .. . .. . With previous plot : .. . .. . ggplot data df aes x x y y +geom bar stat identity http : i.stack.imgur.com uN49F.png .. . .. . If you want to count and have a color for Oral and one for written .. . .. . Which gives : .. . .. . barplot oral written http : i.stack.imgur.com lXBsG.png .. . .. . Comment : alpha parameter is not necessary it just deals with the transparency so that you can see when there are overlapping bars . With student names .. . .. . bars with names http : i.stack.imgur.com e263q.png Comment : This will put one of them in X and the other in Y While I want to put both of them in X to compare student results in Written Oral Comment : This is what I thought I was editing my answer for that . The second code may be what you are looking for . Comment : Thanks .. . but how can I make the student name appear in the X instead of the numbers .. . so it visualize each student name and his oral an written marks .. . Comment : @Sara ggplot reshape2 : : melt table c 1 4 : 5 id.vars Name aes Name value fill variable + geom-bar stat identity Comment : @Sara the third version should do what you want .", "Question : I would like to have the name of each bar under each bar in my case the names are Round and they happen to be 1 2 .. . 12 .. . .. . Here is my current code : .. . .. . Here is the current output : enter image description here http : i.stack.imgur.com lc6zJ.png .. . Answer : set your Round to be a factor .. . .. . Or use scale x continuous", "Question : I have a matrix with the following entries : .. . .. . I want to create a stacked bar plot like this one Barplot http : i.stack.imgur.com Eu7bL.png . The only problem is that I would like to have the order of the stacks to fit this ETB PMA PER KON TRA DDR BUM MAT HED EXP - the order numbers in the matrix and I have also some aesthetic problems . I searched for a solution here but none of the ordering suggestions worked for me.. . : - .. . .. . 1 . How do I plot such a ordered plot 2 . How do I set up x so that each bar is on one number 3 . How do I seperate the bars - here I tried that with a white border.. . 4 . How do I print all kclust numbers in x Thanks a lot for your help Dominik .. . .. . .. . .. . UPDATE .. . .. . Here is the code I used to draw my plot : .. . .. . .. . .. . UPDATE 2 : .. . .. . That s how I did it now : .. . .. . With this result : .. . .. . Image http : i.stack.imgur.com sQltg.png .. . .. . Thank you all for your help Comment : Can you post the ggplot code you used to get the plot shown here It would save a little bit of time in getting up to speed to make the modifications other than ordering which @Gavin Simpson has dealt with below that you are requesting .. . Comment : You should ask 1 question per Question - it makes it easier to search and find Answers . Comment : @Ben : I just updated my post . Comment : @Gavin You re right but splitting it up would made it also more complicated.. . Comment : @Dominik Why I ve Answered 1 and didn t even need the plotting code . 2 3 4 Just need kclust coercing to a factor - at the moment you are using a continuous variable and hence continuous scale for the x-axis . .. . Answer : If you relevel your hhDomMil as a factor like this : .. . .. . then your plot will be in the order you like : Comment : I like this solution because a it is terse and b it generalizes to non-ggplot questions as well . Comment : Like Gavins solution this is a nice generalized solution" ] }
[ "yes-answer-long", "yes-answer-short" ]
ggplot2
UNK_RELATION
viewport-units@viewport@107
viewport-units -- the viewport-units vh vw vmin and vmax are units-of-measurement relative to the browser @placeholder size introduced in css3 .
{ "confidence": [ 105.3531494140625, 93.44867706298828, 88.427734375, 79.85893249511719, 78.02508544921875, 76.10196685791016, 75.38623809814453, 71.39811706542969, 71.39811706542969, 68.89610290527344, 65.33397674560547, 65.24330139160156, 65.24330139160156, 65.24330139160156, 64.81800842285156, 64.69068908691406, 64.47935485839844, 63.72176742553711, 63.55389404296875, 63.45831298828125, 62.71381759643555, 61.6888427734375, 60.68598175048828, 60.55354309082031, 60.21388626098633, 59.80472946166992, 59.80472946166992, 59.570045471191406, 59.43451690673828, 58.78947448730469, 58.20887756347656, 58.15119552612305, 58.11475372314453, 58.0538444519043, 58.01974105834961, 58.01974105834961, 56.011558532714844, 55.527198791503906, 55.467899322509766, 54.12162399291992, 54.09524154663086, 53.651763916015625, 52.968902587890625, 52.948341369628906, 52.84880828857422, 52.61250686645508, 52.479007720947266, 52.479007720947266, 52.479007720947266, 51.96870803833008, 50.69401931762695, 50.69401931762695, 50.64838409423828, 50.47951126098633, 49.701255798339844, 49.24168395996094, 48.554664611816406, 48.554664611816406, 47.995513916015625, 47.760658264160156, 47.4744873046875, 47.28839111328125, 46.78987121582031, 46.45263671875, 46.23053741455078, 46.04509735107422, 46.04509735107422, 45.45845031738281, 45.40730285644531, 45.344505310058594, 44.0711669921875, 44.0711669921875, 44.0711669921875, 44.0711669921875, 43.92188262939453, 41.78252410888672, 41.60488510131836, 41.467369079589844, 41.33575439453125, 41.242862701416016, 41.1888427734375, 41.1888427734375, 41.1888427734375, 40.611793518066406, 40.52146911621094, 40.44282150268555, 40.1534309387207, 39.93612289428711, 39.68235397338867, 39.628517150878906, 39.60041809082031, 39.47980499267578, 39.19536209106445, 39.19536209106445, 39.14970779418945, 39.00044250488281, 38.808868408203125, 38.45259094238281, 38.4434814453125 ], "content": [ "The vh and vh units are a measurement relative to the viewport size .", "The relative units are : em ex ch rem vw vh vmin vmax .", "The new vw and vh vmin and vmax CSS units are quite useful as is calc .", "In CSS3 there are these 2 new units : vh and vw .", "px is absolute viewport-units are relative .", "Linked : stackoverflow.com questions 30181112 http : stackoverflow.com questions 30181112 are-viewport-units-vw-vh-vmin-vmax-not-zoom-friendly 30289242 30289242", "caniuse.com viewport-units http : caniuse.com viewport-units", "My concern now is : shall I use px viewport-units vh vw or what else when developing for mobile", "This site http : caniuse.com viewport-units puts support for vh and vw at around 70 is that a fair assessment", "Relevant : caniuse.com feat viewport-units http : caniuse.com feat viewport-units I gave up in iOS7 and 8 and used percentages and modified code that relied on vh and vw sigh", "IE 9 will not support viewport-units .", "Why how do viewport-units get rounded", "Firefox Opera don t even implement viewport-units .", "This states that using viewport-units could be buggy in iOS7 .", "If not why were these new units introduced to CSS3", "@JonHaider Note that vh might not work for all of your desired targets : caniuse.com feat viewport-units http : caniuse.com feat viewport-units", "So I ve been using the vh and vw units inside of CSS3 recently and loving the way that they work .", "The only difference with mine is compatibility see caniuse.com feat viewport-units http : caniuse.com feat viewport-units and caniuse.com feat css3-boxsizing http : caniuse.com feat css3-boxsizing .", "This provides a fix for the repaint issue in Safari : github.com rodneyrehm viewport-units-buggyfill https : github.com rodneyrehm viewport-units-buggyfill", "See caniuse http : caniuse.com viewport-units .", "Firefox Opera don t implement viewport-units yet and the WebKit browsers currently have a bug where viewport-units cannot be used inside calc .", "The bug is listed for VH units if I change this example to VW units it again causes the same issue .", "Ios is buggy for vh units .", "I came across this fix today : https : github.com rodneyrehm viewport-units-buggyfill It checks every element for a vh vw unit and turns it into px .", "Im trying to test support for vw units and serve a seperate stylesheet when the browser doesnt support the unit I read the modernizr tutorials and am familiar with modernizr css detects but testing for vh units viewport relative units is something I didnt find on the net .", "Would you recommend using viewport-units when building a site", "I wouldn t recommend using viewport-units but instead use : .. . .. . Pixles : e.g .", "The beauty of vw vh is that they adjust according to the size of the viewport automatically .", "Why calc with these units does not works is described in CSS Calc Viewport Units Workaround", "After searching online I found the viewport-units-buggyfill https : github.com rodneyrehm viewport-units-buggyfill plugin that is supposed to fix my issue .", "I ve used vh viewport-units css in one of my projects but in mobile-safari it doesn t work .", "vh and vw measure the percentage of height and width of the viewport respectively .", "safari 7.0 supports vh units .", "It seems that vw units cannot be used inside calc .", "I m using viewport-units to make the whole thing responsive .", "Most website using viewport-units were looking great most of the time .", "I am currently developing a website in which pretty much all of my measurements font-size padding margin width height etc are made with the viewport-units vw and vh .", "What vw vh does is remove the dependency on any parent and allows sizing based on the viewport size .", "According to the specs https : drafts.csswg.org css-values-3 viewport-relative-lengths the viewport relative length units do not take scrollbars into account and in fact assume that they don t exist .", "possible duplicate of vw CSS units in calc in Chrome not working http : stackoverflow.com questions 14182695 vw-css-units-in-calc-in-chrome-not-working", "I was under the impression that the units vh and vw deal with mobile-browser zooming in but apparently that s not the case and I think I am beginning to understand why .", "Also is there at least any way to detect zoom with css3 @media and thus only apply viewport-units when no zoom is active", "You can see that the width height margin-left and font-size properties all use rems or viewport-units exclusively .", "Other units like vh vw in deep development it s need more time to testing and appearing in web authoring .", "In CSS3 there are sixteen different units by which you can measure the size .", "I ve read about @viewport stuff but it s not really supported yet and also poses the question when to use which viewport size how to make it as fluent as when you use vh and vw on a destop browser", "So I ve just discovered viewport-units and I really want to use them .", "I want to use viewport-units to scale it up so that either the height is 100vh or the width is 100vw whichever is smaller .", "The page you have linked to answers your question http : caniuse.com viewport-units really .", "This sets the browser layout viewport relative to the css styling .", "Before I answer this I d like to point out that Chrome and IE 10+ actually supports calc with viewport-units .", "It s logical that the space between elements increases as you zoom in the page if that space is not defined in viewport-units as well .", "Generally the relation between the measurement units is as follows : .. . .. . The absolute units cm mm in pt and pc will appear as exactly that size in CSS as everywhere else .", "Why there is a difference between manually calculated height and height calculated by the browser using vh units .", "Im testing out the vw unit relative to viewport width .", "relative lengths : .. . .. . Relative length units specify a length relative to another length .", "You can try viewport-units buggyfill but I don t recommend it without any edit .", "If IE8 doesn t support viewport-units the JS polyfill will never know its value by simply parsing the DOM with jQuery or whatever .", "The only other browsers which support both calc and viewport-units are IE10 and Safari 6 neither of which can be installed on my platform Windows 7 .", "Understanding sizing in CSS .. . .. . There are two types of measurement units : .. . .. . relative lengths and absolute lengths .", "Usually this helps : .. . .. . . . and you don t have to use vh units .", ".. . Dynamically updating the height was not working we had a few choices : drop viewport-units on iOS match the document size like before iOS 8 use the small view size use the large view size .", "vh : viewport s height 1 100th of the height of the viewport .", "google detect if browser supports vmin units polyfill and you will have lots to choose from .", "What browser device and how do you get the viewport size", "Problem : .. . .. . iOS8 Safari doesn t seem to understand support media-queries containing viewport-units like : max-height : 175vw .", "Until viewport-units are really supported you can use cordova-anyscreen to accomplish what you want .", "For this reason the relative length units are best suited for the web developers .", "It seems that desktop IE10 doesn t correctly scale text that has its font-size set in viewport-units when the zoom level is not set to 100 .", "Most browser support the v units caniuse.com search vw http : caniuse.com search vw as well as the css3 media-queries caniuse.com search media http : caniuse.com search media", "IE8 discards css rules it doesn t understand like those with viewport-units completely so they re missing from the document.styleSheets interface .", "I have a weird issue where the elements on my site that use viewport-units to define their heights 100vh for example are not working on Safari for mobile .", "I am confused how to properly define viewport and viewbox in SVG file to convey shapes that have real world physical units .", "How do I properly define the viewport viewbox such that the physical units in real world get scaled to fit in my desired image-resolution", "How VW and VH unit works .", "This is a known bug with vh and vw in Safari .", "Viewport computing http : en.wikipedia.org wiki Viewport", "The units in my AutoCAD file are defined in millimeters mm .", "Just to explain what s happening : this checks the current viewport size then runs through all the stylesheets looking for properties that have a value set in viewport-units converts the value to pixels and adds the converted css rules to a new stylesheets that is appended after the other stylesheets .", "My problem now is that I have this bug : .. . .. . Safari viewport unit bug on height 100 http : stackoverflow.com questions 24017270 safari-vh-units-applied-to-parent-element-doesnt-allow-100-height-in-child .. . .. . so I m trying to set the height of .center-wrapper to inherit .", "From what I ve seen in other http : stackoverflow.com a 14184433 1191087 answers http : stackoverflow.com a 14419680 1191087 CSS viewport-units can t be used in calc statements yet .", "What I would like to achieve is the following statement : .. . .. . Is there some workaround way I can achieve this using purely CSS even though the viewport-units can t be used in the calc statement", "http : stackoverflow.com questions 21224411 css-calc-viewport-units-workaround where is this solved for height property by hacking margin and padding but it cannot be used for line-height property .", "The issue is that 100vh equals the viewport when the pixel ratio is 1 : 1 and not zoomed out therefore my 100vh vw is much smaller than the physical viewport .", "If your viewport is 1000px in height and your header is 100px then you will get a scrollbar as you re placing and element after the header that is equal to the height of the browser viewport .", "The viewport measurements are accurate .", "Zooming in does not change the viewport at all but merely shows the user only a part of the viewport despite the name viewport .", "How does vw and vh unit works http : stackoverflow.com questions 24876368 how-does-vw-and-vh-unit-works .. . .. . The answer specifically says .. . .. . vw and vh are a percentage of the window width and height respectively : 100vw is 100 of the width 80vw is 80 etc .", "http : stackoverflow.com questions 30175730 how-to-properly-use-css-values-viewport-relative-lengths 30180320 30180320 I ve tried using viewport-units in the following way to automatically magnify a tiny page on a big monitor : .. . .. . However when tested in Google Chrome it made the zoom feature to mostly stop working .", "Some code adjusts the font-size based on the viewport .", "Instead of Vw Vh use rem with this JavaScript .", "When the browser window is resized the font doesn t adjust itself according to the new viewport size .", "but.. . the scrollbar isn t included in the viewport width", "or 100vh actually is the viewport of the entire screen", "The specification merely prescribes that 1 unit of vw is : .. . .. . 1 of viewport s width .. . .. . This ought to be reasonably precise as 100 of these units should fill the entire width so rounding will cause problems here .", "Relative length units .. . .. . em : font-size of the element .. . .. . : percentage values are always relative to another value for example a length .. . .. . ex : x-height of the element s font 1ex 0.5em in many fonts .. . .. . ch : width of the 0 ZERO U+0030 glyph in the element s font .. . .. . rem : font-size of the root element .. . .. . vw : viewport s width 1 100th of the width of the viewport .", "No matter how much you zoom in and out the viewport is still the same size .", "@Lemony-Andrew : That is because you now have two elements with height equal to the viewport height for a total of 200 of the viewport height .", "That means that we can define a single font-size on the html element and define all rem units to be a percentage of that ." ] }
{ "confidence": [ 124.81916809082031, 114.50054931640625, 107.1713638305664, 104.54219818115234, 102.37866973876953, 100.08079528808594, 92.88069152832031, 92.88069152832031, 88.31163024902344, 87.70978546142578, 87.61077117919922, 87.07374572753906, 86.74776458740234, 85.90469360351562, 85.8704605102539, 84.39448547363281, 84.02310180664062, 82.72865295410156, 82.69715881347656, 82.55753326416016 ], "content": [ "Question : Does anybody know if there is a fix for Safari vh rule All working ok in all browsers but only in Safari it is not recognized Is there a fix for safari that we can use VH rule in css Comment : safari 7.0 supports vh units . caniuse.com search vh http : caniuse.com search vh Comment : This provides a fix for the repaint issue in Safari : github.com rodneyrehm viewport-units-buggyfill https : github.com rodneyrehm viewport-units-buggyfill .. . Answer : Browser support for vw .. . .. . IE 10+ Firefox 19+ - Supported .. . .. . Chrome 20+ .. . .. . Safari 6+ - Supported but has repaint issue .. . .. . iOS 6+ - Supported but I m not sure how relevant repaint issue is does viewport size change on orientation change Most notably no support in Android yet . For more about sizes read 1 http : stackoverflow.com questions 14302884 css-style-percentes-vs-em-vs-px read 2 http : stackoverflow.com questions 12271196 responsive-app-which-font-size-units-em-vs-px-vs-pt-vs-percent read 3 http : stackoverflow.com questions 11799236 should-i-use-px-or-rem-in-my-css .. . .. . Here I try to give a idea on sizing based on web read and research . In CSS3 there are sixteen different units by which you can measure the size . Understanding sizing in CSS .. . .. . There are two types of measurement units : .. . .. . relative lengths and absolute lengths . relative lengths : .. . .. . Relative length units specify a length relative to another length . The relative units are : em ex ch rem vw vh vmin vmax . They are mainly useful when the output media has dynamic size like mobile device laptop . absolute lengths : .. . .. . these are fixed in relation to each other and anchored to some physical measurement . The absolute units are : px mm cm in pt pc .They are mainly useful when the output environment is known . As you known we got two types of measurement units and two types of media output : screen and print and someone might to add handheld also but I take it in screen . Absolute length units .. . .. . px : One device pixel dot of the display . 1px is equal to 1 96th of 1in .. . .. . mm : One millimeter . cm : One centimeter 10 millimeters . in : One inch 2.54 centimeters . pt : One point which is 1 72 of an inch . pc : One pica which is 12 points . Absolute length units are best suited for paper low-resolution screen or has a closed view from eyes to screen . Relative length units .. . .. . em : font-size of the element .. . .. . : percentage values are always relative to another value for example a length .. . .. . ex : x-height of the element s font 1ex 0.5em in many fonts .. . .. . ch : width of the 0 ZERO U+0030 glyph in the element s font .. . .. . rem : font-size of the root element .. . .. . vw : viewport s width 1 100th of the width of the viewport . vh : viewport s height 1 100th of the height of the viewport . vmin : minimum of the viewport s height and width .. . .. . vmax : maximum of the viewport s height and width .. . .. . The Difference Generally the relation between the measurement units is as follows : .. . .. . The absolute units cm mm in pt and pc will appear as exactly that size in CSS as everywhere else . They are not recommended for use on screen because screen sizes vary so much . For this reason the relative length units are best suited for the web developers . In web authoring em and percent are most common unit . Since CSS3 you will find rem unit that appears quite frequently . em percent and rem means they are related to the size . Because em inherits size from its parent element makes it a little difficult to sizing if the user has a big size on a big screen or a small size on a handheld device the sizes will be in proportion . If we convert 1em equals 10px instead of the default 16px then we sizing the text in list like .. . .. . the problem with em -based sizing is that the font-size compounds . So rem is a new unit is in development to make it even easier to make style rules that depend only on the default font-size . That means that we can define a single font-size on the html element and define all rem units to be a percentage of that . Unlike the em which may be different for each element the rem is constant throughout the document . What s about keywords I m not using the keywords unit although keyword sizing is pretty consistent across browsers and platforms because it s can not handle the typography as the choices are fairly limited . Conclusion .. . .. . Now the em and percent units are standard for sizes on the web but in practice the rem unit seems to provide a more consistent and accessible display for multi screen sizes . Other units like vh vw in deep development it s need more time to testing and appearing in web authoring . Comment : What s the Safari repaint issue you refer to Comment : Didnt know about ch ex rem . THanks Upvote", "Question : I m using 100vh to center a div vertically with line-height . This site http : caniuse.com viewport-units puts support for vh and vw at around 70 is that a fair assessment Would you recommend using viewport-units when building a site I know this is a bit subjective I m just looking for opinions from more experienced web developers than I . .. . .. . EDIT : Thanks for the input everyone I do want it to look good on mobile so I guess I ll have to forgo vh . Comment : create a new question for that please and look my post i just added a part about mobile-devices Comment : Right I ll edit that out . Comment : caniuse.com search vh http : caniuse.com search vh .. . Answer : The page you have linked to answers your question http : caniuse.com viewport-units really . It depends what browsers you need to support . Partial support in IE9 refers to supporting vm instead of vmin . Partial support in iOS7 is due to buggy behavior of the vh unit . All other partial support refers to not supporting the vmax unit . This states that using viewport-units could be buggy in iOS7 . I wouldn t recommend using viewport-units but instead use : .. . .. . Pixles : e.g . height : 500px .. . Percentage : e.g . height : 50 .. . .. . These values are widely supported and will produce the best results .", "Question : The new vw and vh vmin and vmax CSS units are quite useful as is calc . Both work fine in Chrome the latter prefixed as -webkit-calc but for some reason I ve found that calc property values including the v units such as width : -webkit-calc 95vw - 25em yield an invalid property value . Is this just not implemented yet or the spec or a bug Comment : The spec allows vw in calc it s even used in an example there : w3.org TR css3-values calc http : www.w3.org TR css3-values calc Comment : This was a bug in Chrome but it s been fixed now .. . Answer : It s an old bug and has long been fixed but if you re still supporting older versions of chrome and specifically encountering this bug in an older version of chromium in an Android tablet you re supporting as was my case here s the simple way you can get around this bug : .. . .. . Use a wrapper that spans the VW you re targeting and then instead of using the viewport-units in the calc .. . use 100 . html : .. . .. . css :", "Question : It seems that desktop IE10 doesn t correctly scale text that has its font-size set in viewport-units when the zoom level is not set to 100 . I m trying to find out which IE versions and possibly other browsers are affected by this . Please try this example in your browser and report your findings : Comment : Linked : stackoverflow.com questions 30181112 http : stackoverflow.com questions 30181112 are-viewport-units-vw-vh-vmin-vmax-not-zoom-friendly 30289242 30289242 Comment : From my own testing : Chrome 28 understands vw for DIV sizes but not for font sizes . Chrome 43 shows expected behaviour . IE8 doesn t unstand vw at all . IE10 incorrectly scales vw-sized fonts when zoomed in out . .. . Answer : This is a simple workaround : the font sizes are set in percentages and a resize-triggered script sets the body font-size according to the body width . However I d still like to know which browsers and versions I need to enable this workaround for . Please try out the example in the question and report your platform browser version and the observed behaviour when resizing and zooming the window .", "Question : The new vw and vh vmin and vmax CSS units are quite useful as is calc . Both work fine in Chrome the latter prefixed as -webkit-calc but for some reason I ve found that calc property values including the v units such as width : -webkit-calc 95vw - 25em yield an invalid property value . Is this just not implemented yet or the spec or a bug Comment : The spec allows vw in calc it s even used in an example there : w3.org TR css3-values calc http : www.w3.org TR css3-values calc Comment : This was a bug in Chrome but it s been fixed now .. . Answer : It s a bug registered as Bug 94158 https : bugs.webkit.org show bug.cgi id 94158 - calc isn t working with viewport-units . Comment : Is the bug fixed I have to use it or an alternative and I can t find another way to do it.. . Comment : @Samoth Not as far as I know . In Chrome 31.0.1650.57 m and I just ran into this issue . Comment : Correct this chrome bug is still a bug and is currently not being addressed . Comment : Looks like this was stealth-fixed - at least it seems to be working in the dev channel for me . Comment : working in chrome canary not in nightly safari", "Question : I just learned about a new and uncommon CSS unit . vh and vw measure the percentage of height and width of the viewport respectively . I looked at this question from Stack Overflow but it made the units look even more similar . How does vw and vh unit works http : stackoverflow.com questions 24876368 how-does-vw-and-vh-unit-works .. . .. . The answer specifically says .. . .. . vw and vh are a percentage of the window width and height respectively : 100vw is 100 of the width 80vw is 80 etc . This seems like the exact same as the unit which is more common . In Developer Tools I tried changing the values from vw vh to and viceversa and got the same result . Is there a difference between the two If not why were these new units introduced to CSS3 Comment : What vw vh does is remove the dependency on any parent and allows sizing based on the viewport size . .. . Answer : 100 can be 100 of the height of anything . For example if I have a parent div that s 1000px tall and a child div that is at 100 height then that child div could theoretically be much taller than the height of the viewport or much smaller than the height of the viewport even though that div is set at 100 height . If I instead make that child div set at 100vh then it ll only fill up 100 of the height of the viewport and not necessarily the parent div . See this jsfiddle http : jsfiddle.net 0w62roa0 : .. . .. . output http : i.stack.imgur.com RUjxn.png Comment : Uh that s great . I am using vh unit", "Question : I actually have an issue im trying to solve since 3 weeks . Im trying to test support for vw units and serve a seperate stylesheet when the browser doesnt support the unit I read the modernizr tutorials and am familiar with modernizr css detects but testing for vh units viewport relative units is something I didnt find on the net . So basically : .. . .. . Scenario 1 : Browser supports vw unit then serve stylesheet A . Scenario 2 : Browser doesnt support it then serve stylesheet B . .. . .. . I did find out that there is a non-core detect called Modernizr.cssvwunit but I honestly have no idea where to start or how to use in in this context . It would be great if you help me expand my knowledge . Also if it is not too laborious a jsfiddle with an example which I could study would be very helpful . Sincerely .. . .. . Markus .. . .. . Edit : why is it firing only the else statement http : jsfiddle.net 5saCL 10 Comment : Good question.. . I am wondering this myself Comment : Most browser support the v units caniuse.com search vw http : caniuse.com search vw as well as the css3 media-queries caniuse.com search media http : caniuse.com search media Comment : @jeff Indeed but he is trying to detect it and serve a different stylesheet for whatever purpose . In my case im trying to achieve the same because I have very specific reasons to taerget firefox 18 and below Comment : google detect if browser supports vmin units polyfill and you will have lots to choose from . Comment : @jeff actually I dont really want to use polyfills but just use a different stylesheet . I made a jsfiddle of what I already tried jsfiddle.net 5saCL http : jsfiddle.net 5saCL .. . Answer : If you look at this tutorial http : www.developphp.com view.php tid 1253 you find out how to change CSS style with JavasSript . You just need to edit little bit the script to match your requirements : .. . .. . This should work . Comment : thank you very much This seems to do the job .", "Question : I actually have an issue im trying to solve since 3 weeks . Im trying to test support for vw units and serve a seperate stylesheet when the browser doesnt support the unit I read the modernizr tutorials and am familiar with modernizr css detects but testing for vh units viewport relative units is something I didnt find on the net . So basically : .. . .. . Scenario 1 : Browser supports vw unit then serve stylesheet A . Scenario 2 : Browser doesnt support it then serve stylesheet B . .. . .. . I did find out that there is a non-core detect called Modernizr.cssvwunit but I honestly have no idea where to start or how to use in in this context . It would be great if you help me expand my knowledge . Also if it is not too laborious a jsfiddle with an example which I could study would be very helpful . Sincerely .. . .. . Markus .. . .. . Edit : why is it firing only the else statement http : jsfiddle.net 5saCL 10 Comment : Good question.. . I am wondering this myself Comment : Most browser support the v units caniuse.com search vw http : caniuse.com search vw as well as the css3 media-queries caniuse.com search media http : caniuse.com search media Comment : @jeff Indeed but he is trying to detect it and serve a different stylesheet for whatever purpose . In my case im trying to achieve the same because I have very specific reasons to taerget firefox 18 and below Comment : google detect if browser supports vmin units polyfill and you will have lots to choose from . Comment : @jeff actually I dont really want to use polyfills but just use a different stylesheet . I made a jsfiddle of what I already tried jsfiddle.net 5saCL http : jsfiddle.net 5saCL .. . Answer : Are you sure you want to load two different stylesheets Another option is to check Add CSS Classes in Modernizr . This way classes are added to the html element . Then do this in your CSS :", "Question : I m using 100vh to center a div vertically with line-height . This site http : caniuse.com viewport-units puts support for vh and vw at around 70 is that a fair assessment Would you recommend using viewport-units when building a site I know this is a bit subjective I m just looking for opinions from more experienced web developers than I . .. . .. . EDIT : Thanks for the input everyone I do want it to look good on mobile so I guess I ll have to forgo vh . Comment : create a new question for that please and look my post i just added a part about mobile-devices Comment : Right I ll edit that out . Comment : caniuse.com search vh http : caniuse.com search vh .. . Answer : use both CSS vh and jQuery it s safer . jQuery example : .. . .. . and CSS :", "Question : null .. . Answer : This div should display half of the screen . Comment : iOS Safari and or OS X Safari Which version s exactly of iOS and or Safari on OS X What happens Relevant : caniuse.com feat viewport-units http : caniuse.com feat viewport-units I gave up in iOS7 and 8 and used percentages and modified code that relied on vh and vw sigh", "Question : I ve used vh viewport-units css in one of my projects but in mobile-safari it doesn t work . It seems like Safari doesn t know what to do with vh but it works fine in other browsers . I would like to make the same effect with or without vh please help me . By the way I m using facebox . height : 50 doesnt work fine .. . .. . html : .. . .. . This is my css : .. . Answer : I came across this fix today : https : github.com rodneyrehm viewport-units-buggyfill It checks every element for a vh vw unit and turns it into px . Well worth checking out I think .", "Question : null .. . Answer : I am used to use px on desktop and sometime em even though I don t know why one is best when developing a responsive interface . My concern now is : shall I use px viewport-units vh vw or what else when developing for mobile Comment : px is absolute viewport-units are relative . Do you catch the different uses with different displays sizes Comment : looks like viewports are responsive . pixel are not . however I m not sure about the best practice especially for what concerns horizontal units Comment : you can must use both . Even with a responsive application website some stuff are always the same size ie : Logo Footer.. . Comment : thank you @Thomas . what about alignment Comment : I m far from an expert in CSS unfortunately.. . You ll find a lot more answers on the CSS chatroom http : chat.stackoverflow.com rooms 29074 html-css-web-development of SO", "Question : In CSS3 there are these 2 new units : vh and vw . So we can use .. . .. . to scale a block that is 80 percent viewport height or 60 percent viewport width . But I think typically the default body element has a 8px margin at all 4 sides so how should we incorporate this into our use of vw and vh if we do need to use 100vh and 100vw or almost that amount to cover up the width and height but work with the body s margin Some options include 1 resetting body margin to 0 2 resetting body margin to 8px so to make sure it is the same across all browsers 3 use height : calc 100vh - 8px and width : calc 100vw - 16px to set the proper height and width.. . but the 8px and 16px seem too hardcoded . What might be good practices to handle this .. . Answer : 4 You have to define the body margin using vh and vm unit . .. . .. . It s the only way to be sure to have 100 of the viewport height and width . Comment : interesting solution.. . although if width of the viewport is 1000px then I kind of expect the margin to have that 8px value already or else it may be too little so maybe your solution can just be 0.8vw and content width 98.4vw", "Question : As mentioned in the title is it possible to calculate the vw with the scrollbars in css only UPDATE : Sorry for expressing misleadingly . I need the vw minus the scrollbar . For example I have a width of 1024px . vw returns 1024px . Great . But my actual body width is only something like 1009px . Thanks in advance Comment : but.. . the scrollbar isn t included in the viewport width Comment : @Danield usually not . When it is it s usually one that vanishes when not scrolling so the question is quite pointless . Comment : @Danield sorry I updated myquestion Comment : If we re talking about some artificial scroll-bar which you put there then maybe you re looking for something like this : width : calc 100vw - scrollbarWidth where scrollbarWidth is some fixed value like 15px Comment : @Danield I actually need a cross-browser fix where I have the variable-width of every native browser scroller .. . Answer : According to the specs https : drafts.csswg.org css-values-3 viewport-relative-lengths the viewport relative length units do not take scrollbars into account and in fact assume that they don t exist . So whatever your intended behavior is you cannot take scrollbars into account when using these units . Comment : sorry I updated myquestion Comment : Again vw per spec are not aware of any scrollbar s existance . So you cannot take them into account .", "Question : I have a very simple situation where I want to set a container element to 80vh and then have the inner div to be 100 of that height . On Chrome this will render correctly however on Safari the inner element doesn t have 100 of the 80vh height . Here is a fiddle showing this issue : http : jsfiddle.net neilff 24hZQ .. . .. . On Chrome the element is blue in Safari it is red . Is there a work around for this issue without applying 80vh to the height of the .inner div Comment : Support is poor in Safari - caniuse.com search vh http : caniuse.com search vh Check the know issue at the bottom Comment : I see issues with iOS7 Safari listed but not desktop . The bug is listed for VH units if I change this example to VW units it again causes the same issue . Comment : Ios is buggy for vh units . You can try viewport-units buggyfill but I don t recommend it without any edit . Comment : This bug is fixed in Safari 8 .. . Answer : This is a known bug with vh and vw in Safari . You can fix it by setting height : inherit on the inner element : .. . .. . http : jsfiddle.net 24hZQ 47 Comment : God I love StackOverflow Comment : I found that height : inherit max-height : 100 helps with browser compatibility .", "Question : in what has to be a widely used case using vh for height of a div and using vm for font-size . css3 .. . .. . html - case 1 .. . .. . html - case 2 .. . .. . is there any way to use calc and other css3 properties to vertically center the div.inner within the div.outer Comment : possible duplicate of vw CSS units in calc in Chrome not working http : stackoverflow.com questions 14182695 vw-css-units-in-calc-in-chrome-not-working .. . Answer : The best thing to do which isn t future proof is to use top padding . Sadly calc didn t work with https : bugs.webkit.org show bug.cgi id 94158 vh vm on Chrome it was fixed 2014-04-30", "Question : I ve tried to create a login form using ONLY vh sizes . Doing this in the hopes that the form in all would scale accordingly to the viewport . It doesn t For some reason zooming in creates a blank space that keeps getting bigger the more you zoom between the input fields and the text below . http : jsfiddle.net TnY3L .. . .. . The fiddle isn t very well made just copied it from my project . But you can see what s wrong - and that s what counts . Anyone have any idea as to how I were to go about fixing this Comment : I can t really see what s wrong . The viewport height isn t changing just how things are rendered within it . Viewport computing http : en.wikipedia.org wiki Viewport Comment : Well then I might have a wrong idea as to how the vh works tbh . In my opinion it would be rendered to the exact same positions . Comment : The viewport is supposed to represent the physical space of the display . Zoom doesn t change the physical space of the display rather changing the contents of the display . Think of it as looking at something through a magnifying glass . It doesn t actually change the size of the physical object just the size at which it s being displayed . Comment : So is there any other reasonable way of achieving this Comment : Something like this jsfiddle.net TnY3L 5 http : jsfiddle.net TnY3L 5 .. . Answer : The vh and vh units are a measurement relative to the viewport size . 1vh is 1 of the current viewport height so 100vh is always 100 height . No matter how much you zoom in and out the viewport is still the same size . When you zoom in you scale up the entire document but not the viewport . It s logical that the space between elements increases as you zoom in the page if that space is not defined in viewport-units as well . Because the other elements don t increase it takes the document out of proportions . If you want to create elements that scale as you zoom in try using the rem unit . This is relative to the body s font-size so as you zoom the page in every value expressed in rem will scale accordingly . Comment : if you take a div give it 200px width and zoom in will it scale If yes your explanation is wrong . Comment : Good point I was a bit too simplistic", "Question : I was under the impression that the units vh and vw deal with mobile-browser zooming in but apparently that s not the case and I think I am beginning to understand why . Zooming in does not change the viewport at all but merely shows the user only a part of the viewport despite the name viewport . Basically there is a difference between what you can see and the viewport . I don t know if distinguishing those two really makes sense but that s how it seems to be . The question is : How else do I react in my stylesheet to zoom changes For example I have some html element with a width and it fits on the screen of a mobile phone . Now the user zooms in doing that two finger gesture moving the fingers away from each other . The size of the element should stay the same relative to what the user sees but text should get bigger because it might be the reason why the user zooms in . Maybe they couldn t read it before or want a link-to be bigger so that they can click more easily on it . How would I do such a thing I ve read about @viewport stuff but it s not really supported yet and also poses the question when to use which viewport size how to make it as fluent as when you use vh and vw on a destop browser Simple limiting up to so and so much px of width won t do . Defining a mathematical function for how much the element changes its size relative to what one can see and how much the text-size changes would be great but is probably not possible to have . .. . Answer : On mobile-devices the text-size-adjust property allows Web authors to control if and how the text-inflating algorithm is applied to the textual content of the element it is applied to . As this property is non-standard it must be used prefixed : -moz-text-size-adjust -webkit-text-size-adjust and -ms-text-size-adjust . Browsers on smartphones don t display web pages using the same algorithms as browsers rendering web pages on desktop machines . Instead of laying out the web page at the width of the device screen they lay it out using a viewport that is much wider than the device screen usually of 800 or 1000 pixels wide . One of two possible methods is used to map back to the original device coordinates : either a smaller window is then used to display on the device screen only part of what is actually being rendered or the viewport is stretched to the size of the device . Its highly experimental though Comment : Yep a check on caniuse.com search text-size-adjust http : caniuse.com search text-size-adjust confirms its experiemental state :", "Question : I m using 100vh to center a div vertically with line-height . This site http : caniuse.com viewport-units puts support for vh and vw at around 70 is that a fair assessment Would you recommend using viewport-units when building a site I know this is a bit subjective I m just looking for opinions from more experienced web developers than I . .. . .. . EDIT : Thanks for the input everyone I do want it to look good on mobile so I guess I ll have to forgo vh . Comment : create a new question for that please and look my post i just added a part about mobile-devices Comment : Right I ll edit that out . Comment : caniuse.com search vh http : caniuse.com search vh .. . Answer : The statistic is clearly and it is a fair assessment in my point of view . I think the decision has to be made by you . If you want to future-proof your website using the latest greatest technology but are aware that there are currently some downfalls then great go for it . If you are not prepared to invest a little more into your online presence then stick to the old way which is in no means wrong . EDIT : When i want to create a responsive-design I start developing for Mobile Devices first and then create the Desktop Version to ensure that my viewports all work correctly since the Mobile support is lacking at some points especially vmax . BUT about this you could ask 50 guys and the chances that they all will say something else are pretty good .", "Question : Does anybody know if there is a fix for Safari vh rule All working ok in all browsers but only in Safari it is not recognized Is there a fix for safari that we can use VH rule in css Comment : safari 7.0 supports vh units . caniuse.com search vh http : caniuse.com search vh Comment : This provides a fix for the repaint issue in Safari : github.com rodneyrehm viewport-units-buggyfill https : github.com rodneyrehm viewport-units-buggyfill .. . Answer : Instead of Vw Vh use rem with this JavaScript . The run code snippet might create confusion cause its window resizes by zooming . To test this just copy this code into some html file and run it in Safari and other browsers or see Full Page . DOCTYPE html .. . head .. . script language javascript type text javascript .. . function doc win .. . var docEl doc.documentElement .. . recalc function .. . var clientWidth docEl.clientWidth .. . if clientWidth return .. . .. . docEl.style.fontSize clientWidth + px .. . docEl.style.display none .. . docEl.clientWidth Force relayout - important to new Android devices .. . docEl.style.display .. . .. . .. . Abort if browser does not support addEventListener .. . if doc.addEventListener return .. . .. . Test rem support .. . var div doc.createElement div .. . div.setAttribute style font-size : 1rem .. . .. . Abort if browser does not recognize rem .. . if div.style.fontSize 1rem return .. . .. . win.addEventListener resize recalc false .. . doc.addEventListener DOMContentLoaded recalc false .. . document window .. . script .. . style .. . @charset utf-8 .. . padding : 0 margin : 0 .. . div position : fixed width : 40 height : 30 background-color : yellow color : blue font-size : 0.02rem .. . style .. . head .. . .. . body .. . div in this case 0.01 rem 1vw . You need to remove body margins . div .. . body .. . .. . html .. . .. . For more explenation see this article that I ve found . http : css-tricks.com theres-more-to-the-css-rem-unit-than-font-sizing" ] }
[ "yes-answer-long", "yes-answer-short" ]
viewport
UNK_RELATION
joyent@s@193
joyent -- joyent is a leading high-performance cloud infrastructure and big data analytics company offering organizations of any size the best public and hybrid cloud infrastructure for today @placeholder demanding real-time web and mobile applications .
{ "confidence": [ 48.568626403808594, 43.03131103515625, 42.28772735595703, 42.15401077270508, 41.38831329345703, 39.41719055175781, 38.545597076416016, 38.159881591796875, 37.00859832763672, 36.69157791137695, 36.26886749267578, 35.100311279296875, 35.100311279296875, 35.100311279296875, 34.91728973388672, 34.01014709472656, 34.01014709472656, 33.94903564453125, 33.94903564453125, 33.82538604736328, 32.414451599121094, 32.33063507080078, 32.07368087768555, 30.979093551635742, 30.979093551635742, 30.979093551635742, 30.979093551635742, 30.979093551635742, 30.950578689575195, 29.82781410217285, 29.82781410217285, 29.82781410217285, 29.82781410217285, 29.82781410217285, 29.82781410217285, 29.82781410217285, 28.456817626953125, 28.456817626953125, 28.456817626953125, 28.447975158691406, 28.40052032470703, 27.3671875, 27.305538177490234, 25.893335342407227, 25.631778717041016, 25.631778717041016, 25.631778717041016, 25.631778717041016, 25.15508460998535, 24.480499267578125, 24.480499267578125, 24.480499267578125, 24.187957763671875, 23.94668197631836, 22.704391479492188, 21.755165100097656, 21.099594116210938, 21.099594116210938, 19.625038146972656, 19.392826080322266, 19.12628746032715, 18.68239974975586, 18.618057250976562, 18.5279541015625, 18.414907455444336, 18.26078987121582, 18.156421661376953, 18.027740478515625, 18.012434005737305, 17.750629425048828, 17.37584686279297, 17.361923217773438, 17.304264068603516, 17.154285430908203, 16.439058303833008, 16.224210739135742, 16.09876251220703, 15.977462768554688, 15.858461380004883, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.725496292114258, 15.614017486572266, 15.614017486572266, 15.547332763671875, 15.269732475280762, 15.269732475280762, 15.12574577331543, 15.013729095458984 ], "content": [ "Joyent now supports Linux compatible instances no VM on their public cloud so this should run fine just as is a Linux binary .", "JOYENT .", "It s on a Joyent Cloud running Sun Oracle Solaris and it has Ruby in addition to PHP .", "Full disclosure : I work for Joyent .", "I m using native mongo driver in Joyent cloud the node.js application runs fine locally but in Joyent when i run with usrname pswd that they provided it fails to connect .", "github.com joyent node issues 6915 https : github.com joyent node issues 6915", "I cannot get any Java stack with dtrace in a Joyent SmartOS instance .", "I have a Joyent SmartMachine with node.js installed .", "I m running Apache on Joyent in a virtual host .", ".. . .. . I am using a Joyent SmartMachine and looking at the analytics options that they provide is a little overwhelming .", "Also my website is hosted on Joyent .", "I m trying to set up a node script to run as a cron job on Joyent .", "So I m trying to host a node app with Joyent smartOS .", "Edit : It was indeed a bug https : github.com joyent node pull 6917 .", "I am creating instances through vagrant using vagrant up --provider joyent .. . .. . vagarant needs root user . . but bye default joyent accepting only ubuntu user. . is there any way that joyent accepts root user by default before creating instance", "I have dedicated-server on Joyent Account .", "I have asked this question on Joyent forums .", "I ve also sent a link-to this question to the cloud9 and joyent folks .", "I m trying to install hiredis on my Joyent SmartMachine running Solaris 11 .", "I couldn t find any docs on that matter mostly because they are outdated since Joyent no longer supports it no.de service .", "For the questions below I d appreciate any answer whether it s specific to Joyent s Cloud Analytics or completely general .", "For node.js git cloud9 and joyent noobs like me this is how you do it : .. . .. . Go to your cloud9 account- Dashboard- Show your SSH key and copy it .. . SSH to your joyent node machine .", "I am extremely new to the Solaris world however we are attempting to utilize SmartOS which is made by Joyent for the purposes of web-hosting .", "Issue .. . .. . .. . .. . I got the following folder structure : .. . .. . git pushing this to my Joyent Machine will cause a lot of npm errors .", "Well chances are that Joyent did not allow connections from port other than 80 .", "I am trying to start elasticsearch as a service on joyent smartOs instance without luck .", "I m trying to use the Manta s Node.js SDK from Joyent to write a file from a readable stream .", "cluster.js line 500 https : github.com joyent node blob v0.10.24 lib cluster.js L500 is .. . .. . i.e .", "I ve installed Joyent Node from the Visual Studio installer .", "Looks like additional datacenters will include Joyent San Francisco USA and Telef nica in Madrid Spain .", "Hi have copied my cloud9-ide SSH key in my account settings in joyent no.de .", "cloud9-ide is an online IDE and I want to push my code to my server on joyent smart machine with the git command .", "I push from cloud9ide to github then I pull on my local git and then I push to Joyent .", "Kinda over-complicated but I cant cd . . thus can t add ssh config file with proper joyent config .", "I am trying to pull or clone a git-repo from my joyent smartmachine no.de thru putty .", "following is the code used to connect : .. . .. . Has anyone used native node.js driver in Joyent .", "I am using a standard64 Image 13.3.1 SmartOS machine from Joyent and I would like to install some software written for Linux .", "See https : github.com joyent node-manta blob master lib client.js L1399 .. . .. . So you should probably ignore that md5 field .", "I have two Node.js servers running the same code they are Joyent SmartOS machines one on the East Coast and one on the West Coast .", "This process is annoying is there a way to verify if the currently running node.js instance is in cloud9ide or actually my production joyent smartmachine", "Migrate to the cloud service", "I am following this https : www.joyent.com blog mdb-and-linux and this https : www.joyent.com blog walmart-node-js-memory-leak turotials from Joyent to take use MDB to investigate potential memory leak .", "We are dealing with a strange bug in a Joyent Solaris server that never happened before doesn t happen in localhost or two other Solaris servers with identical php configuration .", "Cloud services are not available to a large database mongoDB", "To make this all Joyent SmartMachine node-service ready you have to add .. . .. . to your package.json otherwise node-service does not know which .js to execute as primary .", "See https : github.com joyent node-manta blob master lib client.js L169 .. . .. . In fact it looks like that in the specific method you re using createWriteStream the md5 option field is completely ignored .", "Node.js is powered by libuv https : github.com joyent libuv - it s an asynchronous crossplatform io library written in C . Basically it does everything node does but exposes only C interfaces .", "I ve referenced it as a tarball on Gemfury and everything works fine locally always the way over multiple versions of the library but npm-install on my Joyent box outputs the error below .", "I m looking at the Readme.md https : github.com joyent node-http-signature blob master http signing.md for http-signing that is part of Joyent s node-http-signature https : github.com joyent node-http-signature module and it says to use a special name to include the HTTP request target into the signature base : .. . .. . To include the HTTP request line in the signature calculation use the special request-line value .", "How can I push from my joyent smartmachine you mean push from the git machine but how can I connect ot github and initiate a push", "The problem was they mixed up with credentials provided for mongodb to verify login and password ssh to joyent and enter mdata-get mongodb pw verify the given pswd works in mongo -uadmin -p mdata-get mongodb pw admin", "by default joyent wont allow root user so after after vagrant up. . we need to login to the instance. . and we need to copy authorized keys file root fixes the problem", "If moving the cluster.on exit listener into the if cluster.isWorker block does not resolve the issue then I think you should open an issue on Github https : github.com joyent node issues as I can t see why the event would be emitted in any workers .", "Or something I do not know about cloud services no experience with", "Put in the port to your no.de machine instead .. . Edit something in cloud 9 .. . git-commit -a -m Victor rules", "today is 27th Dec 2012 and I just got my Beagle Bone board from RS Components .", "In particular is Nodejitsu providing me the machines or can I choose that my machine will be on some specific cloud provider in some specific zone .", "Update : .. . .. . Nodejitsu recently experienced an extended outage which is documented in detail on their blog http : blog.nodejitsu.com recent-instability-and-choosing-the-right-cloud .", "What analytics are important to look at for a NodeJS app for that purpose", "So ive got a smartos 64 plus machine joyent .. . .. . It DIDN T have rails installed as i got a .. . .. . Error trying to run a rails app via rails s .. . .. . So I installed rails via .. . .. . And i got an error : .. . .. . It also said when i tried to download the source and compile manually .. . .. . Btw i also tried the smartos packager .. . .. . Im a bit confused because the SmartOS plus version is supposed to have most of this preinstalled", "How can you estimate the amount of users you expect .. . .. . Installing Google Analytics or another analytics package on your pages is a must", "This interface is much much simpler to start with node.js applications .", "Any book or any c cpp topic that will help me to start with websockets broadcasting data and such important features of node .", "The real question to answer is WHEN does the load-time begin to increase as the number of concurrent users increase", "I am facing following Rsync issue when i say vagrant up --provider joyent .. . after node creation its giving following error.. . when i observer rsync versions on both machines . . its same. . i dont know how to troubleshoot this . .", "Yes each SmartMachine has a public and private IP address so you can set up a multi-tier architecture .", "Is there a reasonable web-app-db server setup that they can be configured in", "My database has a size of 15.95 Gb .. . .. . Objects - 9963099 .. . Data Size - 4.65g .. . Storage Size - 7.21g .. . Extents - 269 .. . Indexes - 19 .. . Index Size - 1.68g .. . .. . Powered by : .. . .. . For me to pay dearly for a dedicated-server .", "You can get the reference architectures here : http : www.joyentcloud.com lpages performance-and-scale .. . .. . Disclaimer : I am a Joyeur .", "Now I have a node.js app that I ve been developing for some time that is now running in production on the web .", "This is the best way if you have the source available .", "I suspect implementations rule but I d like to know the real intention .", "Both make requests to the Twitter API with very different performance .", "Assuming you have followed Install from zip fastest best for bloggers from https : github.com tryghost Ghost and you are serving static content from public with http-server .", "A consequence of this was to drop support for Telef nica Instant Servers https : www.nodejitsu.com company press 2013 09 10 drop-telefonica .", "What are statistics analytics that become particularly critical when dealing with the single-threaded event-loop of NodeJS versus more standard server systems", "Is the performance too low with less memory", "Basically it needs to do .. . .. . On triton this fails like .. . .. . Any ideas how I could inject docker.sock into my container on triton", "Any ideas what it is", "Once I got into the device Cloud9 IDE.. .", "I chosed the blinkingleds.js sample AND clicked RUN .", "It does running and I tried to stop it running process yet the machine refused .", "Somehow I saw the Tour button AND upon clicked on this button.. . the entire source codes under the Cloud9 folder were deleted", "Bingo I need another copy of the entire files that used to be available under the Cloud9 tree folder in Beagle Bone .", "How do I get that copy", "Thanks", "The Bonescript library with samples is available from http : github.com jadonk bonescript .", "If you can get your BeagleBone on your network and login to a console prompt you can : .. . .. . That should get you to the latest code .", "Thanks .", "Can it be done on USB connectivity to my laptop", "You d need to share the internet-connection to the USB .", "Most operating systems provide Internet Connection Sharing .", "You could also clone the git-repo to your computer add a git-remote on your BeagleBone and pull from there .", "Any way to get the Java stack", "Any ideas why this would happen", "It s an open-source event based web server also written in C C++ .", "this happens in both CLI example and web application php-fpm + nginx .", "Web app is express 2 and 3 based with mongo redis and memcached .", "A tipping point is reached when you get to a certain number of concurrent users after which the server performance will start to degrade .", "I am running a website at path server public on the filesystem via http-server https : github.com nodeapps http-server and I want to simultaneously run a Ghost https : ghost.org blog at path server public blog both on port 80 ." ] }
{ "confidence": [ 56.88343048095703, 55.42559051513672, 45.68254852294922, 44.26909255981445, 43.10352325439453, 42.93937683105469, 42.752193450927734, 42.70366287231445, 41.94342041015625, 41.301002502441406, 40.73097229003906, 39.55841064453125, 39.04591369628906, 38.43260955810547, 37.51118469238281, 37.05211639404297, 36.74470138549805, 36.48687744140625, 36.29829788208008, 35.730384826660156 ], "content": [ "Question : I am using a standard64 Image 13.3.1 SmartOS machine from Joyent and I would like to install some software written for Linux . The software called wkhtmltopdf is an HTML to PDF converter written in C++ . The software is downloadable here http : wkhtmltopdf.org . How can I get this Linux 64 bit software to install and run on SmartOS Comment : shouldn t the KVM do this automatically .. . Answer : Joyent now supports Linux compatible instances no VM on their public cloud so this should run fine just as is a Linux binary .", "Question : I m using native mongo driver in Joyent cloud the node.js application runs fine locally but in Joyent when i run with usrname pswd that they provided it fails to connect . following is the code used to connect : .. . .. . Has anyone used native node.js driver in Joyent . Thanks Comment : The above commented code works fine for authentication . The problem was they mixed up with credentials provided for mongodb to verify login and password ssh to joyent and enter mdata-get mongodb pw verify the given pswd works in mongo -uadmin -p mdata-get mongodb pw admin .. . Answer : Easier if you just use MongoClient", "Question : Hi have copied my cloud9-ide SSH key in my account settings in joyent no.de . When I launch git-push mywebsite.no.de master in my cloud9-ide console I get the following errors : .. . .. . Could this be related to the following piece of information not being set-up any where I think its a config for cloud9-ide but How to set it up Host mywebsite.no.de .. . Port 26674 .. . User node .. . ForwardAgent yes Comment : That snippet of configuration looks like part of an ssh config 5 file . Try putting it into .ssh config and make sure permissions on .ssh config do not allow group or other write access . Comment : Yes it is for the .ssh config.. . but where and how in cloud9ide or my smartmachine Thanks Sarnold . Comment : Install it onto whichever machine you use for the git-push command as a start . I don t know the difference between your cloud9-ide and your smart machine but I ve used ssh lots.. . : Comment : cloud9-ide is an online IDE and I want to push my code to my server on joyent smart machine with the git command . So it would be a configuration on cloud9ide but I cant seem to find where to put the config . Comment : Wow now I feel like an absolute dinosaur -- an IDE that runs in a web browser . Sheesh . Okay try making a .ssh directory immediately after connecting with ftp and place the contents of that file in the .ssh directory with name config Hopefully the FTP initial working directory will be your home-directory . .. . Answer : For node.js git cloud9 and joyent noobs like me this is how you do it : .. . .. . Go to your cloud9 account- Dashboard- Show your SSH key and copy it .. . SSH to your joyent node machine . add to your .ssh authorized keys the pubkey you just copied from Cloud9 just copy it in that file if it doesn t exist .. . Go to Cloud9 to the editor and in the command-line do : git-remote add node ssh : node@yourhost.no.de : 66666 home node repo .. . Yes i know that s not a valid port-number smartass . Put in the port to your no.de machine instead .. . Edit something in cloud 9 .. . git-commit -a -m Victor rules .. . git-push node master .. . Win", "Question : I am creating instances through vagrant using vagrant up --provider joyent .. . .. . vagarant needs root user . . but bye default joyent accepting only ubuntu user. . is there any way that joyent accepts root user by default before creating instance .. . Answer : by default joyent wont allow root user so after after vagrant up. . we need to login to the instance. . and we need to copy authorized keys file root fixes the problem", "Question : null .. . Answer : I have two Node.js servers running the same code they are Joyent SmartOS machines one on the East Coast and one on the West Coast . Both make requests to the Twitter API with very different performance . West coast average response time : Less than 1 second .. . .. . East coast average response time : Over 10 seconds .. . .. . This just started happening recently after my machines were running for 8 months just fine . Any ideas why this would happen", "Question : null .. . Answer : I have a Joyent SmartMachine with node.js installed . How do I deploy my apps using git I couldn t find any docs on that matter mostly because they are outdated since Joyent no longer supports it no.de service . Thanks .", "Question : I m evaluating Nodejitsu for hosting Node.JS . I m trying to understand the relationship between Nodejitsu and IAAS providers . In particular is Nodejitsu providing me the machines or can I choose that my machine will be on some specific cloud provider in some specific zone . Here s my need : My node service will need to communicate with a separate machine which I will set up myself due to heavy customization . I want this machine to be on the same data center of my Node servers so in out network cost and latency are minimized . .. . Answer : Per the nodejitsu FAQs https : www.nodejitsu.com documentation faq where-are-personal-plan-drones-hosted if you are on a personal plan your host is Joyent s us-east-1 datacenter in North Virginia USA . Business plan users are able to choose from additional datacenters https : www.nodejitsu.com paas datacenters which include Joyent s us-sw-1 in Las Vegas USA eu-ams-1 in Amsterdam Netherlands or Telef nica s eu-london-1 in London England . Looks like additional datacenters will include Joyent San Francisco USA and Telef nica in Madrid Spain . Update : .. . .. . Nodejitsu recently experienced an extended outage which is documented in detail on their blog http : blog.nodejitsu.com recent-instability-and-choosing-the-right-cloud . A consequence of this was to drop support for Telef nica Instant Servers https : www.nodejitsu.com company press 2013 09 10 drop-telefonica .", "Question : First - a little bit about my background : I have been programming for some time 10 years at this point and am fairly competent when it comes to coding ideas up . I started working on web-application programming just over a year ago and thankfully discovered nodeJS which made web-app creation feel a lot more like traditional programming . Now I have a node.js app that I ve been developing for some time that is now running in production on the web . My main confusion stems from the fact that I am very new to the world of the web development and don t really know what s important and what isn t when it comes to monitoring my application . .. . .. . I am using a Joyent SmartMachine and looking at the analytics options that they provide is a little overwhelming . There are so many different options and configurations and I have no clue what purpose each analytic really serves . For the questions below I d appreciate any answer whether it s specific to Joyent s Cloud Analytics or completely general . QUESTION ONE .. . .. . Right now my main concern is to figure out how my application is utilizing the server that I have it running on . I want to know if my application has the right amount of resources allocated to it . Does the number of requests that it receives make the server it s on overkill or does it warrant extra resources What analytics are important to look at for a NodeJS app for that purpose using both MongoDB and Redis on separate servers if that makes a difference .. . .. . .. . .. . .. . QUESTION TWO .. . .. . What other statistics are generally really important to look at when managing a server that s in production I m used to programs that run once to do something specific e.g . a raytracer that finishes running once it has computed an image as opposed to web-apps which are continuously running and interacting with many clients . I m sure there are many things that are obvious to long-time server administrators that aren t to newbies like me . QUESTION THREE .. . .. . What s important to look at when dealing with NodeJS specifically What are statistics analytics that become particularly critical when dealing with the single-threaded event-loop of NodeJS versus more standard server systems I have other questions about how databases play into the equation but I think this is enough for now.. . Comment : Very constructive question . Nice Comment : Thank you very much : .. . Answer : Node.js is single-threaded so you should definitely start a process for every cpu your machine has . Cluster http : nodejs.org docs latest api cluster.html is by far the best way to do this and has the added benefit of being able to restart died workers and to detect unresponsive workers . You also want to do load-testing until your requests start timing out or exceed what you consider a reasonable response time . This will give you a good idea of the upper limit your server can handle . Blitz http : www.blitz.io is one of the many options to have a look at . I have never used Joyent s statistics but NodeFly http : apm.nodefly.com and their node-nodefly-gcinfo https : github.com NodeFly node-nodefly-gcinfo readme is a great tools to monitor node processes . Comment : Thanks for sharing your thoughts . This unfortunately doesn t add much beyond what has already been said .", "Question : Hi have copied my cloud9-ide SSH key in my account settings in joyent no.de . When I launch git-push mywebsite.no.de master in my cloud9-ide console I get the following errors : .. . .. . Could this be related to the following piece of information not being set-up any where I think its a config for cloud9-ide but How to set it up Host mywebsite.no.de .. . Port 26674 .. . User node .. . ForwardAgent yes Comment : That snippet of configuration looks like part of an ssh config 5 file . Try putting it into .ssh config and make sure permissions on .ssh config do not allow group or other write access . Comment : Yes it is for the .ssh config.. . but where and how in cloud9ide or my smartmachine Thanks Sarnold . Comment : Install it onto whichever machine you use for the git-push command as a start . I don t know the difference between your cloud9-ide and your smart machine but I ve used ssh lots.. . : Comment : cloud9-ide is an online IDE and I want to push my code to my server on joyent smart machine with the git command . So it would be a configuration on cloud9ide but I cant seem to find where to put the config . Comment : Wow now I feel like an absolute dinosaur -- an IDE that runs in a web browser . Sheesh . Okay try making a .ssh directory immediately after connecting with ftp and place the contents of that file in the .ssh directory with name config Hopefully the FTP initial working directory will be your home-directory . .. . Answer : Seems like this is only doable via github . I push from cloud9ide to github then I pull on my local git and then I push to Joyent . Kinda over-complicated but I cant cd . . thus can t add ssh config file with proper joyent config . Comment : I ve looked into it and even tried to add a remote to cloud9 using the git over ssh protocol with the correct port . The problem is that you cant set forwardagent yes on the command-line so the answer is no not currently . I ve also sent a link-to this question to the cloud9 and joyent folks .", "Question : I am facing an weird error this is my main .js file .. . .. . This is the error message i am getting. . .. . .. . No idea whats wrong there any help Hardware Overview : .. . .. . System Version : OS X 10.9.1 13B42 .. . .. . Kernel Version : Darwin 13.0.0 Comment : Just tried it and everything worked out fine . I m on windows on node.js version 0.10.24 Comment : What environment OS etc . are you running in Comment : @OrangeDog please see my edit .. . Answer : cluster.js line 500 https : github.com joyent node blob v0.10.24 lib cluster.js L500 is .. . .. . i.e . you re calling fork from another worker or Node thinks you are . If moving the cluster.on exit listener into the if cluster.isWorker block does not resolve the issue then I think you should open an issue on Github https : github.com joyent node issues as I can t see why the event would be emitted in any workers . Edit : It was indeed a bug https : github.com joyent node pull 6917 . Comment : will do is that the only way to get this resolved use cluster github.com joyent node issues 6915 https : github.com joyent node issues 6915 Comment : If you tried my suggestion first then you didn t update your code for the github issue . Comment : what are you suggestiong Can i get a more detailed answer Comment : Move the listener into the if block .", "Question : First - a little bit about my background : I have been programming for some time 10 years at this point and am fairly competent when it comes to coding ideas up . I started working on web-application programming just over a year ago and thankfully discovered nodeJS which made web-app creation feel a lot more like traditional programming . Now I have a node.js app that I ve been developing for some time that is now running in production on the web . My main confusion stems from the fact that I am very new to the world of the web development and don t really know what s important and what isn t when it comes to monitoring my application . .. . .. . I am using a Joyent SmartMachine and looking at the analytics options that they provide is a little overwhelming . There are so many different options and configurations and I have no clue what purpose each analytic really serves . For the questions below I d appreciate any answer whether it s specific to Joyent s Cloud Analytics or completely general . QUESTION ONE .. . .. . Right now my main concern is to figure out how my application is utilizing the server that I have it running on . I want to know if my application has the right amount of resources allocated to it . Does the number of requests that it receives make the server it s on overkill or does it warrant extra resources What analytics are important to look at for a NodeJS app for that purpose using both MongoDB and Redis on separate servers if that makes a difference .. . .. . .. . .. . .. . QUESTION TWO .. . .. . What other statistics are generally really important to look at when managing a server that s in production I m used to programs that run once to do something specific e.g . a raytracer that finishes running once it has computed an image as opposed to web-apps which are continuously running and interacting with many clients . I m sure there are many things that are obvious to long-time server administrators that aren t to newbies like me . QUESTION THREE .. . .. . What s important to look at when dealing with NodeJS specifically What are statistics analytics that become particularly critical when dealing with the single-threaded event-loop of NodeJS versus more standard server systems I have other questions about how databases play into the equation but I think this is enough for now.. . Comment : Very constructive question . Nice Comment : Thank you very much : .. . Answer : Whichever the type of web app NodeJS or otherwise load-testing will answer whether your application has the right amount of server resources . A good website I recently found for this is Load Impact http : loadimpact.com . The real question to answer is WHEN does the load-time begin to increase as the number of concurrent users increase A tipping point is reached when you get to a certain number of concurrent users after which the server performance will start to degrade . So load test according to how many users you expect to reach your website in the near future . How can you estimate the amount of users you expect .. . .. . Installing Google Analytics or another analytics package on your pages is a must This way you will be able to see how many daily users are visiting your website and what is the growth of your visits from month-to-month which can help in predicting future expected visits and therefore expected load on your server . Even if I know the number of users how can I estimate actual load .. . .. . The answer is in the F12 Development Tools available in all browsers . Open up your website in any browser and push F12 or for Opera Ctrl+Shift+I which should open up the browser s development tools . On Firefox make sure you have Firebug installed on Chrome and Internet Explorer it should work out of the box . Go to the Net or Network tab and then refresh your page . This will show you the number of HTTP requests bandwidth usage per page load So the formula to work out daily server load is simple : .. . .. . Number of HTTP requests per page load X the average number of pages load per user per day X Expected number of concurrent users Total HTTP Requests to Server per Day .. . .. . And.. . Number of MBs transferred per page load X the average number of pages load per user per day X Expected number of concurrent users Total Bandwidth Required per Day .. . .. . I ve always found it easier to calculate these figures on a daily basis and then extrapolate it to weeks and months . Comment : thanks for this answer - i gave the other one the bounty though because it addresses node.js specifically which is more of what I m interested in . Comment : @thisissami You gave it to the right person : - I just never had the time to address node.js specifically Comment : if you d like to i just put up a new bounty for 150", "Question : Thanks for any help you can provide We just migrated our website to a new server . It s on a Joyent Cloud running Sun Oracle Solaris and it has Ruby in addition to PHP . It runs on MySQL and Apache . Before we had things set up so that when I navigated to example.com community my browser would find example.com community index.html and then meta refresh-redirect me appropriately to example.com communityboard .. . .. . Now when I navigate to example.com community I get a file-not-found error . However if I navigate to example.com community index.html the site works as intended . I think this is a problem in Apache but I m not 100 sure . Is there a way to fix this issue Step-by-step advice would be much appreciated .. . Answer : Here s what happened according to my developer . I don t fully understand the explanation so I m not sure I can answer follow-up questions With the old mongrel cluster Apache would recognize community as a directory silently forward to community which would then pick up the forwarding index.html file . With Phusion Passenger which I guess we re using now Apache sends the request directly to Passenger if community is not a regular file and Passenger was returning the 404 error . As a fix we ve disabled passenger in the community folder which fixes the problem .", "Question : I m trying to use the Manta s Node.js SDK from Joyent to write a file from a readable stream . The example given on the webpage is this : .. . .. . But this is the case were we use a writeStream to put a file object string already into the program what if I want to pass a readable stream to be written like this What should I do for this to work regarding this line : .. . .. . Thank you .. . Answer : TL DR don t send the md5 . If you don t mind reading the stream twice you can calculate the md5 beforehand like this : .. . .. . If reading the stream twice is not an option I suggest not sending an MD5 at all . Looking at the Manta s Node.js SDK it seems to be an optional field . See https : github.com joyent node-manta blob master lib client.js L169 .. . .. . In fact it looks like that in the specific method you re using createWriteStream the md5 option field is completely ignored . See https : github.com joyent node-manta blob master lib client.js L1399 .. . .. . So you should probably ignore that md5 field . Comment : Thank you Igor :", "Question : null .. . Answer : Very Specific problem .. . In my Ruby On Rails Application Web Site . I have dedicated-server on Joyent Account . Also my website is hosted on Joyent . But it s down frequently my passenger get down after each 2 or 3 days . I am unable to find out the reason . I have asked this question on Joyent forums . But not getting the actual cause of the problem . This is the last error-log after which the application stops working .. . .. . I am using .. . .. . I Googled and found some solutions on forum given below for the problems . I have found the reason behind the error premature end of script headers in passenger error-log . Also i have found the solution for each of the above problems and i have tried all of them . Still it s not working then i use .. . .. . But still the application gets down after one or two days . And I am unable to find the trace . Please help . Comment : I have asked this question last time . But still i am not getting the trace for the problem . Here is my previous question . stackoverflow.com questions 13063234 http : stackoverflow.com questions 13063234 what-are-the-main-reasons-for-passenger-server-shut-down-periodically rq 1 Comment : Even i am unable to trace my problem . Why Premature end of script headers error occurred Somebody please help . Comment : Quick-tip : If you update ruby version and passenger you get a large boost of performance of your rails application . Probably it can solver your problem . Comment : If you have enough money to support such a server you should try to buy newrelic.com serves for monitoring your application . Comment : You ve got yourself a good ol fashioned segmentation-fault . This means that some code is attempting to read or write memory that the process doesn t own . This is probably coming from a gem you re using or something that is calling native-code .", "Question : Thanks for any help you can provide We just migrated our website to a new server . It s on a Joyent Cloud running Sun Oracle Solaris and it has Ruby in addition to PHP . It runs on MySQL and Apache . Before we had things set up so that when I navigated to example.com community my browser would find example.com community index.html and then meta refresh-redirect me appropriately to example.com communityboard .. . .. . Now when I navigate to example.com community I get a file-not-found error . However if I navigate to example.com community index.html the site works as intended . I think this is a problem in Apache but I m not 100 sure . Is there a way to fix this issue Step-by-step advice would be much appreciated .. . Answer : In your site config ex . etc apache2 sites-available example.com you ll need to make sure you have a DirectoryIndex http : httpd.apache.org docs 2.0 mod mod dir.html directive . Your config should look something like : .. . .. . Then just make sure you do a etc init.d apache2 restart and you should be good go . Comment : I appreciate the response I m running Apache on Joyent in a virtual host . I ve used Joyent s Virtual Min to add index.html to the Directory Index Files input box . As a result the .conf file for my virtual host has this code : DirectoryIndex index.html However the page is still not being found . What do you think Comment : It may help you to have a look at the apache logs . Try var log apache2 errors.log or access.log . See if you can t find some additional info and post it here . Comment : For some reason the site is now working as intended I m going to find out next week what changes got it going again and I ll report them here . Comment : Here s what happened according to my developer . I don t fully understand the explanation so I m not sure I can answer follow-up questions With the old mongrel cluster Apache would recognize community as a directory silently forward to community which would then pick up the forwarding index.html file . With Phusion Passenger which I guess we re using now Apache sends the request directly to Passenger if community is not a regular file and Passenger was returning the 404 error . As a fix we ve disabled passenger in the community folder which fixes the problem . Tx", "Question : First - a little bit about my background : I have been programming for some time 10 years at this point and am fairly competent when it comes to coding ideas up . I started working on web-application programming just over a year ago and thankfully discovered nodeJS which made web-app creation feel a lot more like traditional programming . Now I have a node.js app that I ve been developing for some time that is now running in production on the web . My main confusion stems from the fact that I am very new to the world of the web development and don t really know what s important and what isn t when it comes to monitoring my application . .. . .. . I am using a Joyent SmartMachine and looking at the analytics options that they provide is a little overwhelming . There are so many different options and configurations and I have no clue what purpose each analytic really serves . For the questions below I d appreciate any answer whether it s specific to Joyent s Cloud Analytics or completely general . QUESTION ONE .. . .. . Right now my main concern is to figure out how my application is utilizing the server that I have it running on . I want to know if my application has the right amount of resources allocated to it . Does the number of requests that it receives make the server it s on overkill or does it warrant extra resources What analytics are important to look at for a NodeJS app for that purpose using both MongoDB and Redis on separate servers if that makes a difference .. . .. . .. . .. . .. . QUESTION TWO .. . .. . What other statistics are generally really important to look at when managing a server that s in production I m used to programs that run once to do something specific e.g . a raytracer that finishes running once it has computed an image as opposed to web-apps which are continuously running and interacting with many clients . I m sure there are many things that are obvious to long-time server administrators that aren t to newbies like me . QUESTION THREE .. . .. . What s important to look at when dealing with NodeJS specifically What are statistics analytics that become particularly critical when dealing with the single-threaded event-loop of NodeJS versus more standard server systems I have other questions about how databases play into the equation but I think this is enough for now.. . Comment : Very constructive question . Nice Comment : Thank you very much : .. . Answer : We have been running node.js in production nearly an year starting from 0.4 and currenty 0.8 series . Web app is express 2 and 3 based with mongo redis and memcached . Few facts . node can not handle large v8 heap when it grows over 200mb you will start seeing increased cpu-usage .. . node always seem to leak memory or at least grow large heap size without actually using it . I suspect memory fragmentation as v8 profiling or valgrind shows no leaks in js space nor resident heap . Early 0.8 was awful in this respect rss could be 1GB with 50MB heap . hanging requests are hard to track . We wrote our middleware to monitor these especially as our app is long poll based .. . .. . My suggestions . use multiple instances per machine at least 1 per cpu . Balance with haproxy nginx or such with session affinity .. . write midleware to report hanged connections ie ones that code never responded or latency was over threshold .. . restart instances often at least weekly .. . write poller that prints out memory stats with process module one per minute .. . Use supervisord and fabric for easy process-management .. . .. . Monitor cpu reported memory stats and restart on threshold Comment : so does this imply that if I have a 2GB RAM machine running 10 processes across 10 cores hypothetical it would be a lot more effective to add a new machine of equal capacity as opposed to doubling the RAM and CPU power Comment : I don t know . All I know that you need to have several small instances of node per server to utilize the machine capability . Scaling is dependent on your app and network design .", "Question : I would like to know how can I write something small like node in native lanuage c cpp . I read that c c++ experts developed node.js and made it available with javascript interface . This interface is much much simpler to start with node.js applications . This is not about re-inventing the wheel only learning but I want to learn understand the way where to start if I want to create a server that work like node it is not performance or scalability or simplicity oriented . nothing like that . Any book or any c cpp topic that will help me to start with websockets broadcasting data and such important features of node . I am new to c cpp also but need to understand what is making node such a strong technology . Any other solutions than taking source code of node.js Comment : Another project you might be interested in is nginx http : wiki.nginx.org Main pronounced engine-x . It s an open-source event based web server also written in C C++ . You can find the source code here https : github.com git-mirror nginx Comment : @BrandonBoone : thanks for the reply but how can I write c cpp servers more stronger than writing only chat servers . Comment : The source code is available for all of Node.JS . I m not clear why you wouldn t want to start there . Asking for books tutorials etc . isn t a good match for StackOverflow . Comment : @WiredPrairie : yeah thanks node.js source code . In future I will take care of question and will not ask for books tutorials references . .. . Answer : Node.js is powered by libuv https : github.com joyent libuv - it s an asynchronous crossplatform io library written in C . Basically it does everything node does but exposes only C interfaces . Comment : helpful thanks a lot", "Question : Im still fighting with mongoDB and I think this war will end is not soon . My database has a size of 15.95 Gb .. . .. . Objects - 9963099 .. . Data Size - 4.65g .. . Storage Size - 7.21g .. . Extents - 269 .. . Indexes - 19 .. . Index Size - 1.68g .. . .. . Powered by : .. . .. . For me to pay dearly for a dedicated-server . On VPS 6GB memory database is not imported . Migrate to the cloud service https : www.dotcloud.com pricing.html .. . .. . I try to pick up the rate but there max 4Gb memory mongoDB USD 552.96 month o 0 I even import your base can not not enough memory . Or something I do not know about cloud services no experience with Cloud services are not available to a large database mongoDB http : support.dell.com support edocs systems pe1850 en UG p1295aa.htm .. . .. . Will work my database on that server This is of course all the fun and get the experience in the development but already beginning to pall .. . Comment : I m not sure what you mean by On a standard hosting with 6GB memory database is not imported . . Is the performance too low with less memory Comment : @JoachimIsaksson Oh I meant VPS 6Gb . I could not import the database because it does not have enough memory . Comment : Hm are you trying to import the whole database into memory I can t remember MongoDB being very memory hungry unless the load is extremely high . Comment : @JoachimIsaksson I m trying to just do the import database on the server . mongorestore --db mydatabase home mydatabase But surgery can not end because they do not have enough memory . .. . Answer : You shouldn t have an issue with a db of this size . We were running a mongodb instance on Dotcloud with 100 s of GB of data . It may just be because Dotcloud only allow 10GB of HDD space by default per service . We were able to backup and restore that instance on 4GB of RAM - albeit that it took several hours .. . .. . I would suggest you email them directly support@dotcloud.com to get help increasing the HDD allocation of your instance .", "Question : I am trying to setup jwilder nginx-proxy docker-container on joyent s triton platform . This container needs access to docker.sock to read information about its environment . Basically it needs to do .. . .. . On triton this fails like .. . .. . Any ideas how I could inject docker.sock into my container on triton .. . Answer : Triton doesn t currently support docker.sock . You have to go through the DOCKER HOST TCP port . If you would like this to be a feature send them a tweet email or github ticket . Full disclosure : I work for Joyent .", "Question : Issue .. . .. . .. . .. . I got the following folder structure : .. . .. . git pushing this to my Joyent Machine will cause a lot of npm errors . I can avoid them by adding mongodb and mongoose to my package.json dependencies but the service won t start . I know this is a very small amount of information if you need further information specify the kind and I ll update my post . .. . .. . The output : .. . .. . .. . .. . Solution Fix .. . .. . .. . .. . To solve all issues I had to add the devDependencies of mongoose s package.json to the myapp package.json incl . mongoose dependency . To make this all Joyent SmartMachine node-service ready you have to add .. . .. . to your package.json otherwise node-service does not know which .js to execute as primary . I will post my entire success story step by step this evening Comment : You need to provide us the exact error . Also you don t need to deploy node-modules also since NPM will install the packages on no.de by itself . Comment : Seems that the file that starts the server has a problem you should post that also . Comment : @alessioalex updated that accordingly Comment : Checkout my answer . .. . Answer : Since your error is remote : uncaught : Error : Cannot find module should that means you forgot to include the should module as a dependency in package.json . Ex : .. . .. . For more information on package.json checkout : http : package.json.nodejitsu.com" ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
mps-format@file-format@56
mps-format -- mps mathematical programming system is a @placeholder for presenting and archiving linear-programming lp and mixed integer-programming problems .
{ "confidence": [ 46.15855407714844, 45.35160446166992, 34.21303939819336, 34.21303939819336, 28.773462295532227, 25.65340232849121, 17.680728912353516, 16.95058822631836, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125, 14.29180908203125 ], "content": [ "Am trying to use NEOS to solve a linear program using MPS input .", "Am I making a mistake in specifying the MPS file for my quadratic-programming problem or is there something I need to adjust in the way the solver searches for a solution", "The MPS file is fine but apparently you need a paramaters file as well to tell the solver what to do min max etc . .", "I ve updated the answer with another way to get the solution using AMPL instead of MPS .", "enter image description here http : i.stack.imgur.com SrxsG.png .. . .. . I am using the following MPS file to define the problem first qp.mps : .. . .. . Note that I am using QUADOBJ to define the D matrix .", "In addition to model and data files it accepts a commands file where you can use statements to solve the problem and display the solution for example : .. . .. . This post https : groups.google.com forum topic ampl R6g4oT6IdyI describes how to convert MPS to AMPL .", "If this doesn t work you can submit the problem to NEOS in AMPL http : ampl.com format via this page http : www.neos-server.org neos solvers milp 3aCbc AMPL.html .", "The format of the commands is quoting the documentation http : www.neos-server.org neos solvers milp 3aCbc MPS.html : .. . .. . The commands are the following : .. . .. . To see the solution values you should include the line sol - after the min or max line of your parameter file .", "However I can t find any information on this online anywhere .", "So far I have got NEOS to solve a maximization problem and display the objective function .", "However I cannot get it to display the variables .", "Does anyone know what code I should add to the paramters file to tell NEOS CBC to display the resulting variables", "The parameter file consists of a list of Cbc standalone commands in a file one per line .", "I have included that line however only the objective value is displayed none of the individual variables are shown .", "@user3043991 It seems that NEOS ignores the solution output printed by CBC .", "I am using CGAL QP package to solve the following quadratic problem : .. . .. .", "In case of QUADOBJ only the entries of 2D on or below the diagonal must be specified entries above the diagonal are deduced from symmetry .", "I then feed this file to the solver first qp from mps.cpp : .. . .. . The project compiles and the executable file runs and returns the solution vector 0 1 0 0 0 0 0 0 0 and the value of the objective function is 0 .", "I know this is not correct .", "The solution vector does not satisfy the upper bound constraint .", "The objective function evaluated at this solution vector cannot be equal to 0 .", "Could my problem be related to the exact type that CGAL uses", "For instance I have tried changing int to double in the following line .. . .. . The program compiled but when I ran the executable the solver returned that no solution was feasible .", "But I know there is a feasible solution - I have found one using the solver in Excel .", "You should indeed use instead of in the Program type .", "But on top of that ET should be typedef d as CGAL : : Gmpzf exact floating-point type and not CGAL : : Gmpz exact integral type .", "Sorry the post got garbled .", "You should indeed use the type double instead of int in the Program typedef .", "Thank you Bernd .", "What you suggested has worked .", "Why does the CGAL manual list MP Float as the exact type that corresponds to the input type double but it does not work properly in my case", "I am referring to this page http : doc.cgal.org latest QP solver group PkgQPSolverFunctions.html gac769fb5f56983e35bec295b26501df7f" ] }
{ "confidence": [ 52.557708740234375, 46.404502868652344 ], "content": [ "Question : Am trying to use NEOS to solve a linear program using MPS input . The MPS file is fine but apparently you need a paramaters file as well to tell the solver what to do min max etc . . However I can t find any information on this online anywhere . So far I have got NEOS to solve a maximization problem and display the objective function . However I cannot get it to display the variables . Does anyone know what code I should add to the paramters file to tell NEOS CBC to display the resulting variables .. . Answer : The parameter file consists of a list of Cbc standalone commands in a file one per line . The format of the commands is quoting the documentation http : www.neos-server.org neos solvers milp 3aCbc MPS.html : .. . .. . The commands are the following : .. . .. . To see the solution values you should include the line sol - after the min or max line of your parameter file . If this doesn t work you can submit the problem to NEOS in AMPL http : ampl.com format via this page http : www.neos-server.org neos solvers milp 3aCbc AMPL.html . In addition to model and data files it accepts a commands file where you can use statements to solve the problem and display the solution for example : .. . .. . This post https : groups.google.com forum topic ampl R6g4oT6IdyI describes how to convert MPS to AMPL . Comment : I have included that line however only the objective value is displayed none of the individual variables are shown . Comment : @user3043991 It seems that NEOS ignores the solution output printed by CBC . I ve updated the answer with another way to get the solution using AMPL instead of MPS .", "Question : I am using CGAL QP package to solve the following quadratic problem : .. . .. . enter image description here http : i.stack.imgur.com SrxsG.png .. . .. . I am using the following MPS file to define the problem first qp.mps : .. . .. . Note that I am using QUADOBJ to define the D matrix . In case of QUADOBJ only the entries of 2D on or below the diagonal must be specified entries above the diagonal are deduced from symmetry . I then feed this file to the solver first qp from mps.cpp : .. . .. . The project compiles and the executable file runs and returns the solution vector 0 1 0 0 0 0 0 0 0 and the value of the objective function is 0 . I know this is not correct . The solution vector does not satisfy the upper bound constraint . The objective function evaluated at this solution vector cannot be equal to 0 . Am I making a mistake in specifying the MPS file for my quadratic-programming problem or is there something I need to adjust in the way the solver searches for a solution Could my problem be related to the exact type that CGAL uses For instance I have tried changing int to double in the following line .. . .. . The program compiled but when I ran the executable the solver returned that no solution was feasible . But I know there is a feasible solution - I have found one using the solver in Excel . .. . Answer : You should indeed use instead of in the Program type . But on top of that ET should be typedef d as CGAL : : Gmpzf exact floating-point type and not CGAL : : Gmpz exact integral type . Comment : Sorry the post got garbled . You should indeed use the type double instead of int in the Program typedef . Comment : Thank you Bernd . What you suggested has worked . Why does the CGAL manual list MP Float as the exact type that corresponds to the input type double but it does not work properly in my case I am referring to this page http : doc.cgal.org latest QP solver group PkgQPSolverFunctions.html gac769fb5f56983e35bec295b26501df7f" ] }
[ "yes-answer-long", "yes-answer-short" ]
file-format
UNK_RELATION
cakephp-2.0@cakephp@56
cakephp-2 .0 -- questions about the 2.0.x branch of the @placeholder mvc framework .
{ "confidence": [ 31.05247688293457, 30.43663787841797, 30.243362426757812, 29.089645385742188, 27.706256866455078, 27.138463973999023, 27.02499771118164, 26.669462203979492, 26.665029525756836, 26.628976821899414, 26.5895938873291, 26.08353042602539, 25.957103729248047, 25.55267333984375, 25.4448184967041, 25.377899169921875, 25.20665740966797, 25.20665740966797, 25.01850128173828, 24.98052215576172, 24.938764572143555, 24.938764572143555, 24.905323028564453, 24.83104133605957, 24.777238845825195, 24.649002075195312, 24.565967559814453, 24.54079818725586, 24.50948143005371, 24.144325256347656, 23.96877098083496, 23.888225555419922, 23.797719955444336, 23.77706527709961, 23.646541595458984, 23.646541595458984, 23.646541595458984, 23.591196060180664, 23.591196060180664, 23.577434539794922, 23.475109100341797, 23.438322067260742, 23.399171829223633, 23.249038696289062, 23.22236442565918, 23.22236442565918, 23.22236442565918, 23.22236442565918, 23.197059631347656, 23.179576873779297, 22.87129020690918, 22.823442459106445, 22.821666717529297, 22.730384826660156, 22.435222625732422, 22.43376922607422, 22.37517738342285, 22.328109741210938, 22.328109741210938, 22.328109741210938, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.308046340942383, 22.301244735717773, 22.14706039428711, 22.134132385253906, 22.071102142333984, 21.764724731445312, 21.760889053344727, 21.690393447875977, 21.64218521118164, 21.64218521118164, 21.64218521118164, 21.64218521118164, 21.639780044555664, 21.639780044555664, 21.62148666381836, 21.584699630737305, 21.580215454101562, 21.533374786376953, 21.370830535888672, 21.268966674804688, 21.245716094970703, 21.116790771484375, 21.116790771484375, 21.116790771484375, 21.116790771484375, 21.116790771484375, 21.116790771484375, 21.0939884185791 ], "content": [ "CakePHP 2.x does offer nonce support .", "stdout and styles are defined in the CakePHP framework .", "I am using CakePHP 2.x - below is my code but it is not working", "I know that in 2.0 they added a slick ability to alias core classes http : book.cakephp.org 2.0 en appendices new-features-in-cakephp-2-0.html highlight alias aliasing while I think this is restricted to helpers components and behaviors it s something to think about .", "I haven t taken a look at Recess PHP Framework in a while but for those that have experience with both frameworks I ask this question : What features does Recess offer over CakePHP 2.x", "I want to use TwigView with CakePHP and found that the plugin above is compatible with CakePHP 2.0 .", "I am using Cakephp 2.X version .. . .. . Im going to run sql-like : .. . .. . this sql is generated by code dynamically .", "I want to create the most basic ajax link there is in Cakephp 2.0 .", "Related : stackoverflow.com questions 7954199 http : stackoverflow.com questions 7954199 trouble-with-internationalization-on-cakephp-2-0 rq 1 stackoverflow.com questions 15722716 http : stackoverflow.com questions 15722716 cakephp-automating-i18n-extract-shell-process-from-batch-file", "You can refer to Customize error pae http : stackoverflow.com questions 9620363 cakephp-2-0-how-to-make-custom-error-pages", "I have a question about cakePHP .", "I am running a mysql statement in a CakePhp 2 framework instance and I am recieving syntaxt errors .", ".. . .. . However the yes option wasn t added until 2.5 https : github.com cakephp cakephp commit a54e8f238e7a8fc5ba4d877ec5e3d1786a71bf58 - if you re using an earlier version of 2.x you ll need to upgrade to have this option available .", "The proper way to save multiple records in CakePHP 2.x is as follows : .. . .. . See .. . .. . Model : : saveMany http : book.cakephp.org 2.0 en models saving-your-data.html model-savemany-array-data-null-array-options-array", "I have a CakePHP 2.x site I m working on which performs as intended locally .", "But now I ve started my first CakePHP 2.0 stable site hosted on this account and it runs CRAZY-slow .", "What version of Cakephp is", "In my cakePHP v2 .", "Using CAKEPHP3 - CakePHP 3 - Catch Error http : stackoverflow.com questions 35311368 cakephp-3-catch-error .. . .. . Solved like a charm - Exception or PDOException", "Possible duplicate of Sql injection and and updateall cakephp issue http : stackoverflow.com questions 32068783 sql-injection-and-and-updateall-cakephp-issue", "i am messing around with the cakephp-2.0 s access lists so far i created a very simple example following the documentation .", "It just depends if it s a third party library or not doc reference http : book.cakephp.org 2.0 en getting-started cakephp-folder-structure.html the-app-folder .", "Integration of Cakephp 2.x Auth with Facebook Auth for seamless user authentication .. . .. . To start off you should read up on the fantastic cakePHP Auth Component http : book.cakephp.org 2.0 en core-libraries components authentication.html and follow the Simple Authentication and Authorization Application tutorial http : book.cakephp.org 2.0 en tutorials-and-examples blog-auth-example auth.html from the cakephp book 2.x Assuming you have also followed the first two tutorials from the series .", "I think this is knowns as hasMany through http : book.cakephp.org 2.0 en models associations-linking-models-together.html hasmany-through-the-join-model in CakePHP which is the framework I m using v2.6.x .", "CakePHP 2.4.2", "I haven t looked into CakePHP 2 but CakePHP 1.3 has a default behaviour of mostly selecting way too much models relations .", "Below code is working for me over GoDaddy server using CakePHP SMTP Email : .. . .. . Email.php file inside config folder - CakePHP 2.4 MVC version : .. . .. . And here is the controller file code below : .. . .. . Hope it helps", "I am using CakePHP application .", "Also I m sure you ve read this http : stackoverflow.com questions 11450519 cakephp-i-cant-get-appuses-to-find-my-class but couldn t it be an error with the file syntax logic etc instead of cakephp not finding the class", "Im working with cakephp for few months and recently I came across croogo a cakephp cms system .", "By the way reference to 2.x docs and 3.x docs will be good .", "Create a UsState model in CakePHP .", "Try this .. . .. . For reference check cakephp doc http : book.cakephp.org 2.0 en models retrieving-your-data.html model-query", "I have noticed there s no datasource for Oracle in CakePHP 2.0 for the moment although it seems they are working on in it now : http : ask.cakephp.org questions view any news about oracle datasource with cakephp 2 0 .. . .. . There are some people explaining how to use an Oracle DB adapting some code from CakePHP 1.3 : http : www.hassanbakar.com 2012 01 09 using-oracle-in-cakephp-2-0 http : liamgraham.wordpress.com 2007 04 19 using-oracle-with-cakephp-15-minute-blog-tutorial .. . .. . But I m not sure that s the correct way .", "It is certainly not usable in a web page or in a CakePHP application .", "In CakePHP you can sort by associated tables .", "It looks like you are using mixed Versions of Cakephp .", "I am using the MeioUpload plugin found here https : github.com jrbasso MeioUpload and Cakephp 2.x .", "Had discovered today that is possible to get excpetion code in ctp file using error- getCode in CakePHP 2.x at least .", "Inside your Users model : .. . .. . If you re new to using CakePHP 2.x I recommend taking a look at Dogmatic http : dogmatic69.com sql-to-cakephp-find-converter to give you some ideas on converting SQL to CakePHP query syntax .", "I m having troubles to compress my Javascript files using Asset Compress Plugin for CakePHP 2.X https : github.com markstory asset compress .", "Searching before asking is also always a good idea see CakePHP View change extension http : stackoverflow.com questions 4634361 cakephp-view-change-extension", "github.com cakephp cakephp blob master app Config core.php L253 https : github.com cakephp cakephp blob master app Config core.php L253", "stackoverflow.com questions 5512327 http : stackoverflow.com questions 5512327 cakephp-switch-database-using-same-datasource-on-the-fly", "I notice there is no core.php in Cakephp 3 .", "https : github.com cakephp upgrade .. . .. . Thanks", "I am using cakephp 2x .", "We are familiar with Components and Helpers in CakePHP .", "No it is CakePhp 2.6", "Convention over configuration .. . .. . Cakephp figures them out automatically for you but you have to follow the naming-conventions http : book.cakephp.org 2.0 en getting-started cakephp-conventions.html", "I ve searched online and found a few related articles such as this one CakePHP : How to update multiple records at the same time with the Form helper http : stackoverflow.com questions 16134085 cakephp-how-to-update-multiple-records-at-the-same-time-with-the-form-helper and also this one CakePHP : Form helper with saveMany to edit multiple rows at once http : stackoverflow.com questions 16127705 cakephp-form-helper-with-savemany-to-edit-multiple-rows-at-once .", "That is the natural way of creating a form-for HasMany in cakePHP you can read all about it in the cake docummentaion .", "I am a beginner in CakePHP and am working on an existing CakePHP site .", "CakePHP3 : There is a discussion about changing that default behavior in 3.0 https : github.com cakephp cakephp issues 2597 .", "I am trying to retrive data from database using Cakephp .", "First you need to create a command using cakephp : book.cakephp.org 2.0 en console-and-shells.html http : book.cakephp.org 2.0 en console-and-shells.html Then run that command in crontab .", "change Configure : : write debug 2 to Configure : : write debug 0 .. . .. . that is 2 to 0.. . .. . .. . path : app-config core.php .. . .. . WORKED FOR ME It took about 1.5 min 7MB homo page THEN after changing 2 to 0 it took usual time only .", "I m new to CakePHP and I m using version 2.8.5 .", "You can use cakephp wthout a database yes .", "I already upgrade my cakephp in to the latest one .", "Does CakePHP offer support for this", "This is not so related with CakePHP .", "Is it possible to achieve in CakePHP", "CakePHP newbie here .", "Using cakephp-2.8", "How to implement this function in cakephp", "It is taken from the cakePHP documentation .", "I m new on cakephp .", "How to do it in cakephp .", "How to write this query in cakephp", "What version of Cakephp", "I m using schema management tool http : book.cakephp.org 2.0 en console-and-shells schema-management-and-migrations.html and CakeDC s migration plugin https : github.com CakeDC migrations in CakePHP 2.6.2 .. . .. . As this user How can we run I write Cakephp Migrations for database-connection type", "Try following code for pagename : .. . .. . UPDATE 1 .. . .. . If you want to treat www.example.com user as same as www.example.com users then you need to add following because CakePHP controller name is plural as per CakePHP naming convention : .. . .. . UPDATE 2 .. . .. . Router : : connect : slug overwrite all of default routing .", "The problem was that the hashed passwords in my users table came from CakePHP 1.x .", "http : book.cakephp.org 3.0 en appendices 3-0-migration-guide.html .. . .. . Also CakePHP provides upgrade tool which will be help to you .", "Copy this file https : github.com cakephp cakephp blob 2.8.2 lib Cake Error exceptions.php inside there and then inside your bootstrap.php replace the line .. . .. . require CAKE .", "Well after reading the post you linked a statement in particular came to my notice : After doing some research it is clear that CakePHP will not be solving this issue in 1.2.x .", "I have 2 CakePHP applications running on the same machine .", "Using Media View of cakephp - in the controller", "iam using cakephp-model validation .", "I am using cakephp 2x", "Try Google or official website of CakePHP .", "See this answer http : stackoverflow.com questions 15124398 how-to-install-debugkit-on-cakephp if this can help .", "http : stackoverflow.com questions 6772737 how-to-define-global-find-conditions-for-model-in-cakephp", "If it was so simple they would have released the feature already for CakePHP 2.X.. . .. . .. . Would I have any trouble using that cheat", "There are various benefits to this including the solution for this question http : stackoverflow.com questions 9137728 cakephp-facebook-integration-logout-issue-with-cakephp-facebook-plugin .", "If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls", "I was having problems trying to configure the mod-rewrite over windows and II7 : CakePHP 2.2.2 not working on Windows IIS7 http : stackoverflow.com questions 12492078 cakephp-2-2-2-not-working-on-windows-iis7 but finally i could import the htaccess in order to create the web.config file for IIS7 .", "See screenshot above .. . .. . .. . .. . I made up this code to demonstrate what I m trying to achieve : .. . .. . .. . .. . This is a CakePhp 2 project using CakePhp s Command Shell .", "I am trying to build a small cms to test CakePHP 2.x .. . .. . In my PagesController for displaying single sites I use this code : .. . .. . The result should only set when the record is marked as visible .", "This is the sample code for the assetUrl .. . .. . props to @lorenzo at https : github.com cakephp cakephp issues 2149 for this solution .. . .. . P.S .", "When I use this- request foo CakePhp says Undefined index .", "I ve sent arrays to CakePHP like this in the past : .. . .. . this- Form- input Req .", "at the cakephp blog its said that i need to chnage the file name .", "So this sql need to be passed into paginate function in order to do the pagination by cakephp .", "It seems that cakephp pagination function is not flexible enough to deal with complex sql .", "I m building an MMA mixed martial arts website with CakePHP .", "so Any plugin developed in 2.x will not work in 3.x .. . .. . For that you must have to refer migration guide document ." ] }
{ "confidence": [ 36.115196228027344, 35.42401123046875, 33.714149475097656, 33.59950256347656, 32.966224670410156, 32.71131896972656, 32.61512756347656, 31.943073272705078, 31.206390380859375, 31.206390380859375, 31.176576614379883, 30.949710845947266, 30.629684448242188, 30.385046005249023, 30.331510543823242, 29.97635269165039, 29.865140914916992, 29.853803634643555, 29.67824363708496, 29.642892837524414 ], "content": [ "Question : I am trying to send a email message using CakePhp 2.0 . in my controller i use this code i know it s fine i took it from the cookbook http : book.cakephp.org 2.0 en core-utility-libraries email.html : .. . .. . and in app-config email.php i have this config : .. . .. . the problem is the server answers with : .. . .. . the account name is correct as is the password . The config works when loading it up in thunderbird the connection to the smtp server is set up as : .. . .. . server name : mail.myServer.com .. . port : 587 .. . connection security : STARTTLS .. . authentication : normal password .. . user name : mYaccount Comment : If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls .. . Answer : Below code is working for me over GoDaddy server using CakePHP SMTP Email : .. . .. . Email.php file inside config folder - CakePHP 2.4 MVC version : .. . .. . And here is the controller file code below : .. . .. . Hope it helps Thanks", "Question : I have noticed there s no datasource for Oracle in CakePHP 2.0 for the moment although it seems they are working on in it now : http : ask.cakephp.org questions view any news about oracle datasource with cakephp 2 0 .. . .. . There are some people explaining how to use an Oracle DB adapting some code from CakePHP 1.3 : http : www.hassanbakar.com 2012 01 09 using-oracle-in-cakephp-2-0 http : liamgraham.wordpress.com 2007 04 19 using-oracle-with-cakephp-15-minute-blog-tutorial .. . .. . But I m not sure that s the correct way . If it was so simple they would have released the feature already for CakePHP 2.X.. . .. . .. . Would I have any trouble using that cheat I want to connect CakePHP with PL SQL procedures and a desktop application and they are working over Oracle . I can not change that . .. . Answer : There is a new CakePHP 3 Driver for Oracle Database https : github.com CakeDC cakephp-oracle-driver released MIT and working with Oracle 11g and Oracle 12c databases . Some features : .. . .. . Triggers .. . Sequences .. . Cursors .. . Stored procedures .. . Packages .. . All the basic CRUD features to allow select insert update delete rows . CakePHP Pagination .. . CakePHP Bake code generation .. . .. . Check the Documentation here https : github.com CakeDC cakephp-oracle-driver blob master docs Home.md and the release announcement here http : www.cakedc.com yevgeny tomenko 2016 03 10 cakephp 3 driver for oracle database .", "Question : I am on CakePHP 2.4 and I want to block access to a specific endpoint from un-authorized requests not coming from my site . I believe a nonce is the right tool for this job . Does CakePHP offer support for this I didn t find it in the docs http : book.cakephp.org 2.0 en core-libraries components authentication.html but perhaps I overlooked something . Comment : Probably not what you re looking for but nonce is listed once in the Security Component page : book.cakephp.org 1.3 en The-Manual Core-Components http : book.cakephp.org 1.3 en The-Manual Core-Components Security-Component.html Comment : @Dave keep in mind that I m on v2.4 Comment : That s why I added it as a comment not an answer . Figured it might lead you into looking in the right place..etc .. . Answer : CakePHP 2.x does offer nonce support . In the general web community this is a type of attack called CSRF or Cross Site Request Forgery https : www.owasp.org index.php Cross-Site Request Forgery CSRF Prevention Cheat Sheet . To prevent this type of attack you want to use the Security Component http : book.cakephp.org 2.0 en core-libraries components security-component.html which has specific features to prevent this type of attack http : book.cakephp.org 2.0 en core-libraries components security-component.html csrf-protection . The book has a lot more information in detail about using this feature .", "Question : i have develope one plugin in cakephp-2.x and its working fine i am managing basic configuration for y website for this i have make the following things and below is the code .. . .. . in AppController .. . .. . after that in the my plugin s model i have create the function .. . .. . then in my main admin login file i a using configuration .. . .. . its working fine but when i am using this process with cakephp 3.x its whoing the error .. . .. . plesae tell me how can i solve this and what is the problem .. . Answer : Yes CakePHP 3 comes with many drastic changes in file structuare and name space usage . so Any plugin developed in 2.x will not work in 3.x .. . .. . For that you must have to refer migration guide document . http : book.cakephp.org 3.0 en appendices 3-0-migration-guide.html .. . .. . Also CakePHP provides upgrade tool which will be help to you . https : github.com cakephp upgrade .. . .. . Thanks Comment : i checked it but i dont know how to make work this- Configuration- load function which is in cake 2.x beforefilter in app folder so that i can call plugins model function in main sitesd app controller and use that data in complete site", "Question : I have multiple sites on the same hosting account and they all run really fast . But now I ve started my first CakePHP 2.0 stable site hosted on this account and it runs CRAZY-slow . I m talking 6.5 to 12 seconds to just load a static empty 20KB homepage . The only modifications I did were tweaking the .htaccess files per instructions here : http : book.cakephp.org 2.0 en installation advanced-installation.html highlight godaddy htaccess code below by adding Rewrite Base which got the site to work in the first place . GoDaddy tech guys spent 20 minutes while on the phone with me running lots of tests and assured me the server itself and the database are both running fine fast which I tend to believe since my other sites on the same server are coming up really quickly . mysite .htaccess .. . .. . mysite app .htaccess .. . .. . mysite app webroot .htaccess Comment : In debug 2 can you post the query times for the db that come up at the bottom of the page They should be under 5ms if the DB is on localhost godaddy server - or around 30ms for remotely hosted . Comment : I ve moved the site off GoDaddy but the database was not localhost even though it was on GoDaddy as well - they give you a connection-string to use . I have to assume it was rewrite - my other sites used the same databases from GoDaddy without issues - the only difference that I can think is that CakePHP uses rewrites and my other sites don t . Comment : Did you use apache rewrite rules on your other sites with godaddy .. . Answer : change Configure : : write debug 2 to Configure : : write debug 0 .. . .. . that is 2 to 0.. . .. . .. . path : app-config core.php .. . .. . WORKED FOR ME It took about 1.5 min 7MB homo page THEN after changing 2 to 0 it took usual time only . Comment : I tried with both debug as 2 and 0 - slow either way for me . Not to mention being on a specific host should restrict your ability to debug", "Question : I m using CakePhp2 and trying to get values of variables from a url . My url looks like controller action foo : bar foo2 : bar2 foo3 : bar3 When I use this- request foo CakePhp says Undefined index . Any idea to find values of foo foo2 and foo3 Comment : try to make a var-dump this- request and see what print .. . Answer : check the documentation on named params . it will most likely be in .. . .. . or even easier cleaner for 2.x : .. . .. . so debug this- request- named for details . Comment : You re working with named parameters : book.cakephp.org 2.0 en controllers http : book.cakephp.org 2.0 en controllers request-response.html cakerequest", "Question : I have noticed there s no datasource for Oracle in CakePHP 2.0 for the moment although it seems they are working on in it now : http : ask.cakephp.org questions view any news about oracle datasource with cakephp 2 0 .. . .. . There are some people explaining how to use an Oracle DB adapting some code from CakePHP 1.3 : http : www.hassanbakar.com 2012 01 09 using-oracle-in-cakephp-2-0 http : liamgraham.wordpress.com 2007 04 19 using-oracle-with-cakephp-15-minute-blog-tutorial .. . .. . But I m not sure that s the correct way . If it was so simple they would have released the feature already for CakePHP 2.X.. . .. . .. . Would I have any trouble using that cheat I want to connect CakePHP with PL SQL procedures and a desktop application and they are working over Oracle . I can not change that . .. . Answer : After asking some CakePHP developers I came out with the conclusion that it is not possible to use an Oracle Database with CakePHP 2.3 if you want to make a proper use of CakePHP Models and their query syntax . There s no yet available any driver for Oracle in CakePHP which is completely functional . Therefore the solution I found was to use the OCI8 Functions http : php.net manual en function.oci-parse.php of PHP . Like this i could use oci parse to directly query against the DB or rather call a PL-SQL procedure which is what I finally decided to do . because of the sql functions complexity and the division of task inside my work group .. . .. . Now I can not make use of many of the advantages of using CakePHP models but It was the only way .", "Question : We want to use the FPDF library in one of our controllers . We created the following files : .. . .. . Right before the controller class we try this : .. . .. . But it fails every time . What are we doing wrong Comment : Have you tried changing the name of the file fdpf wrapper.php to FpdfWrapper.php and try with just App : : uses FpdfWrapper Lib Also I m sure you ve read this http : stackoverflow.com questions 11450519 cakephp-i-cant-get-appuses-to-find-my-class but couldn t it be an error with the file syntax logic etc instead of cakephp not finding the class If that doesn t work can you be more specific and tell what fails everytime and how Class not found error or something else Comment : @Nunser it was a class not found error . We re currently getting it to work with App : : import Vendor bla bla . Not sure whether Vendor or Lib is the most appropriate place for this . Comment : It just depends if it s a third party library or not doc reference http : book.cakephp.org 2.0 en getting-started cakephp-folder-structure.html the-app-folder . Is it and changing the name of the file to what I pointed out did not work .. . Answer : First of all package paths must be registered in order to be used with App : : uses http : book.cakephp.org 2.0 en core-utility-libraries app.html App 3a 3auses and Lib Fpdf is no such one by default only the core packages are registered . You could either extend the paths for an already existing package in your case that would be Lib : .. . .. . And then use App : : uses FpdfWrapper Lib .. . .. . http : book.cakephp.org 2.0 en core-utility-libraries app.html adding-paths-for-app-to-find-packages-in .. . .. . or better add a new package : .. . .. . http : book.cakephp.org 2.0 en core-utility-libraries app.html add-new-packages-to-an-application .. . .. . Then you can use App : : uses FpdfWrapper Lib Fpdf .. . .. . And last but not least of course the filename must follow the CakePHP conventions as already mentioned by @Nunser ie fdpf wrapper.php must be renamed to FdpfWrapper.php", "Question : I am trying to send a email message using CakePhp 2.0 . in my controller i use this code i know it s fine i took it from the cookbook http : book.cakephp.org 2.0 en core-utility-libraries email.html : .. . .. . and in app-config email.php i have this config : .. . .. . the problem is the server answers with : .. . .. . the account name is correct as is the password . The config works when loading it up in thunderbird the connection to the smtp server is set up as : .. . .. . server name : mail.myServer.com .. . port : 587 .. . connection security : STARTTLS .. . authentication : normal password .. . user name : mYaccount Comment : If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls .. . Answer : Give the following a try :", "Question : I am trying to send a email message using CakePhp 2.0 . in my controller i use this code i know it s fine i took it from the cookbook http : book.cakephp.org 2.0 en core-utility-libraries email.html : .. . .. . and in app-config email.php i have this config : .. . .. . the problem is the server answers with : .. . .. . the account name is correct as is the password . The config works when loading it up in thunderbird the connection to the smtp server is set up as : .. . .. . server name : mail.myServer.com .. . port : 587 .. . connection security : STARTTLS .. . authentication : normal password .. . user name : mYaccount Comment : If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls .. . Answer : Comment : Add some explanation with answer for how this answer help OP in fixing current issue", "Question : How to write this query in cakephp Kindly help me to write above query in cakephp . I don t know how to write group contact in cakephp query . I am using cakephp 2x Comment : Try Google or official website of CakePHP . .. . Answer : Try this .. . .. . For reference check cakephp doc http : book.cakephp.org 2.0 en models retrieving-your-data.html model-query Comment : I know this method . . Is it there any other option like this- Model- find Comment : no there are not . you can also try this db this- getDataSource db- fetchAll SELECT GROUP CONCAT usertype name SEPARATOR customer name FROM pre . customer AS Viewcustomer WHERE Viewcustomer . customer status 0 AND Viewcustomer . customer type A1 GROUP BY customer id DESC Comment : In query I renamed GROUP CONCAT usertype name SEPARATOR as usertypename . But in view part it is showing error . . Undefined index . Comment : plz print and check your array . I guess usertypename will be at zero index not in your array .", "Question : I am trying to send a email message using CakePhp 2.0 . in my controller i use this code i know it s fine i took it from the cookbook http : book.cakephp.org 2.0 en core-utility-libraries email.html : .. . .. . and in app-config email.php i have this config : .. . .. . the problem is the server answers with : .. . .. . the account name is correct as is the password . The config works when loading it up in thunderbird the connection to the smtp server is set up as : .. . .. . server name : mail.myServer.com .. . port : 587 .. . connection security : STARTTLS .. . authentication : normal password .. . user name : mYaccount Comment : If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls .. . Answer : From the CakePHP Cookbook : .. . .. . You can configure SSL SMTP servers like GMail . To do so put the ssl : at prefix in the host and configure the port value accordingly . Example : .. . .. . .. . class EmailConfig .. . public gmail array .. . host ssl : smtp.gmail.com .. . .. . .. . Comment : if i do that i just get Unable to connect to SMTP server .", "Question : After upgrading to 2.0 many hacks like accessing protected attributes are not possible anymore . For example AssetHelper : .. . .. . The helper fatal errors of course . Does anyone know how to access those attributes in 2.0 without creating too much overhead in the process Are the AssetHelper and other such classes outdated if they try to access the View from inside a Helper .. . Answer : The new way of accessing the View from a Helper in 2.0 is this- View which is protected . You can see it on the Helper API page http : api20.cakephp.org file Cake View Helper.php . I looked at the AssetHelper on Github https : github.com mcurry asset and it is outdated . It still retrieves the view from the ClassRegistry instead of the new method . It also accesses the scripts attribute of the old 1.3 View class which wasn t actually private . I think you re correct that the change to real visibility declarations has broken this use . Just brainstorming but I wonder if you could make your own View class that has a getter for the scripts attribute like this- View- getScripts . I know that in 2.0 they added a slick ability to alias core classes http : book.cakephp.org 2.0 en appendices new-features-in-cakephp-2-0.html highlight alias aliasing while I think this is restricted to helpers components and behaviors it s something to think about . Hope that helps . Comment : yes that definitly helps . I was thinking in a similar direction . too bad the core classes don t allow access to the scripts or other protected attributes for that matter . it s not like those must be kept secret from the developers :", "Question : After a few times adding Containable Behavior to my various model classes I have a good mind to simply chuck the line into AppModel instead and thus make every model Containable . Which then makes me wonder is there any situation where it is not desirable or counterproductive for a particular model to have Containable Behavior .. . Answer : Containable can be dangerous b c Cake acts in an extremely inefficient manner in order to get the nested results . This site explains it well.. . .. . .. . http : www.endyourif.com cakephp-containable-statement-pitfalls .. . .. . Basically though the nice array you are getting back is the results of many different queries while your best performance may come from using a single query with joins . The convenience of containable is undeniable though . Comment : Well after reading the post you linked a statement in particular came to my notice : After doing some research it is clear that CakePHP will not be solving this issue in 1.2.x . I have heard rumors that it will be addressed in version 2 though which I will be quite excited for . Now the question is where exactly can I read about this in official source Because I doubt it concern still exists . It d seem very lame to perform 100s Select s instead of a simple JOIN . By the way reference to 2.x docs and 3.x docs will be good .", "Question : There seems to be very few to no up to-date resources on integration of Facebook login with the cakephp Auth component online . I have found the following resources : .. . .. . 1 . Old Bakery Article http : bakery.cakephp.org articles fsiebler 2010 08 23 integrating facebook connect using cakephp-1.3 and an older version of Facebook SDK .. . 2 . Cakephp Plugin by webtechnick https : github.com webtechnick CakePHP-Facebook-Plugin that seems to be in development .. . .. . Other than this I found no definitive resources . I wanted the integration to be as flexible without the use of a magic plugin as possible . So after much research I finally baked a decent solution which I am sharing here today . Please contribute as I am rather new to cake . .. . Answer : Integration of Cakephp 2.x Auth with Facebook Auth for seamless user authentication .. . .. . To start off you should read up on the fantastic cakePHP Auth Component http : book.cakephp.org 2.0 en core-libraries components authentication.html and follow the Simple Authentication and Authorization Application tutorial http : book.cakephp.org 2.0 en tutorials-and-examples blog-auth-example auth.html from the cakephp book 2.x Assuming you have also followed the first two tutorials from the series . After you are done you should have managed to build a simple cakePHP application with user authentication and authorization . Next you should download the facebook SDK https : developers.facebook.com docs php gettingstarted and obtain an App ID https : developers.facebook.com apps from facebook . .. . .. . First we will copy the Facebook sdk in to App Vendors . Then we will import and initialize it in the AppController beforeFilter http : book.cakephp.org 2.0 en controllers.html request-life-cycle-callbacks method . We are initializing the Facebook SDK in AppController so that we will have access to it through out the application . Next we will generate the Facebook login URL using the SDK and pass it to the view . I normally do this in the beforeRender http : book.cakephp.org 2.0 en controllers.html request-life-cycle-callbacks method . Note : The above configuration details appId secret should preferably be saved in App Config facebook.php . You should then use cake Configure http : book.cakephp.org 2.0 en development configuration.html . .. . .. . We will update our layout so that we can display this link-to facebook-login for all users who have not logged in . Notice how we have set redirect uri to our applications User login action . This is so that once facebook has authenticated a user we can log him in using cake : : Auth as well . There are various benefits to this including the solution for this question http : stackoverflow.com questions 9137728 cakephp-facebook-integration-logout-issue-with-cakephp-facebook-plugin . When the user clicks the login link facebook SDK will login the user and redirect them to our app Users login . We will update this action for handling this : .. . .. . And we are done Most of the heavy lifting is done by this action as you can see . You should preferably move some of the above code in to UserModel . So here s a summary of what is going on . At first we check if the login request is send from the login form of our application @ Users login . If it is then we simply log the user in . Otherwise we check if the user exists in our database and if he does log him in or create a new user and then log him in . Be careful to verify the user here with more than their email like their facebook id . Otherwise there is a chance the user could change their facebook email and hijack another user of your application . .. . .. . Happy Coding Comment : Hi Shafee I have followed you example however for some reason I get this message 1 out of 10 times . OAuthException : An active access token must be used to query information about the current user do you have any solutions for this Comment : Seems to be a valid approach have not tested yet . So could you mark it as the accepted answer since that s what you ended up using Comment : Thanks man this helped me a lot the only thing I would like to achieve is to have a popup windows of login instead of redirecting to a new url : adding display popup to the getLoginUrl does not seem to work . Thanks Comment : I am unable to get email using your solution Comment : The Facebook SDK changed since I posted this . You should read about what changed in the docs", "Question : Is it possible to define global conditions for Model I have 2 Models : User and Student . In database both of them are using table users but each student has set parent id to its owner which is set in the same table while each user has parent id set to Null . When I use for example .. . .. . in Student Model I want to force Cake to return only those records from database-table users where parent id Null . So the question is - can I define somehow global conditions in the Model Something like that : .. . .. . public conditions array Student.parent id Null Comment : Possible duplicate of How to define global find conditions for model in CakePHP http : stackoverflow.com questions 6772737 how-to-define-global-find-conditions-for-model-in-cakephp .. . Answer : you could use the afterFind callback to alter your finds in the model .. . .. . reference : http : book.cakephp.org 2.0 en models callback-methods.html Comment : afterFind is a useful callback but it s not appropriate for the example in the question . Consider having many users only a few students and a query with a limit - it s quite possible to return only not-students unset all results and therefore return 0 results - even though there are results in the db Comment : true your answer is better", "Question : So I have this query that I am trying to convert to cake ORM and I do not know how to go about it .. . Answer : Inside your Users model : .. . .. . If you re new to using CakePHP 2.x I recommend taking a look at Dogmatic http : dogmatic69.com sql-to-cakephp-find-converter to give you some ideas on converting SQL to CakePHP query syntax . Comment : type join should be type INNER . Also I don t think you need to contain UserOrders this will fetch the hasMany relationship provided it s declared and the class is called UserOrders and not UserOrder following CakePHP conventions . The rest seems correct .", "Question : I have multiple sites on the same hosting account and they all run really fast . But now I ve started my first CakePHP 2.0 stable site hosted on this account and it runs CRAZY-slow . I m talking 6.5 to 12 seconds to just load a static empty 20KB homepage . The only modifications I did were tweaking the .htaccess files per instructions here : http : book.cakephp.org 2.0 en installation advanced-installation.html highlight godaddy htaccess code below by adding Rewrite Base which got the site to work in the first place . GoDaddy tech guys spent 20 minutes while on the phone with me running lots of tests and assured me the server itself and the database are both running fine fast which I tend to believe since my other sites on the same server are coming up really quickly . mysite .htaccess .. . .. . mysite app .htaccess .. . .. . mysite app webroot .htaccess Comment : In debug 2 can you post the query times for the db that come up at the bottom of the page They should be under 5ms if the DB is on localhost godaddy server - or around 30ms for remotely hosted . Comment : I ve moved the site off GoDaddy but the database was not localhost even though it was on GoDaddy as well - they give you a connection-string to use . I have to assume it was rewrite - my other sites used the same databases from GoDaddy without issues - the only difference that I can think is that CakePHP uses rewrites and my other sites don t . Comment : Did you use apache rewrite rules on your other sites with godaddy .. . Answer : I haven t looked into CakePHP 2 but CakePHP 1.3 has a default behaviour of mostly selecting way too much models relations . Say you just want to select the name of the currently logged in user : .. . .. . Depending on your entity relations CakePHP joins tons of other tables usergroups permissions logtables sessions articles etc . while performing the query . Be sure to set recursive to the lowest possible value : http : book.cakephp.org 2.0 en models retrieving-your-data.html Comment : I understand but recursive was -1 and I was running no queries - nothing in AppController nothing in the action...etc . It s considered best practice to set recursive to -1 in your AppModel so I completely agree with your point but in this case it s unrelated .", "Question : I haven t taken a look at Recess PHP Framework in a while but for those that have experience with both frameworks I ask this question : What features does Recess offer over CakePHP 2.x .. . Answer : Most of the code in the Recess github repository https : github.com recess recess hasn t seen an update in 3 years with the latest commit a year ago . The forums are offline and their last blogpost dates back from 2010 . So I m not sure if Recess is actively developed anymore which might become a problem in the long run . That said Cake has quite a lot of developers is backed by a foundation and receives regular updates . Also Cake s ecosystem of plugins code-snippets etc . is bound to be more extensive compared to Recess .", "Question : I am trying to send a email message using CakePhp 2.0 . in my controller i use this code i know it s fine i took it from the cookbook http : book.cakephp.org 2.0 en core-utility-libraries email.html : .. . .. . and in app-config email.php i have this config : .. . .. . the problem is the server answers with : .. . .. . the account name is correct as is the password . The config works when loading it up in thunderbird the connection to the smtp server is set up as : .. . .. . server name : mail.myServer.com .. . port : 587 .. . connection security : STARTTLS .. . authentication : normal password .. . user name : mYaccount Comment : If you want to see some CakePHP code that sends SMTP commands check out : stackoverflow.com questions 5294751 http : stackoverflow.com questions 5294751 using-gmails-outgoing-smtp-from-php-using-tls .. . Answer : Make sure your .. . .. . php openssl.dll .. . .. . extension is running . You can check it on the php.ini file . If you are using XAMPP php.ini should be on C : xampp php" ] }
[ "yes-answer-long", "yes-answer-short" ]
cakephp
UNK_RELATION
facter@ruby@51
facter -- facter is an independent cross-platform @placeholder library bundled with puppet designed to gather basic node information about the hardware and operating-system .
{ "confidence": [ 54.584964752197266, 54.584964752197266, 51.7407112121582, 51.205909729003906, 49.60635757446289, 48.329315185546875, 48.329315185546875, 47.41216278076172, 47.27301788330078, 46.98172378540039, 46.628787994384766, 46.51383590698242, 46.22073745727539, 45.80553436279297, 45.80553436279297, 45.57249069213867, 45.49668884277344, 44.14854049682617, 44.105003356933594, 44.105003356933594, 44.0349235534668, 43.878658294677734, 43.436710357666016, 42.300819396972656, 42.300819396972656, 41.76259994506836, 40.885032653808594, 40.46343231201172, 40.46343231201172, 40.46343231201172, 40.098419189453125, 39.87778854370117, 39.87778854370117, 39.87778854370117, 39.87778854370117, 39.87778854370117, 38.40478515625, 38.3906364440918, 38.3906364440918, 38.3906364440918, 38.35126495361328, 38.35126495361328, 38.296180725097656, 38.296180725097656, 38.296180725097656, 38.296180725097656, 38.296180725097656, 38.296180725097656, 38.143798828125, 37.98318862915039, 37.912315368652344, 36.59565353393555, 36.59565353393555, 36.59565353393555, 36.59565353393555, 36.59565353393555, 36.59565353393555, 35.56196594238281, 35.46751403808594, 35.46751403808594, 35.44563293457031, 34.859527587890625, 34.209861755371094, 34.16436767578125, 34.11540603637695, 34.11540603637695, 33.87516784667969, 33.87516784667969, 33.87516784667969, 33.87516784667969, 33.73138427734375, 33.30622482299805, 33.18772888183594, 32.555091857910156, 32.307647705078125, 32.17463684082031, 32.17463684082031, 32.17463684082031, 32.17463684082031, 32.17463684082031, 32.17463684082031, 32.17463684082031, 31.75070571899414, 31.75070571899414, 31.169410705566406, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 31.046497344970703, 30.854562759399414, 30.698762893676758, 30.698762893676758, 30.592748641967773, 29.726421356201172, 29.69438934326172 ], "content": [ "I have a problem with puppet and facter .", "Is this an incompatibility with puppet 3.4 and facter 2", "Is this Facter 2 or Facter 3", "Isn t there a built-in puppet facter variable that can do it", "More about selinux in facter : docs.puppetlabs.com facter 2.2 core facts.html selinux https : docs.puppetlabs.com facter 2.2 core facts.html selinux", "What is the best way to handle the need for accessing variables dynamically in puppet facter", "usr bin facter --puppet --yaml etc mcollective facts.yaml", "Is there perhaps another way of exposing this information except facter", "My initial thought was to create a custom facter fact that basically captured the output of mongod --version but it appears that facter facts are loaded before the puppet manifest is executed .", "Some side information : https : github.com puppetlabs facter blob 2.4.6 lib facter operatingsystem base.rb L11 https : github.com puppetlabs facter blob 2.4.6 lib facter kernel.rb L12", "I m trying to set up a Puppet module with an if-statement and Facter .", "What is a facter", "As said in facter 2.2 documentation you need to relocate your facter folder into module tree : .. . .. . The best way to distribute external facts is with pluginsync which added support for them in Puppet 3.4 Facter 2.0.1 .", "Your Facter version is ancient .", "As part of a Facter fact .", "Even if Facter only occasionally has to re-evaluate the fact from scratch Facter -- and therefore Puppet -- will take a long time to perform those runs .", "I m trying to improve Facter https : github.com puppetlabs facter on FreeBSD .", "My testbed is running Puppet 3.8.3 and Facter 2.4.6 in case that affected things .", "Facter 2.0.1 was released yesterday .", "The version of facter is : 2.2.0", "Downgrading puppet puppet-server facter and hiera to the previous version 3.6.1 2.0.2 1.3.3 resolves the issue. .", "Since facter 2.0 facter can handle structured facts see here docs.puppet.com facter 2.2 https : docs.puppet.com facter 2.2 fact overview.html writing-structured-facts .", "How about this sample docs.puppetlabs.com facter 3.0 https : docs.puppetlabs.com facter 3.0 custom facts.html using-other-facts", "What version of facter are you using", "Facter 3 was rewritten in c++11 .", "Also this is not what Facter was meant to do it is for collecting server information .", "The problem your encounter here comes from facter update and the way you use private facts with puppet on version 3.X with facter 2.X.when you want to distribute external facts that was my case .", "How can I use a puppet facter fact like : : hostname in a Foreman smart class parameter", "Probably some of your puppet manifest makes use of selinux facts from facter .", "When testing Puppet modules in Debian it is possible to override Facter facts to test behavior .", "Is there any facter variable available or I can create a custom facter variable to identify the CentOS and Amazon Instances", "@ChrisPitman added a facter that can run on the agents", "I want to create a facter that returns all users .", "How can I override a Facter fact on RHEL", "Facter has supported this for ages so it should work .", "@MattSchuchard opt puppetlabs bin facter --version : 3.2.0", "I am trying to write a custom facter module that incorporates a fact within a fact for the command via concatenation of the command string plus a facter fact variable : .. . .. . Newbie to ruby and Puppet.. . 1 .", "Let us say I have an array of values .. . .. . And I want to pass this using facter and use it in puppet at such : .. . .. . How can I do this", "We use facter-2.4.3 here already but when I set my custom fact to an array like a b Puppet manifest sees only ab .", "I ve successfully added a FACTER environment variable it is indeed showing up in the facter -p list so it should be able to be used by puppet.. .", "The working code was the following .. . .. . Users petersouter projects facter lib src facts freebsd dmi resolver.cc .. . .. . facter lib inc internal facts freebsd dmi resolver.hpp", "Probably you were using Facter 2 and it was requiring including open-uri higher up and you are now using Facter 3 and it is not because of the rewrite .", "Facter 1.x cannot pass structured-data as fact values .", "I have facter version 2.4.6 and am seeing the same issue .", "I ve noticed this line in facter -d : Found no suitable resolves of 1 for operatingsystemmajrelease", "Any environment variable prefixed with FACTER is automatically added to the facter collection .", "Forego the approach entirely and use etc facter facts.d instead .", "Its work can be simplified by relying on Facter to provide the IP to it .", "And I m open for suggestions to making the information available some other way but facter seems to be the recommended approach", "How can I reliably unit-test using rspec-puppet or similar mocking values in facter with production-representative types", "Generally you want to use Facter : : Util : : Resolution.exec to run the command on the system then manipulate the result with facter rather than try to write the perfect command to get the output you need .", "I thought intrinsic facts were not hashes in general with Facter 3.0 .", "setcode is the DSL from Facter and has nothing to do with your problem .", "basically i want to know how to add custom facter in ruby scrpt", "The desired behavior highly depends on what Facter add expects to receive .", "This is the best only documentation https : docs.puppetlabs.com facter 2.4 custom facts.html I have .", "Something like : .. . .. . I just can t seem to find the Facter variable to do this .", "The base module prefers to identify Amazon Linux OSfamily as Redhat but the facter installed by puppet on the Amazon Linux OS reports the os as Linux .", "with mco i can choose the facter uuid that will diff VM1 VM2 .", "Facter 2.2 should also have different values for the fact operatingsystem .", "I have a puppet node that runs this on cron : .. . .. . I worked fine in debian Wheezy but after upgrading to Debian Jessie I get this message on the node every time puppet agent runs : .. . .. . I narrowed down to facter but I don t know how to get rid of this .", "Facter expects to find executable scripts there that can very well output JSON data but it must be in a facter compliant fashion : docs.puppetlabs.com guides custom facts.html external-facts http : docs.puppetlabs.com guides custom facts.html external-facts", "1 .. . .. . It s quite possible that in different versions of Puppet Facter this isn t a problem but hopefully this is enough to get you rolling in the right direction .", "When I try to populate a config file through puppet with an erb template which accesses the macaddress facter fact that gives me the mac address for the eth0 interface which is the wrong one in this instance .", "As Josh Souza says older versions of Facter did not support hashes or arrays .", "Goes from how to use another fact in facter for what reason", "Facter 2 does support Boolean Hash and Array facts but this may not yet be readily available .", "Can you paste the output of facter -d from one of the afflicted boxen somewhere and add the link-to your answer", "If I run sudo facter I don t get my custom FACTER facts .", "When I execute facter command on terminal I can see the list of defualt facters .", "If this is for an internal module you should look at fact precedence - https : docs.puppetlabs.com facter 3.0 custom facts.html fact-precedence .. . .. . The way that Facter decides the issue of resolution precedence is the weight property .", "So depending on the version of Puppet and Facter your using I would check what the value of stringify facts https : docs.puppet.com puppet 3.8 reference configuration.html stringifyfacts config .", "This is how facter pluginsync modules and directory environments work I just omitted some information because I have no idea what his use-case is .", "facter --version 3.0.2 commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd .. . .. . puppet --version 4.2.1 .. . .. . Using this as an example : http : serverfault.com questions 471995 how-do-i-check-if-a-user-exists-in-puppet .. . .. . I m having some issues which do not seem to be common .", "Thanks @mikey-hogarth but I realized that the facter gem installed in the test system does not have core so I changed the code and the test sligthly in the code pack is now pack Facter : : Util : : Resolution.exec rpm -qa grep ts and in the test I now do Facter : : Util : : Resolution.stubs : exec .with rpm -qa grep ts .returns ts3 hostt01-1.0.0-34.x86 64 n instead .", "Also note that I run facter -p on my client but it doesn t show any key employees .", "Use Custom Executable Facts https : docs.puppetlabs.com facter 2.4 custom facts.html executable-facts-----windows instead .", "Then in my .pp file I have this : .. . .. . This should work but the facter returns just one letter at a time .", "The fact that the 7 case is invariably hit however suggests that Facter might actually report that wrong .", "I would like to create a Facter fact that iterates through the mounted partitions and then use that to complete a template .", "Have you tried running facter ipaddress tun0 on the machine to make sure it s actually a fact", "Or just run facter to see what your options for facts are and make sure you have the correct fact name spelling .", "puppet --version - 3.8.6 .. . facter --version - 2.4.6 .. . .. . I write a fact for softwareinventory with returnvalue a nested hash .. . .. . like this : .. . .. . The puppet.conf on the client and on server have included : stringify facts false .. . .. . If i test on the client with a local manifest test.pp with content : .. . notify : : packages Notepad++ Displayversion .. . .. . puppet apply test.pp .. . i get the right value 6.8.3 .. . .. . facter -p packages returns a hash like expected .", "Closest match to my problem that I ve found so far is : Returning multiple custom facts with puppet Facter https : stackoverflow.com questions 19127545 returning-multiple-custom-facts-with-puppet-facter .. . .. . That pointed me to this solution : .. . .. . But doesn t quite produce the result I was expecting e.g : .. . .. . When I was really expecting : .. . .. . What am I doing wrong", "How can I create a variable in my defined type which takes the value of facter macaddress ethernetinterface where ethernetinterface is defined by a parameter of the defined type", "I have defined some key-value pairs in etc facter facts.d value.txt file .", "If you log in to each host and run facter you can see what values are reported by each .", "I am using facter-2.2 which give the same value of operatingsystem in amazon linux and centos", "Sorry Chris I am using Facter-2.4 which gives Operatingsystem CentOS in both amazon linux as well as in CentOS", "I want to correct this bug by overwriting the facter value of osfamily from Linux to Redhat before calling the base module .", "my osfamily.rb inside mymodule lib facter is .. . .. . But the problem is I am unable to overwrite the osfamily value .", "I believe it is an anti-pattern to attempt to override built-in facter values for a community module .", "Once Facter rules out any resolutions that are excluded because of confine statements the resolution with the highest weight is evaluated first .", "If that resolution returns nil Facter moves on to the next resolution by descending weight until it gets a value for the fact .", "here s an example of someone using a longer powershell script to get the current dotnet version : github.com matthewrstone puppet-winconfig blob master lib https : github.com matthewrstone puppet-winconfig blob master lib facter win dotnet35 version.rb Does that help", "So I think I m in the right direction with this : .. . .. . facter lib inc internal facts freebsd dmi resolver.hpp .. . .. . facter lib src facts freebsd dmi resolver.cc .. . .. . But when I run this I get the following errors : .. . .. . How do I fix this", "Looking through the facter code this is the file you re requiring : .. . .. . https : github.com puppetlabs facter blob master lib facter.rb .. . .. . It doesn t require core execution itself.. . without digging too much further in could you just try this in your spec helper :", "Custom Facts .. . .. . But to answer your question you should probably use a custom executable fact and just use PowerShell directly because the command string still needs to be escaped in the double quotes https : docs.puppetlabs.com facter 2.4 custom facts.html executing-shell-commands-in-facts and may also need to be escaped in the way that you used apostrophe then double quotes - the docs also point to using Facter : : Core : : Execution.exec and not Facter : : Util : : Resolution.exec .", "mco pupppetd runonce --with-facter uuid 20a558f1-2cd9-4068-b5fc-8d252c3f3262 .. . .. . but I STILL MUST hardcode the fqdn in the puppet-code .. . .. . but in fact I just want use it in the following style : .. . .. . how can I write the puppet", "Use Facter directly within your template Which is very non-puppety but it works .. . .. . Facter.value : processors count .. . 3 ." ] }
{ "confidence": [ 72.88662719726562, 67.09510803222656, 66.39623260498047, 64.91291809082031, 63.92772674560547, 63.79258346557617, 63.58440399169922, 62.400054931640625, 61.62443923950195, 60.823577880859375, 60.479862213134766, 60.01185607910156, 59.905250549316406, 58.469818115234375, 57.98094177246094, 57.84577178955078, 57.83346176147461, 57.66337966918945, 57.47377395629883, 57.21684265136719 ], "content": [ "Question : null .. . Answer : I have a puppet node that runs this on cron : .. . .. . I worked fine in debian Wheezy but after upgrading to Debian Jessie I get this message on the node every time puppet agent runs : .. . .. . I narrowed down to facter but I don t know how to get rid of this . I checked puppet master not to have this as seen in another post : .. . .. . It was not there so I don t know what else to check . The node puppet release is 3.7.2-4 and the puppet server is puppetmaster 3.7.5-1puppetlabs1 .. . .. . Any hints Thank you . Comment : Probably some of your puppet manifest makes use of selinux facts from facter . Could you possibly ensure that selinux on your machine is enabled Just check the value of selinux fact . More about selinux in facter : docs.puppetlabs.com facter 2.2 core facts.html selinux https : docs.puppetlabs.com facter 2.2 core facts.html selinux Comment : What version of facter are you using Comment : Are you seeing those messages on the master or on the node running the agent Comment : The messages are on the node . Comment : The version of facter is : 2.2.0", "Question : I m trying to set up a Puppet module with an if-statement and Facter . Something like : .. . .. . I just can t seem to find the Facter variable to do this . .. . Answer : There are a few facts that you might try using for this depending how specific you need to be about the model information . Comment : Isn t there a built-in puppet facter variable that can do it Comment : I think I got it : sp machine model", "Question : null .. . Answer : When testing Puppet modules in Debian it is possible to override Facter facts to test behavior . For example if you want to test how the module would behave on a VM you can over the is virtual fact : .. . .. . When you apply a module it will behave as-if the node is a VM : .. . .. . Exporting environment-variables using this method does not work for me in RHEL5 6 . How can I override a Facter fact on RHEL Comment : Can you verify this using FACTER is virtual true puppet apply etc puppet module somename tests init.pp Perhaps your shell on RHEL does not play well with the export syntax . Facter has supported this for ages so it should work .", "Question : The following custom fact https : github.com 030 puppet-packer blob master lib facter latest packerversion.rb : .. . .. . worked using puppet 3.6.2 but since the upgrade to 4.5.2 the following issue https : github.com 030 puppet-packer issues 4 occurs : .. . .. . Analysis .. . .. . It seems that the rb sysopen could not be found anymore for some reason No such file or directory @ rb sysopen since the upgrade to Puppet 4 . Puppet4 seems to use an embedded ruby version instead of the one installed on the host Puppet3 : .. . .. . Puppet 4 both Facter 2.4 and CFacter 0.4 the latest Hiera and Mcollective as well Ruby 2.1.5 OpenSSL 1.0.0r and our gem dependencies . https : docs.puppet.com puppet 4.0 reference release notes.html all-in-one-packaging .. . .. . Does rb sysopen not exist in Ruby 2.1.5 No evidence was found . Perhaps a change related to facts have occurred that could cause the issue Nothing related was found in the release notes https : docs.puppet.com puppet 4.0 reference release notes.html puppet-4.0-release-notes . Question .. . .. . Why could rb sysopen not be found anymore by the custom fact since the upgrade to Puppet4 Comment : Is this Facter 2 or Facter 3 Facter 3 was rewritten in c++11 . Also this is not what Facter was meant to do it is for collecting server information . You may want to consider another tool . Comment : @MattSchuchard What tool do you recommend .. . Answer : Concise .. . .. . I will include require open-uri in both facts but I do not understand why this is required since the upgrade to Puppet4 .. . .. . Verbose .. . .. . Once require open-uri is included in one of the custom facts the issue is solved . As soon as the require open-uri has been commented out the issue occurs again : .. . .. . At the moment it is unclear what is causing the issue . Comment : You are retrieving information via http apache so open-uri is necessary here . Comment : But why did no issue occur when puppet3 was used Comment : Probably you were using Facter 2 and it was requiring including open-uri higher up and you are now using Facter 3 and it is not because of the rewrite . Comment : @MattSchuchard opt puppetlabs bin facter --version : 3.2.0 Comment : @MattSchuchard Could you post your explanation and suggested workaround as an answer", "Question : Is there any facter variable available or I can create a custom facter variable to identify the CentOS and Amazon Instances I want to install some utils on CentOS and Amazon Linux instances but not able to find a way to do that using puppet . Comment : Was this issue researched at all Comment : Yes Felix it was researched then only posted here . If you think you can give the right answer or point me to the right URL s . I would really appreciate that and upvote your ans as well . .. . Answer : You can identify the operating-system with the fact operatingsystem . The two values that you are interested in are Amazon and CentOS . If you log in to each host and run facter you can see what values are reported by each . Comment : I am using facter-2.2 which give the same value of operatingsystem in amazon linux and centos Comment : Facter 2.2 should also have different values for the fact operatingsystem . What output are you getting Comment : Sorry Chris I am using Facter-2.4 which gives Operatingsystem CentOS in both amazon linux as well as in CentOS", "Question : I m new to puppet and ruby and just tried to write custom fact but .. . Having the following issue .. . .. . I don t know how exactly to do this I want to list installed programs and search for one and if true find to return that it s installed . This example so far returns only false ... . Comment : Why are you trying to do this Are you trying to determine if you need to install vSphere Also Display is misspelled . Comment : Well this with vSphere is just an example I want to write fact to determine if there is specific software installed and based on that to install something else . Comment : Generally you want to use Facter : : Util : : Resolution.exec to run the command on the system then manipulate the result with facter rather than try to write the perfect command to get the output you need . here s an example of someone using a longer powershell script to get the current dotnet version : github.com matthewrstone puppet-winconfig blob master lib https : github.com matthewrstone puppet-winconfig blob master lib facter win dotnet35 version.rb Does that help .. . Answer : Puppet is about Desired State - not Procedural .. . .. . It feels like you are treating Puppet as procedural at the moment and Puppet is more about the desired state . You determine what is installed you shouldn t necessarily ask . So on certain server roles you would say the end state is that you need vSphere and also other software . You get to make those decisions you shouldn t use Puppet to discover the state but to tell it the state and let it do what it does best . Discovery is something you can do out of band with the tool exploring a machine try puppet resource package and you will see what I mean . Custom Facts .. . .. . But to answer your question you should probably use a custom executable fact and just use PowerShell directly because the command string still needs to be escaped in the double quotes https : docs.puppetlabs.com facter 2.4 custom facts.html executing-shell-commands-in-facts and may also need to be escaped in the way that you used apostrophe then double quotes - the docs also point to using Facter : : Core : : Execution.exec and not Facter : : Util : : Resolution.exec . Use Custom Executable Facts https : docs.puppetlabs.com facter 2.4 custom facts.html executable-facts-----windows instead . Also don t use Win32 Product - Win32 Product class can trigger Windows Installer to do a repair on all MSI installed software as a consistency check http : myitforum.com cs2 blogs gramsey archive 2011 01 25 win32-product-is-evil.aspx . It can really cause a machine to do a lot of unnecessary work - its just not a good idea to use it . I d suggest querying the uninstaller registry keys directly instead .", "Question : facter --version 3.0.2 commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd .. . .. . puppet --version 4.2.1 .. . .. . Using this as an example : http : serverfault.com questions 471995 how-do-i-check-if-a-user-exists-in-puppet .. . .. . I m having some issues which do not seem to be common . If I : .. . .. . From etc puppetlabs code environments production modules facts lib facter user exists dmadmin.rb .. . .. . And site.pp contains .. . .. . And when I compile the catalog .. . .. . Will be very grateful to know why the error . Many thanks .. . .. . Kevin .. . Answer : When you use puppet master --compile the last set of cached facts for the node are used which means that this fact must not have been sent the last time puppet was run by the actual agent . Run puppet agent --test from cs1.home so that the plugin can be synced down and new fact values cached .", "Question : Let us say I have an array of values .. . .. . And I want to pass this using facter and use it in puppet at such : .. . .. . How can I do this Comment : I created a puppet function and then used eval on the string . .. . Answer : Facter 1.x cannot pass structured-data as fact values . All facts will be coerced into String format . This is especially unfortunate for Arrays because those will have their elements concatenated without a join marker . It is advisable to make your fact return a comma seperated list e.g . instead of returning Array result do .. . .. . In your manifest turn this back into an array .. . .. . See the Puppet function reference http : docs.puppetlabs.com references latest function.html split and Ruby s Array methods http : www.ruby-doc.org core-1.9.3 Array.html . Facter 2 does support Boolean Hash and Array facts but this may not yet be readily available . Comment : We use facter-2.4.3 here already but when I set my custom fact to an array like a b Puppet manifest sees only ab . Any ideas Thanks Comment : @MikhailT . Yes actually Look for the stringify facts option in Puppet 3.x . It defaults to true unfortunately . Most likely you just want to add stringify facts false to your puppet.conf .", "Question : Any environment variable prefixed with FACTER is automatically added to the facter collection . I ve successfully added a FACTER environment variable it is indeed showing up in the facter -p list so it should be able to be used by puppet.. . The problem though is in my .pp file the variable name that should be set to the FACTER value is empty or non existant .. . .. . Is there something else I need to do to get FACTER variables into puppet variables Cheers Comment : How are you running puppet Comment : I.e . are you sure that the FACTER .. . variable is part of the agent s environment You might wish to inspect proc pid environ to make sure . Comment : That is it . If I run sudo facter I don t get my custom FACTER facts . Similarly if I run sudo -E puppet agent -t it works and puppet creates the correct FACTER variables . How do I get puppet to include these env variables Comment : Chris - running puppet as a service .. . Answer : You are most likely setting up the system so that the FACTER variables are available in interactive shells . This is not sensible if you want your background agent to respect them . I can see two direct approaches : .. . .. . 1 . Modify your initscript or its configuration to set the appropriate environment-variables . 2 . Forego the approach entirely and use etc facter facts.d instead . I would advise towards the latter . Comment : Yep I went with 2 . Thanks .", "Question : I have the following rb script which generate puppet facts according to the packages installed and which seems to be working ok in my puppet environment : .. . .. . I wrote the following spec which runs a small dummy test to see if my rspec env in general is ok : .. . .. . But then when running rake spec I get the following error : .. . .. . What am I doing wrong or might be missing that is not loading Facter : : Core My spec helper looks like this : .. . .. . UPDATE .. . .. . After checking my test system I noticed the facter gem was missing core so I updated the code and test as follows : .. . .. . pack is now : .. . .. . and the stub in my test now is : .. . .. . And the result now is this : .. . .. . What am i doing wrong in my test .. . Answer : Looking through the facter code this is the file you re requiring : .. . .. . https : github.com puppetlabs facter blob master lib facter.rb .. . .. . It doesn t require core execution itself.. . without digging too much further in could you just try this in your spec helper : Comment : Thanks @mikey-hogarth but I realized that the facter gem installed in the test system does not have core so I changed the code and the test sligthly in the code pack is now pack Facter : : Util : : Resolution.exec rpm -qa grep ts and in the test I now do Facter : : Util : : Resolution.stubs : exec .with rpm -qa grep ts .returns ts3 hostt01-1.0.0-34.x86 64 n instead . See the updated question for the new result .. .", "Question : I have a problem with puppet and facter . puppet --version - 3.8.6 .. . facter --version - 2.4.6 .. . .. . I write a fact for softwareinventory with returnvalue a nested hash .. . .. . like this : .. . .. . The puppet.conf on the client and on server have included : stringify facts false .. . .. . If i test on the client with a local manifest test.pp with content : .. . notify : : packages Notepad++ Displayversion .. . .. . puppet apply test.pp .. . i get the right value 6.8.3 .. . .. . facter -p packages returns a hash like expected . but with a puppetrun : .. . puppet agent -t -d -v .. . .. . If i curl the puppetdb : curl -k http : puppetdbname : 8080 v3 nodes nodename facts packages .. . .. . i can see only a string Can anyone help please . Any ideas Thanks Taner .. . Answer : i found out puppetdbv3 show the facts always as string and puppetdbv4 do not . I tested again on my puppetserver and i could access to my hash - packages normally . regards Taner", "Question : I m working on extending the puppetlabs-mongodb https : github.com puppetlabs puppetlabs-mongodb module to allow for user authentication https : github.com puppetlabs puppetlabs-mongodb issues 36 . The challenge is that mongo changed its mechanism for enabling user authentication between version 2.2 http : docs.mongodb.org v2.2 tutorial control-access-to-mongodb-with-authentication and version 2.4 http : docs.mongodb.org manual tutorial enable-authentication and so distinct code must be run in order to give a user authentication credentials to a database . My initial thought was to create a custom facter fact that basically captured the output of mongod --version but it appears that facter facts are loaded before the puppet manifest is executed . Is there a way to execute arbitrary code at run time during puppet execution so that I can access mongod --version and decide which method to use to enable user authentication Note : One approach would be to have puppet run a single script to create user credentials and have the script detect the mongod --version at runtime . This doesn t seem like a very puppet-y way of doing things but perhaps I am off base on that . What is the best way to handle the need for accessing variables dynamically in puppet facter .. . Answer : Just put your Ruby code in a ERB template and use template module name templ.erb to return your version string .", "Question : null .. . Answer : I have a Debian Jessie system and I m starting to use Puppet for configuration-management on it . I would like to create a Facter fact that iterates through the mounted partitions and then use that to complete a template . I have created etc puppet environments production modules partition test lib facter partitions.rb in which I have : .. . .. . However this doesn t appear to do anything let alone give me the list of mounts I was after : .. . .. . Can anyone suggest where I might be going wrong Comment : If you are using agent master are you seeing the fact being sync d during agent startup What is your Puppet version To debug this you should 1 add some Puppet.debug .. . calls to your code then run puppet apply -e --debug .", "Question : I have a small custom fact in a my php module .. . .. . This obviously requires the php binary to be installed . However I noticed that all facts are run once before applying the catalog so this fact is invalid before php installed . Is there any way of gathering the information after the module is installed Is there perhaps another way of exposing this information except facter Update .. . .. . I m using the two facts to determine which of multiple .so files is the right one to install : .. . .. . The files that are located in the agent x64 directory can be .. . Answer : You essentially have only two opportunities to execute code on the node : .. . .. . 1 . As part of a Facter fact . As you are aware this happens before puppet applies a catalog so any facts dependent on the results of the puppet run will not be useful until the next run . 2 . As part of a custom provider . You can create a custom type and provider for installing the extensions that checks the node state before deciding what to do . Providers execute on the node and as long as you know the overall provider lifecycle you can make this happen after the PHP install . However this is incredibly complex compared to normal puppet modules . Outside of those options the normal way of doing this would be to enforce the version and configuration of php within your own manifests and then pass that information to here . You should already know the version of PHP and its extensions based on what packages you have installed . Comment : Thanks for the reply I ended up writing a new provider even though more complex I think it will be better in the long run", "Question : I have one problem that how to manage the agent-nodes with puppet I m using the openstack to auto generating the vms and then puppet with several puppet-code in special pattern . eg . The system provision several vms each vm has two attrs : .. . .. . fqdn : maybe repeat you know the vms are genrate by system in a complex env .. . .. . uuid : this will be unique and is stored in a persistent file . it won t change .. . .. . and below are two of them . VM1 : .. . .. . VM2 : .. . .. . Also I can specify the hostname with the uuid but I think it s not a good idea . and now I want to puppet them with puppet kick or mcollective puppet runonce . with mco i can choose the facter uuid that will diff VM1 VM2 . mco pupppetd runonce --with-facter uuid 20a558f1-2cd9-4068-b5fc-8d252c3f3262 .. . .. . but I STILL MUST hardcode the fqdn in the puppet-code .. . .. . but in fact I just want use it in the following style : .. . .. . how can I write the puppet or do some change in the architecture .. . Answer : There are multiple ways of assigning roles classifying a node in puppet . A solution closer to the example you provided would be to use the following node.pp file .. . .. . Saying that I am not sure that this is the best solution . There are better ways assigning classes roles to a node . I would suggest to look at puppet hiera http : docs.puppetlabs.com hiera 1 complete example.html or ENC http : docs.puppetlabs.com guides external nodes.html for better mechanisms . Comment : thx this does help for me . i did changed the fqdn to the uuid in the image but this provide another way . thank you", "Question : I have a weird happening on my servers : .. . .. . Foreman is running as puppetmaster and is correct : .. . .. . On the two servers I have plugging in to it at the moment the majrelease is absent : .. . .. . Being new to foreman puppet I am not sure how to go about fixing this . I found an article asking the same question but the responses were all It should be there so I am sure I am doing something wrong Comment : For now I bypassed the problem by : package redhat-lsb : ensure installed Then : sed -i s operatingsystemmajrelease lsbmajdistrelease g init.pp But I would still like ot know how to fix it correctly. . Comment : Can you paste the output of facter -d from one of the afflicted boxen somewhere and add the link-to your answer Comment : Certainly - pastebin.com p6qJBEXY http : pastebin.com p6qJBEXY Comment : I have facter version 2.4.6 and am seeing the same issue . I ve noticed this line in facter -d : Found no suitable resolves of 1 for operatingsystemmajrelease .. . Answer : Your Facter version is ancient . Consider updating to at least 1.7 but see if you can get 2.1 or above .", "Question : I am sending data from puppet agent to master node . Here I use json array in my facters facts.d myData.json file . In master side I have a template . There I want to iterate this external fact json array . Can I do this thing inside puppet template How Can I iterate this array I tried following but failed .. . .. . Regards Malintha .. . Answer : Your template is essentially a Ruby scriptlet . To operate on JSON data from your ruby code you have to deserialize http : stackoverflow.com questions 9055096 from-json-to-a-ruby-hash it into a bona fide Ruby object . Note that your Array contains Hashes so your template needs to be structured differently anyway : Comment : I tried this and it gives following error executing puppet agent -test Error : Could not retrieve catalog from remote-server : Error 400 on SERVER : Failed to parse template config carbon.xml.erb : Filepath : usr lib ruby vendor ruby json common.rb Line : 155 Detail : can t convert nil into String at etc puppet modules config manifests init.pp : 16 on node puppetclient.localdomain Comment : Also note that I run facter -p on my client but it doesn t show any key employees . Is there any problem with my json Comment : No there is a problem with your fact . Solve that first . Comment : I have edited my json Comment : Please read up on External Facts . You cannot just dump your JSON data to etc facts.d . Facter expects to find executable scripts there that can very well output JSON data but it must be in a facter compliant fashion : docs.puppetlabs.com guides custom facts.html external-facts http : docs.puppetlabs.com guides custom facts.html external-facts", "Question : I ve just upgraded my puppet environment from 3.4.2 to 3.4.3 . through puppetlabs apt repos . I was upgrading agent s and master . Doing an agent run leads to following error : .. . .. . Nevertheless I retrieve a catalog from master so the agent run still works and seems to do the things it should do . Or let s say I acutally can t determine if something is going wrong that is related to the error message . However I want to get rid of the Error message . I double-checked version of puppet with puppet --version on agent and master . I use passenger for puppetmaster . Facter has version 2.0.1 . So what did I miss .. . .. . Addition : When running an agent with the previous version 3.4.2 there will be no error message . Any ideas Many thanks for your support . ITL Comment : I just upgraded a few minutes ago and am getting the same message . If I turn off pluginsync it goes away but obviously that s not a fix . Version : 3.4.3-1puppetlabs1 - Broken Client Version : 3.4.2-1puppetlabs1 - Working Client Comment : However it seems that everything is working as it should . The described behaviour occurs when updating from an older version . When installing puppetmaster from scratch tried 2 days ago on a test server everything looks fine . Nevertheless a solution would be very nice here as I don t want to reinstall or migrate my productive server . .. . Answer : The problem your encounter here comes from facter update and the way you use private facts with puppet on version 3.X with facter 2.X.when you want to distribute external facts that was my case . As said in facter 2.2 documentation you need to relocate your facter folder into module tree : .. . .. . The best way to distribute external facts is with pluginsync which added support for them in Puppet 3.4 Facter 2.0.1 . To add external facts to your puppet modules just place them in MODULEPATH MODULE facts.d . So in older versions the path for external facts was : .. . .. . MODULEPATH MODULE lib facter external fact.rb .. . .. . If you change it to : .. . .. . MODULEPATH MODULE facts.d external fact.rb .. . .. . Then you won t encounter the problem any more . Regards .. . .. . -- rustx", "Question : I m working on extending the puppetlabs-mongodb https : github.com puppetlabs puppetlabs-mongodb module to allow for user authentication https : github.com puppetlabs puppetlabs-mongodb issues 36 . The challenge is that mongo changed its mechanism for enabling user authentication between version 2.2 http : docs.mongodb.org v2.2 tutorial control-access-to-mongodb-with-authentication and version 2.4 http : docs.mongodb.org manual tutorial enable-authentication and so distinct code must be run in order to give a user authentication credentials to a database . My initial thought was to create a custom facter fact that basically captured the output of mongod --version but it appears that facter facts are loaded before the puppet manifest is executed . Is there a way to execute arbitrary code at run time during puppet execution so that I can access mongod --version and decide which method to use to enable user authentication Note : One approach would be to have puppet run a single script to create user credentials and have the script detect the mongod --version at runtime . This doesn t seem like a very puppet-y way of doing things but perhaps I am off base on that . What is the best way to handle the need for accessing variables dynamically in puppet facter .. . Answer : The word from @puppetlabs https : twitter.com deanmalmgren status 356795407659044867 is that you can not run ruby code or any other code dynamically during a puppet run . The right way to do this is in the note above with an exec statement that dynamically checks for the mongodb version . For details on the implementation see manifests add user.pp https : github.com deanmalmgren puppetlabs-mongodb blob 527742bc49677153e8aabde81f8137aebfc0ab8a manifests add user.pp and the associated templates add user .erb https : github.com deanmalmgren puppetlabs-mongodb tree 527742bc49677153e8aabde81f8137aebfc0ab8a templates . If anyone has a more puppety method for accomplishing this I d love to learn about it Comment : +1 for creating your own adjective", "Question : I m trying to populate a config file with a MAC address for a specified ethernet adapter . The name of the ethernet adapter e.g . eth1 is a parameter of my defined type . When I try to populate a config file through puppet with an erb template which accesses the macaddress facter fact that gives me the mac address for the eth0 interface which is the wrong one in this instance . How can I create a variable in my defined type which takes the value of facter macaddress ethernetinterface where ethernetinterface is defined by a parameter of the defined type .. . Answer : There is a whole family of macaddress facts one for each interface . In your template you can access the variable name that includes a parameter say interface like .. . .. . Future versions of Facter will supply a hash that will allow looking up MAC addresses per interface ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ruby
UNK_RELATION
mormot@targeting@124
mormot -- synopse mormot is an open-source client-server orm soa mvc frameworkfor delphi-6 up to delphi-10-seattle and fpc @placeholder windows linuxfor servers and any platform for clients including mobile or ajax .
{ "confidence": [ 56.564491271972656, 56.29777145385742, 53.2130012512207, 50.025238037109375, 48.82019805908203, 46.77754211425781, 46.551025390625, 45.47380065917969, 44.947113037109375, 44.560585021972656, 43.709293365478516, 41.87177658081055, 39.39802551269531, 39.39802551269531, 38.87996292114258, 37.256874084472656, 36.41933059692383, 36.40584182739258, 35.60820388793945, 34.80207824707031, 34.138328552246094, 32.943275451660156, 30.89063262939453, 30.635738372802734, 28.43018341064453, 28.118942260742188, 27.844646453857422, 26.17672348022461, 24.545425415039062, 24.49651336669922, 24.348590850830078, 24.20508575439453, 24.162660598754883, 23.479034423828125, 22.02193832397461, 21.941240310668945, 21.31625747680664, 21.088096618652344, 20.628694534301758, 20.516176223754883, 20.44720458984375, 20.399524688720703, 19.457538604736328, 19.227920532226562, 19.14174461364746, 19.045419692993164, 19.003829956054688, 18.55864143371582, 16.78342628479004, 15.894046783447266, 15.828829765319824, 15.415623664855957, 15.080689430236816, 15.080689430236816, 14.970937728881836, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.773350715637207, 14.622811317443848, 14.10997200012207, 14.003664016723633, 12.82091236114502, 12.82091236114502, 12.455389022827148, 12.370471954345703, 11.70724868774414, 11.59656810760498, 11.525653839111328, 11.525653839111328, 11.525653839111328, 11.525653839111328, 11.525653839111328 ], "content": [ "I m using Synopse mORMot http : synopse.info fossil wiki name Downloads to access a SQLite database from Delphi 7 .", "I made a mormot server and FMX client .", "I ve uploaded the full sample source code in our repository both the server-side application https : github.com synopse mORMot blob master SQLite3 Samples 31 20- 20WebSockets Project31ChatServer.dpr and the client-side https : github.com synopse mORMot blob master SQLite3 Samples 31 20- 20WebSockets Project31ChatClient.dpr .", "I m a new in mORMot .", "See also this sample https : github.com synopse mORMot blob master SQLite3 Samples 27 20- 20CrossPlatform 20Clients MobileClient.dpr and the associated generated client unit https : github.com synopse mORMot blob master SQLite3 Samples 27 20- 20CrossPlatform 20Clients mORMotClient.pas .", "I test mORMot component .", "I have tested Unigui as Web Server and i have used Mormot as DB Server .. . .. . I found this two framework amazing .. . .. . My Question : is there possibility to use Unigui to have beautiful Ajax Browser and mORMot as DB Server .. . .. . Cans I merge Unigui and mORMot in same Project", "Of course this work from Delphi 6 up to XE7 and also under Linux thanks to FPC or CrossKylix .", "But you can write a Client on all Delphi supported platforms by using some dedicated cross-platform client units and generate some code to consume the server ORM and SOA content .", "I don t have direct experience with rest servers but I see others use such approach : stackoverflow.com questions 32481966 http : stackoverflow.com questions 32481966 delphi-whats-wrong-with-rest-api-based-on-mormot", "We want to offer our customers the possibility having their databases in cloud hosted in our server .So clients are written in Delphi server is a http IOCP server written also in Delphi from mORMot framework for dbs we use Firebird embedded .", "General advantages of Delphi is mobile developing .", "Could you provide code examples which execute SQL queries without relying on the ORM functionality of mORMot", "@WoutervanNifterick I want that to me gave examples of SQL queries without ORM use in mORMot .", "Interesting how does mORMot strugle with the issue", "mORMot Framework www.synopse.info http : www.synopse.info have add support to WebSockets on pack there is also a demo about WebSockets sample 31 .", "Why I can t open demo with multi-tier server and mobile client", "As stated by the documentation http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 86 current version of the main framework units target only Win32 Win64 systems under Delphi and in a preliminary state Windows or Linux under FPC .", "I wish to establish a connection and query the database directly via SQL without using the ORM Object-relational mapping features of mORMot .", "I just tested it with Delphi Seattle 10 and the ODBC driver from http : ftp.postgresql.org pub odbc versions msi psqlodbc 09 03 0400.zip - with no problem .", "I m trying to compile the MobileMain demo https : github.com synopse mORMot tree master SQLite3 Samples 27 20- 20CrossPlatform 20Clients for Android and I get this error : .. . .. . Copy Error Unable to copy file library lib armeabi-v7a libMobileClient.so to debug libMobileClient.so .", "On the client-side you implement the IChatCallback callback interface : .. . .. . Then you subscribe to your remote service as such : .. . .. . If you compare with existing client-server SOA solutions in Delphi Java C or even in Go or other frameworks this interface-based callback mechanism sounds pretty unique and easy to work with .", "Instead of FireDAC consider using ZDBC Zeos in latest 7.2 7.3 branch which has nice features together with the native mORMot SynDB libraries http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 126 .", "It doesn t sound like it s anything to do with mORMOT just that the compiler can t find the unit FireDAC.Phys.MSSQL.Dcu .", "Where is normal mobile demo with DB client", "Publish the wrappers generator on the server compute your cross-platform client unit then use it directly .", "Something like a LAN chat between clients and server .", "In this sample the client send a message to server and this reply with a new message to client .", "The server can send message to single client by IP address .. . .. . Note : the IP address is used only to identify the client .", "I want to configure pretty simple access to my REST resource based on information http : synopse.info forum viewtopic.php id 1833 regarding REST routing in mORMot .", "Since you are using mORMot you can use the TSynLocker record or the IAutoLocker TAutoLocker interface class which fixes the TCriticalSection bug allows to protect a whole method in one call and uses the padding space to store some values which would be protected by the lock .", "The client send message to server and send also the IP address without waiting message from server .", "Well the error is clear you can t connect via ODBC this is not a delphi problem but a pure postgres configuration problem .", "To write an OSX or Mobile client using FMX for the UI do not use regular SynCommons.pas mORMot.pas units but the dedicated units as available in the CrossPlatform sub-folder .", "I compiled standart demo 28 - Simple RESTful ORM Server Run it and get an eror .", "This is a pretty straightforward way of implementing callbacks - in fact this is a good way of implementing SOLID callbacks on the server-side and the mORMot framework allows to publish this mechanism in a client-server way by using WebSockets .", "Those classes are used by the ORM but you can use those without the ORM .", "I m in process of upgrading our client-server ERP app to multi-tier .", "Isn t your job to set the servers ROOT redirects by calling HTTPServer.RootRedirectToURI api default and RESTServer.RootRedirectGet : api default .", "On the server-side each instance of this parameter would be in fact a fake class instance linked to the input connection able to call back the client via its interface methods .", "So you first define the callback interface and the service interface : .. . .. . Then on the server-side each call to IChatService.Join would subscribe to an internal list of connections : .. . .. . Then a remote call to the IChatService.BlaBla method should be broadcasted to all connected clients just by calling the IChatCallback.BlaBla method : .. . .. . Note that all the loop calls to IChatCallback.BlaBla would be made via WebSockets in an asynchronous and non blocking way so that even in case of huge number of clients the IChatService.BlaBla method won t block .", "I example was used MVC now I need only pure web-service.. .", "I ve written a blog article blog.synopse.info post 2015 04 06 http : blog.synopse.info post 2015 04 06 Asynchronous-Service-WebSockets 2C-Callbacks-and-Publish-Subscribe And also added some dedicated documentation which should be used as reference - see synopse.info files html http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 149", "Ensure your PostgreSQL server has been defined to run on the same port as expected by the source .", "No need to store the IP or whatever low-level implementation parameter by the way the IP would not be able to identify a connection in an unique manner : several clients may share the same IP .", "The following method will be called by the server when a client callback instance is released either explicitly or if the connection is broken so could be used to unsubscribe to the notification : .. . .. . On the server-side you define the service as such : .. . .. . Here the optExecLockedPerInterface option has been set so that all method calls would be made thread-safe so that concurrent access to the internal fConnected list would be safe .", "As such you may : .. . .. . Define one connnection per Firebird embedded database .. . Protect your SOA code via a mutex aka critical section per DB .", "For RAD consumption you would have to fill a TDataSet with the data by code or fill a string grid or other components with code from the objects returned by the client unit .", "...MVC features would not working directly - either would BE not working or would not WORK", "Connection pools are needed when several clients connect disconnect to the same DB over the network whereas here all is embedded and you would have direct access to the Firebird engine .", "And do you have a postgresql server running on your local machine", "AFAIK Firebird embedded does not have any connection .", "I have to create all ConnectionDef s before server starts serving requests", "I don t have to create all ConnectionDef s before server starts serving requests .", "Using Firedac acquiring a connection for any of those databases will be guarded by one TCriticalSection .", "I d like use this library to do this : .. . .. . 1 .", ".. . 2 .", "I can use also a unique name .", "I don t understand how edit the sample n . 31 to do it .", "This sample is based on interface .", "The link-to the framework should be synopse.info not .com", "In the mORMot framework asynchronous callbacks are implemented via interface parameters .", "In case of high numbers of messages the framework is even able to gather push-notification messages into a single message to reduce the resource use .", "It works on Win mode .", "Next I changed destination to Android and get an error .", "DCC Fatal Error SynCrtSock.pas 253 : F2613 Unit Contnrs not found unit SynCrtSock .", "It works good for Win but doesn t work for Android .", "How to make demo for iOS and Android", "So you can run a Server on those platforms .", "The documentation is pretty detailed about it .", "Mormot s documentation too big .", "I read demo with calculator but it s calculator .", "@AndyBirtman You do not need to read the whole pdf of course .", "Did you read the chapter I quote in my answer", "Damned if you do damned if you don t .", "There s not enough documentation .", "There s too much documentation .", "@Arnaud .", "It s interesting components but I don t understand .", "Main advantages of you tools is powerful data-access .", "and JSONToClientDataSet component is included in mORMotMidasVCL", "Please help to understand about routing and web-url of web-service below .", "I try to call follow web-urls : .. . .. . http : localhost : 8092 root AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService.GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService GetAirportDefinition .. . http : localhost : 8092 AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 AirportService.GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 AirportService GetAirportDefinition .. . .. . but every time I get : .. . .. . errorCode : 400 errorText : Bad Request .. . .. . or Bad request .. . .. . Where am I wrong", "A was wrong really urls below works as needed : .. . .. . http : localhost : 8092 root AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService.GetAirportDefinition AirPortID 1", "Could not find a part of the path library lib armeabi-v7a libMobileClient.so .", "How can I fix this and compile the demo", "In fact mORMot s HTTP IOCP server would run the incoming requests from a thread pool so ensure that all DB access is safely made .", "Code : .. . .. . error .. . .. . Message : TODBCLib error : 08001 Could not connect to the server nNo connection could be made because the target machine actively refused it . r n 127.0.0.1 : 5433 .. . .. . How to clear it .", "Even if your scenario seems simple because it s only one connection per database I think I need at least two of them because sometimes one client can acquire the connection for a longer period of time because has to synchronize a bigger change log since it was last time online .", "Yes it is perfectly possible .", "See http : synopse.info forum viewtopic.php id 1281", "What is correct way to connect to SQL Server and expose REST service", "Is there no any ability to configure convenient routing", "As you re using Sql Server the the driver link-to choose would be the TFDPhysMSSqlDriverLink which is on the FireDAC Links tab of the Component Palette .", "In short : it is better to use the SynDB.pas layer over SynSQLite3.pas via its SynDBSQLite3.pas classes since it will allow your code to work in the future with any database accessible via OleDB ODBC or even direct access e.g .", "Yes .", "PostgreSQL 9.4 .", "Did you install the ODBC driver can you connect with PGAdmin try to make an ODBC connection via ODBC datasources and test it out", "I instaled psqlodbc 09 03 0400 .", "I made new connection and tested it ." ] }
{ "confidence": [ 113.28711700439453, 92.49554443359375, 74.93726348876953, 62.463722229003906, 60.282264709472656, 58.19017028808594, 57.8408203125, 54.65632629394531, 50.303062438964844, 36.892730712890625, 33.80022430419922 ], "content": [ "Question : I m a new in mORMot . I made a mormot server and FMX client . It works on Win mode . Next I changed destination to Android and get an error . DCC Fatal Error SynCrtSock.pas 253 : F2613 Unit Contnrs not found unit SynCrtSock . It works good for Win but doesn t work for Android . How to make demo for iOS and Android .. . Answer : As stated by the documentation http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 86 current version of the main framework units target only Win32 Win64 systems under Delphi and in a preliminary state Windows or Linux under FPC . So you can run a Server on those platforms . But you can write a Client on all Delphi supported platforms by using some dedicated cross-platform client units and generate some code to consume the server ORM and SOA content . To write an OSX or Mobile client using FMX for the UI do not use regular SynCommons.pas mORMot.pas units but the dedicated units as available in the CrossPlatform sub-folder . The documentation is pretty detailed about it . See also this sample https : github.com synopse mORMot blob master SQLite3 Samples 27 20- 20CrossPlatform 20Clients MobileClient.dpr and the associated generated client unit https : github.com synopse mORMot blob master SQLite3 Samples 27 20- 20CrossPlatform 20Clients mORMotClient.pas . Comment : Mormot s documentation too big . I read demo with calculator but it s calculator . Where is normal mobile demo with DB client Comment : @AndyBirtman You do not need to read the whole pdf of course . Did you read the chapter I quote in my answer Publish the wrappers generator on the server compute your cross-platform client unit then use it directly . For RAD consumption you would have to fill a TDataSet with the data by code or fill a string grid or other components with code from the objects returned by the client unit . Comment : Damned if you do damned if you don t . There s not enough documentation . There s too much documentation . Comment : @Arnaud . It s interesting components but I don t understand . General advantages of Delphi is mobile developing . Main advantages of you tools is powerful data-access . Why I can t open demo with multi-tier server and mobile client Comment : and JSONToClientDataSet component is included in mORMotMidasVCL", "Question : mORMot Framework www.synopse.info http : www.synopse.info have add support to WebSockets on pack there is also a demo about WebSockets sample 31 . In this sample the client send a message to server and this reply with a new message to client . I d like use this library to do this : .. . .. . 1 . The client send message to server and send also the IP address without waiting message from server . .. . 2 . The server can send message to single client by IP address .. . .. . Note : the IP address is used only to identify the client . I can use also a unique name . Something like a LAN chat between clients and server . I don t understand how edit the sample n . 31 to do it . This sample is based on interface . Comment : The link-to the framework should be synopse.info not .com .. . Answer : No need to store the IP or whatever low-level implementation parameter by the way the IP would not be able to identify a connection in an unique manner : several clients may share the same IP . In the mORMot framework asynchronous callbacks are implemented via interface parameters . On the server-side each instance of this parameter would be in fact a fake class instance linked to the input connection able to call back the client via its interface methods . This is a pretty straightforward way of implementing callbacks - in fact this is a good way of implementing SOLID callbacks on the server-side and the mORMot framework allows to publish this mechanism in a client-server way by using WebSockets . So you first define the callback interface and the service interface : .. . .. . Then on the server-side each call to IChatService.Join would subscribe to an internal list of connections : .. . .. . Then a remote call to the IChatService.BlaBla method should be broadcasted to all connected clients just by calling the IChatCallback.BlaBla method : .. . .. . Note that all the loop calls to IChatCallback.BlaBla would be made via WebSockets in an asynchronous and non blocking way so that even in case of huge number of clients the IChatService.BlaBla method won t block . In case of high numbers of messages the framework is even able to gather push-notification messages into a single message to reduce the resource use . The following method will be called by the server when a client callback instance is released either explicitly or if the connection is broken so could be used to unsubscribe to the notification : .. . .. . On the server-side you define the service as such : .. . .. . Here the optExecLockedPerInterface option has been set so that all method calls would be made thread-safe so that concurrent access to the internal fConnected list would be safe . On the client-side you implement the IChatCallback callback interface : .. . .. . Then you subscribe to your remote service as such : .. . .. . If you compare with existing client-server SOA solutions in Delphi Java C or even in Go or other frameworks this interface-based callback mechanism sounds pretty unique and easy to work with . Of course this work from Delphi 6 up to XE7 and also under Linux thanks to FPC or CrossKylix . I ve uploaded the full sample source code in our repository both the server-side application https : github.com synopse mORMot blob master SQLite3 Samples 31 20- 20WebSockets Project31ChatServer.dpr and the client-side https : github.com synopse mORMot blob master SQLite3 Samples 31 20- 20WebSockets Project31ChatClient.dpr . Comment : I ve written a blog article blog.synopse.info post 2015 04 06 http : blog.synopse.info post 2015 04 06 Asynchronous-Service-WebSockets 2C-Callbacks-and-Publish-Subscribe And also added some dedicated documentation which should be used as reference - see synopse.info files html http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 149", "Question : I m using Synopse mORMot http : synopse.info fossil wiki name Downloads to access a SQLite database from Delphi 7 . I wish to establish a connection and query the database directly via SQL without using the ORM Object-relational mapping features of mORMot . Could you provide code examples which execute SQL queries without relying on the ORM functionality of mORMot Comment : What exactly is your question or what do you want us to tell you Comment : @WoutervanNifterick I want that to me gave examples of SQL queries without ORM use in mORMot . .. . Answer : In short : it is better to use the SynDB.pas layer over SynSQLite3.pas via its SynDBSQLite3.pas classes since it will allow your code to work in the future with any database accessible via OleDB ODBC or even direct access e.g . for Oracle . For instance using a variant for holding column data : .. . .. . So for your question read the SynDB-related part of the mORMot documentation and all the related blog articles http : blog.synopse.info tag SynDB . Those classes are used by the ORM but you can use those without the ORM . To start with there is a TQuery wrapper in SynDB.pas which works very well with SQLite3 and allow classic code-level programming . But there is not 100 RAD direct access with those units . Just some TClientDataSet fillers . This was not their purpose : they want fast and direct access to the DB in code not via the UI plumbing . Comment : SAD 1.18 Ch.25.4.2 . ...MVC features would not working directly - either would BE not working or would not WORK Comment : Just before the application exists add a call. . - EXITS", "Question : I test mORMot component . I compiled standart demo 28 - Simple RESTful ORM Server Run it and get an eror . Code : .. . .. . error .. . .. . Message : TODBCLib error : 08001 Could not connect to the server nNo connection could be made because the target machine actively refused it . r n 127.0.0.1 : 5433 .. . .. . How to clear it . Comment : And do you have a postgresql server running on your local machine Comment : Yes . PostgreSQL 9.4 . Comment : Well the error is clear you can t connect via ODBC this is not a delphi problem but a pure postgres configuration problem . Did you install the ODBC driver can you connect with PGAdmin try to make an ODBC connection via ODBC datasources and test it out Comment : I instaled psqlodbc 09 03 0400 . I made new connection and tested it . It works . Comment : And are you sure you are on port 5433 default port is 5432 .. . Answer : I just tested it with Delphi Seattle 10 and the ODBC driver from http : ftp.postgresql.org pub odbc versions msi psqlodbc 09 03 0400.zip - with no problem . Ensure your PostgreSQL server has been defined to run on the same port as expected by the source . Edit the 5433 value into 5432 if you used the default port-number . Being paranoid I try to always change the default port which reduces network-scan attacks at least from fast scan . I never use port 22 for ssh nor 5432 for PostgreSQL . Sorry for the inconvenience . Comment : Thanks a lot . PostgreSQL s default port is 5432 . Demo use 5433 . Comment : @AndyBirtman : thanks for giving feedback to my questions NOT.. . I asked you about the port 1 hour ago.. . Comment : @whosrdaddy Thanks for help . I opened my question and read answer . I didn t see your comment . Thanks a lot", "Question : I have tested Unigui as Web Server and i have used Mormot as DB Server .. . .. . I found this two framework amazing .. . .. . My Question : is there possibility to use Unigui to have beautiful Ajax Browser and mORMot as DB Server .. . .. . Cans I merge Unigui and mORMot in same Project .. . Answer : Yes it is perfectly possible . See http : synopse.info forum viewtopic.php id 1281", "Question : Please help to understand about routing and web-url of web-service below . I try to call follow web-urls : .. . .. . http : localhost : 8092 root AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService.GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService GetAirportDefinition .. . http : localhost : 8092 AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 AirportService.GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 AirportService GetAirportDefinition .. . .. . but every time I get : .. . .. . errorCode : 400 errorText : Bad Request .. . .. . or Bad request .. . .. . Where am I wrong Comment : Isn t your job to set the servers ROOT redirects by calling HTTPServer.RootRedirectToURI api default and RESTServer.RootRedirectGet : api default . I don t have direct experience with rest servers but I see others use such approach : stackoverflow.com questions 32481966 http : stackoverflow.com questions 32481966 delphi-whats-wrong-with-rest-api-based-on-mormot Comment : I example was used MVC now I need only pure web-service.. . .. . Answer : A was wrong really urls below works as needed : .. . .. . http : localhost : 8092 root AirportService GetAirportDefinition AirPortID 1 .. . http : localhost : 8092 root AirportService.GetAirportDefinition AirPortID 1", "Question : null .. . Answer : I m trying to compile the MobileMain demo https : github.com synopse mORMot tree master SQLite3 Samples 27 20- 20CrossPlatform 20Clients for Android and I get this error : .. . .. . Copy Error Unable to copy file library lib armeabi-v7a libMobileClient.so to debug libMobileClient.so . Could not find a part of the path library lib armeabi-v7a libMobileClient.so . How can I fix this and compile the demo", "Question : I m in process of upgrading our client-server ERP app to multi-tier . We want to offer our customers the possibility having their databases in cloud hosted in our server .So clients are written in Delphi server is a http IOCP server written also in Delphi from mORMot framework for dbs we use Firebird embedded . Our customers let s say 200 can have 25-30 Firebird databases total 5000-6000 databases accessed by 4-5 user per each customer . This is not happening all at once . One user can work in one db other 2 users can work in another db but all the dbs should be available and online . So I can have 800-1000 users working at 700-900 dbs . Databases are not big typically 20-30 MB each but can go to 200 MB . This is not data sharding so please don t suggest to merge all databases together I really need them individually with possibility to backup restore replace each one of them . So I need multiple pools of connections - for every database I need a pool of let s say 2 connections . I read about Firedac connection-pooling . It seems that TFDManager should be perfect for me . I define multiple ConnectionDef s with Pooled true and it can maintain multiple pools of connections each connection lasting until some minutes of inactivity . Questions : .. . .. . 1 . I have to create all ConnectionDef s before server starts serving requests 2 . Can TFDManager handle requests and time-out connections on inactivity while in other thread I need to create a new database so automatically I need to create a new pool of connections and start serving requests from newly created database . Practically can I call FDManager.AddConnectionDef . . while other pools are in use .. . Answer : AFAIK Firebird embedded does not have any connection . As its name states it is embedded within the same process so there is no connection pool needed . Connection pools are needed when several clients connect disconnect to the same DB over the network whereas here all is embedded and you would have direct access to the Firebird engine . As such you may : .. . .. . Define one connnection per Firebird embedded database .. . Protect your SOA code via a mutex aka critical section per DB . In fact mORMot s HTTP IOCP server would run the incoming requests from a thread pool so ensure that all DB access is safely made . Ensure you use at least Firebird 2.5 since the embedded version is told to be threadsafe only since revision 2.5 see the release notes http : www.firebirdsql.org en firebird-2-5-release-description . Instead of FireDAC consider using ZDBC Zeos in latest 7.2 7.3 branch which has nice features together with the native mORMot SynDB libraries http : synopse.info files html Synopse 20mORMot 20Framework 20SAD 201.18.html TITL 126 . Comment : Agree to disagree - connection pools are used to to facilitate acquiring a resource when normally creating establishing a new one will take time and or resources . Even attaching a local database file to the process like fbembed.dll does will take some time and resources - SQL privileges will be checked separate buffers will be allocated per every attachment even it s the same process and the same database file FB 2.5 . So connection-pooling apply here . Comment : Defining connections and protecting them with a critical section is not connection-pooling So why invent the wheel when there is available a tested one . Even if your scenario seems simple because it s only one connection per database I think I need at least two of them because sometimes one client can acquire the connection for a longer period of time because has to synchronize a bigger change log since it was last time online . Anyway your solution is good one because it has one critical section per db and Firedac will have one critical section per all databases .", "Question : I m in process of upgrading our client-server ERP app to multi-tier . We want to offer our customers the possibility having their databases in cloud hosted in our server .So clients are written in Delphi server is a http IOCP server written also in Delphi from mORMot framework for dbs we use Firebird embedded . Our customers let s say 200 can have 25-30 Firebird databases total 5000-6000 databases accessed by 4-5 user per each customer . This is not happening all at once . One user can work in one db other 2 users can work in another db but all the dbs should be available and online . So I can have 800-1000 users working at 700-900 dbs . Databases are not big typically 20-30 MB each but can go to 200 MB . This is not data sharding so please don t suggest to merge all databases together I really need them individually with possibility to backup restore replace each one of them . So I need multiple pools of connections - for every database I need a pool of let s say 2 connections . I read about Firedac connection-pooling . It seems that TFDManager should be perfect for me . I define multiple ConnectionDef s with Pooled true and it can maintain multiple pools of connections each connection lasting until some minutes of inactivity . Questions : .. . .. . 1 . I have to create all ConnectionDef s before server starts serving requests 2 . Can TFDManager handle requests and time-out connections on inactivity while in other thread I need to create a new database so automatically I need to create a new pool of connections and start serving requests from newly created database . Practically can I call FDManager.AddConnectionDef . . while other pools are in use .. . Answer : Looking at Firedac sources seems that all about adding connection definitions and acquiring connections in pooled mode is thread-safe . Adding a connection definition or matching one is guarded by a TMultiReadExclusiveWriteSynchronizer and acquiring a connection from the pool is guarded by a TCriticalSection . So answers : .. . .. . 1 . I don t have to create all ConnectionDef s before server starts serving requests . 2 . Yes I can call safely FDManager.AddConnectionDef . . while other pools are in use . Using Firedac acquiring a connection for any of those databases will be guarded by one TCriticalSection . The solution proposed by @Arnaud Bouchez presents a more grained access by creating one TCriticalSection per database and I think will scale better but you should be aware of a bug when using multiple TCriticalSection especially that all will be initiated at once : .. . .. . https : www.delphitools.info 2011 11 30 fixing-tcriticalsection .. . .. . In that article present a very simple fix for this bug . Comment : Since you are using mORMot you can use the TSynLocker record or the IAutoLocker TAutoLocker interface class which fixes the TCriticalSection bug allows to protect a whole method in one call and uses the padding space to store some values which would be protected by the lock . See TAutoLocker http : synopse.info files html api-1.18 SynCommons.html TAUTOLOCKER and TSynLocker http : synopse.info files html api-1.18 SynCommons.html TSYNLOCKER documentation .", "Question : I try to setup connection to SQL Server and catch the error .. . .. . Error message : .. . .. . Project app .exe raised exception class Exception with message Object factory for class 3E9B315B-F456-4175-A864-B2573C4A2101 is missing . To register it you can drop component TFDPhysXXXDriverLink into your project . What is correct way to connect to SQL Server and expose REST service .. . Answer : FireDAC is more helpful than some other frameworks in that when things go wrong the exception messages often say how to fix the problem . So in your case given that the message says you can drop component TFDPhysXXXDriverLink into your project the thing to try first would be to drop the relevant DriverLink component onto your form datamodule . As you re using Sql Server the the driver link-to choose would be the TFDPhysMSSqlDriverLink which is on the FireDAC Links tab of the Component Palette . If you re creating a Console application obviously there s no form or datamodule to drop the link on . In that case create it in code : Comment : It s great however I am using Console Application . What tricks should I perform in this case Comment : Create it in code I guess - see updated answer . Comment : Can t find this class : F2613 Unit FireDAC.Phys.MSSQL not found . Some kind of magic : . Interesting how does mORMot strugle with the issue Comment : It doesn t sound like it s anything to do with mORMOT just that the compiler can t find the unit FireDAC.Phys.MSSQL.Dcu . Find it manually on your h disk then edit your project s path to include the path to where you found it . Comment : I meant that neither Compiler nor I can t find this unit at the disk.. .", "Question : null .. . Answer : I want to configure pretty simple access to my REST resource based on information http : synopse.info forum viewtopic.php id 1833 regarding REST routing in mORMot . I need to call url as localhost api apservice station 1 but code below works only for calling as localhost api apservice station stationid stationid .. . .. . Please advise how can I correctly configure REST routing to my resources I need examples for : .. . .. . localhost api apservice station 1 - return details for station 1 .. . localhost api apservice station groups - return all groups from station .. . localhost api apservice customers aCustomerId reports orders aOrderNumber details Filter aDetailFilter Comment : Is there no any ability to configure convenient routing" ] }
[ "yes-answer-long", "yes-answer-short" ]
targeting
UNK_RELATION
xaml-2009@xaml@53
xaml-2009 -- xaml-2009 extends its prior version of @placeholder adding a few new features .
{ "confidence": [ 52.21717834472656, 51.251808166503906, 49.60699462890625, 45.61621856689453, 45.604461669921875, 37.424835205078125, 36.97156524658203, 35.66084671020508, 34.61896896362305, 34.33651351928711, 32.92174530029297, 32.92174530029297, 27.534122467041016, 25.96375846862793, 24.00079345703125, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 14.59410285949707, 11.352598190307617 ], "content": [ "+1 Referred to as XAML 2009 on Rob s blog here : blogs.windowsclient.net rob relyea archive 2009 06 01 http : blogs.windowsclient.net rob relyea archive 2009 06 01 xaml-using-generic-types-in-xaml-2009.aspx", "here http : blogs.windowsclient.net rob 5Frelyea archive 2009 06 01 xaml-using-generic-types-in-xaml-2009.aspx .", "Create a configuration file using XAML 2009 .", "Rob Relyea of the XAML team http : blogs.windowsclient.net rob 5Frelyea default.aspx has referred to the XAML implementation in .NET 4 as XAML 2009 e.g .", "Useful notes on XAML 2009 : http : wpftutorial.net XAML2009.html", "And what was the previous version of XAML as well as WPF", "Does it or anything else in .NET 4.6 Windows 10 support XAML 2009 six years after the fact", "One might expect the version of XAML to be encoded in the namespace however both VS 2008 and VS 2010 Beta 2 apply the same namespaces to XAML files : .. . .. . A loose xaml file reader would have no way of knowing which version of xaml was targeted .", "I don t think XAML in .NET 3.x had a version -- everyone just called it XAML and it had two implementations one for WPF and one for WF .", "However I understand that in .NET 4.0 WPF will still be using its own XAML implementation for most things rather than moving wholesale to the new common XAML implementation .", "WPF 4.0 is a buzzword these days which is the latest version of WPF I want to know what is the current version of XAML", "It appears that the same version of XAML may work for all the different versions of WPF as long as the object types encoded are present in that version .", "Easy way : .. . .. . Hard way but with less dependencies : .. . .. . Creating XAML from object graph : .. . .. . Notes : .. . .. . 1 .", "WPF never ended up supporting XAML 2009 https : msdn.microsoft.com en-us library ee792007 v vs.110 .aspx which is a shame because it added some useful extensions such as generic type parameters and complex x : Key values .", "It would look something like this : .. . .. . TM : Configuration .. . xmlns : x http : schemas.microsoft.com winfx 2006 xaml .. . xmlns : tm clr-namespace : Test.Monkey assembly Test.Monkey .. . .. . TM : Configuration.TargetFile xxxx TM : Configuration.TargetFile .. . TM : Configuration .. . .. . .. . 2 .", "EDIT : Added citation supplied by Kent Boogaart http : stackoverflow.com users 5380 kent-boogaart .", "The first generation is sometimes referred to as XAML2006 .", "In VS 2010 Beta 2 you can choose to target WPF 3.0 WPF 3.5 or WPF 4.0 .", "Ok so here s what I want to do .", "1 .", "Parse this file at runtime in order to get the object-graph .", "Fully qualify all namespaces .", "It has problem finding local assemblies by namespace only .", "2 .", "Consider using the ContentPropertyAttribute .", "3 .", "UWP seems to have built upon WPF ." ] }
{ "confidence": [ 60.30072784423828, 48.90281295776367, 44.23622131347656, 39.10797882080078 ], "content": [ "Question : WPF 4.0 is a buzzword these days which is the latest version of WPF I want to know what is the current version of XAML And what was the previous version of XAML as well as WPF .. . Answer : Rob Relyea of the XAML team http : blogs.windowsclient.net rob 5Frelyea default.aspx has referred to the XAML implementation in .NET 4 as XAML 2009 e.g . here http : blogs.windowsclient.net rob 5Frelyea archive 2009 06 01 xaml-using-generic-types-in-xaml-2009.aspx . I don t think XAML in .NET 3.x had a version -- everyone just called it XAML and it had two implementations one for WPF and one for WF . However I understand that in .NET 4.0 WPF will still be using its own XAML implementation for most things rather than moving wholesale to the new common XAML implementation . EDIT : Added citation supplied by Kent Boogaart http : stackoverflow.com users 5380 kent-boogaart . Comment : +1 Referred to as XAML 2009 on Rob s blog here : blogs.windowsclient.net rob relyea archive 2009 06 01 http : blogs.windowsclient.net rob relyea archive 2009 06 01 xaml-using-generic-types-in-xaml-2009.aspx Comment : The first generation is sometimes referred to as XAML2006 .", "Question : Ok so here s what I want to do . 1 . Create a configuration file using XAML 2009 . It would look something like this : .. . .. . TM : Configuration .. . xmlns : x http : schemas.microsoft.com winfx 2006 xaml .. . xmlns : tm clr-namespace : Test.Monkey assembly Test.Monkey .. . .. . TM : Configuration.TargetFile xxxx TM : Configuration.TargetFile .. . TM : Configuration .. . .. . .. . 2 . Parse this file at runtime in order to get the object-graph . .. . Answer : Easy way : .. . .. . Hard way but with less dependencies : .. . .. . Creating XAML from object graph : .. . .. . Notes : .. . .. . 1 . Fully qualify all namespaces . It has problem finding local assemblies by namespace only . 2 . Consider using the ContentPropertyAttribute . 3 . Useful notes on XAML 2009 : http : wpftutorial.net XAML2009.html", "Question : null .. . Answer : WPF never ended up supporting XAML 2009 https : msdn.microsoft.com en-us library ee792007 v vs.110 .aspx which is a shame because it added some useful extensions such as generic type parameters and complex x : Key values . UWP seems to have built upon WPF . Does it or anything else in .NET 4.6 Windows 10 support XAML 2009 six years after the fact", "Question : WPF 4.0 is a buzzword these days which is the latest version of WPF I want to know what is the current version of XAML And what was the previous version of XAML as well as WPF .. . Answer : One might expect the version of XAML to be encoded in the namespace however both VS 2008 and VS 2010 Beta 2 apply the same namespaces to XAML files : .. . .. . A loose xaml file reader would have no way of knowing which version of xaml was targeted . In VS 2010 Beta 2 you can choose to target WPF 3.0 WPF 3.5 or WPF 4.0 . It appears that the same version of XAML may work for all the different versions of WPF as long as the object types encoded are present in that version ." ] }
[ "yes-answer-long", "yes-answer-short" ]
xaml
UNK_RELATION
jackson-dataformat-xml@xml@165
jackson-dataformat-xml -- data format extension for jackson http : jackson.codehaus.org to offer alternative support for serializing pojos as xml and deserializing @placeholder as pojos .
{ "confidence": [ 68.10392761230469, 67.4066162109375, 65.21312713623047, 57.858306884765625, 54.252017974853516, 53.24072265625, 52.00556945800781, 51.51178741455078, 51.087650299072266, 49.969085693359375, 49.84967803955078, 48.65375900268555, 48.22417068481445, 47.970176696777344, 47.37045669555664, 46.241798400878906, 45.62014389038086, 45.13547897338867, 44.89942932128906, 44.55586242675781, 43.05029296875, 41.88282012939453, 41.839481353759766, 41.47014617919922, 41.47014617919922, 40.3173828125, 40.16490936279297, 40.16490936279297, 39.16716384887695, 38.685447692871094, 38.50048065185547, 37.95464324951172, 37.274112701416016, 37.274112701416016, 36.684654235839844, 36.623409271240234, 36.58489227294922, 35.287384033203125, 35.165992736816406, 35.165992736816406, 33.53360366821289, 33.20286560058594, 33.20286560058594, 33.20286560058594, 33.20286560058594, 33.20286560058594, 33.197723388671875, 33.197723388671875, 33.197723388671875, 32.75403594970703, 32.00138854980469, 32.00138854980469, 32.00138854980469, 32.00138854980469, 31.523456573486328, 31.320650100708008, 31.320650100708008, 30.790904998779297, 30.63150405883789, 29.863235473632812, 29.863235473632812, 29.863235473632812, 29.863235473632812, 29.803611755371094, 29.31291389465332, 27.90010643005371, 27.90010643005371, 27.90010643005371, 27.90010643005371, 27.90010643005371, 27.90010643005371, 25.35293197631836, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094, 23.874412536621094 ], "content": [ "We want to parse a complex XML document with JacksonXML jackson-dataformat-xml .", "Using Jackson for XML with jackson-dataformat-xml 2.6.4 how can I deal with attributes in a custom deserializer", "I m trying to convert POJO to XML using jackson-dataformat-xml .", "This is a known bug https : github.com FasterXML jackson-dataformat-xml issues 188 in Jackson s XML handling .", "I read this at github.com FasterXML jackson-dataformat-xml known-limitations https : github.com FasterXML jackson-dataformat-xml known-limitations Tree Model is only supported in limited fashion : specifically Java arrays and Collections can be written but can not be read since it is not possible to distinguish Arrays and Objects without additional information .", "You can also consider defining the XML element names using annotations https : github.com FasterXML jackson-dataformat-xml additional-annotations .", "Example given could be handled by Jackson as well as many other libraries JAXB XStream JibX -- in non-Jackson cases you d use those for XML Jackson for JSON output .", "Is there any way to create a pair of POJOs that will work for these four test cases", "My entities aren t real application entities these are just POJOs I create to put as payloads for REST requests.. .", "I am using jackson-dataformat-csv to convert POJO to CSV schema .", "My XML looks like .. . .. . I am using fasterxml-databind https : github.com FasterXML jackson-dataformat-xml to put this into Java Object .", "How do I get Jackson XML to JSON converter to output all child records in JSON", "Jackson How-To : Custom Deserializers http : wiki.fasterxml.com JacksonHowToCustomDeserializers :", "What is the correct way to handle this condition .I have looked into this https : github.com FasterXML jackson-dataformat-xml blob master src test java com fasterxml jackson-dataformat-xml jaxb JAXBObjectId170Test.java But I couldn t understand that", "I want to parse one XML File using XMLMapper of jackson faster xml and convert into a pojo class .", "For example if you add an element which is not an array in that XML color blue color for example Jackson throws an exception .", "I am deserializing input XML to generic Java class LinkedHashMap and then to JSON .", "I m trying to create a pair immutable POJOs to handle serialization and deserialization of XML that looks like the following : .. . .. . I need to be able to serialize and deserialize both an Outer containing a list of Inner s and an Inner by itself .", "When using data-binding POJOs it is possible to determine from Java type which one a particular XML element means -- if Java property is a List or array it has to be Array otherwise Object -- but when only telling mapper to map XML to java.util.Map there is no such distinction and default handling will essentially consider all XML Elements to indicate Objects .", "I was able to get the solution to this problem by using org.json http : mvnrepository.com artifact org.json json 20160212 API to convert source XML to JSONObject http : www.docjar.com docs api org json JSONObject.html and then to JSON by Jackson API .", "I believe if you declare the structure class you would be able to parse the XML but probably not generically using Maps and Lists as jackson does with JSON .", "I m having problems on serializing a list of Abstract object jackson duplicates wrapper on tags .", "How do I get Jackson s XMLMapper to read the name of the root xml element when deserializing", "Edit : This is using Jackson version 2.7.3", "Also what s your Jackson version", "I want to learn how to write pojo classes for deserializing xml file .", "It seems Jackson returns JsonToken.START OBJECT as the type and there is no way to know it s in fact an attribute .", ": .. . .. . This prints : .. . .. . Is there any Type that Jackson understands and that can handle arrays correctly", "This should be explained on README page of xml dataformat github project page .", "If I use jackson-dataformat-xml to serialise an ArrayList of JsonNode it produces the following : .. . .. . I d like to have it read : .. . .. . I ve tried using a custom serialiser and does give me the event tags I want but it also still wraps everything in an ArrayList item item ArrayList .. . .. . Any suggestions", "Code .. . .. . Source XML .. . .. . Output", "One of the values contains some HTML unencoded which Jackson is having problems with : .. . .. . The XML looks like this : .. . .. . My code works fine for all fields except this one my pojo code looks like : .. . .. . If I change lookupInfo to type Object I can see Jackson is mapping the raw data to a LinkedHashMap .. . With one entry BR null .. . .. . How can I force Jackson to serialize the raw value to String", "I m with spring-boot 1.2.2 with jackson 2.4.6 and with woodstox 4.4.1 .", "I am trying to deserialize the following string using the jackson .", "@Aman no I do not think it is possible to reliably convert from XML to JSON without having actual understanding of structure -- XML and JSON have different data models so you need to help with conversion .", "The code works perfectly for XML to JSON converter .", "While not a direct solution I would recommend trying out more recent Jackson version 2.7.4 ideally since there have been a few fixes to XML handling since 2.4 .", "This work for that particular XML but not for any one .", "I want to dynamically read the root element of input XML on deserialization to LinkedHashMap .", "I am using following code to convert my source XML to JSON .", "Let s say my XML is : .. . .. . Is there a Java built-in Type that I can use to deserialize this XML without requiring custom deserialization code", "Though my original question was to convert XML to Map but your answer was helpful in providing insight to what I need .", "I ended up converting my XML to JSON so I have edited my question accordingly .", "Code .. . .. . Source XML .. . .. . Actual Output .. . .. . Expected Output .. . .. . Any help shall be appreciated .", "Do you know about any other Java library for XML to JSON conversion that can address this issue", "So better way in my opinion is to define actual Java classes to map XML content to and then serialize instances as JSON .", "The problem is that your xml is invalid .", "On Json all is good but not in XML .", "There is no wrapper in your xml file .", "I d like something generic which would work for any XML .", "For some reason I send an object as payload and even though the annotation are Json s @JsonCreator @JsonProperty .. . it uses MappingJackson2XmlHttpMessageConverter to serialize this object to XML .", "Code .. . .. . Input XML .. . .. . Actual Output .. . .. . Expected Output Note : There is a root element named File present in JSON .. . .. . There s probably some switch somewhere to set it .", "However this code removes any multiple occurrence of child records in source XML and output JSON only contains last child record .", "The problem is that XML does not have distinction between concepts of Objects in JSON term that is collection of key-value pairs and Arrays ordered sequence of values without name .", "The idea is inspired from the solution http : stackoverflow.com questions 11747370 jackson-how-to-process-deserialize-nested-json 17312719 17312719 you mentioned but it is more general to unwrap any one property in a json object .", "I m trying to take an XML String and deserialize it into an object .", "you xml should look something like :", "I would much prefer to use a proper structure if there is any more complexity to your XML .", "Try writing it in uppercase just like in class body : .. . .. . Because jackson deserialization is case sensitive .", "XML File : .. . .. . For this file I want write Pojo class .", "I would like to avoid to write xml like this : .. . .. . but like this :", "Xml File : .. . .. . I just want Item tag s contain .", "However exception occurs when the XML deserialize to Page .. . .. . Following is the stacktrace :", "It s weird it gets your second item title and not your first .. . what happens if you annotate your list with Jackson annotations something like @JacksonXmlElementWrapper useWrapping false @JacksonXmlProperty localName item instead of the JAXB one", "XML .. . .. . The root will have n Page and Page will have n Object as well as n ObjectGroup and ObjectGroup will have n Object .. . .. . POJO .. . .. . SimpleRoot.java .. . .. . SimplePage.java .. . .. . SimpleObjectGroup.java .. . .. . SimpleObject.java .. . .. . I have used Jackson 2.7.4 for Conversion as follows .. . .. . On Conversion it says there are 2 objects and 1 objectgroup whereas it should be 3 objects .", "I have one xml file for that I m trying to desialize it but I m facing issues .", "Please help me how I can write pojo classes for this xml file", "A work-around is to change the annotation on inners in the Outer constructor so the local name is something not in the XML document .", "I have some XML being provided to me from an external system which I need to parse .", "if you want html content embedded within an xml element then you need to properly encode the content .", "if you are generating the content then any reasonable xml generator should handle that encoding for you .", "I keep getting this exception though : .. . .. . When it gets to this line : .. . .. . My XML contains : .. . .. . My object class member variable is : .. . .. . Is there anything wrong with this configuration that would cause the above exception", "Is there a way to force RestTemplate to use a certain HttpMessageConverter for a specific message", "Did you set Content-Type header to application json", "@MichalFoksa no obviously .", "but I rather use postForObject with my objects and not HttpEntity .", "is it possible", "Can you PLS post your client code", "@MichalFoksa .", "there you go .", "Response EmptyData response restClient.postForObject https : + deviceIP + jsonrpc loginRequest new ParameterizedTypeReference Response EmptyData", "loginRequest is a ParameterizedType with @JsonCreator and @JsonProperty @nnotations .", "Change to restClient.exchange and set Content-Type header to application json in order to explicitly request response in JSON .", "That s what I m trying to avoid.. .", "I m writing a wrapper to RestTemplate and I want to avoid another MediaType argument .", "probably impossible .", "Maybe you can avoid using @Json... . annotations .", "In that case your entities will be more independent .", "I see .", "Good luck then :", "Any help shall be appreciated .", "Sadly there is no flag for that .", "It can be done with a custom implementation of com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer .", "if you want you can edit my answer to reflect your question better.. .", "Thanks", "And since Objects can not have properties with duplicate names only one of the values last one is retained .", "There is no simple way to avoid that using XmlMapper : you will need custom handling of some sort .", "I understand the reason for this issue but can you share some ideas on how to do this custom handling", "This allows proper handling of list array values ." ] }
{ "confidence": [ 83.1444091796875, 80.45030212402344, 70.52057647705078, 68.49506378173828, 68.05062103271484, 66.84912109375, 61.93388748168945, 61.27043914794922, 58.18543243408203, 57.940834045410156, 56.29717254638672, 56.086090087890625, 54.96635437011719, 51.69545364379883, 51.59617614746094, 50.095558166503906, 43.31480407714844, 39.899627685546875, 38.373779296875, 37.24303436279297 ], "content": [ "Question : I m trying to create a pair immutable POJOs to handle serialization and deserialization of XML that looks like the following : .. . .. . I need to be able to serialize and deserialize both an Outer containing a list of Inner s and an Inner by itself . I can create a serializer for this with no problem but my deserializer fails with the exception com.fasterxml.jackson.databind.JsonMappingException : Duplicate property Inners for simple type class BrokenTest Outer .. . .. . Here are the unit tests for the passing serialization and failing deserialization : .. . .. . I can get a different exception com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException : Unrecognized field Inners class BrokenTest Outer not marked as ignorable 2 known properties : Foo Inner if I change the @JacksonXmlProperty annotation on Outer s constructor to use the localName Inner instead of Inners . Is there any way to create a pair of POJOs that will work for these four test cases Edit : This is using Jackson version 2.7.3 Comment : sorry about the obviously wrong answer I was paying too much attention to JUnit s actual result which in your tests is the expected result . I will delete the answer . Comment : One strange thing I came across was that when you change the annotation on inners in the Outer constructor to @JacksonXmlProperty localName XXX namespace NAMESPACE final List Inner inners all tests pass . But you should double-check that Comment : You re right it works . That is very strange . Pleas make thais an answer so I can accept it . .. . Answer : This is a known bug https : github.com FasterXML jackson-dataformat-xml issues 188 in Jackson s XML handling . A work-around is to change the annotation on inners in the Outer constructor so the local name is something not in the XML document . Here is an version of the unit tests that works :", "Question : I am using following code to convert my source XML to JSON . However this code removes any multiple occurrence of child records in source XML and output JSON only contains last child record . How do I get Jackson XML to JSON converter to output all child records in JSON Code .. . .. . Source XML .. . .. . Actual Output .. . .. . Expected Output .. . .. . Any help shall be appreciated . Thanks .. . Answer : The problem is that XML does not have distinction between concepts of Objects in JSON term that is collection of key-value pairs and Arrays ordered sequence of values without name . When using data-binding POJOs it is possible to determine from Java type which one a particular XML element means -- if Java property is a List or array it has to be Array otherwise Object -- but when only telling mapper to map XML to java.util.Map there is no such distinction and default handling will essentially consider all XML Elements to indicate Objects . And since Objects can not have properties with duplicate names only one of the values last one is retained . There is no simple way to avoid that using XmlMapper : you will need custom handling of some sort . Comment : I understand the reason for this issue but can you share some ideas on how to do this custom handling Do you know about any other Java library for XML to JSON conversion that can address this issue Comment : @Aman no I do not think it is possible to reliably convert from XML to JSON without having actual understanding of structure -- XML and JSON have different data models so you need to help with conversion . So better way in my opinion is to define actual Java classes to map XML content to and then serialize instances as JSON . This allows proper handling of list array values . Example given could be handled by Jackson as well as many other libraries JAXB XStream JibX -- in non-Jackson cases you d use those for XML Jackson for JSON output .", "Question : null .. . Answer : Using Jackson for XML with jackson-dataformat-xml 2.6.4 how can I deal with attributes in a custom deserializer For example : .. . .. . How can I know the current token is actually an attribute I don t understand how XmlTokenStream.XML ATTRIBUTE NAME works . It seems Jackson returns JsonToken.START OBJECT as the type and there is no way to know it s in fact an attribute .", "Question : Let s say my XML is : .. . .. . Is there a Java built-in Type that I can use to deserialize this XML without requiring custom deserialization code For example if I use a Map Object Object only one element is kept the other one is overwritten : .. . .. . This prints : .. . .. . Is there any Type that Jackson understands and that can handle arrays correctly .. . Answer : In your specific case you could use .. . .. . output : someArray 111 222 . I would much prefer to use a proper structure if there is any more complexity to your XML . Output .. . .. . 111 222 .. . .. . Alternatively use an array Comment : This work for that particular XML but not for any one . For example if you add an element which is not an array in that XML color blue color for example Jackson throws an exception . I d like something generic which would work for any XML . Thanks for the help though Comment : Where do you wish to add the color element I believe if you declare the structure class you would be able to parse the XML but probably not generically using Maps and Lists as jackson does with JSON . I read this at github.com FasterXML jackson-dataformat-xml known-limitations https : github.com FasterXML jackson-dataformat-xml known-limitations Tree Model is only supported in limited fashion : specifically Java arrays and Collections can be written but can not be read since it is not possible to distinguish Arrays and Objects without additional information .", "Question : If I use jackson-dataformat-xml to serialise an ArrayList of JsonNode it produces the following : .. . .. . I d like to have it read : .. . .. . I ve tried using a custom serialiser and does give me the event tags I want but it also still wraps everything in an ArrayList item item ArrayList .. . .. . Any suggestions Thanks . Comment : Did you try writeObjectFieldStart events method . Comment : Yeah I get an error saying java.lang.RuntimeException : com.fasterxml.jackson.core.JsonGenerationException : Can not write a field name expecting a value .. . Answer : You can also consider defining the XML element names using annotations https : github.com FasterXML jackson-dataformat-xml additional-annotations . Here is an example : .. . .. . Output :", "Question : null .. . Answer : XML .. . .. . The root will have n Page and Page will have n Object as well as n ObjectGroup and ObjectGroup will have n Object .. . .. . POJO .. . .. . SimpleRoot.java .. . .. . SimplePage.java .. . .. . SimpleObjectGroup.java .. . .. . SimpleObject.java .. . .. . I have used Jackson 2.7.4 for Conversion as follows .. . .. . On Conversion it says there are 2 objects and 1 objectgroup whereas it should be 3 objects . What is the correct way to handle this condition .I have looked into this https : github.com FasterXML jackson-dataformat-xml blob master src test java com fasterxml jackson-dataformat-xml jaxb JAXBObjectId170Test.java But I couldn t understand that", "Question : null .. . Answer : We want to parse a complex XML document with JacksonXML jackson-dataformat-xml . One of the nodes contains HTML - or at least a fragment - and shall be parsed as String or even Document or Node .. . .. . What would be the easiest way to get hold of the content within value as one of the Types above .. . .. . We tried a lot like directly addressing the element as Node as well as custom Deserializer but so far without success : .. . .. . The Exception is : .. . .. . This would be the same with String . Comment : there is no such annotation as @JacksonXmlProperties perhaps you meant @JacksonXmlProperty Comment : Thanks @sharonbn - corrected the example code", "Question : How do I get Jackson s XMLMapper to read the name of the root xml element when deserializing I am deserializing input XML to generic Java class LinkedHashMap and then to JSON . I want to dynamically read the root element of input XML on deserialization to LinkedHashMap . Code .. . .. . Input XML .. . .. . Actual Output .. . .. . Expected Output Note : There is a root element named File present in JSON .. . .. . There s probably some switch somewhere to set it . Any help shall be appreciated . .. . Answer : Sadly there is no flag for that . It can be done with a custom implementation of com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer . Jackson How-To : Custom Deserializers http : wiki.fasterxml.com JacksonHowToCustomDeserializers : Comment : Though my original question was to convert XML to Map but your answer was helpful in providing insight to what I need . The code works perfectly for XML to JSON converter . Comment : if you want you can edit my answer to reflect your question better.. . Comment : I ended up converting my XML to JSON so I have edited my question accordingly . Thanks", "Question : I am using following code to convert my source XML to JSON . However this code removes any multiple occurrence of child records in source XML and output JSON only contains last child record . How do I get Jackson XML to JSON converter to output all child records in JSON Code .. . .. . Source XML .. . .. . Actual Output .. . .. . Expected Output .. . .. . Any help shall be appreciated . Thanks .. . Answer : I was able to get the solution to this problem by using org.json http : mvnrepository.com artifact org.json json 20160212 API to convert source XML to JSONObject http : www.docjar.com docs api org json JSONObject.html and then to JSON by Jackson API . Code .. . .. . Source XML .. . .. . Output", "Question : My XML looks like .. . .. . I am using fasterxml-databind https : github.com FasterXML jackson-dataformat-xml to put this into Java Object . I have bunch of DTOs but the place it fails to create object is in .. . .. . where UserActivity looks like .. . .. . the way I use it to create Object is .. . .. . When I run this I get .. . .. . What is wrong here .. . Answer : In my case .. . .. . localName user activity was not honored for some reason . The way I solved it is following .. . .. . The naming convention is not something I want but I will live for now", "Question : I have some XML being provided to me from an external system which I need to parse . One of the values contains some HTML unencoded which Jackson is having problems with : .. . .. . The XML looks like this : .. . .. . My code works fine for all fields except this one my pojo code looks like : .. . .. . If I change lookupInfo to type Object I can see Jackson is mapping the raw data to a LinkedHashMap .. . With one entry BR null .. . .. . How can I force Jackson to serialize the raw value to String I ve tried with @JacksonXmlText and that results in lookupInfo being null . .. . Answer : The problem is that your xml is invalid . if you want html content embedded within an xml element then you need to properly encode the content . if you are generating the content then any reasonable xml generator should handle that encoding for you . you xml should look something like :", "Question : null .. . Answer : I m trying to convert POJO to XML using jackson-dataformat-xml . The idea is that the parent class would contain a collection of child classes that implement the same interface . Here are my entities .. . .. . And this is ultimately what I would like to achieve .. . .. . What it s producing before .. . .. . I m not even sure why it s adopting the method name rather than the classname of the elements inside of the collection . Next I tried adding @JacksonXmlElementWrapper useWrapping false over the getItems method putting it over the cars private variable didn t do anything and putting @JacksonXmlRootElement localName Toyota Honda to each of the respectful classes . What I got was : .. . .. . Close but not exactly what I want . Here are my dependencies", "Question : Is there a way to force RestTemplate to use a certain HttpMessageConverter for a specific message For some reason I send an object as payload and even though the annotation are Json s @JsonCreator @JsonProperty .. . it uses MappingJackson2XmlHttpMessageConverter to serialize this object to XML . Comment : Did you set Content-Type header to application json Comment : @MichalFoksa no obviously . but I rather use postForObject with my objects and not HttpEntity . is it possible Comment : Can you PLS post your client code Comment : @MichalFoksa . there you go . Response EmptyData response restClient.postForObject https : + deviceIP + jsonrpc loginRequest new ParameterizedTypeReference Response EmptyData Comment : loginRequest is a ParameterizedType with @JsonCreator and @JsonProperty @nnotations . .. . Answer : Change to restClient.exchange and set Content-Type header to application json in order to explicitly request response in JSON . Comment : That s what I m trying to avoid.. . I m writing a wrapper to RestTemplate and I want to avoid another MediaType argument . probably impossible . Comment : Maybe you can avoid using @Json... . annotations . In that case your entities will be more independent . Comment : My entities aren t real application entities these are just POJOs I create to put as payloads for REST requests.. . Comment : I see . Good luck then :", "Question : null .. . Answer : I m having problems on serializing a list of Abstract object jackson duplicates wrapper on tags . Here are some results that I obtain : .. . .. . or when i remove the @JsonTypeInfo use JsonTypeInfo.Id.NAME include JsonTypeInfo.As.WRAPPER OBJECT visible true from my abstract-class i obtain : .. . .. . This is nearly good but i want the type in the tag . something like : .. . .. . Here are my objects : .. . .. . All extends class have differents properties but are configured like VisibilityGroup . I m with spring-boot 1.2.2 with jackson 2.4.6 and with woodstox 4.4.1 . On Json all is good but not in XML . Any idea on how to solve the problem thanks Comment : Try removing JsonTypeInfo.As.WRAPPER OBJECT Comment : While not a direct solution I would recommend trying out more recent Jackson version 2.7.4 ideally since there have been a few fixes to XML handling since 2.4 . As to solution you will want to disable wrapping of List values using @JacksonXmlElementWrapper useWrapping false . There is also a setting in XmlMapper to change the default for wrapping to be false . Comment : @reos : this doesn t help it gets the good way but childs tag name isn t good . I m getting : obliged obliged type regex attribute isMemberOf pattern Qxxxsdfsdf E obliged type regex attribute isMemberOf pattern Qaaaabbbbb E obliged type regex attribute isMemberOf pattern Qcccdddeeee E obliged Comment : @StaxMan : I want the wrapper because i need the parent tag obliged for list values but i doesn t want a wrapper around each values inside the list Comment : Same behaviour with spring-boot 1.2.8 and jackon 2.7.4 the problem is that all values of list are wrapped", "Question : null .. . Answer : I want to parse one XML File using XMLMapper of jackson faster xml and convert into a pojo class . I m done through that but at the end I m facing problem . Xml File : .. . .. . I just want Item tag s contain . But problem is I am getting only 2nd Item tag s contain . Rss.java : .. . .. . Channel.java : .. . .. . Item.java : .. . .. . Main.java : .. . .. . Output : .. . .. . Please help me to Identify why it giving output like this first it must be print 1st Title and then 2nd Title instead of that why this code is giving such a output . Thanks in Advance . Comment : Why do you use @XmlElementWrapper on your Item list There is no wrapper in your xml file . Comment : @DimpreJean-S bastien I removed this after posting after removing this same result will be coming.. . Comment : It s weird it gets your second item title and not your first .. . what happens if you annotate your list with Jackson annotations something like @JacksonXmlElementWrapper useWrapping false @JacksonXmlProperty localName item instead of the JAXB one Comment : @DimpreJean-S bastien It is giving same output for that also...Something is missing into that is not recognize . I m still searching for the solution.. . Comment : Hmmm have you tried to fully initialise an RSS object and serialized it to see if the resulting file is correct If this is a mapping problem serialization might reveal the problem . Also what s your Jackson version", "Question : null .. . Answer : I am using jackson-dataformat-csv to convert POJO to CSV schema . Sample of POJO s are : .. . .. . Pg class .. . .. . Parking class .. . .. . I am using following snippet of code to convert it into .CSV .. . .. . It is adding only outer class fields as a parameters : .. . .. . user.csv contains : .. . .. . However it supposed to be like this : .. . .. . How can I do it If parking has also an inner class then it will add and goes on .", "Question : I m trying to deserialize this XML into a Parts object : .. . .. . Car.java : .. . .. . I don t see anything wrong with my code though so why does it keep giving me the following Comment : make inner classes static will be an easy fix cowtowncoder.com blog archives 2010 08 entry 411.html http : www.cowtowncoder.com blog archives 2010 08 entry 411.html .. . Answer : Try writing it in uppercase just like in class body : .. . .. . Because jackson deserialization is case sensitive .", "Question : null .. . Answer : I want to learn how to write pojo classes for deserializing xml file . I have one xml file for that I m trying to desialize it but I m facing issues . XML File : .. . .. . For this file I want write Pojo class . Please help me how I can write pojo classes for this xml file previously I tried to write pojo class but I m facing some exception . My pojo classes like this : .. . .. . Rss.java .. . .. . Channel.java : .. . .. . Item.java : .. . .. . Please help me to Identify what is wrong in this code", "Question : I am trying to deserialize the following string using the jackson . This the response from the openfire rest apis . I am having problem with the wrapper object wrapping the arrays . Here .. . .. . I tried this http : stackoverflow.com a 17312719 2450410 to unwrap the container but not getting success . I don t think writing wrapper classes is good idea Since I will have to write several wrapper classes .Also I need the generalized solution so i can use it with other responses since the apis is having other responses in the similar wrapped objects format . Thanks in advance . .. . Answer : You can create a custom annotation with @JsonDeserialize inside and create a custom JsonDeserializer that implements ContextualDeserializer . The idea is inspired from the solution http : stackoverflow.com questions 11747370 jackson-how-to-process-deserialize-nested-json 17312719 17312719 you mentioned but it is more general to unwrap any one property in a json object . Following is the custom annotation using @JacksonAnnotationsInside as annotation container contains @JsonDeserialize : .. . .. . and the custom JsonDeserializer that implements ContextualDeserializer : .. . .. . and the usage example : .. . .. . @JsonProperty is to locate the wrapper object and @JsonUnwrappProperty is to deserialize the json object and extract a property into the annotated field . Edited : .. . .. . Following is an example with ObjectMapper : .. . .. . Output : .. . .. . moderator participant visitor .. . .. . sanjeet@shahanshah Comment : I tried the way you suggested and I am getting following exception- W System.err : com.fasterxml.jackson.databind.JsonMappingException : was java.lang.NullPointerException through reference chain : com.sked.jacksonparsingexample.entity.MyBean broadcastPresenceRoles Comment : Caused by : java.lang.NullPointerException 07-31 23 : 43 : 13.920 24840-24840 com.sked.jacksonparsingexample W System.err : at com.sked.jacksonparsingexample.util.JsonUnwrapPropertyDeserializer.deserialize J sonUnwrapPropertyDeserializer.java : 33 Comment : I have directly copied the classes you have given and I have tried with the json string with two properties only . Comment : Also I have already tried the link you have given Getting the same exception @Wilson Comment : I added an example for your reference . Hope this can help .", "Question : I m trying to deserialize this XML into a Parts object : .. . .. . Car.java : .. . .. . Parts.java : .. . .. . Part.java : .. . .. . I don t see anything wrong with my code though so why does it keep giving me the following Comment : Did you not read my comment about after some other changes it needed a constructor with a single String value .. . On your old question http : stackoverflow.com questions 36943511 how-do-i-serialize-deserialize-csv-properly .. . Answer : You need to disable use of wrapped lists to match the structure . This should be explained on README page of xml dataformat github project page . Comment : Thanks . I added @JacksonXmlElementWrapper useWrapping false above private List Part Part new ArrayList but still kept getting the issue . Finally found that @JsonProperty Part above the getter and setter in Parts had to be lower case @JsonProperty part . Any ideas why this was the case" ] }
[ "yes-answer-long", "yes-answer-short" ]
xml
UNK_RELATION
freebase@api@134
freebase -- freebase is a large google owned community-edited general knowledge semantic database that can be accessed via a restful @placeholder which will shut down june 30 2015 .
{ "confidence": [ 48.859046936035156, 47.98493957519531, 47.50907897949219, 46.24217987060547, 43.29753112792969, 43.29231262207031, 43.18731689453125, 42.49314498901367, 42.354034423828125, 42.13691711425781, 41.545528411865234, 41.32960510253906, 41.32960510253906, 41.31153106689453, 40.978485107421875, 40.95502853393555, 40.89335632324219, 40.89335632324219, 40.622257232666016, 40.58560562133789, 39.57371520996094, 39.463356018066406, 39.463356018066406, 39.38039016723633, 39.38039016723633, 39.38039016723633, 39.321990966796875, 39.28120422363281, 39.28120422363281, 39.26457595825195, 39.248260498046875, 39.184478759765625, 39.12044906616211, 38.937278747558594, 38.86345672607422, 38.76932907104492, 38.76932907104492, 38.72428512573242, 38.373863220214844, 38.32128143310547, 38.32128143310547, 38.17779541015625, 38.1434326171875, 38.13837432861328, 37.897911071777344, 37.865013122558594, 37.76654052734375, 37.7336540222168, 37.17719268798828, 37.17719268798828, 37.16954040527344, 37.116065979003906, 37.116065979003906, 37.09278106689453, 36.963871002197266, 36.806617736816406, 36.806617736816406, 36.806617736816406, 36.7617073059082, 36.7617073059082, 36.67295455932617, 36.66331481933594, 36.64553451538086, 36.44758987426758, 36.44758987426758, 36.44758987426758, 36.44758987426758, 35.983665466308594, 35.93427658081055, 35.88506317138672, 35.884437561035156, 35.819671630859375, 35.75202178955078, 35.75202178955078, 35.75202178955078, 35.68995666503906, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.601402282714844, 35.55738830566406, 35.55738830566406, 35.55738830566406, 35.36467361450195, 35.17111587524414, 35.15386199951172, 34.88994598388672, 34.75578308105469, 34.75578308105469, 34.73064422607422, 34.59746551513672 ], "content": [ "So even though Google shut down Freebase when you ping the YouTube API it still tags the videos using Freebase IDs .", "It was mentioned on the google freebase page", "Freebase has been read-only for many months and will soon be shut down .", "The Freebase data dumps are still available https : developers.google.com freebase freebase-rdf-dumps or you can use the online Knowledge Graph Search API https : developers.google.com knowledge-graph which accepts the same IDs .", "How to use new Google credentials for Freebase registration", "Google has promised a 3 month transition period after the availability of the new APIs before they shut down Freebase .", "https : developers.google.com freebase freebase-rdf-dumps", "Freebase has been shut down so attempting to access that isn t going to work and the data was not transferred to Wikidata .", "I know that Google Refine project can use Freebase as a repository and it can write data to Freebase but for me it take a time to find a way how it work .", "I can t see it at developers.google.com freebase https : developers.google.com freebase", "Yes this is the correct way to attribute Freebase .", "Take a look at the freebase-quad-rdfize http : code.google.com p freebase-quad-rdfize project on Google Code .", "I m working on building a C program to read the RDF data in the Google Freebase data dump https : developers.google.com freebase data .", "You could query Freebase with the Wikipedia info see the Freebase API docs https : developers.google.com freebase .", "I was using Freebase to get all movies films there for my website but it s getting shut down soon .", "Are there any existing ways of using the freebase data dumps to create a database similar to what freebase offers but on you own server", "According to Freebase there are 760 000 of them .", "Is there any library to parse Freebase", "Jquery - PHP - Freebase - JSON Freebase - JSON with new format", "I would like to develop a Freebase java application that lets you browse Freebase .", "I want to search the google Api freebase .", "I want to loop through the MySQL results which is an array of Freebase MIDs and I want the output to be the names of the Freebase article", "However there is no documentation wrt migration of images from freebase which were available through Freebase usercontent API to Wikidata .", "I want to annotate the corpus using freebase types .", "But almost every instance in freebase has several types .", "The Freebase data dumps are in RDF format not JSON .", "it was possible in freebase .", "I try to work with Freebase repository .", "Is there a list that shows all the namespace in freebase", "Since I need to query for like 26G data and there is limitation for query of freebase and also freebase is shutting down I am thinking about downloading all the data on freebase and query offline .", "There is a data dump for the deleted triples https : developers.google.com freebase data freebase-deleted-triples so if you combine them that would tell you which topics were edited the most but not who edited them .", "However Freebase has links to DBpedia on sameAs.org http : sameas.org store freebase so you can use DBpedia spotlight and then resolve the IDs back to Freebase that data is also available in the Freebase RDF dumps https : developers.google.com freebase data .", "You should access Freebase through google url : https : www.googleapis.com freebase v1 search q bob key YOUR API KEY", "Hopefully i can develop a useful mobile Freebase application based on this .", "You can look up their names using the Freebase MQLRead or Search APIs and they re also included in the Freebase data dumps .", "Plus the freebase API will get shut down on 31st of August and I was hoping for an update on the KG API .", "As I earlier mentioned the Freebase Topic API will get shut down on 31st of August so that s not reliable at the moment .", "Basically what they want is : .. . .. . if you reference a single topic your attribution should include a link-to the equivalent Freebase topic .. . if you link-to multiple topics or derive general info from Freebase you should link-to the Freebase home page .", "Freebase looks great .", "Thank you but freebaseapps.com had been working fine since freebase shutdown and it is not part of Google s freebase", "I want to extract all companies from the Freebase dump https : developers.google.com freebase .", "I am trying to use the freebase word embeddings released by Google but I have a hard time getting the words from the freebase name .", "Is it that freebase requires much more memory than google news", "I don t know for certain about the date but Freebase was announced earlier this year as being shutdown by Jun 30 2015 for some services .", "Any best practices for migrating knowledge graph use cases from freebase", "UPDATE : The Google Knowledge Graph Search API https : developers.google.com knowledge-graph became available in December 2015 and provides support for looking things up by KG ID which is the same as the old Freebase ID used by YouTube .", "How many bios and images are they in freebase", "In addition maybe there is some reliance on semantic information coming from Freebase .", "Both Wikidata and Google Knowledge Graph do not contain all Freebase entries so its not clear if there will be a full replacement solution .", "Like you found in my playing around with Google Knowledge Graph it appears to not include all Freebase entries either .", "So is there an alternative to Wikidata and Freebase", "I used the Freebase v1 in query statement but no results .", "I trying to use freebase for my project .", "The MQLread https : developers.google.com freebase v1 mql-overview and Search https : developers.google.com freebase v1 search-overview APIs can both be used to filter Freebase topics to a specific type e.g .", "Google deprecated their Freebase Search API and is transferring things over to Wikidata however there appears to be no replacement for their Freebase Search API https : developers.google.com freebase v1 search-overview that : .. . .. . Autosuggesting entities e.g .", "After a while playing round with the properties in freebase I tried adding on the following to my freebase query .", "https : groups.google.com forum topic freebase-discuss WEnyO8f7xOQ .. . .. . The only source for this information now is the Freebase data dump .", "The Freebase Topic API https : developers.google.com freebase v1 topic-overview contains the bulk of what you re looking for .", "I went with Freebase : Thanks again .", "pleased to meet you Freebase user .", "Good day .. . .. . how can I obtain the topic text description in Freebase", "As part of the Freebase retirement announcement https : plus.google.com 109936836907132434202 posts bu3z2wVqcQc Google said that they would be offering a couple of new Knowledge Graph APIs and that there would be a 3 month overlap between the availability of these new services and the shutdown of Freebase .", "Let s say I need to download all the data related to medicine drugs and from Freebase to store in my own database .", "I want to use freebase dump to query notable types .", "I ll definitely mention in the description of my app that it uses Freebase data .", "I m trying to retrieve the full topic description summary for some Freebase articles .", "Is there a way to use some Freebase API to obtain the article s full description", "Also the Google Knowledge Graph Search API https : developers.google.com knowledge-graph now seems to be the intended replacement for the Freebase Search API .", "Google was consulted as well as stackoverflow and some checking around on freebase .", "It s easy to map from both of those EN Wikipedia IDs to a Freebase topic and it s various identifiers including the MID using either the Freebase API or the Freebase data dumps .", "I have any Freebase mid such as : m 0mgcr which is The Offspring .", "There s a good but now bitrotted guide to MQL at mql.freebaseapps.com http : mql.freebaseapps.com Experimentation will get you a long way once you ve got your head around MQL or try asking questions on the freebase-discuss list lists.freebase.com mailman listinfo freebase-discuss http : lists.freebase.com mailman listinfo freebase-discuss", "I have downloaded the Freebase dump from https : developers.google.com freebase data hl en but I am confused about the relation of the file .", "I have downloaded the Freebase dump from https : developers.google.com freebase data hl en and I want to extract type of or IS A relations from it e.g .", "I found a new API from here and it works well : developers.google.com freebase v1 search-overview https : developers.google.com freebase v1 search-overview", "I also came across some of the question on SO which are - .. . .. . Freebase python http : stackoverflow.com questions 17783772 freebase-python .. . Multiple Queries in MQL on Freebase http : stackoverflow.com questions 10413875 multiple-queries-in-mql-on-freebase .. . .. . But they seems to be using the old API which is api.freebase.com .", "https : developers.google.com freebase v1 rdf-overview .", "There is currently no equivalent project for named-entity-recognition in Freebase .", "Those strings are Freebase identifiers specifically MIDs not names .", "Pretty much freebase but locally and not through the API", "is BaseKB exanding beyond Freebase DBpedia data", "I figured this out and this was due to memory requirement of freebase .", "I am working on Freebase http : freebase.com .", "If I want to extract the electronic products subset of Freebase .", "Possible duplicate of How to read Freebase RDF data", "freebase contains a lot of the same information you re looking for .", "https : www.googleapis.com freebase v1 topic en woody allen", "I m trying to receive data from the Freebase API .", "I am trying to work with Freebase data dumps .", "How are indirect objects represented in Freebase", "I am trying to write to freebase .", "Try using Freebase API key .", "There s a very large warning box on Google s API documentation pages and the Freebase web site .", "What I want now is to essentially create a very simple Freebase clone for storing content that may not belong on Freebase itself but can be described using the Freebase schema .", "EDIT 2 : .. . .. . I ve recently found this webpage which seems to cover all types of licensing for Freebase .", "On the other hand Freebase with its semantic representation of the data provides ways of connecting bits of information in powerful ways .", "I am looking for a way to construct a freebase mql query that will return a list of names of popular commonly searched on google-people .", "Google doesn t provide search query popularity rankings through any of the Freebase APIs .", "You can t do it via MQL but the Freebase Search API returns topics in ranked fashion .", "A good news for freebase dump users is that Freebase now offer RDF dump now : http : wiki.freebase.com wiki Data dumps ." ] }
{ "confidence": [ 69.55642700195312, 69.39015197753906, 63.16321563720703, 60.00012969970703, 59.37305450439453, 59.15816879272461, 58.536376953125, 58.143192291259766, 58.122802734375, 57.60970687866211, 55.974647521972656, 55.77898406982422, 55.2182502746582, 54.386863708496094, 53.73760986328125, 53.42475891113281, 53.22582244873047, 53.14702606201172, 51.876251220703125, 51.107479095458984 ], "content": [ "Question : I am using the youtube API https : developers.google.com youtube v3 docs videos list to retrieve the freebase topic details of particular videos . Since freebase is closing down https : plus.google.com 109936836907132434202 posts 3aYFVNf92A1 how do I use wikidata https : www.wikidata.org wiki Wikidata : Primary sources tool to query for a specific topic id For example the following topic id m 0181lj should give the following information .. . .. . m 0181lj http : i.stack.imgur.com 3QTBo.png .. . .. . I have tried playing with the wikidata REST API https : github.com google primarysources tree master backend but I haven t found a request which matches what I need . Update .. . .. . Freebase have released the Knowledge graph https : plus.google.com 109936836907132434202 posts iY8NZGFF6DN which allows you to query via topicId as so .. . .. . https : kgsearch.googleapis.com v1 entities : search ids m 0181lj key API KEY limit 5 indent True https : kgsearch.googleapis.com v1 entities : search ids m 01mpvdt key 5BAPI KEY 5D limit 5 indent True .. . .. . However some ids don t seem to be returning data e.g . the following music genres m 05fqyx m 02w1p3 .. . .. . As an alternative freebase can be downloaded https : developers.google.com freebase data but I haven t tried that just yet Comment : Thanks the update is helpful BTW For anyone looking you can get an API key here : console.developers.google.com apis api kgsearch.googleapis.com https : console.developers.google.com apis api kgsearch.googleapis.com overview .. . Answer : There isn t a Wikidata equivalent to the Freebase Suggest Search or Topic APIs . They ve got a beta SPARQL endpoint that you could use to painfully roll your own replacement for Freebase Topic details below but if you don t have an immediate need to migrate you might consider waiting until the new promised Knowledge Graph equivalents are available . Google has promised a 3 month transition period after the availability of the new APIs before they shut down Freebase . But you need to decide how willing you are to trust them . The other advantage to delaying the transition is that it gives the Wikidata folks more time to get their act together and build some usable APIs . Of course you need to be able to live with the fact that Freebase is read-only . If you want to roll your own Wikidata query for Freebase IDs you can use the following query as a starting point : .. . .. . TinyURL to query editor http : tinyurl.com otdc78s .. . .. . You can get back JSON results by sending the query to the API endpoint with this base URL https : query.wikidata.org bigdata namespace wdq sparql format json query https : query.wikidata.org bigdata namespace wdq sparql format json query followed by your URL encoded query .. . .. . TinyURL to API call http : tinyurl.com nfcp2rh Comment : Awesome thanks . Do you know per chance when freebase will be going totally offline I know it is now read only but couldn t find anything about it being totally shutdown.. . Comment : June 30 2015 or three months after they release the new APIs which are now something like 6 months late whichever is later . Which reminds me the new APIs are another alternative . KG Search KG Suggest or whatever they call them will likely be drop-in replacements for their Freebase equivalents . I ll edit my answer . Comment : KG Search is here Comment : Yup it s documented here : developers.google.com knowledge-graph https : developers.google.com knowledge-graph but I don t think they ll start the 3 month clock until the Knowledge Graph Suggest widget is available as well since those are the two APIs they promised . THINK being the operative word -- that s just a guess .", "Question : So even though Google shut down Freebase when you ping the YouTube API it still tags the videos using Freebase IDs . Is there a place I can go to now to match these IDs to their topics .. . Answer : The Freebase data dumps are still available https : developers.google.com freebase freebase-rdf-dumps or you can use the online Knowledge Graph Search API https : developers.google.com knowledge-graph which accepts the same IDs . e.g . https : kgsearch.googleapis.com v1 entities : search ids m 01mpvdt key API KEY limit 5 indent True https : kgsearch.googleapis.com v1 entities : search ids m 01mpvdt key API KEY limit 5 indent True", "Question : In what useful way can I use Google Knowledge Graph API at the moment Let s say I have the MID for 1990 FIFA World Cup which is m 014nm .. . .. . and I make this request : .. . .. . GET https : kgsearch.googleapis.com v1 entities : search ids 2Fm 2F014nm key https : kgsearch.googleapis.com v1 entities : search ids 2Fm 2F014nm key MY API KEY .. . .. . I ll get something like this http : pastebin.com M1fgj7Ew .. . .. . Now how can I use that information in a meaningful way Just a description and a wikipedia link is not that comprehensive . How can I find out what other entities are linked to this one in the graph If I search on Google for 1990 World Cup I ll get a Knowledge Graph card like this one enter image description here http : i.stack.imgur.com fN0S9.png .. . .. . Here I can clearly see useful information like Best Player and Goals scored so Google has to have other entities linked to 1990 FIFA World Cup in the knowledge graph . Comment : It seems that your dpaste link is broken . Comment : have you figured this I could not find how to do it either . it was possible in freebase . Comment : No I haven t @jamborta . Plus the freebase API will get shut down on 31st of August and I was hoping for an update on the KG API . .. . Answer : Google does not expose additional facts from its knowledge graph so you d have to get data from an outside source . To my knowledge there are no complete sources that are available . There are incomplete ones such as Wikidata DBPedia and loads of the Freebase dump data . Youtube has a Freebase Topic API https : developers.google.com youtube v3 guides searching by topic you can search for videos and channels by Knowledge Graph id . Comment : As I earlier mentioned the Freebase Topic API will get shut down on 31st of August so that s not reliable at the moment .", "Question : Youtube API v3 enables developers to retrieve specific information regarding a particular video among the returned data a part called topicDetails can be requested as per the following example : .. . .. . The topicIds field comes machine encoded and topic information can be retrieved through the Freebase API using this identifiers which is being deprecated . I was unable to locate any update on YouTube documentation regarding the impact of freebase API deprecation and as I manage a large node.js code base that relies heavily on YouTube topicDetails I would like to ask if there is any known programatic alternative to recover topic information from stable sources other than Freebase .. . Answer : As part of the Freebase retirement announcement https : plus.google.com 109936836907132434202 posts bu3z2wVqcQc Google said that they would be offering a couple of new Knowledge Graph APIs and that there would be a 3 month overlap between the availability of these new services and the shutdown of Freebase . Presumably Google services like YouTube which depend on Freebase MIDs will transition to these new services will transition to the new API perhaps with unchanged identifiers but not much is known concretely because a Google is overdue with the new APIs and b they haven t said anything else about the transition process . UPDATE : The Google Knowledge Graph Search API https : developers.google.com knowledge-graph became available in December 2015 and provides support for looking things up by KG ID which is the same as the old Freebase ID used by YouTube .", "Question : I have been using OpenRefine 2.6 Beta 1 w o problems since its release and later with the reconciliation service at : .. . .. . http : reconcile.freebaseapps.com reconcile .. . .. . However in the past fee days I have not been able to use it all . If I go to the URL : .. . .. . http : reconcile.freebaseapps.com .. . .. . and type the multiple query : .. . .. . I obtain : .. . .. . But if I try a simple query : .. . .. . I get : .. . .. . Any insights into what s happening with the reconciliation service Is there any other service I could use to replace freebaseapps.com Thanks .. . Answer : I don t know for certain about the date but Freebase was announced earlier this year as being shutdown by Jun 30 2015 for some services . Maybe service is intermittent until full shutdown Sorry this answer probably doesn t help much . Comment : Thank you but freebaseapps.com had been working fine since freebase shutdown and it is not part of Google s freebase Comment : Ah my apologies . I assumed freebaseapps.com was part of the services being shut down . Were you able to figure out what happened Comment : Thank you . No I don t know what s going on . Maybe @magdmartin knows what s happening", "Question : As stated in this documentation : Search with Freebase Topics https : developers.google.com youtube v3 guides searching by topic null and in the available video https : www.youtube.com watch v wf 77z1H-vQ as well the YouTube Data API v3 offers certain Freebase MIDs when using topicDetails as an argument for part . My question is how can I use those returned topics for things like getting all videos that are related to that topic which is offered as an example in the video as well considering that the Freebase API is not available at the moment and it will be shut down in the future For example for m 0410tth the Google Knowledge Graph doesn t return anything when making a request to : .. . .. . GET https : kgsearch.googleapis.com v1 entities : search ids 2Fm 2F0410tth .. . .. . and for Wikidata I still haven t found an easy way to use their data . I know that not all of the information from Freebase has been included into GK graph and I also know that there is a file for mappings between Freebase s MIDs and Wikidata s QIDs but they don t seem to help me right now . How should I make use of the topicIDs that YouTube offers me and how can I correlate them with other YouTube videos at the moment This question is not about how to use Freebase MIDs for Wikidata searching it s about the official Google response on how to make use of the relevantTopicIds that their API is offering since the documentation doesn t offer any insights into that . .. . Answer : I m not sure what your actual question is but the current situation is this : Freebase is deprecated but YouTube Data API v3 still references it and video s topicDetails part returns relevant topics in a form of Freebase identifiers . While I know of no consistent way of labeling those since Freebase has been shut down you can still use them to find relevant YouTube videos based on the identifiers alone . So for example : .. . .. . Which returns : .. . .. . I happen to know m 0qsc46 is the topicId for The Witcher 3 game I want other videos about that so I just use YouTube search method : .. . .. . Unfortunately AFAIK there is no way to build queries combining more than one topic . I expect some replacement for Freebase topicIds to appear in YTD API within a few months . Comment : Thanks for the response The question was mainly to have an official Google response on how could I use those topics now and in the future as well based on the fact that the Freebase API will be shut down as of 31st of Aug . Also in that YouTube video they state a future work including Taxonomies . Right now the topicDetails part doesn t include topicIds every time just relevantTopicIds and also almost all of those MIDs don t appear when searching on the knowledge graph . Comment : Unfortunately you re unlikely to get an official response . In a private e-mail exchange with one of YouTube s Technical Account Managers I was assured a year ago or something like that that they ll surely roll out a a fully working replacement for Freebase in YouTube API before shutting it down but now it seems not to be their priority.. .", "Question : I am using the youtube API https : developers.google.com youtube v3 docs videos list to retrieve the freebase topic details of particular videos . Since freebase is closing down https : plus.google.com 109936836907132434202 posts 3aYFVNf92A1 how do I use wikidata https : www.wikidata.org wiki Wikidata : Primary sources tool to query for a specific topic id For example the following topic id m 0181lj should give the following information .. . .. . m 0181lj http : i.stack.imgur.com 3QTBo.png .. . .. . I have tried playing with the wikidata REST API https : github.com google primarysources tree master backend but I haven t found a request which matches what I need . Update .. . .. . Freebase have released the Knowledge graph https : plus.google.com 109936836907132434202 posts iY8NZGFF6DN which allows you to query via topicId as so .. . .. . https : kgsearch.googleapis.com v1 entities : search ids m 0181lj key API KEY limit 5 indent True https : kgsearch.googleapis.com v1 entities : search ids m 01mpvdt key 5BAPI KEY 5D limit 5 indent True .. . .. . However some ids don t seem to be returning data e.g . the following music genres m 05fqyx m 02w1p3 .. . .. . As an alternative freebase can be downloaded https : developers.google.com freebase data but I haven t tried that just yet Comment : Thanks the update is helpful BTW For anyone looking you can get an API key here : console.developers.google.com apis api kgsearch.googleapis.com https : console.developers.google.com apis api kgsearch.googleapis.com overview .. . Answer : Both Wikidata and Google Knowledge Graph do not contain all Freebase entries so its not clear if there will be a full replacement solution . Freebase includes many entries that Wikipedia does not for example it contains automatically created entries for a large corpus of creative works books songs TV shows etc its unlikely Wikidata would contain such data in the near future . Also Wikidata is importing entries from Freebase manually so it could be a very long time before all entries are matched with their corresponding Wikidata items . Like you found in my playing around with Google Knowledge Graph it appears to not include all Freebase entries either . It looks like it doesn t include some abstract concepts like m 0m1xv talk show . I haven t found this documented so its not clear to me whether this is intentional or perhaps a beta issue .", "Question : I hope this is the right place to ask this question . I am attempting to attribute Freebase but this website : https : www.freebase.com policies attribution .. . .. . Does not produce any HTML code or image . My question is : How do I give proper attribution to Freebase in a mobile app Specifically iOS . Or is the citation included in the API response sufficient Example : .. . .. . EDIT : .. . .. . I ve tried to access the website via Safari Mozilla Firefox and Google Chrome . All of which do not show any HTML code or image . EDIT 2 : .. . .. . I ve recently found this webpage which seems to cover all types of licensing for Freebase . Although I think some of the content is outdated . http : legal.stefanomazzocchi.user.dev.freebaseapps.com licensing .. . Answer : Looks like they were the victim of their own API decommissioning . If you look at the information returned by the Topic API it includes attribution information for the given topic . Basically what they want is : .. . .. . if you reference a single topic your attribution should include a link-to the equivalent Freebase topic .. . if you link-to multiple topics or derive general info from Freebase you should link-to the Freebase home page . if you re writing an academic paper you cite the original Bollacker et al paper on Freebase . Of course not only am I not your lawyer or Google s lawyer but I m not a lawyer at all and this communication does not establish a client-lawyer relationship . : - Comment : Thank you very much Tom . Your answer is greatly appreciated Comment : Yes this is the correct way to attribute Freebase . If you can link-to Freebase from some credits or help section of your app that would be sufficient . We d also appreciate a mention of Freebase data in the app-store but that s up to you . Comment : I ll definitely mention in the description of my app that it uses Freebase data .", "Question : I want to extract all companies from the Freebase dump https : developers.google.com freebase . However multiple instances appear to be missing in the dump . For example Volkswagen m 07ywl seems to be not included . I searched for the MID using the following regex but could not find any results : .. . .. . The MID should be valid since it is stated on the corresponding Wikidata page https : www.wikidata.org wiki Q246 and is the top result for Volkswagen when searching for it using the Knowledge Graph API : .. . Answer : That entity exists in freebase-rdf-2015-04-19-00-00.gz so I d be pretty surprised if it didn t exist in the final dump from a few months later 2015-08-09 since the database was write-locked for all except a few Google admins . My first guess would be that you have a truncated or corrupted download . Did you check the length and MD5 checksum after download Comment : Sorry for the late followup . Can you show me how you searched for the entity I tried zgrep 07ywl on the freebase-rdf-2015-04-19-00-00.gz dump and did not retrieve any results . Comment : time zgrep 07ywl freebase-rdf-2015-04-19-00-00.gz vw-07ywl.txt real 86m51.942s user 84m33.558s sys 0m39.977s wc -l vw-0 1344 vw-07ywl.txt Did you check the length and checksum after downloading Comment : They don t publish checksums . However the size of the archive looks good and I tested that the compression is not corrupt using gunzip -t . Comment : Not sure how else to check things . Despite the crappy the formatting the gist of it is that my copy of that file has 1334 triples that match that pattern . This is on OS X but I d be surprised if zgrep behaved differently on other platforms .", "Question : I am trying to access the mqlread API from Freebase but am getting a Not Found 404 : .. . .. . Obviously when I run my python file I get : .. . .. . What am I doing wrong with the API I ve read things about mqlread being deprecated what is the parallel-for my quest to get all statistical regions the mids in Freebase .. . Answer : It was deprecated over a year ago . It was finally shut down May 2 . https : groups.google.com forum topic freebase-discuss WEnyO8f7xOQ .. . .. . The only source for this information now is the Freebase data dump . https : developers.google.com freebase freebase-rdf-dumps", "Question : I use Freebase data dump as core dataset for my travel application . Cities may have one or more associated images identified by MIDs the freebase identifier for all things . I was able to use the following API call as suggested in Stackoverflow here http : stackoverflow.com questions 16638494 google-freebase-api-how-to-get-url-of-image 16639466 16639466 newreg b335c9ccbe874cb38baf6065af026aab to show up the images in my applications which was working fine till yesterday .. . .. . https : usercontent.googleapis.com freebase v1 image m 044k8 h maxwidth 500 maxheight 500 mode fillcropmid https : usercontent.googleapis.com freebase v1 image m 044k8 h maxwidth 500 maxheight 500 mode fillcropmid .. . .. . However I knew that Freebase is being shut down and being migrated to Wikidata . However there is no documentation wrt migration of images from freebase which were available through Freebase usercontent API to Wikidata . Therefore I was unable to migrate from the deprecated Freebase UserContent API as above till date . However the above API and all Freebase APIs including the Freebase website stopped working today and I am left high and dry have some investor demos scheduled this week as Travel Application is pretty much useless without images . Any ideas if the images user content referred to in freebase has been migrated to Wikidata and any pointers to documentation would be very very useful Any help would be useful .. . Answer : Images have not been migrated . As a matter of fact almost no Freebase data has been migrated to Wikidata but that s a different story . Some Wikidata items do have Freebase IDs and some also have links to images in Wikimedia Commons so the intersection of these two sets may give you a relatively straightforward path forward . In the mean time be sure to preserve your cache of images so you can at least limp along you were caching right . Comment : thx much.. . Will try that So just to confirm there is no way you could get to the usercontent which was supported by the freebase API .. . Right Foolish me... . wasn t caching at all.. . never got the resources to do that.. . just escaped me", "Question : Google deprecated their Freebase Search API and is transferring things over to Wikidata however there appears to be no replacement for their Freebase Search API https : developers.google.com freebase v1 search-overview that : .. . .. . Autosuggesting entities e.g . Freebase Suggest Widget .. . Getting a ranked list of the most notable entities with a given name . Finding entities using Search Metaschema . Moreover it would also take in malformed strings and correct them and return nice detailed relevancy rankings along with the associated freebase topic id . I can t find anything in their Custom Search API that returns any information relevant to their or any other knowledge graph . Ideally would like something that I can query similar to this and returns a result like they used to : .. . .. . For example a query of Nirvana in the Freebase Search API would return : .. . .. . Note the relevance and Freebase mid . Essentially are there any alternatives out there either open-source or commercial that replaces this much needed functionality .. . Answer : I ve used the Prismatic Interest graph API https : github.com Prismatic interest-graph for somewhat similar functionality . My use-case was a bit different tagging documents with topics but looking at their API endpoints http : docs.interest-graph.getprismatic.com you might be able to duplicate the functionality you described above with a query to topic search http : docs.interest-graph.getprismatic.com default get topic search search for topics that match a search string and a query to topic topic http : docs.interest-graph.getprismatic.com default get topic topic to search for similar topics sorted by score . Edit .. . .. . As David notes in the comments below the Prismatic Interest Graph API has been discontinued . Also the Google Knowledge Graph Search API https : developers.google.com knowledge-graph now seems to be the intended replacement for the Freebase Search API . Comment : This doesn t seem like it does the trick as there s no way for it to associate the topics with the general web to figure out what is most relevant based on the general world . Not looking for basic string-matching looking for intelligent definitive matching . Unless I m mistaken See the Nirvana example cited above . Comment : Prismatic has recently discontinued the service .", "Question : I would like to access user edit history for freebase to see what pages were edited most often over the past couple of years and by whom . I have downloaded the freebase data dump but I can t find an indication that it contains edit history or timestamps . Is this data part of the dump or is it somewhere else If it is part of the dump what subject or predicate id s would I need to search for .. . Answer : This data is not currently available in the data dumps . There are currently over 2 billion facts in Freebase so publishing a history of edits would be a lot of data . There is a data dump for the deleted triples https : developers.google.com freebase data freebase-deleted-triples so if you combine them that would tell you which topics were edited the most but not who edited them . Comment : Do you know if there is any way of contacting Google for this data It would be for an academic research project at my university .", "Question : I am looking for a way to construct a freebase mql query that will return a list of names of popular commonly searched on google-people . Currently if I do a simple query like : .. . .. . I get .. . .. . Is there a way to modify the query in a way that will sort the elements by their google-search rank or any other measure of popularity .. . Answer : You can t do it via MQL but the Freebase Search API returns topics in ranked fashion . The default scoring algorithm uses how well linked a topic is https : developers.google.com freebase v1 search-cookbook scoring-and-ranking . Google doesn t provide search query popularity rankings through any of the Freebase APIs .", "Question : I am using Youtube Analytics API . In the response I get the topics of channel as Freebase TopicIds . Since the Freebase API is deprecated now how can I get the topic names to corresponding ids I had a look at the Google Graph Search API mentioned as an alternative to freebase api . https : developers.google.com knowledge-graph typical use cases . But I am not sure if we can get topic names from topic ids using this API . .. . Answer : Use the ids parameter with the Knowledge Graph API Search API . https : developers.google.com knowledge-graph reference rest v1", "Question : I m trying to build a query to fetch instances of any subclasses of abstract elements such as human Q5 by name however the query fails with a timeout probably because it has too many nodes to traverse in the graph . 1 . Are there any better methods to query this The best I could come up with is using the Wikidata API search entities endpoint https : www.wikidata.org w api.php action wbsearchentities with the element name then filter the desired results in Sparql query to minimize the domain of the query instead of the whole graph . 2 . I m a little worried about using this method in a production environment since Wikidata Sparql is in Beta . Any best practices for migrating knowledge graph use cases from freebase Is there any update regarding the migration of data from Freebase to Wikidata Finally are there any other mature alternatives to the deprecated Freebase service Comment : In a production environment use your own SPARQL endpoint and load the Wikidata into it . Anything else doesn t make sense as do not have any control over it s availability . Comment : Isn t there an external production service alternative Maintaining an in-house wikidata mirror also doesn t make sense for the extent I need from the service . Comment : What means external production Indeed you can use the public SPARQL endpoint but it s hosted for free and you do not pay anything for what you get . Thus you can not give rise to any claims . Hosting such a service costs money and you know that you re not the only one using it . In addition you can t make it faster as you have to rely on the hardware that they use for hosting the service . Comment : I mean a paid alternative . Will Google Knowledge Graph be better in terms of reliability and the extend of the data Is there any other suggestion Comment : This is a bit of a plug so therefore not an answer but perhaps a cloud service like Ontotext S4 http : s4.ontotext.com would fit your need . They offer cloud instances of GraphDB as well as access to hosted versions of various open datasets . Not sure Wikidata is in there but if it s not I m sure you can ask them about it . .. . Answer : What endpoint are you querying against Querying against a shared public endpoint with no SLA beta or not for a production service is very risky proposition . Wikidata offers full database dumps that you can tailor subset and load into whatever infrastructure you like . That would give you complete control over performance quality and any other metrics which are important to you . As far as migrating from Freebase goes there is no migration path . The track that train was on has come to an end at least for external non-Google users . It s not just deprecated it was shut down completely a while ago . A tiny fraction of the data was imported to Wikidata and they shared a bunch in common already due to their common ancestor Wikipedia but none of the programmatic features such as MQL s JSON query-by-example Freebase Search Freebase Suggest Google-scale performance or availability etc is available yet for Wikidata . If the data is important to you you should self-host using whatever infrastructure meets your needs . Comment : I m using query.wikidata.org sparql https : query.wikidata.org sparql endpoint . Maintaining an in-house wikidata incurs overhead of constantly updating the data . Is there a better alternative than Wikidata with wider data perhaps Google Knowledge Graph is a more comprehensive and more reliable alternative Also do you have any insights on the method I used to query all humans with a given name", "Question : I have downloaded the Freebase dump from https : developers.google.com freebase data hl en .. . .. . I know the format of the dump is subject predicate object ..but I am confused about the relation of the file.Now i have 2 questions below : .. . .. . 1 . If I want to extract the electronic products subset of Freebase . which including some main properties such as produced by product type etc.For example : In the subset a record of iphone contains iphone s designing company generations etc . I try to use cygwin to exact it how can I write the zgrep script 2 . If I ve gotten this subset in .gz format how can i query the specified topic using sparql or other effecient codig language in windows enviroment . For example : querying iphone s informations about design company . I know even the subset is a large RDF file can i achieve it I really need someon tell me if i can do it or not thanks . .. . Answer : Since the Freebase web site is still alive despite the threats to shut it down the first thing I d do is check to see if it s likely to have the information that you want : .. . .. . https : www.freebase.com search query iphone any 2Fcommon 2Ftopic https : www.freebase.com search query iphone any 2Fcommon 2Ftopic https : www.freebase.com m 0c0bg9c .. . .. . If you decide you want to extract a subset you could either write a small program which takes advantage of the fact that the dump is sorted by subject ID and buffer the current subject s predicates until you decide whether it matches your criteria or use something like zgrep with two passes - one to extract the subject IDs which match and a second to get all predicates for those subject IDs . Freebase as business product line category property which might nominally identify electronic products but I don t think it s well enough populated to be useful .", "Question : I try to work with Freebase repository . It is possible to make MQLRead request but for this it not necessary to login into repository itself . MQLRead operation is well documented on Freebase wiki site while no MQLWrite specifications present . Old documentation exists but seems no working for me . Firstly I can t made www.freebase.com registration with separate login password because this way is not available - only registration with Google or Yahoo accounts . How to use new Google credentials for Freebase registration I can get access token from Google but can t use it for my application . Is it necessary to use cookies for registration as old documentation said or not And which URL I should use for registration : http : api.sandbox-freebase.com api account login or https : www.googleapis.com freebase v1-sandbox or something else I know that Google Refine project can use Freebase as a repository and it can write data to Freebase but for me it take a time to find a way how it work . Please help me Comment : I have the same problem no solution so far.. . They seem to ask in lists.freebase.com pipermail freebase-discuss 2012-April http : lists.freebase.com pipermail freebase-discuss 2012-April 008844.html this mail to contact one of their employees for access to the write API . .. . Answer : The write service has not yet been ported to the new API and may not be available before the old API is deprecated see this mail http : lists.freebase.com pipermail freebase-discuss 2012-April 008844.html from Jason Douglas one of the Freebase product managers . Comment : Does this mean that right now I can t perform write operations by API because I don t have plain-freebase account Comment : Apparently so : - I d suggest mailing the freebase-discuss list and asking what to do . Comment : Thanks for your help .", "Question : Are there any existing ways of using the freebase data dumps to create a database similar to what freebase offers but on you own server Pretty much freebase but locally and not through the API I guess it would be possible to create but are there any existing solutions for this already Or any alternative solutions for similar data without using an API I didnt find this for dbpedia either : Comment : did you manage to do so what solution did you use what computer resources ram disk cpu.. . do you need .. . Answer : Take a look at the freebase-quad-rdfize http : code.google.com p freebase-quad-rdfize project on Google Code . It should allow you to download the weekly Freebase quad dump http : wiki.freebase.com wiki Data dumps Link Export and load it into the RDF triple store of your choice .", "Question : null .. . Answer : I am trying to get the freebase search API to work in python and I ran the code exactly as laid out on the freebase api website here https : developers.google.com freebase v1 search-overview hl en which uses urllib.urlopen url . However I consistently get the following error : .. . .. . Traceback most recent call last : .. . .. . I have tried using urllib2 to create a request object and changing my User-Agent header as well as using the request module instead of urllib but neither of those work either . I know it isn t my API key problem or that the freebase API is totally shut down now because the code using my API key works just fine on a friend s python setup . Anyone have any thoughts on this I currently use python 2.7.10 Anaconda 2.3.0 64-bit and I have been using pycharm . Comment : Which OS I suppose it is Windows Comment : Also have you tried the answers there : stackoverflow.com q 14102416 58129 http : stackoverflow.com q 14102416 58129" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
libjpeg@encoding@107
libjpeg -- libjpeg is a widely-used free software library written in c which implements jpeg decoding and @placeholder functions alongside various utilities for handling jpeg images .
{ "confidence": [ 60.84423065185547, 55.75220489501953, 54.17675018310547, 53.876953125, 52.91815185546875, 51.074378967285156, 50.49751281738281, 49.847923278808594, 49.665924072265625, 49.099586486816406, 49.092018127441406, 49.092018127441406, 48.11234664916992, 48.11234664916992, 47.12151336669922, 47.036773681640625, 45.75275421142578, 44.96767807006836, 44.73278045654297, 44.00473403930664, 43.87447738647461, 43.71964645385742, 43.71250534057617, 43.590328216552734, 43.58009338378906, 43.58009338378906, 43.48834991455078, 43.22593307495117, 43.198028564453125, 42.61830139160156, 42.43001174926758, 42.24291229248047, 42.24291229248047, 42.24291229248047, 42.24291229248047, 41.95635986328125, 41.88103485107422, 41.348968505859375, 41.263240814208984, 41.263240814208984, 41.16388702392578, 41.023223876953125, 40.78083801269531, 40.730926513671875, 40.687103271484375, 40.34552764892578, 40.24726104736328, 40.15235137939453, 40.104042053222656, 40.08907699584961, 40.08907699584961, 40.08907699584961, 39.79875564575195, 39.765037536621094, 39.734962463378906, 39.73363494873047, 39.73363494873047, 39.73363494873047, 39.36585235595703, 39.19512939453125, 38.90330505371094, 38.785362243652344, 38.7512092590332, 38.56681823730469, 38.504066467285156, 38.483917236328125, 38.483917236328125, 38.25690460205078, 38.25690460205078, 38.25690460205078, 38.25690460205078, 38.21183776855469, 38.21015167236328, 38.1912956237793, 38.1912956237793, 38.09156036376953, 38.060646057128906, 38.051116943359375, 37.65106201171875, 37.611202239990234, 37.500244140625, 37.30975341796875, 37.27722930908203, 37.187828063964844, 37.071441650390625, 37.071441650390625, 37.021820068359375, 36.95199203491211, 36.717594146728516, 36.69255065917969, 36.69255065917969, 36.327796936035156, 36.327796936035156, 36.327796936035156, 36.327796936035156, 36.10792922973633, 36.103065490722656, 36.0683479309082, 36.0683479309082, 36.0683479309082 ], "content": [ "I use LibJPEG to read JPEG compressed images .", "At first I used libjpeg to compress the RGB image 800 480 to jpeg .", "Are you sure libjpeg supports JPEG-LS", "a bin directory holding the libjpeg shared library libjpeg-8.dll and jpeg tools .", "I m currently implementing a jpeg resizer in C++ using the jpeglib-turbo http : libjpeg-turbo.virtualgl.org library .", "It appears that libjpeg supports the lossless mode JPEG-LS which is different from the lossless JPEG you re working with .", "So I need to install Pillow but that won t work until I get jpeg support which comes by way of packages called libjpeg or libjpeg-turbo .", "I am using the C++ JPEG library libjpeg and I have realized that when some functions fail exit is called and the application is closed .", "Can anyone explain how you can compile OpenCV with libjpeg-turbo for faster JPEG decoding encoding", "Using libjpeg or libjpeg-turbo to do JPEG encoding I was wondering if there is any improvements providing multiple scanlines at once to the jpeg write scanlines function .", "Trying to write a jpeg file from some raw data using libjpeg .", "I d also recommend storing the .jpeg in a temp folder and then feeding it to libjpeg-turbo .", "I am using libjpeg to decode a jpeg file and write it to a bitmap file .", "I m using libjpeg to produce jpeg from raw RGB data at work .", "I m using libjpeg-turbo to access JPEG images and then I modify DCT coefficients of the image .", "I found the wikipedia page on libjpeg http : en.wikipedia.org wiki Libjpeg Version roadmap to be helpful in determining which types of JPEG files could be opened by which versions .", "EDIT .. . .. . If you insist on using libjpeg have a look at this post http : stackoverflow.com questions 1443390 compressing-iplimage-to-jpeg-using-libjpeg-in-opencv .", "I am trying to use libjpeg-turbo s Java wrapper to compress jpeg images .", "No .. . .. . libJPEG is only a loading saving library .", "My intent is to use libjpeg-turbo see http : www.libjpeg-turbo.org Main HomePage as a drop in replacement for the common libjpeg version 6 from Independent Jpeg Group http : www.ijg.org .", "It s true that Benjamin s blog explains how to replace the built-in jpeg library with libjpeg-turbo in Android platform .", "I downloaded the latest libjpeg sources from the projekt page jpeg-8d and extracted the files .", "JPEG has a concept of MCU minimum coding unit which is a block or 4x4 luma blocks when subsampling and libjpeg is built around processing rows of MCUs .", "My ultimate goal is to be able to manipulate the DCT coefficients of jpeg images somewhat similar to this MatLab libjpeg wrapper .", "The jpeg library used is libjpeg.lib .", "the jpeg library used by it is jpeglib .", "This is problematic because libjpeg only outputs 3 by default in RGB order since JPEG has no notion of opacity .", "The instructions for libjpeg-turbo here http : libjpeg-turbo.svn.sourceforge.net viewvc libjpeg-turbo trunk README-turbo.txt describes the TurboJPEG API thus : This API wraps libjpeg-turbo and provides an easy-to-use interface for compressing and decompressing JPEG images in memory .", "I believe this to be a libjpeg or libjpeg-turbo problem .", "About authenticity this code is written by libjpeg authors .", "When libtiff starts the jpeg decoder it checks that the version number in the libjpeg library binary matches the version number in the libjpeg headers that it was compiled against and if they do not match it prints the warning you are seeing .", "The plugin consists of the dlib and libjpeg libraries and everything seems to be working fine except for actually loading a jpeg from file .", "I need to write exif metadata to a char array so I can write it to jpeg file using libjpeg .", "I think it s later modification of JPEG and libjpeg - as far as i know - supports the basic one", "Decompress the libjpeg sources in D : tmp so you have a jpeg-8d directory in there .", "I am getting the ANativeWindow by doing : .. . .. . I am loading the jpeg with libjpeg-turbo by doing : .. . .. . My Question is how to show the decoded jpeg on the surface", "libjpeg-9a can be used to load images already scaled down .", "I am using standard procedure from example.c of the libjpeg library : .. . .. . After this I have a new JPEG image saved in the file lets say new.jpg .", "I am using libjpeg to decompress my JPEG image and write it to a BMP file .", "It did output checking for the location of libjpeg.. . usr but it still doesn t have JPEG support .", "sourceforge.net projects libjpeg-turbo files 1.2.0 http : sourceforge.net projects libjpeg-turbo files 1.2.0 libjpeg-turbo-1.2.0.tar.gz download", "It s not ever trying to look for any default libjpeg library or libjpeg 7 at all .", "If the code calling libjpeg is C++ all kind of resources could be created using RAII within the code calling libjpeg .", "I want to replace jpeglib with libjpeg-turbo to improve mjpeg decoding performance .", "I was previously using libjpeg .", "using libjpeg .", "But in fact you might have to get a fresh libjpeg to make sure that you do in fact not have a libjpeg-turbo named libjpeg .", "Error handling in libjpeg http : stackoverflow.com q 19857766 86967", "libjpeg or libjpeg-turbo are requirements for installing Pillow https : pypi.python.org pypi Pillow which is a new requirement for storing images on django https : docs.djangoproject.com en 1.9 modules django core files images .", "UPDATE : .. . .. . If encountering the error encoder jpeg not available you may need to install libjpeg .", "I want to read JPEG file using libjpeg and decode it and show it on qnx window using window pixmap .", "I am writing a program to read some text-files and write it to a JPEG file using libjpeg http : www.ijg.org .", "Try Libjpeg Turbo : http : libjpeg-turbo.virtualgl.org", "Try using libjpeg http : libjpeg.sourceforge.net library .", "It seems that current implementation of libjpeg as well as its fork libjpeg-turbo doesn t provide a way to skip unneeded 19k scanlines without decoding them .", "Neither one is libjpeg .", "ERREXIT is a macro in libjpeg .", "This is the default behavior of libjpeg .", "libjpeg-turbo .", "As both of those programs must use some jpeg library I tend to assume they are also using libjpeg and there is a genuine codec conflict .", "libjpeg 6b is the reference codebase that served two forks : .. . .. . Guido Vollbeding IJG maintainer : libjpeg 7 and up with the famous SmartScale extension .. . dcommander libjpeg-turbo in particular reads the comments from here https : github.com libjpeg-turbo libjpeg-turbo libjpeg-v7-and-v8-apiabi-emulation .", "Then I use libjpeg library to read these files .", "From https : github.com libjpeg-turbo libjpeg-turbo blob jpeg-8d jdhuff.c L379 : .. . .. . If I simply comment out the check or add a check for huffsize p to be nonzero as in the containing loop s controlling expression then djpeg manages to convert the image to a BMP which I can view with few problems .", "https : github.com openstf android-libjpeg-turbo issues 1 I aim to build share library of libjpeg-turbo of armabi .", "The libjpeg-turbo http : libjpeg-turbo.virtualgl.org project uses SIMD instructions MMX SSE2 NEON to accelerate baseline JPEG compression and decompression on x86 x86-64 and ARM systems .", "libjpeg-turbo whole raison d etre is to provide hardware-acceleration to libjpeg .", "a There is zero advantage of libjpeg-turbo for armeabi without NEON as compared to libjpeg .", "or is the libjpeg bad installed", "Not in my jdatasrc.c libjpeg-6b .", "My libjpeg version is 8d .", "I use libjpeg .", "Now I don t use libjpeg and instead I use libimg which uses jpeg decoder img codec jpg.so and provide a generic api for all the decoders for qnx .", "It s not much different from the base jpeg-turbo in terms of source code : http : git.linaro.org gitweb p people tomgall libjpeg-turbo libjpeg-turbo.git a shortlog h refs heads android .. . .. . There is a module static library consisting of 2 cpu features-dependent files : jsimd arm neon.S and jsimd arm.c .", "Is there a way I can tell if the libjpeg I m linking against is from libturbo or the regular libjpeg", "My question is compared with libjpeg the compressing speed of libjpeg-turbo has no any improvement .", "If so is libjpeg or any other software out there able to do it", "That seems to work fine for me on Ubuntu for the .tar.gz archive from here : sourceforge.net projects libjpeg files libjpeg 6b http : sourceforge.net projects libjpeg files libjpeg 6b", "This part contains background information .. . .. . In fact scaling while compressing was only introduced and implemented in the version 7 of the Independent JPEG Groups libjpeg .", "I am using libpng and libjpeg to read and write images .", "The libjpeg-turbo library provides simd jsmidcfg.inc.h .", "Now IIUC iset files internally use the jpeg format which is why the library must be linked against libjpeg and this is where the real problem starts : Unity also links against libjpeg and it seems to be a different version than the one ARToolkit links against .", "Solution : libjpeg was already installed on the system so I installed libjpeg-devel .", "rpm says libjpeg is installed .", "Am using libjpeg-turbo from here https : github.com openstf android-libjpeg-turbo to compress images using JPEG compression since .. . .. . Bitmap.compress Bitmap.CompressFormat.JPEG quality ByteArrayOutputStream .. . .. . causes OOM for big Images in my Android Project .", "I am using a virtual environment @joelgoldstick but even though I m installed pillow and libjpeg via brew I still get the jpeg error .", "Is there a way to get libjpeg to respect the orientation of the JPEG during decompression or will I have to parse out this orientation tag and manually rotate the image", "The version of libjpeg-turbo I use is 1.4.2", "To work properly cimg need the libpng library and the libjpeg library .", "libjpeg is a very low-level steep-learning-curve old school c library .", "Is there a workaround for it without digging into libjpeg internals", "My source code is accessing libjpeg .", "thanks for the suggestion but I want to know how to use the library libjpeg", "I have a question regarding DICOM standard and libjpeg library .", "I started researching libjpeg library and I found out that it doesn t support", "2 Create a new static library from the libjpeg source code .", "I just compiled libjpeg using Visual Studio 2015 and I was able to generate a DLL simply by opening the jpeg.sln solution right-clicking on the jpeg project chosing Properties and then changing the Configuration type to Dynamic library dll .", "I installed libjpeg before", "Anybody with more experience in libjpeg know how to do this", "Do you have an option to use libjpeg-turbo", "Using jpeg mem src works for me with libjpeg-turbo :" ] }
{ "confidence": [ 77.81192016601562, 72.87470245361328, 70.09510040283203, 69.69085693359375, 68.85491943359375, 68.26217651367188, 67.56692504882812, 67.20529174804688, 66.95232391357422, 66.04586791992188, 65.94721984863281, 65.92601776123047, 65.15640258789062, 65.032958984375, 64.97661590576172, 64.36482238769531, 64.27758026123047, 63.81439208984375, 63.345516204833984, 63.06760025024414 ], "content": [ "Question : I am using OpenCV 2.3.1 on OS X Lion in one of my C++ projects . While my project works great as-is it depends heavily on JPEG decoding and encoding . I would like to gain a speedup by using libjpeg-turbo but I cannot find the correct way to link with libjpeg-turbo . Depending on my hackery attempts and which files I edit I either end up with compiling errors or with a useless OpenCV library everything compiles correctly but I cannot open or write JPEG files though no errors appear in the C++ project . Can anyone explain how you can compile OpenCV with libjpeg-turbo for faster JPEG decoding encoding .. . Answer : To build OpenCV 2.4.0 with libjpeg-turbo you need : .. . .. . 1 . build libjpeg-turbo as static library .. . 2 . configure OpenCV with the following command : .. . .. . cmake -DWITH JPEG ON -DBUILD JPEG OFF -DJPEG INCLUDE DIR path to libjepeg-turbo include -DJPEG LIBRARY path to libjpeg-turbo lib libjpeg.a path to OpenCV Comment : OpenCV 2.3.1 can not be build with libjpeg-turbo without the source modification . Comment : Thank you and my apologies for the late reply . While it did not work at first this was mainly due to user error . Overall execution-time is down by nearly 30 and opening and writing the actual JPEG file has seen a whopping 50 + improvement .", "Question : Is there anyone who succeed to include libjpeg in some compiler I tried everything : Dev C++ VS10 CodeBlocks copy the headers and the lib by hand add with the linker but nothing . Right now I am really confisued as there is not an official guide on how to compile it in any compiler . I would be really happy if someone could provide a tutorial on how the library can be compiled in any compiler . Thank you in advance . Comment : Can you post the errors problems in a pastebin and link Do you need to compile There are some binary packages here http : gnuwin32.sourceforge.net packages jpeg.htm but they are compiled with mingw . edit : sorry I thought you were tring to compiler libjpeg . Comment : On a unix-like system eg Cygwin since you seem to be on Windows try the standard . configure make make install . That seems to work fine for me on Ubuntu for the .tar.gz archive from here : sourceforge.net projects libjpeg files libjpeg 6b http : sourceforge.net projects libjpeg files libjpeg 6b Comment : Yes I want to compile . I need to use some of the functions for reading and writing JPEG s . I am compiling this code pastebin.com 3wkp9MWQ http : pastebin.com 3wkp9MWQ and I add all the headers and .lib .a files then it gives following errors : C : Program Files x86 Dev-Cpp lib jpeg-bcc.lib file not recognized : File format not recognized this usually means GCC does not like a file extension collect2 : ld returned 1 exit status C : Users NIVER Desktop Makefile.win Error Project1.exe Error 1 if this is the only error : please check your library includes Comment : But as you said I am on windows and here won t work the same . Comment : Are you compiling the library from source or trying to link-to a compiled library you ve downloaded .. . Answer : Here is how I ve built libjpeg using MinGW on Windows : .. . .. . 1 . Get MinGW with MSYS .. . .. . I ve got a copy from http : sourceforge.net projects mingw . Quoting from www.mingw.org : .. . .. . MSYS is a collection of GNU utilities such as bash make gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present . We will need it to run the configure script that comes with libjpeg sources . 2 . Get libjpeg sources .. . .. . From http : www.ijg.org take the Unix format package the Windows one won t work with this procedure . I took the jpeg 8d version . 3 . Prepare a building directory .. . .. . I ve made a temporary directory named tmp in D : but you could choose whatever suits your needs . The thing that matters is the name of paths in MSYS . As it brings some Unixity to Windows paths cannot be used in their original form . In a nutshell : .. . .. . C : path to file becomes c path to file in MSYS land an so D : tmp becomes d tmp . Decompress the libjpeg sources in D : tmp so you have a jpeg-8d directory in there . Create a jpeg-build directory inside D : tmp it will hold the built library . Now everything is ready for the build . 4 . . configure make make install .. . .. . That is the mantra of building in Unix land . An option should be added to redirect the install process to D : tmp jpeg-build . Run the following commands in an MSYS shell also named MinGW shell in Windows start menu : .. . .. . As an additional step you can run make test for safety . These commands will build both static and shared versions of libjpeg . 5 . Take the goods delete the temporaries .. . .. . If everything runs fine you can delete the D : tmp jpeg-8d directory but keep the jpeg-build one . It contains : .. . .. . an include directory containing libjpeg headers . You can move them to your compiler s headers directory . a lib directory with .a file to pass to the linker . You can move them to your compiler s library directory . a bin directory holding the libjpeg shared library libjpeg-8.dll and jpeg tools . a share directory containing man pages for the jpeg tools . You can now build your program and link it against libjpeg by indicating the right include and library paths . You can find many details about the libjpeg building and installation process in install.txt inside the source package . I hope this will be useful . Comment : I installed the MinGW but I can t find any executable . Comment : And it says configure - command not found . Comment : What executable are you looking for You should switch to the jpeg-8d directory before running commands : cd d tmp jpeg-8d . I ll update my answer . Comment : I did everything as you said i configured Dev C++ by coping all the headers and other files now I should by able to run the example.c included in libjpeg downloaded archive Comment : I haven t used the example.c provided in libjpeg sources but nothing prevent it from working . I ve used libjpeg in the past in a little game-engine and it worked like a charm .", "Question : Using libjpeg or libjpeg-turbo to do JPEG encoding I was wondering if there is any improvements providing multiple scanlines at once to the jpeg write scanlines function . I did some tests on 720x288 images but I only get 0 5 increase when processing the whole image at once . I guess this increase is just due to the removal of call stack overhead but I was expecting a bit more at least with libjpeg-turbo . The performance test was run with Callgrind in Valgrind so maybe I m missing something . Or I really misunderstood how JPEG encoder works . .. . Answer : JPEG has a minimum height of a row called MCU height . It is 8 lines in images without subsampling 4 : 4 : 4 mode or 16 lines if chroma is subsampled 4 : 2 : 0 mode . If you feed libjpeg these 8 or 16 lines it will be able to process the whole row in one go . Otherwise it ll need to do extra bookkeeping or buffering . Writing multiple MCU heights at a time or the whole image won t hurt . Comment : Nice clue . Do you have any reference for that Is that your experience Or should I just test it by myself in my own setup Comment : JPEG has a concept of MCU minimum coding unit which is a block or 4x4 luma blocks when subsampling and libjpeg is built around processing rows of MCUs .", "Question : I am using the C++ JPEG library libjpeg and I have realized that when some functions fail exit is called and the application is closed . How can I override this behavior and prevent the application from closing on libjpeg errors .. . Answer : This is the default behavior of libjpeg . In order to handle errors with libjpeg you ll have to define an error-handling routine like this : .. . .. . And then register it using jpeg std error . You can find a complete example here https : github.com zakinster detiq-t blob master ImageIn JpgImage.cpp . Comment : Thank you so much let me try it and I ll tell you : Comment : Wow I didn t not about that jump mechanisms . Thank you so much it worked Comment : You can try C++ lambda s with exceptions to create the exception handler inline -- see my answer stackoverflow.com a 34351005 1151329 http : stackoverflow.com a 34351005 1151329", "Question : The instructions for libjpeg-turbo here http : libjpeg-turbo.svn.sourceforge.net viewvc libjpeg-turbo trunk README-turbo.txt describes the TurboJPEG API thus : This API wraps libjpeg-turbo and provides an easy-to-use interface for compressing and decompressing JPEG images in memory . Great but are there some solid examples of using this API available Just looking to decompress a fairly vanilla jpeg in memory . I ve found a few bits such as https : github.com erlyvideo jpeg blob master c src jpeg.c which appears to be using the TurboJPEG API but are there any more solid varied examples The source for libjpeg-turbo is well documented so that does help . .. . Answer : In the end I used a combination of random code found on the internet e.g . https : github.com erlyvideo jpeg blob master c src jpeg.c and the .c and header-files for libjeg-turbo which are well documented . This http : libjpeg-turbo.sourceforge.net ljtdoc.trunk turbojpeg-c group turbo j p e g.html official API is a good information source aswell . Comment : If the code is small you could share it here to improve your answer Comment : I will look it out at some point and add to the answer .", "Question : libjpeg or libjpeg-turbo are requirements for installing Pillow https : pypi.python.org pypi Pillow which is a new requirement for storing images on django https : docs.djangoproject.com en 1.9 modules django core files images . So I need to install Pillow but that won t work until I get jpeg support which comes by way of packages called libjpeg or libjpeg-turbo . I hope that is the case at least . This dependency is not an issue on the dev server but I need to do some work locally Macbook Pro OSX 10.11.5 . Haven t been able to do it yet or find a solution to install yet for OSX . I was hoping I would find something in pip or conda but there is nothing for OSX . I have seen there are various normal ways to install on Linux . .. . Answer : Homebrew http : brew.sh : Comment : Don t know why I didn t think of homebrew which I also have already . Thanks a lot", "Question : I have a question regarding DICOM standard and libjpeg library . In the DICOM standard there are among others Transfer Syntax : .. . .. . JPEG Lossless Nonhierarchical First- Order Prediction Processes 14 Selection Value 1 : Default Transfer Syntax for Lossless JPEG Image Compression .. . .. . As far as I know this Transfer Syntax corresponds with JPEG-1 Lossles format . I started researching libjpeg library and I found out that it doesn t support Lossless JPEG as stated here : JPEG Lossless in DICOM http : stackoverflow.com questions 27913318 jpeg-lossless-in-dicom 5D .. . .. . Also in libjpeg documentation there is a part saying : .. . .. . Unsupported ISO options include : Hierarchical storage Lossless JPEG DNL marker Nonintegral subsampling ratios .. . .. . However in library code in compression parameters structure jpeg compress struct there is a field : .. . .. . What does is all mean I m really confused . Could anyone describe which standards of JPEG are supported by the library Furthermore how to set parameters for compression to be compatible with DICOM JPEG Lossless standard Comment : It appears that libjpeg supports the lossless mode JPEG-LS which is different from the lossless JPEG you re working with . I haven t seen any implementations of this codec except in DICOM libraries . I wrote my own and it s actually very simplistic . Comment : Are you sure libjpeg supports JPEG-LS I think it s later modification of JPEG and libjpeg - as far as i know - supports the basic one Comment : I m not 100 sure but I didn t see anything that looked like it would help you . The truth is that to decode the DICOM lossless JPEG requires about 100 lines of C code for the specific lossless algorithm . It s similar to PNG with a filter method and delta values encoded with max-length 16 Huffman codes . Comment : Could you please tell me what were you relying on writing your own decompressor If it is simple i would do it on my own rather than investigate how to use specific libraries to do it for me : .. . Answer : Let s do some clarifications here first . What you should start with is the famous JPEG 6b aka 62 release . Start by reading the code from here http : ijg.org files jpegsrc.v6b.tar.gz . You ll discover that there is no mention to your boolean lossless . libjpeg 6b is the reference codebase that served two forks : .. . .. . Guido Vollbeding IJG maintainer : libjpeg 7 and up with the famous SmartScale extension .. . dcommander libjpeg-turbo in particular reads the comments from here https : github.com libjpeg-turbo libjpeg-turbo libjpeg-v7-and-v8-apiabi-emulation . So if this is the libjpeg you were talking about then yes it does not support the lossless mode specified in the standard . The lossless patch was created by Ken Murchison and you should still be able to find it eg . here https : groups.google.com forum msg comp.protocols.dicom rrkP8BxoMRk Ij4dfprggp8J . It should apply directly over libjpeg 6b . If you do not want to patch the lib yourself have a quick look at GDCM http : gdcm.sourceforge.net and or DCMTK http : dcmtk.org since they are both using a convenient copy of libjpeg + the famous lossless patch with some further patch thanks to DCMTK team . At this point this should answer your question . For further details on libjpeg IJG and libjpeg-turbo informations I suggest you read informations from : .. . .. . https : bugs.debian.org cgi-bin bugreport.cgi bug 612341 131 .. . https : lists.debian.org debian-devel-announce 2014 08 msg00000.html .. . .. . .. . .. . In case you are still reading I sugest you also have a quick look at another library purposely also called libjpeg see it here at github https : github.com thorfdbg libjpeg . In particular go over the README file here https : github.com thorfdbg libjpeg blob master README . And you ll discover that this libjpeg is a full implementation of ITU 81 lossy lossless 8 12 16bits and even hierarchical all in one single code without the need to do multiple compilations . And for completeness I found that the following links were very usefull : .. . .. . http : fileformats.archiveteam.org wiki Lossless JPEG original .. . https : sourceforge.net projects jpeg Comment : Thank you you clarified it very well :", "Question : I am using the C++ JPEG library libjpeg and I have realized that when some functions fail exit is called and the application is closed . How can I override this behavior and prevent the application from closing on libjpeg errors .. . Answer : Using c++11 I implemented this using a lambda similar to Marco s answer : .. . .. . which works well . Only then catch on struct jpeg error mgr err .. . .. . i.e . and", "Question : I ve got a simple C++ app https : github.com psobot smartcrop that decodes JPEGs with libjpeg - however some of the images it processes come out sideways These input images have orientations baked in to the EXIF data by the camera but it seems that during decompression libjpeg isn t taking the orientation flag into account as many JPEG viewers do . Is there a way to get libjpeg to respect the orientation of the JPEG during decompression or will I have to parse out this orientation tag and manually rotate the image .. . Answer : the transupp.h header in libjpeg defines an API for lossless rotation . Included is also jpegtran.c source code for an executable that serves as an example . Comment : jpegtran appears to be able to rotate images losslessly but doesn t provide built-in EXIF detection - nor is it a library that I can call from within my code . Comment : the jpegtran source code is included in libjpeg version 8d and serves as an example of how to apply lossless transformation using libjpeg Comment : Very helpful . That plus the EXIF parsing code from jhead http : www.sentex.net mwandel jhead should do the trick .", "Question : The project https : github.com iiordanov bVNC using gstreamer sdk http : docs.gstreamer.com display GstSDK Installing+for+Android+development . the jpeg library used by it is jpeglib . I want to replace jpeglib with libjpeg-turbo to improve mjpeg decoding performance . How can I do it .. . Answer : 1 I changed the Android.mk file in jni src . Below is the changed version . I haven t replaced the jpeglib used by gstreamer but replaced the jpeglib used by aSPICE . The bVNC code I am using is v3.3.5 . .. . .. . 2 When compiling libjpeg-turbo 1.3.0 make sure you configure it with --with-jpeg8 . .. . .. . 3 Below is the modified Android.mk :", "Question : The instructions for libjpeg-turbo here http : libjpeg-turbo.svn.sourceforge.net viewvc libjpeg-turbo trunk README-turbo.txt describes the TurboJPEG API thus : This API wraps libjpeg-turbo and provides an easy-to-use interface for compressing and decompressing JPEG images in memory . Great but are there some solid examples of using this API available Just looking to decompress a fairly vanilla jpeg in memory . I ve found a few bits such as https : github.com erlyvideo jpeg blob master c src jpeg.c which appears to be using the TurboJPEG API but are there any more solid varied examples The source for libjpeg-turbo is well documented so that does help . .. . Answer : Here s a fragment of code what I use to load jpeg s from memory . Maybe it will require a bit of fixing because I extracted it from different files in my project . It will load both - grayscale and rgb images bpp will be set either to 1 or to 3 . Comment : Sorry to unaccept your answer but on looking closely now I m actually implementing this I can see you re not even calling tj functions in the code you posted e.g . tjDecompress . Comment : It is not mandatory to use TurboJpeg API to get speed benefits from libjpeg-turbo library . In my example I m using just standard libjpeg API . Why you don t want to use libjpeg API Comment : My question s pretty clearly asking about the TurboJPEG API . I am using it due to its simplicity compared to the standard libjpeg interface .", "Question : Im working under Ubuntu 11.04 . I m trying to work with PIL in my Django project . Sadly PIL cannot load my image . Here is the PIL setup summary : .. . .. . I tried coding in python shell and it returns the error when I called load function : .. . .. . I am also working in a Virtual Environment I am having problems with uploading jpeg image on my Django project . PNG works fine but it rejects JPEG Comment : Are you sure that this image file is correct Being able to view it in another program is not necessarily sufficient . Can you use any other images without errors Comment : yeah this image file is correct . png works fine but jpeg does not . I m using libjpeg8b btw . .. . Answer : I had the same problem but unfortunately we were using RHEL which only had libjpeg 6b . Digging into this problem further this error seems to occur when you are using a JPEG feature that isn t supported in the version of libjpeg you re using . In my case it was arithmetic encoding introduced in version 7 . I found the wikipedia page on libjpeg http : en.wikipedia.org wiki Libjpeg Version roadmap to be helpful in determining which types of JPEG files could be opened by which versions . so.. . .. . .. . TL DR .. . .. . Upgrade libjpeg if you can or re-save your images as baseline JPEG s .", "Question : So I have this problem . I have an IplImage that i want to compress to JPEG and do something with it . I use libjpeg . I found a lot of answers read through examples and docs and such and did that . And successfully written a function for that . Now this function is straight from the examples except the part of allocating memory but i need that since i m not writnig to a file but it still doesn t work . It dies on jpeg start compress cinfo TRUE part Can anybody help .. . Answer : After fighting with libJpeg for 2 days pointers memory stepping and pulling hair I gave up and used the all favourite save-to-disk-load-to-memory approach so if anybody is interested here is the method : .. . .. . I hope somebody finds this usefull . I wish somebody from OpenCV developers sees this thread and implements direct to buffer JPEG conversion in OpenCV and spares us the misery and 1 save load to disk operation .", "Question : I need to do some work with this library and I m finding the documentation at http : apodeline.free.fr DOC libjpeg libjpeg.html to be deficient incomplete function signatures etc . Does anyone know of some other sides or have some example code illustrating common tasks Edit I also found this question http : stackoverflow.com questions 637043 using-jpeglib-for-jpeg-compressed-byte-stream with an example but any others would be helpful . Comment : Here s some well commented code github.com LuaDist libjpeg blob master example.c https : github.com LuaDist libjpeg blob master example.c .. . Answer : Try using libjpeg http : libjpeg.sourceforge.net library . Example how to use it is in this blog http : andrewewhite.net lifetype blog.php the-white-blog programming 2008 09 02 very-simple-jpeg-writer-in-c-c .", "Question : I m assigned to do a project that consists in changing the quantization in the JPEG source-code from the quantization tables to Lloyd-Max quantization . The problem is not knowing what to do I know how to change the quantization but where to find the code I m suposed to change . If someone is familiar with the libjpeg-turbo could you give me some advice on doing so .. . Answer : I refrained from responding because it has been a long time since I have prowled around in the LIBJPEG code and I understand that it has been rewritten . The code functions well and is efficient but it is quite torturous to read and understand . This is a C++ library that apparently was written for instructive purposes . For understandability it is about as good as you are going to get with JPEG : .. . .. . http : www.colosseumbuilders.com sourcecode imagelib403.zip .. . .. . However if I remember correctly this one like LIbJPEG combines some steps of the DCT and quantization .", "Question : null .. . Answer : My program runs on the android device and the device is ARM system with NEON supported . At first I used libjpeg to compress the RGB image 800 480 to jpeg . The speed was about 70ms for per image but it was too slow for me . Later I found the libjpeg-turbo seems it can improve the compressing speed with the NEON in ARM . But after compiling and testing I found their compressing speed almost the same . And the change of the quality and flag passed to tjCompress2 also took no effect . I have no idea whether something is wrong or something is missing in my program . Codes below : .. . .. . The jpeg buffer out is allocated and freed by myself . The version of libjpeg-turbo I use is 1.4.2 Comment : What is the question Comment : My question is compared with libjpeg the compressing speed of libjpeg-turbo has no any improvement . I want to check out whether my program has any mistake . Comment : That s a statement not a question .", "Question : There is a strange change when saving JPEG image to the iOS photo library . I don t know if I am doing something wrong . I m using libjpeg-turbo to access JPEG images and then I modify DCT coefficients of the image . Modified image just in DCT nothing else is saved in photo library . But after I open the saved image DCT coefficients are not the same that I changed in the previous step . In detail let me explain how I m adding +1 to each DCT . I am using standard procedure from example.c of the libjpeg library : .. . .. . After this I have a new JPEG image saved in the file lets say new.jpg . Now I want to save this new.jpg to the photo library so I load the image by : .. . .. . I also checked that the DCT coefficients remained changed . After I have the same image wuth my modified DCT checked then I m going to save it : .. . .. . Image new.jpg is saved in photo library now . Until now everything works great DCT coefficients works like it was meant with the libjpeg library . The change comes when I load the saved image again and look into DCT coefficients . I found out that DCTs are changed and I don t know why . Is there any optimization algorithm that iOS use when you want to save JPEG image Why are DCTs changed . I m using the following procedure to read the saved image : .. . .. . Furthermore this is an example of original DCTs modified DCTs by adding +1 to all and loaded DCTs after saving it to photo library for one 8x8 block : .. . .. . Any help would be appreciated . I am really out of ideas why are DCTs after saving image to photo library altered . .. . Answer : iOS will always recompress your JPEG when you use UIImage and its methods hence altering DCT . Instead use AssetsLibrary to store and retrieve user s pictures as NSData . This behavior is not documented but it works . I d also recommend storing the .jpeg in a temp folder and then feeding it to libjpeg-turbo . Comment : thanks this is the way how it works", "Question : So I have this problem . I have an IplImage that i want to compress to JPEG and do something with it . I use libjpeg8b.The code exit when it goes the function of jpeg start compress with an error of Bogus input colorspace .Here are my code . .. . Answer : Is there any reason why you re not using opencv s native JPEG support The documentation is here http : opencv.willowgarage.com documentation c highgui reading and writing images and video.html highlight cvsaveimage cvSaveImage . EDIT .. . .. . If you insist on using libjpeg have a look at this post http : stackoverflow.com questions 1443390 compressing-iplimage-to-jpeg-using-libjpeg-in-opencv . Comment : I want to compress in the memory other than to the disk . Comment : Do you have access to the C++ interface There are imdecode and imencode functions to do just that . Comment : Ofcourse there can be a reason to not use OpenCV s nature JPEG support as your options through OpenCV are very limited .", "Question : So I ve been reading the libjpeg documentation and it is extremely lackluster . I have been trying to figure out how to read from a custom memory buffer rather than a file and am not sure how to even test if my solution is working correctly . At the moment my function for loading a jpeg from memory is like so : .. . .. . But it never makes it past jpeg read header . I know that this is a jpeg file and I know that my memory is being passed correctly because I have libpng loading images with the same signature and calling function fine so I m sure it is how I am setting the source manager in cinfo . Anybody with more experience in libjpeg know how to do this Comment : Do you have an option to use libjpeg-turbo sourceforge.net projects libjpeg-turbo http : sourceforge.net projects libjpeg-turbo -- if so it s jpeg mem src method works for me just fine . Comment : Yeahp if you could write an answer using that I ll accept it . Comment : @SamVarshavchik you know what It was because I was setting cinfo.src before jpeg create decompress . If I set it afterwards everything runs smooth as butter : L .. . Answer : Using jpeg mem src works for me with libjpeg-turbo :", "Question : I m trying to load part of big JPEG file hundreds of megapixels with a limited memory-footprint . I need only about a 1000 scanlines of 20000 . It seems that current implementation of libjpeg as well as its fork libjpeg-turbo doesn t provide a way to skip unneeded 19k scanlines without decoding them . Is there a workaround for it without digging into libjpeg internals .. . Answer : You can t avoid having to decode the scan lines you want to skip but you can avoid storing them anywhere . When you get the callback from libjpeg for each row just wait until the row-number matches the section of scanlines you want . Comment : Why can t I do that AFAIU JPEG is stored in 8x8 blocks thus if I need only 1000 bottom scanlines I can skip top blocks 19k 8 and decode only ones I need . Do I miss something Let s not consider progressive compression atm Comment : It s been a long time since I ve had to work with the JPEG internals but isn t the Huffmann compression applied after the DCT transform on the 8x8 blocks That means the top blocks are a variable amount of data so you don t know how much to skip without at least doing the Huffmann decoding . I suppose you could do that and avoid doing the DCT reconstruction but as you say that would land you deep in the libjpeg internals ." ] }
[ "yes-answer-long", "yes-answer-short" ]
encoding
UNK_RELATION
swrevealviewcontroller@facebook@108
swrevealviewcontroller -- a uiviewcontroller subclass for presenting side view controllers inspired on the @placeholder and wunderlist apps .
{ "confidence": [ 37.520599365234375, 33.072872161865234, 30.67959213256836, 30.49669075012207, 30.462356567382812, 29.689807891845703, 29.583248138427734, 29.11225700378418, 28.945293426513672, 28.704994201660156, 28.521310806274414, 28.423938751220703, 28.378856658935547, 28.186981201171875, 28.009395599365234, 27.858688354492188, 27.4857177734375, 27.377958297729492, 27.326812744140625, 27.23664093017578, 27.05752182006836, 26.796558380126953, 26.338180541992188, 26.28116226196289, 26.215063095092773, 26.094810485839844, 26.094810485839844, 26.063251495361328, 25.964279174804688, 25.900999069213867, 25.811317443847656, 25.72271728515625, 25.714744567871094, 25.63406753540039, 25.557758331298828, 25.489429473876953, 25.22922134399414, 25.22922134399414, 25.22922134399414, 25.091976165771484, 25.075817108154297, 25.05503273010254, 24.713825225830078, 24.564931869506836, 24.540821075439453, 24.407447814941406, 24.407447814941406, 24.407447814941406, 24.407163619995117, 24.407163619995117, 24.31570053100586, 24.296085357666016, 24.189443588256836, 24.189443588256836, 24.188047409057617, 24.13982582092285, 24.10764503479004, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 24.066730499267578, 23.674047470092773, 23.674047470092773, 23.41579818725586, 23.3676700592041, 23.3676700592041, 23.3676700592041, 23.3676700592041, 23.3676700592041, 23.3676700592041, 23.334354400634766, 23.334354400634766, 23.171716690063477, 23.157878875732422, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 23.02695083618164, 22.830585479736328, 22.830585479736328, 22.789833068847656, 22.589433670043945, 22.492069244384766, 22.492069244384766, 22.492069244384766, 22.492069244384766, 22.492069244384766, 22.492069244384766 ], "content": [ "Subclass of SWRevealViewController .", "I want to dismiss the side menu view which I implemented with the SWRevealViewController .", "When using SWRevealViewController I do not want to let the user interact with the view that opened the side menu .", "I am also using swrevealviewcontroller for side menu .", "D . Set the custom class for the newly added UIViewController to SWRevealViewController .", "But I want to pass this variable to all the view controllers under the SWRevealViewController I have .", "My start View is ViewController with class SWRevealViewController .", "I am using the SWRevealViewController library for a side menu within my main view .", "If your controller is not in the view-hierarchy of a SWRevealViewController the method will return nil .", "I searched a lot and all the solutions that talk about how to find the current UIViewController actually return SWRevealViewController as the current UIViewController which doesn t help .", "SWRevealViewController and Unwind segue http : i.stack.imgur.com M3zrQ.png .. . .. . The first view controller is the navigation controller the second is the SWRevealViewController the three view controllers below navigate one to each other and the third has an unwind segue to the first .", "after loading my add seminar view controller over the my main view controller after crashing my app with this error .. . .. . Presenting view controllers on detached view controllers is discouraged .", "I m using SWRevealViewController https : github.com John-Lluch SWRevealViewController for implementing two side navigation views in my application .", "I have a SWRevealViewController to handle side menu bar from my FirstPage .", "Here you re presenting a modal view .", "You need to get the proper reference to the STRTableViewController -- is it one of the controllers in the SWRevealViewController", "You can keep reference of your view controllers in the side menu s vc", "have you given the view controller your using the SWRevealViewController class", "My project is is Swift and SWRevealViewController is in Objective-c . SWRevealViewController is not initial view Controller.there is one intial View Contoller 1VC and it has Push segue on SWRevealViewController .", "When you implementing SWRevealViewController using storyboard you should set Storyboard Entry Point to SWRevealViewController instance Reveal View Controller on picture not to front view controller Start View Controller on picture .", "I have a sign in page and after I sign in i want my program to pass a variable to a bunch of view controllers that are connected by SWRevealViewController .", "Which version of SWRevealViewController are you using", "I need to set to root for second view controller through SWRevealViewController .", "I am using SWRevealViewController https : github.com John-Lluch SWRevealViewController in my app and I am having a problem .", "EDIT3 : If you still want to retain the way the method slides over I am not too particular on animated presenting and dismissing view controllers .", ".. . .. . I am using SWRevealViewController .", "SWRevealViewController is connected to the HomeViewController .", "I m trying to transition our app to use SWRevealViewController to give us a side-bar on each side of the application .", "You should do something like this : .. . .. . and then set front view controller by method of SWRevealViewController : .. . .. . - void pushFrontViewController : UIViewController frontViewController animated : BOOL animated .. . .. . self.revealViewController.pushFrontViewController navVC animated : true", "I have a Sliding Side Menu in my application working perfectly with SWRevealViewController .", "Unfortunately the unwind segues stop working I think this might be because the view controllers are stacked using addChild instead of pushViewController on the SWRevealViewController class .", "have you look at this cocoapods.org pods SWRevealViewController https : cocoapods.org pods SWRevealViewController", "Now I have created a ParentViewController and made all the view controllers the menu items a subclass of it .", "self.revealViewController returns the parent controller of type SWRevealViewController .", "Create SWRevealViewController init with nil as the rear and your tabbar as the front if you can t use nil as the rear just create a UIViewController but you won t use it .", "For Sliding Side menu Im using SWRevealViewController https : github.com John-Lluch SWRevealViewController .. . .. . Im successful in creating the sliding menu but Im not be able to include How can I integrate the UITabBarController with SWRevealViewController or is there any other way through which I can incorporate UITabBarController with Sliding Side Menu", "I use SWRevealViewController in my project .", "Is revealViewController in your code a type of SWRevealViewController", "My question is how to pop the SWRevealViewController .", "Finally I used the SWRevealViewController method to Push the view I desired to the front .", "I am using SWRevealViewController in order to implement a side nav menu in my app .", "am also using SwRevealViewController .", "The solution for Swift was kindly provided here : SWRevealViewController Submenu in Swift https : github.com John-Lluch SWRevealViewController issues 593", "in my app delegate this is how I navigate to my SWRevealViewController .. . .. . I navigate to that inner view controller from the SWRevealViewController s FrontViewcontroller like this .", "That is all view controllers stacked above the Login view controller will be popped .", "You need to use the pushFrontViewController method from SWRevealViewController to change your front view controller .", "I have these two SWRevealViewController delegate methods that currently remove interaction from the front view .", "But as soon as I segue to my next front view controller I loose access to the SWRevealViewController .", "You cannot directly access your own controllers through SWRevealViewController since it is connected to NavigationController .", "It must be possible to somehow access the controllers otherwise in my opinion the SWRevealViewController would be useless", "Do you want to add pan gesture to your view controllers to be able to open the side menu", "Since I am using SWRevealViewController the first view has to be frontal view so I cannot directly pass the value from SignInViewController to CalendarViewController .", "I want to configure SWRevealViewController programmatically .", "1.SWRevealViewController have SW Front SW REAR .", "The code for login view controller is as .. . .. . class LoginViewController : UIViewController UITextFieldDelegate .. . .. .", "One on the right side of the view and one on the left side .", "Remove the content view from the newly added UIViewController .. . .. . C . Make sure Is Initial View Controller is checked in IB for the newly added UIViewController .", "After that add this delegate method of SWRevealViewController in to your FirstPage .", "have you set delegate of SWRevealViewController in didFinishLaunchingWithOptions .", "m using SWRevealViewController class from github", "I ve added SWRevealViewController into the app and almost everything s fine", "I use SWRevealViewController in my project with Tab Bar .", "I have used SWRevealviewcontroller in my project .", "I have the following storyboard using SWRevealViewController .", "Can I use SWRevealViewController in it without using NavigationController .", "I have SWRevealViewController 2.4 at use in my app .", "I m using SWRevealViewController to build a sliding menu .", "The pan gesture in the SWRevealViewController is to pan and reveal the menu I guess so not really clear as to whether your question is linked to SWRevealViewController .", "I created a sidebar menu using the SWRevealViewController https : github.com John-Lluch SWRevealViewController from GitHub .", "EDIT : Change UIView s autoresizingMask to suit Swift 2 thanks to Marroc https : stackoverflow.com users 5135104 marcoc s comment https : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view 31941552 noredirect 1 comment56113646 31941552 .. . .. . This is Swift-SWRevealViewController 2.x version of @avdyushin s answer :", "what is happening right now is if i set SWRevealViewController as my initial View controller it works fine .", "I am using SWRevealViewController with Google Maps.My rear view controller loads google map .", "I have an issue when using the swipe-gesture to show the rear view in SWRevealViewController .", "I have View controller with embedded SWRevealViewController I ve added code below to disable any interaction while the menu on use .", "I have a LoginView and in success of login I am loading Slideout menu view SWRevealViewController .", "i m facing a problem while implementing SWRevealViewController in one of my view wich open an other with presentViewController function .", "I am using SWRevealViewController https : github.com John-Lluch SWRevealViewController in my project and I want to open a particular controller when the app receives a notification .", "There is a fork of SWRevealViewController for that : nsrover.wordpress.com 2014 08 06 http : nsrover.wordpress.com 2014 08 06 swrevealviewcontroller-disabling-user-interaction-when-toggled-to-rearview", "I have created a small app using SWRevealViewController using story board in swift.I have loaded my side menu table using an Array .", "Ex : I found this code from link http : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view .. . .. . Also found few other links .. . .. . Link1 https : github.com John-Lluch SWRevealViewController issues 152 .. . Link2 https : github.com John-Lluch SWRevealViewController issues 92 .. . Link3 https : github.com John-Lluch SWRevealViewController issues 92 .. . .. . I have this code but not really sure about the correct place to insert this code .", "I just want to be able to link this subview with SWRevealViewController .", "Is there any feature available in SWRevealViewController to handle UI as UISplitViewController", "Code used to implement the SWRevealViewController functionality into my project :", "Do not forget to assign StoryboardID RevealViewController in Storyboard for SWRevealViewController .", "SWRevealViewController swipe http : i.stack.imgur.com wQX10.png", "I am not able to understand how to use this with swrevealviewcontroller .", "And the SWRevealViewController has been configure in home screen .", "Im using SWRevealViewController to create a sliding menu .", "Right now SWRevealViewController is the target but it doesn t implement that method .", "This unwind method will act as a global constant that will be visible to all View Controllers on the storyboard .", "However I couldn t get my child view controllers app delegate .", "I am using SWRevealViewController to implement a slide menu from the left side in my application .", "I m using John Lluch s SWRevealViewController in my application and when the sidebar is out and the user wants to close it the front view is constantly clicked .", "Did you configure your storyBoard to work with SWRevealViewController properly", "it checks for the swrevealviewController and gets nil. . thats why not going under if condition", "Of course StartViewController is presented from SWRevealViewController via sw front segue .", "At first I took a viewcontroller named it SWREVEALVIEWController and set the sw rear to a tableviewcontroller .", "I also connect SWRevealViewController to my TabBar with identifier sw front and class SWRevealViewControllerSegueSequeController .", "I use swrevealviewcontroller to add slide menu to my app .. . .. ." ] }
{ "confidence": [ 45.6431884765625, 45.06485366821289, 42.28507995605469, 41.042449951171875, 40.70603942871094, 40.648529052734375, 40.33153533935547, 38.896705627441406, 38.71632766723633, 37.6592903137207, 37.21562957763672, 37.031253814697266, 36.53482437133789, 36.087303161621094, 36.02440643310547, 35.76140594482422, 35.56705093383789, 35.510162353515625, 35.46245193481445, 35.458892822265625 ], "content": [ "Question : Im trying to combine both UITabBarController and Sliding Side Menu . For Sliding Side menu Im using SWRevealViewController https : github.com John-Lluch SWRevealViewController .. . .. . Im successful in creating the sliding menu but Im not be able to include How can I integrate the UITabBarController with SWRevealViewController or is there any other way through which I can incorporate UITabBarController with Sliding Side Menu Comment : Check my updated answer. . @user22312412 .. . Answer : Well you set your tab bar controller as the reveal view controller s front-controller so of course the tab bar controller goes to the right when you reveal your rear controller . Option A : .. . .. . Managed to integrate it . Below are the steps to do it : .. . .. . A . Add a new UIViewController to the storyboard . B . Remove the content view from the newly added UIViewController .. . .. . C . Make sure Is Initial View Controller is checked in IB for the newly added UIViewController . D . Set the custom class for the newly added UIViewController to SWRevealViewController . E . Connect it to a view controller that you intend to be the rear view controller - give the segue sw rear identifier in IB . This must be a reveal controller segue type . F . Connect it to the UITabBarController - give the segue sw front identifier in IB . This must be a reveal controller segue type . Option B : Comment : I tried it . The menu is visible only for the first view not all views .", "Question : hello I have implemented SWRevealViewController in my swift app . The problem I am having is If I set SWRevealViewController as my initial ViewController all works fine . But If I launch this controller through code .. . .. . the navigation Title and barButtonIcon Disappears which is in my case is a hamburger-menu icon . SWRevealViewController is connected to the HomeViewController . and I am initiating SWRevealViewController when user clicks the login Button . If you need more information regarding the storyboard screenshot let me know . I ll upload here . Updated : storyboard .. . .. . enter image description here http : i.stack.imgur.com i074G.png Comment : if you are using presentViewController the presentViewController does not embedded with UINavigationController .if you want UInavigation COntroller in presentViewController implement in customize Comment : @Anbu.Karthik then should I use push Comment : ya if you using push the UINavigationController will come the reason push is embedded with UINavigationController . Comment : @Anbu.Karthik I have done this let nav : UINavigationController UINavigationController rootViewController : self.storyboard .instantiateViewControllerWithIdentifier swrevealviewcontroller as UIViewController self.navigationController .pushViewController nav animated : true error comes which is Pushing a navigation controller is not supported Comment : connect your current viewcontroller embed with UINavigationController then it works .. . Answer : navigation controller s navigation bar will only show up for view controllers that are contained by that navigation controller . Here you re presenting a modal view . It s not contained by the navigation controller . If you want the navigation bar to continue to appear : .. . .. . If it s purely a matter of style put a navigation bar on the modal scene you re presenting in the interface-builder . If you need to modally present a view that should be contained in a navigation controller then you need to present a navigation controller--not a view controller . Finally if the view you re presenting is intended to be part of the navigation controller s navigation stack then you need to present it with a push not a modal segue . Update .. . .. . Do like simple .. . .. . enter image description here http : i.stack.imgur.com DzJvY.png .. . .. . and call the perform segue as Comment : navigation Bar is appearing but navigation Items on the navigation bar is not appearing Comment : can you update your screen Comment : okay I ll upload here in a minute Comment : are you asking me to upload storyboard screen or mobile app screen Comment : both ......... .", "Question : I am using SWRevealViewController in order to implement a side nav menu in my app . I would like to make it so that the front view cannot be interacted with when the rear view is opened except that when the user taps the front view the rear view will close and the front view can be interacted with again . I have these two SWRevealViewController delegate methods that currently remove interaction from the front view . However this doesn t cause the rear view to close when the front view is tapped . Any help would be greatly appreciated thanks Comment : how did you implement this where Comment : This might help you : nsrover.wordpress.com 2014 08 06 http : nsrover.wordpress.com 2014 08 06 swrevealviewcontroller-disabling-user-interaction-when-toggled-to-rearview .. . Answer : Consider this simple solution works perfect .. . .. . Simple usage in UIViewController :", "Question : I have an app written in swift that displays location information on different views . I am receiving location updates in AppDelegate I don t want to use a singleton class since I want the location updates even when the app is in the background . Now I am using SWRevealViewController to implement a sidebar menu to toggle between the different views . When a new location update is received how do I call the function of the viewController that is currently active to update the UI I searched a lot and all the solutions that talk about how to find the current UIViewController actually return SWRevealViewController as the current UIViewController which doesn t help . Comment : showing code would be helpful .. . Answer : I gave it another shot and was able to find my viewController in my app from another view controller . However I couldn t get my child view controllers app delegate . Looking forward to other answers.. . .. . .. . here s what I did :", "Question : I have a Sliding Side Menu in my application working perfectly with SWRevealViewController . 1 Sidebar VC with a tableView connected to 3 View Controllers with the menu button at Navigation Bar .. . .. . I need to open a UITabBarController from a button inside one of them and it must have the same sliding menu . I created another SWRevealViewController and I linked the same way to my UITabBarController . I embed my first tabVC in a Navigation View Controller see photo .. . .. . UitabBarController http : i.stack.imgur.com jPDzr.png .. . .. . When I did it it works but if I clicked in one of the cells at the SideBar it goes to the correct view one VC working in my first Sidebar But without Navigation Bar and with the bottom bar .. . .. . How can I do it to have always Navigation Bar at top and only TabBar in my TabBarController SOLVED : .. . .. . The order is SWRevealViewController to Navigation Controller and then UITabBarController . Also the menu button is needed at UITabBarController instead of TabViews . Comment : Unfortunately you cannot reuse the same UINavigationController with the SWReavealViewController . I know it is not DRY but you will have to recreate the same UINavigationController for every new VC you push into the SWRevealViewController . Comment : I don t understand you at all.. . I have one ViewController that goes to a SWRevealViewController segues to a NavigationController and SideBarViewController . Then I create another SWRevealViewController with segues to a different NavigationController and the same SideBarViewController . .. . Answer : Rearrange the order create the navigation controller first . then call the UITabbarcontroller Comment : I am displaying ViewController A and ViewController B on slide menu from tab bar . Using SWRevealViewController I have to display same ViewController A and ViewController B . It works fine but it doesn t display both tab it only display ViewController tab in UITabbarController . My hierarchy is SWReveal - UITabbarController - UINavigationController - UIViewController . Comment : i have same issue @Anbu can you tell me how to Rearrange . Comment : @jace can you provide a sample code for this implementation . Am also facing the same issue .", "Question : null .. . Answer : i m currently developping an app which allow users to use the swype gesture slide to the left if you like or right if dont to do it i m using a library which use addSubview but i m also using the SWRevealViewController to make my side menu . The main problem is i dont know how to implement programmatically the gesture on my addSubview view . Of course i already use the : .. . .. . self.view.addGestureRecognizer self.revealViewController .panGestureRecognizer .. . .. . but it doesn t work . Thank you This is my two main controller : .. . .. . library : .. . .. . And the view which load my library : .. . .. . Thank you for reading my post . Comment : What exactly are you trying to do with the pan gesture The pan gesture in the SWRevealViewController is to pan and reveal the menu I guess so not really clear as to whether your question is linked to SWRevealViewController . Please provide a little more detail . Comment : sorry to be late yes that s what i want to do i want to allow users to use the side menu provided by SWRevealViewController into my subview Comment : Your question and your comment is not clear . I suggest you revise your question and focus the code more around what you need . Do you want to add pan gesture to your view controllers to be able to open the side menu Comment : thanks for your help but i dont know how to be clearer i have 2 views Swype.swift and card.swift . Card.swift is a library which create some card like tinder . When i call Card.swift in Swype.swift that create a SubView with the cards . I just want to be able to link this subview with SWRevealViewController . Comment : You do not link SWRevealViewController with sub views as far as I know . It is used with view controllers to show a sliding menu drawer sort of an effect . I suggest you go through the examples and based on what you want SWRevealViewController may not be exactly what you need .", "Question : I am using SWRevealViewController in order to implement a side nav menu in my app . I would like to make it so that the front view cannot be interacted with when the rear view is opened except that when the user taps the front view the rear view will close and the front view can be interacted with again . I have these two SWRevealViewController delegate methods that currently remove interaction from the front view . However this doesn t cause the rear view to close when the front view is tapped . Any help would be greatly appreciated thanks Comment : how did you implement this where Comment : This might help you : nsrover.wordpress.com 2014 08 06 http : nsrover.wordpress.com 2014 08 06 swrevealviewcontroller-disabling-user-interaction-when-toggled-to-rearview .. . Answer : 1 . Subclass of SWRevealViewController . 2 . Implement revealController : willMoveToPosition : of SWRevealViewControllerDelegate . 3 . Set full screen view on front view controller to override all touches . 4 . Add tap gesture recognizer to hide menu . Sample with nice animation : .. . .. . This solution for old version 1.x SWRevealViewController .", "Question : null .. . Answer : I have an issue when using the swipe-gesture to show the rear view in SWRevealViewController . The constrains gets misplaced for some reason . The constraints are fine when pressing the Meny button though . I think it has something to do with that I use a UIViewController instead of a TableViewController as rear view . But that should be possible right My code : .. . .. . How it looks when I press the Meny button SWRevealViewController button pressed http : i.stack.imgur.com JxKdq.png .. . .. . How it looks when i swipe SWRevealViewController swipe http : i.stack.imgur.com wQX10.png Comment : I had user SWRevealViewController with a rearViewController and it work fine can you post your constraints for your cells", "Question : I use SWRevealViewController in my project . My app have TabBarController . I did that I open the menu . When I select in menu it open without TabBarController bottom . I use Storyboard . My start View is ViewController with class SWRevealViewController . I connect to my menu with identifier sw rear and class SWRevealViewControllerSegueSetController . Before menu I have Navigation Controller . I also connect SWRevealViewController to my TabBar with identifier sw front and class SWRevealViewControllerSegueSequeController . What am I doing wrong In my menu to open a View I have this code : .. . Answer : From what I understand you want the front viewcontroller to be a tab bar and a menu with no tab bar So there are three things front rear and right . If you have not already look at the AppDelegate in RevealControllerExample and try do the following .. . .. . 1 . Create an instance of your tabbar .. . 2 . Create SWRevealViewController init with nil as the rear and your tabbar as the front if you can t use nil as the rear just create a UIViewController but you won t use it . 3 . Create you menu viewcontroller and assign it to the rightViewController property of the SWRevealViewController .. . .. . If this does not solve your problem please comment good luck . Comment : My problem is when I choose in my menu and open it . It open without TabBar bottom . Comment : You menu viewcontroller needs to have a tab bar If so then just assign tab bar to the rightViewController . Do you need every option in the menu to load a tab bar Comment : Menu does not need tab bar . Others options viewcontroller or tableviewcontroller in the menu must load a tab bar bottom . Comment : I solved a problem by changing the tableviewcontroller to viewcontroller and manually adding the tab bar controller but I have lot controllers in my project . Comment : Yeah you will need to add tab bars to all your option viewcontrollers if they are different if you only need a tableview you can use tableviewcontroller otherwise if you need anything additional like a tab bar or progress indicator you should use a viewcontroller and add a tableview .", "Question : I have a sequence of views that are pushed on top of each other on a Navigation Controller . I would like to do two things with these views : .. . .. . 1 . To open the Rear menu view from all of them .. . 2 . To be able to navigate back the stack using Unwind segues . I found out that if I push view controllers on top of each other using regular push segues then the unwind segue works as expected but then the self.revealViewController on each view controller is not set and the Menu can t be called using the revealToggle : selector . If I change the push segues to subclasses of SWRevealViewControllerSeguePushController then the views are pushed on top of each other and the Menu can be called from any of them using the revealToggle . Unfortunately the unwind segues stop working I think this might be because the view controllers are stacked using addChild instead of pushViewController on the SWRevealViewController class . Is there a way of working together with SWRevealViewController and Unwind Segues Below there is an example storyboard : .. . .. . SWRevealViewController and Unwind segue http : i.stack.imgur.com M3zrQ.png .. . .. . The first view controller is the navigation controller the second is the SWRevealViewController the three view controllers below navigate one to each other and the third has an unwind segue to the first . The first and third controllers have buttons that open the menu . As I stated before if the segues between the bottom view controllers are regular push segues then the unwind segue works as expected the menu button from the first view controller works as it is connected directly to the SWRevealViewController but the menu button from the third view controller doesn t . Switching the segue types to SWRevealViewControllerSeguePushController makes the menu buttons from the first and third view controllers work correctly but the unwind segue stops working . Oh and I tested using popToRootViewControllerAnimated : and it also doesn t work if the segues are set to SWRevealViewControllerSeguePushController . Comment : Unsure about your specific problem but this link helped me use SWRevealVC youtube.com watch v EWDNScxZ0YU https : www.youtube.com watch v EWDNScxZ0YU Comment : Hi MikeG Thanks for your response . Unfortunately the video didn t show exactly what I needed which was a view controller performing segues while being pushed by a SWRevealViewController . However Patrick Bodet at the SWRevealViewController git project helped me out and I will next post the answer he gave me . .. . Answer : I posted this question on SWRevealViewControllers github site https : github.com John-Lluch SWRevealViewController issues 543 issuecomment-176740682 and received an answer from Patrick Bodet who was EXTREMELY helpful . I will post the answer below so it may help somebody in the same situation as I . .. . .. . I had to update the storyboard and added an additional navigation controller as shown below . enter image description here http : i.stack.imgur.com mdGzU.png .. . .. . As shown in the figure I wanted to be able to push view controllers on top of each other and also to unwind the segues both to the Login screen from the Menu and from stacked view controllers . On my previous attempts it seemed as-if SWRevealViewController wasn t able to cope with proper navigation segues . Patrick s first suggestion was to move the original navigation controller from before the RevealViewController to before the First view controller . That actually worked by I still needed to be able to unwind segue from the Menu to the Login screen so I needed an additional navigation controller . As suggested by Patrick I added an additional Navigation Controller . And embarrassingly at the end I realised the button that pointed from the third to the first view controller had both an ibaction and a segue to the first so that was why it was acting all weird : - .. . .. . So for the storyboard shown above in order to work you just use regular Push segues for the view controllers . No need to use SWRevealViewControllerSeguePushController segues . The code for First and Third view controllers is like this :", "Question : I need to disable user interaction on front view when rear view is revealed . Found some others asking the same thing but can t really understand where or how to implement the code that I ve seen . Ex : I found this code from link http : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view .. . .. . Also found few other links .. . .. . Link1 https : github.com John-Lluch SWRevealViewController issues 152 .. . Link2 https : github.com John-Lluch SWRevealViewController issues 92 .. . Link3 https : github.com John-Lluch SWRevealViewController issues 92 .. . .. . I have this code but not really sure about the correct place to insert this code . I ve tried adding it in my front rear views and also in the SWRevealViewController method with no success .. . .. . Appreciate if someone can point me in the right direction . Comment : I agree with Mayank s answer below . It will be an easier way . Comment : @MayankJain can you give me a little code Comment : Consider following answer http : stackoverflow.com a 38139651 2725435 .. . Answer : I ve recently come up with a solution that I wanted to share sorry if it s 2 months late . To disable user interaction on the Front View while the Menu is open I added the following codes on my MenuViewController : .. . .. . on viewWillAppear : .. . .. . and on viewWillDisappear : .. . .. . This will disable all user interactions on the Front View Controller which means that the slide tap gestures to CLOSE the menu will also be DISABLED . Now I have created a ParentViewController and made all the view controllers the menu items a subclass of it . on my viewDidLoad I put the following codes : .. . .. . If you run your app at this point it would appear that the Tap Gesture works a tap on the Front View will close the Menu but NOT the Pan Gesture . I m not sure why this is so but in order to enable the slide gesture to CLOSE your menu add the following code in your MenuViewController : .. . .. . on viewWillAppear : .. . .. . To summarize here s what you need : .. . .. . On your MenuViewController : .. . .. . And on your menu items view controller you can make a ParentViewController for all of them : .. . .. . Hope this helps Comment : it more than helps - super simple super super Comment : You can use this fork too : nsrover.wordpress.com 2014 08 06 http : nsrover.wordpress.com 2014 08 06 swrevealviewcontroller-disabling-user-interaction-when-toggled-to-rearview Comment : The only snag with this is that a pan gesture anywhere on the screen including over that back menu screen will move the frontViewController . Anyone got a way of limiting the swipeable area Comment : very clever. . Thanks Comment : For the last part of the viewDiDLoad portion how would you write it in swift SWRevealViewController revealController self revealViewController revealController panGestureRecognizer revealController tapGestureRecognizer I was able to get the first part working in Swift to disable gestures just need to get them back :", "Question : I need to disable user interaction on front view when rear view is revealed . Found some others asking the same thing but can t really understand where or how to implement the code that I ve seen . Ex : I found this code from link http : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view .. . .. . Also found few other links .. . .. . Link1 https : github.com John-Lluch SWRevealViewController issues 152 .. . Link2 https : github.com John-Lluch SWRevealViewController issues 92 .. . Link3 https : github.com John-Lluch SWRevealViewController issues 92 .. . .. . I have this code but not really sure about the correct place to insert this code . I ve tried adding it in my front rear views and also in the SWRevealViewController method with no success .. . .. . Appreciate if someone can point me in the right direction . Comment : I agree with Mayank s answer below . It will be an easier way . Comment : @MayankJain can you give me a little code Comment : Consider following answer http : stackoverflow.com a 38139651 2725435 .. . Answer : Consider following solution works perfect .. . .. . Simple usage in UIViewController :", "Question : I am using SWRevealViewController for navigation-drawer in iOS.I have one main screen which is shown by default when app launches.I have also other screens like Settings Help About . So when user switch between screens then state of 1st view controller is reset.I want to persist it s state lie if was showing some data in screen then it should not get removed . I am using below code to switch between screens . One solution I see that to keep the viewController in the navigation stack so that the viewController not get destroyed it remains in the stack when user go to home then it is relaunched from navigation stack instead of initializing the view controller again . Comment : Why you did not use what you have suggested as solution Comment : I am not able to understand how to use this with swrevealviewcontroller . Comment : You can keep reference of your view controllers in the side menu s vc Comment : can you please provide the code for this or maybe explain more. . .. . Answer : For example for HelpVC you store a property of it in your side mennu view controller : .. . .. . Than in row selection instead of calling your segue you instantiate the view controller but before that you check if it is instantiated already you use it : Comment : It is not working for me in any way possible .", "Question : I need to disable user interaction on front view when rear view is revealed . Found some others asking the same thing but can t really understand where or how to implement the code that I ve seen . Ex : I found this code from link http : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view .. . .. . Also found few other links .. . .. . Link1 https : github.com John-Lluch SWRevealViewController issues 152 .. . Link2 https : github.com John-Lluch SWRevealViewController issues 92 .. . Link3 https : github.com John-Lluch SWRevealViewController issues 92 .. . .. . I have this code but not really sure about the correct place to insert this code . I ve tried adding it in my front rear views and also in the SWRevealViewController method with no success .. . .. . Appreciate if someone can point me in the right direction . Comment : I agree with Mayank s answer below . It will be an easier way . Comment : @MayankJain can you give me a little code Comment : Consider following answer http : stackoverflow.com a 38139651 2725435 .. . Answer : Swift version to @hardluckbaby answer : .. . .. . In MenuViewController Rear view controller : .. . .. . In FrontViewController You can make a ParentViewController for all of your front view controllers as @hardluckbaby said :", "Question : I want to dismiss the side menu view which I implemented with the SWRevealViewController . How can I do this dimiss http : i.stack.imgur.com Ff7V9.png .. . Answer : I am also using swrevealviewcontroller for side menu . if u want side menu on any page simply paste following code in viewdidload or if dont want side menu on some page simply delete the code . if u want any help..comment below Comment : i wanted to dismiss the side menu because is blocking my sign in view which i using push segue to show the sign in view but the side menu wont dismiss", "Question : null .. . Answer : I m new in the development-environment Swift I have a problem where I can not get rid of it I created a popover inside I have a UITableViewController in which each cell must open a UIViewController in the side menu SWRevealViewController the problem is : the popover opens the desired page correctly Main or Carrello but the side menu on the left no longer opens returns me revealViewController nil someone can help me thank you . enter image description here http : i.stack.imgur.com m43k6.jpg .. . .. . Popover : .. . .. . MainController : Comment : Have you checked that your Segue Identifiers in the storyboard and 100 correct check cases and of the correct type Comment : yes because the page opens correctly and the side menu that will not open for MainController is the identifier of the View Controller called Main maybe I should use SWRevealViewControllerSeguePushController but I can not implement it .", "Question : null .. . Answer : I am using the SWRevealViewController slide out menu in my iOS application written in swift . Every time the view controller is left and returned to it reloads . Is there any way to prevent the UIViewController from reloading every time it s presented CODE for MenuController.swift : Comment : If you are opened menu and returned to UIViewController just swipe or tap to ViewController it shouldn t reload your UIViewController if you tapped on button in menu its will open new instance of UIViewController . If you don t want create new instance of UIViewController you should check which controller is opened . And if opened your current UIViewController just call self.revealViewController.revealToggleAnimated true in obj-c self.revealViewController revealToggleAnimated : YES Comment : @user3551959 Hello when I call self.revealViewController revealToggleAnimated : YES or self.revealViewController.revealToggleAnimated true it still reloads the UIViewController when the menu button is clicked . Comment : Hmm very strange . Can you add your code of menu view controller Comment : I went ahead and added the code to my question above . There s not much going on in the menu controller . Comment : And how do you open UIViewController s . Are you use Storyboard + segue", "Question : I m working on an app which uses Facebook integration and the log in system works fine now . However I can t seem to return to my initial view controller when the user clicks log out . Here s an overview of my storyboard : .. . .. . Screenshot of storyboard http : i.stack.imgur.com Fz6e9.png .. . .. . I would like to return to the start when the user clicks the blue button on the top . What would I do to achieve that As you can see I have multiple Navigation Controllers and I only use Push-segues to get there . However I do use the SWRevealViewController which you can see in the middle . I ve tried self.navigationController popToRootViewControllerAnimated : YES which doesn t do anything . Any advice Anyone familiar with the SWRevealViewController and what it might have done to my Navigation stack Any help will be appreciated Thanks . .. . Answer : I m using swift and what worked for me was this : Comment : Your code worked but I had to modify it a bit for swift 2 looks like this now let loginVC : UIViewController self.storyboard .instantiateViewControllerWithIdentifier loginWindow self.presentViewController loginVC animated : true completion : nil", "Question : I d like to create a submenu in with SWRevealController in Swift . That means if I press a button in in the first slide out menu another slide out menu appears right next to the first one . I already managed to create to two slide out menus . One on the right side of the view and one on the left side . I want to have both menus on the same side . Just like in the third example : SWRevealController Example 3 https : github.com John-Lluch SWRevealViewController tree master RevealControllerExample3 Unfortunatly there is no storyboard so I can t see how the segues are set etc . Can anyone point me in the right direction In the example it looks like there s a view controller called from within the main slide out menu which already has another slide out menu . .. . Answer : The solution for Swift was kindly provided here : SWRevealViewController Submenu in Swift https : github.com John-Lluch SWRevealViewController issues 593", "Question : I am using SWRevealViewController in order to implement a side nav menu in my app . I would like to make it so that the front view cannot be interacted with when the rear view is opened except that when the user taps the front view the rear view will close and the front view can be interacted with again . I have these two SWRevealViewController delegate methods that currently remove interaction from the front view . However this doesn t cause the rear view to close when the front view is tapped . Any help would be greatly appreciated thanks Comment : how did you implement this where Comment : This might help you : nsrover.wordpress.com 2014 08 06 http : nsrover.wordpress.com 2014 08 06 swrevealviewcontroller-disabling-user-interaction-when-toggled-to-rearview .. . Answer : EDIT : Change UIView s autoresizingMask to suit Swift 2 thanks to Marroc https : stackoverflow.com users 5135104 marcoc s comment https : stackoverflow.com questions 22275911 swrevealviewcontroller-close-rear-view-when-tapping-front-view 31941552 noredirect 1 comment56113646 31941552 .. . .. . This is Swift-SWRevealViewController 2.x version of @avdyushin s answer : Comment : If you use Swift 2 change the line of lock.autoresizingMask with : lock.autoresizingMask UIViewAutoresizing.FlexibleWidth UIViewAutoresizing.FlexibleHeight Comment : @Marcoc updated : Comment : Correct and simple answer with quite a useful logic which can be applied at many places apart from this also ." ] }
[ "yes-answer-long", "yes-answer-short" ]
facebook
UNK_RELATION
ifs@ksh@62
ifs -- ifs is a variable in unix shells bourne posix sh bash @placeholder that controls how unescaped substitutions are split into words .
{ "confidence": [ 60.86402130126953, 46.12477111816406, 44.763484954833984, 44.53241729736328, 43.9677734375, 43.63197326660156, 43.186946868896484, 41.66115951538086, 40.941131591796875, 40.651302337646484, 40.33475875854492, 39.71052169799805, 39.71052169799805, 39.21683120727539, 39.07046890258789, 38.95711135864258, 38.173789978027344, 38.13398361206055, 37.96932601928711, 37.96932601928711, 37.96932601928711, 37.96932601928711, 37.712337493896484, 37.64029312133789, 37.520263671875, 37.49393081665039, 37.00776672363281, 37.00776672363281, 37.00776672363281, 37.00776672363281, 36.25492858886719, 36.25492858886719, 36.25492858886719, 36.06010055541992, 36.06010055541992, 35.83457946777344, 35.740238189697266, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.000282287597656, 35.000282287597656, 34.7083625793457, 34.50185012817383, 33.938880920410156, 33.9281005859375, 33.7529182434082, 33.64559555053711, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.423744201660156, 33.423744201660156, 33.41649627685547, 33.167930603027344, 33.167930603027344, 33.167930603027344, 33.16717529296875, 33.16717529296875, 33.098079681396484, 32.87220764160156, 32.6063117980957, 32.6063117980957, 32.541015625, 32.50737762451172, 32.50737762451172, 32.50737762451172, 32.50737762451172, 32.122047424316406, 32.10407638549805, 32.03776931762695, 31.938705444335938, 31.600479125976562, 31.28749656677246, 31.28749656677246, 31.1024169921875, 31.065582275390625, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422 ], "content": [ "By the definition of IFS surely it would mean that unescaped substitutions would be split into words using a newline rather than a space .", "Blank IFS is don t split .", "Default IFS is not an unset IFS .", "You are getting two words back the normal IFS will split that correctly .", "For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces .", "IFS basically sets IFS to null .", "So with IFS IFS", "When assigning to a variable IFS characters should be stripped : the results shall be split into fields as in the shell for the results of parameter-expansion of course -n and -N are not POSIX .", "Hi IFS is for space but what is", "I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n .", "yes but default IFS unset IFS is not the same than empty IFS that is the one used in this set .", "Isn t IFS : command changing IFS just in the scope of the command being executed", "Great point about the difference between echo IFS and echo IFS .", "+1 cat doesn t use IFS things like IFS read a b c work because read is a bash builtin not an external program .", "A newline is part of the default IFS setting in other words it is a delimiter .", "by manipulating IFS .", "IFS behaves fine with read on the same line : .. . .. . Check value of IFS : .. . .. . so clearly IFS has not been tampered in current shell .", "I have found following code line in script : IFS IFS", "Why are you having - in IFS if you dont want to split on hyphen .", "IFS is used not just to join the elements of X but also to split the unquoted expansion @ .", "@EtanReisner So is there NO absolute way to do a blank split using IFS", "There s no split every character trick with IFS that I m aware of .", "IFS n doesn t set IFS to newline it sets IFS to a literal string n .", "That s because IFS is set to : .. . .. . Output : .. . .. . man bash says : .. . .. . IFS The Internal Field Separator that is used for word splitting after expansion .. .", "It means you are specifying the IFS to use newline for splitting .", "Regardless of the value of IFS words in a command are separated by unquoted whitespace .", "echo NextFile IFS read .. .", "IFS read WORKING STORE .", "Regarding question 1 : IFS", "did you try IFS", "Perfect just an editorial comment in case 2 : IFS unset should be IFS empty .", "When you write .. . .. . IFS expands to : but because : is the first character of IFS it is removed during word splitting .", "MS Office description of IFS https : support.office.com en-us article IFS-function-36329a26-37b2-467c-972b-4a39bd951d45 .", "i tought with changing the IFS Variable i can do this in this case too", "Should I store it in a temporary variable or run IFS and the for statement in a subshell", "In IFS we are creating Crystal Reports for the reports that is not given by IFS .", "How can I use IFS to seperate the string to 5 parts like this", "Just unset IFS and then populate array", "Is there a way to do the same thing with IFS", "No IFS based splitting on individual character .", "But I need an alternative to the syntax for IFS .", "And the IFS read it as the separation of two values .", "In your case it will act same as IFS n", "So if IFS is null then it s the same as newline", "If IFS is null the parameters are joined without intervening separators .", "Using .. . .. . would show that IFS is still set to : .", "for starters as far as I know there is no IFS formula in Excel .", "I take that back about the IFS statement .", "my understanding of the IFS is it only dealt with true conditions .", "I m learning bash and I saw this construction : .. . .. . Can anyone explain what IFS do", "Running these commands gives expected results .. . .. . However it appears with Bash 4.2 the IFS value is being ignored .. . .. . What is causing this difference", "There is not such thing as ELF for IFS .", "That usage of IFS is not local to that one line .", "I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine .", "By doing IFS cat foo foo expands well as 111 222 333 not affected by IFS as shown by cat which is 111 222 333 .", "- Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b", "I understand on CHGAUT USER PUBLIC refers to the last group of IFS aka UNIX permission settings .", "IFS is only used for splitting fields in a single string .", "By default permission setting under IFS will be 700 .", "Try n but why are you messing with IFS at all", "Not sure if I m getting caught up on the loop or on the IFS .", "takes off two characters from the left of IFS .", "I have two specific questions about the IFS .", "Setting the IFS doesn t seem to do anything .", "Add the IFS as part of your program s call to system .", "Because that adds a b to IFS I checked .", "There is a bug in bash fixed in version 4.3 that causes the IFS setting to be incorrectly mixed with the parameter-expansion in the here string .", "I m aware that changing the internal field separator IFS changes what the bash script iterates over .", "And what if there are other scripts executing during that time at which the value of the variable is changed which make use of the IFS variable", "And since IFS is used both to combine the fields being expanded and then to split them again the gets swallowed by field splitting .", "Also your line : .. . .. . is really no different from .. . .. . Since that expansion is not quoted it will be word-split using the current value of IFS .", "As mentioned above if the expansion is not quoted the expanded text is then word-split using the value of IFS .", "To illustrate first observe with IFS set to nothing : .. . .. . The line variable contains all the white space it received on its stdin .", "So IFS will-change the behavior of assigning a white-space to a variable and causes a space to be assigned to c rather than a null .", "As we have IFS to change the field separators does Bash have any other variable to set the record separators like awk for example has", "Example file : .. . .. . How to use IFS : to read that file with a .sh file line by line and add the third part so that it would output the addition e.g .", "When the expansion occurs within a double-quoted string see Double-Quotes it shall expand to a single field with the value of each parameter separated by the first character of the IFS variable or by a if IFS is unset .", "I ve tried playing around with the IFS variable but I don t really know what I m doing with it and can t seem to get it working with that either although I suspect the solution has something to do with IFS .", "If you want to set IFS to newline use :", "This is a different question and I m asking only about what IFS means .", "IFS does many things but you are asking about that particular loop .", "I m trying to parse a .csv file and I have some problems with IFS .", "I would like to use multiple criteria for one criteria in an IFS formula .", "If I want to read a string and split it on a given delimiter I can set IFS and store string slices in an array .", "IFS is the Internal Field Separator it controls word-splitting it has no effect on multi-line control .", "So I made an usr executeable in my Home-Directory and set the Path to the Home PATH HOME : PATH .. . .. . And I want to change the IFS Variable in the bash to : export IFS .. . .. . Unfortunatelly when i call the C-Programm : my exploit doesn t work .. . .. . Is anybody able to tell me what is wrong", "It was the circularity of IFS being used to affect the display of IFS that confused me initially I was pretty sure assignment statements didn t have environments but I couldn t immediately put my finger on why echo IFS seemed to display the old value .", "A follow up question - what happens if there are multiple lines in input how does -r and IFS affect multiple line inputs", "IFS is a file system with many binaries and scripts .", "In my company we are using IFS as an ERP solution .", "I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not .", "This is an example script based on @rici http : stackoverflow.com users 1566221 rici s answer : .. . .. . Output .. . .. . .. . .. . Bash manpage says : .. . .. . The shell treats each character of IFS as a delimiter and splits the results of the other expansions into words on these characters .", "I m playing around with the Iterated Function System IFS Chaos Game algorithms .", "I got some headache managing AS 400 IFS authorities .", "IFS read h e l l o temp does not work .", "Rather than setting IFS globally set it just for the read command .", "IFS read -a params str will reset the delimeter globally or only for this statement", "Prepending IFS to a command makes it affect just the scope of the command .", "Here s my example : .. . .. . But why does the length not get affected by the new IFS", "Note that once the child-process is terminated the IFS set will no longer be available in the parent ." ] }
{ "confidence": [ 69.29359436035156, 68.92449951171875, 63.327571868896484, 61.000160217285156, 56.431358337402344, 54.6865119934082, 53.03025436401367, 53.0267219543457, 52.68894577026367, 52.46464538574219, 51.88681411743164, 51.352622985839844, 50.394718170166016, 48.66946792602539, 48.593387603759766, 48.221405029296875, 47.8452033996582, 47.581642150878906, 47.068580627441406, 46.62691116333008 ], "content": [ "Question : Hi IFS is for space but what is Comment : A new line return Comment : @musefan hi are you telling me or asking me Comment : I had a feeling you were going to say that.. . I am guessing as it seems logical . I would have though you were in some sort of position to be able to validate that . By the definition of IFS surely it would mean that unescaped substitutions would be split into words using a newline rather than a space . You might want to consider modifying your question to include some context . Where have you seen it like this for example Comment : i saw in internet today somewhere brother but cannot fin it again : is there anything like that .. . Answer : It means you are specifying the IFS to use newline for splitting . This would be similar to doing : .. . .. . The difference being is that your way is POSIX compliant . My sources for this answer are here http : stackoverflow.com a 26157072 838807 and here http : stackoverflow.com a 19822980 838807 .. . .. . You may find that the different methods are preferred depending on which shell implementation you are using I think that s the right term .. . .. . NOTE : My answer is based purely on the last 10 minutes of research I have no prior experience or knowledge with this .", "Question : I m trying to use for in the shell to iterate over filenames with spaces . I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine . I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n . The former works but the latter doesn t . The comment is upvoted several times . I checked the output and the variable doesn t seem to contain the newline . The output shows the field separator is missing for the first : .. . .. . .. . But is proper on the second : .. . .. . .. . .. . .. . I found an answered question which may or may not be a duplicate of my question : .. . linux - When setting IFS to split on newlines why is it necessary to include a backspace - Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b Because that adds a b to IFS I checked . Can a b occur in a file name I don t want my code to split a file name by mistake . Also do you have any recommendations on how to properly handle restoration of IFS after the for-loop Should I store it in a temporary variable or run IFS and the for statement in a subshell and how to do that Thanks .. . Answer : Since newlines are stripped by command substitution as @DigitalTrauma correctly wrote you should use a different POSIX compliant way . writes a newline and assign it to it . Simple and effective . If you don t like assignments that span over two lines you may use printf as alternative . Comment : Thank you for the information I will keep that in mind", "Question : I m trying to use for in the shell to iterate over filenames with spaces . I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine . I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n . The former works but the latter doesn t . The comment is upvoted several times . I checked the output and the variable doesn t seem to contain the newline . The output shows the field separator is missing for the first : .. . .. . .. . But is proper on the second : .. . .. . .. . .. . .. . I found an answered question which may or may not be a duplicate of my question : .. . linux - When setting IFS to split on newlines why is it necessary to include a backspace - Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b Because that adds a b to IFS I checked . Can a b occur in a file name I don t want my code to split a file name by mistake . Also do you have any recommendations on how to properly handle restoration of IFS after the for-loop Should I store it in a temporary variable or run IFS and the for statement in a subshell and how to do that Thanks .. . Answer : Update - changing my pseudo-comment to a real answer . I think this answer http : unix.stackexchange.com questions 17732 where-has-the-trailing-newline-char-gone-from-my-command-substitution should explain the behavior you are seeing . Specifically command substitution operators and backticks will strip trailing newlines from the command output . However the direct assignment in your second example doesn t do any command subsitution so works as expected . So I m afraid to say I think the upvoted comment you refer to is incorrect . .. . .. . I think the safest way to restore IFS is to set it in a subshell . All you need to do is put the relevant commands in parentheses : .. . .. . Of course invoking a subshell incurs a small delay so performance needs to be considered if this is to be repeated many times . .. . .. . As an aside be very careful filenames can contain both b and n . I think just about the only characters they cannot contain are slash and 0 . At least thats what it says on this wikipedia article http : en.wikipedia.org wiki File name Comparison of filename limitations .", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : In bash you can set set a variable that is valid for a single statement only if that statement is not itself a variable assignment . For example : .. . .. . To make the second assignment part of a statement you need .. . some other statement . As you ve noticed eval works . In addition read should work : Comment : Note that this issue arose in a question requiring POSIX-compliant code which is why the here string wasn t considered . Comment : Aaah so this is the issue I couldn t understand why eval was making it work . Comment : Thanks again . Pity I cannot accept the three answers since I learnt much from them all Comment : My pleasure . And notwithstanding the fact that I diagnosed the issue first in the other Q chepner s answer to this question was the only one that included the correct terminology of simple commands . And of course anubhava doesn t need any more points he s already already earned an all-time high score . :", "Question : According to read -N description in manual page : .. . .. . -N nchars return only after reading exactly NCHARS characters unless EOF is encountered or read times out ignoring any delimiter .. . .. . However in answer to following command : .. . .. . both space and newline have been translated into empty string while in the command : .. . .. . space and newline have been stored correctly in the variable . So it seems delimiters still has some processing in read or while command that I do not understand . We could compare these results with the ones using read -n that manual described as : .. . .. . -n nchars return after reading NCHARS characters rather than waiting for a newline but honor a delimiter if fewer than NCHARS characters are read before the delimiter .. . Answer : This is POSIX http : pubs.opengroup.org onlinepubs 9699919799 utilities read.html behaviour . When assigning to a variable IFS characters should be stripped : the results shall be split into fields as in the shell for the results of parameter-expansion of course -n and -N are not POSIX . This is born-out by the read source code comments : Comment : Very interesting . Only the conversion of newline to empty string in case of while IFS read -n1 c seems difficult to match with these descriptions . I ve expected or end of loop and nothing printed or a newline assignment . In fact this case is the only one difference found between -n1 and -N1 tests . Comment : A newline is part of the default IFS setting in other words it is a delimiter . I don t see any inconsistency . Comment : yes but default IFS unset IFS is not the same than empty IFS that is the one used in this set . Moreover space is also in the default delimiter set and in this test is handled in a different way . Comment : Default IFS is not an unset IFS . The default is set to r n .", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : I was going to comment on this when I saw you use it but it didn t occur to me until just now what the problem was . The line .. . .. . doesn t temporarily set IFS it simply sets two variables in the current shell . Simple commands can be prefixed with local environment settings but an assignment statement itself is not a simple command . When you write .. . .. . IFS expands to : but because : is the first character of IFS it is removed during word splitting . Using .. . .. . would show that IFS is still set to : . Comment : Great point about the difference between echo IFS and echo IFS . As everybody always says quote your variables in bash . : - Comment : It was the circularity of IFS being used to affect the display of IFS that confused me initially I was pretty sure assignment statements didn t have environments but I couldn t immediately put my finger on why echo IFS seemed to display the old value . : Comment : Niiiice and thanks for the answer indicating why I was doing it the wrong way .", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : IFS behaves fine with read on the same line : .. . .. . Check value of IFS : .. . .. . so clearly IFS has not been tampered in current shell . Now check original input : .. . .. . or : Comment : Interesting and many thanks anubhava . Note what the other posters mention seems to be the problem : my command is executing two assignments . So what you suggest is clever : instead of two assignments we now have one temporal assignment and a command . Comment : As always thanks a lot for your kind answer anubhava It s a pity I cannot accept the three answers since all of them add very valuable information Comment : You re most welcome . You ve indeed marked the right answer as accepted as @Chepner correctly explained the cause of the problem .", "Question : I have two specific questions about the IFS . I m aware that changing the internal field separator IFS changes what the bash script iterates over . So why is it that the length of the array doesn t change Here s my example : .. . .. . But why does the length not get affected by the new IFS The second thing that I don t understand is how to make the IFS affect the input arguments . Let s say I m expecting my input arguments to look like this : .. . .. . And I want to parse the input arguments by setting the IFS to : . How do I do this Setting the IFS doesn t seem to do anything . I must be doing this wrong... . Thank you . .. . Answer : Bash arrays are in fact arrays . They are not strings which are parsed on demand . Once you create an array the elements are whatever they are and they won t change retroactively . However nothing in your example creates an array . If you wanted to create an array out of argument 2 you would need to use a different syntax : .. . .. . Although your strings to find is not an array bash allows you to refer to it as though it were an array of one element . So strings to find @ will always be one regardless of the contents of strings to find . Also your line : .. . .. . is really no different from .. . .. . Since that expansion is not quoted it will be word-split using the current value of IFS . If you use an array most of the time you will not want to write for string in strings to find @ because that just reassembles the elements of an array into a string and then word-splits them again which loses the original array structure . Normally you will avoid the word-splitting by using double quotes : .. . .. . As for your second question the value of IFS does not alter the shell grammar . Regardless of the value of IFS words in a command are separated by unquoted whitespace . After the line is parsed the shell performs parameter and other expansions on each word . As mentioned above if the expansion is not quoted the expanded text is then word-split using the value of IFS . If the word does not contain any expansions no word-splitting is performed . And even if the word does contain expansions word-splitting is only performed on the expansion itself . So if you write : .. . .. . my function will be called with a single argument no expansion takes places so no word-splitting occurs . However if you use 1 unquoted inside the function the expansion of 1 will be word-split if it is expanded in a context in which word-splitting occurs . On the other hand .. . .. . will cause my function to be invoked with three arguments . And finally .. . .. . is exactly the same as the first invocation because there is no : in the expansion .", "Question : In Shell script I want to achieve something like below : .. . .. . I want to split it and concatenate each item as below and assign to some variable .. . .. . so that I can use above concatenated string in my next command as below .. . .. . I found a way using local IFS and for-loop but the variable updated inside loop is not retaining value outside of loop because it runs in a separate bash . .. . Answer : Below code would do : .. . .. . Also when you pass new string as parameter to curl double quote it to prevent word splitting and globbing so do : .. . .. . Note : or herestring is only supported in a few shells Bash ksh or zsh if I recall correctly . If your shell does not support it use echo pipe combination .", "Question : Being new to shell scripting I am not clear about the Quoting and splitting concepts in bash . In the below snippet : .. . .. . with IFS being : - I thought the result would be : .. . .. . as I had quoted them france-country . I think it should not get split on - . But the results were : .. . .. . It would be great if someone can point me out my mistake in understanding . Comment : Why are you having - in IFS if you dont want to split on hyphen . Just remove it .. . Answer : For your problem you can simply change the field separator as : i.e . IFS : because each country name is separated by : not : - in your example .. . .. . FYI array elements in bash are separated by space so the whole string france-country : Italy-country : singapore-country is a single element of the array therefore echo array1 @ will always be 1 . So I do not see any use of an array in this example . Simple variable would have been suffice .", "Question : I m trying to split key-value pairs around an sign which I then use to edit a config file using bash . But I need an alternative to the syntax for IFS . The below works on my host system but when i log in to my ubuntu virtual-machine through ssh I have the wrong bash version . Whatever I try fails . I am definitely calling the right version of bash at the top of the file using bin bash and I ve tried bin sh etc too . I know I can use IFS as follows on my host mac os x system : .. . .. . But this doesn t work on my vm . I also know that I can should be able to switch the syntax through backticks or echo var .. . but I can t get it to work - as follows : .. . .. . Grateful for any pointers as I m really new to bash . Comment : What bash version does your VM have What error are you getting Comment : Syntax error : redirection unexpected 4.3.11 1 -release Comment : Related : Bash split string on delimiter assign segments to array http : stackoverflow.com questions 15777996 bash-split-string-on-delimiter-assign-segments-to-array .. . Answer : Your attempts have been confounded because you have to use the variable in the same sub-shell as read . And if you want your variable durable ie outside the sub-shell scope : .. . .. . Clearly it isn t pretty . .. . .. . Update : If -a is missing that suggests you re out of the land of arrays . You can try parameter substitution : .. . .. . And if that doesn t work fall back to good ole cut : Comment : both of these work on my mac but give me a bad substitution illegal option -a error on the vm Comment : Alternatives posted . Good luck Comment : Thanks - managed to get your third example working", "Question : I have two specific questions about the IFS . I m aware that changing the internal field separator IFS changes what the bash script iterates over . So why is it that the length of the array doesn t change Here s my example : .. . .. . But why does the length not get affected by the new IFS The second thing that I don t understand is how to make the IFS affect the input arguments . Let s say I m expecting my input arguments to look like this : .. . .. . And I want to parse the input arguments by setting the IFS to : . How do I do this Setting the IFS doesn t seem to do anything . I must be doing this wrong... . Thank you . .. . Answer : This is an example script based on @rici http : stackoverflow.com users 1566221 rici s answer : .. . .. . Output .. . .. . .. . .. . Bash manpage says : .. . .. . The shell treats each character of IFS as a delimiter and splits the results of the other expansions into words on these characters . Comment : which man page did you find that quote I seem unable to find the correct manpage for this . Comment : @Sother : Manual page bash 1 line 1758 . In case of trouble do a pattern search in bash . Comment : That quote is useful and I would have emphasized results of the other expansions but there is a clear statement in the last paragraph of that section word splitting : Note that if no expansion occurs no splitting is performed .", "Question : I have two questions . 1 . I have found following code line in script : IFS IFS I would like to understand what it is exactly doing 2 . When I am trying to perform something in every place from directory like eg . : .. . .. . 1 home user bin etc something.. . .. . .. . .. . so I need to change IFS to and then proceed this in for-loop like .. . .. . while -e 1 do .. . for F in 1 .. . do something .. . done .. . shift .. . done .. . .. . .. . Is that the correct way Comment : Not exactly sure what you re trying to do in question 2 . Regarding question 1 : IFS takes off two characters from the left of IFS . Check out man bash for Parameter Expansion . You can also read Bash FAQ 73 http : mywiki.wooledge.org BashFAQ 073 . Comment : I have two questions . Then post two separate questions so we can discuss and answer them in isolation and a single answer can eventually be accepted as the solution . Thanks Comment : Remember Also if it worked out you may mark the answer as accepted by clicking on tick mark on top-left of an answer http : meta.stackexchange.com a 5235 160242 . .. . Answer : var is a shell parameter-expansion https : www.gnu.org software bash manual bashref.html Shell-Parameter-Expansion . It tries to match the beginning of var with the pattern written after . If it does it returns the variable var with that part removed . Since matches any character this means that var removes the first two chars from the var var . So with IFS IFS you are resetting IFS https : www.gnu.org software bash manual bashref.html Word-Splitting to its value after removing its two first chars . .. . .. . To loop through the words in a -delimited string you can store the splitted string into an array and then loop through it :", "Question : I m trying to split key-value pairs around an sign which I then use to edit a config file using bash . But I need an alternative to the syntax for IFS . The below works on my host system but when i log in to my ubuntu virtual-machine through ssh I have the wrong bash version . Whatever I try fails . I am definitely calling the right version of bash at the top of the file using bin bash and I ve tried bin sh etc too . I know I can use IFS as follows on my host mac os x system : .. . .. . But this doesn t work on my vm . I also know that I can should be able to switch the syntax through backticks or echo var .. . but I can t get it to work - as follows : .. . .. . Grateful for any pointers as I m really new to bash . Comment : What bash version does your VM have What error are you getting Comment : Syntax error : redirection unexpected 4.3.11 1 -release Comment : Related : Bash split string on delimiter assign segments to array http : stackoverflow.com questions 15777996 bash-split-string-on-delimiter-assign-segments-to-array .. . Answer : Your first failed attempt is because and are different operators . opens the named file . The second fails because read only sets the value of array in the subshell started by the pipe that shell exits after the completion of the pipe and array disappears with it . The third fails for the same reason as the second the declare that follows doesn t make any difference .", "Question : Running these commands gives expected results .. . .. . However it appears with Bash 4.2 the IFS value is being ignored .. . .. . What is causing this difference I found the answer here .. . .. . http : lists.gnu.org archive html bug-bash 2014-03 msg00065.html .. . .. . It looks as though this has been an error all along . According to Chet redirections should never have had access to the temp environment IFS in this case Comment : @fedorqui spooky I m on GNU bash version 4.2.45 2 -release x86 64-slackware-linux-gnu and can reproduce the OP s behaviour Comment : Reproduced with GNU bash version 4.3.11 1 -release x86 64-pc-linux-gnu . Output is 111 222 333 Comment : For those interested this is the changelog of bash 4.2 : github.com sunny256 bash blob master CWRU changelog https : github.com sunny256 bash blob master CWRU changelog Somewhere there must be some explanations as it is from 4.1 to 4.2 when this changes . Comment : This may also be loosely related to stackoverflow.com q 20144593 1126841 http : stackoverflow.com q 20144593 1126841 in that proper support of here strings and IFS seems to be an ongoing process . .. . Answer : I find the behaviour of 4.2 correct as word splitting should happen first before evaluation of assignments : .. . .. . I believe the new value of IFS should only affect cat and not foo . The proper way to do that is .. . .. . And for a conservative approach we can use a function : .. . .. . I also have a guess that it s related to this : .. . .. . Update .. . .. . Another confusing behavior can be found in 4.2 which is already fixed in 4.3 . By doing IFS cat foo foo expands well as 111 222 333 not affected by IFS as shown by cat which is 111 222 333 . However when we do IFS read bar foo echo bar the output would be 111 222 333 and would appear as-if foo expanded as 111 222 333 . This inconsistent behavior is no longer happening in Bash 4.3 and Bash 4.3 s behavior is probably a fix . Comment : +1 cat doesn t use IFS things like IFS read a b c work because read is a bash builtin not an external program .", "Question : I ve been surprised with the line marked in the following example : .. . .. . Here is my understanding of the behavior : .. . .. . X and X @ both expand to a b .. . X expands to a b .. . X @ expands to a b .. . and @ have the same behavior as X and X @ except for their content being the parameters of the program or function .. . .. . This seems to be confirmed by the bash manual http : www.gnu.org software bash manual bashref.html Arrays . In the line log1 X I therefore expect the quoted expression to expand to a b then to be passed to the log1 function . The function has a single string parameter which it displays . Why does something else happen It d be cool if your answers were backed by manual standard references .. . Answer : In the POSIX spec section on Special Parameters http : pubs.opengroup.org onlinepubs 9699919799 utilities V3 chap02.html tag 18 05 02 we find . @ .. . .. . Expands to the positional parameters starting from one . When the expansion occurs within double-quotes and where field splitting see Field Splitting is performed each positional parameter shall expand as a separate field with the provision that the expansion of the first parameter shall still be joined with the beginning part of the original word assuming that the expanded parameter was embedded within a word and the expansion of the last parameter shall still be joined with the last part of the original word . If there are no positional parameters the expansion of @ shall generate zero fields even when @ is double-quoted . .. . .. . .. . Expands to the positional parameters starting from one . When the expansion occurs within a double-quoted string see Double-Quotes it shall expand to a single field with the value of each parameter separated by the first character of the IFS variable or by a if IFS is unset . If IFS is set to a null string this is not equivalent to unsetting it its first character does not exist so the parameter values are concatenated . So starting with the quoted variants they are simpler : .. . .. . We see that the expansion expand s to a single field with the value of each parameter separated by the first character of the IFS variable . This is why you get a b from echo X and log2 X . We also see that the @ expansion expands such that each positional parameter shall expand as a separate field . This is why you get a b from echo X @ and log2 X @ . Did you see that note about field splitting in the spec text where field splitting see Field Splitting is performed That s the key to the mystery here . Outside of quotes the behavior of the expansions is the same . The difference is what happens after that . Specifically field word splitting . The simplest way to show the problem is to run your code with set -x enabled . Which gets you this : .. . .. . The thing to notice here is that by the time log1 is called in all but the final case the is already gone . The reason it is already gone is because without quotes the results of the variable expansion in this case the expansion are field word split . And since IFS is used both to combine the fields being expanded and then to split them again the gets swallowed by field splitting . And to finish the explanation for the case actually in question the reason this fails for log1 even with the quoted version of the expansion in the call i.e . log1 X which expands to log1 a b correctly is because log1 itself does not use a quoted expansion of @ so the expansion of @ in the function is itself word-split as can be seen by echo a b in that log1 case as well as all the other log1 cases .", "Question : Being new to shell scripting I am not clear about the Quoting and splitting concepts in bash . In the below snippet : .. . .. . with IFS being : - I thought the result would be : .. . .. . as I had quoted them france-country . I think it should not get split on - . But the results were : .. . .. . It would be great if someone can point me out my mistake in understanding . Comment : Why are you having - in IFS if you dont want to split on hyphen . Just remove it .. . Answer : This script shows how to split a colon-separated string into a Bash array . output .. . .. . Note that in .. . .. . we don t put quotes around words as that would prevent word splitting . We don t actually need the quotes in .. . .. . but quotes either single or double would be needed if there were any spaces in that string . Similarly the quotes are superfluous in numwords array1 @ and many Bash programmers would omit them because we know the result-of array1 @ will never have spaces in it . It s a Good Idea to always use quotes in Bash unless you re sure you don t want them eg in the case of array1 words above or when performing tests with the .. . syntax . I suggest you bookmark BashGuide http : mywiki.wooledge.org BashGuide and browse through their FAQ . But the only way to really learn the arcane ways of quoting and splitting in Bash is to to write lots of scripts . : .. . .. . You may also find ShellCheck http : www.shellcheck.net helpful .", "Question : For educational reasons I have to exploit an C-Code .. . .. . The Programm set the egid first and then the vulnerability with the system usr bin .. . Command . So I made an usr executeable in my Home-Directory and set the Path to the Home PATH HOME : PATH .. . .. . And I want to change the IFS Variable in the bash to : export IFS .. . .. . Unfortunatelly when i call the C-Programm : my exploit doesn t work .. . .. . Is anybody able to tell me what is wrong Comment : Welcome to Stack Overflow . This is one of those situations where you should show what you ve tried as an SSCCE a Short Self-Contained Correct Compiling Example http : sscce.org both to demonstrate that you ve put some effort into the question and to allow us to see what you re doing . Please read the FAQ http : stackoverflow.com tour soon . .. . Answer : Add the IFS as part of your program s call to system . System executes the code with usr bin sh -c . So you can do similar to what you d in the shell prompt . Note that once the child-process is terminated the IFS set will no longer be available in the parent . Comment : I cant change the String in the System Command . I have to exploit it . So i want the given system usr bin .. . redirect to my usr executable . Similar it work with relative paths in system . myProg . i tought with changing the IFS Variable i can do this in this case too Am I Wrong Comment : Can you post a complete code Am not sure what exactly you want you achieve", "Question : In Shell script I want to achieve something like below : .. . .. . I want to split it and concatenate each item as below and assign to some variable .. . .. . so that I can use above concatenated string in my next command as below .. . .. . I found a way using local IFS and for-loop but the variable updated inside loop is not retaining value outside of loop because it runs in a separate bash . .. . Answer : Comment : I believe this is the best and simplest way to go about it", "Question : I m learning bash and I saw this construction : .. . .. . Can anyone explain what IFS do I know it s input field sepereter but it s being set to nothing Comment : possible duplicate of Is there any difference in bash between while read -r line do .. . done file and cat file while IFS read -r line do .. . done http : stackoverflow.com questions 26471631 is-there-any-difference-in-bash-between-while-read-r-line-do-done-file Comment : @AvinashRaj I asked that question yesterday about difference between two loops . This is a different question and I m asking only about what IFS means . Comment : IFS basically sets IFS to null . In your case it will act same as IFS n Comment : It s a simple question You could ask this to the previous question answerer @Chepner . Comment : @anubhava Thanks . So if IFS is null then it s the same as newline .. . Answer : IFS does many things but you are asking about that particular loop . The effect in that loop is to preserve leading and trailing white space in line . To illustrate first observe with IFS set to nothing : .. . .. . The line variable contains all the white space it received on its stdin . Now consider the same statement with the default IFS : .. . .. . In this version the white space internal to the line is still preserved . But the leading and trailing white space have been removed . What does -r do in read -r The -r option prevents read from treating backslash as a special character . To illustrate we use two echo commands that supply two lines to the while-loop . Observe what happens with -r : .. . .. . Now observe what happens without -r : .. . .. . Without -r two changes happened . First the double-backslash was converted to a single backslash . Second the backslash on the end of the first line was interpreted as a line-continuation character and the two lines were merged into one . In sum if you want backslashes in the input to have special meaning don t use -r . If you want backslashes in the input to be taken as plain characters then use -r . Multiple lines of input .. . .. . Since read takes input one line at a time IFS behaves affects each line of multiple line input in the same way that it affects single line input . -r behaves similarly with the exception that without -r multiple lines can be combined into one line using the trailing backslash as shown above . The behavior with multiple line input however can be changed drastically using read s -d flag . -d changes the delimiter character that read uses to mark the end of an input line . For example we can terminate lines with a tab character : .. . .. . Here the .. . construct was used to enter special-characters like newline n and tab t . Observe that with -d t read divides its input into lines based on tab characters . Anything after the final tab is ignored . How to handle the most difficult file names .. . .. . The most important use of the features described above is to process difficult file names . Since the one character that cannot appear in path filenames is the null character the null character can be used to separate a list of file names . As an example : Comment : +1 nice explanation . What s the meaning of -r Comment : @AvinashRaj Thanks . For -r see updated answer . Comment : Excellent explanation . A follow up question - what happens if there are multiple lines in input how does -r and IFS affect multiple line inputs Comment : @bodacydo See updated answer . Comment : @John1024 Best answer ever" ] }
[ "yes-answer-long", "yes-answer-short" ]
ksh
UNK_RELATION
twill@web@86
twill -- twill is an open-source language written in python that allows browsing the @placeholder from a command-line interface .
{ "confidence": [ 50.67482376098633, 49.97990798950195, 48.15293502807617, 47.9925422668457, 46.94913864135742, 46.78144454956055, 46.25004577636719, 46.25004577636719, 46.182273864746094, 46.12935256958008, 46.01081085205078, 44.48402786254883, 44.136138916015625, 43.834144592285156, 43.80970001220703, 43.64169692993164, 43.579307556152344, 43.51485824584961, 43.30225372314453, 43.23562240600586, 43.15833282470703, 43.044620513916016, 42.363929748535156, 42.188819885253906, 42.188819885253906, 42.188819885253906, 42.188819885253906, 41.877647399902344, 41.877647399902344, 41.734840393066406, 41.705467224121094, 40.5153923034668, 40.46973419189453, 40.46973419189453, 40.46973419189453, 40.325767517089844, 39.80632019042969, 39.80632019042969, 39.80632019042969, 39.80632019042969, 39.78908920288086, 39.56224060058594, 39.44614791870117, 39.44614791870117, 39.44614791870117, 39.44614791870117, 39.44614791870117, 39.30333709716797, 38.428977966308594, 38.35738754272461, 38.35462951660156, 38.351806640625, 38.20298385620117, 38.20298385620117, 38.16099548339844, 38.16099548339844, 38.16099548339844, 38.16099548339844, 38.07000732421875, 37.97687911987305, 37.8313102722168, 37.77113723754883, 37.624717712402344, 37.23371124267578, 37.069480895996094, 37.069480895996094, 37.069480895996094, 37.046417236328125, 36.67900466918945, 36.67900466918945, 36.67900466918945, 36.55765914916992, 35.91048812866211, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.761268615722656, 35.46614074707031, 35.2249870300293, 35.193214416503906, 35.193214416503906, 35.193214416503906, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582, 35.0336799621582 ], "content": [ "That s a twill command not python code .", "Twill is an amazing scripting-language for Web browsing and it does all I want", "by means of using Twill from Python .", "Put your twill commands into a file for example test.twill .. . .. . And then just pass filename as parameter to twill-sh command like .. . .. . And you might want to check .twill sample codes in tests folder of twill source", ".. . twill works with Python 2.3 or later .", "Using twill from Python .. . .. . There are two fairly simple ways to use twill from Python .", "To start using twill install it and then type twill-sh .", ".. . To start using twill install it and then type twill-sh .", "some folders on this list are located inside of other folders which are also mentioned in this list : .. . .. . E : twill-0.9 build lib twill extensions match parse .. . .. . E : twill-0.9 build lib twill extensions .. . .. . E : twill-0.9 build lib twill other packages mechanize dist .. . .. . E : twill-0.9 build lib twill other packages .. . .. . E : twill-0.9 build lib twill .. . .. . E : twill-0.9 twill extensions match parse .. . .. . E : twill-0.9 twill extensions .. . .. . E : twill-0.9 twill other packages mechanize dist .. . .. . E : twill-0.9 twill other packages .. . .. . E : twill-0.9 twill", "twill urllib", "Well what I ve done here is simply running a file from the twill shell using a twill command .", "Is that the twill shell", "Hi yeah run like python twill-sh", "Twill writes to stdout by default .", "The documentation for twill says that there s a formfile command .", "@brilliant for update 1 you need to run python twill-sh test.twill from command-prompt not python shell", "or just rename it to twill-sh.py : - then you can do twill-sh.py in command-prompt .", "There is one file called twill-sh in my twill-0.9 folder .", "I ve been trying to learn Twill Scripting on Python and I am using Python 3.4 and Twill 1.8.0 .", "This file I also placed in the twill-0.9 folder E : tmp twill-0.9 test.py and then I decided to try running it from twill shell using twill s runfile command and surprisingly it worked", "So I installed twill and am trying to login using twill commands : .. . .. . How to log in to a website using installed twill", "Yeah the twill stuff for python is not the best documentation in the world .", "I think that instead of using the twill shell you should instead directly call the functions using the twill python api http : twill.idyll.org python-api.html .", "Twill is AFAIK not being worked on .", "is there any other alternative for twill", "Thus using twill .", "It seems that there is such possibility in twill .", "You could able to load .twill file from twill-sh take a look on my answer .", "From the twill website http : twill.idyll.org browsing.html : .. . .. . twill strives to be a complete implementation of a Web browser omitting only JavaScript support .", "The code thats making the error is from Twill it s open-source : pastebin.com iJLZkj5Y http : pastebin.com iJLZkj5Y", "It don t worked because of miss matching of twill version .i used twill 0.9.1 in my laptop and used twill 1.8.0 in my openshift app .", "Yes I just tried both Your quick method twill-sh.py and the longer one python twill-sh with Path edited - they both work", "Twill may be checking this once on startup", "What version of twill are you using", "The way that Twill works is pretty straightforward .", "I m trying to run some automated functional tests using python and Twill .", "Yes opening https : scheme links is supported by twill .", "twill and urllib are not sharing data about your sessions .", "Is that an internal issue in twill package or I m misssing something", "Shame I was getting excited about twill .", "Twill is trying to import subprocess .", "Now change the folder by using cd command .. . .. . C : cd D : tmp twill-0.9 .. . .. . 4 . start the build-process .. . .. . D : tmp twill-0.9 python setup.py build .. . WARNING : importing distutils not setuptools", "Recently there has been activity on twill mailing list http : lists.idyll.org listinfo twill about upgrading it .", "If I run a twill script to download a web page will the twill script run any javascript inline or otherwise on the page", "The official twill site doesn t seem to indicate whether or not twill supports js which makes me guess that it doesn t", "Consider reading that ianbicking.org twill-in-javascript.html http : www.ianbicking.org twill-in-javascript.html before you discard .", "I have extracted twill-0.9.tar.gz to D : tmp twill-0.9 .. . .. . 2 .", "I m porting an open-source project which uses Janino for dynamic compilation of classes to YARN using Apache Twill .", "You need to run those commands inside twill shell instead of python shell .. . .. . You can put twill commands when you see .. . .. . or there is 2 only lines in twill-sh file .. . .. . you can just copy-paste that 2 lines to python prompt .", "I do have Python 2.5 installed on my computer - along with SDK from Google App Engine .. . .. . In the twill documentation section http : twill.idyll.org it says : .. . .. . .. . .. . Downloading twill .. . .. . The latest release of twill is twill 0.9 released Thursday December 27th 2007 it is available for download at http : darcs.idyll.org t projects twill-0.9.tar.gz .", "http : stackoverflow.com questions 2680185 how-to-log-in-to-a-website-using-installed-twill .. . .. . I used that thread to login to the twill shell .", "For any future sufferers I have found better luck in using mechanize instead of twill as twill is an un-updated thin shell for mechanize .", "Alternative way getting binary content with requests using twill cookie jar : stackoverflow.com questions 37910736 http : stackoverflow.com questions 37910736 python-twill-download-file-accessible-through-php-script 37911758 37911758", "I m trying to login in https : accounts.coursera.org using twill for python I tried this sheet of code .. . .. . twill doesn t detect the form in the page and showforms methods doesn t show anything", "Twill looks like a half solution to me .", "well beautifulsoup goes hand in hand with selenium and twill .", "Then I downloaded and extracted twill-0.9 into that folder .", "The same question was asked in the Apache Twill mailing list .", "The following works : .. . .. . My twill code .", "I managed to do it sending the cookie jar from twill to requests .", "Having installed Twill properly http : stackoverflow.com questions 2651334 how-can-i-start-using-twill I was able to execute some small commands from Twill shell .", "@ S.Mark : for update 1 you need to run python twill-sh test.twill from command-prompt - Am I missing something important there", "I m trying to take a URL from a list 1500 entries and access them one by one using the twill lib for python .", "Here https : github.com ctb twill blob master twill other packages subprocess.py is the twill s version of subprocess wich looks like it has been copy pasted from an old version of python .", "Or will I need to use something like mechanize or twill", "The twill stuff is a little clearer for me this way :", "Apparently twill imports its own mechanize version .", "Looking at the twill Google Code project it appears that twill includes its dependencies pyparsing mechanize etc .", "However the fact that twill re-raises the exception makes it hard to tell .", "So I suspect that twill doesn t include a javascript interpreter", "ohhh I was excited about this Twill ...I will go back to requests - -", "When I run twill-sh Twill is a browser used for testing websites in my Terminal I m getting the following : .. . .. . However I can import urllib in Python console just fine .", "Here is what the Twill documentation page says about it http : twill.idyll.org python-api.html : .. . .. . .. . .. . twill s Python API .. . .. . Using TwillBrowser Making extensions .. . .. . twill is essentially a thin shell around the mechanize package .", "I have used mechanize twill and requests .", "And also my other code with twill is working fine", "But I do have a problem installing Twill .", "But the submit function of twill does not seem to click the button .", "Does GAE accept twill as an external module at all", "Or perhaps twill is already installed on Google App Engine", "That s actually how I got to know twill .", "So twill is not fully supported by app engine .", "Code .. . .. . Error .. . .. . What I understand .. . .. . My understanding of the problem is that mock is trying to mock twill https : github.com ctb twill s subprocess module instead of the python one .", "Can a python code - the one that is being run by Google App Engine - import twill from somewhere on the internet", "I have typed it in power shell tried it after loading python and tried it after using import twill and trying it .", "I use python-twill to access and click radio-buttons on an authenticated page actually it is the Apache proxy balancer-manager page .", "Install it .. . .. . D : tmp twill-0.9 python setup.py install .. . WARNING : importing distutils not setuptools", "Luckily Twitter doesn t mind that Twill Mechanize is accessing twitter.com .", "However Facebook does not like the fact that I m using Twill to access facebook.com .", "Is there a way to configure Twill Mechanize so that Facebook will think its a standard browser", "Set the proxy environment variable before you run the twill script .", "You should either upgrade requests via .. . .. . Or downgrade twill via :", "Twill does not understand javascript and the PubMed page seems to be using some AJAX .", "so i changed second twill to 0.9.1 version and it worked .", "Has anyone run into problems running the HelloWorld Twill example", "Twill depends on requests library which comes with and uses urllib3 behind the scenes .", "Can I intertwine Requests module with Twill or Mechanize in some way", "As far as the tools you mentioned neither mechanize nor twill will help .", "I m attempting to login to a site and access a page behind it using Twill .", "I use twill to navigate on a website protected by a login form .", "I have just started exploring TWILL http : twill.idyll.org ." ] }
{ "confidence": [ 64.36642456054688, 64.0592041015625, 63.60283279418945, 62.07822799682617, 60.98643493652344, 59.572242736816406, 59.3560676574707, 57.190574645996094, 56.91049575805664, 56.56729507446289, 55.828433990478516, 55.417083740234375, 54.864009857177734, 54.32589340209961, 53.64594650268555, 53.5421028137207, 53.481712341308594, 52.757354736328125, 52.71165466308594, 52.65654754638672 ], "content": [ "Question : I have just started exploring TWILL http : twill.idyll.org . Twill is an amazing scripting-language for Web browsing and it does all I want So far I ve been using twill from a Python shell IDLE Python GUI to be precise and I do things there in the way of executing commands one by one I mean I type one command run it then type the next command : alt text http : roundcan.narod.ru some pics 22.jpg alt text http : roundcan.narod.ru some pics 23.jpg alt text http : roundcan.narod.ru some pics 24.jpg alt text http : roundcan.narod.ru some pics 25.jpg alt text http : roundcan.narod.ru some pics 26.jpg alt text http : roundcan.narod.ru some pics 27.jpg alt text http : roundcan.narod.ru some pics 28.jpg But I don t know how to put all these commands together in one .py file so that they would all be executed one by one automatically . It seems that there is such possibility in twill . This example from the twill documentation page you can see it HERE http : twill.idyll.org examples.html shows us one piece of code consisting of several commands : alt text http : roundcan.narod.ru some pics 19.jpg So my question is : How can I put all commands together in twill .. . .. . Update 1 : .. . .. . this update is my response to S.Mark .. . .. . Hello S.Mark I am sorry for the late response . First of all some info about the location of my twill and python related folders : .. . .. . The path where Python2.5 is installed on my computer : C : Python25 .. . .. . The path to my twill-0.9 on my computer now : E : tmp twill-0.9 .. . .. . Let s say I want the following commands to be carried out automatically : .. . .. . This code should look into yahoo page and then save its HTML code into result.html file . So trying to follow Your instructions I firstly created test.txt file containing this code consisting of only 2 lines and saved that file as test.twill in the twill-0.9 folder which means that the full path to that file now was E : tmp twill-0.9 test.twill .. . .. . Then I tried to pass the file name as parameter to twill-sh command in many different ways but it never worked I must ve been doing something wrong : alt text http : roundcan.narod.ru some pics 29.jpg alt text http : roundcan.narod.ru some pics 30.jpg But you know what I decided to experiment a bit and created a test.py file that also contained only those two commands . This file I also placed in the twill-0.9 folder E : tmp twill-0.9 test.py and then I decided to try running it from twill shell using twill s runfile command and surprisingly it worked : alt text http : roundcan.narod.ru some pics 31.jpg .. . .. . After running it I looked up my C : Python25 folder and found the newly-created result.html file there Well what I ve done here is simply running a file from the twill shell using a twill command . While at the moment it is exactly what I need other supporters as you can see below suggest I should do all things from python shell not from twill shell and that is something that I still don t know how to do . My next step will be to try running a similar code on Google App Engine but there as far as I know only Python is recognized not twill which means that if I only know how to do things in twill but not in python I won t be able to have Google App Engine execute my commands . .. . .. . Update 2 : .. . .. . Friday 23 April 2010 3 : 48 : 15 a.m . GMT+0.00 .. . .. . This update is my second response to S.Mark .. . .. . It seems that running it from command-prompt isn t successful either : alt text http : roundcan.narod.ru some pics 32.jpg Comment : You could able to load .twill file from twill-sh take a look on my answer . Comment : @brilliant for update 1 you need to run python twill-sh test.twill from command-prompt not python shell Comment : @brilliant regarding update 2 looks like adding C : Python25 to PATH environment variable didn t suceed I commented how to set that on your previous question here http : stackoverflow.com questions 2651334 how-can-i-start-using-twill comment-2694009 but anyway there is faster way rename or copy twill-sh to twill-sh.py and then run twill-sh.py test.twill in command-prompt . let me know if there is any problem .. . Answer : I think that instead of using the twill shell you should instead directly call the functions using the twill python api http : twill.idyll.org python-api.html . Comment : Thank You Nikwin . I think You are right - I really need to learn ho to do it from python shell .", "Question : I have just started exploring TWILL http : twill.idyll.org . Twill is an amazing scripting-language for Web browsing and it does all I want So far I ve been using twill from a Python shell IDLE Python GUI to be precise and I do things there in the way of executing commands one by one I mean I type one command run it then type the next command : alt text http : roundcan.narod.ru some pics 22.jpg alt text http : roundcan.narod.ru some pics 23.jpg alt text http : roundcan.narod.ru some pics 24.jpg alt text http : roundcan.narod.ru some pics 25.jpg alt text http : roundcan.narod.ru some pics 26.jpg alt text http : roundcan.narod.ru some pics 27.jpg alt text http : roundcan.narod.ru some pics 28.jpg But I don t know how to put all these commands together in one .py file so that they would all be executed one by one automatically . It seems that there is such possibility in twill . This example from the twill documentation page you can see it HERE http : twill.idyll.org examples.html shows us one piece of code consisting of several commands : alt text http : roundcan.narod.ru some pics 19.jpg So my question is : How can I put all commands together in twill .. . .. . Update 1 : .. . .. . this update is my response to S.Mark .. . .. . Hello S.Mark I am sorry for the late response . First of all some info about the location of my twill and python related folders : .. . .. . The path where Python2.5 is installed on my computer : C : Python25 .. . .. . The path to my twill-0.9 on my computer now : E : tmp twill-0.9 .. . .. . Let s say I want the following commands to be carried out automatically : .. . .. . This code should look into yahoo page and then save its HTML code into result.html file . So trying to follow Your instructions I firstly created test.txt file containing this code consisting of only 2 lines and saved that file as test.twill in the twill-0.9 folder which means that the full path to that file now was E : tmp twill-0.9 test.twill .. . .. . Then I tried to pass the file name as parameter to twill-sh command in many different ways but it never worked I must ve been doing something wrong : alt text http : roundcan.narod.ru some pics 29.jpg alt text http : roundcan.narod.ru some pics 30.jpg But you know what I decided to experiment a bit and created a test.py file that also contained only those two commands . This file I also placed in the twill-0.9 folder E : tmp twill-0.9 test.py and then I decided to try running it from twill shell using twill s runfile command and surprisingly it worked : alt text http : roundcan.narod.ru some pics 31.jpg .. . .. . After running it I looked up my C : Python25 folder and found the newly-created result.html file there Well what I ve done here is simply running a file from the twill shell using a twill command . While at the moment it is exactly what I need other supporters as you can see below suggest I should do all things from python shell not from twill shell and that is something that I still don t know how to do . My next step will be to try running a similar code on Google App Engine but there as far as I know only Python is recognized not twill which means that if I only know how to do things in twill but not in python I won t be able to have Google App Engine execute my commands . .. . .. . Update 2 : .. . .. . Friday 23 April 2010 3 : 48 : 15 a.m . GMT+0.00 .. . .. . This update is my second response to S.Mark .. . .. . It seems that running it from command-prompt isn t successful either : alt text http : roundcan.narod.ru some pics 32.jpg Comment : You could able to load .twill file from twill-sh take a look on my answer . Comment : @brilliant for update 1 you need to run python twill-sh test.twill from command-prompt not python shell Comment : @brilliant regarding update 2 looks like adding C : Python25 to PATH environment variable didn t suceed I commented how to set that on your previous question here http : stackoverflow.com questions 2651334 how-can-i-start-using-twill comment-2694009 but anyway there is faster way rename or copy twill-sh to twill-sh.py and then run twill-sh.py test.twill in command-prompt . let me know if there is any problem .. . Answer : Here it is in action changed a wee bit : .. . .. . I use ubuntu so I use the following to install BeautifulSoup and twill : .. . .. . How this helps .. . .. . A Comment : Thank You amadain for this input . Are You former user323303 . So does it mean I have to download and install Beautiful Soap first Comment : well beautifulsoup goes hand in hand with selenium and twill . Its very handy for parsing the pages once you get to the page you are looking for . You don t have to download it but I would recommend using it if you are planning to use twill or selenium a lot Comment : and yes I am former user323303 Comment : I see . Thank You amadain Sorry for the late response .", "Question : I have just started exploring TWILL http : twill.idyll.org . Twill is an amazing scripting-language for Web browsing and it does all I want So far I ve been using twill from a Python shell IDLE Python GUI to be precise and I do things there in the way of executing commands one by one I mean I type one command run it then type the next command : alt text http : roundcan.narod.ru some pics 22.jpg alt text http : roundcan.narod.ru some pics 23.jpg alt text http : roundcan.narod.ru some pics 24.jpg alt text http : roundcan.narod.ru some pics 25.jpg alt text http : roundcan.narod.ru some pics 26.jpg alt text http : roundcan.narod.ru some pics 27.jpg alt text http : roundcan.narod.ru some pics 28.jpg But I don t know how to put all these commands together in one .py file so that they would all be executed one by one automatically . It seems that there is such possibility in twill . This example from the twill documentation page you can see it HERE http : twill.idyll.org examples.html shows us one piece of code consisting of several commands : alt text http : roundcan.narod.ru some pics 19.jpg So my question is : How can I put all commands together in twill .. . .. . Update 1 : .. . .. . this update is my response to S.Mark .. . .. . Hello S.Mark I am sorry for the late response . First of all some info about the location of my twill and python related folders : .. . .. . The path where Python2.5 is installed on my computer : C : Python25 .. . .. . The path to my twill-0.9 on my computer now : E : tmp twill-0.9 .. . .. . Let s say I want the following commands to be carried out automatically : .. . .. . This code should look into yahoo page and then save its HTML code into result.html file . So trying to follow Your instructions I firstly created test.txt file containing this code consisting of only 2 lines and saved that file as test.twill in the twill-0.9 folder which means that the full path to that file now was E : tmp twill-0.9 test.twill .. . .. . Then I tried to pass the file name as parameter to twill-sh command in many different ways but it never worked I must ve been doing something wrong : alt text http : roundcan.narod.ru some pics 29.jpg alt text http : roundcan.narod.ru some pics 30.jpg But you know what I decided to experiment a bit and created a test.py file that also contained only those two commands . This file I also placed in the twill-0.9 folder E : tmp twill-0.9 test.py and then I decided to try running it from twill shell using twill s runfile command and surprisingly it worked : alt text http : roundcan.narod.ru some pics 31.jpg .. . .. . After running it I looked up my C : Python25 folder and found the newly-created result.html file there Well what I ve done here is simply running a file from the twill shell using a twill command . While at the moment it is exactly what I need other supporters as you can see below suggest I should do all things from python shell not from twill shell and that is something that I still don t know how to do . My next step will be to try running a similar code on Google App Engine but there as far as I know only Python is recognized not twill which means that if I only know how to do things in twill but not in python I won t be able to have Google App Engine execute my commands . .. . .. . Update 2 : .. . .. . Friday 23 April 2010 3 : 48 : 15 a.m . GMT+0.00 .. . .. . This update is my second response to S.Mark .. . .. . It seems that running it from command-prompt isn t successful either : alt text http : roundcan.narod.ru some pics 32.jpg Comment : You could able to load .twill file from twill-sh take a look on my answer . Comment : @brilliant for update 1 you need to run python twill-sh test.twill from command-prompt not python shell Comment : @brilliant regarding update 2 looks like adding C : Python25 to PATH environment variable didn t suceed I commented how to set that on your previous question here http : stackoverflow.com questions 2651334 how-can-i-start-using-twill comment-2694009 but anyway there is faster way rename or copy twill-sh to twill-sh.py and then run twill-sh.py test.twill in command-prompt . let me know if there is any problem .. . Answer : Comment : Thank You user323303 for providing this code . But I hardly understand a thing in it . I will take some time to study it .", "Question : I have just started exploring TWILL http : twill.idyll.org . Twill is an amazing scripting-language for Web browsing and it does all I want So far I ve been using twill from a Python shell IDLE Python GUI to be precise and I do things there in the way of executing commands one by one I mean I type one command run it then type the next command : alt text http : roundcan.narod.ru some pics 22.jpg alt text http : roundcan.narod.ru some pics 23.jpg alt text http : roundcan.narod.ru some pics 24.jpg alt text http : roundcan.narod.ru some pics 25.jpg alt text http : roundcan.narod.ru some pics 26.jpg alt text http : roundcan.narod.ru some pics 27.jpg alt text http : roundcan.narod.ru some pics 28.jpg But I don t know how to put all these commands together in one .py file so that they would all be executed one by one automatically . It seems that there is such possibility in twill . This example from the twill documentation page you can see it HERE http : twill.idyll.org examples.html shows us one piece of code consisting of several commands : alt text http : roundcan.narod.ru some pics 19.jpg So my question is : How can I put all commands together in twill .. . .. . Update 1 : .. . .. . this update is my response to S.Mark .. . .. . Hello S.Mark I am sorry for the late response . First of all some info about the location of my twill and python related folders : .. . .. . The path where Python2.5 is installed on my computer : C : Python25 .. . .. . The path to my twill-0.9 on my computer now : E : tmp twill-0.9 .. . .. . Let s say I want the following commands to be carried out automatically : .. . .. . This code should look into yahoo page and then save its HTML code into result.html file . So trying to follow Your instructions I firstly created test.txt file containing this code consisting of only 2 lines and saved that file as test.twill in the twill-0.9 folder which means that the full path to that file now was E : tmp twill-0.9 test.twill .. . .. . Then I tried to pass the file name as parameter to twill-sh command in many different ways but it never worked I must ve been doing something wrong : alt text http : roundcan.narod.ru some pics 29.jpg alt text http : roundcan.narod.ru some pics 30.jpg But you know what I decided to experiment a bit and created a test.py file that also contained only those two commands . This file I also placed in the twill-0.9 folder E : tmp twill-0.9 test.py and then I decided to try running it from twill shell using twill s runfile command and surprisingly it worked : alt text http : roundcan.narod.ru some pics 31.jpg .. . .. . After running it I looked up my C : Python25 folder and found the newly-created result.html file there Well what I ve done here is simply running a file from the twill shell using a twill command . While at the moment it is exactly what I need other supporters as you can see below suggest I should do all things from python shell not from twill shell and that is something that I still don t know how to do . My next step will be to try running a similar code on Google App Engine but there as far as I know only Python is recognized not twill which means that if I only know how to do things in twill but not in python I won t be able to have Google App Engine execute my commands . .. . .. . Update 2 : .. . .. . Friday 23 April 2010 3 : 48 : 15 a.m . GMT+0.00 .. . .. . This update is my second response to S.Mark .. . .. . It seems that running it from command-prompt isn t successful either : alt text http : roundcan.narod.ru some pics 32.jpg Comment : You could able to load .twill file from twill-sh take a look on my answer . Comment : @brilliant for update 1 you need to run python twill-sh test.twill from command-prompt not python shell Comment : @brilliant regarding update 2 looks like adding C : Python25 to PATH environment variable didn t suceed I commented how to set that on your previous question here http : stackoverflow.com questions 2651334 how-can-i-start-using-twill comment-2694009 but anyway there is faster way rename or copy twill-sh to twill-sh.py and then run twill-sh.py test.twill in command-prompt . let me know if there is any problem .. . Answer : Put your twill commands into a file for example test.twill .. . .. . And then just pass filename as parameter to twill-sh command like .. . .. . And you might want to check .twill sample codes in tests folder of twill source Comment : Hello S.Mark I ve tried Your way and something didn t work out there but again trial-and-error method was a help . Please refer to Update 1 section above . Thank You for Your time . Comment : @ S.Mark : for update 1 you need to run python twill-sh test.twill from command-prompt - Am I missing something important there It just doesn t want to go through command-prompt . Please take a look at the screen shot in Update 2 . Thank You . Comment : @ S.Mark : regarding update 2 looks like adding C : Python25 to PATH environment variable didn t succeed - Ouch I am soooo sorry It s my fault - I switched to another computer and didn t tell You about it . I thought that informing You about the change of the path of my twill-0.9 folder was just enough and I completely forgot about this need to edit the Path environment variable Yes I just tried both Your quick method twill-sh.py and the longer one python twill-sh with Path edited - they both work It s interesting that if I do it one of Comment : @brilliant regarding result.html try save html E : tmp twill-0.9 result.html instead of save html result.html Comment : Welcome brilliant", "Question : I m trying to login in https : accounts.coursera.org using twill for python I tried this sheet of code .. . .. . twill doesn t detect the form in the page and showforms methods doesn t show anything Is that an internal issue in twill package or I m misssing something .. . Answer : I get a page that says. . .. . .. . Please use a modern browser with JavaScript enabled to use Coursera . So I suspect that twill doesn t include a javascript interpreter Comment : Yep looks like twill doesn t have javascript support stackoverflow.com questions 6202446 http : stackoverflow.com questions 6202446 does-twill-run-javascript-correctly-at-all Comment : Shame I was getting excited about twill . There s some javascript implementations in python stackoverflow.com questions 7451619 http : stackoverflow.com questions 7451619 is-there-a-javascript-ecmascript-implementation-written-in-python one of those might be easy-ish to add . Comment : ohhh I was excited about this Twill ...I will go back to requests - -", "Question : I have just successfully installed TWILL http : twill.idyll.org on my computer with the help of one very supportive member of StackOverflow you can check it out HERE http : stackoverflow.com questions 2651334 how-can-i-start-using-twill and have tried to run one of the simple examples on the twill documentation page you can see that page HERE http : twill.idyll.org examples.html . Here is that example : .. . .. . alt text http : roundcan.narod.ru some pics 19.jpg .. . .. . Let s say my username on www.slash.org http : www.slash.org is lynxye and my password is mammal . When I try to enter that example code into my Python prompt I can only type and enter the first line of the code because when I click on Enter to start a new line I get some error messages right away : .. . .. . alt text http : roundcan.narod.ru some pics 20.jpg .. . .. . The same happens when I try to enter this code into my terminal : .. . .. . alt text http : roundcan.narod.ru some pics 21.jpg .. . .. . I think I miss out on some basics here . Perhaps I need to create a file that would contain that code and then run that file somehow but I really don t know where I need to create that file and with what extensdion . Can anyone please help me with this .. . Answer : You need to run those commands inside twill shell instead of python shell .. . .. . You can put twill commands when you see .. . .. . or there is 2 only lines in twill-sh file .. . .. . you can just copy-paste that 2 lines to python prompt . Comment : Hello S.Mark Do you know where that twill shell could be located There is one file called twill-sh in my twill-0.9 folder . Is that the twill shell Strange it s blank - I mean it has no extension . Comment : Hi yeah run like python twill-sh Comment : @brilliant I have updated my answer . Comment : or just rename it to twill-sh.py : - then you can do twill-sh.py in command-prompt . Comment : You re welcome brilliant : -", "Question : I am sorry I have already asked this question on Superuser but nobody answers there so I deleted it from Superuser and decided to post it here . Hope it s not a big crime especially given the fact that I was firstly advised to use twill here on StackOverflow not on SuperUser .. . .. . How do I start using twill I have just downloaded it unpacked it and clicked on the setup .py file in the folder . The black window terminal appeared for a moment and vanished . I do have Python 2.5 installed on my computer - along with SDK from Google App Engine .. . .. . In the twill documentation section http : twill.idyll.org it says : .. . .. . .. . .. . Downloading twill .. . .. . The latest release of twill is twill 0.9 released Thursday December 27th 2007 it is available for download at http : darcs.idyll.org t projects twill-0.9.tar.gz . You can also use Python s easy install to install or upgrade twill . .. . twill works with Python 2.3 or later . .. . To start using twill install it and then type twill-sh . At the prompt type : .. . .. . go http : www.slashdot.org .. . show .. . showforms .. . showhistory .. . .. . .. . .. . I am not clear from this passage what I am supposed to type only twill-sh or twill-sh and all the words under that line and where I tried typing it in the command-prompt window of my computer - to no avail .. . .. . Can anyone please help me out here Thank You in advance . .. . .. . Update 1 : .. . .. . This update is a response to the answer given by S.Mark .. . .. . Hello S.Mark I ve tried to follow Your instructions . Here is what happened : .. . .. . Firstly I created a folder on my D disk and named it tmp . Then I downloaded and extracted twill-0.9 into that folder . So now the path to this file on my computer was just as same as the one in Your example : D : tmp twill-0.9 : alt text http : roundcan.narod.ru some pics 01 path big.jpg .. . .. . alt text http : roundcan.narod.ru some pics 02 path small.jpg .. . .. . Then I tried to open the command-prompt on my computer : alt text http : roundcan.narod.ru some pics 03 window.jpg .. . .. . alt text http : roundcan.narod.ru some pics 04 prompt big.jpg .. . .. . alt text http : roundcan.narod.ru some pics 05 prompt small.jpg .. . .. . alt text http : roundcan.narod.ru some pics 06 admin.jpg .. . .. . alt text http : roundcan.narod.ru some pics 07 admin big.jpg .. . .. . Then following step 2 of Your instructions I tried to switch to D disk : .. . .. . alt text http : roundcan.narod.ru some pics 08 switch try.jpg .. . .. . But for some reason it didn t work : .. . .. . alt text http : roundcan.narod.ru some pics 09 switch result.jpg .. . .. . This Chinese line says something like This action has been rejected . Why is it so Well I tried to proceed to step 3 anyway and here is what I ve got : .. . .. . alt text http : roundcan.narod.ru some pics 10 third step.jpg .. . .. . As far as I can understand this Chinese line says something like C : is neither internal nor external command thus it cannot be carried out . Why is it so Is there something wrong with my computer .. . .. . Update 2 : .. . .. . This update is my second response to the answer given by S.Mark .. . .. . Hello S.Mark Thank You for Your answer again . Yes this time it worked when I just typed those parts that You highlighted in Your post . So when I typed just d : in the very beginning it worked But then when I typed python setup.py build I got the same error message python is neither an internal or external command it can t be carried out . : alt text http : roundcan.narod.ru some pics 12.jpg .. . .. . I tried to repeat this command and accidentally omitted the word python : .. . alt text http : roundcan.narod.ru some pics 13.jpg When I pressed Enter key the build-process seemed to launch - at least what I saw then resembled the step 4 of Your instructions start the build-process very much : alt text http : roundcan.narod.ru some pics 14.jpg alt text http : roundcan.narod.ru some pics 15.jpg alt text http : roundcan.narod.ru some pics 16.jpg But now I am a little bit hesitant about proceeding to step 5 Install It as I am not sure if what I have done is the right thing . If what I did in step 4 was okay should I also omit the word python in step 5 A side question : How did You manage to put the contents of the terminal into Your post without making screenshots Is it like there is some way of putting the terminal s contents into the clipboard Making screenshots all the time and hosting them prior to posting is quite cumbersome . .. . .. . Update 3 : .. . .. . This update is my third response to S.Mark .. . .. . S.Mark hello again Hope you are not sick and tired of me yet .. . .. . and yeah you could omit python and directly run setup.py because your python installation registered .py in registry regarding step 5 you could just run setup.py install I followed these words of Yours and install process ran successfully Thank You . But as for the following steps then open python prompt from start menu and test step 6 and 8 there wasn t much success in the Python prompt : alt text http : roundcan.narod.ru some pics 17.jpg .. . .. . Neither was it successful in the usual command-prompt terminal : alt text http : roundcan.narod.ru some pics 18.jpg .. . .. . It again says in Chinese that python is neither an internal nor external command and therefore can t be carried out . Do You have any idea why it didn t work where is your python installation C : Python25 - Yes that s right . there is a setting command-prompt properties - easy edit mode to enable selection of text on the command-prompt could you ask that in superuser.com - Sure I will ask this question there . Thanks for telling me . Comment : What platform are you on Comment : ah you don t need to type C : thats is my prompt like C : Documents and Settings Administrator in yours just type D : etc. . I am going to update my post to highlight those parts . Comment : @brilliant for your second update its becuause of python.exe not on your path where is your python installation C : Python25 if so type set PATH C : Python25 PATH and lt enter before you type python setup.py build and yeah you could omit python and directly run setup.py because your python installation registered .py in registry . Comment : regarding copying terminal texts there is a setting command-prompt properties - easy edit mode to enable selection of text on the command-prompt could you ask that in superuser.com Comment : regarding step 5 you could just run setup.py install then open python prompt from start menu and test step 6 and 8 .. . Answer : You cannot just double click setup.py .. . .. . You need to open command-prompt or shell and go to that folder .. . .. . and need to do .. . .. . install step should automatically do build normally so only last one will work .. . .. . .. . .. . Edit : ok here is superuser way of installation steps .. . .. . 1 . I have extracted twill-0.9.tar.gz to D : tmp twill-0.9 .. . .. . 2 . I am on drive C so I switched to D : .. . .. . C : d : .. . .. . 3 . Now change the folder by using cd command .. . .. . C : cd D : tmp twill-0.9 .. . .. . 4 . start the build-process .. . .. . D : tmp twill-0.9 python setup.py build .. . WARNING : importing distutils not setuptools D : data program Python26 lib distutils dist.py : 266 : UserWarning : Unknown distribution option : entry points .. . warnings.warn msg .. . D : data program Python26 lib distutils dist.py : 266 : UserWarning : Unknown distribution option : test suite .. . warnings.warn msg .. . running build .. . running build py .. . creating build .. . creating build lib .. . creating build lib twill .. . ..... . .. . running build scripts .. . creating build scripts-2.6 .. . copying and adjusting twill-fork - build scripts-2.6 .. . .. . 5 . Install it .. . .. . D : tmp twill-0.9 python setup.py install .. . WARNING : importing distutils not setuptools running install .. . running build .. . running build py .. . ..... . .. . running install scripts .. . copying build scripts-2.6 twill-fork - D : data program Python26 Scripts .. . running install egg info .. . Writing D : data program Python26 Lib site-packages twill-0.9-py2.6.egg-info .. . .. . 6 . Test for import is or not .. . .. . D : tmp twill-0.9 python .. . Python 2.6.5 r265 : 79096 Mar 19 2010 21 : 48 : 26 MSC v.1500 32-bit Intel on win32 .. . Type help copyright credits or license for more information . import twill .. . import re base64 urlparse posixpath md5 sha sys copy .. . twill other packages mechanize dist auth.py : 14 : DeprecationWarning : the sha module is deprecated use the hashlib module instead .. . import re base64 urlparse posixpath md5 sha sys copy .. . .. . .. . 7 . Import was fine but there is DeprecationWarnings on python-2.6 but this should be ok and should be no warnings at all with python-2.5 .. . .. . 8 . confirm its properly imported or not you will see twill and its functions there so yes . dir .. . builtins doc name package twill .. . from twill.commands import .. . dir .. . builtins doc name package add auth add extra header agent back clear cookies clear extra headers code config debug echo exit extend with fa find follow .. . Comment : If you don t want to type you could copy path from address-bar from folder window paste it to command-prompt after you typing cd change directory Comment : ok I am going to add superuser way of installation steps . hold on for a while Comment : @brilliant btw did you click upvote button 2 times : P just wondering no problem through . Comment : @brillient : D those are one time votes when you click again thats revoke the votes I ll edit it again but anyway it does not matter . Comment : @brilliant thank you too .", "Question : I have installed twill on my computer having previously installed Python 2.5 and have been using it recently . Python is installed on disk C on my computer : C : Python25 .. . .. . And the twill folder twill-0.9 is located here : E : tmp twill-0.9 .. . .. . Here is a code that I ve been using in twill : .. . .. . This code helps me to log in to one website in which I have an account record the HTML code of some other page of that website that I can access only after logging in and store it in a file named result.txt of course before using this code I firstly need to replace my login with my real login my password with my real password some website s sign-in page URL and URL of some other page from that website with real URLs of that website and number 2 with the number of the form on that website that is used as a sign-in form on that website s log-in page .. . .. . This code I store in test.twill file that is located in my twill-0.9 folder : E : tmp twill-0.9 test.twill I run this file from my command-prompt : python twill-sh test.twill .. . .. . Now I also have installed Google App Engine SDK from Google App Engine and have also been using it for awhile . For example I ve been using this code : .. . .. . This code helps me transform the phrase Nobody inspects the spammish repetition into md5 digest . Now how can I put these two pieces of code together into one python script that I could run on Google App Engine Let s say I want my code to log in to a website from Google App Engine go to another page on that website record its HTML code that s what my twill code does and than transform this HTML code into its md5 digest that s what my second code does . So how can I combine those two codes into one python code I guess it should be done somehow by importing twill but how can it be done Can a python code - the one that is being run by Google App Engine - import twill from somewhere on the internet Or perhaps twill is already installed on Google App Engine .. . .. . Update 1 : .. . .. . this update is my response to Wooble s answer .. . .. . Here is the list of all folders in my twill-0.9 folder that contain init .py files . some folders on this list are located inside of other folders which are also mentioned in this list : .. . .. . E : twill-0.9 build lib twill extensions match parse .. . .. . E : twill-0.9 build lib twill extensions .. . .. . E : twill-0.9 build lib twill other packages mechanize dist .. . .. . E : twill-0.9 build lib twill other packages .. . .. . E : twill-0.9 build lib twill .. . .. . E : twill-0.9 twill extensions match parse .. . .. . E : twill-0.9 twill extensions .. . .. . E : twill-0.9 twill other packages mechanize dist .. . .. . E : twill-0.9 twill other packages .. . .. . E : twill-0.9 twill .. . Answer : I believe you re looking for a way to import the twill module into App-Engine . You ll have to figure out either where the twill python files are or how to get a source package of them to package it with your website but it looks like importing 3rd party modules can be done with a few exceptions see below . Try ZipImport http : docs.python.org library zipimport.html following the directions from Google s site here http : code.google.com appengine docs python tools libraries.html zipimport and here http : code.google.com appengine articles django10 zipimport.html . from Google s third Party Library page : .. . .. . App Engine uses a custom version of the zipimport feature instead of the standard implementation . It generally works the usual way : add the Zip archive to sys.path then import as usual . With these exceptions : zipimport can only import modules stored in the archive as .py source files . It cannot import modules stored as .pyc or .pyo files . zipimport is implemented in pure Python and does not use native-code for decompression C code . Comment : Thank You winfred for this input . I will firstly try the way suggested here by Wooble . if that one doesn t work I will resort to Yours . Thanks again .", "Question : I have installed twill on my computer having previously installed Python 2.5 and have been using it recently . Python is installed on disk C on my computer : C : Python25 .. . .. . And the twill folder twill-0.9 is located here : E : tmp twill-0.9 .. . .. . Here is a code that I ve been using in twill : .. . .. . This code helps me to log in to one website in which I have an account record the HTML code of some other page of that website that I can access only after logging in and store it in a file named result.txt of course before using this code I firstly need to replace my login with my real login my password with my real password some website s sign-in page URL and URL of some other page from that website with real URLs of that website and number 2 with the number of the form on that website that is used as a sign-in form on that website s log-in page .. . .. . This code I store in test.twill file that is located in my twill-0.9 folder : E : tmp twill-0.9 test.twill I run this file from my command-prompt : python twill-sh test.twill .. . .. . Now I also have installed Google App Engine SDK from Google App Engine and have also been using it for awhile . For example I ve been using this code : .. . .. . This code helps me transform the phrase Nobody inspects the spammish repetition into md5 digest . Now how can I put these two pieces of code together into one python script that I could run on Google App Engine Let s say I want my code to log in to a website from Google App Engine go to another page on that website record its HTML code that s what my twill code does and than transform this HTML code into its md5 digest that s what my second code does . So how can I combine those two codes into one python code I guess it should be done somehow by importing twill but how can it be done Can a python code - the one that is being run by Google App Engine - import twill from somewhere on the internet Or perhaps twill is already installed on Google App Engine .. . .. . Update 1 : .. . .. . this update is my response to Wooble s answer .. . .. . Here is the list of all folders in my twill-0.9 folder that contain init .py files . some folders on this list are located inside of other folders which are also mentioned in this list : .. . .. . E : twill-0.9 build lib twill extensions match parse .. . .. . E : twill-0.9 build lib twill extensions .. . .. . E : twill-0.9 build lib twill other packages mechanize dist .. . .. . E : twill-0.9 build lib twill other packages .. . .. . E : twill-0.9 build lib twill .. . .. . E : twill-0.9 twill extensions match parse .. . .. . E : twill-0.9 twill extensions .. . .. . E : twill-0.9 twill other packages mechanize dist .. . .. . E : twill-0.9 twill other packages .. . .. . E : twill-0.9 twill .. . Answer : To use third-party libraries in App Engine projects you simply have to include them with your application when you deploy . Copy the twill folder the one containing init .py into your application s folder and deploy it . Looking at the twill Google Code project it appears that twill includes its dependencies pyparsing mechanize etc . in the package so you may not need to include anything else . Comment : Hello Wooble Thank You so much for Your valuable response I ve just looked into my twill-0.9 folder the one that I have extracted from the downloaded twill .zip pack and have discovered that there are several folders in it that contain a init .py file . So now I am kind of confused as I don t know which one to deploy . Please refer to Update 1 section in my question where I have posted the list of all those folders.If You can please tell me by looking through that list which folder I need to choose . Thank You . Comment : You want the top-level one which should be called twill including all of its subfolders . This is the entire package . Comment : Thank You Wooble Comment : Hello Wooble I am sorry to bother You again but it seems that something doesn t work this way . If You have time and willingness to help please check out this page in which I asked a new question regarding twill and python : stackoverflow.com questions 3621432 http : stackoverflow.com questions 3621432 using-twill-from-python-to-open-a-link-module-object-has-no-attribute-popen", "Question : I have installed twill on my computer having previously installed Python 2.5 and have been using it recently . Python is installed on disk C on my computer : C : Python25 .. . .. . And the twill folder twill-0.9 is located here : E : tmp twill-0.9 .. . .. . Here is a code that I ve been using in twill : .. . .. . This code helps me to log in to one website in which I have an account record the HTML code of some other page of that website that I can access only after logging in and store it in a file named result.txt of course before using this code I firstly need to replace my login with my real login my password with my real password some website s sign-in page URL and URL of some other page from that website with real URLs of that website and number 2 with the number of the form on that website that is used as a sign-in form on that website s log-in page .. . .. . This code I store in test.twill file that is located in my twill-0.9 folder : E : tmp twill-0.9 test.twill I run this file from my command-prompt : python twill-sh test.twill .. . .. . Now I also have installed Google App Engine SDK from Google App Engine and have also been using it for awhile . For example I ve been using this code : .. . .. . This code helps me transform the phrase Nobody inspects the spammish repetition into md5 digest . Now how can I put these two pieces of code together into one python script that I could run on Google App Engine Let s say I want my code to log in to a website from Google App Engine go to another page on that website record its HTML code that s what my twill code does and than transform this HTML code into its md5 digest that s what my second code does . So how can I combine those two codes into one python code I guess it should be done somehow by importing twill but how can it be done Can a python code - the one that is being run by Google App Engine - import twill from somewhere on the internet Or perhaps twill is already installed on Google App Engine .. . .. . Update 1 : .. . .. . this update is my response to Wooble s answer .. . .. . Here is the list of all folders in my twill-0.9 folder that contain init .py files . some folders on this list are located inside of other folders which are also mentioned in this list : .. . .. . E : twill-0.9 build lib twill extensions match parse .. . .. . E : twill-0.9 build lib twill extensions .. . .. . E : twill-0.9 build lib twill other packages mechanize dist .. . .. . E : twill-0.9 build lib twill other packages .. . .. . E : twill-0.9 build lib twill .. . .. . E : twill-0.9 twill extensions match parse .. . .. . E : twill-0.9 twill extensions .. . .. . E : twill-0.9 twill other packages mechanize dist .. . .. . E : twill-0.9 twill other packages .. . .. . E : twill-0.9 twill .. . Answer : here is an example of using twill to run a google-search if this helps . It shows using twill and beautifulsoup together to parse web pages : Comment : Thank You very much amadain I ll take some time to study Your code .", "Question : I have installed twill on my computer having previously installed Python 2.5 and have been using it recently . Python is installed on disk C on my computer : C : Python25 .. . .. . And the twill folder twill-0.9 is located here : E : tmp twill-0.9 .. . .. . Here is a code that I ve been using in twill : .. . .. . This code helps me to log in to one website in which I have an account record the HTML code of some other page of that website that I can access only after logging in and store it in a file named result.txt of course before using this code I firstly need to replace my login with my real login my password with my real password some website s sign-in page URL and URL of some other page from that website with real URLs of that website and number 2 with the number of the form on that website that is used as a sign-in form on that website s log-in page .. . .. . This code I store in test.twill file that is located in my twill-0.9 folder : E : tmp twill-0.9 test.twill I run this file from my command-prompt : python twill-sh test.twill .. . .. . Now I also have installed Google App Engine SDK from Google App Engine and have also been using it for awhile . For example I ve been using this code : .. . .. . This code helps me transform the phrase Nobody inspects the spammish repetition into md5 digest . Now how can I put these two pieces of code together into one python script that I could run on Google App Engine Let s say I want my code to log in to a website from Google App Engine go to another page on that website record its HTML code that s what my twill code does and than transform this HTML code into its md5 digest that s what my second code does . So how can I combine those two codes into one python code I guess it should be done somehow by importing twill but how can it be done Can a python code - the one that is being run by Google App Engine - import twill from somewhere on the internet Or perhaps twill is already installed on Google App Engine .. . .. . Update 1 : .. . .. . this update is my response to Wooble s answer .. . .. . Here is the list of all folders in my twill-0.9 folder that contain init .py files . some folders on this list are located inside of other folders which are also mentioned in this list : .. . .. . E : twill-0.9 build lib twill extensions match parse .. . .. . E : twill-0.9 build lib twill extensions .. . .. . E : twill-0.9 build lib twill other packages mechanize dist .. . .. . E : twill-0.9 build lib twill other packages .. . .. . E : twill-0.9 build lib twill .. . .. . E : twill-0.9 twill extensions match parse .. . .. . E : twill-0.9 twill extensions .. . .. . E : twill-0.9 twill other packages mechanize dist .. . .. . E : twill-0.9 twill other packages .. . .. . E : twill-0.9 twill .. . Answer : No idea what twill does well googled but AppEngine offers fetch function http : code.google.com appengine docs python urlfetch fetchfunction.html which can be used to fetch web pages . It also supports POST method e.g . for logins . I doubt twill works in AppEngine because AppEngine has limited python libraries available for security reasons . Just a guess though . Comment : Hello Yaggo Thanks for Your response . Yes I know about this fetch function but the problem was I couldn t log in with it as I am not familiar with all the workings of headers and other specifications that you need to know when you are trying to log in to a website using a python code that is being run from Google App Engine . Comment : Here stackoverflow.com questions 1899259 http : stackoverflow.com questions 1899259 how-can-i-pass-my-id-and-my-password-to-a-website-in-python-using-google-app-engi and here stackoverflow.com questions 1914275 http : stackoverflow.com questions 1914275 googles-app-engine-python-how-to-get-parameters-from-a-log-in-pages I was advised to use twill as twill does all those things automatically so I don t need to dive into all those details . That s actually how I got to know twill .", "Question : When running nosetests using Flask-test I keep getting this error : .. . .. . Also when trying to run twill-sh I get the same error . Comment : Can you post the code also instead of just the stacktrace Comment : The code thats making the error is from Twill it s open-source : pastebin.com iJLZkj5Y http : pastebin.com iJLZkj5Y .. . Answer : The problem is that the version of twill that you are currently using requires a more up-to-date version of the requests library . You should either upgrade requests via .. . .. . Or downgrade twill via :", "Question : Can anyone please explain to me what s going on here . It seems that Python refuses to work with twill when I am trying to log in to my mailbox on Yahoo : .. . .. . .. . .. . Update 1 : .. . .. . this update is my answer to Robus .. . .. . Hello Robus First of all I assume it was a typo when You wrote : .. . .. . .. . .. . Here s what I did : Went to C : Python26 Lib site-packages twill-0.9-py2.6.egg twill other packages .. . .. . .. . .. . I think You meant this path : C : Python26 Lib site-packages twill other packages . Otherwise I can t see any such folder directory there named twill-0.9-py2.6.egg - there is only a file with this name the one that I think was downloaded during the installation of mechanize . Please tell me if my assumption is wrong - I may well be not seeing something very obvious here as I am just a newbie . So following Your instructions I did this : .. . .. . 1 . I found C : Python25 Lib site-packages twill other packages mechanize dist on my computer as You can see I don t have python26 but rather python 25 installed - that might also be a problem .. . .. . 2 . Changed its name to mechanize dist backup the full path now being C : Python25 Lib site-packages twill other packages mechanize dist backup .. . .. . 3 . Copied my downloaded and unzipped mechanize-0.2.2 into C : Python25 Lib site-packages twill other packages the full path being C : Python25 Lib site-packages twill other packages mechanize-0.2.2 .. . .. . 4 . Changed its name to mechanize dist the full path being C : Python25 Lib site-packages twill other packages mechanize dist .. . .. . 5 . Copied ClientForm file from mechanize dist backup and pasted it in mechanize dist in fact I found two files there named ClientForm : one is a python file another one is a compiled python file - I copied and pasted both of them . Having done that I tried running all those commands and got stuck at the very beginning - I couldn t even import twill now : .. . .. . .. . .. . .. . .. . It seems that the system doesn t recognize the newly-created mechanize dist . Could it be because I have Python 25 instead of Python 26 Or perhaps there is some other reason Comment : I edited your post to remove login credentials . Just edit and revert if you really wanted it that way . I strongly suggest that you change your password as anybody with a rep of higher than 2000 can now log into your account . Comment : Thank You aaronasterling .. . Answer : The problem lies in Mechanize . You need the newest version Comment : Hello Robus Thanks for Your answer but I wasn t using mechanize here I was just using twill and Python . Comment : Twill uses mechanize - Trust me run these commands and it ll work . Comment : Assuming you re using linux command promt you need superuser privileges . If you re on windows follow the instructions found here : wwwsearch.sourceforge.net mechanize download.html http : wwwsearch.sourceforge.net mechanize download.html Comment : Apparently twill imports its own mechanize version . Here s what I did : Went to C : Python26 Lib site-packages twill-0.9-py2.6.egg twill other packages renamed mechanize dist to mechanize dist backup copied over the mechanize folder from the distribution mechanize-0.2.2.zip named it mechanize dist and copied ClientForm from mechanize dist backup to mechanize dist . Worked for me : Comment : Are you sure you only copied the mechanize dir itself I.E mechanize dist should contain init .py auth.py beautifulsoup.py ETC", "Question : null .. . Answer : I am currently trying to record video from a Foscam 8910W IP Camera using Python . I started by consulting with threads like these : .. . .. . How to parse mjpeg http stream from ip-camera http : stackoverflow.com questions 21702477 how-to-parse-mjpeg-http-stream-from-ip-camera .. . .. . and I got through the first few commands .. . .. . Then I realized that since my camera s IP requires a username and password I would have to overcome that obstacle . So I installed twill and am trying to login using twill commands : .. . .. . How to log in to a website using installed twill http : stackoverflow.com questions 2680185 how-to-log-in-to-a-website-using-installed-twill .. . .. . I used that thread to login to the twill shell . Then I tried some commands from this page : .. . .. . such as .. . .. . and then .. . .. . At that point I get a response that says .. . .. . I noticed that the source code for the page mentions cookies so I tried .. . .. . and I got a similar response .. . .. . I m not sure where to go from there . I also tried mimicking this thread : .. . .. . How can I login to a website with Python http : stackoverflow.com questions 2910221 how-can-i-login-to-a-website-with-python .. . .. . I noticed the source code for my IP cam login page mentions login user and login pwd variables . I used fv 1 login user my user name for example . I got an error : .. . .. . Any ideas here is the code of the page I am trying to login to : .. . .. . OK I ve made a little progress . I realize that the reason that the show forms command was not yielding any output was because of the web address I went to initially . When I looked at the source code I realized that the address in the browser had changed to login user.htm . So using go http : 000.00.000.00 login user.htm and then showforms gave me the output I was looking for : .. . .. . now fv 1 login user username and fv 1 login pwd password were working though I was having trouble with the submit button and still am . Any thoughts on that", "Question : I am able to use twill http : twill.idyll.org to log in to a normal HTTP site . However when I try and log into an SSL site I get the following error : .. . .. . What is the reason I am getting this error which I think has to do with the security of the itunes page And how would I log into the given page via command-line Comment : I m not familiar with this tool but it looks like Twill uses Mechanize http : wwwsearch.sourceforge.net mechanize . You should be able to install this using Python s usual easy install http : pypi.python.org pypi setuptools mechanism . Comment : twill uses its own mechanize and some other packages . And for that it adds them to sys.path . The problem is related to this surely but this does not yet give clues . Comment : Twill package documentation mentions problems with mechanize in its doc problems.html at the very end as of version 0.9 . .. . Answer : I believe python-mechanize Ubuntu name for it may vary for other systems and maybe some other dependencies are somehow not installed or removed on your system . While twill distro provides its own mechanize distros usually make sure to do it right . Before resorting to sudo easy install consider finding and installing packages by using your distro s way . On Ubuntu :", "Question : I have some codes n openshfift which is working with twill module of python program so i installed twill but i can t run a simple twill comand via ssh mode the code is : .. . .. . and the error is AttributeError : ResultWrapper object has no attribute page : .. . .. . so dose any body know how to solve this .. . Answer : It don t worked because of miss matching of twill version .i used twill 0.9.1 in my laptop and used twill 1.8.0 in my openshift app . so i changed second twill to 0.9.1 version and it worked . and its response is : Comment : because i am the question owner . this was my question and i found its answer . Comment : That does explain how you would know the version numbers yes . Sorry for missing that small fact . Comment : Also please accept the answer you posted so others know the question has been successfully answered .", "Question : null .. . Answer : So I making a Tumblr bot in python with twill yea I know I could use API but i want to use multiple accounts 50+ and I don t want to create an API for every account .. . .. . And how can I make the uploading procedure through twill I succesfully log in . My Code : Comment : The documentation for twill says that there s a formfile command . Does that do what you need to do twill.idyll.org commands.html http : twill.idyll.org commands.html Comment : Sadly the tumblr s photo upload isn t working that way as I found : I checked the forms at the tumblr.com new photo page and there isn t any form-for files .", "Question : I ve been trying to learn Twill Scripting on Python and I am using Python 3.4 and Twill 1.8.0 . Been reading some posts here and I found it interesting to study . But I do have a problem installing Twill . I just knew that PRINT in Python is now a function so meaning it needs parenthesis and that s where my problem starts . As I look through the codes on Twill 1.8.0 I think it isn t oriented with the change of using PRINT yet . Strings are not enclosed with parenthesis so I was thinking maybe there is a new patch or version of Twill that adapts the changes of Python is there any or is there anything I can do about this aside from manually editing Twill files Your response is highly appreciated . Comment : I think it s a legitimate question whether Twill is available for Python3 . Upvoted to cancel out the malicious downvote . .. . Answer : I just found the answer . Thanks for viewing this question and probably for that downvote SAD FACE . . So the solution that I found was to use the 2to3 Script Tool found in Python Folder . Basically it refactors Python 2 codes to Python 3 codes .", "Question : this allows me to connect to a website with python on my computer : .. . .. . this gets me to hello world on google-app-engine with the twill and beautiful soup imports working : .. . .. . now after this i try to connect to a website using twill and fail : .. . .. . where can i call go to connect to a website if I add it before class MainPage webapp2.RequestHandler : it hangs and I don t get to hello world . If I add it inside the MainPage class on the first line as either getit go http : www.pge.com or just go http : www.pge.com it also hangs and I don t get to hello world . If I add it inside def : get self : I get : .. . .. . Internal Server Error .. . .. . The server has either erred or is incapable of performing the requested operation . and a bunch of stuff about twill and mechanize.py followed by .. . .. . File ... . twill utils.py line 275 in run tidy process subprocess.Popen tidy cmd stdin subprocess.PIPE AttributeError : module object has no attribute Popen .. . .. . am i somehow missing some other dependencies like mechanize.py or is there something else i need to be doing .. . Answer : This helped partially solve my issue but other problems cropped up later particularly in filling forms submitting them and migrating further in the website . tidy is disabled in this way tidy does not play well with the google sandbox and I am able to show the webpage via self.response.write show . As a side note : be careful about using TextEdit to edit .py files when working with google-app-engine . I was getting all sorts of weird non-ascii character errors . I added - - coding : utf-8 - - to the first line of the python file which sort-of helped and switched to using pycharm s ide which really helped . twill is giving me all sorts of issues inside google-app-engine s sandbox that i am not getting on my system . i can get finally the html for one webpage but can t submit forms in the way i was doing so simply on my system . showforms isn t even showing the forms maybe because i disabled tidy and the html is not being parsed properly i think one way to move forward here is to get tidy to work inside twill . obviously roadblocks are being hit under the hood and they are hard for me to see . it seems like twill is a high level abstraction and maybe is not a good idea right now for using on google-app-engine . next i will try to switch to mechanize.py or look for another sandbox maybe amazon", "Question : I m currently using urllib2 and BeautifulSoup to open and parse html data . However I ve ran into a problem with a site that uses javascript to load the images after the page has been rendered I m trying to find the image source for a certain image on the page . I m thinking Twill could be a solution and am trying to open the page and use a regular expression with find to return the html string I m looking for . I m having some trouble getting this to work though and can t seem to find any documentation or examples on how to use regular expressions with Twill . Any help or advice on how to do this or solve this problem in general would be much appreciated . .. . Answer : I d rather user CSS selectors or real regexps on page source . Twill is AFAIK not being worked on . Have you tried BS or PyQuery with CSS selectors" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
googlevis@api@133
googlevis -- the googlevis package provides an interface between r and the google chart tools formerly know as google visualisation @placeholder .
{ "confidence": [ 57.22346115112305, 53.19697570800781, 50.946258544921875, 49.952850341796875, 48.547794342041016, 48.08482360839844, 44.904090881347656, 43.916053771972656, 43.916053771972656, 43.916053771972656, 42.85550308227539, 42.81504821777344, 42.536705017089844, 41.9918098449707, 41.9918098449707, 41.9918098449707, 41.26885223388672, 41.26885223388672, 41.26885223388672, 40.95204162597656, 40.47218322753906, 40.434906005859375, 40.05729675292969, 39.86790466308594, 39.609222412109375, 39.609222412109375, 39.14859390258789, 39.14859390258789, 39.05656051635742, 38.66922378540039, 38.508216857910156, 38.175636291503906, 38.175636291503906, 37.986717224121094, 37.07463073730469, 36.981693267822266, 36.8933219909668, 36.5859375, 36.5859375, 36.5859375, 36.521331787109375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.32708740234375, 36.14203643798828, 35.48493194580078, 35.478553771972656, 35.22608184814453, 35.204856872558594, 34.66238021850586, 34.66238021850586, 34.59095764160156, 34.52336883544922, 33.56570053100586, 33.561370849609375, 33.54522705078125, 33.277427673339844, 32.52410125732422, 32.410743713378906, 32.35855484008789, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.906070709228516, 31.200942993164062, 31.200942993164062, 30.805063247680664, 30.805063247680664, 30.805063247680664, 30.805063247680664, 30.72740364074707, 30.72740364074707, 30.25876235961914, 29.57177734375, 29.200315475463867, 29.200315475463867, 29.200315475463867, 28.33049964904785, 28.099308013916016, 28.099308013916016, 28.099308013916016, 27.576007843017578, 27.383502960205078, 27.335628509521484, 26.779720306396484, 26.169769287109375, 26.169769287109375, 26.169769287109375, 26.169769287109375 ], "content": [ "From the journal article here https : journal.r-project.org archive 2011-2 RJournal 2011-2 Gesmann+de Castillo.pdf .. . .. . The googleVis package provides an interface between R and the Google Visualisation API .", "I have the following bubble chart using googleVis package in R : .. . .. .", "Not with googleVis .", "How can node and link colors be changed in R googleVis sankey chart", "Data : sport Chart ID : TimelineID95891e64f3 googleVis-0.5.10 .. . R version 3.2.3 2015-12-10 Google Terms of Use Documentation and Data Policy", "I am newbie to shiny R and googleVis .", "I want to map states using googleVis package .", "I am trying to create custom tooltips for a googlevis pie-chart .", "I m trying to make an interactive rMarkdown with a googleVis motion chart in it .", "I am using googleVis and shiny to automatically create a Organizational Chart .", "Is this possible in the googleVis package or do I need to edit the chart html ad hoc to include an overlay", "I would like to format number add big.mark in tooltip in googleVis chart .", "I have a method called explore .. . which creates a googleVis chart either Bar Chart Pie etc .", "I display the data using gvisTable from the googleVis package .", ".. . .. . Can this be achieved with any other package for displaying tables - googleVis or other", "I am having trouble adding a title to gvisGeoChart in the googlevis package .", "ggvis has export png but that doesn t work for googleVis .", "Is there a way to remove or hide the footer from the googleVis output", "Here is what shows up in every googleVis output .", "Your solution seems to work for Google Charts itself but not for googlevis or I m doing it wrong .", "I am using the googleVis package in R and specifically I am trying to work something out with the gvisMap command .", "I am trying without any success to embed a motion chart created through googleVis package .", "Similar to the AndrewMap reproduced below I have a number of points that I am plotting over a Google Earth map using the googleVis package .", "Can this be done using googleVis", "I have a Rmarkdown document that uses googleVis library .", "Is there a way to do multi-level sorting in a gvisTable in googleVis", "I have found Using Roles via googleVis http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html but I cannot replicate a similar concept to a pie-chart .", "See below for one of my attempts to achive this : .. . .. . Moreover I found out that the first column chart example in Using Roles via googleVis http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html is not working properly .", "The functions of the package allow the user to visualise data stored in R data frames with the Google Visualisation API .", "Similar to this question : Google Visualization : Organizational Chart with fields named the same http : stackoverflow.com questions 18276167 google-visualization-organizational-chart-with-fields-named-the-same I want to use formatted values in googleVis to be able to create fields in an organizational chart which have the same name .", "The secret is myvar.googleVis thing youneed linking the variable myvar to the googleVis feature .", "I am curious as to why I would need to delay the rendering of a googleVis chart on a switch", "I have a simple 2 column data frame I m trying to plot with a googleVis Geo Chart .", "How can I save a gvis object from googleVis to png", "googleVis bubble chart http : i.stack.imgur.com ZjThP.png .. . .. . I have a requirement to add an arrow from the Old Value to the new Value .", "Yesterday I asked this quesion : Hover style of label in googleVis http : stackoverflow.com questions 36125419 hover-style-of-label-in-googlevis and got the answer .", "Is there any other way except using googleVis in order to build org charts in R", "I use the output data frame to plot a Sankey using gvissankey function in googleVis package .", "To explain the problem in detail as an example I ve used Fruits data set provided in googleVis package .", "After talking to one of the developers of the googleVis package I got the solution to the problem now .", "It seems to me that the annotated time line produced by the gvisAnnotatedTimeLine function of the googleVis R package only allows a unique value for each date .", "I am not able to get googleVis charts to display inside slidify .", "googleVis in slidify http : i.stack.imgur.com bsacM.png .. . .. . This is from the Fruits example .", "I ve been trying to get some googleVis outputs into Shiny without success .", "I am concerned if this is an issue with googleVis or just an error in my code somewhere .", "If you click on Hyperlink you can see the image Googlevis has produced", "I m trying to change the style of hover-label in googleVis columnChart .", "that is the JavaScript JSON syntax for an object with properties -- not sure if there is a way to define in googlevis", "I honestly don t care that much about using googleVis for this .", "Does anybody know what command function from the GoogleVis package I can use to plot cumulative distribution functions CDFs", "I m having some trouble with the zoomStartTime and zoomEndTime parameters of gvisAnnotationChart from the googleVis package .", "Picking up on this question http : stackoverflow.com questions 29371977 how-to-change-node-and-link-colors-in-r-googlevis-sankey-chart I m trying to assign a set of colours to nodes and hopefully links with the gradient mode in a Sankey chart using GoogleVis package in R . The issue is that I have the same categories in each of the 3 sets of nodes and I m having trouble getting it to cooperate .", "heatmap http : i.stack.imgur.com eerFB.jpg .. . .. . This is what I have tried using googleVis .. . .. .", "I found it was also asked here without an answer : stackoverflow.com questions 33546394 http : stackoverflow.com questions 33546394 r-googlevis-to-png-file rq 1", "I can print the googleVis chart to file and open it outside of slidify to get it to work correctly but inside slidify I get the following :", "I figured out a possible solution I can replace the text in the header part of the googleVis chart with the code for a title in the html format .", "I figured that out with print statements and by stumbling across this post : Shiny googleVis GeoChart not displaying with reactive switch http : stackoverflow.com questions 33530066 shiny-googlevis-geochart-not-displaying-with-reactive-switch 33545225 33545225 .", "@mages has this documented on this webpage which shows features not in demo googleVis : .. . .. . http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html .. . .. . EXAMPLE ADDING NEW DIMENSIONS TO GOOGLEVIS CHARTS .. . .. . We have shown py.style deterministically here but you could code it to be dependent on your categories .", "I m having issues running some code to plot markers on a US map using googleVis and gvisGeoChart .", "googleVis requires you add column roles https : developers.google.com chart interactive docs roles what-roles-are-available to your data.frame for aesthetics mapping .", "I am trying to build GoogleVis Motion map by using gvismotionchart in r . I have created a char using below code .", "If gvisTable does not have this feature but there is another type of table from another package other than googleVis that can do it in Shiny that would be fine as well .", "This is currently not possible via the google visualisation api .. . .. . https : code.google.com p google-visualization-api-issues issues detail id 507 .. . .. . The way it would work with for example the column chart is : .. . .. .", "The Google Chart API Forum https : groups.google.com forum forum google-visualization-api might be the best place to ask such questions as they are not directly related to R or shiny .", "I have drawn a Sankey graph in D3 using the googleVis .", "For example with googleVis I can use gvisGeoChart to place either the markers or the polygons but not both on the same map .", "It seems that Shiny has an issue with rendering googlevis charts in the pop-up window clicking open in browser solves the problem... .", "I am new to shiny and the googleVis packages and I am trying to construct to create a simple bare bones gvisMotionChart in Shiny .", "I have a shiny application where the user can switch databases out the output is displayed in a googleVis geochart .", "I can tell you that the dygraph works perfectly with the switch which leads me to believe it is googleVis .", "BarChart code maybe this is a problem because i am using googleVis library so not sure if i can use this in the popup .", "I m hoping I provided enough information that someone with more knowledge of googleVis could give a solution .", "How to remove the axis-labels from the label on the bubble in the Googlevis Bubblechart that comes on hovering .. . .. .", "I m getting some guidance from outside stackoverflow - One has to make use of the googleVis API for visualization .", "a few months ago I created a map and a table and merged them together in googleVis .", "I am using R to produce the code for Google Chart then editing that code as needed .", "I am using Google Motion Chart with Shiny R and I am not able to edit some of the basic things .", "Where I m at so far : The only solution I ve been able to find is to use googleVis instead of DT to create the tables .", "It turns out that RStudio s native browser has difficulty displaying googleVis exhibits through Shiny .", "Due to static graph prepared by ggplot we are shifting our graphs to googleVis with interactive charts .", "You need to add specifically named columns linked to your variables to your data table for googleVis to pick up .", "Server Block with series .. . .. . In short I want to fix the colors for each level of a factor variable that can be used with any googleVis chart so that there is consistancy in the colors if there are 2 different graphs side-by-side .", "Outside of Rmarkdown the stand alone googleVis chart works fine but when I plug it in the Rmarkdown file I am receiving just the Rmarkdown Code : .. . .. . Viewer Output : .. . .. .", "Following the overlay documentation developers.google.com chart interactive docs overlays overview https : developers.google.com chart interactive docs overlays overview you d need to position the styling information before the chart script generated by googleVis and body information after .", "I d appreciate any guidance on optimizing further leaflet or take advantage of another package that allows me to overlay multiple variables I may not fully understand how to take advantage of rMaps or googleVis in this way .", "Check this post : stackoverflow.com questions 34579494 http : stackoverflow.com questions 34579494 googlevis-does-not-work-properly-with-two-dependent-widget-shiny", "First you should have a library open to shiny in both server.R and ui.R it looks like you reproduced googleVis twice in server.R .", "I would like to predefine the colors of a factor variable in a GoogleVis charts in such a way that the colors don t get recoded once the series is changed .", "As per the googleVis tutorial I am attempting to dynamically embed a chart into my web page using Brew as follows : .. . .. . html : .. . .. . test.brew : .. . .. . When the page is created everything except the javascript is inserted into the html file : .. . .. . Does anybody know how to fix this problem so that the javascript under is also outputted", "The GoogleVis issue : When I use gvisTable outside of Shiny apps they render perfectly fine but they do not render at all when using renderGvis and htmlOutput in Shiny .", "Now I would like to do the same in googleVis based on value df cat I would like parameters to get changed or grouping of line or charts .", "@vrajs5 -please take a look at the solution posted to your old question using myvar.style as extra column to get more out of googleVis", "Yes there is a maximum number of points that can be displayed using Google Maps API through googleVis .. . .. . As noted here : https : developers.google.com chart interactive docs gallery map data-format https : developers.google.com chart interactive docs gallery map data-format 5D .. . .. . Note : The Lat-Long pairs option loads maps much faster especially with large-data .", "I then receive the following error : .. . .. . Error in data.frame Latitude numeric 0 Longitude numeric 0 Rank c 2 : arguments imply differing number of rows : 0 3 .. . .. . I have searched and can t find too many tutorials on using googleVis in R and especially with regards to gvisGeoChart apart from the documentation .", "The dygraphs package is an R interface to the dygraphs JavaScript charting library .", "For example my data frame would contain the following : .. . .. . My goal is to create an interactive map with something like googleVis in order to scale conversions by day by city .", "I ve looked at some of the other nice web maps through rMaps and googleVis but as far as I can tell they only allow one map layer at a time - I need to present two variables .", "Inspired from this https : gist.github.com wch 5436415 you could do : .. . .. . ui.R .. . .. . server.R .. . .. . It basically creates htmlOutput plots dynamically and binds the googleVis plots when there is data in the subset .", "This is probably more of a javascript question.Let s see if anyone familiar with googlevis API can chip in how to format numbers for labels the way one can do it to format text in a gvisTable .", "You need to generate a data frame of the CDF for your PDF such as this example for dnorm : .. . .. . I m not sure what googleVis buys you for visualization of this function beyond a simple plot : .. . .. . or in one line :" ] }
{ "confidence": [ 95.01824951171875, 69.53510284423828, 68.909912109375, 68.58675384521484, 65.19171905517578, 65.16648864746094, 63.075096130371094, 60.7508430480957, 58.757320404052734, 58.32283020019531, 57.02058029174805, 56.43793869018555, 55.336952209472656, 55.03242874145508, 54.97809600830078, 54.833919525146484, 54.74384689331055, 53.94617462158203, 53.28993225097656, 53.09413146972656 ], "content": [ "Question : Does anybody know what command function from the GoogleVis package I can use to plot cumulative distribution functions CDFs .. . Answer : From the journal article here https : journal.r-project.org archive 2011-2 RJournal 2011-2 Gesmann+de Castillo.pdf .. . .. . The googleVis package provides an interface between R and the Google Visualisation API . The functions of the package allow the user to visualise data stored in R data frames with the Google Visualisation API . You need to generate a data frame of the CDF for your PDF such as this example for dnorm : .. . .. . I m not sure what googleVis buys you for visualization of this function beyond a simple plot : .. . .. . or in one line :", "Question : Is there a way to remove or hide the footer from the googleVis output Here is what shows up in every googleVis output . Data : sport Chart ID : TimelineID95891e64f3 googleVis-0.5.10 .. . R version 3.2.3 2015-12-10 Google Terms of Use Documentation and Data Policy .. . Answer : You can customize the jsFooter by setting a global option . Here I have set the the plot.tag to chart and jsFooter to NULL which removes the footer entirely . Use getOption gvis.tags to see a list of additional tags you can customize .", "Question : null .. . Answer : Google Charts has overlay functionality that allows you to put an image over a plot at a specified position . Is this possible in the googleVis package or do I need to edit the chart html ad hoc to include an overlay Comment : Are you using knitr to produce your output If so I suspect that you could figure out something with the includes YAML parameter as shown here : rmarkdown.rstudio.com html document format.html includes http : rmarkdown.rstudio.com html document format.html includes . Following the overlay documentation developers.google.com chart interactive docs overlays overview https : developers.google.com chart interactive docs overlays overview you d need to position the styling information before the chart script generated by googleVis and body information after . Comment : No . I am using R to produce the code for Google Chart then editing that code as needed .", "Question : I am trying to create custom tooltips for a googlevis pie-chart . I have found Using Roles via googleVis http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html but I cannot replicate a similar concept to a pie-chart . See below for one of my attempts to achive this : .. . .. . Moreover I found out that the first column chart example in Using Roles via googleVis http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html is not working properly . Although the certainty concept is working fine the tooltips are not displayed as defined in Sales.html.tooltip column of dat dataframe . Apparently I am having a problem with tooltips in every other chart apart from gvisScatterChart . Comment : I m not sure that the tooltip can be different from the label year in your example for a pie-chart . Try options list gvis.editor Click to Edit and you ll notice there is nothing really to edit for different labels from the legend items . You could browse the documentation here https : developers.google.com chart interactive docs gallery piechart Configuration Options but I didn t notice anything too promising . .. . Answer : This is currently not possible via the google visualisation api .. . .. . https : code.google.com p google-visualization-api-issues issues detail id 507 .. . .. . The way it would work with for example the column chart is : .. . .. . enter image description here http : i.stack.imgur.com Ue2JO.png Comment : Thanks a lot for your answer have you tested the gvisColumnChart gvisBarChart and the gvisLineChart cases as well I think they don t work as well . The only case where I was able to modify the tooltiops was the gvisScatterChart . Comment : Have added an example of how it would work with column charts . Comment : I have successfully implemented html tooltips as you suggested above and I have also modified the content in terms of formating . I am now trying to modify the tooltip box itself i.e the border the background-color positioning etc but i cannot find how to achive this . Any ideas", "Question : I am using googleVis and shiny to automatically create a Organizational Chart . Similar to this question : Google Visualization : Organizational Chart with fields named the same http : stackoverflow.com questions 18276167 google-visualization-organizational-chart-with-fields-named-the-same I want to use formatted values in googleVis to be able to create fields in an organizational chart which have the same name . I suspect it has something to do with roles but I cannot figure the correct syntax out . The help page for gvisOrgChart mentiones formatted values but does not say how to set them : You can specify a formatted value to show on the chart instead but the unformatted value is still used as the ID . .. . .. . In the above example the duplicated name Mexico is only shown once in the chart . I want both of them to be drawn One in the Europe and one in the America parent node . Thank you for your help .. . .. . cateraner Comment : a column value can be an intrinsic value such as 2000 . or an object with keys for v alue and f ormatted value -- v : 2000 f : 2 000.00 Comment : @WhiteHat Maybe I missunderstood your comment but changing a cell value to v : 2000 f : 2 000.00 with a command like Regions 7 1 - v : 2000 f : 2 000.00 just gives me a box within the organochart that has v : 2000 f : 2 000.00 as text . Your solution seems to work for Google Charts itself but not for googlevis or I m doing it wrong . Comment : that is the JavaScript JSON syntax for an object with properties -- not sure if there is a way to define in googlevis .. . Answer : After talking to one of the developers of the googleVis package I got the solution to the problem now . The formatted value contains extra speak marks which have to be removed before the text is usable as HTML . In the resulting graph you have two times Germany one under node America and one under Europe . The same way you could add HTML formations to your text color font etc . . Thanks too Markus Gesmann for helping me on that .", "Question : Due to static graph prepared by ggplot we are shifting our graphs to googleVis with interactive charts . But when it comes to categorization we are facing many problems . Let me give example which will help you understand : .. . .. . ggplot2 provides parameter like alpha colour linetype size which we can use with categories like shown below : .. . .. . Not just line chart but majority of ggplot2 graphs provide categorization based on column values . Now I would like to do the same in googleVis based on value df cat I would like parameters to get changed or grouping of line or charts . Note : I have already tried dcast to make multiple-columns based on category column and use those multiple-columns as Y input but that it not what I would like to do . Can anyone help me regarding this Let me know if you need more information . Comment : I m not familair with R but in the general javascript implementation of the Google Visualization API all data series are defined by columns not by values in a column . You will likely have to split your data into multiple-columns to get the effect you want . Comment : Thats why I have put this question.. . There might be a way around in R.. . May be using other package Comment : You can create interactive ggplot graphs with plotly http : ropensci.org blog 2014 04 17 plotly Comment : @vrajs5 -please take a look at the solution posted to your old question using myvar.style as extra column to get more out of googleVis .. . Answer : vrajs5 you are not alone We struggled with this issue . In our case we wanted to fill bar charts like in ggplot . This is the solution . You need to add specifically named columns linked to your variables to your data table for googleVis to pick up . In my fill example these are called roles but once you see my syntax you can abstract it to annotations and other cool features . Google has them all documented here check out superheroes example https : developers.google.com chart interactive docs roles stylerole but it was not obvious how it applied to r questions tagged r . @mages has this documented on this webpage which shows features not in demo googleVis : .. . .. . http : cran.r-project.org web packages googleVis vignettes Using Roles via googleVis.html .. . .. . EXAMPLE ADDING NEW DIMENSIONS TO GOOGLEVIS CHARTS .. . .. . We have shown py.style deterministically here but you could code it to be dependent on your categories . The secret is myvar.googleVis thing youneed linking the variable myvar to the googleVis feature . RESULT BEFORE FILL yvar py GoogleVisBarChartBeforeRoleStyleExample http : i.stack.imgur.com V73P5.png .. . .. . RESULT AFTER FILL yvar c py py.style .. . .. . GoogleVisBarChartRoleStyleExample http : i.stack.imgur.com U2ZAp.png .. . .. . Take a look at mages examples code also on Github https : github.com mages googleVis blob master demo Roles.R and you will have cracked the categorization based on column values issue .", "Question : null .. . Answer : Picking up on this question http : stackoverflow.com questions 29371977 how-to-change-node-and-link-colors-in-r-googlevis-sankey-chart I m trying to assign a set of colours to nodes and hopefully links with the gradient mode in a Sankey chart using GoogleVis package in R . The issue is that I have the same categories in each of the 3 sets of nodes and I m having trouble getting it to cooperate . I want nodes A B C which appear in 3 different parts of the chart to have the same colors respectively blue orange green . Unfortunately I can t figure out how the colours are being assigned .", "Question : I would like to format number add big.mark in tooltip in googleVis chart . Yesterday I asked this quesion : Hover style of label in googleVis http : stackoverflow.com questions 36125419 hover-style-of-label-in-googlevis and got the answer . Today I ve got quite simillar problem - the difference is that there are more than one group so adding tooltip does not work.. . The visualisation of my problem : enter image description here http : i.stack.imgur.com RKuou.png .. . .. . And my code : .. . .. . ui.R : .. . .. . and server.R : .. . .. . I d be gratfull for any help .. . Answer : You can do this using roles https : developers.google.com chart interactive docs roles here s an example : Comment : Thanks a lot After I got an answer for my first question stackoverflow.com questions 36125419 http : stackoverflow.com questions 36125419 hover-style-of-label-in-googlevis I tried to do the same . The only difference was the order of yvar . It would never have occured to me that this order is important . Amazing", "Question : null .. . Answer : I m new to Shiny and R in general and could do with some help I ve been trying to get some googleVis outputs into Shiny without success . I can get gvis outputs for bubble motion and scatter charts directly in R but not in a shiny app . I ve checked reference code from Mages and others but I don t get an output chart in Shiny . I ve stripped it back to its most basic but can t get the visualisation . Is there anyone who could give me a pointer on what I am doing wrong Thanks Comment : I don t see anything wrong with your code except that it s not reproducible . We don t have access to Newyork.csv . Try using builtin data like mtcars . Comment : I ve solved my own prooblem thanks to another post from a long time ago . It seems that Shiny has an issue with rendering googlevis charts in the pop-up window clicking open in browser solves the problem... .", "Question : null .. . Answer : I would like to predefine the colors of a factor variable in a GoogleVis charts in such a way that the colors don t get recoded once the series is changed . To explain the problem in detail as an example I ve used Fruits data set provided in googleVis package . General Block .. . .. . UI block .. . .. . Server Block .. . .. . The code produces a reactive gvisBarChart which changes based on the Location selected . Now the problem arises when the gvisBarChart recodes colors based on the reactive input so when East location is selected blue color is assigned to Bananas and red is assigned to Oranges but when West location is selected blue color is again assigned to apples .. . .. . This problem was addressed here http : shiny.rstudio.com gallery google-charts.html but it doesn t work for gvisBarChar and neither for gvisPieChart .. . .. . When I use series in the options argument the graph disappears . Server Block with series .. . .. . In short I want to fix the colors for each level of a factor variable that can be used with any googleVis chart so that there is consistancy in the colors if there are 2 different graphs side-by-side .", "Question : null .. . Answer : I am trying to build GoogleVis Motion map by using gvismotionchart in r . I have created a char using below code . I want to select all id in chart attached . How I can do that Code : .. . .. . enter image description here http : i.stack.imgur.com CSjbt.png .. . .. . Please anyone could help Comment : If you click on Hyperlink you can see the image Googlevis has produced Comment : Thanks David for improving question", "Question : I have trolled the internet for about a day trying to resolve this issue . I have a shiny application where the user can switch databases out the output is displayed in a googleVis geochart . The chart renders perfectly without the switch being used but once the switch is used in the UI the chart dispears . I have temporarily resolved the issue with an actionButton and an eventReactive statement but that means the user has to hit the button for the chart to refresh not optimal . I am concerned if this is an issue with googleVis or just an error in my code somewhere . I can tell you that the dygraph works perfectly with the switch which leads me to believe it is googleVis . Here is my UI .. . .. . Here is my server.R .. . Answer : I seem to have solved this issue on my own using Sys.sleep 0.3 before the gvisGeoChart function . I am curious as to why I would need to delay the rendering of a googleVis chart on a switch Comment : I think I figured it out . Check this post : stackoverflow.com questions 34579494 http : stackoverflow.com questions 34579494 googlevis-does-not-work-properly-with-two-dependent-widget-shiny", "Question : null .. . Answer : I have the following bubble chart using googleVis package in R : .. . .. . enter image description here http : i.stack.imgur.com bwEMJ.png .. . .. . Code : .. . .. . I want to combine this bubble chart with a line chart to link the different bubbles . I checked Combocharts but could find options to use it with bubble Chart . Would appreciate any direction in this regard .", "Question : I m trying to get started with slidify and have been trying to reproduce some of the examples shown around the internet . I am not able to get googleVis charts to display inside slidify . I can print the googleVis chart to file and open it outside of slidify to get it to work correctly but inside slidify I get the following : googleVis in slidify http : i.stack.imgur.com bsacM.png .. . .. . This is from the Fruits example . .. . Answer : Changing results hold to results asis made the difference .", "Question : null .. . Answer : I am trying without any success to embed a motion chart created through googleVis package . As an example I m trying to replicate the same motion chart at : .. . .. . http : takahashik.blogspot.com.br 2011 01 googlevis-example-for-data-iris 10.html .. . .. . I m using the following script : .. . .. . Then I am uploading the gadget.html file to my dropbox and generating a link-to share it publicly . In my google site I open the page I want to embed the chart into and do the following : Insert - More Gadgets - Add gadget by URL and then when I paste the dropbox link-to it I get the following error : .. . .. . So I checked this error and the general solution I ve been seeing is to replace any with amp in the html code for whatever the reason I ve never worked with html or anything similar . I do get the same error doing that though . I replace the in my file-upload it again share it etc and the same error keeps showing up . Any simple solution for this Comment : Can you share the gadget.html file Comment : Hey Jasper thanks for commenting The file can be downloaded at link https : www.dropbox.com s ncmkdf3hagmhmof myGadget.xml", "Question : null .. . Answer : It seems to me that the annotated time line produced by the gvisAnnotatedTimeLine function of the googleVis R package only allows a unique value for each date . Is there a way to plot several values per date with gvisAnnotatedTimeLine Otherwise is there an alternative to do so Comment : What do you mean but unique value for each data many values for each date means taht you have many time lines or many time series...and gVisAnnotaedTimeLine allow to draw multiple time-series https : google-developers.appspot.com chart interactive docs gallery annotatedtimeline Configuration Options . So I am little confused. . Comment : Each day there are several measurements . The time line could be done with the average value by day but I d like to plot the individual values too .", "Question : How can I save a gvis object from googleVis to png ggvis has export png but that doesn t work for googleVis . I saw several asking this but is there really no way Comment : Perhaps this post http : stackoverflow.com questions 27193287 using-ggvis-in-rnw-with-knitr 27193693 27193693 can help you . Comment : I tried that . As I said I don t think it can work at least it didn t work when I tried correct me if I am wrong because that posts refers to export png that works with ggvis . Not with googleVis . Comment : I found it was also asked here without an answer : stackoverflow.com questions 33546394 http : stackoverflow.com questions 33546394 r-googlevis-to-png-file rq 1 Comment : taking the long road you could create a very simple shiny app just with your plot and take a webshot using appshot from the package webshot . .. . Answer : There are many ways to proceed with this with unpredictable results . Some of the tricks : .. . .. . 1 . Xvfb imagemagick and browser . You need to have all three of them installed . This won t work on Windows . I am assuming you have install xvfb and imagemagick . You start xvfb server in shell : - .. . .. . Xvfb : 3 -screen 0 1024x768x24 .. . .. . .. . Now in R you can print the file as html : .. . .. . print p file p.html .. . .. . .. . Now a system call : .. . .. . system DISPLAY : 3 firefox g1.html .. . .. . .. . Now print the file using : .. . .. . system DISPLAY : 3 import -window root p.png .. . .. . .. . You will get the file as p.png . You can use some other browser also like chrome . 2 . Using wkhtmltopdf package . After installing wkhtmltopdf and having it in your PATH use system call : .. . .. . print p file p.html .. . system wkhtmltoimage --enable-plugins --javascript-delay 10000 p.html p.png .. . .. . .. . Results aren t predictable . Sometime flash doesn t work . Sometime it works for some platform . I couldn t reproduce like my first solution . For OP this solution worked . This is a cross-platform solution . 3 . As shiny app phantomjs and webshot : .. . .. . Assuming you have printed the file that I have given create a shiny app using following methods : .. . .. . mkdir app Create App Directory .. . Create UI .. . cat - EOF app ui.R .. . library shiny .. . .. . shinyUI fluidPage .. . titlePanel Google Chart .. . mainPanel .. . includeHTML . . g1.html .. . .. . .. . EOF .. . Create server .. . cat - EOF app server.R .. . library shiny .. . shinyServer function input output .. . .. . EOF .. . .. . .. . Now install phantomjs : .. . .. . npm-install -g phantomjs .. . .. . .. . In r : - .. . .. . install.packages webshot .. . appshot app p.png .. . .. . .. . You will see that you won t get flash charts because phantomjs now doesn t support flash . So this method too is limited . Only first method will work but it s not cross-platform . But you can proceed with that approach in windows by using equivalent stuff . Comment : Thanks I was of course hoping there was a more straight forward way but I will accept this as the answer if nothing new pops up in the next week . So far I have just opened the plot in my browser and printed to pdf . That works too and is perhaps the fastest for a limited number of plots . Comment : @JanStanstrup What about Using wkhtmltopdf package Is it working for you For me it doesn t work with flash . But some people have reported success . Comment : I ll give it a try in a little while . Comment : I tried it now and it works wkhtmltoimage just need to remember to add wkhtmltoimage to PATH or point it to the exe in the system call . I couldn t figure out how to get a high resolution image though . But wkhtmltopdf works too so you can at least get that and crop convert . Not terribly convenient but it works . Comment : @JanStanstrup Welcome . I updated my answer with your reply .", "Question : null .. . Answer : I m having some trouble with the zoomStartTime and zoomEndTime parameters of gvisAnnotationChart from the googleVis package . Specifically running example three : .. . .. . Produces a plot with undefined is not a function in the y scroll area . The documentation states Zoom into the time window no Y-axis ticks but has no other information . I have seen several examples on JSFiddle of this working Configuring Google Annotated Timeline http : stackoverflow.com questions 6483801 configuring-google-annotated-timeline but I can t translate this to R . Any help would be appreciated . Comment : to me this works", "Question : I am having trouble adding a title to gvisGeoChart in the googlevis package . Here is the code I am using : .. . .. . When I run this code it produces the correct geochart but there is no title at the top of the chart . Thanks for your help Comment : looks like you haven t properly closed colorAxis values : 1 5 Comment : thanks for the help sorry i miss typed the code . I retyped it to adress your concern . Comment : I increased the chart width and height to 1000 and it did not make a difference . Comment : just noticed title is not included in the configuration-options https : developers.google.com chart interactive docs gallery geochart configuration-options for a GeoChart -- may not be available.. . Comment : ah i see damn . do you know of any way to add-in the title to the page at all .. . Answer : I figured out a possible solution I can replace the text in the header part of the googleVis chart with the code for a title in the html format . Thanks for the help", "Question : null .. . Answer : I have a simple 2 column data frame I m trying to plot with a googleVis Geo Chart . One column is categorical state and the other is continuous cash . I m having trouble formatting cash as cash e.g formatted 100 000 instead of 100000 as is appears in the data frame both in the legend and in the tooltip display . I can t seem to find anything on line that address this . Here is my code : .. . .. . Can someone help Thanks . Comment : did you try legend.numberFormat -- listed in the configuration options https : developers.google.com chart interactive docs gallery geochart configuration-options -- you may need to format https : developers.google.com chart interactive docs reference numberformat the data for the tooltip Comment : @WhiteHat . I ll give that a try . Problem with formatting the data in the dataframe is if I format it as xxx xxx in becomes a chr and doesn t render in the figure tooltip . Comment : not familiar with r -- but in JavaScript you can set both in column value object as v : 1234.5 f : 1 234.50 Comment : I m getting some guidance from outside stackoverflow - One has to make use of the googleVis API for visualization . However the code for the API appears to be html - so its a question of how to do it in r . Will update this when I get more info ." ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
struts2-jquery-plugin@ajax@79
struts2-jquery-plugin -- a plugin for the struts2 web framework that provides @placeholder functionality and ui widgets based on the jquery javascript-framework .
{ "confidence": [ 129.36416625976562, 64.84564971923828, 52.28569793701172, 50.8863410949707, 49.32870101928711, 46.897193908691406, 45.3779411315918, 41.13669967651367, 40.39647674560547, 39.6099967956543, 39.41888427734375, 37.25173568725586, 32.91114807128906, 31.28879165649414, 30.249248504638672, 30.052207946777344, 28.439695358276367, 25.92266845703125, 25.418746948242188, 22.98723793029785, 22.2844295501709, 20.60379409790039, 19.496768951416016, 19.432838439941406, 19.352054595947266, 14.162748336791992, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 13.316597938537598, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262, 10.885088920593262 ], "content": [ "A Plugin for the popular java web framework struts2 to provide ajax functionality and UI Widgets based on the jQuery javascript-framework .", "Now this plugin is deprecated and struts2-jquery-plugin https : github.com struts-community-plugins struts2-jquery could be used instead .", "I wanted to know the difference between Struts2 and Struts2 jQuery tags", "I m trying to populate a drop down list in a grid column using the Struts2-jQuery-grid-3.7.0 https : code.google.com p struts2-jquery downloads detail name struts2-jquery-grid-plugin-3.7.0.jar can 2 q plugin as follows .", "I could use the jQuery plugin on Struts2 2.3.14 I just removed the Target directory of the application and used the following dependencies .", "Is there any way to target a column in a jqGrid in my case Struts2-jQuery-Grid Plugin 3.7.0 on certain rows only", "Based on this question http : stackoverflow.com questions 15087557 can-not-find-the-tag-library-descriptor-for-struts2-jquery-tags-in-jsp I changed struts to struts2 and based on this one http : stackoverflow.com questions 20772405 struts2-jquery-plugin-java-lang-classnotfoundexception-org-apache-struts2-views I added the bean to struts.xml file but to no avail .", "The first one is used for Struts2 core tag library https : struts.apache.org docs struts-tags.html .. . .. . The framework provides a tag library decoupled from the view technology .", "I am going to use struts-jquery taglib https : code.google.com p struts2-jquery wiki DatePickerTag Datepicker with different options and animations but the application throws the following errors .", "It adds replaces the Ajax being used by struts2 dojo plugin https : struts.apache.org docs ajax-tags.html .", "I am new to Struts2 .", "Added struts2-jquery tag because it has 31 followers while your other sj tags have 3 followers.. .", "You have dependency problem : .. . .. . class TagLibraryDirectiveProvider exists in struts2-core jar but in newer version 2.3.16 than you declared 2.3.8 : http : struts.apache.org release 2.3.x struts2-core apidocs org apache struts2 views TagLibraryDirectiveProvider.html .. . .. . So simple upgrade the dependency .", "Add Struts2 jQuery Plugin Tag lib to your JSP .. . .. . Enable jQuery Grid Plugin in your Head Tag .. . .. . update : .. . .. . Specify an Edit Url in your JSP .. . .. . And enable Edit by setting following attributes in your JSP .. . .. . then define which Column should be editable .. . .. . Example for an Edit Options : .. . .. . Example for an Edit Rules : .. . .. . update : 1", "For the records the solution for the fake scenario described in the question using Struts2-jQuery-Grid Plugin instead of the raw jqGrid would be :", "Regarding Solution 1 I don t think is possible in Struts2-jQuery-Grid it does not have cellattr exposed since I m using checkbox formatter I will create a custom one with another formatter as in Solution 2b .", "the second is added via plugin .", "For example I want to show the content of the 2nd column only if the 1th column value is Movie : .. . .. . I ve tried to use conditional OGNL expressions in hidden and cssClass fields of the GridColumnTag http : code.google.com p struts2-jquery wiki GridColumnTag but immediately noticed they evaluate once against the whole column not at every iteration .", "I posted a question for it as well stackoverflow.com questions 22600204 http : stackoverflow.com questions 22600204 how-to-have-access-to-servletrequestaware-on-struts2-core-2-3-16-1", "Many Actions need drop-down lists http : www.mkyong.com struts2 struts-2-sselect-drop-down-box-example and other controls pre-populated before the page displays .", "Dojo plugin is deprecated .. . .. . The Dojo plugin will be deprecated on Struts 2.1 .. . .. . Struts 2.0 versus Struts 2.1 and the Dojo tags .. . .. . The easiest way to get documentation for Struts 2.0 Dojo tag usage is to look at older Struts 2 documentation like the Struts 2.0.11 Ajax tags wiki documentation .", "Here I am facing some issue when replace struts-dojo autocompleter to struts-jquery autocompleter .", ".. . The types of tags can be broken in to two types : generic and UI .", "getting below response from server : .. . .. . firstName : Bulwark Technologies LLC partnerId : 925 firstName : Bulwark Technologies LLC1 partnerId : 926 firstName : Bulwark Technologies LLC2 partnerId : 927 .. . .. . For displaying at client-side I am using Struts2-jquey-autocompleter - .. . .. . I am getting undefined multiple times - based on result found in query at server-side in textbox .", "Currently I am doing struts up-gradation task struts2.0 to struts2.5 .I want to replace struts dojo tag with struts-jquery .", "As a workaround I can manually hide the columns in that rows with javascript after the grid is populated but that is a hack and I m wondering if there is a clean solution to conditionally do something on a columns per-row .", "In this section we describe each tag in general terms such as the attributes it supports what the behaviors are and so forth .", "Most tags are supported in all template languages see JSP Tags Velocity Tags and FreeMarker Tags but some are currently only specific to one language .", "Whenever a tag doesn t have complete support for every language it is noted on the tag s reference page .", "Besides function and responsibility the biggest difference between the two is that the HTML tags support templates and themes .", "In addition to the general tag reference we also provide examples for using these generic tags in each of the support languages .", "thank you for the informative description .", "welcome don t forget to upvote it", "Exceptions .. . .. . POM.xml", "Why are you using the Struts 1.3 taglib", "if I change that to 2.3.16.1 which is the latest one I can not use ServletResponseAware interface anymore", "And : .. . .. . I compiled and added them in my classes folder", "NOTE : I can t simply erase the content from the source List as it would be obvious because COL 2 in my real case is a Boolean represented as checkbox .", "There are many ways how you can implement the requirement .", "One of the most easy is the setting of color : transparent CSS on the cells which you need to hide .", "For example you define the CSS rule .. . .. . and you assign the class hiddenCell to specified cells of the COL 2 .", "You can use cellattr property of COL 2 for it : .. . .. . The demo http : www.ok-soft-gmbh.com jqGrid transparentTextInColumn.htm demonstrates the approach .", "Disadvantage of the approach - the hidden text still exist on HTML page and so one can examine it if required .", "Another way is the usage of custom formatters .", "For example you can define the following formatter callback .. . .. . The demo http : www.ok-soft-gmbh.com jqGrid removeTextInColumn.htm demonstrates the second approach .", "Disadvantage of the approach - it s a little difficult to combine usage of custom formatter with another formatter like formatter : select in the example above .", "Nevertheless one can do it too : .. . .. . like the next demo http : www.ok-soft-gmbh.com jqGrid removeTextInColumn .htm .", "If you loads the data from the server then probably the best choice would be to modify the input data the input data for the column COL 2 inside of beforeProcessing callback .", "See the answer http : stackoverflow.com a 9855764 315935 or this one http : stackoverflow.com a 9722466 315935 for code examples .", "Great answer .", "Thanks a lot .", "It worked like a charm .", "Two side effects checkbox is not centered in the td anymore and rows with even only one field empty returned from the formatter have an higher line-height 33 instead of 24", ".", "Returning prevents the second one .", "@AndreaLigios : You are welcome", "I think that the usage of nbsp instead of or would be better .", "And the action where the CategoryList action is mapped is as follows .", "When a given edit link on the grid is clicked the load method is executed where a list of categories is loaded from the database .", "The list in the grid however displays nothing in edit mode when the edit link is clicked .", "I cannot find relative examples that may demonstrate this kind of thing .", "How to populate this drop down list especially how to give this drop down labels using the catName property and values using the catId of Long type property separately while category in the list has-many other attributes", "I don t find relevant examples to map a java.util.List E to sjg : grid .", ".. . .. . subCategory.category.catName is a nested property of Product entity .", "In this case even after populating the list it should also be noted that the display value of this column is catName category name of type String .", "The value of the selected item however to be set to an instance of Product should be catId category id of type Long which doesn t seem possible as the name of this column is subCategory.category.catName .", "Intuitively catId subCategory.category.catId would be mapped to catName subCategory.category.catName which would be wrong if I could envision correctly as-if the list were already populated .", "Please add answer s if someone has .", "In Struts 2 the HTML drop down list can be rendered via s : select tag .", "To auto select a default-value for a drop down list just declared a value attribute in the tag and set the default-value accordingly .", "Example : .. . .. . A Java list to generate the select options for the drop down box .", "tag to render the HTML drop down box .", "The value defaultSearchEngine will call the corresponds Action class getDefaultSearchEngine method to return a default search-engine value .", "Many Actions share common concerns .", "Some Actions need input validated .", "Other Actions may need a file-upload to be pre-processed .", "Another Action might need protection from a double submit .", "In this example the drop down box will auto select the yahoo.com as the default option .", "I know about this stray s : select but I need a drop down list inside sjg : gridColumn .", "This should have something to do with the attribute editoptions dataUrl : dataURL or something else .", "@Tiny look at my new update answer... .", "editoptions are dynamic .", "They should be populated from the database .", "Given the example in the question catId as value and catName as label of select option option select .", "How can this be dynamic - editoptions value : France : France USA : USA Australia : Australia Norway : Norway Sp ain : Spain", "The list is populated in the CategoryList class .", "It should be mapped to editoptions catId as value and catName as label of select option option select .", "Can this be done", "@Tiny look at my update : 1 answer .", "Regarding to the documentation connected with gridColumn and editoptions property : .. . .. . dataUrl .. . .. . This option is valid only for elements of type select - i.e . edittype : select and should be the URL to get the AJAX data for the select element .", "The data is obtained via an AJAX call and should be a valid HTML select element with the desired options One .", "You can use option group .", "your action has to return valid select element .", "That means that your Product.jsp result need to look like this : .. . .. . Reference : http : www.trirand.com jqgridwiki doku.php id wiki : common rules", "This can be done if there is s : select alone .", "Can we have s : select inside a grid column", "If I understand you correctly the select is rendered when there is no taglib declaration inside Product.jsp right", "I am sure that you have some taglib declaration in JSP where you have placed gridColumn element then it will work without additional declaration inside Product.jsp .", "Could you please demonstrate it in conjunction with an sjg : grid", "I cannot envision this thing ." ] }
{ "confidence": [ 116.47306823730469, 68.81855773925781, 67.2459716796875, 64.5924301147461, 59.19207763671875, 53.42568588256836, 46.86259078979492, 46.479679107666016, 38.33354949951172 ], "content": [ "Question : I am new to Struts2 . I wanted to know the difference between Struts2 and Struts2 jQuery tags .. . Answer : The first one is used for Struts2 core tag library https : struts.apache.org docs struts-tags.html .. . .. . The framework provides a tag library decoupled from the view technology . In this section we describe each tag in general terms such as the attributes it supports what the behaviors are and so forth . Most tags are supported in all template languages see JSP Tags Velocity Tags and FreeMarker Tags but some are currently only specific to one language . Whenever a tag doesn t have complete support for every language it is noted on the tag s reference page . .. . The types of tags can be broken in to two types : generic and UI . Besides function and responsibility the biggest difference between the two is that the HTML tags support templates and themes . In addition to the general tag reference we also provide examples for using these generic tags in each of the support languages . the second is added via plugin . It adds replaces the Ajax being used by struts2 dojo plugin https : struts.apache.org docs ajax-tags.html . Dojo plugin is deprecated .. . .. . The Dojo plugin will be deprecated on Struts 2.1 .. . .. . Struts 2.0 versus Struts 2.1 and the Dojo tags .. . .. . The easiest way to get documentation for Struts 2.0 Dojo tag usage is to look at older Struts 2 documentation like the Struts 2.0.11 Ajax tags wiki documentation . Now this plugin is deprecated and struts2-jquery-plugin https : github.com struts-community-plugins struts2-jquery could be used instead . A Plugin for the popular java web framework struts2 to provide ajax functionality and UI Widgets based on the jQuery javascript-framework . Comment : thank you for the informative description . Comment : welcome don t forget to upvote it", "Question : I am going to use struts-jquery taglib https : code.google.com p struts2-jquery wiki DatePickerTag Datepicker with different options and animations but the application throws the following errors . Based on this question http : stackoverflow.com questions 15087557 can-not-find-the-tag-library-descriptor-for-struts2-jquery-tags-in-jsp I changed struts to struts2 and based on this one http : stackoverflow.com questions 20772405 struts2-jquery-plugin-java-lang-classnotfoundexception-org-apache-struts2-views I added the bean to struts.xml file but to no avail . Exceptions .. . .. . POM.xml Comment : Why are you using the Struts 1.3 taglib .. . Answer : I could use the jQuery plugin on Struts2 2.3.14 I just removed the Target directory of the application and used the following dependencies .", "Question : I am going to use struts-jquery taglib https : code.google.com p struts2-jquery wiki DatePickerTag Datepicker with different options and animations but the application throws the following errors . Based on this question http : stackoverflow.com questions 15087557 can-not-find-the-tag-library-descriptor-for-struts2-jquery-tags-in-jsp I changed struts to struts2 and based on this one http : stackoverflow.com questions 20772405 struts2-jquery-plugin-java-lang-classnotfoundexception-org-apache-struts2-views I added the bean to struts.xml file but to no avail . Exceptions .. . .. . POM.xml Comment : Why are you using the Struts 1.3 taglib .. . Answer : And : .. . .. . I compiled and added them in my classes folder", "Question : I am going to use struts-jquery taglib https : code.google.com p struts2-jquery wiki DatePickerTag Datepicker with different options and animations but the application throws the following errors . Based on this question http : stackoverflow.com questions 15087557 can-not-find-the-tag-library-descriptor-for-struts2-jquery-tags-in-jsp I changed struts to struts2 and based on this one http : stackoverflow.com questions 20772405 struts2-jquery-plugin-java-lang-classnotfoundexception-org-apache-struts2-views I added the bean to struts.xml file but to no avail . Exceptions .. . .. . POM.xml Comment : Why are you using the Struts 1.3 taglib .. . Answer : You have dependency problem : .. . .. . class TagLibraryDirectiveProvider exists in struts2-core jar but in newer version 2.3.16 than you declared 2.3.8 : http : struts.apache.org release 2.3.x struts2-core apidocs org apache struts2 views TagLibraryDirectiveProvider.html .. . .. . So simple upgrade the dependency . Comment : if I change that to 2.3.16.1 which is the latest one I can not use ServletResponseAware interface anymore Comment : I posted a question for it as well stackoverflow.com questions 22600204 http : stackoverflow.com questions 22600204 how-to-have-access-to-servletrequestaware-on-struts2-core-2-3-16-1", "Question : Is there any way to target a column in a jqGrid in my case Struts2-jQuery-Grid Plugin 3.7.0 on certain rows only For example I want to show the content of the 2nd column only if the 1th column value is Movie : .. . .. . I ve tried to use conditional OGNL expressions in hidden and cssClass fields of the GridColumnTag http : code.google.com p struts2-jquery wiki GridColumnTag but immediately noticed they evaluate once against the whole column not at every iteration . As a workaround I can manually hide the columns in that rows with javascript after the grid is populated but that is a hack and I m wondering if there is a clean solution to conditionally do something on a columns per-row . NOTE : I can t simply erase the content from the source List as it would be obvious because COL 2 in my real case is a Boolean represented as checkbox . .. . Answer : For the records the solution for the fake scenario described in the question using Struts2-jQuery-Grid Plugin instead of the raw jqGrid would be :", "Question : I m trying to populate a drop down list in a grid column using the Struts2-jQuery-grid-3.7.0 https : code.google.com p struts2-jquery downloads detail name struts2-jquery-grid-plugin-3.7.0.jar can 2 q plugin as follows . And the action where the CategoryList action is mapped is as follows . When a given edit link on the grid is clicked the load method is executed where a list of categories is loaded from the database . The list in the grid however displays nothing in edit mode when the edit link is clicked . I cannot find relative examples that may demonstrate this kind of thing . How to populate this drop down list especially how to give this drop down labels using the catName property and values using the catId of Long type property separately while category in the list has-many other attributes I don t find relevant examples to map a java.util.List E to sjg : grid . .. . .. . subCategory.category.catName is a nested property of Product entity . In this case even after populating the list it should also be noted that the display value of this column is catName category name of type String . The value of the selected item however to be set to an instance of Product should be catId category id of type Long which doesn t seem possible as the name of this column is subCategory.category.catName . Intuitively catId subCategory.category.catId would be mapped to catName subCategory.category.catName which would be wrong if I could envision correctly as-if the list were already populated . Comment : Added struts2-jquery tag because it has 31 followers while your other sj tags have 3 followers.. . Comment : Please add answer s if someone has . .. . Answer : In Struts 2 the HTML drop down list can be rendered via s : select tag . To auto select a default-value for a drop down list just declared a value attribute in the tag and set the default-value accordingly . Example : .. . .. . A Java list to generate the select options for the drop down box . tag to render the HTML drop down box . The value defaultSearchEngine will call the corresponds Action class getDefaultSearchEngine method to return a default search-engine value . Many Actions share common concerns . Some Actions need input validated . Other Actions may need a file-upload to be pre-processed . Another Action might need protection from a double submit . Many Actions need drop-down lists http : www.mkyong.com struts2 struts-2-sselect-drop-down-box-example and other controls pre-populated before the page displays . In this example the drop down box will auto select the yahoo.com as the default option . Add Struts2 jQuery Plugin Tag lib to your JSP .. . .. . Enable jQuery Grid Plugin in your Head Tag .. . .. . update : .. . .. . Specify an Edit Url in your JSP .. . .. . And enable Edit by setting following attributes in your JSP .. . .. . then define which Column should be editable .. . .. . Example for an Edit Options : .. . .. . Example for an Edit Rules : .. . .. . update : 1 Comment : I know about this stray s : select but I need a drop down list inside sjg : gridColumn . This should have something to do with the attribute editoptions dataUrl : dataURL or something else . Comment : @Tiny look at my new update answer... . Comment : editoptions are dynamic . They should be populated from the database . Given the example in the question catId as value and catName as label of select option option select . How can this be dynamic - editoptions value : France : France USA : USA Australia : Australia Norway : Norway Sp ain : Spain Comment : The list is populated in the CategoryList class . It should be mapped to editoptions catId as value and catName as label of select option option select . Can this be done Comment : @Tiny look at my update : 1 answer .", "Question : Is there any way to target a column in a jqGrid in my case Struts2-jQuery-Grid Plugin 3.7.0 on certain rows only For example I want to show the content of the 2nd column only if the 1th column value is Movie : .. . .. . I ve tried to use conditional OGNL expressions in hidden and cssClass fields of the GridColumnTag http : code.google.com p struts2-jquery wiki GridColumnTag but immediately noticed they evaluate once against the whole column not at every iteration . As a workaround I can manually hide the columns in that rows with javascript after the grid is populated but that is a hack and I m wondering if there is a clean solution to conditionally do something on a columns per-row . NOTE : I can t simply erase the content from the source List as it would be obvious because COL 2 in my real case is a Boolean represented as checkbox . .. . Answer : There are many ways how you can implement the requirement . One of the most easy is the setting of color : transparent CSS on the cells which you need to hide . For example you define the CSS rule .. . .. . and you assign the class hiddenCell to specified cells of the COL 2 . You can use cellattr property of COL 2 for it : .. . .. . The demo http : www.ok-soft-gmbh.com jqGrid transparentTextInColumn.htm demonstrates the approach . Disadvantage of the approach - the hidden text still exist on HTML page and so one can examine it if required . Another way is the usage of custom formatters . For example you can define the following formatter callback .. . .. . The demo http : www.ok-soft-gmbh.com jqGrid removeTextInColumn.htm demonstrates the second approach . Disadvantage of the approach - it s a little difficult to combine usage of custom formatter with another formatter like formatter : select in the example above . Nevertheless one can do it too : .. . .. . like the next demo http : www.ok-soft-gmbh.com jqGrid removeTextInColumn .htm . If you loads the data from the server then probably the best choice would be to modify the input data the input data for the column COL 2 inside of beforeProcessing callback . See the answer http : stackoverflow.com a 9855764 315935 or this one http : stackoverflow.com a 9722466 315935 for code examples . Comment : Great answer . Regarding Solution 1 I don t think is possible in Struts2-jQuery-Grid it does not have cellattr exposed since I m using checkbox formatter I will create a custom one with another formatter as in Solution 2b . Thanks a lot . Comment : It worked like a charm . Two side effects checkbox is not centered in the td anymore and rows with even only one field empty returned from the formatter have an higher line-height 33 instead of 24 . Comment : Returning prevents the second one . Comment : @AndreaLigios : You are welcome I think that the usage of nbsp instead of or would be better .", "Question : I m trying to populate a drop down list in a grid column using the Struts2-jQuery-grid-3.7.0 https : code.google.com p struts2-jquery downloads detail name struts2-jquery-grid-plugin-3.7.0.jar can 2 q plugin as follows . And the action where the CategoryList action is mapped is as follows . When a given edit link on the grid is clicked the load method is executed where a list of categories is loaded from the database . The list in the grid however displays nothing in edit mode when the edit link is clicked . I cannot find relative examples that may demonstrate this kind of thing . How to populate this drop down list especially how to give this drop down labels using the catName property and values using the catId of Long type property separately while category in the list has-many other attributes I don t find relevant examples to map a java.util.List E to sjg : grid . .. . .. . subCategory.category.catName is a nested property of Product entity . In this case even after populating the list it should also be noted that the display value of this column is catName category name of type String . The value of the selected item however to be set to an instance of Product should be catId category id of type Long which doesn t seem possible as the name of this column is subCategory.category.catName . Intuitively catId subCategory.category.catId would be mapped to catName subCategory.category.catName which would be wrong if I could envision correctly as-if the list were already populated . Comment : Added struts2-jquery tag because it has 31 followers while your other sj tags have 3 followers.. . Comment : Please add answer s if someone has . .. . Answer : Regarding to the documentation connected with gridColumn and editoptions property : .. . .. . dataUrl .. . .. . This option is valid only for elements of type select - i.e . edittype : select and should be the URL to get the AJAX data for the select element . The data is obtained via an AJAX call and should be a valid HTML select element with the desired options One . You can use option group . your action has to return valid select element . That means that your Product.jsp result need to look like this : .. . .. . Reference : http : www.trirand.com jqgridwiki doku.php id wiki : common rules Comment : This can be done if there is s : select alone . Can we have s : select inside a grid column Comment : If I understand you correctly the select is rendered when there is no taglib declaration inside Product.jsp right I am sure that you have some taglib declaration in JSP where you have placed gridColumn element then it will work without additional declaration inside Product.jsp . Comment : Could you please demonstrate it in conjunction with an sjg : grid I cannot envision this thing . I have implemented such kind of things in JSF and its component library PrimeFaces where there is a p : rowEditor inside p : dataTable in which we can put a component of our choice like p : selectOneMenu . It is a different scenario .", "Question : null .. . Answer : Currently I am doing struts up-gradation task struts2.0 to struts2.5 .I want to replace struts dojo tag with struts-jquery . Here I am facing some issue when replace struts-dojo autocompleter to struts-jquery autocompleter . getting below response from server : .. . .. . firstName : Bulwark Technologies LLC partnerId : 925 firstName : Bulwark Technologies LLC1 partnerId : 926 firstName : Bulwark Technologies LLC2 partnerId : 927 .. . .. . For displaying at client-side I am using Struts2-jquey-autocompleter - .. . .. . I am getting undefined multiple times - based on result found in query at server-side in textbox . could some one please help here Thanks in advance . enter image description here http : i.stack.imgur.com 0W4P0.png Comment : I think your attribute value for list is wrong . I always use something like this : mylist : key : 1 value : Foo key : 2 value : Bar and the autocompleter : sj : autocompleter href .. . list mylist listKey key listValue value" ] }
[ "yes-answer-long", "yes-answer-short" ]
ajax
UNK_RELATION
nosql-aggregation@nosql@68
nosql-aggregation -- questions related to aggregation functions in @placeholder databases .
{ "confidence": [ 49.094078063964844, 37.36719512939453, 37.26762390136719, 36.24890899658203, 35.952484130859375, 35.952484130859375, 35.952484130859375, 35.635128021240234, 35.635128021240234, 34.37409210205078, 34.37409210205078, 33.96680450439453, 33.96680450439453, 33.6285514831543, 33.6285514831543, 33.29323196411133, 32.517940521240234, 32.48234939575195, 32.48234939575195, 32.265625, 32.05016326904297, 32.05016326904297, 31.9788875579834, 31.459800720214844, 31.4014892578125, 30.920408248901367, 30.563720703125, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.498226165771484, 30.257783889770508, 30.158416748046875, 29.453224182128906, 29.342018127441406, 29.038650512695312, 28.955516815185547, 28.91983413696289, 28.91983413696289, 28.91983413696289, 28.91983413696289, 28.91983413696289, 28.91983413696289, 28.91983413696289, 28.582399368286133, 28.44318199157715, 27.903175354003906, 27.028091430664062, 27.004009246826172, 27.004009246826172, 26.540475845336914, 26.540475845336914, 26.540475845336914, 26.540475845336914, 26.43660545349121, 26.340850830078125, 26.23697853088379, 26.074525833129883, 25.883413314819336, 25.572757720947266, 25.292484283447266, 25.292484283447266, 25.112266540527344, 24.85821533203125, 24.85821533203125, 24.790781021118164, 23.714096069335938, 23.6114501953125, 22.966472625732422, 22.966472625732422, 22.966472625732422, 22.89316177368164, 22.58262062072754, 22.52853012084961, 21.822351455688477, 21.822351455688477, 21.697729110717773, 20.96752166748047, 20.851238250732422, 20.74736785888672, 20.144235610961914, 20.119338989257812, 19.603248596191406, 19.35826301574707, 19.112485885620117, 19.112485885620117, 17.960159301757812, 17.77987289428711, 17.63003158569336, 17.63003158569336, 17.63003158569336, 17.63003158569336, 17.63003158569336, 17.63003158569336, 17.63003158569336, 17.63003158569336 ], "content": [ "nosql and nosql-aggregation may be duplicate .", "Post your aggregation query .", "This question already has an answer here : .. . .. . Mongodb aggregation pipeline how to limit a group push questions 24594049 mongodb-aggregation-pipeline-how-to-limit-a-group-push 1 answer .. . .. . Let s say we have a collection with documents as below .. . .. . I m trying to construct some sort of aggregation pipeline to .. . .. . 1 .", "Right now we are evaluating Cassandra but we are open to switch to other NOSQL databases .. . .. . Any lead", "Yes it s possible using Aggregation Framework .", "Aggregation Framework have memory usage limits .", "But you can always write an aggregation UDF to achieve it .", "Try using max https : docs.mongodb.com manual reference operator aggregation max .", "Merge results into one common array .. . .. . Is there anyway to achieve this in aggregation manner", "PS : I tried to create nested aggregation", "An aggregation however reads each and every document and processes it .", "So the operators invited to the aggregation pipeline show here will be the the sort https : docs.mongodb.com manual reference operator aggregation sort pipe . S sort group https : docs.mongodb.com manual reference operator aggregation group pipe . S group and project https : docs.mongodb.com manual reference operator aggregation project pipe . S project which reshapes the aggregated documents to be in the desired result schema .", "Now within the group https : docs.mongodb.com manual reference operator aggregation group pipe . S group pipeline you d need the first https : docs.mongodb.com manual reference operator aggregation first grp . S first operator or last https : docs.mongodb.com manual reference operator aggregation last grp . S last depending on the direction which you ordered the documents in the previous sort https : docs.mongodb.com manual reference operator aggregation sort pipe . S sort pipeline to map the top document s field when ordered .", "Is this something that can be done with aggregation or do I need to switch over to mapReduce", "This was actually a fair question as not everyone is aware of the uses for ifNull and cond in aggregation projection", "Visit the documentary page . . docs.mongodb.org manual reference operator aggregation unwind https : docs.mongodb.org manual reference operator aggregation unwind to see what unwind does", "SQL-like aggregation functions are implemented in Aerospike using stream UDFs http : www.aerospike.com docs udf developing stream udfs.html which are written in Lua .", "Aggregation is not particularly quick each step adds time .", "I don t think this can be done with aggregation-framework .", "Now using date aggregation http : docs.mongodb.org manual reference operator aggregation-date you need to convert ISODate in required format using concat http : docs.mongodb.org manual reference operator aggregation concat and then group-by final formatting date so aggregation query will be : .. . .. . If you will used mongo version 3.0 and above then use dateToString http : docs.mongodb.org manual reference operator aggregation dateToString operator to convert ISODate to predefined format and aggregation query is :", "I searched further and found that an aggregation could help me .", "I m facing some dificult to make this query with the MongoDB Aggregation Framrwork .", "This will be hard to achieve using the aggregation-framework .", "Consider the following play in mongo-shell : .. . .. . .. . .. . For the mongoTemplate equivalent : .. . .. . .. . .. . You ve got another alternative of inviting the ROOT https : docs.mongodb.com manual reference aggregation-variables variable.ROOT system variable to your group https : docs.mongodb.com manual reference operator aggregation group pipe . S group pipeline as means to return the full document .", "You should thus change your aggregation pipeline to this : .. . .. . Running the aggregation pipeline : .. . .. . would give the following results based on the sample document :", "What in SQL or relational databases made it unfit for working in large clusters", "unwind to deconstruct an array field you have to use this aggregation stage after project : docs.mongodb.com manual reference operator aggregation unwind https : docs.mongodb.com manual reference operator aggregation unwind so you have to use group to regroup as you want : docs.mongodb.com manual reference operator aggregation group https : docs.mongodb.com manual reference operator aggregation group", "If I understand it well you question is Why do I have to read the aggregation result for the new collection to be created", "I m having trouble figuring out the right aggregation pipe operations to return the results I need .", "At any rate you are better off manipulating not there data in post processing rather than throwing this at the aggregation-framework .", "You can then slap the aggregation logic and filter the stuff based on desired time range .", "Your queries 1 2 can be done by writing an aggregation UDF based on a secondary index query on userid as above .", "Ok so the problem is that I need to do aggregation queries on aerospike s aql console .", "It is difficult to do using aggregation-framework as you can only unwind object arrays .", "Also below is python code for generating the aggregation query and flattening the result into a list of dictionaries .", "There s a similar question http : stackoverflow.com questions 21623979 mongodb-aggregation-framework-match-by-nested-documents on this site but it s not so clear .", "I would like to use Cassandra but noticed that CQL does not support aggregation .", "I think you want project http : docs.mongodb.org manual reference operator aggregation project first using the ifNull http : docs.mongodb.org manual reference operator aggregation ifNull operator as in : .. . .. . That should give you documents with something in each of those values .", "In traditional databases you do a roundtrip to the database for each call .", "I ll take your question at face value but note that in most NoSQL databases Redis included you need to store your data according to how you plan on fetching it .", "dba.stackexchange.com questions 34892 http : dba.stackexchange.com questions 34892 why-cant-rdbms-cluster-the-way-nosql-does", "I could solve it using plain javascript but I want to avoid that since MongoDB is so made for aggregation of those kinds .", "And I need to create aggregation query which will count all data which have the same title .", "So desire result should be .. . .. . I wrote some aggregation queries but it still not work .", "I ve used aggregation in mongo a lot I know performance benefits on the grouped counts and etc .", "I would not do much aggregation on the main collection 3 billion records is quite a lot .", "This would not matter if you was just displaying the collection MongoDB could do that easily it is aggregation that will not work well .", "could you add index stats https : docs.mongodb.org manual reference operator aggregation indexStats pipe . S indexStats", "it s not that the writer does not exist it is there but my aggregation does not return it as the writer does not have a review for the film specified in the match this results in the incorrect average score calculation .", "This FAQ http : docs.mongodb.org manual faq developers how-do-i-query-for-fields-that-have-null-values entry explains querying for nulls and or missing fields the same operators are available for the aggregation-framework .", "Now since I m new to the NoSQL databases I m not sure how I should go around showing these stats in the clients dashboard .", "To do both in the same aggregation pipeline you can do a push of the user docs and then an unwind to get the user averages .", "I m completely in the dark right now I digged into aggregation aswell as mapReduce but nothing seems to point in the direction where I need it .", "Your data field is stored as an subdocument .. . .. . You need to run a simple terms aggregation which in RAW json looks like : .. . .. . 2 .", "How we could model the this query behavior in NOSQL .", "I m trying to create user activity feeds in NoSQL .", "Maybe not use a relational DB and use NOSQL", "Neither caching nor NoSQL are going to help much with this .", "Basically what are some good ways to optimize these aggregation type queries assuming we need to answer a wide variety of these often which includes sometimes grouping by other columns too .", "One approach you could take is the Map-Reduce https : docs.mongodb.org manual core map-reduce way even though the JavaScript interpreter driven mapReduce http : docs.mongodb.org manual reference command mapReduce takes a bit longer than the aggregation-framework but will work since you will be using some very useful native JavaScript functions that are lacking in the aggregation-framework .", "The question is the next one : .. . .. . Get documents with tags in list ordered by total number of matches http : stackoverflow.com questions 8617318 get-documents-with-tags-in-list-ordered-by-total-number-of-matches .. . .. . But they say that is possible using Aggregation Framework it s possible", "Can anyone explain me why in Java when i do an aggregation pipeline with out don t write the result in the new collection when i write only this : .. . .. . When I save the aggregation result and I iterate on it the new collection is created and the result-of the match is inside Java has an error obviously in this case : .. . .. . I can t understand why .", "I am new in NoSQL systems .", "You would need to convert the LASTLOGIN field to a millisecond timestamp through multiplying the value by 1000 .. . .. . then convert to a date .. . .. . and this can be done in the project http : docs.mongodb.org manual reference operator aggregation project pipe . S project pipeline by adding your milliseconds time to a zero-milliseconds Date 0 object then extract year http : docs.mongodb.org manual reference operator aggregation year exp . S year month http : docs.mongodb.org manual reference operator aggregation month exp . S month dayOfMonth http : docs.mongodb.org manual reference operator aggregation dayOfMonth exp . S dayOfMonth parts from the converted date which you can then use in your group http : docs.mongodb.org manual reference operator aggregation group pipe . S group pipeline to group the documents by the day .", "We can store as much duplicate data as we need in the NOSQL dbs .", "What is that NOSQL did to fix this and make it efficient when run in clusters", "Roles list is a nested field .. . .. . What I need is to have aggregation which would select how many projects exist per certain role BUT only", "You re probably best off cleaning up your docs to remove any trailing spaces in your colourname fields rather than trying to remove it during the aggregation .", "Your data field is stored as an nested document https : www.elastic.co guide en elasticsearch guide current nested-objects.html .. . .. . You have to add a nested subaggregation before doing terms aggregation .", "At first I was a bit disapointed how little analytical query options those databases provide missing groupBy count .. . .", "I am VERY new as of last Friday to the NoSQL way of thinking .", "I am really new to noSQL DBs so maybe some kind of advice .", "Hence my question is : what is the way to select data from multiple time-series sources merge them group-by some criteria and apply aggregation function to each group using tools of influxdb 0.9.x", "what is the way to select data from multiple time-series sources merge them group-by some criteria and apply aggregation function to each group using tools of influxdb 0.9.x", "You could shorten your user game avg aggregation using a compound group key : db.games.aggregate unwind : games group : id : game : games.id user : user score : avg : games.score .", "I have a scenario where my Web API call initiates a aggregation involving joins on 5 different SQL Server tables .", "I was trying to understand where NoSQL shines and finally landed in this video by Martin Fowler here https : youtu.be qI g07C Q5I t 308 where he states that .. . .. .", "I have a order collection that has an array of objects ids from products example : .. . .. . Here is an example of one document from my products ocllection : .. . .. . How can I make an aggregation query in orders to get a list of contained products documents", "Which adds more redundant data however in the world of NoSQL this is not an issue .", "Well we know that NoSql db should not be used like this .", "I have a collection similar to the following : - .. . .. . And this is my aggregation so far : - .. . .. . This returns only writers who have a review of the matching film and also only websites that have at least 1 writer who has reviewed the film however I need to return all websites containing a list of their all writers with a score of 0 if they haven t written a review for the specified film .", "stackoverflow.com questions 35549200 https : stackoverflow.com questions 35549200 mongo-group-and-sum-with-two-fields", "Like many I m no new the NoSQL world .", "I read the tutorials about aggregation and also the comparison with sql but i don t understand how to query time-series documents written like mongo suggests on webinars .", "I am not very clear about your 3 questions .", "yes there is a way to do it with out statement .. . .. . let s say that you have two collections pc and geo and you are going to create collection allData - and mongo query will look like this : .. . .. . project : transform document as needed https : docs.mongodb.org manual reference operator aggregation project pipe . S project .. . .. . To shape your allData collection you can use project to add remove fields as desired .", "This means I have liberty to use any technology and or NoSQL database if necessary .", "Possible duplicate of Redis : Sum of SCORES in Sorted Set http : stackoverflow.com questions 4846243 redis-sum-of-scores-in-sorted-set", "Let s say I have comments and tags and in my nosql database I denormalize the data so that a comment contains a list of tags .", "But is there some way to reorganize this denormalized data at the database level through query and project operations in NoSQL so that i get the view i desire", "I ve been investigating possible solutions and I ve decided to closely investigate 2 options : .. . .. . HBase with Hadoop mapreduce .. . Cassandra with Spark .. . .. . I was working with NoSQL before however never used it for analytical purposes .", "By the way I have seen you answer on several of my questions and thank you for the support and patience .", "Suppose we have some documents as following : .. . .. . How can I get the documents with the max version for every different title", "For the dataset above the result should be :", "The idea here is to order the documents by the version key first group the documents by the title key and return the first document in the group when ordered .", "Consider the following approach : .. . .. . which would translate to", "It works", "Thanks for your so detailed answers .", "Returns the maximum value .", "max compares both value and type using the specified BSON comparison order for values of different types ." ] }
{ "confidence": [ 43.1302490234375, 42.14988708496094, 41.491844177246094, 39.265228271484375, 37.647701263427734, 37.21794891357422, 37.017295837402344, 36.551414489746094, 36.36719512939453, 36.265193939208984, 36.22496032714844, 36.007118225097656, 36.006771087646484, 35.93286895751953, 35.62672424316406, 35.50332260131836, 35.34764099121094, 34.21059799194336, 34.00811767578125, 33.913665771484375 ], "content": [ "Question : null .. . Answer : I was trying to understand where NoSQL shines and finally landed in this video by Martin Fowler here https : youtu.be qI g07C Q5I t 308 where he states that .. . .. . enter image description here http : i.stack.imgur.com TDtmH.png .. . .. . Why does he say so What in SQL or relational databases made it unfit for working in large clusters What is that NOSQL did to fix this and make it efficient when run in clusters Comment : dba.stackexchange.com questions 34892 http : dba.stackexchange.com questions 34892 why-cant-rdbms-cluster-the-way-nosql-does Comment : Thank you . That answers my question .", "Question : Suppose we have some documents as following : .. . .. . How can I get the documents with the max version for every different title For the dataset above the result should be : .. . Answer : The idea here is to order the documents by the version key first group the documents by the title key and return the first document in the group when ordered . So the operators invited to the aggregation pipeline show here will be the the sort https : docs.mongodb.com manual reference operator aggregation sort pipe . S sort group https : docs.mongodb.com manual reference operator aggregation group pipe . S group and project https : docs.mongodb.com manual reference operator aggregation project pipe . S project which reshapes the aggregated documents to be in the desired result schema . Now within the group https : docs.mongodb.com manual reference operator aggregation group pipe . S group pipeline you d need the first https : docs.mongodb.com manual reference operator aggregation first grp . S first operator or last https : docs.mongodb.com manual reference operator aggregation last grp . S last depending on the direction which you ordered the documents in the previous sort https : docs.mongodb.com manual reference operator aggregation sort pipe . S sort pipeline to map the top document s field when ordered . Consider the following play in mongo-shell : .. . .. . .. . .. . For the mongoTemplate equivalent : .. . .. . .. . .. . You ve got another alternative of inviting the ROOT https : docs.mongodb.com manual reference aggregation-variables variable.ROOT system variable to your group https : docs.mongodb.com manual reference operator aggregation group pipe . S group pipeline as means to return the full document . Consider the following approach : .. . .. . which would translate to Comment : It works Thanks for your so detailed answers .", "Question : This question already has an answer here : .. . .. . Mongodb aggregation pipeline how to limit a group push questions 24594049 mongodb-aggregation-pipeline-how-to-limit-a-group-push 1 answer .. . .. . Let s say we have a collection with documents as below .. . .. . I m trying to construct some sort of aggregation pipeline to .. . .. . 1 . Group documents by category .. . 2 . For each category return top 2 documents by count in descending order .. . .. . So in this case the expected result should be something like .. . .. . Currently I take multiple steps to produce the result .. . .. . 1 . Identify category list .. . 2 . Repeat find category : x sort : count desc limit : 2 command .. . 3 . Merge results into one common array .. . .. . Is there anyway to achieve this in aggregation manner Comment : Have you tried making any query Comment : Currently I m taking multiple steps to work on this as mentioned . Comment : Anyway I figured out an answer . Thanks all for the up votes and comments . Will post the answer in a short while . .. . Answer : Managed to figure out the answer myself . It s something as below . sort push and slice work tegether to play the tricks .", "Question : I m trying to migrate our postgres database containing millions of clicks few years click history to more performing system . Our current analytic queries which are running on postgres are taking forever to complete and it degrades performance of the whole database . I ve been investigating possible solutions and I ve decided to closely investigate 2 options : .. . .. . HBase with Hadoop mapreduce .. . Cassandra with Spark .. . .. . I was working with NoSQL before however never used it for analytical purposes . At first I was a bit disapointed how little analytical query options those databases provide missing groupBy count .. . . After reading many articles and presentations I ve found out that I need to design my schema according how I intend to read my data and that storage layer is separated from query layer . Which adds more redundant data however in the world of NoSQL this is not an issue . Eventually I ve found one nice grails-plugin cassandra-orm https : grails.org plugin cassandra-orm which internally encapsulates orderBy feature in cassandra counters counters http : bflorian.github.io cassandra-orm guide 2 20Key 20Concepts.html 2.4 20Counters . However I m still worried about howto make this design extendable . What about the queries that will come in the future which I have no clue about today how can I design my schema prepared for that One option would be to use Spark but Spark doesn t provide data in real-time . Could you give me some insight or advice what are the best possible options for bigdata analysis . Should I use combination of real-time queries vs . pre-aggregated ones Thanks Comment : Hi Tomas can you add right tags to this question Hbase Spark are missing . nosql and nosql-aggregation may be duplicate . .. . Answer : 1 . If you are looking at near real-time data-analysis Spark + HBase combination is one of the solutions . 2 . If you want to compromise on throughput Solr + Cassandra combination from Datastax can be used . I am using Solr + Cassandra from Datastax for my use-case which does not require real-time processing . The performance of search option is not that great with this combo but I am OK with the throughput . Spark+HBase combination seems to be promising . Depending on your business requirement expertise you can chose the right combination .", "Question : null .. . Answer : Can anyone explain me why in Java when i do an aggregation pipeline with out don t write the result in the new collection when i write only this : .. . .. . When I save the aggregation result and I iterate on it the new collection is created and the result-of the match is inside Java has an error obviously in this case : .. . .. . I can t understand why . Comment : new Document out new collection Comment : If I understand it well you question is Why do I have to read the aggregation result for the new collection to be created Comment : No why mongo don t create a new collection in the first example and in the second yes . Comment : Equivalent in mongo : db.test.aggregate match : top speed : gte : 350 out : new collection", "Question : I m trying to get data from one or more subdocuments but I don t know the name of the field that will hold the subdocument . Here are some examples of what the documents look like . 1 . https : github.com vz-risk VCDB blob master data json 0C5DE044-B9B4-408D-9E65-D367EED12AB2.json .. . 2 . https : github.com vz-risk VCDB blob master data json 064F5887-C2DA-4139-B3AA-D55906F8C30A.json .. . .. . I would like to get the action varieties for these incidents so in the case of the first one I would like to get action.malware.variety and action.social.variety . In the second example it would be action.hacking.variety and action.malware.variety . So the problem is that I don t know what field is going to hold the subdocument . It could be one of hacking malware social error misuse physical and environmental . So I would like to unwind that field and do some stuff with the key name . Is this something that can be done with aggregation or do I need to switch over to mapReduce Comment : It is difficult to do using aggregation-framework as you can only unwind object arrays . In the sample json action attribute is just an object but not object array . So unwind can t be done here . Will it be ok if the schema is restructured Also tell me how would you really want the output to be displayed . Comment : This was actually a fair question as not everyone is aware of the uses for ifNull and cond in aggregation projection Comment : @cj0809 you might want to look at the accepted answer which demonstrates working with the problem you observed . .. . Answer : You seem to be talking about a case where you are not sure if all of the hacking social or malaware parts are there right . I think you want project http : docs.mongodb.org manual reference operator aggregation project first using the ifNull http : docs.mongodb.org manual reference operator aggregation ifNull operator as in : .. . .. . That should give you documents with something in each of those values . Sort of pretty much the same with any of your possible list of values .", "Question : We can store as much duplicate data as we need in the NOSQL dbs . Data must be saved in the same pattern in which we want to access out of it . There might be cases where we don t the access pattern in which we might need to access the data e.g . Ad hoc queries . My company works on the financial domain where ad hoc queries are used most often . Right now we use the SQL server so stored procedure are used to perform the ad hoc data calculations . Here i mean the query which can t be predicted in advance by ad hoc query . How we could model the this query behavior in NOSQL . Right now we are evaluating Cassandra but we are open to switch to other NOSQL databases .. . .. . Any lead .. . Answer : If you are looking for full-text-search then solr could be a good fit : http : lucene.apache.org solr Comment : I could use the Apache spark on top of the cassandra but could we better model storage pattern in order to get data fast Comment : I agree with using a lucene based search tool . Spark is better Hadoop it s batch analytics - not search . I ll save you a lot of pain by telling you to avoid Spark for search use cases .", "Question : I have googled alot but not found any helpful solution.. . I want to find total number of daily users . I have a collection named session log having documents like following .. . .. . I want to aggregate from LASTLOGIN.. . This is my query : .. . .. . But it is aggregating by each login time not by each day . Any help would be appreciated Comment : which mongo version you used Comment : I am using 2.4.9 .. . Answer : You would need to convert the LASTLOGIN field to a millisecond timestamp through multiplying the value by 1000 .. . .. . then convert to a date .. . .. . and this can be done in the project http : docs.mongodb.org manual reference operator aggregation project pipe . S project pipeline by adding your milliseconds time to a zero-milliseconds Date 0 object then extract year http : docs.mongodb.org manual reference operator aggregation year exp . S year month http : docs.mongodb.org manual reference operator aggregation month exp . S month dayOfMonth http : docs.mongodb.org manual reference operator aggregation dayOfMonth exp . S dayOfMonth parts from the converted date which you can then use in your group http : docs.mongodb.org manual reference operator aggregation group pipe . S group pipeline to group the documents by the day . You should thus change your aggregation pipeline to this : .. . .. . Running the aggregation pipeline : .. . .. . would give the following results based on the sample document :", "Question : I am new to mongoDB and I came across a problem . The data was imported according to official doc . As you can see each of restaurant has a grades array and the nested document contains a score field . What I want to do is according to the average score of each restaurant s grades and retrive the restaurant that has the top average score . This may need to use mongoDB s aggregate method but the document doesn t cover the nested document situation and I googled but without a result . There s a similar question http : stackoverflow.com questions 21623979 mongodb-aggregation-framework-match-by-nested-documents on this site but it s not so clear . .. . Answer : Using the mongo-shell try the below change collecttionname to the name of your your restaurant collections Comment : Thank you very much It works . It seems that I didn t grasp the usage of unwind . Comment : Visit the documentary page . . docs.mongodb.org manual reference operator aggregation unwind https : docs.mongodb.org manual reference operator aggregation unwind to see what unwind does", "Question : I have a MongoDB collection which contains a colours array like : .. . .. . myCollection : .. . .. . I would like to retrieve every distinct colourname of every entry of this collection and be able to filter it with a search . I tried with distinct but without success . I searched further and found that an aggregation could help me . For the moment I have : .. . .. . It is working but I get an array like : .. . .. . And I would like to remove duplicate entries which have a space in the end and displays them like : Comment : You re probably best off cleaning up your docs to remove any trailing spaces in your colourname fields rather than trying to remove it during the aggregation . .. . Answer : One approach you could take is the Map-Reduce https : docs.mongodb.org manual core map-reduce way even though the JavaScript interpreter driven mapReduce http : docs.mongodb.org manual reference command mapReduce takes a bit longer than the aggregation-framework but will work since you will be using some very useful native JavaScript functions that are lacking in the aggregation-framework . For instance in the map-function you could use the trim https : developer.mozilla.org en docs Web JavaScript Reference Global Objects String trim function to remove any trailing spaces in your colourname fields so that you can emit the cleansed keys . The Map-Reduce operation would typically have the following map and reduce functions : .. . .. . You can then query map reduce result collection with the regex to have the result : .. . .. . .. . .. . -- UPDATE -- .. . .. . To implement this in Python PyMongo s API http : api.mongodb.org python 2.0 examples map reduce.html supports all of the features of MongoDB s map reduce engine thus you could try the following : Comment : Thanks a lot . I am working with Python and PyMongo 2.8 . I tried to implement your solution and am struggling . Any idea with this language I used this to translate : api.mongodb.org python 2.0 examples map reduce.html http : api.mongodb.org python 2.0 examples map reduce.html Comment : @Kiruchi You were in the right direction though I have updated my answer to include an example of how you would go about that with pymongo . Comment : I can t thank you enough . Thank you for your patience your kindness and what you taught me . I actually struggled on the map reduce line but it is working like a charm right now . Thanks again Comment : @Kiruchi No worries : - Glad it all worked out for you in the end .", "Question : The question is the next one : .. . .. . Get documents with tags in list ordered by total number of matches http : stackoverflow.com questions 8617318 get-documents-with-tags-in-list-ordered-by-total-number-of-matches .. . .. . But they say that is possible using Aggregation Framework it s possible .. . Answer : Yes it s possible using Aggregation Framework . Assumptions .. . .. . The dataset used here is the same used in Get documents with tags in list ordered by total number of matches http : stackoverflow.com questions 8617318 get-documents-with-tags-in-list-ordered-by-total-number-of-matches .. . tags attribute is a set no repeated elements .. . .. . Query .. . .. . This approach forces you to unwind the results and reevaluate the match predicate with unwinded results so its really inefficient . Expected Results Comment : Inefficient I m making a suggest I need it to be as fast as possible do you think that this can be done in a better way Comment : Nope there is no better way using this schema to do it . It is really much faster than MR approach . Note that if you have millons of matching documents this unwinds it creating in memory millions avg tags size . Aggregation Framework have memory usage limits . Use it with caution . Comment : I tried it I m using v2.2 so I had to change id : id : 1 for id : id : id and removed second match . It worked fine but is not fast enough thanks : PHP CODE : gist.github.com 41d31bccd0cc3814fdda https : gist.github.com 41d31bccd0cc3814fdda Comment : Yes i used 2.1 dev version syntax . In MongoDB 2.2 group id declaration had changed . I edited according your comment . Comment : Did you ensure index on tags attr How much docs you have on your collection", "Question : I have googled alot but not found any helpful solution.. . I want to find total number of daily users . I have a collection named session log having documents like following .. . .. . I want to aggregate from LASTLOGIN.. . This is my query : .. . .. . But it is aggregating by each login time not by each day . Any help would be appreciated Comment : which mongo version you used Comment : I am using 2.4.9 .. . Answer : First thing is your date is stored in timestamp so you need to first convert timestamp to ISODate using adding new Date 0 and multiply timestamp to 1000 then you will get the ISODate like this : .. . .. . add : new Date 0 multiply : 1000 LASTLOGIN this convert to timestamp to ISODate . Now using date aggregation http : docs.mongodb.org manual reference operator aggregation-date you need to convert ISODate in required format using concat http : docs.mongodb.org manual reference operator aggregation concat and then group-by final formatting date so aggregation query will be : .. . .. . If you will used mongo version 3.0 and above then use dateToString http : docs.mongodb.org manual reference operator aggregation dateToString operator to convert ISODate to predefined format and aggregation query is :", "Question : null .. . Answer : I m having trouble figuring out the right aggregation pipe operations to return the results I need . I have a collection similar to the following : - .. . .. . And this is my aggregation so far : - .. . .. . This returns only writers who have a review of the matching film and also only websites that have at least 1 writer who has reviewed the film however I need to return all websites containing a list of their all writers with a score of 0 if they haven t written a review for the specified film . so I am currently getting : - .. . .. . When I actually need : - .. . .. . Can anyone point me in the right direction Cheers Comment : What you are asking here is kind of possible but seriously speaking It s a bit nuts . How do we know who your writers are Please honestly think about this . If there is no writer3 for example in any of the data but somewhere you deem writer3 to exist then where do we get that from At any rate you are better off manipulating not there data in post processing rather than throwing this at the aggregation-framework . Just like with SQL queries . There are many things you can do but the real question is should I really be doing this . My answer is no you should not . Comment : it s not that the writer does not exist it is there but my aggregation does not return it as the writer does not have a review for the film specified in the match this results in the incorrect average score calculation . Comment : Please grasp the concept here . Adding data that does not exist should be done in post processing . Throwing in a list of possible writers creating zero score results on the server end will slow things down considerably . So even if there is a writers collection to source from and there are 10 writers and only 1 or 2 reviewed a film it is not efficient to throw all 10 at the server to produce results for . This should be simple to understand . Add them to your results with 0 scores when they are not part of the results returned . Much more efficient and sooo much simplier . Comment : Ahh I see where you are coming from now sorry for being dense I ll give it a rethink thanks .", "Question : I am new in NoSQL systems . I want to use Java+Spring+MongoDB not important . I try to build correct scheme for my data . I ll have too much log records something about 3 000 000 000 per year . Record structure looks like this : .. . .. . I have about 1000 shops and about 30000 products . I should have reports with sum of count or sum of sum outcost-incost by shops +product splited by days or months . shops means optional filter . In this case without shops performance is not matter . Reports older than 1 year may be required but performance is not matter . Can i use single collection logs with indexes on date shop product . Or i should split this collection to subcollections by shops and years explicitly Sorry if my question is stupid i am just beginner.. . Regards Minas .. . Answer : I would not do much aggregation on the main collection 3 billion records is quite a lot . One massive problem I can think with this is that any query will likely be huge returning a massive number of documents . Now it is true that you can mitigate most negative factors of querying this collection by using sharding to spread out the weight of the data itself however the sheer amount of data returned to the mongos will likely be slow and painful . There comes a time when no amount of index will save you because your collection is just too darn big . This would not matter if you was just displaying the collection MongoDB could do that easily it is aggregation that will not work well . I would do as you suggest : pre-aggregate into other collections based on data fragments and time buckets .", "Question : What is a preferred datastore for fast aggregating of data I have data that I pull from other systems regularly and the data store should support queries like : .. . .. . What is the number of transactions done by a user in a time range . What is the total sum of successful transactions done by a user in a time range . Queries should support sql constructs like group-by count sum etc over a large set of data . Right now I m using a custom data model in Redis and data is fetched in memory and then aggregates are run over it . The problem with this model is that this is closely tied to my pivots columns and any additional pivot if added will cause my data to explode leading to huge memory consumption on my redis boxes . I ve explored elasticsearch but elasticsearch queries with aggregations are taking longer than 200ms for the kind of data that I have . Are there any other alternatives I m also looking at Aerospike now . Can someone throw some light on how does aerospike aggregates work in this scenario .. . Answer : Aerospike supports aggregations on top of secondary index queries . Seems most of your queries are pivoted on user . You can build a secondary index on top of userid and query for all the data corresponding to a user . You can then slap the aggregation logic and filter the stuff based on desired time range . you need to do this because Aerospike does not yet support multiple where clause where you query for a user and a time range at same time . Your queries 1 2 can be done by writing an aggregation UDF based on a secondary index query on userid as above . I am not very clear about your 3 questions . Aerospike does not provide group-by sum count etc as native queries . But you can always write an aggregation UDF to achieve it . http : www.aerospike.com docs guide aggregation.html Comment : The aerospike.Query.apply http : www.aerospike.com apidocs python query.html aerospike.Query.apply method of the Aerospike Python client has an example of GROUP BY HAVING as a stream UDF .", "Question : I m trying to migrate our postgres database containing millions of clicks few years click history to more performing system . Our current analytic queries which are running on postgres are taking forever to complete and it degrades performance of the whole database . I ve been investigating possible solutions and I ve decided to closely investigate 2 options : .. . .. . HBase with Hadoop mapreduce .. . Cassandra with Spark .. . .. . I was working with NoSQL before however never used it for analytical purposes . At first I was a bit disapointed how little analytical query options those databases provide missing groupBy count .. . . After reading many articles and presentations I ve found out that I need to design my schema according how I intend to read my data and that storage layer is separated from query layer . Which adds more redundant data however in the world of NoSQL this is not an issue . Eventually I ve found one nice grails-plugin cassandra-orm https : grails.org plugin cassandra-orm which internally encapsulates orderBy feature in cassandra counters counters http : bflorian.github.io cassandra-orm guide 2 20Key 20Concepts.html 2.4 20Counters . However I m still worried about howto make this design extendable . What about the queries that will come in the future which I have no clue about today how can I design my schema prepared for that One option would be to use Spark but Spark doesn t provide data in real-time . Could you give me some insight or advice what are the best possible options for bigdata analysis . Should I use combination of real-time queries vs . pre-aggregated ones Thanks Comment : Hi Tomas can you add right tags to this question Hbase Spark are missing . nosql and nosql-aggregation may be duplicate . .. . Answer : If you want the ability to analyse data in near-real-time with complete flexibility in query structure I think your best bet would be to throw a scalable indexing engine such as Elasticsearch or Solr into your polyglot persistence mix . You could still use Cassanra as the primary data store and then index those fields you re interested in querying and or aggregating . Have a look at Datastax Enterprise http : docs.datastax.com en datastax-enterprise 4.0 datastax-enterprise srch srchIntro.html which bundles together Cassandra and Solr . Also have a look at Solr s Stats component https : cwiki.apache.org confluence display solr The+Stats+Component and its faceting https : cwiki.apache.org confluence display solr Faceting capabilities . These combined with the indexing engine s rich query language are handy for implementing many analytics use cases . If your data set consists of a few million records only I think you ll be able to get some good response times from Solr or ES on a reasonably spec ed cluster .", "Question : null .. . Answer : Let s say I gave you a list of person ids and I need to find out list of people and parks they visit . I would just join the tables and the result might look something like this where person id list is 1 2 3 4 5 . Now let s say there was a need to display the top 0-N parks that these people visit and then top N-2N parks and so on . A group-by query like this one would do the trick below N 2 . However this might become prohibitive if the dataset and person ids list gets large . Is there anything we can do to speed this up This question is NOT so much about optimizing the query or database server itself . Maybe we can introduce a caching Maybe not use a relational DB and use NOSQL Basically what are some good ways to optimize these aggregation type queries assuming we need to answer a wide variety of these often which includes sometimes grouping by other columns too . Comment : Be aware that not including park id in group-by will be problematic as well depending on DB used as will the LIMIT 2 component . I would simply do something like select p.name count as num visits from park p visits v where p.id v.park id group-by p.name and then do a ranking function ordered by num visits . You could record each visit by incrementing a value in the park table for each visit controlled by an after insert trigger on the visit table . Neither caching nor NoSQL are going to help much with this . MySQL partitioning might if you can put the files on different spindles .", "Question : Suppose we have some documents as following : .. . .. . How can I get the documents with the max version for every different title For the dataset above the result should be : .. . Answer : Try using max https : docs.mongodb.com manual reference operator aggregation max . Returns the maximum value . max compares both value and type using the specified BSON comparison order for values of different types . You can use following query : - .. . .. . I did not try the query . Let me know if any error you are getting . Hope this will help .", "Question : Ok so the problem is that I need to do aggregation queries on aerospike s aql console . Specifically I would like to take an average of a bins of records in a set and to count all the records in a set . I am not sure how to even begin.. . .. . Answer : SQL-like aggregation functions are implemented in Aerospike using stream UDFs http : www.aerospike.com docs udf developing stream udfs.html which are written in Lua . A stream UDF is a map-reduce https : en.wikipedia.org wiki MapReduce operation that is applied on a stream of records returned from a scan or secondary index http : www.aerospike.com docs guide query.html query . The stream UDF module let s assume it s contained in the file aggr funcs.lua would implement COUNT by returning 1 for each record it sees and reducing to an aggregated integer value . You would register the UDF module http : www.aerospike.com docs tools aql udf management.html registering-a-module with the server then invoke it . Here s an example of how you d do that in Python using aerospike.Query.apply http : www.aerospike.com apidocs python query.html aerospike.Query.apply : .. . .. . However you should get metrics http : www.aerospike.com docs reference metrics such as the number of objects using an info command http : www.aerospike.com docs reference info . Aerospike has an info subsystem that is used by the command-line tools such as asinfo http : www.aerospike.com docs tools asinfo the AMC http : www.aerospike.com docs amc user guide dashboard and the info http : www.aerospike.com apidocs python client.html aerospike.Client.info methods of the language clients . To get the number of objects in the cluster : .. . .. . You can also get the number of objects in a specific namespace . I have a two node-cluster and I ll query each one : .. . .. . Notice that the value of master-objects on each of the nodes adds up together to the cluster-wide objects value . To get the number of objects in a set :", "Question : I have a list of communities . And I need to create aggregation query which will count all data which have the same title . So desire result should be .. . .. . I wrote some aggregation queries but it still not work . How can I get desire result PS : I tried to create nested aggregation Comment : Post your aggregation query . Comment : Are you storing an array of objects in each document Comment : Yes in each object Comment : Please mention the solution you tried the output you got and also the mapping . .. . Answer : You need to use terms https : www.elastic.co guide en elasticsearch reference current search-aggregations-bucket-terms-aggregation.html aggregations . Now depending on your mapping there could be two ways of doing that : .. . .. . 1 . Your data field is stored as an subdocument .. . .. . You need to run a simple terms aggregation which in RAW json looks like : .. . .. . 2 . Your data field is stored as an nested document https : www.elastic.co guide en elasticsearch guide current nested-objects.html .. . .. . You have to add a nested subaggregation before doing terms aggregation . Both will output this : .. . .. . This unfortunately is just a raw query but I imagine that it can be translated into elastic.js https : github.com fullscale elastic.js quite easily . On top of that . If you re going to do aggregations don t forget to set your fields that you re doing aggregations on as not analyzed because it will start counting individual tokens as in documentation https : www.elastic.co guide en elasticsearch guide current aggregations-and-analysis.html aggregations-and-analysis .. . .. . I myself would store these documens as nested ones . Example : .. . .. . Mappings : .. . .. . Test data : .. . .. . Actual query : .. . .. . P.S . size : 0 means that I m letting Elasticsearch output all possible terms and not limiting its output as described in documentation https : www.elastic.co guide en elasticsearch reference current search-aggregations-bucket-terms-aggregation.html size . The size parameter can be set to define how many term buckets should be returned out of the overall terms list . By default the node coordinating the search process will request each shard to provide its own top size term buckets and once all shards respond it will reduce the results to the final list that will then be returned to the client . This means that if the number of unique terms is greater than size the returned list is slightly off and not accurate it could be that the term counts are slightly off and it could even be that a term that should have been in the top size buckets was not returned . If set to 0 the size will be set to Integer.MAX VALUE . Comment : Thank s but I need to count not just all documents but all objects in all documents so total s of vule have to be 6 Comment : I ve updated answer . This query runs fine and does exactly what you need . Please see : prntscr.com 8p1hem http : prntscr.com 8p1hem Comment : Thank s so much" ] }
[ "yes-answer-long", "yes-answer-short" ]
nosql
UNK_RELATION
web-config-transform@.net@77
web-config-transform -- web.config transformation lets you easily transform @placeholder application configuration-files .
{ "confidence": [ 47.55720138549805, 45.6654167175293, 44.89003372192383, 43.44046401977539, 43.32869338989258, 42.88066864013672, 41.9092903137207, 41.84803009033203, 41.8193359375, 41.50101852416992, 41.12926483154297, 41.015892028808594, 40.768211364746094, 40.75175857543945, 40.68128204345703, 40.563209533691406, 40.50725555419922, 40.40196990966797, 40.220703125, 39.87556838989258, 39.78269958496094, 39.65803146362305, 39.645294189453125, 39.44970703125, 39.36170196533203, 38.43452835083008, 38.24147415161133, 37.88252258300781, 37.87874221801758, 37.70808792114258, 37.68764114379883, 37.61924362182617, 37.39691162109375, 37.301998138427734, 36.7712516784668, 36.624961853027344, 36.25757598876953, 36.06199264526367, 36.04419708251953, 36.028594970703125, 36.021507263183594, 35.99811935424805, 35.99811935424805, 35.93055725097656, 35.93055725097656, 35.71477127075195, 35.570091247558594, 35.154170989990234, 35.12378692626953, 35.032466888427734, 34.91499328613281, 34.91499328613281, 34.41935729980469, 34.288761138916016, 34.20691680908203, 34.18875503540039, 34.18875503540039, 34.06114196777344, 34.00709533691406, 33.894081115722656, 33.71974563598633, 33.532081604003906, 33.52178955078125, 33.27497863769531, 33.26267623901367, 33.1273078918457, 33.03731918334961, 32.99167251586914, 32.911293029785156, 32.7087516784668, 32.627628326416016, 32.457489013671875, 32.4393310546875, 32.36216354370117, 32.314453125, 32.314453125, 32.314453125, 32.076133728027344, 31.82886505126953, 31.73615264892578, 31.70177459716797, 31.70177459716797, 31.398597717285156, 31.367023468017578, 31.226760864257812, 31.226760864257812, 31.085582733154297, 31.05472183227539, 31.048858642578125, 30.97258758544922, 30.949485778808594, 30.949405670166016, 30.89342498779297, 30.86334228515625, 30.687393188476562, 30.552841186523438, 30.451772689819336, 30.425540924072266, 30.418298721313477, 30.254966735839844 ], "content": [ "Note : you can also right-click your web.config-transform file and choose preview transform and make sure the transform config is working fine .", "With my web.config I can simply right-click it and select Add Config Transform to create the transform files for each build configuration .", "I also created a config transform for the web.config file .", "I m using a web.config-transform to replace settings with the settings of the selected solution configuration .", "WebConfigQA and generate a web-config-transform file for WebConfigDev to WebConfigQA", "The transform works as intended on the mentioned online preview tool for web.config transformations https : webconfigtransformationtester.apphb.com when you change the namespace of the web.config file from .. . .. . to .. . .. . When this transform .. . .. . is applied to the adjusted web.config .. . .. . the debug attribute is removed from the result : .. . .. . Update : As mentioned in the comments the configuration of the web.config file shouldn t have any namespace at all .", "Currently it won t be possible to do this using web.config transformation but it indeed should be feasible if you wrote a custom transform.. .", "I m trying to set up a web.config-transform to modify some values .", "ENVIRONMENT .config contains the transform data based upon the current build configuration .", "I am trying to transform all of the web.config files in a project I have here s a my tree structure : .. . .. . Transform.bat .. . Transforms .. . ConfigTransform.proj .. . Web.Transform.config .. . Website .. . web.config .. . Views .. . web.config .. . .. . There s more web.config files but the idea is that this will find all of them and apply the same config transform on them .", "If no transform file-exists for the build configuration that you want to specify settings for in Solution Explorer right-click the Web.config file and then click Add Config Transforms .. . 2 .", "Currently I can easily setup Web.config transform based on build configuration e.g .", "I am trying to have my TFS Build create the web.config-transform associated with the configuration I selected for my build .", "I m trying to do Config transform .", "@JohnSaunders So the transform would work without the namespace in actual deployment and is only needed by the online web.config-transform tester mentioned in OP", "The web.config contains the transform result that gets loaded at runtime .", "I don t want to manage two config transform files with the same content .", "I am trying to add config transform in the Website Application in Visual Studio .", "Web.config Preview Transform gives an error https : connect.microsoft.com VisualStudio feedback details 777749 web-config-preview-transform-gives-an-error .. . .. . .. . .. . .. . Posted by Microsoft on 3 1 2013 at 2 : 46 PM .. . .. . Thanks for reporting the issue", "Edit the transform file to specify the changes that should be made to the deployed Web.config file when you deploy by using that build configuration .", "It seems that it s a bug in the Code Analysis of web-config-transform files .", "and I ve used the transform .. . .. . .. . And this works fine in Visual Studio when I use the Preview Transform .. . .. . But when I generate a web deploy package the SetParameter.xml has an element for the configuration value and the web.config in the generated zip file hasn t been transformed .. . .. . and if I amend the SetParameter.xml the web deploy + transform works fine", "Yes it seems in the example this xdt : Import assembly AppHarbor.TransformTester namespace AppHarbor.TransformTester.Transforms was missing in the transform because then it s working without any namespace in the configuration of the web.config .", "You need to use the Replace transform .", "I am using this example given by Octopus Deploy : .. . .. . http : docs.octopusdeploy.com display OD Configuration+files .. . .. . ultra-slimmed down version of web.config : .. . .. . the transform : .. . .. . the output : .. . .. . I m using this tool to preview the transformation : https : webconfigtransformationtester.apphb.com .. . .. . as you can see it doesn t do anything .", "I ve been given an ASP.NET web application for deployment and started adding web.config transforms for the different environments but the web.config-transform in a web-deployment package with a location element doesn t seem to work", "Instead it s necessary to add this import .. . .. . to the transform file at least when testing with the mentioned online transformation tester :", "You d think it would be smart enough to add that part in to the original web.config if it was required for the transform .", "configuration .config and it will save it as web.config .", "Is a config transform actually run when you run in Visual Studio", "Should you not be able to have 1 transform for the web.config to change the configSource and one transform on the connections for the connections transformations .", "In my sample I discover the transform sitting next to the web.config file itself .", "In this configuration I don t transform anything it s just copying files.. .", "Open the transform file for the build configuration that you want to work with .", "For Visual Studio 2010 Web based application we have Config Transformation features by which we can maintain multiple configuration-files for different environments .", "So in your Web.config transform file you have something like this :", "configuration .config files as a link", "I want to transform web.config file : .. . .. . to look like this : .. . .. . .. . .. . Here are the transforms I have tried : .. . .. . Transform 1 : .. . .. . This only works if the target web.config already contains a httpHandlers section .", "NuGet allows package developer to transform the config and code files in a target project as per this document reference http : docs.nuget.org docs creating-packages configuration-file-and-source-code-transformations .", "I transform the config instead of just copying it .", "I m trying to use config transformation abilty using only one occurrence of the transform file for the whole solution not for each project .. . .. .", "To test this out use AppHarbors config transform tester https : webconfigtransformationtester.apphb.com .", "Which config transform is applied when running in Visual Studio", "My point is that there is no connectionString to transform so there s no need for it to be there .", "What am I missing to get the transform to work", "Answering your question isn t simple because it poses a problem - if you want to transform Web.config with Web.debug.config - where transformation effect should be stored", "Transform depends on configuration - Debug Release etc .", "master and transform as opposed to just transform", "What s really frustrating is that I used Visual Studio to automatically generate the transform files .", "When I add a microsoft.identityModel section I get a warning saying .. . .. . The http : schemas.microsoft.com XML-Document-Transform attribute is not declared .. . .. . And the transform doesnt work on that section .", "Maybe because Common.Logging.Core dependency get s added after the web.config-transform", "I really can t figure out how to use Web.config transform .", "Then I use BeforeBuild with Yuri s addition to TransformXml to transform the current configuration with the Base config into the App.config .", "What I did was a RemoveAll and an Insert instead of a replace match : .. . .. . When I do it that way I get the desired transform and output config file .", "Right click on you web.config and select Add Config Transforms - this will create a dependant transformation config for each of your configurations defined .", "So the final transform is :", "My problem is with this particular transform .", "first the name of the config file followed by the transform config file followed by an optional template config followed by the path to your project containing both files .", "NuGet XDT supports the use of ProjectProperties in the transform file such as :", "We re working with web.config files in a fairly complex Visual Studio solution I d like to be able to insert the contents of a file that is not a web-config into the web.config is this possible to do with transforms", "You can add the extra transform files to your solution without adding a new solution configuration and run the transform as in your own example except for the target .", "I have a transform for my web.config that currently works if I publish to Azure but it s not working locally when I build run .", "In the process of setting up TFS 2013 to build and deploy sites and services to dev and test systems I came across this StackOverflow answer http : stackoverflow.com a 7325379 595473 for creating a custom build activity to transform Web.config files .", "However typically you will have two transformation files beneath the main Web.config - Web.Debug.config and Web.Release.config .", "But is it possible to do some Web.config transformation basing on web publish profile", "Use the identity transform and add this template :", "In a .NET MVC 3.0 Application I have the following configuration in appSettings : .. . .. . web.config .. . .. . For debugging I have the following configuration transform defined : .. . .. . web.Debug.config .. . .. . And I run the application in debug mode but my SMTP port is still taking the value from the web.config not web.Debug.config .", "All the examples on that page are of transformation files not of web.config files .", "Here s what worked for me : .. . .. . Call your additional Web.config files Web.Debug.config Test and Web.Release.config Production then during publishing you associate Debug configuration to the Test publish profile and Release configuration to the Production publish profile .", "Actually the entire namespace declaration should be removed from the configuration element in the web.config .", "One of the main reasons for doing so is the addition of web transformation files .", "You can look at web.config transformations : https : msdn.microsoft.com library dd465318 v vs.100 .aspx .. . .. . To create and code a transform file .. . .. . 1 .", "What i found was 1 transformed web.config + all my config transformation files as well : .. . Web.Debug.config web.Release.config and web.Test.config .. . Also strange : all these files were outputted to my bin folder as well .", "You are kind of asking the wrong question don t worry about how to transform back into web.config .", "So is there anyway I can have multiple build configurations use the same config transform file", "Under App Data PublishProfiles right-click on a publish profile .pubxml and choose Add Config Transform .", "In a config file I have .. . .. . I need to replace localhost using XSLT transform .", "When I a publish from VS2012 the transform works correctly .", "Secondly I have a web.config file thus : .. . .. . When I build the project the web.config automatically gets transformed through the following AfterBuild target in the project.csproj file : .. . .. . How can I transform the included Log4Net.config file using the same configuration transformation", "Transform files http : i.stack.imgur.com 0rosK.png .. . .. . Add this to the .targets file your config name just has to match the regex expression - i ConnectionString . in this case : .. . .. . Build and your .transformed files are created .", "What should I do to perform the desired transform", "I checked it by right clicking and preview transform .", "Mine has a value I want for local debugging and I use replace transform instead of add .", "As the web.PRODX.config transform files are not part of a solution configuration you could stick them in a folder to reduce clutter .", "Replace the Web.config with the following : .. . .. . And Web.Debug.config with the following : .. . .. . The result will show two configSections elements the one containing mySection being the first as specified in the InsertBefore Transform .", "In my Web.Config I have the following .. . .. . How do I transform it so I can inject a new sub section for security into system.webServer", "What I need to know is about the web.config transformation tag .. . .. . I should not write it in the development-environment transformation or should I", "I tried the answer here : xdt-transform locator that matches subnode content http : stackoverflow.com questions 9707108 xdt-transform-locator-that-matches-subnode-content 9707298 but no luck .", "I wrote nice extension to automate app.config transformation like the one built-in Web Application Project Configuration Transform http : visualstudiogallery.msdn.microsoft.com 579d3a78-3bdd-497c-bc21-aa6e6abbc859 .. . .. . The biggest advantage of this extension is that you don t need to install it on all build machines", "Vote https : visualstudio.uservoice.com forums 121579-visual-studio-2015 suggestions 2578637-allow-inserting-comments-with-web-config-transform for this feature to be include in Visual Studio", "Maybe using Web.config transform http : msdn.microsoft.com en-us library dd465326.aspx or someway else", "Hey Guys I m trying to do a transformation of the SMTP section of a web-config file .", "Now when you use the Publish command in visual-studio it will automatically transform the base web.config file and set the connectionString attribute to whatever configuration you re in when you publish .", "possible duplicate of Make Web.config transformations working locally http : stackoverflow.com questions 3613714 make-web-config-transformations-working-locally", "It s a handy tool that enables you to transform your app.config or any other XML file based on the build configuration .", "It is important to note that I m trying to include this in a NuGet package so I will be unable to use a custom transform like the one AppHarbor uses http : blog.appharbor.com 2012 07 27 custom-web-config-transforms-and-merges .", ".config to web .", "If you are however packaging a web-site by using MsBuild T : Package then the transform occurs as part of the packaging process which occurs after the compilation step completes .", "Edit : I have a node in web.config as .. . .. . which I am overriding in Web.Release.config and Web.Live.Config as .. . .. . and I am getting Config Sql.live.config in final Web.Config .. . .. . So I think I am using configuration Release but all configurations are been used for transformation .", "There is a Web.config Web.Live.config Web.Stage.config .. . .. . In the Web.Live.config I have this code : .. . .. . I publish it to my web server ensuring the configuration is set to Live ." ] }
{ "confidence": [ 61.123783111572266, 57.621185302734375, 57.56216812133789, 57.24095916748047, 57.18861389160156, 55.722747802734375, 53.87937927246094, 53.46812438964844, 52.997779846191406, 52.785064697265625, 52.457759857177734, 52.37541580200195, 51.80207824707031, 50.36507034301758, 50.06243133544922, 49.35722351074219, 49.27729415893555, 49.176761627197266, 48.892486572265625, 48.86144256591797 ], "content": [ "Question : I m trying to set up a web.config-transform to modify some values . I am using this example given by Octopus Deploy : .. . .. . http : docs.octopusdeploy.com display OD Configuration+files .. . .. . ultra-slimmed down version of web.config : .. . .. . the transform : .. . .. . the output : .. . .. . I m using this tool to preview the transformation : https : webconfigtransformationtester.apphb.com .. . .. . as you can see it doesn t do anything . I ve looked at a lot of examples but obviously I m missing something . Any help would be greatly appreciated . I ve also tried this with no luck : Comment : Are you sure about the namespace of the input xml If you change it from xmlns http : schemas.microsoft.com .NetConfiguration v2.0 to xmlns : xdt http : schemas.microsoft.com .NetConfiguration v2.0 the debug attribute is removed from the output . Comment : thank you Matthias that was it.. . I looked at about 10 different resources and none of them mentioned that I had to do that . I ll mark that as the answer if you d like to submit it as such . Comment : What s really frustrating is that I used Visual Studio to automatically generate the transform files . You d think it would be smart enough to add that part in to the original web.config if it was required for the transform . Comment : No change to the original web.config is required Comment : Yes it seems in the example this xdt : Import assembly AppHarbor.TransformTester namespace AppHarbor.TransformTester.Transforms was missing in the transform because then it s working without any namespace in the configuration of the web.config . .. . Answer : The transform works as intended on the mentioned online preview tool for web.config transformations https : webconfigtransformationtester.apphb.com when you change the namespace of the web.config file from .. . .. . to .. . .. . When this transform .. . .. . is applied to the adjusted web.config .. . .. . the debug attribute is removed from the result : .. . .. . Update : As mentioned in the comments the configuration of the web.config file shouldn t have any namespace at all . Instead it s necessary to add this import .. . .. . to the transform file at least when testing with the mentioned online transformation tester : Comment : Actually the entire namespace declaration should be removed from the configuration element in the web.config . configuration is not in a namespace . Comment : @JohnSaunders Thanks for the info just found this info here : msdn.microsoft.com en-us library ee248644 28v vs.100 29.aspx http : msdn.microsoft.com en-us library ee248644 28v vs.100 29.aspx not knowing if it applies to the settings used here . Answer was given based on the example mentioned here : msdn.microsoft.com en-us library dd465326.aspx http : msdn.microsoft.com en-us library dd465326.aspx Comment : You read the examples wrong . All the examples on that page are of transformation files not of web.config files . Comment : @JohnSaunders So the transform would work without the namespace in actual deployment and is only needed by the online web.config-transform tester mentioned in OP Just tested there without namespace in the web.config and it doesn t work there as intended . Comment : Their example has no namespace in the web.config . See webconfigtransformationtester.apphb.com https : webconfigtransformationtester.apphb.com .", "Question : This question is kind of a two parter . In VS2015 my MVC project has multiple different build configurations Test UAT Live etc . With my web.config I can simply right-click it and select Add Config Transform to create the transform files for each build configuration . If I have an external config file such as Log4Net.config how can I configure this to have dependant transforms like web.config Is this done manually by editing the project.csproj file Secondly I have a web.config file thus : .. . .. . When I build the project the web.config automatically gets transformed through the following AfterBuild target in the project.csproj file : .. . .. . How can I transform the included Log4Net.config file using the same configuration transformation I realise that I could place another TransformXml into the AfterBuild target but is this the correct way of doing this transform or am I missing something Comment : I m having the same issue . Did you manage to solve it Comment : @MatiasCicero I ve solved it using an additional TransformXml in the AfterBuild target . I ve outlined it in the answer below . HTH . .. . Answer : I opted for the solution of using a base Log4Net.config file a Log4Net.XXX.config file for each build configuration and an additional TransformXml task in the AfterBuild target : .. . .. . Log4Net.config .. . Log4Net.Debug.config .. . Log4Net.Release.config .. . Log4Net.Test.config .. . Log4Net.UAT.config .. . .. . The project.csproj file now looks like this : .. . .. . And an example Log4Net.Test.config looks like this I am using the transform to change connection strings and Log4Net s logging level : .. . .. . This transforms the Log4Net.config file in the output path successfully . It uses the same approach as transforming web.config files and so should be easily understandable by any other developer that picks up the project . Whilst this works and has been in production for a while now I m still looking for some confirmation that this is the correct way of doing transforms of included config files .", "Question : I am trying to have my TFS Build create the web.config-transform associated with the configuration I selected for my build . When I run the build I check the web.config file no transforms have been applied . When I a publish from VS2012 the transform works correctly . I have set up TFS 2012 Update 2 and have a separate server for builds . I don t have VS2012 installed on the build-server but I copied the C : Program Files x86 MSBuild Microsoft VisualStudio v11.0 Web and WebApplications folders and files from my dev machine to the build-server . I have created some configurations in my project and have added some tranforms to the associated web . configname .config . I have created a build and set the Items to Build - Configurations to Build to one of the configurations in my project . I noticed that it only has Debug and Release it didn t have any of the configurations I created . Side question : Is that correct or should it show all the configurations I created So I run a build and check the output folder and the web.config has not applied the transforms . Is there anything else I need to do .. . Answer : Right click your solution file go to properties click configuration properties and click configuration Manager on the top . Make sure your configuration for different environment set properly . if it is not set properly set it properly and check in the code . Now go to your build template and check the configuration to build property in the process tab you must be able to see your different configurations . if the configuration is already set it properly you can also add the new configuration name by typing it in the build property . Note : you can also right-click your web.config-transform file and choose preview transform and make sure the transform config is working fine . you can also give the publish profile name if it is working properly int he msbuild arguments section", "Question : Currently I can easily setup Web.config transform based on build configuration e.g . use connectionString server . . for Debug and connectionString . SQLExpress . . for Release . But is it possible to do some Web.config transformation basing on web publish profile I.e . use connectionString server1 . . for profile Server1 and connectionString server2 . . for Server2 .. . Answer : I believe that the publishing profiles are independent of the build profiles which is a bit of a shame as you could easily accidentally deploy a debug configuration to your production servers . However if you re using MSDeploy there are ways to modify the web.config in there . See MSDeploy - Changing Connection string parameter after deploying the package http : blogs.msdn.com b webtopics archive 2010 05 13 msdeploy-changing-the-connectionstring-parameter-in-web-config-after-deploying-the-package.aspx for more details .", "Question : I am using Visual Studio 2010 . I have this web.config .. . .. . Now I have gone to solution - Configuration Manager and added a new configuration called Production .. . .. . Now I came and right-click on my web.config and clicked Add Config Transforms .. . .. . Now I can see a file called web.Production.config .. . .. . I go and add this to my file .. . .. . Now when I build and publish my project I see an error message Comment : Are you setting the publish profile to Production during the publishing Comment : Maybe because the connectionStrings element does not exist in your base Web.config . You could try adding an empty node for it . Mine has a value I want for local debugging and I use replace transform instead of add . Comment : Yes . I double checked and the profile does use Production as build configuration . However I did notice an error in the output Web.Production.config 3 4 : Warning : No element in the source document matches configuration connectionStrings .. . Answer : Move connectionStrings to the main web.config . The only things that should appear in your production config are the transformations . Comment : The add is a transformation directive . Comment : My point is that there is no connectionString to transform so there s no need for it to be there . So either move it to web.config or remove it entirely . Comment : I m just assuming that he doesn t want the connectionString to be present during debugging since he s going through the trouble of adding it with a publish profile . Comment : I do need the the connection-string during development . that is why I in configuration manager I have a profile called Development . Comment : When I say debugging I m referring to you building locally and running the application from localhost which means you wouldn t be publishing . Like I said earlier the Web.config file should have your local settings and the publish profiles should be how you want the deployed application to be configured on your various environments Production Test etc.. .", "Question : In a .NET MVC 3.0 Application I have the following configuration in appSettings : .. . .. . web.config .. . .. . For debugging I have the following configuration transform defined : .. . .. . web.Debug.config .. . .. . And I run the application in debug mode but my SMTP port is still taking the value from the web.config not web.Debug.config . Can anyone suggest what could be wrong in this configuration .. . Answer : Answering your question isn t simple because it poses a problem - if you want to transform Web.config with Web.debug.config - where transformation effect should be stored In Web.config itself This would overwrite transformation source file Probably that s why Visual Studio doesn t do transformations during builds . Previous Matt answer is valid but you might want to mix them to have generic solution that works when you actually change active solution configuration from debug to release etc . Here s a simple solution : .. . .. . 1 . Create your config transformations for configurations Debug Release etc .. . 2 . Rename Web.config file to Web.base.config - transformations should automaticly rename accordingly Web.base.Debug.config etc .. . 3 . Add following transformWebConfig.proj XML file to your project folder : .. . 3 . Navigate to your project properties choose Build Events and add following content to Post-build event command-line : .. . .. . Now when you build your solution a Web.config file will be created with valid transformations for active configuration .", "Question : For Visual Studio 2010 Web based application we have Config Transformation features by which we can maintain multiple configuration-files for different environments . But the same feature is not available for App.Config files for Windows Services WinForms or Console Application . There is a workaround available as suggested here : Applying XDT magic to App.Config http : vishaljoshi.blogspot.com 2010 05 applying-xdt-magic-to-appconfig.html . However it is not straightforward and requires a number of steps . Is there an easier way to achieve the same for app.config files .. . Answer : In my experience the things I need to make environment-specific are things like connection strings appsettings and often smpt settings . The config system allows to specify these things in separate files . So you can use this in your app.config web.config : .. . .. . What I typically do is to put these config-specific sections in separate files in a subfolder called ConfigFiles either in the solution root or at the project level depends . I define a file per configuration e.g . smtp.config.Debug and smtp.config.Release . Then you can define a pre-build event like so : .. . .. . In team development you can tweak this further by including the COMPUTERNAME and or USERNAME in the convention . Of course this implies that the target files x.config should NOT be put in source control since they are generated . You should still add them to the project file and set their output type property to copy always or copy if newer though . Simple extensible and it works for all types of Visual Studio projects console winforms wpf web . Comment : I have exactly the same configuration that you have . But I have problems transforming the smtp file . Can you incluye the original and tranformation These are mine : The base file : xml version 1.0 smtp deliveryMethod SpecifiedPickupDirectory specifiedPickupDirectory pickupDirectoryLocation C : mail network host localhost smtp The transformation : xml version 1.0 smtp xmlns : xdt http : schemas.microsoft.com XML-Document-Transform xdt : Transform Replace from user@email.com deliveryMethod Network network .. . smtp Comment : I m not sure I understand . In this configuration I don t transform anything it s just copying files.. . Comment : Oh I didn t see the copy part . I transform the config instead of just copying it . Thanks anyway . Comment : I like this solution . One small suggestion : In the copy example above the source and target arguments for copy should be surrounded by quotes otherwise Pre-Build will fail for directories with space in their name", "Question : null .. . Answer : I ve been given an ASP.NET web application for deployment and started adding web.config transforms for the different environments but the web.config-transform in a web-deployment package with a location element doesn t seem to work The web.config has got some values in a location element e.g . and I ve used the transform .. . .. . .. . And this works fine in Visual Studio when I use the Preview Transform .. . .. . But when I generate a web deploy package the SetParameter.xml has an element for the configuration value and the web.config in the generated zip file hasn t been transformed .. . .. . and if I amend the SetParameter.xml the web deploy + transform works fine", "Question : Hi i want to insert a rewrite rule for Redirect to HTTPS but only on my release config .. . .. . This is how the rewrite rule looks .. . .. . How to achiev this only in my release.config .. . Answer : You can look at web.config transformations : https : msdn.microsoft.com library dd465318 v vs.100 .aspx .. . .. . To create and code a transform file .. . .. . 1 . If no transform file-exists for the build configuration that you want to specify settings for in Solution Explorer right-click the Web.config file and then click Add Config Transforms .. . 2 . Open the transform file for the build configuration that you want to work with . 3 . Edit the transform file to specify the changes that should be made to the deployed Web.config file when you deploy by using that build configuration . The default transform file includes comments that show how to code some common transforms .", "Question : null .. . Answer : I m trying to use config transformation abilty using only one occurrence of the transform file for the whole solution not for each project .. . .. . http : i.stack.imgur.com 5lClf.png .. . .. . is there a way to use these app . configuration .config files as a link or maybe other solution instead transformation tool Thanks", "Question : In a .NET MVC 3.0 Application I have the following configuration in appSettings : .. . .. . web.config .. . .. . For debugging I have the following configuration transform defined : .. . .. . web.Debug.config .. . .. . And I run the application in debug mode but my SMTP port is still taking the value from the web.config not web.Debug.config . Can anyone suggest what could be wrong in this configuration .. . Answer : Visual Studio 2010 and 2015 does unfortunately not directly support it while you are debugging it is only intended for publishing - even with the extension SlowCheetah marked answer it does not work for me only for projects using app.config rather than web.config . Note that there is a workaround described at codeproject http : www.codeproject.com Articles 255781 Web-Config-Transformations-when-Debugging . It describes how to modify the .msproj file to overwrite the current web.config by the transformed version . I will first describe that workaround as Option 1 but I have recently found out another Option 2 which is easier to use so you may scroll down to option 2 directly if you like : .. . .. . .. . .. . Option 1 : I have added the instructions taken from the original codeproject article see the link above because the screen shots there are already gone and I don t want to lose the entire information : .. . .. . VS.Net doesn t do any transforming when you are developing and just debugging your local environment . But there are some steps you can do to make this happen if you want . First create the configurations you want in VS.Net assuming the default debug and release are not enough for what you are trying to accomplish . Right click on you web.config and select Add Config Transforms - this will create a dependant transformation config for each of your configurations defined . Now you can rename your web.config to web.base.config . Add a web.config to your project . It doesn t matter what is in it because it will get overwritten every time we do a build but we want it part of the project so VS.Net doesn t give us the Your Project isn t configured for Debugging pop-up . Edit your .csproj Project File and add the following TransformXml task to the AfterBuild target . Here you can see I will be transforming the web.base.config file using the web . configuration .config and it will save it as web.config . For details please check this https : msdn.microsoft.com en-us library ee942158.aspx Anchor 13 Microsoft Q A . .. . .. . Option 2 : .. . .. . Based on this http : stackoverflow.com a 21517589 1016343 answer I have developed a simple console app TransformConfig.exe in C 6.0 syntax : .. . .. . Ensure that you add the DLL C : Program Files x86 MSBuild Microsoft VisualStudio v14.0 Web Microsoft.Web.XmlTransform.dll as a reference this example applies to VS 2015 for older versions replace the v14.0 in the path by the appropriate version number e.g . v11.0 . Compile it and put the .exe file into a directory e.g . C : MyTools . Usage : You can use it in your post-build-event in project properties select Build Events then edit the Post-build event command-line . Commandline parameters are example : .. . .. . C : MyTools TransformConfig.Exe d : Web.config t : Web . ConfigurationName .config s : Web.Template.config b : ProjectDir .. . .. . i.e . first the name of the config file followed by the transform config file followed by an optional template config followed by the path to your project containing both files . I have added the optional template config parameter because otherwise your original complete config would be overwritten by the transform which can be avoided by providing a template . Create the template by simply copying the original Web.config and name it Web.Template.config . Note : .. . .. . You can also copy the TransformConfig.exe file to the Visual Studio patb C : Program Files x86 MSBuild Microsoft VisualStudio v14.0 Web where the transform .dll resides and refer to it in all your projects where you need to transform your configs . For those of you who are wondering why I added Environment.ExitCode x assignments : Simply returning an int from Main did not help in the build event . See details here . http : geekswithblogs.net dchestnutt archive 2006 05 30 80113.aspx .. . .. . If you re publishing your project and you re using a Web.Template.config ensure that you did a rebuild on your solution with the right configuration usually Release before you publish . The reason is that the Web.Config is overwritten during debugging and you might end up transforming the wrong file otherwise . Comment : Looks like the CodeProject post is pooched . He used screenshots for his code samples and now since his blog s down they re lost to history . Comment : Yes unfortunately the screenshots are gone . But at least the article text is still there describing the approach . I have added the text description to my answer to avoid losing it . Comment : Too bad you can t see the TransformXml task... . Comment : True maybe one can try to contact the author James Coleman at codeproject to fix it there . Not sure if he is still active there though . @ThomasTeilmann Comment : I think this might be similar to what was in the lost screenshots . Seems to achieve the same basic result . stackoverflow.com a 6437192 1003916 http : stackoverflow.com a 6437192 1003916", "Question : Is it possible to change connection-string or just server host relying on selected web publish profile Maybe using Web.config transform http : msdn.microsoft.com en-us library dd465326.aspx or someway else I mean for profile Test change connection-string MyConnString in published Web.config to Data Source example.com 14333 .. . and for profile Production - to Data Source . SQLExpress .. . .. . Answer : This is exactly what web-config transforms were created for . The link you provided in your post has a walkthrough of doing this specifically for connection strings . To start with the transforms right-click your web.config file in the project explorer and choose Add Config Transforms . Assuming that you have ConfigA and ConfigB in your solution configuration there will be two new files added Web.ConfigA.config and Web.ConfigB.config . If you open these new files they ll be pretty empty except for a bunch of comments . They actually contain a connection-string example in them that you can use though - it looks like this : .. . .. . Uncomment this section and change the name property to the name of the connection-string in the base web.config file . Set the connectionString property to the actual value that you want to use for ConfigA . So like this : .. . .. . Repeat the process for the Web.ConfigB.config file with the desired connection-string for ConfigB . Now when you use the Publish command in visual-studio it will automatically transform the base web.config file and set the connectionString attribute to whatever configuration you re in when you publish . Comment : I really can t figure out how to use Web.config transform . Could you please suggest a brief example how to change connection-string to CS A for profile A and to CS B for B Comment : Sure I ll update my answer . Comment : Thank you very much Comment : As far as I could understated SetAttribute replaces whole attribute value . Is it possible to replace just a part of string being attribute value Comment : And another question please . Transform depends on configuration - Debug Release etc . Is it possible ti link it with publishing profiles - Server1 Server2 etc . I use the same configuration for all my profiles . Or I have to create a separate configuration for each profile But how link profile and configuration in this case", "Question : I have one project for publishing two separate websites on different servers . Both websites is in different languages En and tr . For web-deploy I want to change appsettings for different environments for Debug and Release For both websites . I added config files for transformations like this : enter image description here http : i.stack.imgur.com 6fpUW.png .. . .. . Appsetting in main Web.config : .. . .. . The code in transformation files are accordingly like this : .. . .. . I selected Web.TR.Debug.config and ran project But I always get en-US as WebsiteMainCulture . Please help . Is there any better approach suggested for same environment Thanks Comment : I checked it by right clicking and preview transform . It has transformed the value . but why Its not available in code . .. . Answer : I got the solution for the problems I asked also related to my previous question here : Selecting correct seed method for particular language http : stackoverflow.com questions 30612865 selecting-correct-seed-method-for-particular-language I just added config transformation files by right clicking to relevant publish web deploy files.Then added desired values to keys . And it worked . enter image description here http : i.stack.imgur.com CeedI.png .. . .. . Here are config transformation file auto generated . enter image description here http : i.stack.imgur.com VTY2P.png", "Question : I am trying to have my TFS Build create the web.config-transform associated with the configuration I selected for my build . When I run the build I check the web.config file no transforms have been applied . When I a publish from VS2012 the transform works correctly . I have set up TFS 2012 Update 2 and have a separate server for builds . I don t have VS2012 installed on the build-server but I copied the C : Program Files x86 MSBuild Microsoft VisualStudio v11.0 Web and WebApplications folders and files from my dev machine to the build-server . I have created some configurations in my project and have added some tranforms to the associated web . configname .config . I have created a build and set the Items to Build - Configurations to Build to one of the configurations in my project . I noticed that it only has Debug and Release it didn t have any of the configurations I created . Side question : Is that correct or should it show all the configurations I created So I run a build and check the output folder and the web.config has not applied the transforms . Is there anything else I need to do .. . Answer : Just throwing p : TransformConfigFiles true on there won t actually do anything . You also need to add this target to the project file : .. . .. . This is my source : http : blog.degree.no 2012 03 automatic-config-transformations Comment : Works for me And kudos your code sample here even fixes the typo from that blog post that leaves a out in two places . Comment : After I added those lines to csproj file during build I got an error : The TransformXml task was not found . If somebody will have the same you can add this before this target Import Project MSBuildExtensionsPath32 Microsoft VisualStudio v12.0 Web Microsoft.W eb.Publishing.targets Condition Exists VSToolsPath Web Microsoft.Web.Publishing.targets", "Question : Currently I can easily setup Web.config transform based on build configuration e.g . use connectionString server . . for Debug and connectionString . SQLExpress . . for Release . But is it possible to do some Web.config transformation basing on web publish profile I.e . use connectionString server1 . . for profile Server1 and connectionString server2 . . for Server2 .. . Answer : We keep all machine profile specific configuration in separate config files then use configSource to include them like so.. . This way Web.config is the same and doesn t require any transformations . We do this for connection strings smtp settings and app settings . We version-control Web.config and machine specific files such as cstrings.config.production cstrings.config.staging etc . Once you have this structure it s easy to generate images for different profiles . We have deployment scripts on each machine that read an environment variable and deploy appropriately . For example the staging server build script copies cstrings.config.staging to cstrings.config etc . Comment : How do you run your deployment scripts to link the current profile and a appropriate connection-string Comment : @abatishcev : Our build-server has targets for test staging and production . A clean checkout svn-export actually gets made . Build scripts rename bin cstrings.config . Destination bin cstrings.config then we run unit tests zip and ftp deploy to the destination machine . Each destination has cstrings smtp and appsettings config files in version-control . e.g . cstrings.config.staging smtp.config.staging appsettings.config.staging . FYI : You can leave cstrings.config on target machines as a read-only file if you re very security conscious . It s not a big deal in our environment .", "Question : I was trying to deploy my app into different environments then i started following this how to : Deploying an ASP.NET Web Application to a Hosting Provider using Visual Studio or Visual Web Developer : Web.Config File Transformations - 3 of 12 http : www.asp.net web-forms tutorials deployment deployment-to-a-hosting-provider deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12 .. . .. . was perfect until I clicked in Preview Transform I received this error : .. . .. . Microsoft Visual Studio .. . .. . Could not load file or assembly Microsoft.Web.XmlTransform Version 1.2.0.0 Culture neutral PublicKeyToken b03f5f7f11d50a3a or one of its dependencies . The system cannot find the file specified . I created just one transformation Web.DebugQA.config and of course the default ones debug and release .. . .. . my Web.DebugQA.config looks like this : .. . .. . but then I install this plugin : .. . .. . SlowCheetah - XML Transforms http : visualstudiogallery.msdn.microsoft.com 69023d00-a4f9-4a34-a6cd-7e854ba318b5 .. . .. . and I solved my preview transform error but then when I was trying to publish using the QADev transform I got this error : .. . .. . The ImportParametersFile task failed unexpectedly . .. . System.IO.FileNotFoundException : Could not load file or assembly Microsoft.Web.XmlTransform Version 1.2.0.0 Culture neutral PublicKeyToken b03f5f7f11d50a3a or one of its dependencies . The system cannot find the file specified . File name : Microsoft.Web.XmlTransform Version 1.2.0.0 Culture neutral PublicKeyToken b03f5f7f11d50a3a .. . at Microsoft.Web.Publishing.Tasks.ImportParametersFile.Execute .. . at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute .. . at Microsoft.Build.BackEnd.TaskBuilder . ExecuteInstantiatedTask d 20.MoveNext .. . .. . WRN : Assembly binding logging is turned OFF . To enable assembly bind failure logging set the registry value HKLM Software Microsoft Fusion EnableLog DWORD to 1 . Note : There is some performance penalty associated with assembly bind failure logging . To turn this feature off remove the registry value HKLM Software Microsoft Fusion EnableLog . I m using Visual Studio Pro 2012 . Any Help .. . Answer : This may have been fixed in Visual Studio 2012 Update 2 and Visual Studio 2013 . Web.config Preview Transform gives an error https : connect.microsoft.com VisualStudio feedback details 777749 web-config-preview-transform-gives-an-error .. . .. . .. . .. . .. . Posted by Microsoft on 3 1 2013 at 2 : 46 PM .. . .. . Thanks for reporting the issue It will be fixed in Visual Studio 2012 Update 2 . Please install it when it becomes available . Comment : That doesn t help if you don t have Visual Studio 2012 installed either because you have VS Express installed or because you re on a build-server .", "Question : I am trying to have my TFS Build create the web.config-transform associated with the configuration I selected for my build . When I run the build I check the web.config file no transforms have been applied . When I a publish from VS2012 the transform works correctly . I have set up TFS 2012 Update 2 and have a separate server for builds . I don t have VS2012 installed on the build-server but I copied the C : Program Files x86 MSBuild Microsoft VisualStudio v11.0 Web and WebApplications folders and files from my dev machine to the build-server . I have created some configurations in my project and have added some tranforms to the associated web . configname .config . I have created a build and set the Items to Build - Configurations to Build to one of the configurations in my project . I noticed that it only has Debug and Release it didn t have any of the configurations I created . Side question : Is that correct or should it show all the configurations I created So I run a build and check the output folder and the web.config has not applied the transforms . Is there anything else I need to do .. . Answer : You can type-in the name of Configuration in Items to Build- Configurations to build list . If that doesn t help try to add following MSBuild argument : p : TransformConfigFiles true 3 . Advanced - MSBuild Arguments", "Question : NuGet allows package developer to transform the config and code files in a target project as per this document reference http : docs.nuget.org docs creating-packages configuration-file-and-source-code-transformations . Basically for .config xml-based files merge transfrom and now a common .xdt transforms are available . I am currently using the following as a web.config.transform : .. . .. . See where I have hardcodedstring as a part of my database filename I d like this one to be a target application namespace or something relevant to a target application . Can such customization be done to acheieve my goal If yes please explaing how . .. . Answer : NuGet XDT supports the use of ProjectProperties in the transform file such as :", "Question : For Visual Studio 2010 Web based application we have Config Transformation features by which we can maintain multiple configuration-files for different environments . But the same feature is not available for App.Config files for Windows Services WinForms or Console Application . There is a workaround available as suggested here : Applying XDT magic to App.Config http : vishaljoshi.blogspot.com 2010 05 applying-xdt-magic-to-appconfig.html . However it is not straightforward and requires a number of steps . Is there an easier way to achieve the same for app.config files .. . Answer : I wrote nice extension to automate app.config transformation like the one built-in Web Application Project Configuration Transform http : visualstudiogallery.msdn.microsoft.com 579d3a78-3bdd-497c-bc21-aa6e6abbc859 .. . .. . The biggest advantage of this extension is that you don t need to install it on all build machines Comment : Very useful extension especially now that Slow Cheetah is entering maintenance mode and may not be supported in the future . Comment : Yeah folks should stop going to slow cheetah as the solution for this when this functionality is now supported by the transformxml msbuild-task . A sw architect on my team introduced slow cheetah in an overzealous way to our project and created debug stage and release transforms of all of our configs most of which needed no transformation . Needless to say the moment he left I pulled slow cheetah out and now we just use a single transformxml task on the web.config . Ahhhhh simplicity . Not to say that slow cheetah didn t have its time and place .", "Question : I have an ASP.Net project which utilizes the web.config transforms . To facilitate this I have built a structure like so : .. . .. . The web.base.config contains the untransformed base of the web.config data while the web . ENVIRONMENT .config contains the transform data based upon the current build configuration . The web.config contains the transform result that gets loaded at runtime . This works really well for us and has been very nice for staging changes . However there s a small issue that I ve thus far been working around manually : When I update my NuGet dependencies they apply their transforms to the web.config file which upon build then gets blown away with the transformations from my other configs . I have looked into a few different ways of fixing this and I haven t had any luck...Any ideas For the record this is how I achieved the above web.config schema in the project file : Comment : Can you add some specifics This should be a non-issue as far as I can tell . Comment : The issue is that the web.base.config is what should be updated by nuget rather than the web.config . But as far as I can tell there is no way to set that up on a project specific level as this is a team project with many engineers . Right now on build everything is fine - but on nuget update the web.config gets updated with the package changes and then blown away on the next build . I m currently gatekeeping all nuget changes and manually copying them on update to the web.base.config but we want to eliminate this step . Comment : Ahh. . I see now . I think you ve set it up backwards . By design web.config should contain all your base default debug values . You then overrride those with transforms based on environment configuration or whatever criteria you choose . I don t think there is any setting that d let you say that use web.base.config instead of web.config . Your best bet is to follow the convention . Comment : Yeah - I would love to do that but the problem is that the web.config has to contain the transformation results rather than the untransformed data...unless you are saying that the convention is to apply the transforms for the web.config against and into the web.config Comment : Yep . E.g . web.config : add key IsDebug value true . web.release.config : add key IsDebug value false xdt : Transform SetAttributes xdt : Locator Match key .. . Answer : By design web.config should contain all your base default debug values . You then overrride those with transforms based on environment configuration or whatever criteria you choose . I don t think there is any setting that d let you say that use web.base.config instead of web.config . Your best bet is to follow the convention . E.g . web.config .. . .. . web.release.config" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
autocompleteextender@asp.net@90
autocompleteextender -- the autocompleteextender is part of the ajax control toolkit for @placeholder .
{ "confidence": [ 46.613441467285156, 44.60200881958008, 43.35594940185547, 40.91324996948242, 40.91324996948242, 40.91324996948242, 35.978084564208984, 35.944515228271484, 35.944515228271484, 32.903541564941406, 31.657482147216797, 31.453149795532227, 29.497543334960938, 29.497543334960938, 28.251483917236328, 25.799657821655273, 19.721406936645508, 19.625198364257812, 18.822391510009766, 18.182506561279297, 17.56251335144043, 17.184127807617188, 16.858863830566406, 16.55302619934082, 16.137405395507812, 15.623311042785645, 14.999858856201172, 14.999858856201172, 14.914616584777832, 13.523883819580078, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965, 12.333930015563965 ], "content": [ "Isn t there a delay property in the AutoCompleteExtender", "I have created a UserControl that contains the AjaxControlToolkit s AutoCompleteExtender .", "I have an ajaxtoolkit AutoCompleteExtender that has position : absolute .", "I would like my AutoCompleteExtender selection to fire an event in code-behind .", "i downloaded from internet its web service is .. . .. . and autocompleteextender code as", "My problem is even i have three recods on a AutoCompleteExtender it take 150px .", "My AutoCompleteExtender and associates look like this : .. . .. . NOTE : Enabled is set to True before this control group is used and back to False afterwards .", "I m attempting to add an autocompleteextender to a form because I have a list of 100 000+ entries for a user to choose from .", "When the list returned by the Web Service exceeds the max jsonSerialization limit of 102400 string-length the AutoCompleteExtender fails silently .", "I have used AutoCompleteExtender in a asp.net applications and i wanted set max-height to CompletionListCssClass since i got many records around 75-150 .", "When I place another ul with the same css class and inline style as the HTML that is generated for the AutoCompleteExtender the positioning works fine in Chrome .", "It would be helpful to show the markup of your AutoCompleteExtender and the web service method that returns results .", "Ultimately when the user selects a name from the AutoCompleteExtender list I want to take the ID associated with that name call a service to get more data then add to a GridView on the page .", "Funny I was just looking at your post here : stackoverflow.com questions 12838552 http : stackoverflow.com questions 12838552 detect-autocompleteextender-select-event it is very close -- I ll edit my question to show what I did .", "Hey im having the same problem with this extenders position in ie i tried todo what you suggested but there is no difference stackoverflow.com questions 9288125 http : stackoverflow.com questions 9288125 autocompleteextender-position-is-wrong-not-directly-under-textbox", "i have autocomplete extender in my website that fetches values from database.. . it uses a web service .. . .. . web service code is as follows : .. . .. . and the autocompleteextender code is as follows : .. . .. . i checked web service it is working properly.. . but the results are not displayed in textbox please help me out.. . thanx in advance .. . .. . the following code is working e.g .", "I have a textbox with ajax autocomplete extender .", "I am using asp.net and ajaxcontrol toolkit .. . .. . How can I achieve this", "I m having a textbox with ajax autocomplete extender .. . .. . I m extending TextBox1 with Ajax AutoComplete Extender and populating it with the help of WebService .", "This is how my control is declared :", "I ve got a user control which lets users provided their own script names that are called by the control on specific events .", "I mean something like this please refer this link demos.telerik.com aspnet-ajax combobox examples functionality http : demos.telerik.com aspnet-ajax combobox examples functionality multicolumncombo defaultvb.aspx", "I m using the ToolkitScriptManager and imagine I need to call ScriptManager.RegisterScriptControl this from my control and then implement the IScriptControl interface .", "These fields need to be populated by the commented part Convert.ToInt32 lblUserID.Text But they don t work when the method is listed as static .", "I have that at work and ajax requests sometimes takes a minute to return .", "Update .. . .. . I ve moved the javascript into code-behind and am registering it as a ClientScript in the hopes it will get me a little closer to where I need to be : .. . .. . This works for the statically placed control but as before not for the dynamically added one .", "Fixed : Missing Property CompletionInterval 0 .. . .. . I am testing functionalities of ajax autocomplete extender and webservices .", "I have created Ajax autocomplete extender on my web page that retrieves the values from the database .", "However if one of these controls is added dynamically say within an UpdatePanel the script block which I currently have embedded in the Source view for that one control does not seem to be available JavaScript complains that it can t find the function I am wiring up to OnClientItemSelected .", "Although Google won t use asp.net Linq or script manager to do Ajax work I am just testing on my local computer with no database-connection I assume there must be a way to make it work faster .", "It works well when I have one or more statically designed instances on the same page .", "I suspect I need to register the scripts for the UserControl in its PreRender event so they are available even when it is added to the page dynamically .", "Is this the right approach", "If so to correctly implement IScriptControl do I have to move the script block out of Source view and into its own .js file", "That would force me to redesign my JS function because it calls inline code to retrieve the ClientID for a subcontrol within that specific instance : .. . .. . var hiddenField get this.hfItemID.ClientID .. . .. . Script Management and JS aren t my specialty so I want to be sure that s the right direction before I complicate a UserControl that was working great until I started adding them programatically .", "The script just doesn t make it into the Source View .", "Moving the script to the code-behind works when the static 5-argument version of RegisterStartupScript is called .", "Provide the UserControl itself as the first parameter :", "Previously was using combobox but too slow to load .", "Problem I m having is that in order to populate the list parameters are needed within the method .", "The method is a public static string .", "If I hard-code a number into the parameters it works great .", "But when I reference a field to give me the value the autocomplete feature doesn t work .", "If I remove static from the method I can use the parameters but the autocomplete doesn t work .", "How can I correct or rewrite this to get the list available to the ACE", "Any help appreciated thanks", "THE TWO LINES BELOW ARE PARAMETERS FOR THE DATATABLE .", "HERE IS WHERE THE ISSUE LIES :", "what problem you are facing its not clear", "int userID 1 Convert.ToInt32 lblUserID.Text int RID 1 Convert.ToInt32 lblRR.Text These two lines are currently hard-coded with a value of 1 .", "If I remove static the values are pulled in but the autocomplete feature doesn t work .", "The user has to enter the entire number and nothing pre-fills or suggests .", "your user id and Rid In Label that means they are fixed for page....right i mean they didnt change until load page....or in other word the assigned at page load...right", "Found a way to correct this - using the ContextKey - I had 2 parameters so I concatenated them on the asp.net side and assigned them as the context key .", "used the ContextKey as the parameter for the SQL Query .", "When it got to the sql side used left and substring functions to separate the two parameters and run query properly .", "I ve fired onClick events from javascript code before but that seems like extra steps in this case .", "What I have so far.. .", "The javascript : .. . .. . with", "Code behind : .. . .. . Can I do this directly or do I need to have a hidden button or textbox to fire an OnChange event", "I would like to accomplish this the cleanest way possible .", "Thanks .", "Update- This is the target textbox-- .. . .. . Added this to the javascript : .. . .. . And this is the event : .. . .. . So I need a hidden-field to hold the selectedStudent VALUE of the selected item so I can use it in the StudentNameSearchTextBox TextChanged event", "In my opinion the cleanest way is to save selected value to HiddenField s value fire PostBack from hidden button and do all staff in button s click event handler .", "Solution suggested in that post will hit server even if user enter any text into target textbox doesn t select any option and then do submit form to server e.g .", "click on any Button .", "In your case you need to handle not just text of target textbox but only value selected from suggestions list .", "So in my opinion TextChanged event of textbox not very well option in this situation .", "I see what you mean .", "Button it is then .", "Thank you .", "Situation is straight forward .", "Data that comes back as user types is simple : Last Name First Name .. . .. . My issue is that i need for users to be able to type the comma that separates the names .", "This is so they can narrow down the candidate data by First Name.. .", "Example : .. . .. . Smith Able Smith Baker Smith Charlie .. . .. . Problem is as soon as I type a the list of data disappears .", "I tried taking out of the delimiters tag but that didn t work .", "I only need to be able to select a single entry not multiple .", "Any idea on how I can allow the entry of the and have the autocomplete continue on", "Could you please post the query method you are using to return the values", "cmd.CommandText select emp.UserId ISNULL emp.NameLast + + ISNULL emp.NameFirst + + ISNULL emp.NameInitial as EmpName from employee.dbo.tblEmployees emp Where UserId is NOT NULL and emp.NameLast LIKE @SearchText + cmd.Parameters.AddWithValue @SearchText prefixText ..Then this is used when looping thru recs Dim item As String AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem sdr EmpName .To String sdr UserId .ToString employees.Add item", "Nevermind", "I kind of figured it out...In the jumbled query above...i was ONLY searching on last name .", "I should have been searching on the concatenated lastname first name .", "Please post a working example .", "It s very hard to investigate a it doesn t work problem .", "@likeitlikeit i hav edited the question and have also included the working example please look fot it.. .", "I m looking for a sample using Autocomplete with DataTable .", "The autocomplete should have a table structure apart from single column .", "Any hint. .", "Thanks", "in advance .. . .. . The mark up is as follows", "What do you mean by with DataTable", "Autocomplete fed from DataTable or Autocomplete suggestion list displaying multiple-columns", "@TheVillageIdiot i mean autocomplete suggestion list displaying multiple-columns from a sql database as datatable .", ".plz help me .", "Look at this answer : stackoverflow.com a 12537306 360171 http : stackoverflow.com a 12537306 360171 I believe you can utilize approach with OnClientItemDataBinding proposed in that answer clear out content of autocomplete element generated by extender and re-create it on your own from dataItem object .", "Otherwise you need additional customization of AutoCompleteExtender s source code", "@YuriyRozhovetskiy The link you suggested is unable to digest for me ." ] }
{ "confidence": [ 49.60861587524414, 47.65673065185547, 45.54203796386719, 44.28721237182617, 43.74570846557617, 38.655242919921875, 36.1864013671875, 33.98584747314453, 31.978240966796875, 23.877330780029297, 22.215364456176758, 16.427719116210938, 15.638665199279785, 15.638665199279785, 15.171546936035156, 14.651081085205078, 12.218213081359863, 12.218213081359863, 12.218213081359863, 12.218213081359863 ], "content": [ "Question : null .. . Answer : i have autocomplete extender in my website that fetches values from database.. . it uses a web service .. . .. . web service code is as follows : .. . .. . and the autocompleteextender code is as follows : .. . .. . i checked web service it is working properly.. . but the results are not displayed in textbox please help me out.. . thanx in advance .. . .. . the following code is working e.g . i downloaded from internet its web service is .. . .. . and autocompleteextender code as Comment : Please post a working example . It s very hard to investigate a it doesn t work problem . Thanks . Comment : @likeitlikeit i hav edited the question and have also included the working example please look fot it.. .", "Question : I have used AutoCompleteExtender in a asp.net applications and i wanted set max-height to CompletionListCssClass since i got many records around 75-150 . My problem is even i have three recods on a AutoCompleteExtender it take 150px . I want to change the height dynamically . Is there any specific css property to do this . Any help will be greatly appreciated . Thank you Comment : Your css looks ok. . nothing wrong with it . May be you should take a look at inner elements which are populating the lists . Comment : I will check it and thank you for your help .. . Answer : Add min-height : 50px or set the min-height as per your requirement to CSS . Comment : Not Worked .Anyway thanks for your suggestion . When i apply it in to style it will remain in 50px area even i have more elements .", "Question : I would like my AutoCompleteExtender selection to fire an event in code-behind . I ve fired onClick events from javascript code before but that seems like extra steps in this case . Ultimately when the user selects a name from the AutoCompleteExtender list I want to take the ID associated with that name call a service to get more data then add to a GridView on the page . What I have so far.. . The javascript : .. . .. . with Code behind : .. . .. . Can I do this directly or do I need to have a hidden button or textbox to fire an OnChange event I would like to accomplish this the cleanest way possible . Thanks . Update- This is the target textbox-- .. . .. . Added this to the javascript : .. . .. . And this is the event : .. . .. . So I need a hidden-field to hold the selectedStudent VALUE of the selected item so I can use it in the StudentNameSearchTextBox TextChanged event .. . Answer : In my opinion the cleanest way is to save selected value to HiddenField s value fire PostBack from hidden button and do all staff in button s click event handler . Comment : Funny I was just looking at your post here : stackoverflow.com questions 12838552 http : stackoverflow.com questions 12838552 detect-autocompleteextender-select-event it is very close -- I ll edit my question to show what I did . Comment : Solution suggested in that post will hit server even if user enter any text into target textbox doesn t select any option and then do submit form to server e.g . click on any Button . Comment : In your case you need to handle not just text of target textbox but only value selected from suggestions list . So in my opinion TextChanged event of textbox not very well option in this situation . Comment : I see what you mean . Button it is then . Thank you .", "Question : I have an ajaxtoolkit AutoCompleteExtender that has position : absolute . I have placed it inside a div with position : relative . This makes the extender dropdown place itself perfectly on all browsers except on Chrome Safari where the position is relative to the top left of the window instead of the div . When I place another ul with the same css class and inline style as the HTML that is generated for the AutoCompleteExtender the positioning works fine in Chrome . So there is something specific to the extender that makes it render at the bottom of the HTML code just before the end tag and therefore not using the div as it s parent when calculating its position . Any ideas what I can do to fix this Code : .. . .. . CSS : .. . Answer : Try to add plain HTML div element right after extender with spcified id attribute and use this id value for extender s CompletionListElementID property . When you pass an id to the extender it will insert the items as div elements . So adding a plain HTML div rather than a ul maintains valid HTML . Comment : Hey im having the same problem with this extenders position in ie i tried todo what you suggested but there is no difference stackoverflow.com questions 9288125 http : stackoverflow.com questions 9288125 autocompleteextender-position-is-wrong-not-directly-under-textbox Comment : When you pass an id to CompletionListElementID the items that are inserted into that element are divs . I have edited your answer to suggest inserting a div instead of a ul to maintain valid HTML", "Question : Fixed : Missing Property CompletionInterval 0 .. . .. . I am testing functionalities of ajax autocomplete extender and webservices . And found that auto complete extender take a while to fetch the data and display . I don t have database-connection or anything like that at the moment . I am just putting all the items in a array in the webservice function and return the matching set of items using LINQ . There is about 1 second gap showing the data . I tried turned on off EnableCaching which I found someone suggested that on a blog but it still very slow comparing how Google searches billions of data and returns you the result on the live website with billions of users without a fraction of a second delay . Although Google won t use asp.net Linq or script manager to do Ajax work I am just testing on my local computer with no database-connection I assume there must be a way to make it work faster . Probably I missed to set a setting somewhere . Here is my code . aspx .. . .. . There is nothing on code-behind . Here is code for webservice . . Comment : Isn t there a delay property in the AutoCompleteExtender CompletionInterval i think . Comment : Also check that your data is not going via some other route like a proxy server . I have that at work and ajax requests sometimes takes a minute to return . Comment : Hi Mike and Leppie . . I scanned through the properties again and set CompletionInterval 0 then it works very fast now . What a catch Thanks a lot . . Comment : I ll promote to an answer and could you please accept Thanks . Comment : of course I will . .. . Answer : Isn t there a delay property in the AutoCompleteExtender CompletionInterval I think . Comment : Thanks Mike .... .", "Question : null .. . Answer : My CompletionInterval is 100 and MinimumPrefixLength is 1 . Sometimes after typing one letter that I know has completions like a after roughly one second maybe less but 1 second is a specified time that initial a disappears . When I type another one I get a list of completions Does anyone know what is going on here I m using v7.0607 of the AjaxControlToolkit that brings v1.4.6 of the HtmlAgilityPack with it . My AutoCompleteExtender and associates look like this : .. . .. . NOTE : Enabled is set to True before this control group is used and back to False afterwards . That is NOT the problem . The accompanying function script below works fine . That script triggers the following code-behind handler that fetches the details for the selected visitor . It also works fine : Comment : It would be helpful to show the markup of your AutoCompleteExtender and the web service method that returns results . Comment : @jadarnel27 Code added as requested . Comment : I wonder - do you have some CSS that s maybe covering up your TextBox when you have no resuts yet CSS that s being applied to CompletionList or CompletionListItem . Also I don t think it will fetch results untl you have more characters than the minimum prefix length . But I could be wrong . Comment : @jadarnel27 Thanks I have never set the MinimumPrefixLength below 1 but even if it s 2 or 3 and you type 2 or 3 letters they often disappear . It doesn t look like the CSS does anything but I ll check thanks . Comment : It s most like that some javascript did not load . Can you open a browser debugger and watch what s happen I think it may be some javascript not loaded when you try to type a in some cases .", "Question : I have created a UserControl that contains the AjaxControlToolkit s AutoCompleteExtender . It works well when I have one or more statically designed instances on the same page . However if one of these controls is added dynamically say within an UpdatePanel the script block which I currently have embedded in the Source view for that one control does not seem to be available JavaScript complains that it can t find the function I am wiring up to OnClientItemSelected . I suspect I need to register the scripts for the UserControl in its PreRender event so they are available even when it is added to the page dynamically . I m using the ToolkitScriptManager and imagine I need to call ScriptManager.RegisterScriptControl this from my control and then implement the IScriptControl interface . Is this the right approach If so to correctly implement IScriptControl do I have to move the script block out of Source view and into its own .js file That would force me to redesign my JS function because it calls inline code to retrieve the ClientID for a subcontrol within that specific instance : .. . .. . var hiddenField get this.hfItemID.ClientID .. . .. . Script Management and JS aren t my specialty so I want to be sure that s the right direction before I complicate a UserControl that was working great until I started adding them programatically . Update .. . .. . I ve moved the javascript into code-behind and am registering it as a ClientScript in the hopes it will get me a little closer to where I need to be : .. . .. . This works for the statically placed control but as before not for the dynamically added one . The script just doesn t make it into the Source View . .. . Answer : Moving the script to the code-behind works when the static 5-argument version of RegisterStartupScript is called . Provide the UserControl itself as the first parameter :", "Question : null .. . Answer : I m attempting to add an autocompleteextender to a form because I have a list of 100 000+ entries for a user to choose from . Previously was using combobox but too slow to load . Problem I m having is that in order to populate the list parameters are needed within the method . The method is a public static string . If I hard-code a number into the parameters it works great . But when I reference a field to give me the value the autocomplete feature doesn t work . If I remove static from the method I can use the parameters but the autocomplete doesn t work . How can I correct or rewrite this to get the list available to the ACE Any help appreciated thanks THE TWO LINES BELOW ARE PARAMETERS FOR THE DATATABLE . HERE IS WHERE THE ISSUE LIES : Comment : what problem you are facing its not clear Comment : int userID 1 Convert.ToInt32 lblUserID.Text int RID 1 Convert.ToInt32 lblRR.Text These two lines are currently hard-coded with a value of 1 . These fields need to be populated by the commented part Convert.ToInt32 lblUserID.Text But they don t work when the method is listed as static . If I remove static the values are pulled in but the autocomplete feature doesn t work . The user has to enter the entire number and nothing pre-fills or suggests . Comment : your user id and Rid In Label that means they are fixed for page....right i mean they didnt change until load page....or in other word the assigned at page load...right Comment : Found a way to correct this - using the ContextKey - I had 2 parameters so I concatenated them on the asp.net side and assigned them as the context key . used the ContextKey as the parameter for the SQL Query . When it got to the sql side used left and substring functions to separate the two parameters and run query properly .", "Question : I have an an autocomplete extender on my page that searches a database based on last name . For some reason when searching Smith which should return 1564 results nothing is being returned When I search other names it works fine Jones etc . I am thinking Smith has the most rows and there is a limit or something Any ideas Comment : Do you see any errors in the console log Load your page with Chrome and press F12 . Then click on console and see if any errors are displayed Comment : Under Response Body tab it says Message : There was an error processing the request . StackTrace : ExceptionType : Comment : Debug the application and put a break point in the web service method and see why is failing . Comment : I think you are hitting the jsonSerialization limit . Try returning only the first 500 records and see if the problem disappears . If so you can extend the limit in the Web.config but in this case I wouldn t bother . No body will ever go through a list of more than 20 suggestions any way . Comment : See here : stackoverflow.com questions 1151987 http : stackoverflow.com questions 1151987 can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config .. . Answer : When the list returned by the Web Service exceeds the max jsonSerialization limit of 102400 string-length the AutoCompleteExtender fails silently . A way to fix this although is not practical is to increase the value in the web.config as so : .. . .. . Make sure you have this section in your sectionGroup section . If you don t add it . And then set the value : .. . .. . See this other answer . http : stackoverflow.com questions 1151987 can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config", "Question : I m having a textbox with ajax autocomplete extender .. . .. . I m extending TextBox1 with Ajax AutoComplete Extender and populating it with the help of WebService . My requirement is that instead of a dropdown suggestion I should get a GridView like structure with multiple-columns with headers . I am using asp.net and ajaxcontrol toolkit .. . .. . How can I achieve this Any help or suggestion . Markup is as follows .. . .. . CSS is as follows .. . Answer : you can use this . where source people is the json object return from webservice Comment : Can you please explain more . Is there anything to change int the CSS . I have updated the code with css and markup Comment : css will be involved but you have to append table tags inside the render method when jquery is about to render the item", "Question : I m having a textbox with ajax autocomplete extender .. . .. . I m extending TextBox1 with Ajax AutoComplete Extender and populating it with the help of WebService . My requirement is that instead of a dropdown suggestion I should get a GridView like structure with multiple-columns with headers . I am using asp.net and ajaxcontrol toolkit .. . .. . How can I achieve this Any help or suggestion . Markup is as follows .. . .. . CSS is as follows .. . Answer : I dont have a fair idea about your question . But what i thought is on the textchange event of the textbox Fill Gridview use grid view in UpdatePanel ...and trigger a textchange event from the update panel so it will look like when you enter text in the textbox grid view auto fill on selection from grid view fill another textbox . hope this help s . will try to post code later. . .. . .. . EDIT : .. . .. . Ok then 1 thing u can do . . When you are returning your item list .. . .. . use like this . create a string first .. . .. . Then directly append this list of strings to dropdown div under your textbox so it will look like we have a grid view. . will post code at night that i have created this type of code on my site . Comment : I mean something like this please refer this link demos.telerik.com aspnet-ajax combobox examples functionality http : demos.telerik.com aspnet-ajax combobox examples functionality multicolumncombo defaultvb.aspx Comment : Looking forward for more response from you", "Question : null .. . Answer : Situation is straight forward . I have a textbox with ajax autocomplete extender . Data that comes back as user types is simple : Last Name First Name .. . .. . My issue is that i need for users to be able to type the comma that separates the names . This is so they can narrow down the candidate data by First Name.. . Example : .. . .. . Smith Able Smith Baker Smith Charlie .. . .. . Problem is as soon as I type a the list of data disappears . I tried taking out of the delimiters tag but that didn t work . I only need to be able to select a single entry not multiple . Any idea on how I can allow the entry of the and have the autocomplete continue on Comment : Could you please post the query method you are using to return the values Comment : cmd.CommandText select emp.UserId ISNULL emp.NameLast + + ISNULL emp.NameFirst + + ISNULL emp.NameInitial as EmpName from employee.dbo.tblEmployees emp Where UserId is NOT NULL and emp.NameLast LIKE @SearchText + cmd.Parameters.AddWithValue @SearchText prefixText ..Then this is used when looping thru recs Dim item As String AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem sdr EmpName .To String sdr UserId .ToString employees.Add item Comment : Nevermind I kind of figured it out...In the jumbled query above...i was ONLY searching on last name . I should have been searching on the concatenated lastname first name .", "Question : I ve got a user control which lets users provided their own script names that are called by the control on specific events . I have the following code : .. . .. . me.get formatFunction contains the name of a function i.e . FormatItem . This example is currently using eval which I do not want to use.. . plus this example doesn t work anyway but I thought I d show what I m trying to get at . In the example above I get a value undefined error as item is a string array and eval tries to convert it into one long string . How can I achieve this functionality any still pass-through item as a string array to the named function If passing named functions is a bad idea are there any alternatives This is how my control is declared : Comment : How many times per week is this going to get asked First dup : stackoverflow.com questions 359788 http : stackoverflow.com questions 359788 javascript-function-name-as-a-string Comment : Another dup : stackoverflow.com questions 1144297 http : stackoverflow.com questions 1144297 ways-to-call-a-javascript-function-using-the-value-of-a-string-variable 1144334 1144334 .. . Answer : Comment : THe only difference to this was that I had to use window instead of me . Comment : Yeah if you define it as a global function then you use window . If you define it on an object prototype referred to by me then you use me", "Question : I ve got a user control which lets users provided their own script names that are called by the control on specific events . I have the following code : .. . .. . me.get formatFunction contains the name of a function i.e . FormatItem . This example is currently using eval which I do not want to use.. . plus this example doesn t work anyway but I thought I d show what I m trying to get at . In the example above I get a value undefined error as item is a string array and eval tries to convert it into one long string . How can I achieve this functionality any still pass-through item as a string array to the named function If passing named functions is a bad idea are there any alternatives This is how my control is declared : Comment : How many times per week is this going to get asked First dup : stackoverflow.com questions 359788 http : stackoverflow.com questions 359788 javascript-function-name-as-a-string Comment : Another dup : stackoverflow.com questions 1144297 http : stackoverflow.com questions 1144297 ways-to-call-a-javascript-function-using-the-value-of-a-string-variable 1144334 1144334 .. . Answer : I m not sure what your overall plan is but you can pass functions around themselves instead of their names :", "Question : I ve got a user control which lets users provided their own script names that are called by the control on specific events . I have the following code : .. . .. . me.get formatFunction contains the name of a function i.e . FormatItem . This example is currently using eval which I do not want to use.. . plus this example doesn t work anyway but I thought I d show what I m trying to get at . In the example above I get a value undefined error as item is a string array and eval tries to convert it into one long string . How can I achieve this functionality any still pass-through item as a string array to the named function If passing named functions is a bad idea are there any alternatives This is how my control is declared : Comment : How many times per week is this going to get asked First dup : stackoverflow.com questions 359788 http : stackoverflow.com questions 359788 javascript-function-name-as-a-string Comment : Another dup : stackoverflow.com questions 1144297 http : stackoverflow.com questions 1144297 ways-to-call-a-javascript-function-using-the-value-of-a-string-variable 1144334 1144334 .. . Answer : If your intent is to pass all arguments to the user-specified function that are passed to formatItem then instead of using : .. . .. . Use : .. . .. . The apply method can be called on a function object in order to invoke that function using the specified this and argument array . See : http : odetocode.com blogs scott archive 2007 07 04 function-apply-and-function-call-in-javascript.aspx for an explanation of the call and apply functions in javascript . Then you will want get formatFunction to return a function object rather than just the name of the function or you can try : .. . .. . ...to get a function which is defined on me by its name . Note that if get formatFunction returns the string myFunc then this is equivalent to me.myFunc .. . .. . Edit : changed references to this to use me instead Comment : window get formatFunction will work if the function is defined in global-scope . It might have been defined as an object prototype .", "Question : null .. . Answer : I have created Ajax autocomplete extender on my web page that retrieves the values from the database . When I select one of the options from the autocomplete dropdown list I get the desired result . The problem is : .. . .. . When the user types entire word by himself or if the word is pasted and when he does not select one of the options from the dropdownlist and presses enter result is blank . How do I solve this problem My code for autocomplete extender is : .. . .. . The javascript function is : .. . .. . And my webservice code is : Comment : I got the answer.I added FirstRowSelected true in the properties of the autocomplete extender and the functionality is now working", "Question : I m looking for a sample using Autocomplete with DataTable . The autocomplete should have a table structure apart from single column . Any hint. . Thanks in advance .. . .. . The mark up is as follows Comment : What do you mean by with DataTable Autocomplete fed from DataTable or Autocomplete suggestion list displaying multiple-columns Comment : @TheVillageIdiot i mean autocomplete suggestion list displaying multiple-columns from a sql database as datatable . .plz help me . Comment : Look at this answer : stackoverflow.com a 12537306 360171 http : stackoverflow.com a 12537306 360171 I believe you can utilize approach with OnClientItemDataBinding proposed in that answer clear out content of autocomplete element generated by extender and re-create it on your own from dataItem object . Otherwise you need additional customization of AutoCompleteExtender s source code Comment : @YuriyRozhovetskiy The link you suggested is unable to digest for me . As i am new to asp.net can you please suggest any other method for this question .. . Answer : You can create your query accordingly .. . Example .. . .. . Or you want combined result-of two columns to display then you can use union like below Comment : I need to get the code-behind for this Thanks in advance .", "Question : I am using autocomplete extender . the problem is when the user begins typing the 2nd word and selects the autocomplete suggestion then it replaces the 2nd word with the suggestion but leaves the first word . I type Cherry Cobbler .. . .. . Auto complete shows Desert Cherry Cobbler 1 Slice .. . .. . When I click the auto complete suggestion it finalizes in my textbox as Cherry Desert Cherry Cobbler 1 Slice . The first word cherry should not be there . Any Ideas .. . Answer : I found the answer remove the space from the delimiter .", "Question : Only on IE the textbox postback is triggered when the user scrolls the autocomplete results . I have no problems in Chrome or FF . How it s supposed to work : User starts typing food then selects the food from the extender div then a postback occures and it causes additional database information to be displayed based on the food . .. . Answer : if you remove .. . .. . it works after the textbox text is changed you select a value from the dropdown list the event OnTextChanged is triggered. .", "Question : Only on IE the textbox postback is triggered when the user scrolls the autocomplete results . I have no problems in Chrome or FF . How it s supposed to work : User starts typing food then selects the food from the extender div then a postback occures and it causes additional database information to be displayed based on the food . .. . Answer : I just used jquery-ui I found no solution to having a postback on an autocomplete it just doesn t work in IE . I read up on it online and that s the conclusion" ] }
[ "yes-answer-long", "yes-answer-short" ]
asp.net
UNK_RELATION
maxent@modeling@86
maxent -- software library based on the maximum-entropy approach for species habitat @placeholder .
{ "confidence": [ 39.35032653808594, 33.156715393066406, 32.820465087890625, 32.28313064575195, 32.28313064575195, 29.98025131225586, 29.9778995513916, 29.800758361816406, 29.800758361816406, 29.375160217285156, 29.341415405273438, 28.929691314697266, 28.44684600830078, 27.914194107055664, 27.6220760345459, 27.6220760345459, 27.6220760345459, 27.245431900024414, 27.245431900024414, 27.245431900024414, 27.086349487304688, 26.727506637573242, 26.727506637573242, 26.194854736328125, 26.084674835205078, 26.050270080566406, 25.683488845825195, 25.618045806884766, 25.618045806884766, 25.58688735961914, 25.526092529296875, 25.526092529296875, 24.932327270507812, 24.849916458129883, 24.53919792175293, 24.219823837280273, 23.99991226196289, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.898706436157227, 23.73069953918457, 23.73069953918457, 23.73069953918457, 23.43442726135254, 23.425968170166016, 23.425968170166016, 23.425968170166016, 23.425968170166016, 23.425968170166016, 23.175806045532227, 23.018409729003906, 23.018409729003906, 22.758087158203125, 22.758087158203125, 22.758087158203125, 22.758087158203125, 22.673418045043945, 22.673418045043945, 22.084369659423828, 22.084369659423828, 22.084369659423828, 22.084369659423828, 21.940263748168945, 21.897258758544922, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.706626892089844, 21.391023635864258, 21.391023635864258, 21.391023635864258, 21.391023635864258, 21.391023635864258, 21.391023635864258, 21.21078109741211, 20.581729888916016, 20.581729888916016, 20.581729888916016, 20.581729888916016, 20.581729888916016, 20.581729888916016, 20.566009521484375, 20.566009521484375, 20.566009521484375, 20.566009521484375, 20.566009521484375, 20.566009521484375, 20.365028381347656 ], "content": [ "I used Maxent species distribution modeling .", "I recently downloaded MaxEnt Model v3.3.3e software from http : www.cs.princeton.edu schapire maxent website .", "I am interested in testing whether species with trait A have wider niche breadths than species with trait B . I have been using Maxent species distribution modeling .", "For my first test I opened the MaxEnt GUI and leaving all settings at default ran the model for my species .", "Using sos : : findFn Maxent species distribution I still find a great many hits .", "The Apache OpenNLP https : opennlp.apache.org library has a maxent https : opennlp.apache.org documentation 1.5.3 apidocs opennlp-maxent index.html package .", "I m an ecologist making species distribution models using the maxent version 3.3.3 http : www.cs.princeton.edu schapire maxent function in R through the dismo package .", "From my current understanding the raw output from MaxEnt is the ratio between the probability-density of covariates where the species is present i.e .", "Recently I have been familiarising myself with the MaxEnt GUI v3.3.3k and have been successful in producing a range of models for species of interest to me .", "After generating 100 bootstrap replicate Maxent species distribution maps for each species I used a function in ENMtools to calculate niche breadth using Levins B giving me 100 estimates of niche breadth for each species .", "Maxent is a general term .", "When running maxent from the maxent.jar file directly the maxent software an html file with statistics will be made including the prediction maps .", "Did you read the help maxent .", "Are you interested in using the pure Maxent classifier from OpenNLP or the higher level API that used maxent", "MaxEnt would not be an exception .", "This works OK in Maxent .", "They will not work in Maxent either .", "I did look at openNLP maxent page but it is not helpful .", "Where does the maxent-function come from", "The projection for MAXENT deviates heavily from the other projections .", "I ve been reading this tutorial http : www.cs.berkeley.edu klein papers maxent-tutorial-slides.pdf on Maximum Entropy models and I fail to understand how to compute practically and also the difference between the predicted and empirical expectation which are obtained when when calculating the gradient of the log likelihood function pages 24-29 .", "Maxent classification may not work in NLTK .", "MaxEnt accuracies http : i.stack.imgur.com 26ZQr.png", "The second printed at the bottom of the screenshot is reported by calling nltk.classify.accuracy maxent test set where the maxent variable has been properly initialized .", "If you just want to use the Maxent API to train the model and then to use it for classification you can use the following approach that worked for me :", "i am trying Maximum Entropy in weka for text classification .", "My first issue with Maxent was that when using myBiomodOptions and myBiomodModelOut from biomod2 package I have to use MAXENT.Tsuruoka if I use Maxent I get an error saying MAXENT model not a available model .", "Have you ticked the option Make pictures of predictions in the main MaxEnt window", "I get 128 hits in 24 packages for a search on maxent .", "I couldn t find the documentation for maxent .", "BTW NLTK uses maxent classifier of scipy .", "Is there other ways to improve accuracy in Maxent model", "http : onlinelibrary.wiley.com doi 10.1111 j.2041-210X.2010.00036.x full using the maxent software through the windows cmd window .", "And then use maxent as the classifier which uses features which includes features based on the sentences words and as well as POS tags", "I am trying to fit some species distribution models using the biomod2 package in R . .. . .. . I have compiled all of the required data such that biomod2 successfully fits models using all techniques except MaxEnt which throws an error : .. . .. . I thought this might be because biomod2 wasn t managing to find MaxEnt or Java but I have the rJava package loaded and have tried running MaxEnt in the dismo package in the same R session and it runs fine .", "I used MaxEnt model for training .", "+1 for entropy .", "In NLTK the MaxEnt classifier reports multiple accuracy metrics as shown in the screenshot below .", "I want to train a MaxEnt classifier over a training corpus .", "Is there any MaxEnt classifier implementation in Java that support defining such features", "I attended a course recently in SDM and I was introduced to Maxent and GAM models .", "And I have successfully produced models using Maxent and GAM .", "I am trying to work with some BioClim data with Maxent in Australia .", "My question is how to perform feature-selection using Maxent classifier", "@Viliam Simko Is the Apache Maxent model already has the feature-selection function", "It cannot on its own predict probability of occurrence as there is no information on species prevalence .", "Assuming that you know a species prevalence with certainty very unlikely", "A single vector for each species is offered but what connection to reality is presumed", "What statistical test can I use for 1 a single pair of species with trait A and trait B and 2 a group of species pairs consisting of species with trait A and trait B .. . .. . Also am I really dealing with pseudoreplicate data", "What I don t understand after that is what goes into the p and a arguments in the maxent formula .", "The maxent function comes from the dismo package and thanks for your tip on overwriting the function .", "If you open maxent.jar and click the help button in the MaxEnt GUI you will get a list of arguments .", "Any help on why I am getting such different projections in MAXENT would be extremely appreciated .", "I am using the stand alone versions of Maxent and ENMTools so I do not have code .", "Nitty-gritty details for those who care : When you call maxent with replicates set to something greater than 1 the maxent function returns a MaxEntReplicates object rather than a normal MaxEnt object .", "1 Have anyone used MaxEnt Logistic.Java in Weka", "Also I ve read that a maxent model can be smoothed .", "I believe understand that a CRF is actually just a sequential form of a Maxent model .", "Please suggest how to use the maxent model on unseen data .", "I am trying to create the java implementation for maxent classifier .", "Here is a fully working minimal example using opennlp-maxent-3.0.3.jar .", "This raster has 5 values and each value correspond to one of the layers rasters used to make the lf map.asc file with the Maxent software and these are the layer raster names that I want to preserve .", "Either the names disappear when I m making the lm map.asc file with the maxent software or they disappear when I m converting the asc-file to tif using R or ArcGis as explained above .", "I want to write my own model using openNLP MaxEnt for that I want to implement ContextGenerator and EventStream interfaces as mentioned in documentation .", "Sorry if this question has come up before but I would like to ask if anyone knows what goes into each of the arguments in maxent from the dismo package", "However when using R I am told 10081 points used to determine the Maxent distribution background points and presence points .", "I attached a picture demonstrating first the Random Forest projection then the Boosted Regression and on the right is the MAXENT projection which appears to not be strict at all with it s predictions .", "In case you didn t realise MaxEnt will also create an .asc file by default which you can load into your GIS Software or R . This is probably the better way to go because you can then fully customise map colours and remove the black background", "Take a look at my minimal working example here : Training models using openNLP maxent http : stackoverflow.com questions 24897358 training-models-using-opennlp-maxent 26757661 26757661", "It seems that MaxEnt in biomod2 will not accept spaces in the file path to the maxent.jar file at least some of the time .", "I am trying to recreate a learning from multiple sources and trying to build a model with maxent in R with my own data .", "I ve been using the maxent classifier in python and its failing and I don t understand why .", "I m reading jurafsky s book for NLP and it mentioned for training MaxEnt we need to regularize weights to prevent overfitting .", "Can anyone explain how overfitting occurs during training maxent if we don t use regularization", "I am running maxent from R in the package biomod2 and the following error appeared .", "For me all other models within biomod2 are working and MaxEnt runs okay from dismo .", "But now when I get to the evaluating section my code works for the GAM model output but not for my Maxent out put .", "Is there an easier way documented to batch-clip files for Maxent and leave them in a format that it can use", "I am trying to prepare the environmental layers constrained in specific Asia area for use in Maxent model .", "I am using maxent classifier http : maxent.sourceforge.net about.html on a dataset with 138 314 rows and 43 attributes .", "This is a minimal working example that demonstrates the usage of OpenNLP Maxent API .", "It includes the following : .. . .. . Training a maxent model from data stored in a file .", "2 Is there any parameter tunning necessary for MaxEnt which i may be ignoring", "I assume this is possible although I don t know how maxent computes it .", "I ve been working on MaxENT implementation of Apache OpenNLP for sentiment analysis .", "So I want to play with the advanced training options for maxEnt .", "I ve been trying to use Stanford NLP classifier for creating a maximum Entropy model which in turn would be used to predict the sentiment of a sentence as input .", "I fit my maxent model with : .. . .. . but I can t project my fit model in the transfer space returning : .. . .. . predictors 1 and 2 are in raster stack file .. . .. . All the directories were correctly choosen and the files is found into the directory .", "Ran the maxent in R in the following way .. . .. . where .. . .. . predictors : stack of environmental variables .. . .. . parg : coordinates of presence localities x and y coordinates in separate columns .. . .. . aarg : coordinates of background points x and y coordinates in separate columns", "I m relatively new to MaxEnt and would like to explain my current understanding of the method below in the hope that someone can either 1 confirm whether my thinking is correct 2 incorrect or 3 somewhere in between .", "In order to circumvent this limitation and provide an occurrence probability MaxEnt has a Default Prevalence setting that transforms the raw output using the prevalence information you provide to calculate probability of occurrence logistic transformation .", "For increased reproducibility I have decided to use the Dismo package and run MaxEnt through R . .. . .. . I have noticed something very strange when comparing the outputs of the two methods however .", "When using the GUI with 81 presence records and 10 000 background points I am told that 10020 points used to determine the Maxent distribution background points and presence points .", "As multilabel MaxEnt can be seen as N independent classifiers you can think about it as a group of models voting for different classes .", "AFAIK you have to completely retrain a MaxEnt model if you want to add new training samples .", "The default input format for opennlp maxent is a textual file where each line represents a single sample .", "So if all my training sequences are always length 1 will I basically just have a Maxent model called a CRF", "I am trying to use stanford maxent classification to classify data using 4 features and the 5th one is class .", "but still i am not geting how to create the training set and how to then use maxent classifier to actually use that training-data .", "I am trying to implement the Maxent Classifier but I am facing problem while using the iis algorithm.The following code works fine for gis algorithm ." ] }
{ "confidence": [ 47.40143585205078, 44.28715133666992, 41.7684326171875, 41.68301773071289, 39.778175354003906, 39.53255844116211, 38.39513397216797, 37.88496017456055, 36.305789947509766, 35.436588287353516, 35.374114990234375, 34.554752349853516, 33.191139221191406, 33.00984191894531, 32.801918029785156, 31.240188598632812, 30.912302017211914, 30.70077133178711, 30.50921630859375, 30.22890853881836 ], "content": [ "Question : null .. . Answer : I am interested in testing whether species with trait A have wider niche breadths than species with trait B . I have been using Maxent species distribution modeling . After generating 100 bootstrap replicate Maxent species distribution maps for each species I used a function in ENMtools to calculate niche breadth using Levins B giving me 100 estimates of niche breadth for each species . What statistical test can I use for 1 a single pair of species with trait A and trait B and 2 a group of species pairs consisting of species with trait A and trait B .. . .. . Also am I really dealing with pseudoreplicate data Any assistance is appreciated . Edit Data is pasted below . I am using the stand alone versions of Maxent and ENMTools so I do not have code . I have used R to try and analyze the data using t-tests and sign tests otherwise there is no code to add . Sample data : Comment : Need more code and datasets for this to be meaningful coding question . It s way too nebulous at the moment . Comment : Thanks . I pasted in some of my data but since the programs I used to generate the data are stand alone there is not any code to add . I am just seeking recommendations for data-analysis . Comment : The program I use to search for function that do new things is sos : : findFn . I get 128 hits in 24 packages for a search on maxent . There is also an R-SIG-epi mailing list . Comment : Maxent is a general term . I used Maxent species distribution modeling . Comment : A single vector for each species is offered but what connection to reality is presumed Are these measurements of some observable quantity at simultaneous sequential times with constant interval You are not doing a good job of explaining your domain in terms that a computer scientist might understand . Using sos : : findFn Maxent species distribution I still find a great many hits .", "Question : I recently downloaded MaxEnt Model v3.3.3e software from http : www.cs.princeton.edu schapire maxent website . I have troubleshot many issues and have success running the program with output files to view . However the output file does not provide me with a picture of the map . I do get the html document with all the statistics and plots and I also get a plots folder but I do not get a picture or map showing the niche model of my species . Would anyone know why this might be happening Would this have to do with what options I check before I run the program Any thoughts or suggestions would be most helpful . Thanks . Jacob .. . Answer : Have you ticked the option Make pictures of predictions in the main MaxEnt window In case you didn t realise MaxEnt will also create an .asc file by default which you can load into your GIS Software or R . This is probably the better way to go because you can then fully customise map colours and remove the black background", "Question : null .. . Answer : I m relatively new to MaxEnt and would like to explain my current understanding of the method below in the hope that someone can either 1 confirm whether my thinking is correct 2 incorrect or 3 somewhere in between . Regardless of the outcome I hope that others may be able to learn something from my ignorance based on any replies that appear below From my current understanding the raw output from MaxEnt is the ratio between the probability-density of covariates where the species is present i.e . f1 z and the probability-density of covariates at background locations i.e . f z . This only allows you to determine the relative suitability of one location over another . It cannot on its own predict probability of occurrence as there is no information on species prevalence . In order to circumvent this limitation and provide an occurrence probability MaxEnt has a Default Prevalence setting that transforms the raw output using the prevalence information you provide to calculate probability of occurrence logistic transformation . This is correct Assuming that you know a species prevalence with certainty very unlikely is MaxEnt s logistic output therefore an accurate probability map and not a relative one Does setting prevalence to 0 in the application s settings effectively create a logistic output that is the same as the raw output as there is no information on prevalence I wouldn t run a model with a logistic output and set prevalence to 0 but I am just trying to understand the model in greater detail . I hope this all makes sense Simon", "Question : null .. . Answer : I ve been reading this tutorial http : www.cs.berkeley.edu klein papers maxent-tutorial-slides.pdf on Maximum Entropy models and I fail to understand how to compute practically and also the difference between the predicted and empirical expectation which are obtained when when calculating the gradient of the log likelihood function pages 24-29 . The main thing I don t understand is how to get the predicted count empirical expectation from the posterior distribution I d be very grateful if someone could maybe point me to some literature where this is explained better . Thank you", "Question : Sorry if this question has come up before but I would like to ask if anyone knows what goes into each of the arguments in maxent from the dismo package I have searched the various R forum sites and the R help page itself but I couldn t understand how to put in my arguments . I have a sample of my data frame for the predictor variables here .. . .. . Each row is either a background or presence point . What I don t understand after that is what goes into the p and a arguments in the maxent formula . Does the p argument contain x and y coordinates and the 3rd column indicating 1 presence and 0 absence Or does column containing the 1s and 0s go into the a argument instead forest cover is a categorical variable . Please do tell me if I should be moving some of the stuff around and if they are in the right data frames . Thanks in advance Comment : Where does the maxent-function come from Did you read the help maxent . And in your last line you overwrite the function . Don t do that . Comment : Hi @Heroka thanks for your reply The maxent function comes from the dismo package and thanks for your tip on overwriting the function . I ve changed the code to not do that but it still doesn t work . Also included the error message too Comment : Did you load the dismo package first with library dismo Comment : @blindJesse yes I did .. . Answer : I don t know if this will help but my code looks like the following . You can set your arguments as below . If you open maxent.jar and click the help button in the MaxEnt GUI you will get a list of arguments . Simply type in the name of the argument and set its value and it should then work . EDIT : I should add that x is my raster stack of covariates in this case BioClim layers and p is simply a list containing xy coordinates in that order for my species .", "Question : I am trying to fit some species distribution models using the biomod2 package in R . .. . .. . I have compiled all of the required data such that biomod2 successfully fits models using all techniques except MaxEnt which throws an error : .. . .. . I thought this might be because biomod2 wasn t managing to find MaxEnt or Java but I have the rJava package loaded and have tried running MaxEnt in the dismo package in the same R session and it runs fine . Does anyone have any idea what might be going on Thanks Andrew .. . Answer : Just to let any users who are interested know I finally solved this . It seems that MaxEnt in biomod2 will not accept spaces in the file path to the maxent.jar file at least some of the time . I moved my files to a different directory without a space and it now runs .", "Question : null .. . Answer : Recently I have been familiarising myself with the MaxEnt GUI v3.3.3k and have been successful in producing a range of models for species of interest to me . For increased reproducibility I have decided to use the Dismo package and run MaxEnt through R . .. . .. . I have noticed something very strange when comparing the outputs of the two methods however . Using exactly the same environmental layers and occurrence records I end up with two wildly different predicted distributions when using anything but the default values . For my first test I opened the MaxEnt GUI and leaving all settings at default ran the model for my species . I then ran the exact same model using the following code within R and when plotted I got identical distributions as expected . However if I change the beta regularization multiplier to anything except default the maps look totally different . For example if I set regularization 0.5 and prevalence 0.80 in the GUI and run the model keeping all other settings exactly as default but do the same in R with the following code then it all goes wonky . Interestingly the AUCs and variable contributions all look nearly identical for the two models . I would have assumed therefore that the maps wouldn t look so wildly different . I have uploaded the maps to the following location so you can see for yourself the discrepancy . Maps discrepancy http : i.stack.imgur.com zrSqJ.png .. . .. . When analysing the two HTML outputs from running the models default and non-default I have only noticed the one difference . When using the GUI with 81 presence records and 10 000 background points I am told that 10020 points used to determine the Maxent distribution background points and presence points . However when using R I am told 10081 points used to determine the Maxent distribution background points and presence points . As I mentioned previously all other settings were kept the same so points haven t been used in cross-validating for example . I was wondering if anyone else had come across this issue before . Am I doing something fundamentally wrong within R for the two distributions to be so different I was under the impression that within R all other settings would remain as default in the GUI unless you specified certain arguments as in the second code example above .", "Question : null .. . Answer : i am trying Maximum Entropy in weka for text classification . I am using Logistic Regression in Weka which is equivalent to Max Entropy . I read that its is computantially expensive . I have current setting of 2G alloted to JVM and i keep word vector dimension to 10 000 to evaluate Max Entropy However it always results in JVM out-of-memory . This makes me think i am making any mistake because 2G heap size is too enough for any classifier isn t it 1 Have anyone used MaxEnt Logistic.Java in Weka Is it supposed to be so slow for text classification 2 Is there any parameter tunning necessary for MaxEnt which i may be ignoring Comment : Are you using Explorer or in code Comment : @NLPer i am using in code and max dimension upto which i was able to get results was 1000 . Any dimension beyond 1000 the JVM eats all heap upto 2GB and ends up in JVM out of heap .. . Comment : Ok how big is your arff and how did you change maxheap I would try changing it in RunWeka.ini and start Explorer from RunWeka.bat . For in code use I would change it in VM arguments from run config in Eclipse . If they don t work you may need more than 2GB. . Comment : @NLPer yes i have tried all options and came to know that its very computation expensive to use Max Entropy because it calculate a matrix of F Square where F is your number of features... . I exclude Max Entropy from my options .. .", "Question : null .. . Answer : I am trying to run an ensemble species distribution however the the results I am getting for MAXENT.Phillips model are not reasonable projections compared to the Random Forest and Boosted Regression models that I am using . The projection for MAXENT deviates heavily from the other projections . I attached a picture demonstrating first the Random Forest projection then the Boosted Regression and on the right is the MAXENT projection which appears to not be strict at all with it s predictions . BIOMOD 2070 Projection of Random Forest Boosted Regression and MAXENT http : i.stack.imgur.com QnBr7.jpg .. . .. . Using the same environmental variables presence and background points I ran a projection in the Dismo package and obtained results more reasonable and in agreement to the Random Forest and Boosted models in BIOMOD2 . This leads me to believe that I have not adjusted a default setting in BIOMOD but I am at a loss for what I need to do . I included my code below . Any help on why I am getting such different projections in MAXENT would be extremely appreciated . For the environmental variables I used the getdata function . And for the projection environmental variables : .. . .. . Beyond that I kept everything relatively similar to the BIOMOD2 vignette . The link-to the csv is here csv link http : 3Ciframe 20src 22https : onedrive.live.com embed cid 55AF345D51A556E7 resid 55AF345D51A556E7 21350 authkey AHuGzvp55uP2DCM 22 20width 2298 22 20height 22120 22 20frameborder 220 22 20scrolling 22no 22 3E 3C iframe 3E : .. . .. . The .jar file is in the working directory and there are no spaces in the working directory .. . .. . Then the projection is :", "Question : Imagine we have three classes : A B and C and we classify a document d using a standard MaxEnt classifier and come up with the following probabilities : .. . .. . I feel like that is very different in a way from this set of probabilities : .. . .. . Is there a way to score the difference between these two .. . Answer : The problem you are facing is often called the consensus among classifiers . As multilabel MaxEnt can be seen as N independent classifiers you can think about it as a group of models voting for different classes . Now there are many measures of calculating such consensus including : .. . .. . naive calculation of the margin - difference between the winning class probability and the second one - bigger the margin - more confident the classification .. . entropy - smaller the entropy of the resulting probability distribution the more confident the decision .. . some further methods involving KL divergence etc . In general you should think about methods od detecting uniformity of the resulting distribution impling less confident decison or spikeness indicating more confident classification . Comment : +1 for entropy . Fun fact : The reason why Max Ent classifiers are called that way is that they try to maximise the entropy of P output input while respecting the training-data . In a way the classifier tries to find the most unbiased probability distribution that is in line with the training-data . Comment : Uniformity is the wrong thing to go for---poor probability models can often provide very spiky posteriors which are entirely incorrect . You need to reference the correct posterior through cross-entropy KL Divergence as you suggest to ensure that your distribution is correct . After all uniform posteriors might actually be accurate.. .", "Question : I hope I have come to the right forum . I m an ecologist making species distribution models using the maxent version 3.3.3 http : www.cs.princeton.edu schapire maxent function in R through the dismo package . I have used the argument replicates 5 which tells maxent to do a 5-fold cross-validation . When running maxent from the maxent.jar file directly the maxent software an html file with statistics will be made including the prediction maps . In R an html file is also made but the prediction maps have to be extracted afterwards using the function predict in the dismo package in r . When I do this I get 5 maps due to the 5-fold cross-validation setting . However and this is the problem I want only one output map one summary prediction map . I assume this is possible although I don t know how maxent computes it . The maxent tutorial see link above says that : .. . .. . ...you may want to avoid eating up disk space by turning off the write output grids option which will suppress writing of output grids for the replicate runs so that you only get the summary statistics grids avg stderr etc . . A list of arguments that can be put into R is found in this forum https : groups.google.com forum topic maxent yRBlvZ1 9rQ . I have tried to use the argument outputgrids FALSE both in the maxent function itself and in the predict function but it doesn t work . I still get 5 maps even though I don t get any errors in R . .. . .. . So my question is : How do I get one summary prediction map instead of the five prediction maps that results from the cross-validation I hope someone can help me with this I am really stuck and haven t found any answers anywhere on the internet . Not even a discussion about this . Hope my question is clear . This is the R-script that I use : .. . .. . model1 -maxent x predvars p presence points a target group absence path home .. . model1 args c replicates 5 outputgrids FALSE .. . .. . model1map -predict model1 predvars filename home .. . model1map.tif outputgrids FALSE .. . .. . Best regards Kristin Comment : For those who want evaluation statistics on Maxent models with multiple types of cross-validation including those that use spatial partitioning of test data check out the ENMeval package in R . The output is a table of stats that you can use to choose an optimal model and averages of AUC and omission rate are calculated automatically over your k folds . It also outputs AIC . .. . Answer : Sorry to be the bearer of bad news but based on the source code https : github.com cran dismo blob master R maxent.predict.R it looks like Dismo s predict function does not have the ability to generate a summary map . Nitty-gritty details for those who care : When you call maxent with replicates set to something greater than 1 the maxent function returns a MaxEntReplicates object rather than a normal MaxEnt object . When predict receives a MaxEntReplicates object it just iterates through all of the models that it contains and calls predict on them individually . So what next Fortunately all is not lost The reason that Dismo doesn t have this functionality is that for most kinds of model-building there isn t actually a valid way to average parameters across your cross-validation models . I don t want to go so far as to say that that s definitely the case for MaxEnt specifically but I suspect it is . As such cross-validation is usually used more as a way of checking that your model building methodology works for your data than as a way of building your model directly see this question http : stats.stackexchange.com questions 11602 training-with-the-full-dataset-after-cross-validation for further discussion of that point . After verifying via cross-validation that models built using a given procedure seem to be accurate for the phenomenon you re modelling it s customary to build a final model using all of your data . In theory this new model should only be better than models trained on a subset of your data . So basically assuming your cross-validated models look reasonable you can run MaxEnt again with only one replicate . Your final result will be a model accuracy estimate based on the cross-validation and a map based on the second run with all of your data lumped together . Depending on what exactly your question is there might be other useful summary statistics from the cross-validation that you want to use but those are all things you ve already seen in the html output . Comment : Thank you this was exactly what I wanted to know :", "Question : I want to write my own model using openNLP MaxEnt for that I want to implement ContextGenerator and EventStream interfaces as mentioned in documentation . I looked at the these implementations for openNLP Chuncker POSTagger and NameFinder but all those implementations used Pair which is deprecated and by just looking at the code I don t understand what their respective ContextGenerators are doing . The model that I will be creating will classify each token as a RoomNumber or not a RoomNumber by looking at POS tags for each token . How should I start coding ContextGenerator and EventStream for this model . I know what a context is and what a feature is but I don t know what a ContextGenerator do and what an EvenStream do . I did look at openNLP maxent page but it is not helpful . Please help me understand this thank you . Comment : Are you interested in using the pure Maxent classifier from OpenNLP or the higher level API that used maxent .. . Answer : The following code might help although it does not use the ContextGenerator explicitly . Actually the BasicContextGenerator is used within the BasicEventStream and it just splits each input string into a list of features . e.g . the String a 1 b 2 c 1 is split into 3 features : a 1 b 2 and c 1 . If you just want to use the Maxent API to train the model and then to use it for classification you can use the following approach that worked for me :", "Question : I want to train a MaxEnt classifier over a training corpus . My features are syntactical and semantical like POS tags or NER tags and so on . Is there any MaxEnt classifier implementation in Java that support defining such features .. . Answer : The Apache OpenNLP https : opennlp.apache.org library has a maxent https : opennlp.apache.org documentation 1.5.3 apidocs opennlp-maxent index.html package . In addition it features a wide range of methods for Named Entity Recognition and Part-of-Speech tagging among other tasks so it will probably satisfy your needs . Comment : thanks very much... .", "Question : Imagine we have three classes : A B and C and we classify a document d using a standard MaxEnt classifier and come up with the following probabilities : .. . .. . I feel like that is very different in a way from this set of probabilities : .. . .. . Is there a way to score the difference between these two .. . Answer : What you re looking for is cross-entropy : specifically you want to calculate the cost of approximating the true distribution with the one output by your classifier . Probabilistic multi-class classifiers will optimise this directly in many cases . Take a look at this http : www.willamette.edu gorr classes cs449 classify.html .", "Question : Sorry if this question has come up before but I would like to ask if anyone knows what goes into each of the arguments in maxent from the dismo package I have searched the various R forum sites and the R help page itself but I couldn t understand how to put in my arguments . I have a sample of my data frame for the predictor variables here .. . .. . Each row is either a background or presence point . What I don t understand after that is what goes into the p and a arguments in the maxent formula . Does the p argument contain x and y coordinates and the 3rd column indicating 1 presence and 0 absence Or does column containing the 1s and 0s go into the a argument instead forest cover is a categorical variable . Please do tell me if I should be moving some of the stuff around and if they are in the right data frames . Thanks in advance Comment : Where does the maxent-function come from Did you read the help maxent . And in your last line you overwrite the function . Don t do that . Comment : Hi @Heroka thanks for your reply The maxent function comes from the dismo package and thanks for your tip on overwriting the function . I ve changed the code to not do that but it still doesn t work . Also included the error message too Comment : Did you load the dismo package first with library dismo Comment : @blindJesse yes I did .. . Answer : Ran the maxent in R in the following way .. . .. . where .. . .. . predictors : stack of environmental variables .. . .. . parg : coordinates of presence localities x and y coordinates in separate columns .. . .. . aarg : coordinates of background points x and y coordinates in separate columns", "Question : Hope someone here can help me with this or know where I can ask . I have made a distribution model using maxent versio 3.3.3 in R dismo package and thereafter made a map of limiting factors as described in the appendix of Elith et . al . http : onlinelibrary.wiley.com doi 10.1111 j.2041-210X.2010.00036.x full using the maxent software through the windows cmd window . The instructions have worked fine and I now have the limiting factors map in a file called lf map.asc ca 10 GB . In order to open the map in ArcGis I have imported the asc-file as a raster into R and saved it as a tif-file using this R-script : .. . .. . lf map - raster home .. . lf map.asc .. . .. . writeRaster lf map home .. . lf map.tif .. . .. . When I open it in ArcGis the different variables factors from the model have the names 0-4 in the map I have 5 variables in the model but now I don t know which variables belong to which number . I have also tried to use the ASCII to Raster Conversion tool in ArcGis but the names still come out as 0 to 4 and not as the names of the variables . Does anyone know how to find out this Best regards .. . .. . Kristin Comment : Check this : stackoverflow.com questions 26763013 http : stackoverflow.com questions 26763013 r-write-rasterstack-and-preserve-layer-names Comment : Thank you for looking into my question . I think this is a bit different though . I have only one lm map.asc file that I want to use in the writeRaster function not a raster stack . This raster has 5 values and each value correspond to one of the layers rasters used to make the lf map.asc file with the Maxent software and these are the layer raster names that I want to preserve . Either the names disappear when I m making the lm map.asc file with the maxent software or they disappear when I m converting the asc-file to tif using R or ArcGis as explained above . Comment : I stumbled over the answer myself : see below .. . Answer : I stumbled over the answer myself : I checked the cmd-window where I had run the script for the Limiting factors.map it was still available since it was in a detached screen and now I saw that when the process was finished the information about which number equaled which variable was printed in the cmd-window . Apparently the variables were sorted alphabetically . 0 Aspect 1 Mean summer temp etc .", "Question : null .. . Answer : In NLTK the MaxEnt classifier reports multiple accuracy metrics as shown in the screenshot below . The first set is the accuracy per iteration . The second printed at the bottom of the screenshot is reported by calling nltk.classify.accuracy maxent test set where the maxent variable has been properly initialized . Which of these accuracies are reportable i.e . in results to show the training model s accuracy What s the difference between them MaxEnt accuracies http : i.stack.imgur.com 26ZQr.png", "Question : Project stack : Java Opennlp Elasticsearch datastore twitter4j to read data from twitter .. . .. . I intend to use maxent classifier to classify tweets . I understand that the initial step is to train the model . From the documentation I found that we have a GISTrainer based train method to train the model . I have managed to put together a simple piece of code which makes use of opennlp s maxent classifier to train the model and predict the outcome . I have used two files postive.txt and negative.txt to train the model .. . .. . Contents of positive.txt .. . .. . Contents of negative.txt .. . .. . And the java methods below generate the outcome . I have the following questions . 1 How do I iteratively train a model Also how do I add new sentences words to the model Is there a specific format for the data file I found that the file needs to have a minimum of two words separated by a tab . Is my understanding valid 2 Are there any publicly available data sets that I can use to train the model I found some sources for movie reviews . The project I m working on involves not just movie reviews but also other things such as product reviews brand sentiments etc . 3 This https : opennlp.apache.org documentation 1.5.3 manual opennlp.html opennlp.ml.maxent helps to an extent . Is there a working example somewhere publicly available I couldn t find the documentation for maxent . Please help me out . I am kind a blocked on this . .. . Answer : AFAIK you have to completely retrain a MaxEnt model if you want to add new training samples . It cannot be done incrementally on-line . The default input format for opennlp maxent is a textual file where each line represents a single sample . A sample is composed of tokens features delimited by whitespace . During training the first token represents the outcome . Take a look at my minimal working example here : Training models using openNLP maxent http : stackoverflow.com questions 24897358 training-models-using-opennlp-maxent 26757661 26757661", "Question : null .. . Answer : I am trying to work with some BioClim data with Maxent in Australia . I have downloaded the Tile 49 current data which is in .bil files . This works OK in Maxent . Now I want to look at some future models but the data is only available for global areas and in the format bc26bi501.tif to bc26bi5019.tif . I am running Qgis on Linux Ubuntu . This does seem to work : .. . .. . However the output files are all the same size whereas the input ones are not . They will not work in Maxent either . Is there an easier way documented to batch-clip files for Maxent and leave them in a format that it can use Steve", "Question : null .. . Answer : I m very new to the concept of modelling . But I m practicing using examples . I attended a course recently in SDM and I was introduced to Maxent and GAM models . I have gone through the steps of cleaning the data adding environmental data etc . And I have successfully produced models using Maxent and GAM . But now when I get to the evaluating section my code works for the GAM model output but not for my Maxent out put . My first issue with Maxent was that when using myBiomodOptions and myBiomodModelOut from biomod2 package I have to use MAXENT.Tsuruoka if I use Maxent I get an error saying MAXENT model not a available model . Now after producing my models : a GAM and a Maxent I want to evaluate them using the following code p and a defined as my presence and background points : .. . .. . Get AUC values from evals : .. . .. . .. . .. . This code works fine for the GAM model but when I run it for the Maxent one it gives me the following error : .. . .. . Error in abs x : non-numeric argument to mathematical function .. . .. . I suspect it has something to do with the evaluate function . I m currently working through the Phillips tutorial to find another method to calculate the AUC . Please advice if you have used Maxent.Tsuruoka model output . Or whether there is another option to evaluate your model output different from the Phillips method . Thanks I hope my I m making some sense.. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
modeling
UNK_RELATION
lfe@lisp@47
lfe -- lfe stands for lisp flavoured erlang a @placeholder syntax front-end to the erlang compiler .
{ "confidence": [ 74.47280883789062, 72.0040283203125, 62.76749038696289, 58.86369323730469, 57.35295867919922, 56.41684341430664, 56.002620697021484, 55.40730285644531, 54.81945037841797, 53.941505432128906, 53.90653610229492, 53.538570404052734, 51.16011047363281, 51.088134765625, 49.48460388183594, 49.21940231323242, 48.22608947753906, 48.22608947753906, 47.950321197509766, 46.9904670715332, 46.9774284362793, 44.87895965576172, 44.87895965576172, 44.83089828491211, 43.753849029541016, 43.753849029541016, 43.753849029541016, 42.61119842529297, 42.61119842529297, 42.34123992919922, 42.34123992919922, 42.34123992919922, 42.34123992919922, 42.34123992919922, 40.854515075683594, 40.772491455078125, 40.74246597290039, 40.74246597290039, 40.74246597290039, 39.28219985961914, 39.13054656982422, 39.13054656982422, 39.13054656982422, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.715606689453125, 36.14222717285156, 36.14222717285156, 36.14222717285156, 36.14222717285156, 35.21247100830078, 34.421348571777344, 34.35945129394531, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 33.657073974609375, 32.69750213623047, 32.69750213623047, 31.43967056274414, 31.43967056274414, 31.43967056274414, 31.43967056274414, 30.36245346069336, 30.36245346069336, 30.36245346069336, 30.236997604370117, 29.085893630981445, 28.26568603515625, 28.26568603515625, 28.26568603515625, 28.26568603515625, 27.756393432617188, 27.57864761352539, 27.217159271240234, 27.217159271240234, 27.217159271240234, 23.13611602783203, 20.795291900634766, 19.46869659423828, 17.503402709960938, 17.503402709960938, 16.634855270385742, 14.13998794555664, 14.13998794555664 ], "content": [ "Does Lisp Flavored Erlang LFE work on Windows", "Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE .", "As with erlang any text-editor will work to edit LFE .", "The problem here is that Erlang can t find the LFE ebin directory .", "Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter .", "I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem .", "@Inaimathi OK there is a Google group groups.google.com group lisp-flavoured-erlang http : groups.google.com group lisp-flavoured-erlang with some traffic not much .", "Also while it is nice to use it you don t need to use the LFE shell to run LFE you can use the normal Erlang shell and just call the LFE functions in the normal way .", "LFE is great as Lisp environment that targets Erlang VM but I think that exposing itself using CaaS compiler as as service pattern is a very cool thing .", "Put the whole LFE directory there .. . .. . When you start erlang you will then see Users rv erlang lib lfe ebin or wherever you have it in the code path code : get path .", "It is an LFE shell script which parses it arguments and run the LFE compiler .", "To compile an LFE file from the normal erlang-shell do .. . .. . while from the LFE shell do : .. . .. . There is a bunch of documentation in lfe docs which is quite accurate but the user guide.txt needs to be extended .", "LFE equivalent", "I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit .", "My common-lisp example looks as follows : .. . .. . What is the LFE equivalent", "When erlang starts the code server will automatically add the lfe ebin directories into the path and the .beam files there will automagically be found and loaded .", "LFE is not supported by OTP so erlc does not know about .lfe files .", "A simple way is use to the lfe command to run LFE scripts .", "If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want .", "Try starting Erlang in the normal way with werl.exe -pa ebin to get the right load path and manually starting the LFE shell with lfe shell : server . .. . .. . Try starting Erlang with werl.exe -pa ebin -noshell -s lfe shell start .", "If you create an extra Erlang library directory say c : projects erlang drop Erlang apps which follow the Erlang application directory structure as LFE does and point ERL LIBS at it then the code server will automatically add ebin directories it finds there to its code path .", "Then just drop the whole LFE directory there .", "Fixed - I meant the lfe package", "@gsscoder Yes it is a stand-alone LFE compiler which compiles a .lfe file into a .beam file in the same way that erlc compiles .erl file into .beam files .", "I m not an LFE user but there is a user guide http : github.com rvirding lfe blob master doc user 5Fguide.txt in the source tree .", "You will then also be able to start the LFE shell directly with .. . .. . There will be an lfe and an lfe.bat which does this included as well in the future .", "Is there a similar solution in the lfe package for panel objects so that I can take advantage of the speediness that lfe provides", "Two ways to solve this problem are : .. . .. . Use an explicit -pa lfe ebin dir argument when starting LFE either in the lfe.bat script or when you call it .", "Very simple really : just use MSYS2 and Mingw-w64 to build LFE then run it from the build directory via . bin lfe .", "You cannot yet run LFE in a window .", "Just as a matter of interest what are using LFE for", "I m mostly using LFE for fun at the moment .", "The current version of lfe 2.3 handles this i.e .", "Following image shows that LFE truncates displayed results .", "I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application .", "This is also described in How do I install LFE on Ubuntu Karmic", "There is also a Google group for LFE at .. . .. . which contains some interesting discussions and people have written quite a lot in the github LFE wiki .", "In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter", "To see it printed in LFE format you can use .. . .. . or much easier in the LFE repl : .. . .. . There is also a p .. . call which writes it out without prettyprinting .", "Something I do in this case is often to use io : format : .. . .. . I guess it s the same with LFE but with slightly different syntax .", "I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code .", "I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation .", "Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration", "I ve read through all the documentation and most of the source of LFE .", "Does anyone know how LFE handles messaging primitives", "There is a serious lack of examples in the LFE release all contributions are welcome .", "The LFE let is a real let in which the variable bindings are visible first in the body .", "For emacs there is an LFE mode which is still rather basic but works .", "As the author of the lfe-package I can shed some light on this .", "The lfe-package is intended for very large datasets in the gigabyte-class .", "I d invoke it from a Makefile with . lfec -o ebin src lfe .", "It would be great to have this explained in LFE docs or also in a blog post .", "The lfe behaves in similar fashion to bash in that you can use it to run scripts .", "Erlang was already installed : .. . .. . Erlang seems to work : .. . .. . I downloaded lfe from github and checked out 0.5.2 : .. . .. . Must be something stupid i missed : o .. . .. . Is there an example how I would create a hello world source file and compile and run it", "I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this :", "http : stackoverflow.com questions 2835942 how-do-i-install-lfe-on-ubuntu-karmic but in a UNIX context .", "There s one tweak needed it seems : the last line of bin lfe seems to require a tweak to call werl instead of erl .", "I don t seem to be able to find how I can make push or reverse work in LFE .", "I did as suggested and got this : C : temp lfe erl -pa ebin -noshell -noinput -s lfe boot start ERROR REPORT 18-Jan-2011 : : 00 : 22 : 52 Error in process 0.28.0 with exit value : badarg erlang register user 0.29.0 user start port 1", "Erlang ecosystem is truly mature and powerful .", "My small experience is that the syntactic mapping between lisp and erlang disappears very quickly from view which means that a coder will read erlang source and mentally translate it by substituting parentheses for commas etc .", "One suggestion is to automatically map - in LFE symbols to in the resultant atoms and back again going the other way of course .", "The Makefile in LFE is less than perfect and should be ignored it will be improved upon in the next release .", "The best way to include this is to put the following in your .emacs file : .. . .. . There are some example files in lfe examples all should work .", "In lfe test visual there is a bunch of my test files which have been included as example files .", "Is there a standard way of compiling .lfe source files from a make rule in an OTP project", "Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc .", "Now I just need to work out which options are useful in an LFE context .", "The next release of lfe in a month or so will support this directly with pseries provided plm is loaded .", "The cool thing I want to point out is that this can be done in LFE itself or from Elixir", "enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE", "No I have so far kept all the Erlang core function names just as they are in vanilla erlang .", "Make an libs directory say erlang lib .. . 2 .", "Certainly nothing I couldn t do with vanilla Erlang .", "When I run a cluster standard-error panel specification with plm and lfe I get results that differ at the second significant figure .", "From reading it I would guess it is something like this : .. . .. . But I m very likely to have made a mistake since I haven t even evaluated it in LFE .", "An early version of lfe actually had lm as an inherited class for felm but since this creates the impression that it actually is an lm-object I removed it .", "Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching .", "Set the environment variable ERL LIBS export ERL LIBS erlang lib .. . 3 .", "I understand that I can set a seq trace in erlang to the current process that is executing .", "Let s use our Erlang shell to set this all up .", "I ve also documented this with slightly more detail on my personal blog : http : www.vultaire.net blog 2016 05 02 installing-lisp-flavored-erlang-on-windows .. . .. . Hope this helps someone out", "Honestly I don t know why this is I m too green behind the ears with Erlang to say why .", "I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm .", "This might not be the answer that you are looking for but it seems that the author did not add any functionality to the lfe package in order to make predictions on external data by using the fitted felm model .", "The lfe package is intended to be run on very large datasets and effort was made to conserve memory : As a direct result-of this the felm object does not use contain a qr decomposition as opposed to the lm object .", "Before getting this reply I was reasoning about the two scripting patterns you quoted ending that probably the best solution could be return a data structure from LFE like a tuple .", "Y b0 + b1 X1 + b2 X2 + b3 Q + b4 W + C1 factor id + C2 factor firm .. . .. . W d0 + d1 X3 .. . .. . Q e0 + e1 X4 .. . .. . Here is the part where I use generated data for Y X Q W .. . .. . I can estimate the coefficients using the old lfe syntax .. . .. . But the package strongly discourages the use of old syntax and I do not know how to specify different first stage equations in the new syntax .", "All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros .", "The easiest way to handle this to create a private erlang library directory and point the environment variable ERL LIBS to it .", "Erlang tools work for elixir as well so anyone using them in elixir could answer this question .", "Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps .", "To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 .", "For more information see the seq trace http : www.erlang.org doc man seq trace.html and dbg http : www.erlang.org doc man dbg.html man pages and also read the match specification chapter of the Erlang Run-Time System Application ERTS User s Guide http : www.erlang.org doc apps erts match spec.html .", "It just looks interesting and I m partial to Lisp so I m playing with writing some simple components in it to get comfortable .", "Imagine all the time that has been spent informing users of Common Lisp that atom names are not case insensitive but that the reader is just uppercasing atoms before interning them .", "If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp .", "I think another step of rewriting identifiers would trip me up almost every time as I would only be looking to rewrite syntax .", "Simple but hard wired .", "Use the ERL LIBS environment variable ." ] }
{ "confidence": [ 105.39503479003906, 94.1058578491211, 92.68982696533203, 87.36490631103516, 86.86036682128906, 85.93102264404297, 83.33541107177734, 81.206787109375, 65.18366241455078, 57.49336242675781, 54.75859451293945, 50.648277282714844, 50.648277282714844, 47.502044677734375, 46.20224380493164, 44.4785270690918, 38.585933685302734, 35.495338439941406, 31.366365432739258, 31.366365432739258 ], "content": [ "Question : I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application . If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp . I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code . I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation . Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter . The latter is the one I m trying to use . If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want . I d like rather to bind a variable and read its value that s my issue : .. . .. . Why set is recognized as an unbound function In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter If this is explained somewhere please provide the reference . Comment : The reason is that set is a shell command it doesn t exist outside the shell . Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching . Can you give a better example of how you would like to use it Comment : +1 Thanks for clarification . I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem . Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps . Suppose my app is a server and I want the connection timeout to be handled externally in my config.lfe what s the best way to follow Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration Comment : Since this question is quoted in a LFE google group post I think it could be useful for those who are interested in these arguments link back to the group thread from here . Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE . .. . Answer : A simple way is use to the lfe command to run LFE scripts . The lfe behaves in similar fashion to bash in that you can use it to run scripts . The lfec script defined in bin lfec is a good example of this . It is an LFE shell script which parses it arguments and run the LFE compiler . Comment : 1+ Yes bin lfec is an interesting example of using lfe comp : file 2 that if I m not wrong compiles the script behind scenes . LFE is great as Lisp environment that targets Erlang VM but I think that exposing itself using CaaS compiler as as service pattern is a very cool thing . Comment : @gsscoder almost lfe comp : file 2 compiles the file which is the argument to lfec the script itself is interpreted . Comment : @rivirding You mean compiled as it s turned into bytecode for BEAM Comment : @gsscoder Yes it is a stand-alone LFE compiler which compiles a .lfe file into a .beam file in the same way that erlc compiles .erl file into .beam files .", "Question : I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application . If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp . I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code . I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation . Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter . The latter is the one I m trying to use . If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want . I d like rather to bind a variable and read its value that s my issue : .. . .. . Why set is recognized as an unbound function In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter If this is explained somewhere please provide the reference . Comment : The reason is that set is a shell command it doesn t exist outside the shell . Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching . Can you give a better example of how you would like to use it Comment : +1 Thanks for clarification . I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem . Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps . Suppose my app is a server and I want the connection timeout to be handled externally in my config.lfe what s the best way to follow Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration Comment : Since this question is quoted in a LFE google group post I think it could be useful for those who are interested in these arguments link back to the group thread from here . Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE . .. . Answer : I won t attempt to answer completely your broader question about the best practices of adding scripting . It seems to me that choosing between hook-based solution in which you define hook implementations by name convention and they are automatically recognized and explicit api solution in which you use functions predefinied in the scripting enviroment to register your hooks or otherwise call configuration functions is largely a matter of taste . Explicit calls like set-connection-timeout-handler .. . may be more readable easier to debug no misspelling problems no surprises on api changes easier to document and a bit more flexible but more well explicit . Building from your simple variable definition example here are a few ways you could get started going further the interpreted path : Comment : +1 This answers my question and puts me in the right path . Before getting this reply I was reasoning about the two scripting patterns you quoted ending that probably the best solution could be return a data structure from LFE like a tuple . You explain this and a lot more.. . The reply really helped me . It would be great to have this explained in LFE docs or also in a blog post . The cool thing I want to point out is that this can be done in LFE itself or from Elixir Erlang ecosystem is truly mature and powerful . Comment : Your reply the others and discussions on google group gave born to this : github.com gsscoder cup https : github.com gsscoder cup", "Question : Is there a standard way of compiling .lfe source files from a make rule in an OTP project According to the docs I m supposed to use lfe comp : file 1 which doesn t help much if I want to compile multiple such files in an OTP application where I m supposed to keep the source files in src but the binaries in ebin . Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc . The best solution I can think of off the top of my head is .. . .. . but that seems inelegant . Any better ideas .. . Answer : Not really . LFE is not supported by OTP so erlc does not know about .lfe files . And as far as I know there is no way to open up erlc and dynamically add information how to process files . An alternative would be to write an lfec script for this . I will think about it . Just as a matter of interest what are using LFE for Comment : I ve posted a first stab at it . I m mostly using LFE for fun at the moment . Certainly nothing I couldn t do with vanilla Erlang . It just looks interesting and I m partial to Lisp so I m playing with writing some simple components in it to get comfortable . Comment : @Inaimathi OK there is a Google group groups.google.com group lisp-flavoured-erlang http : groups.google.com group lisp-flavoured-erlang with some traffic not much . The develop branch on github has some new stuff which hasn t made it to the master branch yet .", "Question : Does Lisp Flavored Erlang LFE work on Windows I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit . I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this : .. . Answer : My apologies I know this post is basically dead but I don t find other posts on the topic thus replying here seems appropriate . I believe I ve found a methodology that works . Very simple really : just use MSYS2 and Mingw-w64 to build LFE then run it from the build directory via . bin lfe . There s one tweak needed it seems : the last line of bin lfe seems to require a tweak to call werl instead of erl . Honestly I don t know why this is I m too green behind the ears with Erlang to say why . I ve also documented this with slightly more detail on my personal blog : http : www.vultaire.net blog 2016 05 02 installing-lisp-flavored-erlang-on-windows .. . .. . Hope this helps someone out", "Question : Does Lisp Flavored Erlang LFE work on Windows I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit . I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this : .. . Answer : The problem here is that Erlang can t find the LFE ebin directory . Two ways to solve this problem are : .. . .. . Use an explicit -pa lfe ebin dir argument when starting LFE either in the lfe.bat script or when you call it . Simple but hard wired . Use the ERL LIBS environment variable . This is described in the code module documentation http : erlang.org doc man code.html . If you create an extra Erlang library directory say c : projects erlang drop Erlang apps which follow the Erlang application directory structure as LFE does and point ERL LIBS at it then the code server will automatically add ebin directories it finds there to its code path . This is also described in How do I install LFE on Ubuntu Karmic http : stackoverflow.com questions 2835942 how-do-i-install-lfe-on-ubuntu-karmic but in a UNIX context . The ERL LIBS feature should definitely be better advertised . EDIT : Replying to @Shantanu Kumar s comment . I don t have access to a Windows machine so I can t test it properly . The problem seems to be that using lfe boot tries to start the port program ttysl which doesn t seem to work on Windows at least not when running erl.exe . Some solutions to try : .. . .. . Use werl.exe instead . This may work but I would do it anyway . Try starting Erlang in the normal way with werl.exe -pa ebin to get the right load path and manually starting the LFE shell with lfe shell : server . .. . .. . Try starting Erlang with werl.exe -pa ebin -noshell -s lfe shell start . This will run lfe shell as the shell but the G won t be available . Also while it is nice to use it you don t need to use the LFE shell to run LFE you can use the normal Erlang shell and just call the LFE functions in the normal way . You might become a little schizophrenic with two io formats but there are no problems . : - .. . .. . Hope this helps . Comment : I did as suggested and got this : C : temp lfe erl -pa ebin -noshell -noinput -s lfe boot start ERROR REPORT 18-Jan-2011 : : 00 : 22 : 52 Error in process 0.28.0 with exit value : badarg erlang register user 0.29.0 user start port 1 Comment : The second option werl.exe -pa bin followed by lfe shell : server . works . It also works with plain erl.exe however when I specify -noinput or -noshell or -s lfe shell start with werl.exe or erl.exe it starts causing error .", "Question : I ve read through all the documentation and most of the source of LFE . All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros . Does anyone know how LFE handles messaging primitives To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 . .. . Answer : There is a serious lack of examples in the LFE release all contributions are welcome . Christian s suggestion is correct . My only comment is that there is no need to have capitalized variable names it is not wrong but not necessary . The LFE let is a real let in which the variable bindings are visible first in the body . You can use patterns in let . There is also a let form macro actually which binds sequentially . No I have so far kept all the Erlang core function names just as they are in vanilla erlang . It is definitely more lispy to use - instead of in names but what do you do with all the other function names and atoms in OTP One suggestion is to automatically map - in LFE symbols to in the resultant atoms and back again going the other way of course . This would probably work but would it lead to confusion I could then have a behaviour module looking like : .. . .. . But I am very ambivalent about it . Comment : It would probably lead to confusion . Imagine all the time that has been spent informing users of Common Lisp that atom names are not case insensitive but that the reader is just uppercasing atoms before interning them . Comment : My small experience is that the syntactic mapping between lisp and erlang disappears very quickly from view which means that a coder will read erlang source and mentally translate it by substituting parentheses for commas etc . I think another step of rewriting identifiers would trip me up almost every time as I would only be looking to rewrite syntax . I vote against the substitution .", "Question : I ve read through all the documentation and most of the source of LFE . All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros . Does anyone know how LFE handles messaging primitives To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 . .. . Answer : I m not an LFE user but there is a user guide http : github.com rvirding lfe blob master doc user 5Fguide.txt in the source tree . From reading it I would guess it is something like this : .. . .. . But I m very likely to have made a mistake since I haven t even evaluated it in LFE . Some questions of mine : .. . .. . Is there a LET form or is it behaving like one already Are guards called the more lispy is-integer and not is integer as I wrote", "Question : Erlang was already installed : .. . .. . Erlang seems to work : .. . .. . I downloaded lfe from github and checked out 0.5.2 : .. . .. . Must be something stupid i missed : o .. . .. . Is there an example how I would create a hello world source file and compile and run it .. . Answer : No there is nothing you missed . The Makefile in LFE is less than perfect and should be ignored it will be improved upon in the next release . To compensate all the needed files have already compiled and the .beam files are in the ebin directory . As it is not part of OTP I don t think it should ever install there . The easiest way to handle this to create a private erlang library directory and point the environment variable ERL LIBS to it . Then just drop the whole LFE directory there . When erlang starts the code server will automatically add the lfe ebin directories into the path and the .beam files there will automagically be found and loaded . This will work with any package that contains an ebin directory . This also works on Windows . So : .. . .. . 1 . Make an libs directory say erlang lib .. . 2 . Set the environment variable ERL LIBS export ERL LIBS erlang lib .. . 3 . Put the whole LFE directory there .. . .. . When you start erlang you will then see Users rv erlang lib lfe ebin or wherever you have it in the code path code : get path . You will then also be able to start the LFE shell directly with .. . .. . There will be an lfe and an lfe.bat which does this included as well in the future . As with erlang any text-editor will work to edit LFE . For emacs there is an LFE mode which is still rather basic but works . You cannot yet run LFE in a window . Soon . The best way to include this is to put the following in your .emacs file : .. . .. . There are some example files in lfe examples all should work . In lfe test visual there is a bunch of my test files which have been included as example files . To compile an LFE file from the normal erlang-shell do .. . .. . while from the LFE shell do : .. . .. . There is a bunch of documentation in lfe docs which is quite accurate but the user guide.txt needs to be extended . There is also a Google group for LFE at .. . .. . which contains some interesting discussions and people have written quite a lot in the github LFE wiki . That s about it I think . contact me if when you have more questions . Comment : Thanks a lot for guiding me . - karlthorwald - aka", "Question : null .. . Answer : I m trying to write simple loop collecting values function . My common-lisp example looks as follows : .. . .. . What is the LFE equivalent I don t seem to be able to find how I can make push or reverse work in LFE . LFE equivalent", "Question : Following image shows that LFE truncates displayed results . Compared to SBCL REPL I can see less than half of result data . enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE .. . Answer : Something I do in this case is often to use io : format : .. . .. . I guess it s the same with LFE but with slightly different syntax .", "Question : Following image shows that LFE truncates displayed results . Compared to SBCL REPL I can see less than half of result data . enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE .. . Answer : To see it printed in LFE format you can use .. . .. . or much easier in the LFE repl : .. . .. . There is also a p .. . call which writes it out without prettyprinting . Comment : thank you very much", "Question : Is there a standard way of compiling .lfe source files from a make rule in an OTP project According to the docs I m supposed to use lfe comp : file 1 which doesn t help much if I want to compile multiple such files in an OTP application where I m supposed to keep the source files in src but the binaries in ebin . Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc . The best solution I can think of off the top of my head is .. . .. . but that seems inelegant . Any better ideas .. . Answer : On suggestion from rvirding here s a first stab at lfec that does what I want above and pretty much nothing else . I d invoke it from a Makefile with . lfec -o ebin src lfe . Comment : I may borrow this . : - Comment : @rvirding - feel free to that s what it s here for . Comment : I HAVE borrowed it and added a simple lfec to the development branch . As Joe once Robert is incapable of making small changes to anything which is true so I rewrote it . Now I just need to work out which options are useful in an LFE context .", "Question : I am trying to estimate a large dynamic fixed effects panel-data model with lags and multiple group effects . I know about the pseries object from the plm package which can handle panel regression with lags . Is there a similar solution in the lfe package for panel objects so that I can take advantage of the speediness that lfe provides .. . Answer : There is no direct way to do lags in felm as of now but it is possible to do it as follows : .. . .. . The reason the lag does not work straight away with felm is that it will use the default lag function not the pseries lag . When specifying it as above the pseries lag is used . Another way to make it work is : .. . .. . I.e . include an explicit as.data.frame this will convert Em to a data.frame with appropriate attributes . This will incur a copy of the entire dataset but is no different from what plm does behind the scene . Comment : The next release of lfe in a month or so will support this directly with pseries provided plm is loaded . It turned out to be a very simple fix . At a single point when I create the model frame I have replaced an as.formula with an as.Formula . The class of wage is then preserved and the right lag will be used . Comment : The current version of lfe 2.3 handles this i.e . felm emp output+capital + lag wage 1 firm data Em will use the pseries lag .", "Question : I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm . I get the output with no problems but now I d like to use it in a LaTeX table . However none of the packages I tried like xtable apsrtable the latex command in Hmisc and so on have methods for objects of class felm . So my question is what do I do Is there a way to access the lm.method and twist it so it can read felm objects Is there a way to coerce felm objects into lm form Any ideas .. . Answer : As the author of the lfe-package I can shed some light on this . It is true that the felm-object mimics the lm-object but with some differences . It does not contain a copy of the data-matrix . The lfe-package is intended for very large datasets in the gigabyte-class . Thus some effort has been made to conserve memory . Another difference is that the felm-object does not contain information about the rank of the system in the same manner as lm nor the qr-decomposition used by lm . felm does not use a qr-decomposition and the rank can be a somewhat complicated matter . The upshot of this is that some standard methods will work on felm-objects whereas others will not . An early version of lfe actually had lm as an inherited class for felm but since this creates the impression that it actually is an lm-object I removed it .", "Question : null .. . Answer : I want to estimate a regression with two exogenous variables two endogenous variable and a pair of fixed effects . Each endogenous variable has its own instrument . Y b0 + b1 X1 + b2 X2 + b3 Q + b4 W + C1 factor id + C2 factor firm .. . .. . W d0 + d1 X3 .. . .. . Q e0 + e1 X4 .. . .. . Here is the part where I use generated data for Y X Q W .. . .. . I can estimate the coefficients using the old lfe syntax .. . .. . But the package strongly discourages the use of old syntax and I do not know how to specify different first stage equations in the new syntax . If I try this line both x3 and x4 would be used for both Q and W first stage equations .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : This might not be the answer that you are looking for but it seems that the author did not add any functionality to the lfe package in order to make predictions on external data by using the fitted felm model . The primary focus seems to be on the analysis of the group fixed effects . However it s interesting to note that in the documentation of the package the following is mentioned : .. . .. . The object has some resemblance to an lm object and some postprocessing methods designed for lm may happen to work . It may however be necessary to coerce the object to succeed with this . Hence it might be possible to coerce the felm object to an lm object in order to obtain some additional lm functionality if all the required info is present in the object to perform the necessary computations . The lfe package is intended to be run on very large datasets and effort was made to conserve memory : As a direct result-of this the felm object does not use contain a qr decomposition as opposed to the lm object . Unfortunately the lm predict procedure relies on this information in order to compute the predictions . Hence coercing the felm object and executing the predict method will fail : .. . .. . If you really must use this package to perform the predictions then you could maybe write your own simplified version of this functionality by using the information that you have available in the felm object . For example the OLS regression co fficients are available via model2 coefficients . Comment : Helpful comments . Thank you .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : This should work for cases where you wish to ignore the group effects in the prediction are predicting for new X s and and only want confidence intervals . It first looks for a clustervcv attribute then robustvcv then vcv .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : As a workaround you could combine felm getfe and demeanlist as follows : .. . .. . The idea is that you use demeanlist to center the variables then lm to estimate the coefficient on Sepal.Width using the centered variables giving you an lm object over which you can run predict . Then run felm + getfe to get the conditional mean for the fixed effect and add that to the output of predict .", "Question : When I run a cluster standard-error panel specification with plm and lfe I get results that differ at the second significant figure . Does anyone know why they differ in their calculation of the SE s .. . Answer : The difference is in the degrees-of-freedom adjustment . This is the usual first guess when looking for differences in supposedly similar standard errors see e.g . Different Robust Standard Errors of Logit Regression in Stata and R http : stackoverflow.com questions 27367974 . Here the problem can be illustrated when comparing the results from 1 plm + vcovHC 2 felm 3 lm + cluster.vcov from package multiwayvcov . First I refit all models : .. . .. . All lead to the same coefficient estimates . For m3 the fixed effects are explicitly reported while they are not for m1 and m2 . Hence for m3 only the last coefficient is extracted with tail .. . 1 . The non-robust standard errors also agree . And when comparing the clustered standard errors we can now show that felm uses the degrees-of-freedom correction while plm does not : Comment : Examining multiwayvcov : : cluster.vcov it is easy to see the algebra used to obtain the Stata small-sample degrees-of-freedom correction namely : df M df M - 1 df N - 1 df N - df K . But what would be the equivalent df correction as used is sandwich .. . adjust TRUE In this answer http : stackoverflow.com questions 27367974 you explain that the difference between the two is that for Stata the division is by 1 n - 1 and for sandwich it is by 1 n - k . Yet I m unsure how this translates into appropriate algebra.. . Do I replace df N - 1 by df N - df K above Comment : I think so but haven t checked the code in detail . Also note that currently sandwich itself does not offer clustered standard errors at the moment . All theoretical details behind the sandwich package are also documented in the two vignettes .", "Question : I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm . I get the output with no problems but now I d like to use it in a LaTeX table . However none of the packages I tried like xtable apsrtable the latex command in Hmisc and so on have methods for objects of class felm . So my question is what do I do Is there a way to access the lm.method and twist it so it can read felm objects Is there a way to coerce felm objects into lm form Any ideas .. . Answer : It is possible that doing some transplant surgery on the felm-object will succeed . Determining whether creation of such a chimera is not doing violence to important underlying assumptions is your responsibility : .. . .. . Before doing that class engraftment I did look at the felm-object to see if it resembled an lm-object and it did . It also appears that summary est returns the output that would be expected by a user of lm . This does not actually do what you asked . The only thing it does is allow lm-targetted functions to attempt to do their work . I m not a particularly successful user of S4 methods but following a couple of links in the help page and making mods this is what I got after ignoring the warning : Comment : This is great Any clues as to why it doesn t work with any of the other packages Comment : I m asking this because I really need to use the apsrtable package or something like it that will allow many regressions on the same table" ] }
[ "yes-answer-long", "yes-answer-short" ]
lisp
UNK_RELATION
printdialog@user@163
printdialog -- in wpf printdialog is a class that invokes a standard microsoft windows print dialog box that configures a printticket and printqueue according to @placeholder input and then prints a document .
{ "confidence": [ 48.335289001464844, 47.435646057128906, 46.848777770996094, 46.72631072998047, 46.47684860229492, 46.10894012451172, 45.747344970703125, 45.45315933227539, 45.25437545776367, 44.56053161621094, 44.399803161621094, 44.399803161621094, 44.052520751953125, 42.951087951660156, 42.951087951660156, 42.9398078918457, 42.73952865600586, 42.683353424072266, 42.23673629760742, 42.23673629760742, 42.13954544067383, 41.740699768066406, 41.17723083496094, 41.13529968261719, 40.66345977783203, 40.656864166259766, 40.651573181152344, 40.63715744018555, 40.326171875, 39.92205047607422, 39.798118591308594, 39.798118591308594, 39.798118591308594, 39.62278747558594, 39.12056350708008, 39.12056350708008, 38.86466979980469, 38.696685791015625, 38.65718460083008, 38.40851593017578, 38.17673110961914, 38.1333122253418, 37.85663604736328, 37.683162689208984, 37.683162689208984, 36.996910095214844, 36.8729133605957, 36.71796417236328, 36.494873046875, 36.494873046875, 36.494873046875, 36.494873046875, 36.05655288696289, 35.60729217529297, 35.39344024658203, 35.39344024658203, 34.99323272705078, 34.07333755493164, 32.0454216003418, 32.0454216003418, 32.0454216003418, 32.0454216003418, 32.0454216003418, 32.0454216003418, 31.489219665527344, 31.395240783691406, 30.943986892700195, 30.943986892700195, 30.943986892700195, 30.736621856689453, 30.238840103149414, 29.800304412841797, 29.76732635498047, 29.726787567138672, 29.623886108398438, 29.39543914794922, 29.322261810302734, 29.03457260131836, 28.921083450317383, 28.53154754638672, 28.471939086914062, 28.264041900634766, 28.11349868774414, 27.802513122558594, 27.76854133605957, 27.5704345703125, 26.613037109375, 26.60417938232422, 26.27222442626953, 26.103713989257812, 25.9111270904541, 25.83721160888672, 25.68822479248047, 25.631492614746094, 25.5822811126709, 25.326400756835938, 24.516101837158203, 24.418487548828125, 24.060163497924805, 23.994182586669922 ], "content": [ "I see it is the PrintDialog class .", "Notepad print dialog http : i.stack.imgur.com C6ibs.gif .. . .. . Any idea how I can get a Print Dialog like the notepad s PrintDialog", "How can I print a pdf showing the printDialog", "I was trying to take print of a WPF view in that I was using PrintVisual from PrintDialog class .", "Was the PrintDialog shown", "I open a PrintDialog box then set print info on that using this .. . .. . Now I want to save infomation of the printDialog when I click Apply button .", "To print the content of a webpage you use the BROWSER s printdialog .", "You need to show the PrintDialog and call the PrintVisual mehod of the PrintDialog .", "PrintDialog on a custom control in ASP.net because I want to show the print dialog and assign its PrinterSettings to ReportPrintDocument.PrinterSettings after I click Ok button on the dialog .", "I have a WPF UserControl which use the System.Windows.Controls.PrintDialog : .. . .. . XAML : .. . .. . CodeBehind : .. . .. . If I use now this UserControl in a WPF Appplication the PrintDialog-Windows appears as modal-dialog .", "I m trying to print my own XPS file to the printer with PrintDialog .", "How shall I set up the printdialog to get the correct print result", "PrintDialog is very platform specific .", "Because the PrintDialog is for forms applications .", "by the way there is no AutoUpgradeEnabled property in PrintDialog", "While working on Windows on Linux the print process doesn t use the page-size that is shown in the printDialog .", "I am trying to export some results with java print printdialog .", "I don t think SendKeys will work b c the PrintDialog box is not modal .", "and then click OK and then click OK on PrintDialog .", "Then I have no reference of PrintDialog of that moment .", "The standard PrintDialog appears in the upper left corner of the containing window .", "The PrintDialog is intended to be blocking so using a delegate to show and focus the print dialog should not done .", "But I don t want to use the Windows PrintDialog I just want my own print dialog with only : .. . .. . But I can t get it to work .", "You ll want a PrintPreviewDialog and PrintDialog as well .", "Set it to be Focus currentForm.Focus .. . .. . 6 . set the form.visible false currentForm.Visible false .. . .. . 7 . start to show the print dialog printDialog.ShowDialog currentForm .. . .. . 8 . close the new form currentForm.Close .. . .. . try .. . .. . .. . using PrintDialog printDialog new PrintDialog .. . .. . ReportPrintDocument rp new ReportPrintDocument rvPermit.ServerReport .. . .. . Form currentForm new Form .. . currentForm.Show .. . currentForm.Activate .. . currentForm.TopMost true .. . currentForm.Focus .. . currentForm.Visible false .. . .. . if printDialog.ShowDialog currentForm DialogResult.OK .. . .. . if PrintReport null .. . PrintReport this e .. . .. . rp.PrinterSettings printDialog.PrinterSettings .. . rp.Print .. . .. . .. . currentForm.Close .. . .. . .. . catch Exception .. . .. . Prevent any error while calling the printer dialog .. .", "Anyone an idea how I can call the PrintDialog as modal-dialog when I host the usercontrol in a Windows-Forms application", "@roryap yes I have and I ve tried to use the PrintDialog class with no luck .", "EDIT As suggested by Brian the solution is to set the property UseEXDialog to true on PrintDialog .", "my problem printdialog is not coming in windows-7 os with 64 bit .", "I ve only dealt with C PrintDialog so I could be wrong but the PrintDialog retrieves all of its information from the printer s driver .", "I would like to create a custom SWT PrintDialog .", "Well you cannot do this using PrintDialog .", "Do so by assigning PrintSettings to an instance of PrintDialog .", "In my C WinForm application I use a PrintDialog to open a standard Window where the user can customize his print request select the printer access the properties select to print all pages or a range .. . .. . .. .", "WPF control has WebBrowser control embedded in some parts and when user click print inside WebBrowser control then JavaScript fires PrintDialog .", "Using the Wpf DocumentViewer control I can t figure out how to set the PageOrientation on the PrintDialog that the DocumentViewer displays when the user clicks the print button .", "When I click button Print my form .. . .. . PrintDialog is global variable type System.windows.forms.PrintDialog .", "Or if possible not use PrintDialog because I cant find it .", "Not sure why I am the only one experiencing this but pdi PrintDialog does not have a Document property for me.. .", "PrintDialog and a secondary UI thread severe problem http : social.msdn.microsoft.com Forums en wpf thread 3aad21a4-17fc-40de-badb-8f1c20b25dbe .. . .. . In that thread the guy eventually uses a custom PrintDialog class the source code of which is found here http : pastebin.com f1a411397 which is much the same as built-in PrintDialog but with a few tweaks to fix these cross-thread bugs and it also overrides the XPS Document Writer which apparently ties itself even further into the application s main UI thread .. . .. . I copied and pasted the code for that custom PrintDialog and renamed the class to ThreadSafePrintDialog removed my Print button s CommandTarget and instead use my own Print method : .. . .. . Works perfectly .", "Working version with PrintDialog dialog : .. . .. . Version without PrintDialog dialog : .. . .. . But this code do not work Zebra printer in this case do not print or print blank label or stop in the middle of label and stop working flashing red light .. . .. . Question : How to fix it", "I can t get this to work as the printdialog you refered to me is part of System.Windows.Forms I am actually working with WPF", "What should I do to print several BitmapSources with different page orientations in a single print job in the PrintDialog class using only one print ticket", "I can center the dialog using FindWindow and SetWindowPosition if I can create an event handler that fires when the PrintDialog loads .", "In SWT PrintDialog one can click preferences to open the native printer driver preferences dialog .", "I removed the namespace in the code and I get an error that printdialog does not contain a definition for document and bool", "I have two peices of code for printing using java as seen below : .. . .. . The First Code .. . .. . This code has a printDialog and prints as intended on the printer .. . .. . the second code : .. . .. . prints without a print dialog which is what i am after but this will print a blank page to the printer .", "I haven t tried to reproduce the issue but I have two things that you can try : .. . .. . Change the size of each FixedPage in the FixedDocument : .. . .. . another option is to try to change the PrintDialog s PrintTicket :", "I would hate if my PrintDialog showed up in the center .", "The whole of PrintDialog is platform specific the Mac version in a different jar is completely different .", "I ve tried your code but my printDialog variable is a global variable .", "I tried to use .. . .. . or .. . .. . but could not achieve to access to PrintDialog and close it .", "And when I open printDialog box again peviously set settings should not change .", "In the standard PrintDialog there are four values associated with a selected printer : Status Type Where and Comment .", "However when I open a PrintDialog and set the number of copies to 2 in there .", "There may be defaults getting set in the PrintDialog that you don t want .", "You have to use PrintDialog .. . .. . Edited from Comment .. . .. . On 64-bit Windows and with some versions of .NET you may have to set pdi.UseExDialog true for the dialog window to appear .", "And also how can I set the page orientation from PrintDialog", "I am currently opening the PrintDialog where user can select printer setting and do the printing .", "At the moment I am using below code .. . .. . Is there a way to send all the files to the printer by using PrintDialog once .", "If I understand correctly the PRINTDLG pd new PRINTDLG line 265 is the platform specific part of the PrintDialog .", "I want to add all PrinterSetting values before show PrintDialog from WinForms .", "Do you have programmatic access to the PrintDialog object when you sign the user out", "After the PrintDialog has been shown the text-size on certain controls already showing is increased over the already scaled size .", "You cant add custom button on Print Dialog Box but you can try to create your own Print Dialog Box .", "Okay in my program I am showing a printDialog and I want to be able to know if the user clicks the print button or the cancel-button .", "Basically PrintDialog is not available in my Visual Studio 2013 toolbox is there any way of getting it", "When I change the code to this : .. . .. . This will give me a PrintDialog screen where I can select the printer and the amount of copies .", "Given a valid System.Windows.Controls . PrintDialog instance what is the simplest way to just spit out a blank page out of the printer", "I want to show the print dialog box before printing the document so the user can choose another printer before printing .", "I m trying to show a Print dialog before printing in a WPF application .", "It s the same print dialog for both applciation.. .", "The words in the XPS are missing and there is no text displayed in the print result .. . .. . I have tried making some changes on the PrintTicket but could not get the correct print output .", "In WPF you can use the PrintTicket Class http : msdn.microsoft.com en-us library system.printing.printticket 28v vs.110 29.aspx of System.Windows.Controls.PrintDialog .", "Using the PrintDialog methods how does one set the size of the page to be printed or just center the contents of the printable form", "I m trying to write a service that act as a print spooler : it waits for documents to print and print the on the right printer with the right settings stored in a PrintTicket .", "After enabling our aplication to use AutoScaleMode DPI we are getting a strange issue when we show the PrintDialog at a DPI greater than 96 .", "I am looking for a way to simulate clicking Print button on open Print Dialog Box for ReportViewer .", "This will still bring out the Printdialog and the user will still need actively to choose to actually print the thing so you cant force it out on paper from server site .", ".Net Print Dialog http : i.stack.imgur.com 456vZ.gif .. . .. . But in that window the user cannot enter a list of pages separated by that he want to print just as we can do within notepad s Print Dialog .", "Is there a way to know when user click ok button on print dialog box initiated by self.print using PHP", "Today I m unable to do it since I m using PrintDialog class and each BitmapSource is added to a FixedPage inside a FixedDocument - with this approach I can only set the page orientation to the whole document one orientation per print ticket .", "Do you know how to show the print dialog on the top of a web form", "i think that the next step will be to check how to print with windows printing dialog .", "If it is a native Windows dialog then the class name should be 32770 .", "I was trying to print a WPF view .", "I create one page workbook files in eclipse and need to open the print dialog box and print these files off .", "I have code to display a printer dialog box that will call this procedure to render a document for printing .", "I have a simple printing solution set up and normal printing works fine tested it a couple of times however when I use the PrintDialog to specify a custom page range it is as-if the range is ingored .", "You need to tell the print dialog that it should accept user input for page ranges .", "UseExDialog property sets to true means working fine.but the print dialog style looks like windows XP print not like windows-7 . i need some other solution for showing print dialog in windows-7 os with 64 bit .", "With or without closing the print dialog however the printing code should check to see if the user is still logged in before it actually prints something .", "But if user open a print dialog of any page and do not touch screen for 5 minutes even if I log out user and clear all child elements print dialog still stays on top of WPF form and somebody can come and continue to print what ever page user stayed .", "If you are calling a javascript function to load the print dialog then yes .", "when press the button print dialog does not open but the messagebox displaying Print Cancelled is shown", "When I tried by opening the document and print it does print fine .", "Is there any way to print in memory collection or variable size in WPF", "Well That I really need is to get the PDF File then show a Print Dialog wich have to contain the PDF so the user will have to choose printer and finally print this document.. .", "i have found the solution for the problem by searched following links : .. . .. . http : social.msdn.microsoft.com Forums en netfx64bit thread 8760fb6c-ae63-444e-9606-cd3295ce6b5d .. . .. . http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog.aspx .. . .. . by setting true to UseExDialog property of printdialog the dialog comes and working fine.but this dialog style is like windows XP not windows7 style.so this is not excat solution .", "The issue I ve run into is that there doesn t seem to be a page preferences dialog for WPF ." ] }
{ "confidence": [ 67.30120849609375, 65.50947570800781, 65.03133392333984, 64.51966857910156, 63.904014587402344, 62.1721305847168, 61.732913970947266, 61.1429443359375, 60.91716766357422, 60.65281295776367, 60.59480285644531, 60.19251251220703, 58.82172775268555, 58.7564697265625, 58.507328033447266, 56.5940055847168, 56.27070236206055, 56.08437728881836, 55.93281555175781, 55.532466888427734 ], "content": [ "Question : I m trying to print my own XPS file to the printer with PrintDialog . But the print result is not the same as the original XPS . The words in the XPS are missing and there is no text displayed in the print result .. . .. . I have tried making some changes on the PrintTicket but could not get the correct print output . How shall I set up the printdialog to get the correct print result Or is there any other way to do the printing in WPF project Sample Code . Screen shot of part of Original XPS .. . .. . Print Result .. . Answer : Not sure if the user actually exists--but for those who stumbled upon this question printing an XPS file would typically be done with the XpsDocumentWriter . How to : Programmatically Print XPS Files https : msdn.microsoft.com en-us library aa969772 28v vs.110 29.aspx .. . .. . Note that all printers are different and it may be required to consult the manufacturer of the printer to debug issues . What I have found is not all printers support XPS document printing . In one interesting case I was printing on a Xerox printer with the PCL print driver installed . When I looked at PrintDialog.PrintQueue.IsXps I saw that it was equal to false . Then I learned there is a specific XPS printer driver for the printer . I installed that driver--which added another printer to my printer list--and printed using that driver and IsXps was equal to true . This is one of the many gotchas in the printer world .", "Question : I want to show the print dialog box before printing the document so the user can choose another printer before printing . The code for printing is : .. . .. . will this code be able to print the current form .. . Answer : You have to use PrintDialog .. . .. . Edited from Comment .. . .. . On 64-bit Windows and with some versions of .NET you may have to set pdi.UseExDialog true for the dialog window to appear . Comment : when press the button print dialog does not open but the messagebox displaying Print Cancelled is shown Comment : @ user2257581 : i test it now it work make a new application and test it again see it work Comment : On 64-bit Windows and with some versions of .NET you may have to set pdi.UseExDialog true for the dialog window to appear . See stackoverflow.com q 6385844 202010 http : stackoverflow.com q 6385844 202010 for details . Comment : Not sure why I am the only one experiencing this but pdi PrintDialog does not have a Document property for me.. . Comment : @Shumii That s probably because you re using System.Windows.Controls.PrintDialog from PresentationFramework.dll whereas the answer refers to System.Windows.Forms.PrintDialog from System.Windows.Forms.dll .", "Question : In my C WinForm application I use a PrintDialog to open a standard Window where the user can customize his print request select the printer access the properties select to print all pages or a range .. . .. . .. . .Net Print Dialog http : i.stack.imgur.com 456vZ.gif .. . .. . But in that window the user cannot enter a list of pages separated by that he want to print just as we can do within notepad s Print Dialog . Notepad print dialog http : i.stack.imgur.com C6ibs.gif .. . .. . Any idea how I can get a Print Dialog like the notepad s PrintDialog EDIT As suggested by Brian the solution is to set the property UseEXDialog to true on PrintDialog . That was not obvious based on the documentation http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog 28v vs.110 29.aspx but it does the trick Comment : Did you set this to true msdn.microsoft.com en-us library http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog v vs.110 .aspx Comment : You are repeatedly mentioning Notepad but what you are showing is WordPad . Comment : Thanks a lot Brian This property does the trick . I did read the documentation but didn t try all the properties.. . And the documentation for that one only says : true to indicate the dialog should be shown with the Windows XP style otherwise false . Which was not IMO clearly related to that field.. . Comment : Sorry O.R . I did my test with notepad but took the screenshots from this link yevol.com en vcsharp2005 controls dlgprint.htm http : www.yevol.com en vcsharp2005 controls dlgprint.htm I didn t know I could upload my own screenshots so easily on StackOverflow and wanted to redirect to existing ones . It s the same print dialog for both applciation.. . .. . Answer : Set PrintDialog.UseEXDialog to true . http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog v vs.110 .aspx http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog 28v vs.110 29.aspx Comment : Although the documentation of Microsoft is really not explicit this property does indeed the trick.. . Thanks a lot again Brian .", "Question : How to adjust System.Windows.Controls.PrintDialog.PrintableAreaHeight System.Windows.Controls.PrintDialog.PrintableAreaWidth since they are read only .. . Answer : In WPF you can use the PrintTicket Class http : msdn.microsoft.com en-us library system.printing.printticket 28v vs.110 29.aspx of System.Windows.Controls.PrintDialog . This class has a lot of properties to change the aspect of the page . In Windows Forms you can use YourPrintDialog.PrinterSettings.DefaultPageSettings.PaperSize . Here is a link-to MSDN : PrinterSettings.PaperSizes Property http : msdn.microsoft.com en-us library system.drawing.printing.printersettings.papersizes 28v vs.110 29.aspx Comment : I can t get this to work as the printdialog you refered to me is part of System.Windows.Forms I am actually working with WPF Comment : sorry question tags and answer updated .", "Question : I have a WPF application which needs to log out user after 5 min of inactivity . But if user open a print dialog of any page and do not touch screen for 5 minutes even if I log out user and clear all child elements print dialog still stays on top of WPF form and somebody can come and continue to print what ever page user stayed . I tried to use .. . .. . or .. . .. . but could not achieve to access to PrintDialog and close it . Is there any way to access it and close if user did not respond to print dialog Comment : Do you have programmatic access to the PrintDialog object when you sign the user out If so you could try calling the Dispose method or Reset method . Alternatively although not very nice would it be possible to simply restart the program after the user is signed out Comment : WPF control has WebBrowser control embedded in some parts and when user click print inside WebBrowser control then JavaScript fires PrintDialog . Then I have no reference of PrintDialog of that moment . Comment : Why is your original answer not good any more Also have you seen my answer to this question : stackoverflow.com questions 7926107 force-close-of-messagebox http : stackoverflow.com questions 7926107 force-close-of-messagebox btw : White uses UI automation . Comment : It s unclear what else is supposed to happen after 5 minutes . Does the program continue to run with no user logged in or is the program supposed to quit Comment : Since the Print dialog belongs-to JS and not C I guess you may not be able to easily access and close it . But you can inject JavaScript code into the WebBrowser control.. . Maybe you should ask how to close the dialog from JavaScript and then try to inject that code into the WebBrowser . .. . Answer : You can use p invoke for this . Use findwindow to find any window and destroywindow to close it . https : msdn.microsoft.com en-us library windows desktop ms633499 v vs.85 .aspx", "Question : I have a WPF UserControl which use the System.Windows.Controls.PrintDialog : .. . .. . XAML : .. . .. . CodeBehind : .. . .. . If I use now this UserControl in a WPF Appplication the PrintDialog-Windows appears as modal-dialog . Like described in msdn .. . .. . But if I use the UserControl in a Wondows-Forms application the dialog appears as a NON-Modal dialog . Anyone an idea how I can call the PrintDialog as modal-dialog when I host the usercontrol in a Windows-Forms application Thanking you in anticipation rhe1980 .. . Answer : solution workaround described here in german : .. . .. . http : mobilesolutions.noser.com 2013 01 winforms-meets-wpf-meets-winforms-meets-wpf-2", "Question : In my C WinForm application I use a PrintDialog to open a standard Window where the user can customize his print request select the printer access the properties select to print all pages or a range .. . .. . .. . .Net Print Dialog http : i.stack.imgur.com 456vZ.gif .. . .. . But in that window the user cannot enter a list of pages separated by that he want to print just as we can do within notepad s Print Dialog . Notepad print dialog http : i.stack.imgur.com C6ibs.gif .. . .. . Any idea how I can get a Print Dialog like the notepad s PrintDialog EDIT As suggested by Brian the solution is to set the property UseEXDialog to true on PrintDialog . That was not obvious based on the documentation http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog 28v vs.110 29.aspx but it does the trick Comment : Did you set this to true msdn.microsoft.com en-us library http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog v vs.110 .aspx Comment : You are repeatedly mentioning Notepad but what you are showing is WordPad . Comment : Thanks a lot Brian This property does the trick . I did read the documentation but didn t try all the properties.. . And the documentation for that one only says : true to indicate the dialog should be shown with the Windows XP style otherwise false . Which was not IMO clearly related to that field.. . Comment : Sorry O.R . I did my test with notepad but took the screenshots from this link yevol.com en vcsharp2005 controls dlgprint.htm http : www.yevol.com en vcsharp2005 controls dlgprint.htm I didn t know I could upload my own screenshots so easily on StackOverflow and wanted to redirect to existing ones . It s the same print dialog for both applciation.. . .. . Answer : Based on the documentation it seems that you should set the AllowSomePages http : msdn.microsoft.com en-us library system.windows.forms.printdialog.allowsomepages 28v vs.110 29.aspx property to true . Gets or sets a value indicating whether the Pages option button is enabled .", "Question : I have a ready FixedDocument to be printed with the below pagesize for the user to choose accordingly : .. . .. . But every time when I print the FixedDocument out via PDFCreator it always stays as A4 size . What can I do to fix this Appreciate the help . .. . Answer : Calling doc.DocumentPaginator gets the most up-to-date paginator . Pagination happens when that call is made and the size of the page depends on the pages inside the document . I haven t tried to reproduce the issue but I have two things that you can try : .. . .. . Change the size of each FixedPage in the FixedDocument : .. . .. . another option is to try to change the PrintDialog s PrintTicket :", "Question : I open a PrintDialog box then set print info on that using this .. . .. . Now I want to save infomation of the printDialog when I click Apply button . And when I open printDialog box again peviously set settings should not change . Comment : The PrinterSettings class has the Serializable attribute . So you can serialize it to preserve the settings . Or just plain store the PrintDialog.PrinterSettings property in a variable . .. . Answer : STore that information in some file and next time when you open your application check if the file contains required information if it contains that info then use that information in your application else get it from the user Comment : Can you show me code example i see print Dialog have so many info to store .", "Question : null .. . Answer : I am printing a FlowDocument . The standard PrintDialog appears in the upper left corner of the containing window . I can center the dialog using FindWindow and SetWindowPosition if I can create an event handler that fires when the PrintDialog loads . But I don t know how to add an event handler to the dialog . Thank you for your help . Comment : I don t think you can since its a OS level dialog . Question would be whats the use-case that requires the print dialog to be centered Comment : It s more visually pleasing . Comment : I would hate if my PrintDialog showed up in the center . Esp . when the print button should be top bottom left or bottom right .", "Question : I have a WPF application which needs to log out user after 5 min of inactivity . But if user open a print dialog of any page and do not touch screen for 5 minutes even if I log out user and clear all child elements print dialog still stays on top of WPF form and somebody can come and continue to print what ever page user stayed . I tried to use .. . .. . or .. . .. . but could not achieve to access to PrintDialog and close it . Is there any way to access it and close if user did not respond to print dialog Comment : Do you have programmatic access to the PrintDialog object when you sign the user out If so you could try calling the Dispose method or Reset method . Alternatively although not very nice would it be possible to simply restart the program after the user is signed out Comment : WPF control has WebBrowser control embedded in some parts and when user click print inside WebBrowser control then JavaScript fires PrintDialog . Then I have no reference of PrintDialog of that moment . Comment : Why is your original answer not good any more Also have you seen my answer to this question : stackoverflow.com questions 7926107 force-close-of-messagebox http : stackoverflow.com questions 7926107 force-close-of-messagebox btw : White uses UI automation . Comment : It s unclear what else is supposed to happen after 5 minutes . Does the program continue to run with no user logged in or is the program supposed to quit Comment : Since the Print dialog belongs-to JS and not C I guess you may not be able to easily access and close it . But you can inject JavaScript code into the WebBrowser control.. . Maybe you should ask how to close the dialog from JavaScript and then try to inject that code into the WebBrowser . .. . Answer : I fixed this weird problem by using .. . .. . white project . http : white.codeplex.com wikipage title Working 20with 20window referringTitle Programming 20using 20white http : white.codeplex.com wikipage title Working 20with 20window referringTitle Programming 20using 20white .. . .. . By using application class I am able to access all ModalDialogs in WPF project and close them .", "Question : In my WPF app I have particular Window which contains amongst other controls a DocumentViewer . When this window is opened and loaded it dynamically builds a FixedDocument with a progress indicator and then displays it in the DocumentViewer . It works and to improve the user-experience I run this window in its own thread so that the main application window is still responsive while the document is being built . Based on the tips at this web page http : eprystupa.wordpress.com 2008 07 28 running-wpf-application-with-multiple-ui-threads I open my window in a new thread like this : .. . .. . I have been happy with this setup so far but I just ran into an issue . MyDocumentViewerWindow contains a print button which references the built-in Print command targeted at the DocumentViewer : .. . .. . Before I had the window in its own thread this worked fine . But now when I click it the application crashes . Visual Studio 2010 highlights the following line from the above code as the crash location with the message The calling thread cannot access this object because a different thread owns it . : .. . .. . The stack-trace starts like this : .. . .. . My hunch is that the print dialog is opening in the main UI thread and trying to access the document that is created and owned by my own thread hence the crash . Any ideas how I can solve this I d like to keep the window in its own thread . .. . Answer : After some more Googling I stumbled across the following thread which seems to be the exact issue I am having . PrintDialog and a secondary UI thread severe problem http : social.msdn.microsoft.com Forums en wpf thread 3aad21a4-17fc-40de-badb-8f1c20b25dbe .. . .. . In that thread the guy eventually uses a custom PrintDialog class the source code of which is found here http : pastebin.com f1a411397 which is much the same as built-in PrintDialog but with a few tweaks to fix these cross-thread bugs and it also overrides the XPS Document Writer which apparently ties itself even further into the application s main UI thread .. . .. . I copied and pasted the code for that custom PrintDialog and renamed the class to ThreadSafePrintDialog removed my Print button s CommandTarget and instead use my own Print method : .. . .. . Works perfectly .", "Question : I have a WPF application which needs to log out user after 5 min of inactivity . But if user open a print dialog of any page and do not touch screen for 5 minutes even if I log out user and clear all child elements print dialog still stays on top of WPF form and somebody can come and continue to print what ever page user stayed . I tried to use .. . .. . or .. . .. . but could not achieve to access to PrintDialog and close it . Is there any way to access it and close if user did not respond to print dialog Comment : Do you have programmatic access to the PrintDialog object when you sign the user out If so you could try calling the Dispose method or Reset method . Alternatively although not very nice would it be possible to simply restart the program after the user is signed out Comment : WPF control has WebBrowser control embedded in some parts and when user click print inside WebBrowser control then JavaScript fires PrintDialog . Then I have no reference of PrintDialog of that moment . Comment : Why is your original answer not good any more Also have you seen my answer to this question : stackoverflow.com questions 7926107 force-close-of-messagebox http : stackoverflow.com questions 7926107 force-close-of-messagebox btw : White uses UI automation . Comment : It s unclear what else is supposed to happen after 5 minutes . Does the program continue to run with no user logged in or is the program supposed to quit Comment : Since the Print dialog belongs-to JS and not C I guess you may not be able to easily access and close it . But you can inject JavaScript code into the WebBrowser control.. . Maybe you should ask how to close the dialog from JavaScript and then try to inject that code into the WebBrowser . .. . Answer : If I understand correctly you re able to do the user logout at the 5 minute mark I presume via the timer event handler but if the print dialog was open then the printout can still end up happening . The question is what s really the important thing here closing the dialog or preventing the subsequent printout Also are you logging out the user but keeping the program going or is the program quitting If the app is supposed to shut down then your code can call the Application object s Shutdown method which will close any modal dialogs as part of the shutdown process . If the app is supposed to keep running without a current user then I would think the White library is your best bet . It s unclear why you ve moved away from this . With or without closing the print dialog however the printing code should check to see if the user is still logged in before it actually prints something . If the login expired while the print dialog was on screen the printing code should simply exit without printing anything .", "Question : I am currently using System.Windows.Forms . PrintDialog on a custom control in ASP.net because I want to show the print dialog and assign its PrinterSettings to ReportPrintDocument.PrinterSettings after I click Ok button on the dialog . Here is my code : .. . .. . My problem is that the print dialog always show behind the web browser and I couldn t know that it is showing or not until I minimize the web browser . Do you know how to show the print dialog on the top of a web form Please help . .. . Answer : Here is my solution for now . Not recommended If you can find another one please share it to me and I m very appreciate your help on that . 1 . initialize a new window form Form currentForm new Form .. . .. . 2 . show the form currentForm.Show .. . .. . 3 . Activate the form currentForm.Activate .. . .. . 4 . Set its TopMost to true so it will bring the form to the top currentForm.TopMost true .. . .. . 5 . Set it to be Focus currentForm.Focus .. . .. . 6 . set the form.visible false currentForm.Visible false .. . .. . 7 . start to show the print dialog printDialog.ShowDialog currentForm .. . .. . 8 . close the new form currentForm.Close .. . .. . try .. . .. . .. . using PrintDialog printDialog new PrintDialog .. . .. . ReportPrintDocument rp new ReportPrintDocument rvPermit.ServerReport .. . .. . Form currentForm new Form .. . currentForm.Show .. . currentForm.Activate .. . currentForm.TopMost true .. . currentForm.Focus .. . currentForm.Visible false .. . .. . if printDialog.ShowDialog currentForm DialogResult.OK .. . .. . if PrintReport null .. . PrintReport this e .. . .. . rp.PrinterSettings printDialog.PrinterSettings .. . rp.Print .. . .. . .. . currentForm.Close .. . .. . .. . catch Exception .. . .. . Prevent any error while calling the printer dialog .. .", "Question : I have custom control with print toolbar item.when print the control the dialog is not coming in windows-7 with 64 bit os in other system os working fine . problem only in windows-7 with 64 bit . my problem printdialog is not coming in windows-7 os with 64 bit . i have checked and anlyaed -- PrintDialog.ShowDialog returns immeaditely cancel instaed of showing the dialog thats the problem . i have found the solution for the problem by searched following links : .. . .. . http : social.msdn.microsoft.com Forums en netfx64bit thread 8760fb6c-ae63-444e-9606-cd3295ce6b5d .. . .. . http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog.aspx .. . .. . by setting true to UseExDialog property of printdialog the dialog comes and working fine.but this dialog style is like windows XP not windows7 style.so this is not excat solution . UseExDialog property sets to true means working fine.but the print dialog style looks like windows XP print not like windows-7 . i need some other solution for showing print dialog in windows-7 os with 64 bit . please provide complete solution for this problem .. . .. . Thanks .. . .. . Siva Comment : Update the printer driver . Comment : Did you find a solution Are you able to do this now without using the UseEXDialog -property .. . Answer : Per Microsoft s Forums http : social.msdn.microsoft.com Forums en-US winforms thread 62aa5e1b-8846-47c0-8858-932031e79622 : .. . .. . via Mike Dos Zhang MSFT CSG .. . .. . The PrintDialog class may not work on AMD64 x64 or Any CPU is belong to AMD64 technical including intel x64cpu microprocessors unless you set the UseEXDialog property to true . .. . This is a known issue . .. . And this limitation has been supported in .net framework4 so if you want use this class with windows7 style dialog then you will need to use .net framework4 otherwise you will need to use the xp style dialog with set the UseEXDialog property to true or using x86 target-platform . In my case the 2nd known issue was it.. . we upgraded from .NET 2.0 to .NET 4.0 and it started working again without any code changes to the printing . Comment : Setting UseEXDialog to true worked for me .", "Question : I am currently opening the PrintDialog where user can select printer setting and do the printing . At the moment I am using below code .. . .. . Is there a way to send all the files to the printer by using PrintDialog once . So the user can select the folder and set one print setting for all the documents inside the folder and then do the printing .. . Answer : Try this sample code : Comment : Hey just tried printing the file . It does print but nothing on the paper . It just empty When I tried by opening the document and print it does print fine . Am I missing something Comment : Was the PrintDialog shown If not set the dialog s property UseEXDialog true . I ve updated the sample to reflect this . Comment : Also you need to implement your printing in the pdoc.PrintPage event handler . Sample was updated . Comment : Yes the print dialog came up I can set the printer setting and print . But output is empty paper Comment : Please pay attention to the pdoc.PrintPage event handler in my updated code sample . I ve highlighted it by the comments . Was this handler set when tested", "Question : Using the Wpf DocumentViewer control I can t figure out how to set the PageOrientation on the PrintDialog that the DocumentViewer displays when the user clicks the print button . Is there a way to hook into this .. . Answer : The workaround I used to set the orientation on my DocumentViewer s print dialog was to hide the print button on the DocumentViewer control by omitting the button from the template . I then provided my own print button and tied it to the following code :", "Question : I have custom control with print toolbar item.when print the control the dialog is not coming in windows-7 with 64 bit os in other system os working fine . problem only in windows-7 with 64 bit . my problem printdialog is not coming in windows-7 os with 64 bit . i have checked and anlyaed -- PrintDialog.ShowDialog returns immeaditely cancel instaed of showing the dialog thats the problem . i have found the solution for the problem by searched following links : .. . .. . http : social.msdn.microsoft.com Forums en netfx64bit thread 8760fb6c-ae63-444e-9606-cd3295ce6b5d .. . .. . http : msdn.microsoft.com en-us library system.windows.forms.printdialog.useexdialog.aspx .. . .. . by setting true to UseExDialog property of printdialog the dialog comes and working fine.but this dialog style is like windows XP not windows7 style.so this is not excat solution . UseExDialog property sets to true means working fine.but the print dialog style looks like windows XP print not like windows-7 . i need some other solution for showing print dialog in windows-7 os with 64 bit . please provide complete solution for this problem .. . .. . Thanks .. . .. . Siva Comment : Update the printer driver . Comment : Did you find a solution Are you able to do this now without using the UseEXDialog -property .. . Answer : Setting the dialog object property AutoUpgradeEnabled to false corrected the problem when executing in Windows 7 SP1 64-bit solution was compiled using VS2008 and .net-2.0 . Ex . Comment : by the way there is no AutoUpgradeEnabled property in PrintDialog", "Question : null .. . Answer : Environment : .. . .. . Zebra ZDesigner GK888t EPL label printer .. . 10cm x 5cm paper .. . Windows drivers any other do not work .. . Configurated printer options in Windows printer preferences .. . width of paper : 10cm .. . height of paper : 5cm .. . media settings : direct thermal .. . .. . Problem : I want to print generated image but I don t want to show PrintDialog for user . User can only print image by pressing button PRINT but i can t achieve it . Working version with PrintDialog dialog : .. . .. . Version without PrintDialog dialog : .. . .. . But this code do not work Zebra printer in this case do not print or print blank label or stop in the middle of label and stop working flashing red light .. . .. . Question : How to fix it I guess it doesn t work well because configuration of printer isn t apply like paper size or media settings - direct thermal option because of getting it from PrintQueues . Any other ways to print generated image Comment : Why you don t user Neodynamic.SDK.ThermalLabel library I write a library to print labels with this library . Support EPL and ZPL printers . Comment : Hey @Joseph thanks for comment this lib is free to use Comment : I think that is the limitation you should by a license . Comment : The code that you use is the same that you have been posted Comment : @Joseph Yes the same", "Question : While working on Windows on Linux the print process doesn t use the page-size that is shown in the printDialog . It always uses the size that is set in the OS printer settings . Has anybody also observed this behaviour . I consider writing a bug report about it . .. . Answer : I ve only dealt with C PrintDialog so I could be wrong but the PrintDialog retrieves all of its information from the printer s driver . It is likely that the driver installed on the Linux machine is being used when querying printer settings meaning the driver returns different values when queried from a Linux machine vs . a Windows machine ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
sfsafariviewcontroller@web@65
sfsafariviewcontroller -- controller which allow you to present @placeholder content within the app .
{ "confidence": [ 41.27499008178711, 35.33821105957031, 30.8792724609375, 30.445411682128906, 29.626476287841797, 29.55084228515625, 29.315479278564453, 29.275266647338867, 29.25893783569336, 29.194095611572266, 29.11968994140625, 28.683746337890625, 28.385189056396484, 27.93466567993164, 27.55382537841797, 27.55382537841797, 27.3990478515625, 27.35285186767578, 27.28057098388672, 27.115234375, 26.66374969482422, 26.492355346679688, 26.257034301757812, 26.23145294189453, 26.184051513671875, 26.035457611083984, 25.746501922607422, 25.708690643310547, 25.55912971496582, 25.55912971496582, 25.534168243408203, 25.52173614501953, 25.52173614501953, 25.468368530273438, 25.468368530273438, 25.468368530273438, 25.468368530273438, 25.468368530273438, 25.455791473388672, 25.455791473388672, 25.309799194335938, 25.309799194335938, 25.043079376220703, 24.555408477783203, 24.417118072509766, 24.417118072509766, 24.32635498046875, 24.3248291015625, 24.153003692626953, 23.922443389892578, 23.849159240722656, 23.849159240722656, 23.849159240722656, 23.849159240722656, 23.849159240722656, 23.505901336669922, 23.38953399658203, 23.38953399658203, 23.37206268310547, 23.285404205322266, 23.182815551757812, 23.080772399902344, 23.080772399902344, 23.080772399902344, 22.992656707763672, 22.992656707763672, 22.957622528076172, 22.799053192138672, 22.70714569091797, 22.70714569091797, 22.70714569091797, 22.70714569091797, 22.70714569091797, 22.493457794189453, 22.398845672607422, 22.373538970947266, 22.363887786865234, 21.87493133544922, 21.697772979736328, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.668092727661133, 21.50577735900879, 21.48546600341797, 21.38469696044922, 21.346467971801758, 21.33841323852539, 21.33841323852539, 21.33841323852539, 20.939983367919922, 20.58286476135254, 20.580062866210938 ], "content": [ "We recommend implementing the Safari View Controller API to display web content within your app .", "My app opens a SFSafariViewcontroller to presents Web content .", "In the app that I m working on whenever I present a SFSafariViewController it doesn t show the handoff icon on my Mac .", "I have an app that loads a web site into an SFSafariViewController .", "Now in my view controller where I show the VC : .. . .. . Now when you hit the link it will dismiss the SFSafariViewController .", "Is it possible to use a SFSafariViewController as the Detail Controller for a UISplitViewController", "I am creating an instance of an SFSafariViewController from within a tableVC .", "After implemented SFSafariViewController .", "For one you can t just load the HTML into an SFSafariViewController you have to present it with a URL .", "Is it possible to load content to SFSafariViewController like it was in UIWebView with loadHTMLString : method", "So I am trying to detect a link click within a webView and then present this url in the new SFSafariViewController however am having some issues .", "However if the user taps a universal link from within an embedded SFSafariViewController WKWebView or UIWebView object iOS opens your app .", "Using SFSafariViewController with .. . .. . leaves the page blank .", "Hi I m using SFSafariViewController in my app .", "Is there a way to do this in SFSafariViewController", "SFSafariViewController may not support for preloading .", "You can only load url in SFSafariViewController .", "My goal is to have content from my app on the left half of the iPad screen in landscape and on the right half have a SFSafariViewController showing a certain sports website .", "First in the AppDelegate : .. . .. . As you can see I am keeping the SFSafariViewController in the Delegate .", "In other words my App can not clear credentials stored by SFSafariViewController .", "EDIT : please consider SFSafariViewController only .", "I have a simple view controller that presents a SFSafariViewController when a link button is tapped .", "You want to override the sharing functionality of SFSafariViewController", "Is this affected by SFSafariViewController", "I want to issue a system paste command and if the user has the text field within the SFSafariViewController in focus it will paste the text to it .", "This can be used to intercept and handle all traffic that goes to from a normal UIWebView but I don t know if this will allow you to see and handle the traffic from a SFSafariViewController or if that traffic happens outside of the sandbox of the app .", "Due to that apple reject my app they want use SFSafariViewController .", "Per the comments attached to accepted answer it was suggested to set my root view controller to SFSafariViewController which I can t get working .", "Did you do something particular to make it open the SFSafariViewController", "You may be having problems with the fact that SFSafariViewController s are sandboxed .", "I m making a very simple app for a demo and am trying to present a webpage using SFSafariViewController I need to use SF versus WKWebView so to be able to access cookies .", "Is it possible using the newer WKWebView or SFSafariViewController", "This feature is not supported with the current implementation of SFSafariViewController .", "I d like to use SFSafariViewController or WKWebView any idea", "SFSafariViewController is only available on iOS 9 and above .", "I am not checked in SFSafariViewController It is working web view .", "So I assume that it may work for SFSafariViewController .", "Sadly this behaviour is not supported with the current implementation of SFSafariViewController .", "I created an incredibly basic app which includes a SFSafariViewController pointing at the URL http : www.w3schools.com js js cookies.asp .", "The user s activity and interaction with SFSafariViewController are not visible to your app which cannot access AutoFill data browsing history or website data .", "SFSafariViewController is not too customisable by definition of Apple it s suppose to give the user a close UX UI experience of the regular Safari App .", "To improve the UI i want to use the SFSafariViewController but i seem to keep on getting this error whenever i build my app .", "SFSafariViewController renders off-process .", "SFSafariViewController works great for my needs because it can access cookies and I need this to allow an already authenticated user to access a web site .", "Don t you want to return NO at the end of your if SFSafariViewController class nil block", "Can you subclass SFSafariViewController and hide the nav bar on viewWillAppear :", "Hi i m having issues with using SFSafariViewController .", "I was thinking about presenting the button in an .OverContext modal but then the User would be unable to interact with the SFSafariViewController which also doesn t work .", "I am using SFSafariViewController and SFSafariViewControllerDelegate .", "I know I can use safari view controller to load a web page within the app and use done button at the right up corner of the webpage to back to the app .", "@JAL Thats the answer from the apple reviewer to implement SFSafariViewController .", "Also I want to integrate SFSafariViewController in my Product application .", "Is there a way to detect if a user taps Cancel vs Open at a SFSafariViewController prompt .", "If I tap Cancel then all that shows is an empty web view from SFSafariViewController .", "@KetanP If SFSafariViewController will use the cached requests this kind of preloading is also good enough .", "It is now opening a native SFSafariViewController in iOS 9 only but in iOS 8 the login flow is again going outside the app to Safari browser .", "I know how to do it in the UIWebView but here there is some complication to understand how to do it using the SFSafariViewController .", "I have checked with .pdf URLs that the SFSafariViewController works so can somebody enlighten me what is the secret with .ics files", "Please take a look at this SO question I asked for this issue please help if you can : stackoverflow.com questions 35598449 http : stackoverflow.com questions 35598449 how-to-remove-sfsafariviewcontroller-as-a-child-view-controller-correctly", ".. . .. . How it works is the webpage loaded in the SFSafariViewController should redirect the user to a custom-url scheme with whatever data you want appended like an API e.g .", "The problem is that if I will press again on the same inline link it does not open with SFSafariViewController but in Webview which is not what i desire .", "It s important to setup a redirect from your webservice if you want to use the cookie data outside of the SFSafariViewController itself .", "Then whenever you want to load a url into SFSafariViewController it uses the cached requests per your cache policy .", "Are you sure SFSafariViewController will use the cache if preloaded in some way or it s just an assumption", "Per Apple s documentation https : developer.apple.com library ios documentation SafariServices Reference SFSafariViewController Ref apple ref occ instm SFSafariViewController initWithURL : on SFSafariViewController there does not appear to be a publicly-accessible way to hide either the Done button or the URL bar .", "As Per Apple s https : developer.apple.com library ios documentation SafariServices Reference SFSafariViewController Ref apple ref occ instm SFSafariViewController initWithURL : documentation on SFSafariViewController there does not appear to be a publicly-accessible way to change the title of the Done button .", "I don t know about SFSafariViewController .. . .. . any Idea", "We are coming from Safari storing the cookie there and then when the app is launched we are using SFSafariViewController to try to read that cookie .", "The key was to swap in a SFSafariViewController into the existing UITabBarController s array of view controllers .", "How can I hide the navbar but still maintain the benefits of the SFSafariViewController", "However I wonder if in the context of SFSafariViewController navbar refers to the bottom navigation menu .", "Can I not ever open the given URL with an SFSafariViewController WKWebView or UIWebView", "Does this mean we can t ever open the URL in a SFSafariViewController WKWebView or UIWebView", "In this case the url would be mydomainwebcallback : whatever .. . .. . Now in your web page loaded in your view controller add a URL like this : .. . .. . I am going to simplify here but you need a reference to your SFSafariViewController from your AppDelegate .", "I can create Safari View Controller without problem : .. . .. . Is there any way I can preload the URL before I present the view controller to the user", "Here is how I fixed that issue and kept my theming when the tab icon was touched : .. . .. . I must admit that I am not sure that Apple intended that the SFSafariViewController be used in this way within a tab based on what the normal behavior of calling SFSafariViewController currently does .", "The following is summary of their answer : SFSafariViewController runs outside of my App s process and in order to be secure my App can not modify SFSafariViewController s state .", "I was able to get my app to automatically load a url via the SFSafariViewController per this post http : stackoverflow.com questions 33809985 xcode-7-swift-automatically-load-site-via-sfsafariviewcontroller and it works great the only drawback is the navbar .", "How can I manage in iOS 8 the native present controller for Google Login page .", "Regardless of the use-case for me the view immediately disappears when I load SFSafariViewController I can see it for a moment and it disappears .", "I am using the newest Google Sign In SDK but it doesn t show SFSafariViewController when signing into google even in iOS 9 .", "Can I force open the url in the mobile mode using SFSafariViewController and How Can I do this", "I would like to load a POST request using SFSafariViewController just like webView.loadRequest request .", "I would like to use the SFSafariViewController but still add a few buttons of my own below .", "Is there a way to accomplish this with SFSafariViewController or do I have to build my own browser with WKWebView", "I want to change the done button title appearance on SFSafariViewController navigation bar iOS9.0 greater Versions .", "If we could just warm an SFSafariViewController with the desired link this would eliminate an enormous amount of effort on our end .", "Secondly SFSafariViewController only accepts HTTP or HTTPS protocol URLs so it can t read local files or data .", "I tried to find anything about it but it seems that SFSafariViewController can show only Internet data is it true", "stackoverflow.com questions 36608389 http : stackoverflow.com questions 36608389 is-it-possible-to-load-local-pdf-file-on-sfsafariviewcontroller", "I have a Webview with inline URL links which are opened with SFSafariViewController as shown below : .. . .. . When I press the DONE button correctly returns to my Webview .", "User opens newly downloaded app upon initial launch SFSafariViewController is opened with a different URL that checks for that initially set value cookie and then calls URL Scheme with the value .", "If you suspend and then resume the application especially when SFSafariViewController is visible to the user the app will resume on the same page where it was left off unless you tell it to re-open the original URL which you can do by having your application delegate watch for applicationWillEnterForeground : https : developer.apple.com library ios documentation UIKit Reference UIApplicationDelegate Protocol apple ref occ intfm UIApplicationDelegate applicationWillEnterForeground : and then force reload the view controller .", "I try this : Can I preload the web content for Safari View Controller", "I want to preload pre cache Webpage URL request in SFSafariViewController .", "As Apple s document said : .. . .. . The SFSafariViewController class provides a standard interface for browsing the web .", "@Mack Tool Bar Code is not taking impact on SFSafariViewController Bottom .", "enter image description here http : i.stack.imgur.com SX540.png .. . .. . note : linking to this question but the answer is a hack whereas I was looking for a solution using SafariViewController API : SFSafariViewController : Hide navigation bar http : stackoverflow.com questions 33813129 sfsafariviewcontroller-hide-navigation-bar rq 1", "http : stackoverflow.com questions 35129632 can-i-preload-the-web-content-for-safari-view-controller but done button on SFSafariVC not working .. . .. . Here is swift version of Can I preload the web content for Safari View Controller", "This piece of code will allow you to do this ." ] }
{ "confidence": [ 44.36482238769531, 44.03990173339844, 42.763031005859375, 42.480735778808594, 39.56224822998047, 38.85411071777344, 37.29187774658203, 37.21100997924805, 36.5850830078125, 36.398536682128906, 36.24835205078125, 35.41465759277344, 35.32136535644531, 35.27427291870117, 35.129150390625, 34.69248962402344, 34.671993255615234, 34.63109588623047, 34.2492790222168, 33.43883514404297 ], "content": [ "Question : I can create Safari View Controller without problem : .. . .. . Is there any way I can preload the URL before I present the view controller to the user For example I can preload the URL web content in the background first and after the user clicks on something I can show the Safari View Controller with the content right away . The user will feel the page loading is faster or instant . P.S . Workarounds hacks are also acceptable . For example using cache or starting the view controller in background etc . EDIT : please consider SFSafariViewController only . Comment : SFSafariViewController may not support for preloading . you can use NSURLCache and preloading URL using NSURLRequest and NSURLConnection . Then whenever you want to load a url into SFSafariViewController it uses the cached requests per your cache policy . Comment : @KetanP If SFSafariViewController will use the cached requests this kind of preloading is also good enough . is there any further info about how to do it Comment : @KetanP I can t find a way to achieve what you said . Are you sure SFSafariViewController will use the cache if preloaded in some way or it s just an assumption Comment : I am not checked in SFSafariViewController It is working web view . So I assume that it may work for SFSafariViewController . Comment : I will send you same after some time . I busy with some urgent task . .. . Answer : Here is a solution . Obviously if you click on the button right away you ll see the loading . But basically I load the Browser and put the view behind another one and I put a button in this other view . When you press the button the browser is bring to the front already loaded . The only problem here is that I m not using any transition but that s one solution at least . Comment : I tested your method and it works well except.. . the app will crash after 30+ tries . Please take a look at this SO question I asked for this issue please help if you can : stackoverflow.com questions 35598449 http : stackoverflow.com questions 35598449 how-to-remove-sfsafariviewcontroller-as-a-child-view-controller-correctly", "Question : I can create Safari View Controller without problem : .. . .. . Is there any way I can preload the URL before I present the view controller to the user For example I can preload the URL web content in the background first and after the user clicks on something I can show the Safari View Controller with the content right away . The user will feel the page loading is faster or instant . P.S . Workarounds hacks are also acceptable . For example using cache or starting the view controller in background etc . EDIT : please consider SFSafariViewController only . Comment : SFSafariViewController may not support for preloading . you can use NSURLCache and preloading URL using NSURLRequest and NSURLConnection . Then whenever you want to load a url into SFSafariViewController it uses the cached requests per your cache policy . Comment : @KetanP If SFSafariViewController will use the cached requests this kind of preloading is also good enough . is there any further info about how to do it Comment : @KetanP I can t find a way to achieve what you said . Are you sure SFSafariViewController will use the cache if preloaded in some way or it s just an assumption Comment : I am not checked in SFSafariViewController It is working web view . So I assume that it may work for SFSafariViewController . Comment : I will send you same after some time . I busy with some urgent task . .. . Answer : you can download the web page using the following code . and represent it with the help of svc let data : NSData do let weatherData try NSData contentsOfURL : NSURL string : remote url options : NSDataReadingOptions data weatherData print weatherData catch print error .. . .. . and load it when you needed in the svc Comment : Is this an assumption or a working solution Comment : This doesn t work . For one you can t just load the HTML into an SFSafariViewController you have to present it with a URL . Secondly SFSafariViewController only accepts HTTP or HTTPS protocol URLs so it can t read local files or data . Comment : This would kill all interactive JS based aspects of the page", "Question : I can create Safari View Controller without problem : .. . .. . Is there any way I can preload the URL before I present the view controller to the user For example I can preload the URL web content in the background first and after the user clicks on something I can show the Safari View Controller with the content right away . The user will feel the page loading is faster or instant . P.S . Workarounds hacks are also acceptable . For example using cache or starting the view controller in background etc . EDIT : please consider SFSafariViewController only . Comment : SFSafariViewController may not support for preloading . you can use NSURLCache and preloading URL using NSURLRequest and NSURLConnection . Then whenever you want to load a url into SFSafariViewController it uses the cached requests per your cache policy . Comment : @KetanP If SFSafariViewController will use the cached requests this kind of preloading is also good enough . is there any further info about how to do it Comment : @KetanP I can t find a way to achieve what you said . Are you sure SFSafariViewController will use the cache if preloaded in some way or it s just an assumption Comment : I am not checked in SFSafariViewController It is working web view . So I assume that it may work for SFSafariViewController . Comment : I will send you same after some time . I busy with some urgent task . .. . Answer : You could try using a http cache but I don t think it would work as the Safari View Controller is working as a separate process probably the same as Safari so that s why it e.g . circumvents ATS . The only way I can think of this working is to somehow force the user s Safari to load it openURL : or adding to Reading List maybe This doesn t sound like a viable solution . You can always experiment with custom presentation of the view controller attach it the view-hierarchy trigger appearance events but set its frame to CGRectMake 0 0 1 1 or attach it somewhere off-screen then wait a while and represent it with a correct frame . Comment : I have thought about the last option present it in the background somehow but I can t figure out a way . Comment : Try using - void beginAppearanceTransition : BOOL isAppearing animated : BOOL animated and actually presenting after some time . Comment : Also try a custom transitionDelegate like here teehanlax.com blog custom-uiviewcontroller-transitions http : www.teehanlax.com blog custom-uiviewcontroller-transitions that will present it but somewhere off screen and the represent it normally after a few secs", "Question : I am new in iOS app development . Currently I am working on a project which requires the interaction between the app and webpage . I know I can use safari view controller to load a web page within the app and use done button at the right up corner of the webpage to back to the app . But I want to back to the app by clicking a link in the webpage instead of done button . I could not find any solution for this . Can anyone help Many thanks in advance . .. . Answer : You can do this easily enough with a custom URL scheme . First add a scheme to your Info.plist : .. . .. . Now you have a mechanism that will open your app from any URL that is clicked . In this case the url would be mydomainwebcallback : whatever .. . .. . Now in your web page loaded in your view controller add a URL like this : .. . .. . I am going to simplify here but you need a reference to your SFSafariViewController from your AppDelegate . First in the AppDelegate : .. . .. . As you can see I am keeping the SFSafariViewController in the Delegate . Now in my view controller where I show the VC : .. . .. . Now when you hit the link it will dismiss the SFSafariViewController . Comment : Thank you all . This one gives all the details . It works for me . Thanks . Comment : @ShalinaHu please accept the answer if it works for you .", "Question : null .. . Answer : In the app that I m working on whenever I present a SFSafariViewController it doesn t show the handoff icon on my Mac . Although it does appear for other apps that use that controller . Are there any additional steps needed to get this to work", "Question : I can create Safari View Controller without problem : .. . .. . Is there any way I can preload the URL before I present the view controller to the user For example I can preload the URL web content in the background first and after the user clicks on something I can show the Safari View Controller with the content right away . The user will feel the page loading is faster or instant . P.S . Workarounds hacks are also acceptable . For example using cache or starting the view controller in background etc . EDIT : please consider SFSafariViewController only . Comment : SFSafariViewController may not support for preloading . you can use NSURLCache and preloading URL using NSURLRequest and NSURLConnection . Then whenever you want to load a url into SFSafariViewController it uses the cached requests per your cache policy . Comment : @KetanP If SFSafariViewController will use the cached requests this kind of preloading is also good enough . is there any further info about how to do it Comment : @KetanP I can t find a way to achieve what you said . Are you sure SFSafariViewController will use the cache if preloaded in some way or it s just an assumption Comment : I am not checked in SFSafariViewController It is working web view . So I assume that it may work for SFSafariViewController . Comment : I will send you same after some time . I busy with some urgent task . .. . Answer : Sadly this behaviour is not supported with the current implementation of SFSafariViewController . I would encourage filing a radar with Apple to add support for this behaviour but like others have suggested your best bet is to use WKWebView and start loading before its added to the hierarchy . I came across a lovely radar from Twitter https : openradar.appspot.com 21349835 that actually mentions exactly what you re asking for . I think you might find the following requests useful : .. . .. . High Priority : - Ability to warm the SFSafariViewController before actually presenting it with a URL URL request HTML data or file on disk - Currently are investing heavily into warming the shared URL cache for high priority Tweets so that if the user hits that Tweet we will open UIWebView sadly not WKWebView with that pre-cached web page . If we could just warm an SFSafariViewController with the desired link this would eliminate an enormous amount of effort on our end . You can see in their implementation they simply cache responses using UIWebView since WKWebView seems to obfuscate the caching semantics a bit . The only risk is that UIWebView is a likely candidate for deprecation as you see in their docs https : developer.apple.com library ios documentation UIKit Reference UIWebView Class In apps that run in iOS 8 and later use the WKWebView class instead of using UIWebView . So unfortunately it seems that their are many hoops you need to jump through to get this all going so your best bet for now is to just pester Apple and dupe Twitters radar . Comment : I seriously doubt Apple would ever support this . Twitter has no way of knowing whether or not a user will actually want to tap a high priority tweet so they re just wasting everybody s battery and data .", "Question : Is it possible to load content to SFSafariViewController like it was in UIWebView with loadHTMLString : method I tried to find anything about it but it seems that SFSafariViewController can show only Internet data is it true .. . Answer : You can only load url in SFSafariViewController . It s an in-app Safari . Comment : Can I create url to local resource and pass to it Comment : @daleijn Someone said you can load PDF . stackoverflow.com questions 36608389 http : stackoverflow.com questions 36608389 is-it-possible-to-load-local-pdf-file-on-sfsafariviewcontroller", "Question : I want to load SFSafariViewController inside of a tab so the tab bar is at the bottom of the entire Safari view . Is this possible I tried this with no luck : .. . .. . Is it required that the Safari view be full screen .. . Answer : Using JAL s answer as a base I was able to implement this myself in an app that had existing structure with tabs already . I wanted tab 3 to go into a Safari controller within the tab after a button was pressed on the existing view and not pop the Safari controller into its own window like it does using Apple s default code . The key was to swap in a SFSafariViewController into the existing UITabBarController s array of view controllers . I saved the existing original view controller on tab 3 index 2 to come back to it when the Done button was pressed on the Safari controller . Here s what I did to go into the Safari controller from with my tab when a button was pressed : .. . .. . Then I could swap back to the original view on that tab like this when the Done button was pressed on the Safari controller using this delegate call : .. . .. . When I swapped controllers in an out of the tabBarController view controller array I lost my tab icon and tab name so I had to set those . Here is how I fixed that issue and kept my theming when the tab icon was touched : .. . .. . I must admit that I am not sure that Apple intended that the SFSafariViewController be used in this way within a tab based on what the normal behavior of calling SFSafariViewController currently does . Just be aware that future iOS updates may change this behavior and always test your code when new iOS versions go into Beta .", "Question : null .. . Answer : In a traditional UIWebview we can easily inject javascript into the web page loaded within the web view . Is there a way to do this in SFSafariViewController SFSafariViewController works great for my needs because it can access cookies and I need this to allow an already authenticated user to access a web site . But my native iOS app has to be able to fill in form fields within the loaded web page . The native app will be responsible for launching the device camera and scanning a barcode then injecting the barcode text back into specific field on the web page . I can easily do this if I can just inject javascript into the Safari View . Any thoughts Is this something that is restricted I cannot find any info on this . thanks Comment : You could research using a custom NSURLProtocol . This can be used to intercept and handle all traffic that goes to from a normal UIWebView but I don t know if this will allow you to see and handle the traffic from a SFSafariViewController or if that traffic happens outside of the sandbox of the app . But it s worth looking into . If I had to guess though I would assume it won t work because this would basically allow someone to get private data from a user s web browser cookies and stored passwords without the user knowing . Comment : If you just want to inject some data why not route it through the URL i.e . mydomain.com path data yourdata", "Question : null .. . Answer : My app opens a SFSafariViewcontroller to presents Web content . The VC sports the standard share-button . Instead to perform the default bare sharing I would prepare a SLComposeViewController as follows for the SFSafariViewController to use . Is is possible Alternately any equivalent way to perform this Comment : You want to override the sharing functionality of SFSafariViewController", "Question : I was able to get my app to automatically load a url via the SFSafariViewController per this post http : stackoverflow.com questions 33809985 xcode-7-swift-automatically-load-site-via-sfsafariviewcontroller and it works great the only drawback is the navbar . The SFSafariViewController navbar is kind of useless when being used this way as the url is read-only and the done link doesn t do anything but reload the page . As such I would like to hide the navbar altogether . Per the comments attached to accepted answer it was suggested to set my root view controller to SFSafariViewController which I can t get working . The setup is simple as there is a single view controller with the code included in the aforementioned post . How can I hide the navbar but still maintain the benefits of the SFSafariViewController Or if I can t hide the navbar at least hide the done link Code snippet : .. . .. . ----- Works . Navbar is hidden ----- Comment : Can you subclass SFSafariViewController and hide the nav bar on viewWillAppear : Comment : I can try.. . I m hella newb at ios dev so any code-snippets would def help . Comment : You can try something like : self.navigationItem.rightBarButtonItem nil Comment : @CraigOtis : Doesn t appear to work as the Done link is still rendering . I d prefer to remove the entire nav bar . However I wonder if in the context of SFSafariViewController navbar refers to the bottom navigation menu . Comment : It shouldn t - the bottom menu is the toolbar I think a better approach might be to switch to UIWebView if you re needing a fullscreen solution . .. . Answer : Put this code in viewDidAppear : .. . .. . To hide the status bar set View controller-based status bar appearance to YES in your info.plist file and insert this in your view controller . Warning : I will suggest you against using SFSafariViewController for full screen view because reloading is not possible since reload button is in UINavigationBar . In case request fails it will render the application useless . Rather go for full screen WKWebView with custom toolbar instead . Update : To avoid hiding the reload button just add a view imageView over the done button in your SFSafariViewController and render button invisible or at least untappable . The problem with this approach is only that overlay stays on screen but if you can find a nice image for it you will be fine . Comment : Ic so the suggestion is to move the svc object up 64 pixels thereby hiding the navbar . It works . The only issue left is the prefersStatusBarHidden override doesn t seem to be working as the status bar is still rendering . Comment : I updated the answer . Comment : Got the prefersStatusBarHidden to work . Thanks . But doesn t the SFSafariViewController offer more advantages such as cookie handling and better javascript rendering via nitro The cookie handling is huge for us as we can now allow FB shares via mobile . Comment : Yes it definitely does . May be apple will give more choices in SafariServices in future . Comment : I upvoted your answer b c it solves the OP however I am going to hold off on accepting in case someone has a better solution . Thanks again for your help .", "Question : After digging a lot I am here posting my problem . I am using google sign in latest sdk in my app and the app supports iOS 8+ . I am using Xcode 7.2 currently . Recently my app got rejected with the very common reason which many users have experienced in the past : .. . .. . FROM APPSTORE .. . We noticed that the user is taken to Safari to sign in or register for an account which provides a poor user-experience . Specifically Google log in takes users to Safari to sign in . Next Steps .. . .. . 10.6 Please revise your app to enable users to sign in or register an account in the app . We recommend implementing the Safari View Controller API to display web content within your app . The Safari View Controller allows the display of a URL and inspection of the certificate from an embedded-browser in an app so that customers can verify the webpage URL and SSL certificate to confirm they are entering their sign in credentials into a legitimate page . END .. . .. . .. . I already know this rejection as apple has rejected lot of apps which are taking the Sign In flow out in the Safari browser . Here are some of the links for reference .. . https : code.google.com p google-plus-platform issues detail id 900 .. . https : github.com Torsten2217 google-plus-platform issues 900 .. . .. . and some more links you can easily find on Internet .. . .. . On May 2015 Google released a new sdk with native web view . The complete process of integration is listed here http : www.appcoda.com google-sign-in-how-to . It was working fine with iOS 8 and was presenting a controller too . Now I was using the latest google sdk which I installed via CocoaPods https : developers.google.com identity sign-in ios start .. . The above link from google has a Try Sign-In for iOS sample which I tried . It is now opening a native SFSafariViewController in iOS 9 only but in iOS 8 the login flow is again going outside the app to Safari browser . In the comments apple reviewer asked to use SafariViewController but the availability of the control is from iOS 9 and above .Here is the link https : developer.apple.com library ios documentation SafariServices Reference SFSafariViewController Ref .. . How can I achieve this with latest google sdk in iOS 8 . The reviewer has neither mentioned the iOS version he she was testing . Now can anyone help me in sorting this out . How can I manage in iOS 8 the native present controller for Google Login page . Comment : Possible duplicate of Google + iPhone API sign in and share without leaving app http : stackoverflow.com questions 15281386 google-iphone-api-sign-in-and-share-without-leaving-app Comment : @JAL cmon man . It was a 2013 post . Things have changed a lot . Just re read my question and look for the word SFSafariView Comment : Why don t you read the linked question . SFSafariViewController is only available on iOS 9 and above . For iOS 8 and below your answer lies in the linked question . Comment : @JAL Thats the answer from the apple reviewer to implement SFSafariViewController . And thats the whole question I posted in how to overcome this problem using LATEST google sdk . We dont use GTMOAuth2ViewControllerTouch now as per the new sdks . We even dont have GPPSignIn in API reference list of G+ sign In sdk . I also stated the failure of Google sdk launced in may 2015 too . Comment : I am also currently having the same problem and it s really frustrating . I am using the newest Google Sign In SDK but it doesn t show SFSafariViewController when signing into google even in iOS 9 . Did you do something particular to make it open the SFSafariViewController .. . Answer : Finally the problem is sorted out with latest Google+ Sign SDK and the app is also approved by Apple . I am posting a solution for both iOS 9 and iOS 8 . Use CocoaPods for integration . To start with login you have to do exactly the same steps mentioned in the Start Integrating Section here https : developers.google.com identity sign-in ios start-integrating .. . .. . .. . Now in the Add Sign-In part I want some custom button in my custom class of UIViewController to initiate the login process . In the developer link of Google they are redirecting in AppDelegate only . So to avoid this I will not be using GIDSignInDelegate in my AppDelegate class .. . .. . I will only be making changes in the following two methods of AppDelegate .. . .. . So the definitions will be as follows : .. . .. . Now moving on to our Custom UIViewController class i.e LoginViewController implement the GIDSignInDelegate and GIDSignInUIDelegate .. . .. . There is a custom UIButton for Google + login whose definition is .. . .. . Now the implementation of delegate methods for Google + Sign In .. . .. . Now this will work in both iOS 8 and 9 without moving your app outside to Safari for Login purpose in Google + . Comment : Thank you very much I m trying it out now . But I m curious do you have some sort of sharing feature from Google or anything like that inside your app Comment : for that you can t use Google login.you have to use Google share sdk Comment : Nah I m not using that sharing feature either . It s just because even when I use Google Sign In SDK Apple was saying it was Google+ SDK and it was one of the reasons for the app s rejection . So I was wondering if you were using somekinda sharing on your app . But anyway thank you very very much for your help . I finally got it working on my app . : D Comment : @tyegah123 The google + sdk for apple is the same as login one . great . If it helps you kindly upvote the answer .", "Question : null .. . Answer : So I am trying to detect a link click within a webView and then present this url in the new SFSafariViewController however am having some issues . Anyone got any ideas This is what I am currently doing :", "Question : I created an incredibly basic app which includes a SFSafariViewController pointing at the URL http : www.w3schools.com js js cookies.asp . This is a test website for reading and writing cookies . I then loaded the same website into Mobile Safari and added one cookie . I switched to my app read the cookie it s there . I go back to Safari add another cookie go back to my app but the second cookie hasn t appeared . I refresh the pages no difference . Go back to Safari and read the cookies they are both read successfully . Is there anything I need to do between apps in order for the cookies to be written and read properly Comment : which are the properties of the cookies look inside NSHTTPCookieStorage Comment : Is this affected by SFSafariViewController It s worth an investigation so thanks . Comment : Hey did you ever figure this out I am trying out a Safari auth method into my app and am having the same issue . Browser requests show cookies just fine but in-app SFSafariVC requests don t . .. . Answer : As Apple s document said : .. . .. . The SFSafariViewController class provides a standard interface for browsing the web . The view controller includes Safari features such as Reader AutoFill Fraudulent Website Detection and content blocking . It shares cookies and other website data with Safari . The user s activity and interaction with SFSafariViewController are not visible to your app which cannot access AutoFill data browsing history or website data . You do not need to secure data between your app and Safari . By default it s shares cookies and other website data with Safari . You don t have to do anything . Comment : okay yeah I d read that before . Thanks for sharing . Cookies are being shared about 50 of the time and usually only refresh if you force-quit and reload the app .", "Question : null .. . Answer : In the Universal Links https : developer.apple.com library ios documentation General Conceptual AppSearch UniversalLinks.html apple ref doc uid TP40016308-CH12-SW1 section of the iOS App Search Programming Guide https : developer.apple.com library ios documentation General Conceptual AppSearch index.html Apple says : .. . .. . If you instantiate a SFSafariViewController WKWebView or UIWebView object to handle a universal link iOS opens your website in Safari instead of opening your app . However if the user taps a universal link from within an embedded SFSafariViewController WKWebView or UIWebView object iOS opens your app . What does handle a universal link mean Can I not ever open the given URL with an SFSafariViewController WKWebView or UIWebView Does it only apply during - UIApplicationDelegate application : continueUserActivity : restorationHandler : or is there a timeout in-place Does this mean we can t ever open the URL in a SFSafariViewController WKWebView or UIWebView", "Question : I m making a very simple app for a demo and am trying to present a webpage using SFSafariViewController I need to use SF versus WKWebView so to be able to access cookies . I would really like to present the User with some UI buttons but I ve been unable to pull it off . I tried this snippet placed in the completion callback of presentViewController : .. . .. . .. . outlined in this post http : stackoverflow.com questions 33813129 sfsafariviewcontroller-hide-navigation-bar . In their case they re attempting to cover the reload button with a small view . Regardless of the use-case for me the view immediately disappears when I load SFSafariViewController I can see it for a moment and it disappears . I was thinking about presenting the button in an .OverContext modal but then the User would be unable to interact with the SFSafariViewController which also doesn t work . Here s essentially what I m after pardon the gross quick mockup .. . basically SafariViewController with a view presented over it see bottom .. . the transparency is just to show that it s being presented over Safari . enter image description here http : i.stack.imgur.com mdiCo.png .. . .. . Any recommendations are greatly appreciated . Comment : Wkwebview is hiding cookies from you .. . Answer : Figured it out .. . there s likely some slight race-condition going on that was preventing the recommended draw a rectangle code from working as desired . What I did : .. . .. . Subclassed SFSafariWebViewController .. . In viewDidAppear implemented a slight delay using NSTimer that draws any additional view elements .. . .. . This also ended up helping me hide the status bar which was giving me issues see mockup . Here s the relevant code :", "Question : null .. . Answer : My goal is to have content from my app on the left half of the iPad screen in landscape and on the right half have a SFSafariViewController showing a certain sports website . This code below is the relevant part of my attempt but what happens is the SFSafariViewController takes over the fullscreen despite my attempt to set the frame . What am I doing not-doing wrong p.s . go easy on me I m a n00b .. . .. . p.p.s . not using Storyboard Comment : Have a look at WKWebView instead", "Question : I try this : Can I preload the web content for Safari View Controller http : stackoverflow.com questions 35129632 can-i-preload-the-web-content-for-safari-view-controller but done button on SFSafariVC not working .. . .. . Here is swift version of Can I preload the web content for Safari View Controller http : stackoverflow.com questions 35129632 can-i-preload-the-web-content-for-safari-view-controller for me not working Done Button .. . Answer : This feature is not supported with the current implementation of SFSafariViewController . Your best option right now is to use WKWebView and begin loading before it s added to the hierarchy .", "Question : I have simple code .. . .. . I ve tested on iOS 9.3 . When I first open url I can see the page in mobile mode . enter image description here http : i.stack.imgur.com o7GNU.png Picture 1 .. . .. . Next I click Desktop . And I can see this page Picture 2 .. . .. . enter image description here http : i.stack.imgur.com tUGYw.png Picture 2 .. . .. . I restarted application and SFSafariViewController still opens page in Desktop mode Picture 2 . Can I force open the url in the mobile mode using SFSafariViewController and How Can I do this .. . Answer : The Desktop link in this context means the user will see what s he would normally see when clicking on their Macintosh or PC . This is expected behavior . If you suspend and then resume the application especially when SFSafariViewController is visible to the user the app will resume on the same page where it was left off unless you tell it to re-open the original URL which you can do by having your application delegate watch for applicationWillEnterForeground : https : developer.apple.com library ios documentation UIKit Reference UIApplicationDelegate Protocol apple ref occ intfm UIApplicationDelegate applicationWillEnterForeground : and then force reload the view controller .", "Question : null .. . Answer : I have an app that loads a web site into an SFSafariViewController . I have created a button overlay view on top of the SFViewController that contains a single button : PASTE TEXT .. . .. . When the button is selected I need it to do the same thing as a user would do if they selected a text field performed a Long press on the text field and selected Paste . I have programmatically copied text into the UIPasteboard within my code . Normally to paste the text you have to specify the UITextView you are pasting the text to : .. . .. . The problem is I am not pasting to a UITextView . I want to issue a system paste command and if the user has the text field within the SFSafariViewController in focus it will paste the text to it . And if they don t have a text field in focus it will not do anything . Any ideas Thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
openal-soft@openal@75
openal-soft -- openal-soft is a cross-platform software implementation of @placeholder 3d audio api .
{ "confidence": [ 74.19525146484375, 64.51709747314453, 63.67765808105469, 59.271995544433594, 57.38875961303711, 57.38875961303711, 57.133148193359375, 52.207977294921875, 52.207977294921875, 50.579444885253906, 50.324737548828125, 48.067623138427734, 47.96654510498047, 46.85456466674805, 46.506439208984375, 43.06173324584961, 41.9886360168457, 41.40022659301758, 41.159114837646484, 41.09659194946289, 40.19743347167969, 39.516990661621094, 37.54973602294922, 33.30299758911133, 32.30927276611328, 30.65530014038086, 28.168922424316406, 26.59892463684082, 19.74311637878418, 19.636863708496094, 19.623788833618164, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.640947341918945, 18.375070571899414, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 16.757709503173828, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 14.500596046447754, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285, 11.852898597717285 ], "content": [ "Java OpenAL is dependent upon OpenAL soft implementation .", "I want to use Openal Soft for my Android game to support realistic 3D audio .", "Since OpenAL-Soft is a software implementation of the OpenAL API I wonder if the number of sources it can generate is actually limited by the underlying hardware .", "I would like to use the hrtf functionality of Openal Soft .", "Once in android.c file from OpenAL Soft and once in qtmain android.cpp from Qt .", "This might not be such an issue if I was not using OpenAL-Soft to create my sounds .", "I m using OpenAL-Soft http : kcat.strangesoft.net openal-soft for a project and right now I m trying to decide whether I need to implement OpenAL source pooling .", "I have been using OpenAL soft for Win32 and I I ran into a particular problem .", "I have created a small sample program in C++ trying to play sounds with OpenAL Soft .", "I receiver the following message from the Openal-soft team : .. . .. . Currently version 1.16 you need to modify .alsoftrc or etc openal alsoft.conf for it to be global for all users and add : .. . .. . general hrtf true", "On OSX and iOS I m using the default library that comes for the platforms and for the rest Im using OpenAL-soft .", "It appears that OpenAL-Soft indeed does have an upper limit on the number of sources which can be defined in a config file .", "But when I tried linking with openal-soft for android which is staticly build errors raised : .. . .. . I haven t learned android or java programming so I don t know how to link a shared library without .a file openal-soft shared library only offers .so file .", "There s no way I can have a true cross-platform SFX system using OpenAL", "I m using OpenAL to play the sound .", "I just started with OpenAL-Soft https : github.com kcat openal-soft and tried to compile the code examples especially the alhrtf.c file using terminal command as : .. . .. . I got a bunch of error messages like : .. . .. . alhrtf.c : 161 : 28 : error : ALC NUM HRTF SPECIFIERS SOFT was not declared in this scope .. . .. . It seems like I need to link the hrtf lib .", "My engine is built to run and OSX Windows Linux Android and iOS Im using OpenAL to handle 3d sounds .", "As I understand it this must be achieved in OpenAL by using multiple buffers on a source .", "With OpenAL-soft for sound effects there s ALC EFX that is available but for OSX and iOS I only seems to have access to ALC ASA which is Apple specific and seems limited compare to EFX .", "Reference : .. . .. . link-to the script location : alhrtf.c https : github.com kcat openal-soft blob master examples alhrtf.c .. . I am on Ubuntu 16.04", "I m trying to use Java OpenAL library .", "I suggest you putting OpenAL and Qt into seperate shared-libraries .", "I m trying to do an application that plays sound with OpenAL .", "Java OpenAL wasn t updated for 4 years so it seemed to me that the library was simply renamed .", "Related : Got same issue on android : stackoverflow.com questions 38165186 http : stackoverflow.com questions 38165186 openal-application-crashes-hangs-when-i-pass-non-nullptr-to-albufferdata-fro", "When I debug my code I realized that when I initialize OpenAL device remains NULL .", "Source pooling is somewhat cumbersome I need to write code to allocate sources as well as somehow decide when they can be freed but necessary if the number of sources that can be generated by OpenAL is limited .", "The only references I seem to come up with are directed to the Windows Core Audio API .", "Theoretically since all mixing is done in software there might be no need to actually use one hardware channel per source .", "I would prefer to not have to add more than a 10-15 lines-of-code to just do this and appears for me to use this API I will be looking at a lot more lines-of-code .", "Here is working code which synthesizes then renders audio buffer data .. . you could play with seeing if it accommodates your necessary number of sources", "How do I enable it", "Is there some config file I have to modify", "My goal is to play a looping sound that has a one-shot intro portion similar to a .WAV file with a loop marker .", "In general my approach is to queue up both buffers then wait until the second buffer is playing and set the source to loop .", "This works but the problem is that once I am ready to stop the sound I don t seem to be able to unqueue the last buffer .", "My code looks roughly like this : .. . .. . The result seems to be that the buffer is not properly unqueued and will be heard the next time I play this source .", "I know that typically you can only unqueue a buffer after it finished playing but I would think that I could freely unqueue any buffers on a stopped sound .", "I am wondering if perhaps my use of the loop flag is causing this behavior", "I d greatly appreciate any advice .", "Thank you Mike", "It looks like there is a way around this .", "I can t unqueue the playing buffer but I can completely clear out the queue with this line : .. . .. . This will work just fine after stopping the sound .", "I m trying to make a c++ program that plays 7 sounds together .", "To do this I have 7 play button formed by Qt Designer 5.3.1 and whenever I clicked on a pushbutton it loads the sound to the corresponding buffer .", "After I checked the soundfile if it s wav file or not I m using the following code to load data to the buffer : .. . .. . And for playing the sound : .. . .. . But when I execute this code just the last loaded sound is playing .", "When I remove-if and elses from alBufferData functions then the last loaded sound plays 7 times simultaneously .", "So how can I play 7 different sound simultaneously in this case", "The program crashes when compiled in release-mode when compiled in debug mode it works .", "I m on OS X using 1.17.2 .", "I get this error message : .. . .. . SoundTest 28958 0x70000021d000 malloc : error for object 0x7fbdd26062c8 : incorrect checksum for freed object - object was probably modified after being freed .", "This is the full sample program :", "Offish topic : A useful tool : valgrind.org docs manual mc-manual.html http : valgrind.org docs manual mc-manual.html", "I found this article on MSDN regarding the CA API https : msdn.microsoft.com en-us library windows desktop dd368246 28v vs.85 29.aspx but seems to be more suited to if you are going to access the Windows APIs yourself and so far my attempts to just use IAudioSessionControl : : SetDisplayName didn t change anything since I basically just tried to use only that .", "I m trying to rebuild my Qt app for android so I choose necessitas .", "That means JNI OnLoad function is defined in multiple places .", "JNI OnLoad is special function that Android calls for each shared library when it gets load .", "Obviously you cann t have two of those .", "That way Android will call both JNI OnLoad functions correctly .", "Is that my only option", "Anyways I can use ALC EFX on iOS OSX", "I have been searching for a way to change the name displayed in the Windows volume mixer sndvol used in Win 7 preferably that would work with Vista as well .", "I am trying to not use any more OS specific APIs than I have to so I can more easily port my finished program to Linux later if I wish without having to basically just rewrite my whole program .", "Right now my program shows in the mixer but has the .exe attached to it which I think looks unprofessional .", "Is there a way I can change the display name my program appears as in Windows volume mixer", "The name in volume mixer is same as window title so you can just change your window title .", "I ve tried that it worked .", "However I m not sure about it .", "How should I proceed", "The default seems to be 256 .", "It makes sense to limit the number of sources because of the associated CPU and memory costs .", "Looks like I ll end up implementing a source pool after all .", "I just took a peek at its header .. . did not see anything pop out .", "I have a problem with importing native library called libsoft oal.so .", "I tried to build it according to their readme on github and it seems that only libopenal.so library is compiled .", "I renamed the library but with no luck .", "I think my library path is correct and I tried to run jvm with java.library.path parameter but with no luck .", "Here is the stacktrace : .. . .. . When I load the library with System.loadLibrary soft oal everythinkg works as expected .", "This is the problematic part in library : .. . .. . Is there a way to solve this without directly modifying the library", "Thanks", "I ve edited the library and everything works fine now .", "I ve also created a pull request on GitHub .", "I m using Visual Studio 13 c++ with qt-5.3.1 Add-in .", "My code doesn t give an error but there s no sound .", "So context couldn t be created .", "I m using this code for initializing : .. . .. . Also I realized that when I open my app debugger says that : .. . .. . .. . deneme2.exe Win32 : Loaded C : Windows System32 wrap oal.dll .", "Cannot find or open the PDB file .", ".. . deneme2.exe Win32 : Unloaded C : Windows System32 wrap oal.dll .. . .. . .. . What can be the problem", "If you help me I will be so happy .", "Thanks in advance .", "So my question is what compiler-flags do i have to set", "I d be very grateful for some help .", "provide commands executed and error messages found .", "Try to be clear on your question and actually make a question .", "Sorry for the bad first post .", "I tried to compile with : g++ alhrtf.c -o hrtf -lalut -lal -lalc -lopenal -std c++11 and got a lot of error messages like : alhrtf.c : 161 : 28 : error : ALC NUM HRTF SPECIFIERS SOFT was not declared in this scope .", "no need to be sorry I ve edit your question with information you provided ." ] }
{ "confidence": [ 88.47767639160156, 86.64908599853516, 82.62652587890625, 79.67903900146484, 69.6556625366211, 64.29259490966797, 60.246612548828125, 59.85138702392578, 56.37593078613281, 50.06144714355469, 39.43931198120117, 38.912811279296875 ], "content": [ "Question : I want to use Openal Soft for my Android game to support realistic 3D audio . I would like to use the hrtf functionality of Openal Soft . How do I enable it Is there some config file I have to modify .. . Answer : I receiver the following message from the Openal-soft team : .. . .. . Currently version 1.16 you need to modify .alsoftrc or etc openal alsoft.conf for it to be global for all users and add : .. . .. . general hrtf true", "Question : null .. . Answer : My engine is built to run and OSX Windows Linux Android and iOS Im using OpenAL to handle 3d sounds . On OSX and iOS I m using the default library that comes for the platforms and for the rest Im using OpenAL-soft . With OpenAL-soft for sound effects there s ALC EFX that is available but for OSX and iOS I only seems to have access to ALC ASA which is Apple specific and seems limited compare to EFX . Is that my only option There s no way I can have a true cross-platform SFX system using OpenAL Anyways I can use ALC EFX on iOS OSX", "Question : I m using OpenAL-Soft http : kcat.strangesoft.net openal-soft for a project and right now I m trying to decide whether I need to implement OpenAL source pooling . Source pooling is somewhat cumbersome I need to write code to allocate sources as well as somehow decide when they can be freed but necessary if the number of sources that can be generated by OpenAL is limited . Since OpenAL-Soft is a software implementation of the OpenAL API I wonder if the number of sources it can generate is actually limited by the underlying hardware . Theoretically since all mixing is done in software there might be no need to actually use one hardware channel per source . However I m not sure about it . How should I proceed .. . Answer : I just took a peek at its header .. . did not see anything pop out . Here is working code which synthesizes then renders audio buffer data .. . you could play with seeing if it accommodates your necessary number of sources", "Question : I m using OpenAL-Soft http : kcat.strangesoft.net openal-soft for a project and right now I m trying to decide whether I need to implement OpenAL source pooling . Source pooling is somewhat cumbersome I need to write code to allocate sources as well as somehow decide when they can be freed but necessary if the number of sources that can be generated by OpenAL is limited . Since OpenAL-Soft is a software implementation of the OpenAL API I wonder if the number of sources it can generate is actually limited by the underlying hardware . Theoretically since all mixing is done in software there might be no need to actually use one hardware channel per source . However I m not sure about it . How should I proceed .. . Answer : It appears that OpenAL-Soft indeed does have an upper limit on the number of sources which can be defined in a config file . The default seems to be 256 . It makes sense to limit the number of sources because of the associated CPU and memory costs . Looks like I ll end up implementing a source pool after all .", "Question : I m trying to rebuild my Qt app for android so I choose necessitas . But when I tried linking with openal-soft for android which is staticly build errors raised : .. . .. . I haven t learned android or java programming so I don t know how to link a shared library without .a file openal-soft shared library only offers .so file . .. . Answer : That means JNI OnLoad function is defined in multiple places . Once in android.c file from OpenAL Soft and once in qtmain android.cpp from Qt . JNI OnLoad is special function that Android calls for each shared library when it gets load . Obviously you cann t have two of those . I suggest you putting OpenAL and Qt into seperate shared-libraries . That way Android will call both JNI OnLoad functions correctly .", "Question : I m trying to use Java OpenAL library . I have a problem with importing native library called libsoft oal.so . Java OpenAL is dependent upon OpenAL soft implementation . I tried to build it according to their readme on github and it seems that only libopenal.so library is compiled . Java OpenAL wasn t updated for 4 years so it seemed to me that the library was simply renamed . I renamed the library but with no luck . I think my library path is correct and I tried to run jvm with java.library.path parameter but with no luck . Here is the stacktrace : .. . .. . When I load the library with System.loadLibrary soft oal everythinkg works as expected . This is the problematic part in library : .. . .. . Is there a way to solve this without directly modifying the library Thanks .. . Answer : I ve edited the library and everything works fine now . I ve also created a pull request on GitHub .", "Question : null .. . Answer : I have created a small sample program in C++ trying to play sounds with OpenAL Soft . The program crashes when compiled in release-mode when compiled in debug mode it works . I m on OS X using 1.17.2 . I get this error message : .. . .. . SoundTest 28958 0x70000021d000 malloc : error for object 0x7fbdd26062c8 : incorrect checksum for freed object - object was probably modified after being freed . This is the full sample program : Comment : Offish topic : A useful tool : valgrind.org docs manual mc-manual.html http : valgrind.org docs manual mc-manual.html Comment : Related : Got same issue on android : stackoverflow.com questions 38165186 http : stackoverflow.com questions 38165186 openal-application-crashes-hangs-when-i-pass-non-nullptr-to-albufferdata-fro", "Question : null .. . Answer : I just started with OpenAL-Soft https : github.com kcat openal-soft and tried to compile the code examples especially the alhrtf.c file using terminal command as : .. . .. . I got a bunch of error messages like : .. . .. . alhrtf.c : 161 : 28 : error : ALC NUM HRTF SPECIFIERS SOFT was not declared in this scope .. . .. . It seems like I need to link the hrtf lib . So my question is what compiler-flags do i have to set I d be very grateful for some help . Reference : .. . .. . link-to the script location : alhrtf.c https : github.com kcat openal-soft blob master examples alhrtf.c .. . I am on Ubuntu 16.04 Comment : provide commands executed and error messages found . Try to be clear on your question and actually make a question . Comment : Sorry for the bad first post . I tried to compile with : g++ alhrtf.c -o hrtf -lalut -lal -lalc -lopenal -std c++11 and got a lot of error messages like : alhrtf.c : 161 : 28 : error : ALC NUM HRTF SPECIFIERS SOFT was not declared in this scope . Comment : no need to be sorry I ve edit your question with information you provided .", "Question : I have been using OpenAL soft for Win32 and I I ran into a particular problem . My goal is to play a looping sound that has a one-shot intro portion similar to a .WAV file with a loop marker . As I understand it this must be achieved in OpenAL by using multiple buffers on a source . In general my approach is to queue up both buffers then wait until the second buffer is playing and set the source to loop . This works but the problem is that once I am ready to stop the sound I don t seem to be able to unqueue the last buffer . My code looks roughly like this : .. . .. . The result seems to be that the buffer is not properly unqueued and will be heard the next time I play this source . I know that typically you can only unqueue a buffer after it finished playing but I would think that I could freely unqueue any buffers on a stopped sound . I am wondering if perhaps my use of the loop flag is causing this behavior I d greatly appreciate any advice . Thank you Mike .. . Answer : It looks like there is a way around this . I can t unqueue the playing buffer but I can completely clear out the queue with this line : .. . .. . This will work just fine after stopping the sound .", "Question : I have been searching for a way to change the name displayed in the Windows volume mixer sndvol used in Win 7 preferably that would work with Vista as well . This might not be such an issue if I was not using OpenAL-Soft to create my sounds . The only references I seem to come up with are directed to the Windows Core Audio API . I am trying to not use any more OS specific APIs than I have to so I can more easily port my finished program to Linux later if I wish without having to basically just rewrite my whole program . Right now my program shows in the mixer but has the .exe attached to it which I think looks unprofessional . I found this article on MSDN regarding the CA API https : msdn.microsoft.com en-us library windows desktop dd368246 28v vs.85 29.aspx but seems to be more suited to if you are going to access the Windows APIs yourself and so far my attempts to just use IAudioSessionControl : : SetDisplayName didn t change anything since I basically just tried to use only that . I would prefer to not have to add more than a 10-15 lines-of-code to just do this and appears for me to use this API I will be looking at a lot more lines-of-code . Is there a way I can change the display name my program appears as in Windows volume mixer .. . Answer : The name in volume mixer is same as window title so you can just change your window title . I ve tried that it worked .", "Question : null .. . Answer : I m trying to make a c++ program that plays 7 sounds together . To do this I have 7 play button formed by Qt Designer 5.3.1 and whenever I clicked on a pushbutton it loads the sound to the corresponding buffer . I m using OpenAL to play the sound . After I checked the soundfile if it s wav file or not I m using the following code to load data to the buffer : .. . .. . And for playing the sound : .. . .. . But when I execute this code just the last loaded sound is playing . When I remove-if and elses from alBufferData functions then the last loaded sound plays 7 times simultaneously . So how can I play 7 different sound simultaneously in this case", "Question : null .. . Answer : I m trying to do an application that plays sound with OpenAL . I m using Visual Studio 13 c++ with qt-5.3.1 Add-in . My code doesn t give an error but there s no sound . When I debug my code I realized that when I initialize OpenAL device remains NULL . So context couldn t be created . I m using this code for initializing : .. . .. . Also I realized that when I open my app debugger says that : .. . .. . .. . deneme2.exe Win32 : Loaded C : Windows System32 wrap oal.dll . Cannot find or open the PDB file . .. . deneme2.exe Win32 : Unloaded C : Windows System32 wrap oal.dll .. . .. . .. . What can be the problem If you help me I will be so happy . Thanks in advance ." ] }
[ "yes-answer-long", "yes-answer-short" ]
openal
UNK_RELATION
iccube@server@37
iccube -- a java in-memory olap mdx @placeholder coupled with a modern web tablet reporting javascript solution .
{ "confidence": [ 44.898990631103516, 38.822998046875, 38.730899810791016, 38.21942138671875, 38.026607513427734, 37.961971282958984, 37.231361389160156, 36.73395538330078, 35.80756378173828, 35.43025207519531, 34.38763427734375, 34.27804183959961, 33.71328353881836, 33.09130859375, 32.714385986328125, 32.68733215332031, 32.09217071533203, 31.819499969482422, 31.54823875427246, 31.41440200805664, 31.372215270996094, 31.18927764892578, 30.994430541992188, 30.994430541992188, 30.793548583984375, 30.474201202392578, 30.274253845214844, 30.154258728027344, 30.154258728027344, 30.154258728027344, 30.13552474975586, 30.13552474975586, 30.096416473388672, 30.005901336669922, 29.76291275024414, 29.726360321044922, 29.593992233276367, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 28.90129280090332, 28.89037322998047, 28.89037322998047, 28.79833221435547, 28.63015365600586, 28.616607666015625, 28.5756893157959, 28.5357608795166, 28.5357608795166, 28.508344650268555, 28.003276824951172, 27.864421844482422, 27.706745147705078, 27.706745147705078, 27.667091369628906, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.254493713378906, 27.248432159423828, 27.064464569091797, 26.770360946655273, 26.68667984008789, 26.68667984008789, 26.68667984008789, 26.68667984008789, 26.538352966308594, 26.230770111083984, 26.230770111083984, 26.230770111083984, 25.881000518798828, 25.856449127197266, 25.815711975097656, 25.815711975097656, 25.682727813720703, 25.581647872924805, 25.433982849121094, 25.433982849121094, 25.433982849121094, 25.433982849121094, 25.406505584716797, 25.366626739501953, 25.366626739501953, 25.310646057128906, 25.304943084716797, 25.218971252441406, 25.16358184814453, 25.16358184814453 ], "content": [ "My icCube version : icCube Web Reporting : 5.1.1 6 : 2229", "How can i do that in icCube OLAP .", "Note 2 : You can deploy the icCube Web Reporting application with you Web App HTML files in Apache and configure the Web Reporting for accessing icCube server elsewhere worth a different question .", "On top of my head you would need to change the location of the icCube GVI servlet to access the report definition and the OLAP engine for the MDX requests .", "i am using iccube reporting .", "My question is : is there a way to do this with amCharts combo in relation with the MDX setting of icCube", "I would try the request in the icCube MDX editor .", "Note 2 your Web App will contain the icCube Web Reporting application as well .", "Is there any way to add a JAR to icCube install to make it available to MDX JAVA integration JDBC data source etc.. .", "example enclosed you need to activate javascript in icCube", "I am using icCube 5.0 Reporting .. . 2 .", "But then IcCube does not load because .. . .. . When doing so however the level pk office appears on the treeview of the MDX designer .", "Follow-up question to this http : stackoverflow.com questions 33824150 iccube-how-to-do-authentication-for-iccube-using-an-apache-web-server .", "First third and forth solutions are suitable for non-embedded iccube-reporting .", "I want to get selected items from iccube-dropdown-widget with javascript .", "Follow-up question to this http : stackoverflow.com questions 33824150 iccube-how-to-do-authentication-for-iccube-using-an-apache-web-server .", "My application is based on the live demo for web reporting http : demo3.iccube.com icCube doc tutorial ic3report-tutorial.html provided by IcCube therefore it s using explicit JavaScript authentication it s getting the demo user data through ic3.getDemoDataSourceSettings .", "Working with an amchart bubble in iccube reporting If I leave the default balloon behavior I get", "Add MDX Filters ICCUBE Drop-down widget and configure it s settings in needed way .", "I am trying to make a dynamic chart in icCube in which bubbles are sized and colored in accordance with a specific data field in the MDX result set .", "Is it really not possible in icCube", "If it can help troubleshooting.. . We are using iccube on windows 2008R2 Web Server and use 64bits Java build 1.8.0 77-b03 .. . What is your OS Remco", "If this is implemented in a future version of IcCube", "It happens in the background of icCube", "I tried to create a Sankey diagram using icCube reporting but everything I try is not working.. .", "In icCube the table is an attribute of the dimension not of the hierarchy .", "Thanks to this post : Assigning a value to an icCube Event in Reporting http : stackoverflow.com questions 29536121 assigning-a-value-to-an-iccube-event-in-reporting .. . .. . I m able to get the current username in a widget using a constant not an event .", "I want to assign the value of an Event to that returned by the icCube MDX function UserName --sort of like @ eventname UserName .", "Inside iccube i can type in the mdx query and get a nicely formatted table with column names etc .", "Note : Renaming a drillthrough column is available in icCube since 5.x doc http : www.iccube.com support documentation mdx Drillthrough.php", "Enclosed a sample chart with two series in which one has colored bubbles : example http : live.amcharts.com M3MGI .. . .. . Is it possible in icCube web reporting to do this and if so how", "In the icCube Web Reporting you can set a graph and chart to respond on a click row column cell event and inidcate what must be done when the widget receives a click .", "MemberValue is not supported in icCube properties are as fast", "Environment : I am using icCube version 5.2 with Java 8 on Windows .", "Remco with the Community Edition the memory is limited to 512Mb just contact icCube support directly with the log files .", "Using icCube reporting I would like to enable some users to only have right to save selections.. .", "In the icCube.4.0 folder is all the information stored of the IcCube server .", "According to icCube the schema s are using around 140MB and 100MB .", "there is no way to add MSOLAP provider as plugin in icCube", "EDITION : This feature will be supported in upcoming version of icCube .", "In IcCube there is a Time Wizard with an option to index by range .", "It would surely help with showing changelogs in IcCube .", "Unfortunately I couldn t open the schema in IcCube .", "Is this - or something similar - possible with IcCube", "I m not familiar with iccube but it would be easily doable in amCharts .", "Id s in icCube are more like ic3-131 .", "Following the answers on my previous question in June http : stackoverflow.com questions 30725575 can-you-make-the-bubble-size-and-color-dependend-on-a-mdx-measure-in-iccube-amch I would like to use the icCube HSL formula http : www.iccube.com support documentation mdx HSL.php to define the colors of the chart members in the amChart widget .", "Example MDX result set : the x y coordinates have been removed for the sake of simplicity : .. . .. . I do not know how to do this now in the amChart widget in icCube but I know it is possible to do this in amCharts itself .", "As icCube is using jQuery here is a possible solution using the when done feature of jQuery .", "After trying to work through the IcCube documentation http : www.iccube.com support documentation reporting doc ic3WebAppIntegration.php on the matter I am just as confused as before .", "2 . icCube Authentication Servlet Filter : Does this config extract belong to IcCube or Apache", "Logging into my icCube interface solves the errors as that authorizes my browser session to get data from my icCube server .", "offline http : www.iccube.com support documentation user guide using offline cubes.php schemas cubes are saved within the icCube application directory icCube-4.0 offline .", "This will be replaced by icCube once the event changes .", "The Application page is hosted on a server different to the IcCube-server .", "Is the MDX statement row axis the products", "Sorry I am such an MDX rookie .", "is your olap server free", "We are using icCube 5.1.8 and are having problems with loads that seem to freeze .", "The Postgresql server it loads from is not running any query for the icCube server .", "check iccube logs for this you ll see a lot of Full GC", "But I haven t an idea about the process of adding plugin in icCube .", "I set up a new instance of IcCube and got everything working .", "How do I do something like .. . .. . with icCube ETL", "To change this you need to modify icCube.xml and restart icCube Server .", "The current icCube pivot-table widget shows the children below the parent .", "I am using icCube 5.0.1 and in the process of upgrading to 5.1 .", "I use Pyramid not icCube so this may be way of the mark", "I created a new widget in icCube working as desired when there is data.. .", "I ve some troubles printing custom made widgets on top of icCube .", "In MDX there is an function that allows for showing the hierarchy as you describe Hierarchize http : www.iccube.com support documentation mdx Hierarchize.php with the POST flag .", "No idea what iccube is .", "i can get the last update via mdx .", "Works for me at 5.2 2997 : demo3.iccube.com icCube doc tutorial http : demo3.iccube.com icCube doc tutorial ic3report-tutorial.html ic3demo Click Edit report at the bottom of a page and than try the first code block .", "icCube s example MDX colors http : i.stack.imgur.com 7ZO8B.png", "Would it help to rewrite the MDX showing the color in the resultset", "Your last MDX statement : .. . .. . is the same as .. . .. . Why", "Let s take a simple MDX : .. . .. . returning values : .. . .. .", "you ve a debugger in icCube have you tried to used it", "Apache will have to forward calls related to accessing the reports in icCube .", "The interface states : HTTP ERROR : 500 Problem accessing icCube service.gwt .", "configuration and let non-authenticated requests reaching the icCube server .", "You can for example configure Apache to forward everything related to icCube as following : .. . .. . Then the communication between Apache and icCube is secured using Servlet Filters that are part of icCube configuration icCube.xml : .. . .. . The first filter can be used for all services but GWT for GWT you can use the second one .", "You can find an schema example in this link https : drive.google.com open id 0B r0yHhOf9vBbk1GTU9zMkZsZWM using a Javascript view as described here http : localhost : 8282 icCube help user guide schemas cubes etl javascript.html .", "After downloading icCube I get the following message : icCube is damaged and can t be opened .", "In the icCube dashboards you can fire the event do Select All event in an icCube Buttons widget .", "is there a way to authenticate and execute mdx via some sort of api", "It works only in reporting mode .", "For now I solved it by starting the load from the scheduler at icCube startup with a delay of 15 seconds .", "You can contact icCube http : www.icCube.com contact for more details and or to request this feature .", "By default this directory is located within the home-directory of the OS user running the icCube process .", "I understand that other products have such a feature role-playing dimensions but I can t find such functionality in icCube .", "Solution .. . .. . So you re looking for the Minus operation on subcubes : .. . .. . Minus can be performed with the SubcubeMinus http : www.iccube.com support documentation mdx SubCubeMinus.php functions .", "Reason : javax.servlet.ServletException : icCube authentication icCube-icc-users error : missing user credentials I assume there s something fundamentally wrong with the configurations in our current system any ideas", "I did not find any sankey example in icCube demo http : www.iccube.com livedemo .. . No more on the icCube documentation http : www.iccube.com support documentation viz viz doc viz20GoogleVisualizationCharts.php .. . .. . .. . Can someone provide a working example", "min max open close and will need Java to be active in icCube doc http : www.iccube.com support documentation mdx integration java integration.php", "Manual reference : http : www.iccube.com support documentation mdx DaysBetween.php .. . .. . Any hints", "I am currently trying to set up a Web Application to display reports on an intranet site using the intranet login to authenticate users passing the authorization process to icCube .", "I have an icCube setup icCubeRepository.xml to use Postgres as JCR repository .", "I tried to configure a folder containing CSV files as datasource in icCube ." ] }
{ "confidence": [ 55.236366271972656, 53.66994857788086, 52.71405029296875, 51.7961311340332, 50.2259407043457, 50.2259407043457, 48.01957702636719, 46.08951950073242, 45.95983123779297, 45.62886428833008, 45.104248046875, 44.319297790527344, 43.68327331542969, 43.30354309082031, 43.272071838378906, 41.59040451049805, 41.43109893798828, 41.426963806152344, 41.32646942138672, 40.12739181518555 ], "content": [ "Question : I set useMdxMemberColors to yes in the widget and the colors do not change . enter image description here http : i.stack.imgur.com qTFWy.png .. . .. . The mdx colors are defined in the builder like this : .. . .. . enter image description here http : i.stack.imgur.com EKy5O.png .. . .. . I think this is a bug but if not is there a workaround or am I doing something wrong My icCube version : icCube Web Reporting : 5.1.1 6 : 2229 .. . Answer : It s working see image or check live http : www.iccube.com livedemo ic3reportName Using 20MDX 20Schema 20Colors . Is the MDX statement row axis the products icCube s example MDX colors http : i.stack.imgur.com 7ZO8B.png", "Question : Follow-up question to this http : stackoverflow.com questions 33824150 iccube-how-to-do-authentication-for-iccube-using-an-apache-web-server . I am currently trying to set up a Web Application to display reports on an intranet site using the intranet login to authenticate users passing the authorization process to icCube . I m trying to get it to work with a local install of xampp apache using basic auth and a local install of icCube . My scripts are based on icCube s live demo http : demo3.iccube.com icCube doc tutorial ic3report-tutorial.html ic3reportName World 20Economy . When I start my Web App with an empty Cache Cookies the App is unable to load throwing me a lot of errors similar to these : WebApp errors http : i.stack.imgur.com 37iwY.png .. . .. . The reason for these errors is the fact that the GET-requests for the resources are answered with code 401 which is a text html . This means that my WebApp is not authorized to fetch the .css and similar resources from the icCube-server . Logging into my icCube interface solves the errors as that authorizes my browser session to get data from my icCube server . Is there any workaround for this problem As far as I know the resource URIs are generated from the ic3root and ic3rootLocal passed to the ic3Start-function on the html-page which means that I can not just pack all the .css-files into my apache folder and link them . Is it possible to authorize my WebApp to get these resources based on the same authorization process used to get my report selection proxy configuration .. . Answer : It looks like because Apache does not secure the icCube URLs with its Basic Auth . configuration and let non-authenticated requests reaching the icCube server . Note 1 : You can access public HTML resources i.e . with no authentication required . For that you can use the icCube.xml property see doc . in the file . Note 2 : You can deploy the icCube Web Reporting application with you Web App HTML files in Apache and configure the Web Reporting for accessing icCube server elsewhere worth a different question . Comment : With Note 1 do you mean rewriting the ic3bootstrap.js to fetch all scripts etc . from the public directory instead of the default Also can I find documentation on your Note 2 anywhere Sounds like a reasonable solution too . Comment : Conceptually Note 1 would be very much similar to Note 2 . Note 2 your Web App will contain the icCube Web Reporting application as well . On top of my head you would need to change the location of the icCube GVI servlet to access the report definition and the OLAP engine for the MDX requests . Worth a different question . Comment : The easy way out was placing the .js-resources in Apache Note2 for this I put the lib-folder in Apaches file system and changed the ic3root and ic3rootLocal to the new folder .", "Question : When I am editing a report I can click on Report Code to see information about the report structure . It loks like this : .. . .. . How can I access this Information with Javascript context . report apparently doesn t give this information . Also is there a way to get the information what MDX statements are used in the different charts of a report And can this be altered with Javascript .. . Answer : To get report guts add this code to the Report Code : .. . .. . As for handling mdx request before send it s kinda harder . Again in ReportCode : .. . .. . In this function item is widgetAdapter with info about the widget and request is request instance . Comment : 1 . The Javascript tells me that event.value is undefined . if I console.log event I get only Object type : null name : ic3-report-init value : undefined 2 . Where do you get your knowledge from . Is there some Text I can read to learn more about stuff like this Comment : @UlrichWuenstel What version of reporting you are using Comment : I tried it with 5.1.7 and 5.2 Comment : Works for me at 5.2 2997 : demo3.iccube.com icCube doc tutorial http : demo3.iccube.com icCube doc tutorial ic3report-tutorial.html ic3demo Click Edit report at the bottom of a page and than try the first code block . Comment : I set up a new instance of IcCube and got everything working . That s a gamechanger :", "Question : I am trying to make a dynamic chart in icCube in which bubbles are sized and colored in accordance with a specific data field in the MDX result set . Example MDX result set : the x y coordinates have been removed for the sake of simplicity : .. . .. . I do not know how to do this now in the amChart widget in icCube but I know it is possible to do this in amCharts itself . You can set for example the following attributes in the amCharts editor : .. . .. . Alpha field Bullet field Bullet size field Description field Fill colors field Label color field Line color field .. . etc see for more in the amCharts live editor . Enclosed a sample chart with two series in which one has colored bubbles : example http : live.amcharts.com M3MGI .. . .. . Is it possible in icCube web reporting to do this and if so how .. . Answer : Yes it is possible : .. . .. . The table should look like this : .. . .. . example data http : i.stack.imgur.com 2Hm1B.png .. . .. . In your amCharts bubble widget add the following in Graph : .. . .. . and set use mdx colors to no . color field http : i.stack.imgur.com h7Kql.png .. . .. . I named my colorField kleur . Any value here is possible but it has to be the same as the column name that contains the colors .", "Question : I am trying to make a dynamic chart in icCube in which bubbles are sized and colored in accordance with a specific data field in the MDX result set . Example MDX result set : the x y coordinates have been removed for the sake of simplicity : .. . .. . I do not know how to do this now in the amChart widget in icCube but I know it is possible to do this in amCharts itself . You can set for example the following attributes in the amCharts editor : .. . .. . Alpha field Bullet field Bullet size field Description field Fill colors field Label color field Line color field .. . etc see for more in the amCharts live editor . Enclosed a sample chart with two series in which one has colored bubbles : example http : live.amcharts.com M3MGI .. . .. . Is it possible in icCube web reporting to do this and if so how .. . Answer : Yes you can just you have to write the following into the Extra Options field : .. . .. . Note that your graphs defined above will be overwritten by this one you have to specify here all the graph settings . Comment : Thanks both Istv n and Tom .", "Question : In the icCube Web Reporting you can set a graph and chart to respond on a click row column cell event and inidcate what must be done when the widget receives a click . In this particular case I have the rows ordered based on a parameter . But when I click on the row in the graph the children are displayed without any order . I found the following workaround but it helps only with a named measure not a parameter : .. . .. . use navigation strategy MDX iso children and use : .. . .. . ORDER member.children measures . amount BASC .. . .. . the following gives an MDX error : .. . .. . ORDER member.children @ PARAMETER BASC .. . .. . The cause for the error is that it does not replace the @ PARAMETER with the actual value . Visual explenation http : i.stack.imgur.com DEWD4.png .. . .. . Is there any other way workaround to get this working in icCube A live working example explaining the questiuon can be found here http : demo.inside-vision.nl icCube doc ic3report ic3demo name 2Fshared 2FStackOverflow 2FStack 20- 20order 20issue .. . Answer : Sorry it s a limitation - bug - in the current version : http : issues.iccube.com issue ic3pub-165 .. . .. . Will be fixed in 5.1.2", "Question : 1 . I am using icCube 5.0 Reporting .. . 2 . I want to assign the value of an Event to that returned by the icCube MDX function UserName --sort of like @ eventname UserName . 3 . Eventually @ eventname : reportParm will be sent to a launched report for use in a filter . Does anyone have any hints for me .. . Answer : There is no clean way already in todo http : issues.iccube.com issue ic3pub-142 list .. . .. . For the time being there is no clean way . You ve to create a Constant - not an event - in Configuration Constants that you call for example .. . .. . Assign a javascript expression .. . .. . So you ve now an event with the name of the user as value you can use . Comment : Thank you . This worked perfectly . Be sure to make a constant and not an event .", "Question : I am currently in the process of writing a WebApp to access reports from our ICCube-System . The Application page is hosted on a server different to the IcCube-server . The server is currently a local Apache server xampp using Basic Auth to authenticate users before they can access my htdocs . I would like my Apache to do the authentication while icCube s internal authorization manages report access with only a single login being required . My application is based on the live demo for web reporting http : demo3.iccube.com icCube doc tutorial ic3report-tutorial.html provided by IcCube therefore it s using explicit JavaScript authentication it s getting the demo user data through ic3.getDemoDataSourceSettings . After trying to work through the IcCube documentation http : www.iccube.com support documentation reporting doc ic3WebAppIntegration.php on the matter I am just as confused as before . The related page on Apache configuration lists possible configurations for Apache icCube but I don t understand which I should use advantages disadvantages and if all of them even work with our server setup . 1 . Apache Configuration Overview : If I set these proxy parameters in my server config what exactly is forwarded to IcCube 2 . icCube Authentication Servlet Filter : Does this config extract belong to IcCube or Apache What exactly are these filters doing Any help with the issue or pointers to a more in-depth documentation would be greatly appreciated . .. . Answer : You Web App i.e . Apache will have to forward calls related to accessing the reports in icCube . You can for example configure Apache to forward everything related to icCube as following : .. . .. . Then the communication between Apache and icCube is secured using Servlet Filters that are part of icCube configuration icCube.xml : .. . .. . The first filter can be used for all services but GWT for GWT you can use the second one . Here is an extract of a possible icCube.xml : .. . .. . Hope that helps . Comment : I currently pass my user data explicitly to ic3.Reporting like this : var dsSettings ic3.getDemoDataSourceSettings dsSettings.url gviUrl var ic3reporting new ic3.Reporting noticesLevel : ic3.NoticeLevel.ERROR dsSettings : dsSettings How would I change this paragraph to work with the servlet solution I assume I still need a similar piece of code to have getAllReportNames get what the user is authorized to access . Comment : Not sure to understand why you would need an explicit login . Apache Basic Auth . is performed meaning the GVI requests sent by your Javascript files will be authenticated on the server-side meaning the list of reports returned depends on the authenticated user . Comment : Does that mean I can leave dsSettings as undefined Comment : Ok I configured a local test install of IcCube and Apache similar to your example and it seems to work . I can t test it properly due to different problems which I m about to post in seperate questions . Thanks for the help so far Comment : Update : after testing the configurations with our live system the icCube is no longer accessible neither via standard online interface nor via apache-hosted WebApp . The interface states : HTTP ERROR : 500 Problem accessing icCube service.gwt . Reason : javax.servlet.ServletException : icCube authentication icCube-icc-users error : missing user credentials I assume there s something fundamentally wrong with the configurations in our current system any ideas I rolled back to an earlier iccube.xml for now .", "Question : 1 . I am using icCube 5.0 Reporting .. . 2 . I want to assign the value of an Event to that returned by the icCube MDX function UserName --sort of like @ eventname UserName . 3 . Eventually @ eventname : reportParm will be sent to a launched report for use in a filter . Does anyone have any hints for me .. . Answer : From version 5.0.3 you can use the new syntax . For user name : .. . .. . also you can access the report s name by Comment : Very nice additions . Thank you .", "Question : Is there any way to add a JAR to icCube install to make it available to MDX JAVA integration JDBC data source etc.. . .. . Answer : You ll have to add the JAR into the icCube lib directory and possibly t update accordingly the CLASSPATH : .. . .. . Windows .exe .. . .. . Windows .bat .. . .. . Linux .. . .. . MacOS", "Question : I have the following code for a dropdown menu that lists month . When the user selects an option an event called month should be fired . How can i do that in icCube OLAP . .. . Answer : There are several possibilities how you can achieve needed functionality .. . .. . On Cell Click Functionality .. . .. . There is special attribute that allows to click on specific data cell called ic3a read more.. . http : www.iccube.com support documentation viz viz doc viz24HtmlWidgetFrame.php .. . .. . You should specify event name for on Cell Click : month in options Events tab . External Code .. . .. . If you have access to ic3Reporting instance .. . .. . for example : .. . .. . and want to handle current functionality with code on your site you can fire ic3-internal events in such way : .. . .. . ic3 FILTER Widget .. . .. . Suitable when you want to get list of predefined months from cube . Add MDX Filters ICCUBE Drop-down widget and configure it s settings in needed way . ic3 ACTION Widget .. . .. . This option is suitable when you have specific list of months . Just create Tools Utilities Actions Drop-down widget and provide needed months at Items Wizard options tab and set month as value to on Selection event name at Events tab . Comment : Thanks for the reply . Could you please tell me if it is possible to do this within the report itself Comment : First third and forth solutions are suitable for non-embedded iccube-reporting . If I m missing something could you please clarify what you are trying to achieve . Comment : I tried the following select for var col 0 col d.colCount col++ option ic3a fireClick 0 col value Time . Month . month . d.colLabel col d.colLabel col option select But firing event works only with buttons not with select . Any idea how to make it work with select", "Question : null .. . Answer : I created a new widget in icCube working as desired when there is data.. . But when the underlying MDX returns no data I need to tell it to the user or to show something else.. . .. . .. . How can I catch the fact that the MDX is in error or that it does not return any value Comment : It s currently not possible unless you hack the widget . We ll keep this in mind for the upcoming version Comment : Good to read this could be possible in future versions.. . In the meantime how would you hack the widget Comment : Changing directly the code of the widget it s the advantage of Javascript .", "Question : I want to create a cube Data Source based on an existing OLAP Database in SQL server analysis services . I tried to access the Database throw a http access but I couldn t do it . So I tried to add jdbc4olapndriver as plugin to connect with DATABASE with same researches I found that we can use it like follows : jdbc : jdbc4olap : http : server : port OLAP msmdpump.dll . But I haven t an idea about the process of adding plugin in icCube . Any help or suggestion please thank you .. . Answer : Accessing SQL server tables is performed through a JDBC driver www http : www.iccube.com support documentation user guide schemas cubes ds database.php . So create a new SQL data source and select the SQL Server driver . Then enter amongst other the address of the SQL server and leave blank the port-number default : 1433 . Note : the URL you re talking about msmdpump.dll has nothing to do with tables in SQL server but this is related to accessing OLAP cubes for example from Excel . Hope that helps . Comment : I want to Access SSAS Database wich contain OLAP cubes with iceCube not accessing an SQL Server tables Comment : This is not possible . Comment : there is no way to add MSOLAP provider as plugin in icCube in this case we can connect with DB because the problem is only that we haven t a provider for OLAP DB .", "Question : I am always getting a single value in MDX query using python . I am connecting to icCube which has xmla support . why does it always return a single value .. . Answer : Are you sure the MDX query is expected to return more than one cell .. . .. . Client Country on rows means the default member of Client Country so I believe this will return a single cell result . I would try the request in the icCube MDX editor . Hope that helps . Comment : Thanks for the suggestion . I was able to modify the query and test in MDX editor . I still don t know why the python xmla package doesn t return column names from res object . Inside iccube i can type in the mdx query and get a nicely formatted table with column names etc . In the python interface it s just values .", "Question : We are using icCube 5.1.8 and are having problems with loads that seem to freeze . Until now only with Load on startup . There are only 2 schemas that load on startup . Normally one loads in 1 minute and the other in 14 minutes . But now they both will not finish even after several hours . Last info in the log is LOAD SCHEMA PHASE I full-load started .. . .. . The machine is not busy on disk and no CPU . The Postgresql server it loads from is not running any query for the icCube server . In the builder I can open a schema but if I want to browse a simple dimension it freezes . I solved it by disabling load on startup and deployed loaded the schema from the builder . We use 64 bits Java 1.8.0 77 . Is this a known problem Other things I can check Thanks Comment : are you running out-of-memory check iccube logs for this you ll see a lot of Full GC Comment : No we are not running out-of-memory we were before but I stopped many loads . The Java settings are with 2GB max heap . According to icCube the schema s are using around 140MB and 100MB . For now I solved it by starting the load from the scheduler at icCube startup with a delay of 15 seconds . Comment : We have the same problem as Remco.. . If it can help troubleshooting.. . We are using iccube on windows 2008R2 Web Server and use 64bits Java build 1.8.0 77-b03 .. . What is your OS Remco Comment : We are running on Windows 2012 R2 . We have same Java version as you also 64 bits . Comment : Remco with the Community Edition the memory is limited to 512Mb just contact icCube support directly with the log files . .. . Answer : This is more likely related to this issue http : issues.iccube.com issue ic3pub-241 . This will be fixed in the upcoming 5.2 version . In the meantime as a workaround use the scheduler to load the schema and ensure the load of the schema is starting after the Docs repository has been initialized .", "Question : I need to combine the results of 3 MDX requests named mdx1 mdx2 and mdx3 before displaying them . How do I wait for the 3 processes to complete before calling the display method Is it possible to call the executeRequest method synchronously Here is the code-structure : .. . Answer : As icCube is using jQuery here is a possible solution using the when done feature of jQuery .", "Question : Is it possible in icCube to name the columns returned from a drillthrough statement . Now they are just technical names and it is not end-user friendly .. . Answer : This is currently not possible on the server-side with the MDX request . You ll have to check how to do that in your client if possible . Note : Renaming a drillthrough column is available in icCube since 5.x doc http : www.iccube.com support documentation mdx Drillthrough.php Comment : Ok I allready managed this in the client but a download to excel of the same data did not copy the client names . Thanks", "Question : I have got the following dynamic chart see attached picture . For the sake of reproducability I have created a very simple chart based on the standard icCube s sales model . The idea is to have two facts on the column axes with the data for the selected years . To distinguish between the facts I want to assign a color to the facts that fades over the years . When you add years the new year will get the color that belongs-to the fact but a little bit lighter . The screenprints below will clarify . My question is : is there a way to do this with amCharts combo in relation with the MDX setting of icCube .. . .. . In the attachments you see two graphs : this is what I intend http : i.stack.imgur.com vAId9.png .. . .. . but when I de-select 2008 this happens : this happens the issue http : i.stack.imgur.com 2BEe2.png .. . .. . I have included the JSON so you can reproduce this in the Sales demo on a plain vanilla icCUbe 5.1.2 installation . .. . Answer : It s not possible in the current version of reporting 5.1.2 . What we re looking here is to use different palettes depending on the selection . You have to create a new graph for every column to specify the valueField and the color for it . But the number of columns are changing so we don t know how many graph should be defined . Comment : Would it help to rewrite the MDX showing the color in the resultset WITH MEMBER Stats . Stats-Extra . color as ff0000 -- this will be a formula I device MEMBER Measures . Amount2 AS 1.1 amount SELECT Stats . Stats-Extra . L-Stats-Extra . Value Stats . Stats-Extra . color Measures . Amount Measures . Count Time . Year . Year . 2008 Time . Year . Year . 2009 Time . Year . Year . 2010 ON COLUMNS Product . Product . Article .allmembers ON ROWS FROM Sales Comment : I could also store the color in the background property of the cell . Would that be a hook to tackle this question Comment : yes you can specify the colorField in the graph and just put there the column name", "Question : Thanks to this post : Assigning a value to an icCube Event in Reporting http : stackoverflow.com questions 29536121 assigning-a-value-to-an-iccube-event-in-reporting .. . .. . I m able to get the current username in a widget using a constant not an event . But I can t retrieve it in the report s javascript.. . .. . .. . Is there a way to do that I need it to be able to show or hide some widgets depending on which user or role is connected.. . .. . Answer : To get current username paste this code into Report Javascript Comment : Accepted answer Txs .", "Question : Using IcCube I need to create pre-selections that I ll include in the reports so that my users they don t need to go selecting many many parameters to get their most used selections . I created a STATS Dimension GroupMaladies containing 1 Hierarchy Maladies . Using the folowing commands I can create category members in advanced scripts of cube that I can use after in my reports .. . .. . multiple codes from same hierarchy same level .. . .. . multiple codes from same hierarchy different levels .. . .. . multiple codes from multiple dimensions .. . .. . A whole hierarchy minus 1 or some of it s components .. . .. . Now I would like to use a whole hierarchy but exclude from it some values from another hierarchy of the same Dimension : .. . .. . But this last scenario is not working Anyone can help on this .. . Answer : In icCube you have a set of functions for building categories that allow for basic set operations on facts or subcubes . Your last MDX statement : .. . .. . is the same as .. . .. . Why The minus is applied between a set of members - using the Except http : www.iccube.com support documentation mdx Except.php function - and not applied to facts or subcubes as we re looking for . Solution .. . .. . So you re looking for the Minus operation on subcubes : .. . .. . Minus can be performed with the SubcubeMinus http : www.iccube.com support documentation mdx SubCubeMinus.php functions . Feel free to check other set operations as intersect union complement and symmetrical difference . Comment : Thxs Ic3 I managed it with SubCubeMinus ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
ghost.py@web-applications@119
ghost.py -- ghost is a webkit client written in python it provides people making a python based application to access @placeholder .
{ "confidence": [ 47.4789924621582, 39.772125244140625, 39.34649658203125, 39.07304763793945, 35.498573303222656, 35.44619369506836, 33.777008056640625, 32.545352935791016, 32.39717102050781, 31.718881607055664, 31.57891082763672, 30.853347778320312, 30.83697509765625, 30.83697509765625, 30.476367950439453, 30.338205337524414, 30.192691802978516, 29.82842254638672, 28.90019416809082, 28.771188735961914, 28.437572479248047, 28.34726905822754, 28.305856704711914, 28.167861938476562, 28.167861938476562, 28.167861938476562, 27.821964263916016, 27.750782012939453, 27.74891471862793, 26.702163696289062, 26.702163696289062, 26.48093032836914, 26.42268180847168, 26.079524993896484, 26.079524993896484, 26.01537322998047, 26.01537322998047, 26.01537322998047, 26.01537322998047, 26.01537322998047, 26.01537322998047, 26.01537322998047, 25.893985748291016, 25.684768676757812, 25.550884246826172, 25.23807144165039, 25.131183624267578, 25.105514526367188, 25.105514526367188, 25.103824615478516, 25.101091384887695, 25.08144760131836, 25.08144760131836, 24.864093780517578, 24.864093780517578, 24.864093780517578, 24.864093780517578, 24.858171463012695, 24.718055725097656, 24.378829956054688, 24.378829956054688, 24.35456657409668, 24.35456657409668, 24.3441162109375, 24.3441162109375, 24.3441162109375, 24.3441162109375, 24.15869903564453, 24.01812744140625, 23.828353881835938, 23.828353881835938, 23.735157012939453, 23.735157012939453, 23.71533966064453, 23.60875701904297, 23.4842529296875, 23.4842529296875, 23.442121505737305, 23.346038818359375, 23.346038818359375, 23.346038818359375, 23.346038818359375, 23.20328712463379, 23.19283676147461, 23.19283676147461, 23.19283676147461, 22.99734878540039, 22.745738983154297, 22.731847763061523, 22.48358917236328, 22.30880355834961, 22.21713638305664, 22.194759368896484, 22.194759368896484, 22.092945098876953, 22.092945098876953, 22.092945098876953, 22.092945098876953, 22.092945098876953, 22.092945098876953 ], "content": [ "ghost.py http : jeanphix.me Ghost.py is a webkit client .", "Try making a Python file with just from ghost import Ghost in it .", "Using Python 3.4.2 and Ghost.py .", "i am using python and ghost for it .", "I m trying to get started with the Ghost.py https : github.com jeanphix Ghost.py blob master ghost ghost.py headless-browser on a Mac .", "However the key component other than the standard python library is Ghost.py http : jeanphix.me Ghost.py .", "I make a small xss detector in Python with ghost.py library .", "According to the Ghost.py source code https : github.com jeanphix Ghost.py blob 5660e1db64376dfca5b6521fdf361422d7db8f0f ghost ghost.py L23 : .. . .. . binding is defined when at least one of PySide or PyQt4 is installed .", "Then try running that under pdb like python -m pdb import-ghost.py .", "You need to literally call the install for Ghost.py since the module isn t named ghost through PyPi https : pypi.python.org pypi Ghost.py 0.1.1 .", "How can I handle this with Ghost.py", "Read the Ghost documentation http : jeanphix.me Ghost.py carefully and make sure that you re using the library in the correct way .", "IMHO homebrew installed PyQt to python instance A while pip installed Ghost.py to instance B .", "I m using Ghost.py .. . .. . When I run the above script Python crashes : .. . .. . How can I find the source of this problem", "I m scripting access to a site using ghost.py and upon clicking a link window.open is called .", "I want to try Ghost.py http : jeanphix.me Ghost.py .", "See : Ghost.py http : jeanphix.me Ghost.py .", "The raise is on line 830 on the current version in github : https : github.com jeanphix Ghost.py blob dev ghost ghost.py Check out the if else statements preceding that and you should be able to see what I mean", "Try running ghost from a python program instead of from ipython or other interactive prompt .", "If in Ghost.py the way of making tcp connections based on Qt api then you may use Qt PySide api see QNetworkProxy : : setApplicationProxy .", "Can I load HTML on Ghost.py .. . .. . If I use BeautifulSoup get the HTML code how to load it on Ghost.py .", "it has already discussed in this question ghost.py and proxy http : stackoverflow.com questions 21263960 ghost-py-and-proxy but the answer does not appear clear to me .", "sudo pip install Ghost.py .. . .. . I launched Python and confirmed that I can import PySide .", "I ve found it in the ghost.py file .", "I m having an issue with Ghost.py .", "I have choosen Ghost.py for this .", "I am learning to use python-2.7 and ghost.py to do some web-scraping I googled ghost.py a lot but I found very little documentation or help on use it which gives my a bumpy ride when learning ghost.py .", "The current version of Ghost.py 0.2.3 is supposed to have fixed this .", "I have tried pip install pyside and then pip install ghost but I guess it worked only for an old python-2.7 .", "Is anyone able to explain how to make Ghost.py http : jeanphix.me Ghost.py work with a proxy", "Installed pySide Flask and paste modules and got Ghost.py with command pip install Ghost.py eventually .", "Then you will be able to use Ghost : .. . .. . Note : Do make sure that you have OpenSSL installed before any installation of Python where you intend to use Ghost .", "Well I didn t see this question on time maybe you could have used Ghost.py", "I m trying to use Ghost.py to do some web-scraping .", "But I need to do it with the ghost.py module .. . .. . This code sample doesn t work :", "Is it possible to run imacro firefox script inside ghost.py", "Try to give Ghost.py the full address of this extensions folder .", "For example did you use pip install Ghost.py", "I am using ghost.py to take a screencapture of a webpage .", "there is command pip install Ghost.py which is not working", "Using pip install --pre Ghost.py made it work .", "it starts from my need to use ghost.py .", "Seem like people are reporting similar issues to yours without really getting any explanation for example : https : github.com jeanphix Ghost.py issues 26 .. . .. . Adjust the evaluate line to the following which is referenced by a ghost.py documentation :", "Figured python was python haha I will try that when I get home :", "github.com jeanphix Ghost.py commit https : github.com jeanphix Ghost.py commit 0af36cff0dd39d5e05f6d012868907905d01a7a6 diff-9abba704801dc0e59ef9b8874f1c6b98L437", "The Ghost.py https : github.com jeanphix Ghost.py headless-browser allows you to download both a page s source code as well as the all of the embedded content associated with it ie .", "Ghost seems to not be importing properly .", "I m using Python 3 .", "But export is not a Python command", "You can switch it on with : Ghost display True .", "However when I do from ghost import Ghost it fails to find PySide : .. . .. . By doing import PySide print PySide it appears that PySide is installed here on my system : Library Python 2.7 site-packages PySide .", "i saw this code in the documentation : .. . .. . this code is definitely not python .", "@BurhanKhalid he is using python where both are available .", "Can anyone enlighten me a bit on ghost.py", "I need PySide in order to use Ghost.py .", "I m trying to install Ghost.py in CentOS 7 .", "for instance using cookielib to store a cookie on the ghost.py session", "Downloading unpacking ghost.py Could not find a version that satisfies the requirement ghost.py from versions : 0.1a 0.1a2 0.1a3 0.1b 0 .1b2 Cleaning up.. . No distributions matching the version for ghost.py Storing complete log in C : Users user pip pip.log .. . .. . installed : PySide 1.2 PyQt4-4.10.2-gpl-Py3.3-Qt4.8.4-x32.exe python-3.3 .. . .. . How do i do next", "I m using Ghost.py for filling form .", "This seems to be an issue either with ghost or qt .", "cant understand your ghost code", "No problems if you use python-3.3 .", "So does this give a Python traceback", "So right now I use ghost.py to load the whole page .", "Is it possible and if yes how can I use ghost.py to extract the page", "How do I tell Ghost.py to call stopImmediatePropagation on that event", "I am using Ghost.py and PySide to capture full screen browsers .", "I am getting error .. . .. . root@alok : pip install Ghost.py .. . Downloading unpacking Ghost.py Could not find a version that satisfies the requirement Ghost.py from versions : 0.1a 0.1a2 0.1a3 0.1b 0.1b2 0.1b3 .. . Cleaning up.. . .. . No distributions matching the version for Ghost.py .. . Storing complete log in root .pip pip.log .. . .. . I have installed PySide too still I am not able to install Ghost.py using pip install Ghost.py using pip is so straight forward but I am not able to figure out what is wrong this time .", "Is there a way to fix this in Ghost.py PySide", "I create some snippet here : https : github.com jeanphix Ghost.py issues 273 .. . .. . But it s not final solution .", "I currently using ghost.py and they have a function show when I call it shows the website but instant close it .", "Did you try to look what ghost is doing by enabling the graphical output", "I m using ghost package in my script for scraping a website .", "For this example I know it is easier to use requests or similar python-module .", "Since ghost seems to have issues when running in interactive shell I use .. . .. . print result .. . .. . to pipe output to file : .. . .. . python getMetObservation.py proper result .. . .. . This is my python code : .. . .. . from ghost import Ghost .. . url http : metservice.com maps-radar local-observations local-3-hourly-observations .. . gh Ghost wait timeout 60 .. . page resources gh.open url .. . result resources gh.evaluate document.getElementsByClassName obs-content .. . print result .. . .. . When examining the file it does contain what I am after but it also contains a huge amount of information I am not after .", "My current answer is : maybe ghost.py works .", "However Ghost.py still cannot find PySide .", "I noticed when running my script that after about 25 pages I start getting Ghost : : Qt : : Qthread errors and even before that it seems like ghost is not consistent meaning : basically ghost is used to extract a phone-number from a simple page looking like this : .. . .. .", "Would ve been nice to work in Python but oh well .", "I just gave it a shot with python 3 and it worked .", "some C extension or even python itself segfaulted .", "Check that PyCharm is using the correct Python interpreter .", "Using Fedora 21 and Python-3.4.3 .", "I had no problems with BeautifulSoup but can t make Ghost.py into work", "Maybe someone has used ghost.py and had similar problem .", "I m using ghost.py to get the output of an html page and render it to a png .", "I m trying to use ghost.py to scrape a website using a script that works on my local machine : .. . .. . However when I add it to my web app I get the obscenely long error below and Python crashes .", "Windows always lacks the most basic tools that everyone else s OSes come with so most probably something based on urllib2 in python would be a good test .", "thanks i downloaded it installed PyQt4 then cloned ghost but for some reason when trying to import ghost it didnt recognize that i have PyQt4 .", "I have a link http : bank.hangseng.com 1 PA 1 1 P1 ComSvlet MiniSite eng gif app eINVCFundDetailsOV pri fund code U44217 http : bank.hangseng.com 1 PA 1 1 P1 ComSvlet MiniSite eng gif app eINVCFundDetailsOV pri fund code U44217 that I am learning to extract the data inside using python now I have come to ghost.py .", "I am using Ghost.py http : jeanphix.me Ghost.py to try and incorporate efficient tests of the Javascript calculations into the Django test suite : .. . .. . where frobnicate is a Javascript function on the test page .", "I m getting ImportError : No module named ghost", "You seem to have two python-2.7 installations .", "No I only have one python install .", "Ghost.py is correctly installed though it can t find it s module http : i.stack.imgur.com 7mnoW.png", "For command-line noobs like me here s how to use --pre : pip install --pre Ghost.py", "So I commented this https : github.com jeanphix Ghost.py commit bc0688274b7aeb6aa077927a09ce4ce75f1c3ede commitcomment-4951119 .", "Otherwise if Ghost.py not using Qt Api but for example curl libe then you try to set environment variable http-proxy", "However ghost.py takes a long time to open this web page which is much longer than opening this page on some browsers .", "For example I found the method create page but only in an online documentation that seems a bit outdated http : carrerasrodrigo.github.io Ghost.py ." ] }
{ "confidence": [ 56.297035217285156, 54.0583610534668, 50.30833435058594, 49.86919403076172, 48.12371063232422, 46.99358367919922, 44.260826110839844, 43.738990783691406, 42.99616622924805, 42.83850860595703, 42.66850280761719, 42.15822219848633, 40.52992630004883, 39.86907196044922, 39.86891174316406, 39.58189392089844, 38.33091735839844, 37.83605194091797, 37.21819305419922, 37.21098327636719 ], "content": [ "Question : I m trying to get started with the Ghost.py https : github.com jeanphix Ghost.py blob master ghost ghost.py headless-browser on a Mac . I installed Ghost.py and its dependencies using these links commands : .. . .. . 1 . Qt 5.0.1 for Mac http : qt-project.org downloads has a GUI installer .. . 2 . PySide 1.1.0 http : qt-project.org wiki Category 3aLanguageBindings 3a 3aPySide 3a 3aDownloads which requires Qt Version 4.7.4 has a GUI installer .. . 3 . sudo pip install Ghost.py .. . .. . I launched Python and confirmed that I can import PySide . However when I do from ghost import Ghost it fails to find PySide : .. . .. . By doing import PySide print PySide it appears that PySide is installed here on my system : Library Python 2.7 site-packages PySide . So appended the PYTHONPATH like this : .. . export PYTHONPATH PYTHONPATH : Library Python 2.7 site-packages for PySide . However Ghost.py still cannot find PySide . How can I convince Ghost.py to find my installation of PySide .. . .. . .. . .. . Environment : .. . .. . Mac OS X 10.7.5 .. . Python 2.7 .. . Qt 5.0.1 .. . PySide 1.1.0 Comment : Try making a Python file with just from ghost import Ghost in it . Then try running that under pdb like python -m pdb import-ghost.py . Then step through it seeing if you can find what particular import statement within ghost.py fails . Comment : Aha it fails when trying to do from PySide import QtWebKit . It looks like the real problem is that PySide s WebKit wrapper can t find a suitable QtWebKit binary on my system . I m seeing if I can find the appropriate path for QtWebKit now . Comment : I installed Qt 4.8 instead of Qt 5.0.1 from this link http : qt-project.org downloads and PySide started working properly . Comment : Im getting the same error and I have installed Qt 4.8.5 from the same link but to no effect . .. . Answer : I faced the exact same problem but managed to fix it . Here is how : .. . .. . 1 . Uninstall the current installation of PySide and qt on your system . Make sure PySide is not present in Library Python 2.7 site-packages . 2 . Install qt and PySide from http : qt-project.org wiki PySide Binaries MacOSX . PS : My system is running 10.9 Mavericks but I think it should work in 10.7 Mountain Lion as well .", "Question : i am doing a project in which i need to get the information from webpages . i am using python and ghost for it . i saw this code in the documentation : .. . .. . this code is definitely not python . which language is it and where i can learn how to configure it how can find a string from the tags eg . in : .. . .. . thanks . Comment : If the output you receive is a string then I think you should have a look at the common string operations in python . You can strip split and do a lot of things with a string . docs.python.org 2 library string.html https : docs.python.org 2 library string.html Comment : looks like javascript Comment : @PadraicCunningham your analysis seems correct to me too . Comment : i want to get string from title STRING title . when i posted the question i tried to post it like this but it automatically skipped title tags . Comment : @user1934948 my answer gets the string . .. . Answer : ghost.py http : jeanphix.me Ghost.py is a webkit client . It allows you to load a web page and interact with its DOM and runtime . This means that once you have everything installed and running you can simply do this :", "Question : I have installed new system and time has come to install Python and modules I have lost. . I had no problems with BeautifulSoup but can t make Ghost.py into work Using Fedora 21 and Python-3.4.3 . I have tried pip install pyside and then pip install ghost but I guess it worked only for an old python-2.7 . Also pip3 install. . respectively . It would be awesome if any of you could help me install this module : .. . Answer : You need to literally call the install for Ghost.py since the module isn t named ghost through PyPi https : pypi.python.org pypi Ghost.py 0.1.1 . Python2 : .. . .. . Python3 : .. . .. . Note : You may need to use sudo to install pip . Then you will be able to use Ghost : .. . .. . Note : Do make sure that you have OpenSSL installed before any installation of Python where you intend to use Ghost . See : Ghost.py http : jeanphix.me Ghost.py . Comment : I m getting ImportError : No module named ghost Comment : @Fred see the updated answer for instructions on how to handle for Python3 . Make sure you check which versions of python and pip you re using . Comment : python3.4 -m ensurepip Ignoring ensurepip failure : pip 6.0.8 requires SSL TLS Comment : I have openssl installed. . What can I do Comment : What I ve seen is that with this error it either works or you need to reinstall Python3.4 . Could you provide the version number of openssl as well", "Question : I am writing a script and having trouble even getting a basic one to work . Ghost seems to not be importing properly . I keep getting the following error : .. . .. . Nothing special in the code : .. . .. . I have PySide and PyQt both installed and I install Ghost by doing : sudo pip install ghost .. . Answer : According to the Ghost.py source code https : github.com jeanphix Ghost.py blob 5660e1db64376dfca5b6521fdf361422d7db8f0f ghost ghost.py L23 : .. . .. . binding is defined when at least one of PySide or PyQt4 is installed . Check you PySide PyQt4 not PyQt5 installation using following import statement : .. . .. . BTW causing NameError instead of Exception with the message Ghost.py requires PySide or PyQt4 is a bug . So I commented this https : github.com jeanphix Ghost.py commit bc0688274b7aeb6aa077927a09ce4ce75f1c3ede commitcomment-4951119 . Comment : So both importing PySide and PyQt4 did not work . I installed them using homebrew eg . brew install pyqt . It is there another way I should have installed them for it to work Comment : @Zaheer I don t know about homebrew . IMHO homebrew installed PyQt to python instance A while pip installed Ghost.py to instance B . Comment : Will look into this - thanks", "Question : Ghost.py is supposed to run JS : http : jeanphix.me Ghost.py .. . .. . require.js gets fetched over http but as far as I can tell it doesn t get run since js main.built never gets fetched and none of its specified JS files get loaded . It all works perfectly in a real browser . I also tried loading https : mail.google.com : Comment : Have you found a solution for this Comment : Nope so I just switched to PhantomJS . Would ve been nice to work in Python but oh well . Comment : Which browser s does the JS work correctly on Comment : Firefox Chrome IE . I tried other pages with JS on them and those didn t work either . .. . Answer : Try running ghost from a python program instead of from ipython or other interactive prompt . This seems to be an issue either with ghost or qt .", "Question : Is anyone able to explain how to make Ghost.py http : jeanphix.me Ghost.py work with a proxy I ve checked out the code but it s not there . Comment : do you have any update on set proxy It remains very unclear on my side . If you want to specify one I do something like ghost Ghost wait timeout 20 then ghost.set proxy type http host http : myproxy.net port 7676 but page res ghost.open gives a page None result Comment : @ColonelBeauvel Are you sure of the proxy and it s port to know that they are working Comment : Yes completely sure since they are working when I use urllib2 to scrap some static data with proxy . So the proxy and port are correct I guess I am doing something wrong with ghost but do not know what .. . Comment : @ColonelBeauvel I don t have any working proxy to test it out now . I would do that as soon as I m able to and then get back to you with the results . Sorry for the inconvenience . .. . Answer : If in Ghost.py the way of making tcp connections based on Qt api then you may use Qt PySide api see QNetworkProxy : : setApplicationProxy . Otherwise if Ghost.py not using Qt Api but for example curl libe then you try to set environment variable http-proxy", "Question : I m using ghost package in my script for scraping a website . Since I have many pages to scrape ghost is used many times about 30 times per page and I might have hundreds of pages to scrape . I noticed when running my script that after about 25 pages I start getting Ghost : : Qt : : Qthread errors and even before that it seems like ghost is not consistent meaning : basically ghost is used to extract a phone-number from a simple page looking like this : .. . .. . this is how the webpage looks like - I m extracting this phone http : i.stack.imgur.com s09l7.png .. . .. . I m suspecting that its about overloading memory or something like that but I must admit that I m new to Python and not skilled enough in programming I come from Hardware world . Has anyone encounter this type of problems I know ghost has a method called remove page that should remove the page created but I have tried using it and I think its not working or I m missing something here is a code where I try using this remove and after removing I can still use the object : .. . .. . After running this and typing page I would expect not to have any page defined . How do I release resources delete the page even delete the gh object created .. . Answer : The current version of Ghost.py 0.2.3 is supposed to have fixed this . However versions past 0.1.2 have some errors with loading certain websites . Running the Ghost.py code in it s own Process will fix these memory issues on older version : .. . .. . If you need to get data back from the Process you ll have to look into using a multiprocessing Queue .", "Question : it has already discussed in this question ghost.py and proxy http : stackoverflow.com questions 21263960 ghost-py-and-proxy but the answer does not appear clear to me . I have ghost installed and also have a proxy the host is host http : XXXXXXXX and port 7676 . But I get an empty html string . I also tried with ghost.set proxy type https host host port port but it fails html string remains empty . When home with no proxy and thus without the line ghost.set proxy type http host host port port it works . I am udner a Win 64 Bits OS with the proxy already settled in Advanced Settings . Would you have any idea of what I am missing .. . Answer : Most HTTP libraries use the proxy you specify in the corresponding environment variable so running .. . .. . should help on unixoid systems at least . When you use something like wget to access the URL through a proxy and still get an empty reply make sure your proxy is configured correctly you re using the right credentials and your remote-server is not behaving strangely with things that are behind a proxy which I wouldn t assume with google . EDIT : just realized : You re only setting a HTTPS proxy some elements on the page you re requesting might be fetched via HTTP not S and without a proxy for that this might fail . Comment : But export is not a Python command I am on Windows and already configure the proxy in advanced settings but seems like Qt is not detecting it automatically . Comment : That s why I recommended checking the proxy functionality with something simpler than ghost.py . Windows always lacks the most basic tools that everyone else s OSes come with so most probably something based on urllib2 in python would be a good test . Comment : Nope urllib2 does not handle javascript and dynamic scrapping . The proxy works with urllib2 with proxy support urllib2.ProxyHandler proxies opener urllib2.build opener proxy support urllib2.install opener opener . But that s not the point . I am talking aobut ghost.py under - I should have mentionned it - a WinOS . Comment : Hm the point is that I was assuming that your empty reply stems from something that goes wrong long before the first line of html javascript or whatever would be received as misconfigured proxies are the nr . 1 error reason when one of my customers has a problem with our automated downloader . Comment : It is sure it comes from the proxy I clearly said it in the question .", "Question : I m using Ghost.py .. . .. . When I run the above script Python crashes : .. . .. . How can I find the source of this problem Comment : I was wondering if you have found the cause of the crash I bumped into these mysterious crashes recently . Comment : @sqd sorry but i I have not found a solution of this problem still . I use selenium instead now .. . Answer : Usually when you get crashes like this instead of regular Python exceptions http : docs.python.org 2 tutorial errors.html the problem is somewhere in the C code and usually in a third party library . You have provided a minimal program that produces your error which is great . I ve never used Ghost myself so this answer is just my best guesses since you haven t gotten any other answers yet . Try to make your program even more minimal . Does the following program also crash If not are you using one of the methods the wrong way Read the Ghost documentation http : jeanphix.me Ghost.py carefully and make sure that you re using the library in the correct way . For example I found the method create page but only in an online documentation that seems a bit outdated http : carrerasrodrigo.github.io Ghost.py . There is some documentation here as well http : ghostpy.readthedocs.org en latest . Get the latest version of the library and use the included documentation or generate it yourself . .. . .. . Finally the documentation also says the following about PyQt PySide : .. . .. . First you need to install PyQt or PySide . This will require to install the QT framework first . You can find PyQt in the following link http : www.riverbankcomputing.com software pyqt download .. . .. . So the problem might also be with your PyQt PySide installation but that s not a question for StackOverflow I think .", "Question : null .. . Answer : after searching for an answer and since i m new to python and not knowledgeable enough i really need help with this . it starts from my need to use ghost.py . for this installation i need PyQt and before that i need SIP installed . so when downloading SIP http : www.riverbankcomputing.com software sip download i tried following the instructions and got to a point where after running python configure.py i need to run make and then make install . my question is - where can i get teh software to run make i tried GNU make - can this work because it seem to fail giving me gibberish... . .. . .. . installing PyQt also requires this so it will help me twice : .. . .. . thanks in advance Sivan Comment : If you just want to install PyQt then there is a binary package on riverbank no need to install SIP Comment : thanks i downloaded it installed PyQt4 then cloned ghost but for some reason when trying to import ghost it didnt recognize that i have PyQt4 . so i just installed PySide and it worked . i cant say if what i did is ok but for now ghost seems to be working so.. . thank you for your quick answer .", "Question : Is anyone able to explain how to make Ghost.py http : jeanphix.me Ghost.py work with a proxy I ve checked out the code but it s not there . Comment : do you have any update on set proxy It remains very unclear on my side . If you want to specify one I do something like ghost Ghost wait timeout 20 then ghost.set proxy type http host http : myproxy.net port 7676 but page res ghost.open gives a page None result Comment : @ColonelBeauvel Are you sure of the proxy and it s port to know that they are working Comment : Yes completely sure since they are working when I use urllib2 to scrap some static data with proxy . So the proxy and port are correct I guess I am doing something wrong with ghost but do not know what .. . Comment : @ColonelBeauvel I don t have any working proxy to test it out now . I would do that as soon as I m able to and then get back to you with the results . Sorry for the inconvenience . .. . Answer : Documentation says that QNetworkProxy.DefaultProxy : Proxy is determined based on the application proxy set using setApplicationProxy So if proxy is set by QNetworkProxy : : setApplicationProxy then the call set proxy default will make to use it it will pass the proxy to self.manager which I guess is the QNetworkAccessManager object . Comment : So does this mean that if I set an https proxy without specifying that the QNetworkAccessManager will understand that its https", "Question : For starters I strongly dislike whoever made that website builder called ghost cause it makes this topic so annoying to search . Anyways I am trying these instructions http : ghostpy.readthedocs.org en latest and it seems like I m good . Step 1 get PyQt I have anaconda so that is already there . Just to play it safe I start by typing in cmd : .. . .. . and finally .. . .. . It returns saying : .. . .. . Step 2 Install Flask . I have pearl as well...so it needs the .exe .. . .. . returns : .. . .. . I guess that means it s there Step 3 install paste .. . .. . returns : the same thing as Flask .. . .. . Step 4 Install Ghost.py tried the previously mentioned instructions said it didn t exist . After digging around it looks like using the same method pip.exe install Ghost.py is the way to go I do that and again cmd tells me the same think as Flask and paste same path and everything . So I copy and paste the exact example in the instructions first mentioned into pycharm and I guess we re gonna look at ebay...well I navigate to the directory that my python script is in and when I attempt to run the file it says : .. . .. . So that s where I m at . What am I missing Where do I go from here Just as a side measure I also installed PySide using anaconda it installed and gave me the same result as above . Thank you in advance for the help Y all are great Comment : Check that PyCharm is using the correct Python interpreter . Since it sounds like you ve installed the required packages into Anaconda you need to make sure you re using C : Users your name Anaconda python.exe Comment : Ah didn t think of that . Figured python was python haha I will try that when I get home : .. . Answer : Ghost.py is considered to be pre-release by pip so you need to use the --pre flag : Comment : Please add some explanatory text to your code . This ensures everyone will be able to understand it and avoid unnecessary downvotes .", "Question : Trying to get the weather data from : http : metservice.com maps-radar local-observations local-3-hourly-observations .. . .. . Did find example here http : stackoverflow.com questions 17608572 web-scraping-dynamic-content-with-python on how to use Ghost for web-scraping dynamic-content but I have not found out how to handle the result . Since ghost seems to have issues when running in interactive shell I use .. . .. . print result .. . .. . to pipe output to file : .. . .. . python getMetObservation.py proper result .. . .. . This is my python code : .. . .. . from ghost import Ghost .. . url http : metservice.com maps-radar local-observations local-3-hourly-observations .. . gh Ghost wait timeout 60 .. . page resources gh.open url .. . result resources gh.evaluate document.getElementsByClassName obs-content .. . print result .. . .. . When examining the file it does contain what I am after but it also contains a huge amount of information I am not after . It is also not clear how to use the variable result that evaluate returns . Inspecting ghost.py it seems to be handled by .. . .. . self.main frame.evaluateJavaScript s script .. . .. . in : .. . .. . def evaluate self script : .. . Evaluates script in page frame . .. . : param script : The script to evaluate . .. . return .. . self.main frame.evaluateJavaScript s script .. . self . release last resources .. . .. . .. . When I execute the command : .. . .. . document.getElementsByClassName obs-content .. . .. . in a Chromium console I get the correct response . I am a beginner when it comes to python but willing to learn . Also note that I am running this in a python virtual environment under Ubuntu if it matters . .. . Answer : Note I post this as answer since my current solution is to use the iMacros extension and save the webpage locally and then perform the scraping on the now static data using BeautifulSoup . The original question was on how to use Ghost to work on the dynamic page but since I did not get so far I found another solution which can be of use for others . The iMacro content which I named GetWeather.iim : .. . .. . VERSION BUILD 8881205 RECORDER FX .. . TAB T 1 .. . URL GOTO http : www.metservice.com maps-radar local-observations local-3-hourly-observations .. . WAIT SECONDS 5 .. . SAVEAS TYPE CPL FOLDER FILE + NOW : yyyymmdd hhnnss .. . .. . shellscript called from crontab : .. . .. . bin bash .. . export DISPLAY : 0.0 .. . usr bin firefox .. . sleep 5 usr bin firefox imacros : run m GetWeather.iim .. . sleep 10 .. . wmctrl -c Mozilla Firefox .. . .. . together with a python script doing the actual web-scraping using BeautifulSoup . updated with proper way of stopping firefox without it to revert to safe mode as instructed in first answer to thread http : stackoverflow.com questions 19516212 how-to-gently-kill-firefox-process-on-linux-os-x", "Question : Downloading unpacking ghost.py Could not find a version that satisfies the requirement ghost.py from versions : 0.1a 0.1a2 0.1a3 0.1b 0 .1b2 Cleaning up.. . No distributions matching the version for ghost.py Storing complete log in C : Users user pip pip.log .. . .. . installed : PySide 1.2 PyQt4-4.10.2-gpl-Py3.3-Qt4.8.4-x32.exe python-3.3 .. . .. . How do i do next Comment : Please be much clearer about your problem your environment and what you have done to install ghost.py otherwise you not likely to get an answer . For example did you use pip install Ghost.py Which version of Windows Comment : when i installed manually using the zip from github Through the python setup.py bulid python setup.py install command is successful thank you for your comment .. . Answer : You may want to try the --pre option of pip install if you are getting this in your pip.log : Comment : This did it thanks Comment : For command-line noobs like me here s how to use --pre : pip install --pre Ghost.py", "Question : What I m doing is this : .. . .. . I m getting an unsupported field tag error Comment : Why are you replacing the spaces with dots I d expect something like the answer to this question instead : stackoverflow.com questions 596314 jquery-ids-with-spaces http : stackoverflow.com questions 596314 jquery-ids-with-spaces Comment : beccause df b-K b-K-Xb URaP8 editable is class selector i think space must replace with dot Comment : yup. . you re right : stackoverflow.com questions 4695812 http : stackoverflow.com questions 4695812 edit-css-style-of-an-element-with-a-space-in-its-class-name .. . Answer : Based on the github source your element is being found otherwise you d get a can t find element for error However ghost.py allows only certain HTML tags for use with the set field value . . method : select textarea and input of various types . Since you re you re attempting it on a DIV it throws the unsupported tag error exception . The raise is on line 830 on the current version in github : https : github.com jeanphix Ghost.py blob dev ghost ghost.py Check out the if else statements preceding that and you should be able to see what I mean Comment : no i dont understand i just want post in g00gle plus page im able login and click on popup frame then i got stuck im new to programming Comment : Then you ll have to select another method . This one only allows certain HTML tags and DIV is not one of them . There are plenty of alternatives : stackoverflow.com questions 1292817 http : stackoverflow.com questions 1292817 how-to-automate-browsing-using-python If you re new to programming then a browser plug-in may be more appropriate : greasespot.net http : www.greasespot.net but your question was about this particular error in this particular library .", "Question : I want to try Ghost.py http : jeanphix.me Ghost.py . its documentation says that installation require PyQt http : www.riverbankcomputing.co.uk software pyqt intro or PySide http : www.pyside.org . I have installed pyqt4-dev-tools using command apt-get install pyqt4-dev-tools on my Kubuntu http : www.kubuntu.org 13.10 . I am getting error .. . .. . root@alok : pip install Ghost.py .. . Downloading unpacking Ghost.py Could not find a version that satisfies the requirement Ghost.py from versions : 0.1a 0.1a2 0.1a3 0.1b 0.1b2 0.1b3 .. . Cleaning up.. . .. . No distributions matching the version for Ghost.py .. . Storing complete log in root .pip pip.log .. . .. . I have installed PySide too still I am not able to install Ghost.py using pip install Ghost.py using pip is so straight forward but I am not able to figure out what is wrong this time . output of root .pip pip.log is available at http : paste.ubuntu.com 7189458 Comment : cant understand your ghost code Comment : there is no code in the post . there is command pip install Ghost.py which is not working .. . Answer : I had the same problem on OSX with PyQt installed via Homebrew . Using pip install --pre Ghost.py made it work . This is also suggested in the pip.log you provide .", "Question : For this example I know it is easier to use requests or similar python-module . But I need to do it with the ghost.py module .. . .. . This code sample doesn t work : Comment : Nobody Is it possible I don t find any download method in the module . .. . Answer : I create some snippet here : https : github.com jeanphix Ghost.py issues 273 .. . .. . But it s not final solution .", "Question : null .. . Answer : Can I load HTML on Ghost.py .. . .. . If I use BeautifulSoup get the HTML code how to load it on Ghost.py . I try but not success : .. . .. . Thank you for help . Comment : session.open http : en.wikipedia.org Comment : Lol my bad . Ignore that last comment . Needed a vent . Comment : Thank you for reply but if I olny want load to code from BS do you know how to do it Comment : There s a number of problems with your code you shouldn t be importing Ghost and there s no request in urllib . Otherwise using the URL in session.open as @JoranBeasley suggests looks like it could be the answer . Then again I ve only got timeouts and segfaults so far.. . Comment : I solved this problem : import requests s requests.session s.post URL data data headers header r s.post URL data headers header c file open a.html w for html in r.text : c file.write html c file.close", "Question : Is anyone able to explain how to make Ghost.py http : jeanphix.me Ghost.py work with a proxy I ve checked out the code but it s not there . Comment : do you have any update on set proxy It remains very unclear on my side . If you want to specify one I do something like ghost Ghost wait timeout 20 then ghost.set proxy type http host http : myproxy.net port 7676 but page res ghost.open gives a page None result Comment : @ColonelBeauvel Are you sure of the proxy and it s port to know that they are working Comment : Yes completely sure since they are working when I use urllib2 to scrap some static data with proxy . So the proxy and port are correct I guess I am doing something wrong with ghost but do not know what .. . Comment : @ColonelBeauvel I don t have any working proxy to test it out now . I would do that as soon as I m able to and then get back to you with the results . Sorry for the inconvenience . .. . Answer : I ve found it in the ghost.py file . They did a very good job in it . It s a method on line 835 as set proxy . It s just how to use it that I m yet to try out : .. . .. . What I don t understand now is what QNetworkProxy.DefaultProxy means . It s said to be the default proxy . So what s the default proxy Comment : did you finally got how to use it Comment : I abandoned the project and went on to use Casperjs casperjs.org http : casperjs.org", "Question : How do I go about debugging this stack-trace The stack-trace does not refer to a line in my code which is too long to reproduce here . However the key component other than the standard python library is Ghost.py http : jeanphix.me Ghost.py . Thanks .. . Answer : This means the server closed the connection unexpectedly usually because it crashed for some reason . In this case it looks like the client is pyscripter and the server is a subprocess running your app and it sounds like the subprocess crashed so hard that it did not gracefully close the connection or send back a meaningful traceback . So either there is a bug in pyscripter or a bug in your code . My advice is to run your app without the IDE and see if you can reproduce the issue and get a meaningful traceback . Comment : I ve tried running from the command-line but unfortunately it crashes without leaving a traceback . In fact it crashes most of the time in the IDE without a traceback but every now any then I get what was posted . Comment : @user1379351 Unfortunately that sounds like a hard crash i.e . some C extension or even python itself segfaulted . If you re up to the task you can attempt to debug the issue with Visual Studio or WinDbg but if you re not familiar with C or assembly it s going to be tough ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web-applications
UNK_RELATION
sdl-2@open-source@78
sdl-2 -- simple directmedia layer sdl2 is the second generation of a popular @placeholder cross-platform c library that provides a simple interface to graphics sound and input-devices .
{ "confidence": [ 43.178428649902344, 38.74268341064453, 36.893310546875, 36.156089782714844, 36.058780670166016, 35.98323440551758, 34.816200256347656, 34.51217269897461, 34.51217269897461, 33.761234283447266, 33.6248779296875, 33.593360900878906, 33.572635650634766, 33.46858215332031, 33.431461334228516, 33.431461334228516, 33.344974517822266, 33.03984832763672, 32.549598693847656, 31.866905212402344, 31.77462387084961, 31.604419708251953, 31.46807861328125, 31.146137237548828, 30.601924896240234, 30.48366928100586, 30.28994369506836, 30.283493041992188, 30.108264923095703, 30.016685485839844, 29.978981018066406, 29.838899612426758, 29.824970245361328, 29.783607482910156, 29.761398315429688, 29.665855407714844, 29.650901794433594, 29.628334045410156, 29.400508880615234, 29.3380184173584, 28.952301025390625, 28.899978637695312, 28.622180938720703, 28.442516326904297, 28.442516326904297, 28.36050033569336, 28.27277183532715, 28.27277183532715, 28.14922332763672, 28.113258361816406, 28.101749420166016, 28.101749420166016, 28.101749420166016, 28.101749420166016, 28.101749420166016, 28.02065086364746, 27.915998458862305, 27.88418197631836, 27.859500885009766, 27.734493255615234, 27.646102905273438, 27.628021240234375, 27.582294464111328, 27.567245483398438, 27.52554702758789, 27.515239715576172, 27.515239715576172, 27.515239715576172, 27.515239715576172, 27.498477935791016, 27.474916458129883, 27.472305297851562, 27.40518569946289, 27.377769470214844, 27.26614761352539, 27.118160247802734, 27.08547592163086, 27.023717880249023, 26.99985122680664, 26.995433807373047, 26.97229766845703, 26.965099334716797, 26.925533294677734, 26.906612396240234, 26.782257080078125, 26.483989715576172, 26.483863830566406, 26.483863830566406, 26.463184356689453, 26.40338897705078, 26.40338897705078, 26.40338897705078, 26.384201049804688, 26.324321746826172, 26.324321746826172, 26.302780151367188, 26.29363250732422, 26.244544982910156, 26.196182250976562, 26.19354248046875 ], "content": [ "Change this include : .. . .. . to .. . .. . Or you can change your CMakeLists.txt to include C : SDL SDL2-2.0.3 include SDL2 .. . .. . Instead of .. . .. . C : SDL SDL2-2.0.3 include", "Does any one have a working example of PBO s Pixel Buffer Objects + SDL2.0 Simple DirectMedia Layer + OpenGL", "I followed this tutorial http : headerphile.com sdl2 opengl-part-1-sdl-opengl-awesome and set up a very simple opengl progam using SDL2 .", "I m using SDL2 and SDL-mixer for the first time .", "or SDL include SDL2", "I recently started using SDL2 as my graphics library .", "But I think your problem is the SDL Header are located in a subfolder named SDL2 .", "I wrote a simple game with SDL2 and emscripten .", "I have created a simple OpenGL window with SDL2 .", "Actually i am using sdl2 + sdl2 image + sdl mixer .", "I m using SDL2 .. . .. . SDL is a relatively small library for low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL and Direct3D https : wiki.libsdl.org FrontPage It s used for game development and in my case as simple audio visual output and mouse+keyboard input .", "To make a successful cross-platform application with SDL2 you should in first place use a compiler that s available on both platform .", "I m attempting to use Visual C++ cross-platform features to write an SDL 2 app for Windows Windows Universal iOS Android and Linux .", "Use the new generated output files SDL2main.lib SDL2.lib and SDL2.dll in your SDL 2 project in VS2015 .", "My understanding is that this doesn t work for SDL2 as asked in the question only original SDL .", "Relevant code of SDL 1.2 is this : .. . .. . CPU getCPUIDFeaturesExt is also missing in SDL2 .", "Remember that SDL is a C library and not a C++ library .", "I am doing my code for a simple game using SDL library .", "SDL on windows is SDL2 SDL.h and under nix is SDL.h .", "I try to create some C++ rogue-like game with SDL-2 .", "This replacement for SDL platform.h solved the issue for me : marshut.com irzuki sdl-platform-h.html http : www.marshut.com irzuki sdl-platform-h.html", "My program uses a library called Simple2D https : github.com simple2d simple2d which wraps SDL2 to provide an easier interface .", "I ve tried to compile this SDL2 tutorial using emscripten : Text input tutorial http : lazyfoo.net tutorials SDL 32 text input and clipboard handling index.php .. . .. . But I ve got this error : .. . .. . The SDL SDL.h is included .", "If you are having much trouble with SDL2 a recommend you to read the Lazy Foo tutorials http : lazyfoo.net tutorials SDL index.php .", "I m following this tutorial http : lazyfoo.net tutorials SDL index.php that teaches how to use SDL2 with the final goal of learning C++ in a more fun and interactive way .", "It s a simple Hello program with the SDL include and if I remove the SDL include it compiles just fine as expected .", "In SDL 2 that function is missing .", "My engine was recently converted to run with SDL2 for input and video .", "Have you tried getting a newer version of sdl launchpad.net zoogie +archive ubuntu sdl2-snapshots https : launchpad.net zoogie +archive ubuntu sdl2-snapshots should provide you with the necessary debs", "I am trying to get a simple SDL app running using CLion IDE mingw-w64 CMake .", "I think you want .. . .. . in your main file BEFORE the line .. . .. . Explanation : .. . .. . In SDL SDL2 in an effort to try to make cross-platform development of certain kinds of applications simpler SDL creates a custom entry-point to your application .", "I m trying to build a simple SDL2 game with CMake and MSYS Makefiles .", "What I would like to accomplish is to use SDL SDL2 to perform the rendering .", "I installed the SDL2 runtimes from the ubuntu repo and I installed the SDL2 development source from the tar file on the SDL website .", "For a full working example check out the tutorial for SDL ttf in SDL2 at Lazy Foo http : lazyfoo.net tutorials SDL 16 true-type-fonts index.php .", "But it is cross-platform .", "Sounds similar to a problem described in this thread - stackoverflow.com questions 25003676 http : stackoverflow.com questions 25003676 sdl2-invalid-renderer-on-sdl-getwindowsurface-and-or-sdl-createrenderer-on-osx comment38915181 25003676", "The reason is written as a comment in each FindSDL .cmake script you show : .. . .. . Note that the header path has changed from SDL2 SDL.h to just SDL.h .. . .. . Probably you use headers from incompatible version of libraries SDL and SDL ttf : the first one provides main header as SDL.h but the second one expects it to be SDL2 SDL2.h .", "I am currently writing an SDL2 program with the SDL2-ttf library and wanted to add a check for it in CMakeLists.txt .", "In SDL2 it works .", "If not maybe somebody could recommend a different approach for rendering simple geometric shapes and a GUI to configure some parameters in SDL2 C++ without too much effort .", "Before SDL2 there was no renderer and SDL only provided display surface to which you draw but it is quite the same basic concept it wouldn t update all by itself .", "Visual C++ and cross-platform doesn t go well together .", "SDL2 is realy good for having a GL context on any platform exept for transparency so try harder.. .", "I ve made windows with SDL2 this exact way before and never had this issue which leads me to believe that it is a platform bug .", "I didn t know about SVG graphics animation on SDL .", "What version of SDL2", "I have an issue with SDL2 .", "I compiled the source of sdl2 sdl2 image sdl2 tff and I took the static library .", "I am trying to write a simple hello world using the Derelict3 bindings for SDL2 .", "Apparently SDL2 is pulling in dependencies like libjson Why would SDL need json", "http : stackoverflow.com questions 34553858 can-we-use-stdfstream-instead-of-sdl-rwops-in-sdl2", "I finally use GLFW instead of SDL2 - Keep in mind that it lacks many useful features compared to SDL .", "As there is no way to draw a circle with SDL2 I use SDL2 gfx http : cms.ferzkopp.net index.php software 13-sdl-gfx .", "The errors I was getting when closing the app no longer occur in the latest development version of the SDL2 as suggested by Treble on the SDL forums .", "C4Droid is a kind of C++ environment in Android where you can also do SDL2 stuff and so make use of graphics .", "I m playing using FFMpeg and SDL 2.0 libraries .avi file with explosion where all non-transparent pixels are simple black .", "I solved this indirectly creating a dynamic link in the jni folder to the SDL one in the filesystem : ln -s library SDL . SDL and then in the Android.mk file : SDL PATH : . . SDL", "That seems fine to me since this question is technically about SDL not C++ .", "It is written in C++ and only uses SDL2 .", "So what solutions are there to this in SDL 2", "This link http : zamma.co.uk setup-sdl2-in-visual-studio show you how to set up SDL library libpng16-16.dll to be available for acceess by the compiler.exe the last step right before the sample code .. . .. . yourProgram proprety page - Builds event- post-build event .. . in my case i have .. . copy C : Users MehdiB Desktop C Program Library SDL2-devel-2.0.4-VC SDL2-2.0.4 lib x86 SDL2.dll OutDir SDL2.dll .. . copy C : Users MehdiB Desktop C Program Library SDL2 image-devel-2.0.1-VC SDL2 image-2.0.1 lib x86 SDL2 image.dll OutDir SDL2 image.dll .. . copy C : Users MehdiB Desktop C Program Library dll libjpeg-9.dll OutDir libjpeg-9.dll .. . .. . .. . here https : github.com OctaForge OF-Windows find master where you can get this dll", "It s not necessary to recompile the library SDL2 is given with static-link library named libSDL2.a on the folder SDL2-2.0.0 i686-w64-mingw32 lib .", "Below is a function for saving a screenshot in SDL 2 taken from a library I m currently writing .", "I am trying to display an png or jpg file with SDL 2.0.1 SDL Image 2.0.0 and c++ but it does not work .", "Have you checked this question : stackoverflow.com questions 23850472 https : stackoverflow.com questions 23850472 how-to-use-sdl2-and-sdl-image-with-cmake", "But if anyone ever has a problem like me : I was including wrong version of SDL image.. . include SDL SDL image.h instead of include SDL2 SDL image.h .", "I haven t found much on that particular issue but I think the problem comes from me compiling SDL2 and SDL-mixer from sources .", "The full source of SDL2 of the same file can be seen here https : github.com spurious SDL-mirror blob e69eb33a5e376fe7679afdce29385464603f6666 src cpuinfo SDL cpuinfo.c .", "I m writing a small game in C++ using SDL2 Box2D OpenGL plus SDL2 extensions SDL2 mixer and SDL2 ttf .", "Having trouble blitting an image in SDL2 .", "I did look over two threads on similar errors : .. . .. . Undefined reference to WinMain@16 when using SDL http : stackoverflow.com questions 18115153 undefined-reference-to-winmain16-when-using-sdl -- doing this .. . .. . undefined-reference to WinMain@16 C++ SDL-2 http : stackoverflow.com questions 32342285 undefined-reference-to-winmain16-c-sdl-2 -- no effect", "SDL provides libs named libSDL2.a but I always see in examples that it is spelled lSDL2 .", "I have one project for each platform now I want to abstract the SDL stuff to a common project that each platform project will reference with each project supplying the appropriate SDL libs for the platform through the linker .", "I changed question title from DirectX OpenGL to SDL2 because issue is related to SDL2 it self .. . 2 .", "This could be something you re doing in SDL or a platform-related issue .", "possible duplicate of SDL 2 Undefined Reference to WinMain@16 and several SDL functions http : stackoverflow.com questions 17048072 sdl-2-undefined-reference-to-winmain16-and-several-sdl-functions", "I have a project that uses SDL 1.2 and want to migrate it to SDL 2.0 .", "I m using SDL2 and this is a SDL2 specific question check out my code that produces tearing whats wrong", "Hi i just setup SDL2 for android on windows-7 with this guide - http : www.mosaicit.de android-sdl-c-build-system-compiling .", "I opend this http : stackoverflow.com questions 34215617 error-running-simple-code-sdl question but I can t solve it .", "I am using the SDL2 2.0.3 library with the SDL image library 2.0.0 in Visual C++ 2010 Express .", "But SDL is C and if someone gave me a purely C solution it would ve worked for me .", "If I copy the SDL source folder inside the jni folder of the android project the SDL2 library builds correctly but when I try to reference the same SDL folder from the filesystem outside of the project the console throws : .. . .. . armeabi Compile thumb : main SDL android main.c In file included from Library SDL src main android SDL android main.c : 4 : 0 : Library SDL src main android . . . . SDL internal.h : 34 : 24 : fatal-error : SDL config.h : No such file or directory include SDL config.h .. . .. . The SDL config.h file-exists and the path is correct .", "@Andrew : Double-check your configure output for SDL2 it might not have found the joystick IO library s .", "The problem may come from the searched directories as I had issues to install SDL2 on DevC++ .. . .. . Compiling project changes.. . .. . .. . Project Filename : C : Users Anthony Desktop programmes SDL Premier essai Projet1.dev .. . Compiler Name : TDM-GCC 4.9.2 64-bit Release .. . .. . Building makefile.. . .. . .. . Filename : C : Users Anthony Desktop programmes SDL Premier essai Makefile.win .. . .. . Processing makefile.. . .. . .. . Makefile Processor : C : Users Anthony Desktop Dev-Cpp MinGW64 bin mingw32-make.exe .. . Command : mingw32-make.exe -f C : Users Anthony Desktop programmes SDL Premier essai Makefile.win all .. . .. . mingw32-make.exe : Nothing to be done for all .", "Is there a way to do this on sdl-1.2", "Examples at : .. . .. . SDL : What is a Blit", "From SDL FAQ for windows https : wiki.libsdl.org FAQWindows .. . .. . You should be using main instead of WinMain even though you are creating a Windows application because SDL provides a version of WinMain which performs some SDL initialization before calling your main code .", "I saw it used in SDL2 as SDL Surface and SDL Texture .", "As does a gcc testgamecontroller.c sdl2-config --cflags --libs .", "I m trying to use CLion to create a SDL2 project .", "When finishing rendering a single frame you shall call something like SDL Flip http : www.libsdl.org release SDL-1.2.15 docs html sdlflip.html seems it s been obsoleted in SDL2 or SDL UpdateWindowSurface http : wiki.libsdl.org SDL UpdateWindowSurface .", "I m making an app using SDL 2 .", "1 . hg clone http : hg.libsdl.org SDL .. . 2 .", "Being so new to SDL and still relatively new to both C++ and C I come from a Java background I think it s very likely that I ve made a simple error that I m not catching but I can t think of what I might have done .", "Great - SDL2 is there .", "I downloaded SDL2-devel-2.0.0-mingw.tar.gz SDL Development Libraries from http : www.libsdl.org tmp download-2.0.php and I d like to create a standalone executable using SDL2 libraries but so far I ve always had to bundle the SDL2.dll file with the executable to make it work .", "I wrote a c++ app using SDL2 to simulate an editBox .", "How can I create a 8 bit surface in SDL 2" ] }
{ "confidence": [ 54.51226806640625, 52.040008544921875, 51.964134216308594, 50.396568298339844, 47.53169250488281, 46.39087677001953, 46.35985565185547, 46.08672332763672, 45.5696907043457, 45.42044448852539, 45.171669006347656, 44.95610809326172, 44.03298568725586, 43.49256134033203, 43.49256134033203, 43.21881866455078, 42.78462219238281, 42.72532272338867, 42.63889694213867, 42.347232818603516 ], "content": [ "Question : I m using SDL2 .. . .. . SDL is a relatively small library for low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL and Direct3D https : wiki.libsdl.org FrontPage It s used for game development and in my case as simple audio visual output and mouse+keyboard input . It s not a toolkit like GTK Qt wxWindows etc . But it is cross-platform . But the only way I can find to draw a shape is with the line rect and pixel functions . https : wiki.libsdl.org CategorySurface .. . .. . Apart from using trig or the equation of a circle how could I draw a curve How about general vector-graphics Is SDL an appropriate starting point or should I look elsewhere .. . Answer : If you want to write your own circle drawing function then I d suggest adapting the midpoint algorithm https : en.wikipedia.org wiki Midpoint circle algorithm C Example to SDL2 by drawing pixels . Curves would be done similarly but would use more of an ellipses drawing algorithm . Actual vector-graphics start to get much more complicated and you d probably have to find something that renders SVG files which I m not sure there are many options for SDL2 . However if you would rather simply have functions that you can work with I d suggest going straight to SDL2 gfx http : www.ferzkopp.net Software SDL2 gfx Docs html index.html instead . It has-many more functions already implemented for you to work with .", "Question : I m not getting MinGW s g++ to successfully compile SDL programs . Here s my sample program : .. . .. . and here s my command and error report : .. . .. . I copied over everything in SDL2 s lib x64 and i686-w64-mingw32 lib folders to the C : MinGW lib folder . What s missing At the command-line maybe . I did look over two threads on similar errors : .. . .. . Undefined reference to WinMain@16 when using SDL http : stackoverflow.com questions 18115153 undefined-reference-to-winmain16-when-using-sdl -- doing this .. . .. . undefined-reference to WinMain@16 C++ SDL-2 http : stackoverflow.com questions 32342285 undefined-reference-to-winmain16-c-sdl-2 -- no effect Comment : -lmingw32 -lSDL2main -lSDL2 exactly in that order and all src obj before libs of course . .. . Answer : I compiled your code so that compiler and linker flags were provided by sdl2-config included in an msys2 package : .. . .. . sdl2-config --cflags .. . .. . -I mingw64 include SDL2 -Dmain SDL main .. . .. . sdl2-config --libs .. . .. . -L mingw64 lib -lmingw32 -lSDL2main -lSDL2 -mwindows .. . .. . So at least -lmingw32 is in other position in libraries to be linked and also -Dmain SDL main was missing . The library SDL2main is a static library so it needs mingw32 to be prior to it when linking . From SDL FAQ for windows https : wiki.libsdl.org FAQWindows .. . .. . You should be using main instead of WinMain even though you are creating a Windows application because SDL provides a version of WinMain which performs some SDL initialization before calling your main code . If for some reason you need to use WinMain take a look at the SDL source code in src main win32 SDL main.c to see what kind of initialization you need to do in your WinMain function so that SDL works properly . If there is something like sdl2-config available in case of any library I would at least check what it outputs . Comment : If that was the case then there would have been undefined-reference to SDL main but it isn t . Comment : @keltar my guess is that -mwindows translates main to be WinMain and then WinMain in SDL2main library is discarded as duplicate and won t be referenced and thus SDL main won t be referenced . Comment : No libmingw32.a references WinMain and cannot find one . ld linker is sensitive to libraries order especially when libraries are static . Your order is correct so it linked order in question isn t . Comment : @keltar yes I just that checked that myself i.e . that -lmingw32 and its position was different in the question and what sdl2-config --libs gives . I did not notice that difference when writing the answer .", "Question : I m attempting to use Visual C++ cross-platform features to write an SDL 2 app for Windows Windows Universal iOS Android and Linux . I have one project for each platform now I want to abstract the SDL stuff to a common project that each platform project will reference with each project supplying the appropriate SDL libs for the platform through the linker . Is there a project type in VS that actually allows me to do this I was hoping the shared items project would do the trick but I doubt thats the one . There does appear to be some form of shared library for iOS and Android but it doesn t look like that extends to Linux and Win32 . Thanks Comment : Visual C++ and cross-platform doesn t go well together . .. . Answer : To make a successful cross-platform application with SDL2 you should in first place use a compiler that s available on both platform . Because you will need to compile a binary for each platform . SDL2 seems to support IOS and Android out of the box but I don t know how deployment is done for the mobile OS . You can still use Visual Studio with CMake or a Makefile and use another compiler instead of Visual C++ to support a cross-platform build like g++ mingw32 on windows or Clang . Comment : VS has an ARM compiler now for iOS and Android dev and for Linux it creates a connection to a Linux dev machine where I believe it calls the gcc compiler and sends it the source files . While I m not certain I think in terms of each platform project VS has it sorted . Its the common project that all of those projects need to access where things get a bit confusing for me .", "Question : I keep getting the error undefined-reference to WInMain@16 when I include SDL2 SDL.h in my C file . It s a simple Hello program with the SDL include and if I remove the SDL include it compiles just fine as expected . The problem is I m new with the compile flags for C and SDL and I m not sure how I link the files together or if that s necessary . I m coding using Sublime Text 3 so I m not sure how you would link SDL as you would when using an IDE . My paths to MinGW and SDL2 is : .. . .. . And I build the program with .. . .. . EDIT : What worked for me was to use these flags in this exact same order Comment : possible duplicate of SDL 2 Undefined Reference to WinMain@16 and several SDL functions http : stackoverflow.com questions 17048072 sdl-2-undefined-reference-to-winmain16-and-several-sdl-functions Comment : That thread simply states you are probably not linking . As I wrote I m not sure how I would link if that is the problem and I m not using an IDE .. . Answer : You need to link with the library as well . You can do it by passing the correct options on the command-line : -L to tell the linker where to find the library and -l lowercase L to tell the linker to link-to the library . Like .. . .. . I don t know the name of the library so change SDL2 to the appropriate name . .. . .. . If there is problem running your program due to the loader not finding the SDL2 library you may have to add another option which tells linker the place of the dynamic library : .. . .. . I don t know if it s needed or even used on Windows though . You might have to copy the DLL to the directory where the executable is . Comment : It was almost right The flags I needed to use was these : -lmingw32 -LC : MinGW include SDL2 lib -lSDL2main -lSDL2 in that exact order", "Question : I m trying to use CLion to create a SDL2 project . The problem is that the SDL headers can t be found when using include s . My CMakeLists.txt file : .. . .. . My test main.cpp : .. . .. . Thank you for any help you could give me . Edit : I m using Windows and CLion is configured to use cygwin64 . .. . Answer : You don t seems to have a CMake error whike generating your make file . But I think your problem is the SDL Header are located in a subfolder named SDL2 . Change this include : .. . .. . to .. . .. . Or you can change your CMakeLists.txt to include C : SDL SDL2-2.0.3 include SDL2 .. . .. . Instead of .. . .. . C : SDL SDL2-2.0.3 include", "Question : null .. . Answer : I am trying to get a simple SDL app running using CLion IDE mingw-w64 CMake . In this question http : stackoverflow.com questions 27408853 cmake-failing-to-statically-link-sdl2 it says to link the following libraries in order to get SDL2 working with mingw . I know what the first 3 are and how to find and link them using CMake . I have no idea how to include the rest of the libraries because I don t know where they are located or how to get access to them . Also is there a difference between libSDL2 and lSDL2 SDL provides libs named libSDL2.a but I always see in examples that it is spelled lSDL2 . Why do the lazyfoo tutorials http : lazyfoo.net SDL tutorials lesson01 windows mingw index.php say you only need lmingw32 lSDL2main and lSDL2 It s what I currently am linking in CMake but I m getting undefined references to things like Comment : Oh wow . I just add them as is . How are these being referenced Where are they located on Windows target link libraries Dark Knights MINGW32 LIBRARY SDL MAIN LIBRARY SDL LIBRARY -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid Comment : Did you try to use find package SDL for your purposes Usually approach with find package is easier than manually listing libraries .", "Question : I m trying to use SDL2 SDL2 ttf and SDL2 image in a project which uses a Makefile to build . I ve tried many different methods but no matter what I ve tried so far SDL2 ttf and SDL2 image throw errors akin to the following . I can successfully use CMake to build the project using the following CMakeLists and values . CMake configure values http : i.stack.imgur.com Ld28N.png .. . .. . The CMake modules I m using to find SDL in CMake are bellow . FindSDL2.cmake .. . .. . FindSDL2 ttf.cmake .. . .. . FindSDL2 image.cmake .. . .. . Following is the makefile then some of the different methods I ve tried . I have removed some irrelevant code from the makefile to make it more clear please see the full code on GitHub https : github.com actsl kiss sdl blob master kiss makefile . 1 . 2 . 3 . The full project I m trying to build is KISS SDL which can be found on GitHub https : github.com actsl kiss sdl . Comment : The first thing to check - which directory should be included for make include SDL2 SDL.h work . Try to find this file under directories specified in INCLUDE DIR variables . Comment : @usr1234567 It is specific to the OSX operating environment though are you sure it shouldn t be used Someone well-versed in Make but only on Windows may be unable to answer this question . Similarly someone who hasn t used Make but knows OSX Framework Bundles inside and out could spot a simple error in naming or something . Comment : @usr1234567 Ah I see thank you for pointing that out . .. . Answer : The reason is written as a comment in each FindSDL .cmake script you show : .. . .. . Note that the header path has changed from SDL2 SDL.h to just SDL.h .. . .. . Probably you use headers from incompatible version of libraries SDL and SDL ttf : the first one provides main header as SDL.h but the second one expects it to be SDL2 SDL2.h . Comment : Thank you for the comment I considered this but since everything works with CMake I m not sure that the libraries are incompatible . It is probably possible that CMake does something weird like duplicate the libraries to create a new file structure but if that s the case surely I can do it with Make too I ll double check to see if there are new library versions . Comment : @MichaelBethke : No CMake never does weird things . Especially not such weird things you are describing . Run your CMake-generated make file with VERBOSE 1 to get the call . Then you can compare it to your own make file .", "Question : null .. . Answer : I am trying to figure out how to properly handle game controller inputs in an SDL2 program . I have written a program which is able to handle inputs from my game controller on my Mac but not on my Linux machine . However the game controller does work with other programs on the Linux machine . My program uses a library called Simple2D https : github.com simple2d simple2d which wraps SDL2 to provide an easier interface . I m trying to determine if the problem is with the controller input handling or some missing dependency configuration on the Linux side . I have not found any examples of using SDL2 to handle game controller inputs to determine if the code is working correctly . Here is the code that Simple2D uses for handling game controller inputs . Do you see anything that could cause my controller to not work on my Linux machine https : github.com simple2d simple2d blob master src simple2d.c L642-L689 .. . .. . https : github.com simple2d simple2d blob master src simple2d.c L782-L806 .. . .. . Update : Thanks to @genpfault I found out that the SDL codebase comes with a test script . I am working on compiling and running this . After downloading the source code on my Mac I was able to successfully compile and run the test script like this : .. . .. . However when I tried the same thing on my Linux machine it failed to compile : .. . .. . So then I tried to run . configure make instead : .. . .. . I m not sure why it is failing to compile and how to move past these errors . Update : Thanks again to @genpfault installing the latest version of SDL 2.0.4 from source instead of using version 2.0.2 that was available as a package fixed my compiling issues . Now when I run the controller test script on my Linux machine I see this : .. . .. . However when I run it on my Mac I see this : .. . .. . What could be different about the Linux environment Again the same controller works in other programs on this same Linux machine . Update : I found that the device is detected : .. . .. . However I m not sure why SDL is not detecting it . Comment : I have not found any examples of using SDL2 to handle game controller inputs to determine if the code is working correctly . .. . What about the one included with SDL https : hg.libsdl.org SDL file 4844b48eb17b test testgamecontroller.c Comment : @Andrew : The ole cd test . configure make Autotools dance works for me . As does a gcc testgamecontroller.c sdl2-config --cflags --libs . Comment : @Andrew : Are you using the SDL2 that your distro shipped or the version from the source tarball My distro was shipping 2.0.2 instead of the 2.0.4 in the latest tarball and I got similar errors until I built installed 2.0.4 . Comment : @Andrew : Can testjoystick.c https : hg.libsdl.org SDL file 4844b48eb17b test testjoystick.c see the pad on Linux If so then the gamepad database might be missing an entry for your pad . Should be possible to generate one in that case https : hg.libsdl.org SDL file 4844b48eb17b test controllermap.c . Comment : @Andrew : Double-check your configure output for SDL2 it might not have found the joystick IO library s . If you re on a Debian or Debian-derivative you can pull those in via apt-get build-dep libsdl2-dev rebuild SDL2 .", "Question : null .. . Answer : So I ve been playing around with SDL2 to see if it would suit my needs . I was following introductory examples from lazyfoo mostly and made a simple test . Compiled on OSX 10.7.5 MBA 2011 with : .. . .. . Example is simple enough . It should init SDL create a window attach a surface to the window set the color to gray and render it out - after two seconds it should exit . However window stays black . No gray surface shown . That s why I introduced that printf for SDL errors before delay . It shows Invalid renderer which I have tracked down to be triggered by screen surface SDL GetWindowSurface window .. . .. . I have also tried to do it the other way with .. . .. . instead of SDL Surface way. . but same thing happens Invalid renderer thrown out on SDL CreateRenderer . As you can see I tried it with SOFTWARE and ACCELERATED flags - same thing . Now here s the funny part . In first code with SDL Surface way I have called SDL UpdateWindowSurface window twice - one after the other . Gray color shows However Invalid renderer is still thrown out but code works . Why would calling SDL UpdateWindowSurface window twice one after the other work and once it wouldn t Why would it work at all if Invalid renderer is thrown out I m deeply puzzled . OSX : 10.7.5 .. . compiler : i686-apple-darwin11-llvm-gcc-4.2 GCC 4.2.1 Based on Apple Inc . build 5658 LLVM build 2336.11.00 .. . SDL2 : 2.0.3 installed via homebrew .. . .. . I also tried invoking gcc without sdl2-config by manually typing include path and libs . Comment : The code is sound . I have just tested on both Windows 7 VS2013 and OSX Mav XCode 5.1.1 and it displayed a gray coloured window for 2 seconds as expected . Comment : Thanks for testing I was afraid something like that might happen . I have to figure out where to start debugging this issue from . It s baffling . Comment : Might be worth registering on the forums at the SDL site and asking there to see if anyone has had the same issue . Sam the main developer often replies to threads on there too - forums.libsdl.org https : forums.libsdl.org Comment : Seems like it might be a bug - stackoverflow.com questions 22801113 http : stackoverflow.com questions 22801113 on-os-x-why-the-showimage-example-of-sdl2-image-needs-to-do-rendercopy-in-the Comment : see this post about how to make posts on SDL forums - forums.libsdl.org viewtopic.php t 9845 https : forums.libsdl.org viewtopic.php t 9845", "Question : I am following along with the SDL2.0 tutorials by LazyFoo using Code : : Blocks 13.12 . I have had no trouble getting SDL2 linked and running in VS2010 but have changed IDE and come across this error : .. . .. . winapifamily.h : No such file or directory .. . .. . I think everything is linked correctly . I have pointed the program to my SDL2 include and lib directories . Buildlog : error is occuring in file : . . include SDL2 SDL platform.h .. . .. . Build : Debug in SDL2 Setup compiler : GNU GCC Compiler .. . .. . fatal-error : winapifamily.h : No such file or directory .. . .. . Build fails : 1 error s 0 warning s 0 minute s 0 second s .. . .. . This is my first time asking a question on here . I did Google for an answer and search the existing questions answers on here but was unable to solve the issue . Here is my code also . My Code : Comment : I don t think VS 10 have this header file . it is a new header . check if your project have or missing some macro regarding the OS type . .. . Answer : I had that problem . Go to .. . .. . and find winapifamily.h then copy it to your .. . .. . .. . .. . Edit : I think I have windows kits files because of visual-studio-2012 or later sorry . I am glad you could solve your problem . Yeap the problem is in that header lines 117 to 134 in SDL plataform.h version SDL 2.0.3 : Comment : I do not have a Windows Kits folder on my C : . Is that a Windows 8 thing I m running 64bit Win 7 . Comment : Just after I posted this questions 2 hours ago at time of writing it was answered elsewhere as revealed by further Google searching . This replacement for SDL platform.h solved the issue for me : marshut.com irzuki sdl-platform-h.html http : www.marshut.com irzuki sdl-platform-h.html Comment : Above link is broken", "Question : First off I m relatively new to this . I m looking forward to picking up both SDL2 as well as SFML2 libraries for game dev . and other stuff . Now I know for a fact that both SDL2 and SFML2 are capable of creating OpenGL enabled contexts through which OpenGL graphics programming may be done . But online I ve read discussions wherein people said something to the effect of SDL 1.2 is software accelerated SDL2 and SFML2 are hardware accelerated by default . I know that software rendering is graphics using CPU alone . While Hardware rendering uses graphics cards pipeline . So my question is with regards to these game libraries : .. . .. . Part 1 : when someone says one is software hardware acc.by default what does he mean Is it that my guess if say SFML2 is hardware acc . by default even basic 2d graphics are done by it using hardware rendering as the backend pipeline to do it even if I didn t explicitly do any hardware-rendering programming in the code Part 2 : And if that is true is there any option within these libraries to set that to software acceleration rendering Part 3 : Which of these 2 libraries SDL2 vs SFML2 has better overall performance speed Thanks in advance for any answer and apologies if you found the question dumb . .. . Answer : Cannot say anything about SFML but almost sure things are very close but for SDL it is as you say . In SDL1 2d drawing implemented as blitting directly on display surface and then sending this surface to display - so mostly software although minor hw acceleration is still possible . SDL2 have SDL Renderer and textures which are GPU-side images or render targets and any basic drawing that uses renderer may be accelerated by one or another backend . Which backend will be chosen depends on system your program runs and user settings - e.g . it would default to opengl for linux d3d for windows but still can use opengl opengles for android ios etc. . .. . .. . You can use software renderer either by explicitly calling SDL CreateSoftwareRenderer https : wiki.libsdl.org SDL CreateSoftwareRenderer or hint https : wiki.libsdl.org SDL SetHint SDL to use software https : wiki.libsdl.org SDL HINT RENDER DRIVER driver or even override it by setting SDL RENDER DRIVER environment variable . If you intend to use opengl for 3d graphics - then you just ignore all that and create window with opengl context as usual and never use SDL Renderer . Comment : By the hint and SDL RENDER DRIVER parts did you mean simply using the software rendering substitutes meant for software rendering OpenGL D3D calls on that system eg . Mesa driver for OpenGL Swiftshader for D3D Comment : Sorry I cannot understand your comment . Basically it requests SDL to use different implementation for all rendering functions e.g . SDL RenderDrawLine https : wiki.libsdl.org SDL RenderDrawLine .", "Question : I ve tried to compile this SDL2 tutorial using emscripten : Text input tutorial http : lazyfoo.net tutorials SDL 32 text input and clipboard handling index.php .. . .. . But I ve got this error : .. . .. . The SDL SDL.h is included . I have no idea why the compiler cannot find the enum and the function . https : wiki.libsdl.org SDL RendererFlip .. . https : wiki.libsdl.org SDL RenderCopyEx .. . .. . .. . .. . The command-line-arguments are : .. . .. . The includes at the beginning of the code : .. . Answer : include SDL SDL.h includes emscripten built-in SDL 1.3 . include SDL.h will use emscripten-ports SDL2 .", "Question : I have installed SDL2 using Homebrew but now I don t know how to make sure Xcode can use it I imported the created library and added it to the build phases tab of my project . But when I try to build I get the error SDL2 SDL.h not found .. . Answer : To be able to use SDL2 on Xcode you must set two things which are required for SDL in general : .. . .. . where to find header-files so that Clang can compile with -Iheader path .. . where to find the .dylib to link it to the project since with brew you don t have a real .framework .. . .. . To know the correct paths you should invoke sdl2-config --cflags and sdl2-config --libs . On my system these produce : .. . .. . Now just paste the first one into other C flags and the other one into other linker flags field of your project and you are ready to go . You could set them up in the correct fields which is Header Search Paths for -I and Library Search Path for -l but the result will be the same . Comment : Sorry been really busy so I couldn t respond Thanks for the answer a few questions though when I add the paths to other C flags and other linker flags I can access SDL but is it not nested like include SDL2 SDL.h How can I make sure this works And also what paths should I put into header search paths and library search paths if I wanted to do it the correct way Because I tried doing it but didn t get it to work just yet . Comment : Oh and also how do I get this to work with SDL ttf as well Because I can t find it The nesting of SDL2 SDL.h and using the correct field worked out though thanks Comment : Ok nevermind I just made a few mistakes sorry Thanks for the answer", "Question : I d like to print some debugging stuff to the console while running my SDL 2 program but it seems impossible . printf Hi n and SDL Log Hi n both won t do me any good . I even tried printing before initializing SDL and after quitting it too but to no avail . It seems like merely importing the SDL library makes it impossible to print anything to the console . Here are the parameters I m compiling with since it s possible that might have something to do with it : .. . .. . g++ hello.cc -IC : mingw dev lib include SDL2 -LC : mingw dev lib lib -w -Wl -subsystem windows -lmingw32 -lSDL2main -lSDL2 -lSDL2 image -std c++11 .. . .. . Any ideas Comment : This is probably caused by sdl2main library . Normally it s not actually needed in normal sdl program but it causes problems with debug output missing.. . Comment : @tp1 Were you suggesting that I delete sdl2main The closest thing I found to that was libSDL2main.a and deleting that file caused even more issues . Comment : This could be something you re doing in SDL or a platform-related issue . I m using SDL2 right now and have no issues printing via cout immediately during runtime . I m also using MSYS2 on Windows . Comment : This is not very definitive but might be helpful : gamedev.net topic 299349-cout-to-console-in-sdl http : www.gamedev.net topic 299349-cout-to-console-in-sdl Comment : I figured it out from some other site so I ll go ahead and answer my own question . .. . Answer : So I figured out what s preventing me from seeing output . These compile options .. . .. . -Wl -subsystem windows .. . .. . essentially disable the console window preventing output from being displayed . This is good for when a game is finished but terrible for debugging . So I went ahead and removed those compile options and now printf and SDL Log work perfectly fine .", "Question : I d like to print some debugging stuff to the console while running my SDL 2 program but it seems impossible . printf Hi n and SDL Log Hi n both won t do me any good . I even tried printing before initializing SDL and after quitting it too but to no avail . It seems like merely importing the SDL library makes it impossible to print anything to the console . Here are the parameters I m compiling with since it s possible that might have something to do with it : .. . .. . g++ hello.cc -IC : mingw dev lib include SDL2 -LC : mingw dev lib lib -w -Wl -subsystem windows -lmingw32 -lSDL2main -lSDL2 -lSDL2 image -std c++11 .. . .. . Any ideas Comment : This is probably caused by sdl2main library . Normally it s not actually needed in normal sdl program but it causes problems with debug output missing.. . Comment : @tp1 Were you suggesting that I delete sdl2main The closest thing I found to that was libSDL2main.a and deleting that file caused even more issues . Comment : This could be something you re doing in SDL or a platform-related issue . I m using SDL2 right now and have no issues printing via cout immediately during runtime . I m also using MSYS2 on Windows . Comment : This is not very definitive but might be helpful : gamedev.net topic 299349-cout-to-console-in-sdl http : www.gamedev.net topic 299349-cout-to-console-in-sdl Comment : I figured it out from some other site so I ll go ahead and answer my own question . .. . Answer : I use this approach for debugging console : .. . .. . GetParentProcessId comes from How can a Win32 process get the pid of its parent http : stackoverflow.com questions 185254 how-can-a-win32-process-get-the-pid-of-its-parent 3137081 3137081 . Works quite fine but I still cannot make it work with grep findstr etc . i.e . true stdout with pipe redirection .", "Question : null .. . Answer : In SDL 1.2 there is SDL HasMMXExt . See here http : libsdl1.2.sourcearchive.com documentation 1.2.14-6.1ubuntu3 SDL cpuinfo 8h a902f17f22ea2c4af471ebc07f2817ece.html . The full source of the file can be seen here http : libsdl1.2.sourcearchive.com documentation 1.2.14-6.1ubuntu3 SDL cpuinfo 8c source.html . In SDL 2 that function is missing . Why The full source of SDL2 of the same file can be seen here https : github.com spurious SDL-mirror blob e69eb33a5e376fe7679afdce29385464603f6666 src cpuinfo SDL cpuinfo.c . Relevant code of SDL 1.2 is this : .. . .. . CPU getCPUIDFeaturesExt is also missing in SDL2 . Why was it removed", "Question : null .. . Answer : I am trying to play music in the background of a game I m working on . I m using SDL2 and SDL-mixer for the first time . I compiled them myself and put the files at the root of my program folder for portability purposes . Now when I run the game no sound is playing and Mix GetError returns this error : .. . .. . I m trying to play a MP3 file but I get the same error when I try to initialize with OGG and other formats . Here s the function if it s at all relevant . I haven t found much on that particular issue but I think the problem comes from me compiling SDL2 and SDL-mixer from sources . I must ve forgot something but I don t really know.. . I m on OSX by the way and not really used to it yet . Thanks everyone for the help edit I have not tried with a WAV file .", "Question : Could someone explain what the .. . .. . imp fprintf .. . .. . and .. . .. . imp iob func .. . .. . unresolved external means Because I get these errors when I m trying to compile : .. . .. . I can already say that the problem is not from linking wrong . I have linked everything up correctly but for some reason it won t compile . I m trying to use SDL2 . I m using Visual Studio 2015 as compiler . I have linked to SDL2.lib and SDL2main.lib in Linker - Input - Additional Dependencies and I have made sure that the VC++ Directories are correct . Comment : Could you proove that by showing your linker settings please . Comment : @ I ve linked to SDL2.lib and SDL2main.lib in the input linker settings and I ve made sure that the directories are pointing to the right directory . Comment : possible duplicate of error LNK2001 imp fprintf Visual Studio 2015 RC http : stackoverflow.com questions 30366552 error-lnk2001-imp-fprintf-visual-studio-2015-rc .. . Answer : A more recent solution to this problem : Use the more recent sdl libs on .. . .. . https : buildbot.libsdl.org sdl-builds sdl-visualstudio C M O D .. . .. . They seem to have fixed the problem although it s only the 32-bit library I think .", "Question : I am currently writing an SDL2 program with the SDL2-ttf library and wanted to add a check for it in CMakeLists.txt . How do I do that I am using CMake 3.1 . Comment : I tweaked your title to remove a tag from it http : meta.stackexchange.com questions 19190 should-questions-include-tags-in-their-titles and include a more specific qualifier . Comment : did you ever find a working answer for this I m pretty sure arved s answer below doesn t work for SDL2 . .. . Answer : FindSDL ttf.cmake is part of cmake 3.x just use Comment : My understanding is that this doesn t work for SDL2 as asked in the question only original SDL . I was told this on freenode cmake and it also doesn t work for me . Comment : Have you checked this question : stackoverflow.com questions 23850472 https : stackoverflow.com questions 23850472 how-to-use-sdl2-and-sdl-image-with-cmake Comment : I found something that works . I ll post an answer .", "Question : For quick reference the showimage.c example code in SDL2 image library has the following code : .. . .. . SDL RenderCopy and SDL RenderPresent are called in the while done block . Since it only loads one image I thought the texture should be created and rendered to frame buffer once and just left it there . So SDL RenderCopy and SDL RenderPresent should be called only once : .. . .. . On my ubuntu-12.04 the image was shown as my expectation . However on my MBA with OSX 10.9.2 it was all black . Why the difference Comment : It s possible this is an SDL 2.0 bug or it s possible that your computer was not able to render the texture . You could try a simple test to be sure that it s rendering the image at all . I ve had a bug with SDL 2.0 that made me have to render twice before the image was shown . Comment : @user3476738 You re right . I duplicated the code from draw backgroud to SDL RenderPresent twice and the image was shown . I m going to take some time inspecting SDL2 source code to see what s going on...thanks Comment : Sounds similar to a problem described in this thread - stackoverflow.com questions 25003676 http : stackoverflow.com questions 25003676 sdl2-invalid-renderer-on-sdl-getwindowsurface-and-or-sdl-createrenderer-on-osx comment38915181 25003676 Comment : Looks like the common thread here is MBA hmm Intel HD 3000 in my case . Which do you have @southp Comment : @Keyframe Mine is Intel HD 4000 . Four months passed and I didn t really inspect on SDL 2.0 source code though : .. . Answer : The example code is simply demonstrating the most portable way to render to the screen . Your app doesn t necessarily control whether the OS uses double or triple buffering so you can t rely on a single render being consistently presented to the user . Also there are potential situations where the default framebuffer contents can be lost altered . In other words you should be rendering every frame . Comment : Good point at the framebuffer consistency issue that I didn t think of ." ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
minimesos@mesos@48
minimesos -- testing infrastructure for apache @placeholder frameworks .
{ "confidence": [ 35.281959533691406, 33.61619567871094, 31.761680603027344, 31.138301849365234, 31.138301849365234, 31.138301849365234, 30.355632781982422, 28.45105743408203, 28.45105743408203, 28.45105743408203, 28.45105743408203, 27.4436092376709, 25.885608673095703, 25.885608673095703, 25.885608673095703, 24.50204086303711, 24.50204086303711, 24.50204086303711, 23.645614624023438, 22.931930541992188, 22.931930541992188, 21.173351287841797, 16.321300506591797, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 13.69503116607666, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066, 12.311463356018066 ], "content": [ "containersol minimesos runs the Java code that is the core of minimesos .", "When you run minimesos up it launches containersol minimesos with up as the argument .", "What is the image containersol minimesos used for", "But I am confused as I think minimesos-cli is not used when doing minimesos up .", "Every minimesos command runs as a short lived container whose image is containersol minimesos .", "In this new setup minimesos will run launch a long running API server and any minimesos cli commands call the API .", "So how does minimesos run on its own", "I was trying to figure out what s inside minimesos script .", "When you do minimesos up the command name and the minimesosFile will be passed to this container .", "make compiles an executor scheduler both helloworld and minimesos-cli images .", "After the cluster is up the containersol minimesos container exists and is removed .", "Based on my code study i am a java beginner minimesos-cli jar which is an executable-jar is a command-line interface to minimesos jar and accordingly has a void main .", "I was able to setup the minimesos cluster on my laptop and also could deploy a small command-line utility .", "It instead uses minimesos by doing its image pull first as that image is not built by make but just the jar .", "We have separated cli and minimesos core as a refactoring to prepare for the upcoming API module .", "I ve also changed the networking from HOST to BRIDGE on the assumption that this is consistent with the minimesos caveats at http : minimesos.readthedocs.org en latest .", "The minimesos project is essentially a shell on top of docker to start stop master slave marathon zookeeper containers in a batch .", "FYI I got Mesos Kafka installed on minimesos via a quickstart shell script .", "I m trying to launch the kafka-mesos framework scheduler using the docker-container as prescribed at https : github.com mesos kafka tree master src docker running-image-in-marathon using the Marathon implementation running in minimesos I would like to add a minimesos tag but don t have the points .", "I am looking into this and you can follow progress on this issue at https : github.com ContainerSolutions minimesos issues 188 and https : github.com mesos kafka issues 172", "See this PR on Mesos Kafka https : github.com mesos kafka pull 183 .. . .. . It does not use Marathon and the minimesos install command yet .", "The conflicting constraints are : field : hostname operator : LIKE value : master The hostname in the offer is 0f366bef3c2a so mesos-kafka appears to expect a name resolution that isn t present in the minimesos runtime environment .", "there is also a docker commandline to run kafka-mesos according to the instructions : docker run -it -p 7000 : 7000 --add-host master : 192.168.99.100 batwicket kafka-mesos . kafka-mesos.sh scheduler --master master : 5050 --zk master : 2181 --api http : accessible-ip : 7000 --storage zk : kafka-mesos but get an error : 2016-01-06 20 : 40 : 33 448 main-SendThread master : 2181 WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null unexpected error closing socket connection and attempting reconnect I believe the zookeeper config is different for minimesos .", "Now the questions .. . .. . 1 .", "It is pulled but I don t see it running when I do docker ps .", "docker images lists it .", "2 .", "How come when I run top inside the mesos-agent container I see all the processes running in my host laptop", "This is a bit strange .", "3 .", "I see that there s just one docker run .. . command .", "Would really appreciate if I could get to know what the aforementioned command does that results into 4 containers 1 master 1 slave 1 zk 1 marathon running on my laptop .", "It only runs until it executes the command from the CLI .", "The container in turn will execute the Java code that will create the other containers that form the Mesos cluster specified in the minimesosFile .", "That should answer 3 also .", "Take a look at MesosCluster class thats the root of where the magic happens .", "I don t know the answer to 2 will get back to you when I find out .", "Thanks .", "Few more observations :", "Checkout out the code .", "I couldn t find any main function in there or some config that specifies an entry .", "It then launches a cluster by starting other containers like containersol mesos-agent and containersol mesos-master .", "We are creating an API to support clients for different programming language .", "The first client will be a Golang client .", "The clients will also launch the API server and call the API .", "The app is registered and can be seen in the Marathon console but it remains in Waiting state and the Deployment GUI says that it is trying to ScaleApplication .", "I ve tried looking for var log files in the marathon and mesos-master containers that might show why this is happening .", "Initially i thought it may have been because the image was not pulled so i added forcePullImage : true to the JSON app configuration but it still waits .", "In the mesos log i do see : .. . I0106 20 : 07 : 15.259790 15 master.cpp : 4967 Sending 1 offers to framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266100 9 master.cpp : 3300 Processing DECLINE call for offers : 5e1508a8-0024-4626-9e0e-5c063f3c78a9-O77 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266633 9 hierarchical.hpp : 1103 Recovered ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 total : ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 allocated : on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 from framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 15.266770 9 hierarchical.hpp : 1140 Framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 filtered slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for 2mins .. . I0106 20 : 07 : 16.261010 11 hierarchical.hpp : 1521 Filtered offer with ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 16.261245 11 hierarchical.hpp : 1326 No resources available to allocate .. . I0106 20 : 07 : 16.261335 11 hierarchical.hpp : 1421 No inverse offers to send out .. . but I m not sure if this is relevant since it does not correlate to the resource settings in the Kafka App config .", "The GUI shows that no tasks have been created .", "I do have ten mesosphere inky docker tasks running alongside the attempted Kafka deployment .", "This may be a configuration issue specific to the Kafka docker image .", "I just don t know the best way to debug it .", "Perhaps a case of increasing the log levels in a config file .", "It may be an environment variable or network setting .", "I m digging into it and will update my progress but any suggestions would be appreciated .", "thanks", "perhaps i should add that the Docker repository used for the mesos-kafka image is public .", "The image was built and pushed to DockerHub according to the instructions at github.com mesos kafka tree master src https : github.com mesos kafka tree master src docker running-image-in-marathon .", "Looking at the mesos log on the master and filtering for marathon i see : Processing REVIVE call for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Sending 1 offers to framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Processing DECLINE call for offers : 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O9 for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 .", "docker logs marathon container id shows : 2016-01-07 04 : 53 : 13 264 WARN Offer 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O23 .", "Constraints for app kafka-mesos-scheduler not satisfied .", "it would seem to be a problem with the kafka-mesos JSON file .", "The resource on offer is the id associated with one of the mesos slaves .", "If i remove the constraint line in the JSON file it launches .", "Thanks for trying this out", "It would be great if you could update this answer at some point in the future when the issue is completed .", "Just for the benefit of people who find this question on SO :", "will do. .", "I think it s just a question of when they get time to implement the feature or find suggest how to properly set LIBPROCESS IP .", "You can do something similar with medium.com @gargar454 https : medium.com @gargar454 deploy-a-mesos-cluster-with-7-commands-using-docker-57951e020586 .vkh1n6hym if blocked .", "That is the next step .", "thanks for the update Frank .", "I ve been rather busy on other matters but will come back to it ." ] }
{ "confidence": [ 39.85348129272461, 39.35675048828125, 31.788700103759766, 28.947540283203125 ], "content": [ "Question : I was able to setup the minimesos cluster on my laptop and also could deploy a small command-line utility . Now the questions .. . .. . 1 . What is the image containersol minimesos used for It is pulled but I don t see it running when I do docker ps . docker images lists it . 2 . How come when I run top inside the mesos-agent container I see all the processes running in my host laptop This is a bit strange . 3 . I was trying to figure out what s inside minimesos script . I see that there s just one docker run .. . command . Would really appreciate if I could get to know what the aforementioned command does that results into 4 containers 1 master 1 slave 1 zk 1 marathon running on my laptop . .. . Answer : containersol minimesos runs the Java code that is the core of minimesos . It only runs until it executes the command from the CLI . When you do minimesos up the command name and the minimesosFile will be passed to this container . The container in turn will execute the Java code that will create the other containers that form the Mesos cluster specified in the minimesosFile . That should answer 3 also . Take a look at MesosCluster class thats the root of where the magic happens . I don t know the answer to 2 will get back to you when I find out . Comment : Thanks . Few more observations : Comment : Checkout out the code . make compiles an executor scheduler both helloworld and minimesos-cli images . Based on my code study i am a java beginner minimesos-cli jar which is an executable-jar is a command-line interface to minimesos jar and accordingly has a void main . But I am confused as I think minimesos-cli is not used when doing minimesos up . It instead uses minimesos by doing its image pull first as that image is not built by make but just the jar . So how does minimesos run on its own I couldn t find any main function in there or some config that specifies an entry .", "Question : I was able to setup the minimesos cluster on my laptop and also could deploy a small command-line utility . Now the questions .. . .. . 1 . What is the image containersol minimesos used for It is pulled but I don t see it running when I do docker ps . docker images lists it . 2 . How come when I run top inside the mesos-agent container I see all the processes running in my host laptop This is a bit strange . 3 . I was trying to figure out what s inside minimesos script . I see that there s just one docker run .. . command . Would really appreciate if I could get to know what the aforementioned command does that results into 4 containers 1 master 1 slave 1 zk 1 marathon running on my laptop . .. . Answer : Every minimesos command runs as a short lived container whose image is containersol minimesos . When you run minimesos up it launches containersol minimesos with up as the argument . It then launches a cluster by starting other containers like containersol mesos-agent and containersol mesos-master . After the cluster is up the containersol minimesos container exists and is removed . We have separated cli and minimesos core as a refactoring to prepare for the upcoming API module . We are creating an API to support clients for different programming language . The first client will be a Golang client . In this new setup minimesos will run launch a long running API server and any minimesos cli commands call the API . The clients will also launch the API server and call the API .", "Question : I m trying to launch the kafka-mesos framework scheduler using the docker-container as prescribed at https : github.com mesos kafka tree master src docker running-image-in-marathon using the Marathon implementation running in minimesos I would like to add a minimesos tag but don t have the points . The app is registered and can be seen in the Marathon console but it remains in Waiting state and the Deployment GUI says that it is trying to ScaleApplication . I ve tried looking for var log files in the marathon and mesos-master containers that might show why this is happening . Initially i thought it may have been because the image was not pulled so i added forcePullImage : true to the JSON app configuration but it still waits . I ve also changed the networking from HOST to BRIDGE on the assumption that this is consistent with the minimesos caveats at http : minimesos.readthedocs.org en latest . In the mesos log i do see : .. . I0106 20 : 07 : 15.259790 15 master.cpp : 4967 Sending 1 offers to framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266100 9 master.cpp : 3300 Processing DECLINE call for offers : 5e1508a8-0024-4626-9e0e-5c063f3c78a9-O77 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266633 9 hierarchical.hpp : 1103 Recovered ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 total : ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 allocated : on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 from framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 15.266770 9 hierarchical.hpp : 1140 Framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 filtered slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for 2mins .. . I0106 20 : 07 : 16.261010 11 hierarchical.hpp : 1521 Filtered offer with ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 16.261245 11 hierarchical.hpp : 1326 No resources available to allocate .. . I0106 20 : 07 : 16.261335 11 hierarchical.hpp : 1421 No inverse offers to send out .. . but I m not sure if this is relevant since it does not correlate to the resource settings in the Kafka App config . The GUI shows that no tasks have been created . I do have ten mesosphere inky docker tasks running alongside the attempted Kafka deployment . This may be a configuration issue specific to the Kafka docker image . I just don t know the best way to debug it . Perhaps a case of increasing the log levels in a config file . It may be an environment variable or network setting . I m digging into it and will update my progress but any suggestions would be appreciated . thanks Comment : perhaps i should add that the Docker repository used for the mesos-kafka image is public . The image was built and pushed to DockerHub according to the instructions at github.com mesos kafka tree master src https : github.com mesos kafka tree master src docker running-image-in-marathon . Comment : there is also a docker commandline to run kafka-mesos according to the instructions : docker run -it -p 7000 : 7000 --add-host master : 192.168.99.100 batwicket kafka-mesos . kafka-mesos.sh scheduler --master master : 5050 --zk master : 2181 --api http : accessible-ip : 7000 --storage zk : kafka-mesos but get an error : 2016-01-06 20 : 40 : 33 448 main-SendThread master : 2181 WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null unexpected error closing socket connection and attempting reconnect I believe the zookeeper config is different for minimesos . Comment : Looking at the mesos log on the master and filtering for marathon i see : Processing REVIVE call for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Sending 1 offers to framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Processing DECLINE call for offers : 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O9 for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 . Comment : docker logs marathon container id shows : 2016-01-07 04 : 53 : 13 264 WARN Offer 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O23 . Constraints for app kafka-mesos-scheduler not satisfied . The conflicting constraints are : field : hostname operator : LIKE value : master The hostname in the offer is 0f366bef3c2a so mesos-kafka appears to expect a name resolution that isn t present in the minimesos runtime environment . Comment : it would seem to be a problem with the kafka-mesos JSON file . The resource on offer is the id associated with one of the mesos slaves . If i remove the constraint line in the JSON file it launches . .. . Answer : FYI I got Mesos Kafka installed on minimesos via a quickstart shell script . See this PR on Mesos Kafka https : github.com mesos kafka pull 183 .. . .. . It does not use Marathon and the minimesos install command yet . That is the next step . Comment : thanks for the update Frank . I ve been rather busy on other matters but will come back to it .", "Question : I m trying to launch the kafka-mesos framework scheduler using the docker-container as prescribed at https : github.com mesos kafka tree master src docker running-image-in-marathon using the Marathon implementation running in minimesos I would like to add a minimesos tag but don t have the points . The app is registered and can be seen in the Marathon console but it remains in Waiting state and the Deployment GUI says that it is trying to ScaleApplication . I ve tried looking for var log files in the marathon and mesos-master containers that might show why this is happening . Initially i thought it may have been because the image was not pulled so i added forcePullImage : true to the JSON app configuration but it still waits . I ve also changed the networking from HOST to BRIDGE on the assumption that this is consistent with the minimesos caveats at http : minimesos.readthedocs.org en latest . In the mesos log i do see : .. . I0106 20 : 07 : 15.259790 15 master.cpp : 4967 Sending 1 offers to framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266100 9 master.cpp : 3300 Processing DECLINE call for offers : 5e1508a8-0024-4626-9e0e-5c063f3c78a9-O77 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 marathon at scheduler-575c233a-8bc3-413f-b070-505fcf138ece@172.17.0.6 : 39111 .. . I0106 20 : 07 : 15.266633 9 hierarchical.hpp : 1103 Recovered ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 total : ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 allocated : on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 from framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 15.266770 9 hierarchical.hpp : 1140 Framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 filtered slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for 2mins .. . I0106 20 : 07 : 16.261010 11 hierarchical.hpp : 1521 Filtered offer with ports : 33000-34000 cpus : 1 mem : 1001 disk : 13483 on slave 5e1508a8-0024-4626-9e0e-5c063f3c78a9-S0 for framework 5e1508a8-0024-4626-9e0e-5c063f3c78a9-0000 .. . I0106 20 : 07 : 16.261245 11 hierarchical.hpp : 1326 No resources available to allocate .. . I0106 20 : 07 : 16.261335 11 hierarchical.hpp : 1421 No inverse offers to send out .. . but I m not sure if this is relevant since it does not correlate to the resource settings in the Kafka App config . The GUI shows that no tasks have been created . I do have ten mesosphere inky docker tasks running alongside the attempted Kafka deployment . This may be a configuration issue specific to the Kafka docker image . I just don t know the best way to debug it . Perhaps a case of increasing the log levels in a config file . It may be an environment variable or network setting . I m digging into it and will update my progress but any suggestions would be appreciated . thanks Comment : perhaps i should add that the Docker repository used for the mesos-kafka image is public . The image was built and pushed to DockerHub according to the instructions at github.com mesos kafka tree master src https : github.com mesos kafka tree master src docker running-image-in-marathon . Comment : there is also a docker commandline to run kafka-mesos according to the instructions : docker run -it -p 7000 : 7000 --add-host master : 192.168.99.100 batwicket kafka-mesos . kafka-mesos.sh scheduler --master master : 5050 --zk master : 2181 --api http : accessible-ip : 7000 --storage zk : kafka-mesos but get an error : 2016-01-06 20 : 40 : 33 448 main-SendThread master : 2181 WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null unexpected error closing socket connection and attempting reconnect I believe the zookeeper config is different for minimesos . Comment : Looking at the mesos log on the master and filtering for marathon i see : Processing REVIVE call for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Sending 1 offers to framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 Processing DECLINE call for offers : 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O9 for framework 7e93533d-9b6a-46f9-ab08-1e771cb7327b-0000 marathon at scheduler-2cb48b67-ccde-4f6d-9360-3a7c01541bab@172.17.0.6 : 50597 . Comment : docker logs marathon container id shows : 2016-01-07 04 : 53 : 13 264 WARN Offer 7e93533d-9b6a-46f9-ab08-1e771cb7327b-O23 . Constraints for app kafka-mesos-scheduler not satisfied . The conflicting constraints are : field : hostname operator : LIKE value : master The hostname in the offer is 0f366bef3c2a so mesos-kafka appears to expect a name resolution that isn t present in the minimesos runtime environment . Comment : it would seem to be a problem with the kafka-mesos JSON file . The resource on offer is the id associated with one of the mesos slaves . If i remove the constraint line in the JSON file it launches . .. . Answer : Thanks for trying this out I am looking into this and you can follow progress on this issue at https : github.com ContainerSolutions minimesos issues 188 and https : github.com mesos kafka issues 172 Comment : It would be great if you could update this answer at some point in the future when the issue is completed . Just for the benefit of people who find this question on SO : Comment : will do. . I think it s just a question of when they get time to implement the feature or find suggest how to properly set LIBPROCESS IP . The minimesos project is essentially a shell on top of docker to start stop master slave marathon zookeeper containers in a batch . You can do something similar with medium.com @gargar454 https : medium.com @gargar454 deploy-a-mesos-cluster-with-7-commands-using-docker-57951e020586 .vkh1n6hym if blocked ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mesos
UNK_RELATION
hcatalog@hadoop@80
hcatalog -- table and storage management service for data created using apache @placeholder .
{ "confidence": [ 38.16489791870117, 37.92820358276367, 36.696224212646484, 34.68065643310547, 32.70192337036133, 31.2930850982666, 30.526548385620117, 30.50479507446289, 30.50479507446289, 30.152631759643555, 29.75336456298828, 28.731369018554688, 28.41169548034668, 27.81650161743164, 27.480680465698242, 27.473957061767578, 27.27092170715332, 27.093326568603516, 27.05929183959961, 26.91560173034668, 26.619239807128906, 26.501022338867188, 26.279808044433594, 26.214567184448242, 26.214567184448242, 25.724063873291016, 25.447505950927734, 24.973522186279297, 24.972660064697266, 24.880069732666016, 24.75509262084961, 24.666112899780273, 24.666112899780273, 24.508651733398438, 24.508651733398438, 24.508651733398438, 24.462467193603516, 24.349395751953125, 24.280372619628906, 24.11121940612793, 23.93036651611328, 23.66539764404297, 23.60569190979004, 23.525339126586914, 23.367877960205078, 22.757110595703125, 22.65673065185547, 22.210796356201172, 22.210796356201172, 22.210796356201172, 22.210796356201172, 22.210796356201172, 22.210796356201172, 22.210796356201172, 22.187259674072266, 22.187259674072266, 22.158092498779297, 22.158092498779297, 21.63612937927246, 21.518888473510742, 21.302326202392578, 21.14303207397461, 21.070022583007812, 21.014190673828125, 20.922067642211914, 20.857650756835938, 20.565494537353516, 20.493499755859375, 20.256052017211914, 20.24909019470215, 20.101783752441406, 19.886472702026367, 19.702774047851562, 19.60752296447754, 19.598339080810547, 19.569364547729492, 19.485454559326172, 19.22930908203125, 19.22930908203125, 19.22930908203125, 19.22930908203125, 19.189117431640625, 19.010868072509766, 18.88871955871582, 18.84951400756836, 18.72734832763672, 18.57894515991211, 18.503005981445312, 18.3319034576416, 18.296436309814453, 18.08853530883789, 17.941125869750977, 17.89238739013672, 17.81610107421875, 17.679046630859375, 17.583417892456055, 17.580638885498047, 17.51917266845703, 17.021615982055664, 16.85280418395996 ], "content": [ "By default using HCatalog APIs will not overwrite the existing data .", "if there is table already exist in hive then can insert new data in existing table using HCatalog", "I try to load table using HCatalog in pig and i succeeded in that .", "https : github.com apache hcatalog blob branch-0.1 src test org apache hcatalog mapreduce HCatMapReduceTest.java", "Where Hcatalog comes into picture .", "Loading data into hive from HDFS and then analyse it from pig using hcatalog .", "I created the HCatalog table manually and had used all of the default options including the delimiter which was set to A 100 .", "I came across one concept of HCatalog .", "I would like to know why HCatalog is used .", "Table data was created in mapreduce job in parquet format then I created external table pointing to this data using Impala .", "I am using Hcatalog for that .", "Can someone share some detailed comparison difference among HCatalog Wherehows Atlas in terms of unified big data metadata management in the followings : .. . .. . 1 .", "hcatalog jars are missing .", "You need to use org.apache.hive.hcatalog.pig.HCatLoader instead of org.apache.hcatalog.pig.hcatloader from the link http : hive.apache.org javadocs r0.13.1 api hcatalog hcatalog-pig-adapter org apache hcatalog pig HCatLoader.html", "Now i want to read this in my MR code using HCatalog integration .", "I use HCatalog version 0.4 .", "check for hcatalog jar in classpath", "with hcatalog date type is not supported even if you create-table at hive as well...better way is to use TDCH which supports date data type", "Here is my local script : .. . .. . The one I m using in HortonWorks : .. . .. . Sample XML row from the StackOverflow public dataset : .. . .. . I created the HCatalog table manually and all the correct fields exists and are of the correct type .", "Does someone know a tool maybe based on HCatalog https : cwiki.apache.org confluence display Hive HCatalog permitting to obtain this view", "Ah maybe you are confusing HiveServer2 the JDBC service and WebHCat the REST interface to HCatalog .", "From a post I saw In short HCatalog opens up the hive metadata to other mapreduce tools . .", "I d really like to take this messy XML file and get a neat table in HCatalog .", "Ok the answer is that Teradata connector doesn t support Hcatalog .", "The problem is that hcatalog doesn t support timestamp type .", ": .. . .. . Can we achieve this using Map Reduce program using HCatalog related libraries .", "We can load data to existing table .", "If you are running a Pig script an alternative is to determine the location of the HCatalog jar and add a REGISTER statement with the path of the jar to the top of your script .. . .. . Example : .. . .. . REGISTER home user Installations hive-0.11.0-bin hcatalog share hcatalog hcatalog-core-0.11.0.jar .. . .. . of course your path version may be different .", "I was running a pig script with tez as the execution engine and using hcatalog .", "Is it ok to load data from hcatalog and analyse it into pig will this have performance overhead compare to directly read data from pig by keeping it into the HDFS .", "Though I haven t used HCatalog but read somewhere may be I misunderstood that if I create schema in HCatalog then I can use any format for exporting importing data and can also plug Sqoop there", "I have a java application which reads hive metadata using hcatalog apis .", "I was trying to integrate PIG with hive using Hcatalog but getting the below error during dump .", "community.hortonworks.com questions 21993 https : community.hortonworks.com questions 21993 hcatalog-and-kerberos.html", "Hcatalog does a range check when converting bigdecimal in pig to Decimal in hive .", "Already looked at stackoverflow link http : stackoverflow.com questions 14121769 hcatalog-with-mapreduce", "I Have a mapreduce program in which i make use of Hcatalog to get details from a Hive table A with HcatInputFormat process it and write it back to Hive table B using HcatOutput format .", "However for some reason when I run this same script in the HortonWorks VM the script appears to run successfully but the HCatalog table is still empty .", "By default sqoop does not support incremental update with hcatalog integration when we try it gives following error .. . .. . Append mode for imports is not compatible with HCatalog .", "Hive with UDFs + explicit combiner RESTful service + JDBC Beeline HCatalog as Hive command API .", "Below is the error message I get - .. . .. . The method createRecordReader of Hcatalog 1.2 HCatBaseInputFormat and the partitionInfo.getTableInfo is null .", "root@ubuntu : home hive hcatalog share hcatalog export HIVE LIB home hive hcatalog share hcatalog hive-hcatalog-core-1.2.1.jar root@ubuntu : home hadoop share hadoop mapreduce hadoop jar logs.jar LogReader -libjars HIVE LIB input 1 output output1 root@ubuntu : home hadoop share hadoop mapreduce .. . .. . I am not sure why it is skipping to the next line .", "We can insert data to existing partition.. . Hcatalog APIs will take partition as well...For example while writing output we can specify the partition to write.. . OutputJobInfo create String databaseName String tableName Map String String partitionValues", "You can now launch pig shell just by using command to use HCatalog-", "I am unable to run hadoop program with hcatalog libraries added to the command .", "You created a table with a custom dynamic partitioning pattern you added a partition and you selected data out of it .", "The test table is created with this column definition of DECIMAL 16 0 .", "And AFAIK it does not use HCatalog -- because HCat is actually the interface offered to programs external to the Hive project i.e .", "java.lang.RuntimeException : java.lang.ClassNotFoundException : class org.apache.hcatalog.mapreduce.HCatOutputFormat not found .. . .. . I tried setting the -libjars with the hcatalog core jar as follows but still it fails .", "Relevant info : Vertica 7.2.1 Amazon EMR 4.4 Hive Hcatalog 1.0 Java 1.7 on both EMR and Vertica instance", ": .home.hduser.durgasoft.apache-hive-0.13.1-bin.hcatalog.share.hcatalog.hive-hcatalog-pig-adapter-0.13.1.jar .. . .. . What is the root cause .", "I guess those strings come from one of the field in array and the error is introduced while storing via HCatalog .", "If you use Hive-Hcatalog 0.13.0 check path to HCatLoader you must use org.apache.hive.hcatalog.pig.HCatLoader instead org.apache.hcatalog.pig.HCatLoader", "Reference : .. . .. . https : cwiki.apache.org confluence display Hive HCatalog+LoadStore HCatalogLoadStore-TypesinHive0.13.0andLater.1", "Ok I figured it out since there is limited info on this topic : .. . .. . https : cwiki.apache.org confluence display Hive HCatalog+LoadStore HCatalogLoadStore-TypesinHive0.13.0andLater.1 .. . .. . I needed to use the DATETIME instead of chararray .. . .. . Table of type conversions :", "I am running a Pig script in the HortonWorks virtual-machine with the goal of extracting certain parts of my XML dataset and loading those parts into columns in an HCatalog table .", "I think there is a issue when you write to S3 from pig using HCatalog .", "Hence now I need some way by which I can access the partitions using something like HCatalog .", "I have a table in Hive looks like .. . .. . uid : string ary1 : array struct ... . ary2 : array struct .. . .. . ary4 : array struct .. . .. . .. . And I need to do some processing on the upstream data and store them back to hive via HCatalog .", "Alternatively if I can just get the output on my local machine as a comma-delimited file I can use that file and have HCatalog automatically load the data in the Hue interface .", "Again I get the results I m looking for when running the local script on my machine but when I run the second version designed for storing the output into the posts table 1 HCatalog table I get a success message but an empty table .", "In table we can but in partition we can not", "HCatalog seems to be a solution but even in this case I am unclear how to import the schema", "Job Client code : .. . .. . Job Run Command : .. . .. . Before running this command i have set the necessary hcatalog hive jars in the class path using the hadoop classpath variable .", "Now export the new export table1 table which is incrementally created using sqoop export command .", "I am using Hcatalog integration for sqoop.I tried using the --last-value --check-column options which are used for incremental import but sqoop gave me error that the options were invalid .", ".. . .. . Error message is .. . .. . The table size is too small compared to the cluster memory and storage .", "I am trying to read data from a Hive table using Pig .", "When I updated my project from hive 0.13 to hive 1.2 I created a HCatMutilTableInputFormat for input multi-table to MapReduce by HCatlog .", "Pig support such cases of reading data from hive table created over multiple parquet files with different schema .", "Sample data for your table .", "okk....but in existing partition we cannot insert data .", "So this appears to be a problem with the interplay of Pig HCatalog S3 as a stack any two of these together seem to work fine .", "Environment : HDP 2.3 Sandbox .. . .. . Problem : I have created a table in hive with just 2 columns .", "But there will be data loss when using HCatLoader .", "I ran into issues while trying to read the hive table and write to a hive table using mapreduce .", "Using extending a Hive gateway implementation like the Knox gateway-service-hive : http : repo1.maven.org maven2 org apache knox gateway-service-hive 0.8.0 Problem : Too Knox-specific .", "According to the documentation you should be able to specify a custom pattern for a partition Hive external tables partitions https : cwiki.apache.org confluence display Hive HCatalog+DynamicPartitions HCatalogDynamicPartitions-ExternalTables .", "Target filed must be of HCat type STRING or CHAR or VARCHAR .. . .. . I looked up http : pig.apache.org docs r0.9.1 basic.html and discovered PIG does not have a format for date with HCatalog .", "I ve setup the Vertica HCatalog connector to do some simple queries off my hive tables but I keep running into the 3399 error - except its none of the errors listed in the Vertica documentation .", "Applies To CDH 5.0.x CDH 5.1.x CDH 5.2.x CDH 5.3.x Sqoop .. . .. . Cause Sqoop cannot pick up the HCatalog libraries because Cloudera Manager does not set the HIVE HOME environment .", "I am trying to export table to Teradata using Sqoop .", "In my case the output should be written to s3 : x y but the data was written to s3 : x y temporary attempt 1466700620679 0019 r 000000 0 part-r-00000 .. . .. . Workaround for this was writing the output from HCatalog to HDFS and then to S3 .", "How do you make sure that data in both table is same", "I created an external Hive 1.0 on EMR table that is stored in S3 .", "I have an error when I try to load or save my data from Apache Pig into anything but CSV .", "You can STORE the loaded data into text file using delimiters may be comma and then create an external table in hive pointing to your file location .", "e.g . you created a table like : .. . .. . From this table you can create temp hive table like : .. . .. . In the target teradata side you can give the datatype as Date : .. . .. . And now you can run the job like : .. . .. . This works fine .", "I would personally prefer to do ETL using Pig.In your case JSON data can be loaded using JsonLoader and can be stored using JsonStorage.So I would load the data using Jsonloader and then store them in csv.Then I would use Hive to analyze this data .", "After running I get the following error : .. . .. . For information I have all the required libraries and HCatalog Loader Storer works perfectly with oozie launcher .", "All the jars aalready exists in your hadoop cluster you need just to pass their location to your program it s mentioned in the official doc https : cwiki.apache.org confluence display Hive HCatalog+InputOutput HCatalogInputOutput-RunningMapReducewithHCatalog :", "The crate table statement of the hive table is : .. . .. . Any pointers are appreciated .", "The file isn t large enough to need distributed storage .", "Did you consider using a JDBC connection to run metadata commands such as describe extended show partitions alter table", "BTW the Oozie committers appear to do it that way : github.com apache oozie blob master core src main java org https : github.com apache oozie blob master core src main java org apache oozie action hadoop HCatCredentialHelper.java", "JSON load .. . .. . http : joshualande.com read-write-json-apache-pig .. . .. . Alternative we can use twitter elephantbird json loader .. . .. . http : eric.lubow.org 2011 hadoop pig-queries-parsing-json-on-amazons-elastic-map-reduce-using-s3-data", "My output had columns separated by Tab spaces t so when the table received the data it found no A delimiter and stored an empty dataset .", "I am going through a POC in which i need to write the MRUnit test cases for my mapper which uses a input format as Hcatalog .. . .. . But i am facing issues at these lines-of-code .. . .. . Error : : mapDriver.withInput new LongWritable record throws java.lang.RuntimeException : java.lang.NoSuchMethodException : com.MRScoringUnitTest 1 .", "http : www.docjar.com html api org apache hadoop hive conf HiveConf.java.html .. . .. . My question is how can I config to access HDFS namenode HA with HiveConf class by using hive-common-1.2.1.jar", "One Hive table t event is in demo read database ." ] }
{ "confidence": [ 44.233909606933594, 41.289459228515625, 38.07024002075195, 35.99951171875, 35.62116241455078, 35.371829986572266, 35.0902214050293, 35.073265075683594, 34.3758430480957, 33.94139099121094, 33.87865447998047, 33.69267272949219, 33.18418884277344, 33.18418884277344, 32.83835983276367, 32.37856674194336, 32.273460388183594, 32.0056266784668, 31.953807830810547, 31.758365631103516 ], "content": [ "Question : I am learning Pig and Hive . I came across one concept of HCatalog . I try to load table using HCatalog in pig and i succeeded in that . Now i want to use HCatstorer . if there is table already exist in hive then can insert new data in existing table using HCatalog .. . Answer : Yes . We can load data to existing table . It creates new files under the existing directory . By default using HCatalog APIs will not overwrite the existing data . Comment : okk....but in existing partition we cannot insert data . right In table we can but in partition we can not Comment : We can insert data to existing partition.. . Hcatalog APIs will take partition as well...For example while writing output we can specify the partition to write.. . OutputJobInfo create String databaseName String tableName Map String String partitionValues", "Question : I am running a Pig script in the HortonWorks virtual-machine with the goal of extracting certain parts of my XML dataset and loading those parts into columns in an HCatalog table . On my local machine I run my Pig script on the XML file and get an output file with all the extracted parts . However for some reason when I run this same script in the HortonWorks VM the script appears to run successfully but the HCatalog table is still empty . Here is my local script : .. . .. . The one I m using in HortonWorks : .. . .. . Sample XML row from the StackOverflow public dataset : .. . .. . I created the HCatalog table manually and all the correct fields exists and are of the correct type . The strange thing is that if I do dump data in Pig I get no output . If I illustrate data I see pieces of my data in the log followed by large blank areas followed by more data and so on . What am I missing here I d really like to take this messy XML file and get a neat table in HCatalog . Again I get the results I m looking for when running the local script on my machine but when I run the second version designed for storing the output into the posts table 1 HCatalog table I get a success message but an empty table . Alternatively if I can just get the output on my local machine as a comma-delimited file I can use that file and have HCatalog automatically load the data in the Hue interface . As of now the output is space-delimited which is problematic in Hue because the titles of posts contain spaces . Thanks in advance This has me stumped . .. . Answer : I found the issue . I created the HCatalog table manually and had used all of the default options including the delimiter which was set to A 100 . My output had columns separated by Tab spaces t so when the table received the data it found no A delimiter and stored an empty dataset . I recreated the table to look for t and everything worked fine .", "Question : I am trying to export table to Teradata using Sqoop . Table data was created in mapreduce job in parquet format then I created external table pointing to this data using Impala . Here is comand i am running : .. . .. . But it fails with next exception showing only tail : .. . .. . What is wrong .. . Answer : Ok the answer is that Teradata connector doesn t support Hcatalog .", "Question : null .. . Answer : I have a java application which reads hive metadata using hcatalog apis . If I need to read metadata from a hive database on a cluster with Kerberos and knox would the following configuration work .. . .. . I will be running the Java program from a remote windows machine . If my hive-site.xml on the cluster contains the following properties .. . .. . how do I configure the HCatClient to connect to hive Comment : Looks like you ve been asking in many places and no one knows how the damn thing works . Did you consider using a JDBC connection to run metadata commands such as describe extended show partitions alter table Comment : BTW the Oozie committers appear to do it that way : github.com apache oozie blob master core src main java org https : github.com apache oozie blob master core src main java org apache oozie action hadoop HCatCredentialHelper.java Comment : community.hortonworks.com questions 21993 https : community.hortonworks.com questions 21993 hcatalog-and-kerberos.html", "Question : null .. . Answer : Can someone share some detailed comparison difference among HCatalog Wherehows Atlas in terms of unified big data metadata management in the followings : .. . .. . 1 . Hive Hbase HDFS MongoDB etc support . 2 . How easy to extend if there is data source uncovered", "Question : I use HCatalog version 0.4 . I have a table in hive abc which has a column with datatype timestamp . When i try to run a pig script like this raw data load abc using org.apache.hcatalog.pig.HCatLoader i get an error saying java.lang.TypeNotPresentException : Type timestamp not present . .. . Answer : Hive 0.13 has Timestamp data type . But there will be data loss when using HCatLoader . But Hive - Pig will using HCat Loader the nanoseconds will be lost from timestamp . Pig - Hive using HCat Storer . Translates based on Timestamp using milli seconds . Reference : .. . .. . https : cwiki.apache.org confluence display Hive HCatalog+LoadStore HCatalogLoadStore-TypesinHive0.13.0andLater.1", "Question : I am going through a POC in which i need to write the MRUnit test cases for my mapper which uses a input format as Hcatalog .. . .. . But i am facing issues at these lines-of-code .. . .. . Error : : mapDriver.withInput new LongWritable record throws java.lang.RuntimeException : java.lang.NoSuchMethodException : com.MRScoringUnitTest 1 . .. . Answer : Many of the Custom file Input Output formats doesn t work with MRUnit . Even HCatInputFormat doesn t work with MRUnit . HCatlog APIs need a working hive metastore to access tables over mapreduce . When your code has any custom map reduce components like Comparators Partitioners or Input Output formats MRUnit cannot be used for unit-testing . Miniclusters can be used for testing the same . https : github.com apache hcatalog blob branch-0.1 src test org apache hcatalog mapreduce HCatMapReduceTest.java", "Question : null .. . Answer : I would like to know why HCatalog is used . From a post I saw In short HCatalog opens up the hive metadata to other mapreduce tools . . But why HIVE has to open up its metadata to other tools . Where Hcatalog comes into picture . Thanks", "Question : Lets say we have JSON data and we want to generate some results for business users.So does following seems to be good approach Loading data into hive from HDFS and then analyse it from pig using hcatalog . I have below question in this regards . Q . Is it ok to load data from hcatalog and analyse it into pig will this have performance overhead compare to directly read data from pig by keeping it into the HDFS . .. . Answer : I would personally prefer to do ETL using Pig.In your case JSON data can be loaded using JsonLoader and can be stored using JsonStorage.So I would load the data using Jsonloader and then store them in csv.Then I would use Hive to analyze this data . JSON load .. . .. . http : joshualande.com read-write-json-apache-pig .. . .. . Alternative we can use twitter elephantbird json loader .. . .. . http : eric.lubow.org 2011 hadoop pig-queries-parsing-json-on-amazons-elastic-map-reduce-using-s3-data", "Question : null .. . Answer : When I updated my project from hive 0.13 to hive 1.2 I created a HCatMutilTableInputFormat for input multi-table to MapReduce by HCatlog . In hive 0.13 the method createRecordReader of inputFormat can get the TableInfo from the inputSplit . But the version 1.2 can t . Below is the error message I get - .. . .. . The method createRecordReader of Hcatalog 1.2 HCatBaseInputFormat and the partitionInfo.getTableInfo is null . Can anyone tell me why Can I get the tableInfo from the InputSplit How can I get it Here is my code -", "Question : null .. . Answer : I ran into issues while trying to read the hive table and write to a hive table using mapreduce . Input and output : .. . .. . Input hive table : mr input text .. . .. . Output hive table : mr output text .. . .. . Command that runs the MapReduce job .. . .. . Environment : HDP 2.3.2 .. . .. . This fails with the following exception . Used yarn logs -applicationId command to get this log . java.lang.RuntimeException : java.lang.ClassNotFoundException : class org.apache.hcatalog.mapreduce.HCatOutputFormat not found .. . .. . I tried setting the -libjars with the hcatalog core jar as follows but still it fails . Note : .. . .. . 1 . I tried running from both as hdfs and hive user . 2 . Already looked at stackoverflow link http : stackoverflow.com questions 14121769 hcatalog-with-mapreduce", "Question : null .. . Answer : Environment : HDP 2.3 Sandbox .. . .. . Problem : I have created a table in hive with just 2 columns . Now i want to read this in my MR code using HCatalog integration . The MR Job fails to read the table from the MySql meta-store . It uses the Derby for some reason and hence it fails with table not found message . Job Client code : .. . .. . Job Run Command : .. . .. . Before running this command i have set the necessary hcatalog hive jars in the class path using the hadoop classpath variable . Question : .. . .. . Now how do i make the job to use the hive-site.xml correctly I tried setting this in the classpath using the same hadoop classpath as mentioned above . but still it fails . Comment : Did you add etc hadoop conf and etc hive conf in the CLASSPATH Comment : @SamsonScharfrichter Thanks . How silly it can get Instead of etc hive conf i had set etc hive conf in the classpath which did not pick hive-site.xml . It works with etc hive conf . Comment : OK then edit your question so that it shows Fixed see comments or sthg similar .", "Question : I use HCatalog version 0.4 . I have a table in hive abc which has a column with datatype timestamp . When i try to run a pig script like this raw data load abc using org.apache.hcatalog.pig.HCatLoader i get an error saying java.lang.TypeNotPresentException : Type timestamp not present . .. . Answer : The problem is that hcatalog doesn t support timestamp type . It will be supported under hive 0.13 they have an issue about this problem that was already solved you can see the issue in https : issues.apache.org jira browse HIVE-5814", "Question : I use HCatalog version 0.4 . I have a table in hive abc which has a column with datatype timestamp . When i try to run a pig script like this raw data load abc using org.apache.hcatalog.pig.HCatLoader i get an error saying java.lang.TypeNotPresentException : Type timestamp not present . .. . Answer : If you use Hive-Hcatalog 0.13.0 check path to HCatLoader you must use org.apache.hive.hcatalog.pig.HCatLoader instead org.apache.hcatalog.pig.HCatLoader", "Question : null .. . Answer : I am new to hadoop . I was trying to integrate PIG with hive using Hcatalog but getting the below error during dump . Please let me know if any of you can help me out : .. . .. . ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998 : Unhandled internal error . Found interface org.apache.hadoop.mapreduce.JobContext but class was expected .. . .. . load and describe work fines but dump gives above error .. . .. . Details : hadoop-2.6.0 pig-0.14.0 hive-0.12.0 .. . .. . Compiled piggybank using .. . .. . ran hive server using hive --service hiveserver .. . .. . Please let me know if anything else needs to be configured Comment : From the deleted answer : this question may be related stackoverflow.com questions 21873050 http : stackoverflow.com questions 21873050 pig-found-interface-org-apache-hadoop-mapreduce-jobcontext-but-class-was-expe", "Question : I created an external Hive 1.0 on EMR table that is stored in S3 . I can successfully use Hive to insert records into this table query them back and pull the files directly from the S3 bucket as verification . So far so good . I would like to be able to use Pig v0.14 also on EMR to both read and write to this logical table . Loading with HCatLoader works fine and dump explain confirm that my data and schema are as expected . When I try to write with HCatStorer however I have problems . Pig reports success with N records but 0 bytes written . I see nothing that seems relevant or indicative of a problem in the log and no data is written into the table bucket . The output which again contains no other indication of problems that I can see concludes with : .. . .. . Of note : .. . .. . This works in the same environment if the table location is in HDFS instead of S3 - for both external and internal tables and from either Hive or Pig . I can successfully store directly to S3 with e.g . store a into s3n : mybucket output using PigStorage .. . An insert via the Hive shell to the same query works fine . So this appears to be a problem with the interplay of Pig HCatalog S3 as a stack any two of these together seem to work fine . Given that I don t see anything very useful in the Pig log what else should I look at to debug this Are there any particular configuration parameters for any of these technologies that I should look at Comment : hey.. . you have mentioned that you are unable to store the data in hive table even though it says that data is successfully stored can you check in HDFS and locate the path of mytable and see if any data is present Comment : @Pratik In the error case mytable lives in S3 not HDFS.. . that s the crux of the challenge here When I do a version of this where mytable is located in HDFS it works fine and data appears there as expected . .. . Answer : I think there is a issue when you write to S3 from pig using HCatalog . Since the final output data is being written to an temporary file and is never being copied moved to the original location . This weird behavior is encountered only on S3 . In my case the output should be written to s3 : x y but the data was written to s3 : x y temporary attempt 1466700620679 0019 r 000000 0 part-r-00000 .. . .. . Workaround for this was writing the output from HCatalog to HDFS and then to S3 . You can refer to the below link posted on aws forum : https : forums.aws.amazon.com thread.jspa threadID 230544 Comment : Yes thanks.. . that AWS forum post and workaround was mine : - Still +1 for the link - helps track the different thread for this answer here .", "Question : null .. . Answer : I have a table in Hive looks like .. . .. . uid : string ary1 : array struct ... . ary2 : array struct .. . .. . ary4 : array struct .. . .. . .. . And I need to do some processing on the upstream data and store them back to hive via HCatalog . The last few lines are : .. . .. . The uid is string with 12 characters and I check it in pig before the STORE statement this still holds . However when I check it in hive there are some records in Hive which have uid being very long string . I guess those strings come from one of the field in array and the error is introduced while storing via HCatalog . Anyone has idea where to start My environemnt is .. . .. . hive : 0.13.2 .. . Pig : 0.11.3", "Question : The query that I was running is : .. . .. . While running the job I get this exception : .. . .. . com.teradata.connector.common.exception.ConnectorException : DATE Field data type is not supported at com.teradata.connector.hive.utils.HiveSchemaUtils.lookupHiveDataTypeByName HiveSchemaUtils.java : 475 at com.teradata.connector.hcat.utils.HCatSchemaUtils.getRecordSchema HCatSchemaUtils.java : 396 at com.teradata.connector.hcat.processor.HCatInputProcessor.inputPreProcessor HCatInputProcessor.java : 89 at com.teradata.connector.common.tool.ConnectorJobRunner.runJob ConnectorJobRunner.java : 116 at com.teradata.connector.common.tool.ConnectorExportTool.run ConnectorExportTool.java : 62 at org.apache.hadoop.util.ToolRunner.run ToolRunner.java : 70 at org.apache.hadoop.util.ToolRunner.run ToolRunner.java : 84 at com.teradata.hadoop.tool.TeradataExportTool.main TeradataExportTool.java : 29 Is there any way I can get over this issue The crate table statement of the hive table is : .. . .. . Any pointers are appreciated . Comment : with hcatalog date type is not supported even if you create-table at hive as well...better way is to use TDCH which supports date data type .. . Answer : There was no way that I found to make the date work but I found a work around . I create a temp table with the date columns casted to String . e.g . you created a table like : .. . .. . From this table you can create temp hive table like : .. . .. . In the target teradata side you can give the datatype as Date : .. . .. . And now you can run the job like : .. . .. . This works fine . But due to the overhead of copying table the performance slows down a little .", "Question : Is there a way to use sqoop to do incremental exports I am using Hcatalog integration for sqoop.I tried using the --last-value --check-column options which are used for incremental import but sqoop gave me error that the options were invalid . .. . Answer : By default sqoop does not support incremental update with hcatalog integration when we try it gives following error .. . .. . Append mode for imports is not compatible with HCatalog . Please remove the parameter--append-mode at org.apache.sqoop.tool.BaseSqoopTool.validateHCatalogOptions BaseSqoopTool.java : 1561 .. . .. . you can use query option to make it work . as described in this hortonworks document https : docs.hortonworks.com HDPDocuments HDP2 HDP-2.4.0 bk dataintegration content incrementally-updating-hive-table-with-sqoop-and-ext-table.html", "Question : I m trying to load a date field from PIG into a hive table the PIG script has the field as : .. . .. . The Hive table description is : .. . .. . Pig chararray type in column 0 cannot map to HCat DATE type . Target filed must be of HCat type STRING or CHAR or VARCHAR .. . .. . I looked up http : pig.apache.org docs r0.9.1 basic.html and discovered PIG does not have a format for date with HCatalog . What is the best solution for storing this value as a date in HIVE if I must use PIG Thanks . .. . Answer : Ok I figured it out since there is limited info on this topic : .. . .. . https : cwiki.apache.org confluence display Hive HCatalog+LoadStore HCatalogLoadStore-TypesinHive0.13.0andLater.1 .. . .. . I needed to use the DATETIME instead of chararray .. . .. . Table of type conversions : enter image description here http : i.stack.imgur.com fsW6m.png" ] }
[ "yes-answer-long", "yes-answer-short" ]
hadoop
UNK_RELATION
interprolog@yap@91
interprolog -- interprolog is a java frontend for prolog currently supporting xsb swi and @placeholder .
{ "confidence": [ 63.201725006103516, 59.94811248779297, 59.08786392211914, 53.54619216918945, 49.94673156738281, 49.389923095703125, 49.389923095703125, 48.66607666015625, 47.82151412963867, 45.734867095947266, 44.60663604736328, 43.2196044921875, 41.87470626831055, 41.87470626831055, 41.87470626831055, 38.019989013671875, 38.019989013671875, 38.019989013671875, 36.675086975097656, 35.618404388427734, 35.5299072265625, 30.98544692993164, 26.968584060668945, 26.968584060668945, 25.415016174316406, 25.21146583557129, 24.538375854492188, 23.1412410736084, 23.11382293701172, 22.126262664794922, 22.126262664794922, 21.52450180053711, 20.781362533569336, 20.593887329101562, 20.593887329101562, 19.758758544921875, 19.584590911865234, 18.311138153076172, 18.154619216918945, 18.154619216918945, 17.46517562866211, 17.260717391967773, 16.79749870300293, 16.22040557861328, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 13.312297821044922, 11.96739673614502, 11.96739673614502, 11.96739673614502, 11.96739673614502, 11.96739673614502, 11.96739673614502 ], "content": [ "I m trying to set up an environment with interprolog and SWI prolog interprolog needs the location of swi s pl but i cant find it .", "I m using Interprolog Java+Prolog see here http : www.declarativa.com interprolog .. . .. . here is the stacktrace : .. . .. . and the code in question : .. . .. . any ideas", "According to the download page InterProlog has known issues with SWI-Prolog Version 5.10 : .. . .. . 5.4.6 or later known problems with 5.10 : - .. . .. . from http : www.declarativa.com interprolog INSTALL.htm .. . .. . Try an earlier version of SWI-Prolog", "I am currently using interprolog - which is basically java with a prolog backend allowing both java and prolog calls from each other respectively .", "I have set up and installed both interprolog and swi-prolog on my linux machine following the instructions here : Interprolog with SWI instructions on Linux http : www.declarativa.com interprolog INSTALL.htm .. . .. . I have edited the unixVariables.sh to contain the path of java and swi-prolog pl executables on my machine and that my unixVariables.sh looks like : .. . .. . Now when I go to do . runSWISPListener.sh in the interprolog folder all i get is this : .. . .. . and now nothing else happens where as according to the instructions a java window should popup with a swiprolog engine listener .", "You obtain a Prolog Engine implementation say SWISubprocessEngine http : www.declarativa.com interprolog htmldocs com declarativa interprolog SWISubprocessEngine.html and execute your prolog command with the command method .", "I m having a pretty rough time trying to make use of interprolog http : www.declarativa.com InterProlog default.htm .. . .. . I have some code trying to call a prolog command and the problem is the actual loading of my prolog database .", "It s in the zip file http : www.declarativa.com interprolog interprolog212.zip linked from the website http : www.declarativa.com interprolog INSTALL.htm .", "It might also be worth it to mention that I m using XSB 3.3.5 and INterProlog 2.2.a4", "I m trying to set up InterProlog in eclipse .", "I am currently trying to set up interprolog see http : www.declarativa.com interprolog and i ve followed the steps on the site but now I m wondering how i can use interprologs classes from my eclipse ide", "http : www.declarativa.com interprolog faq.htm trying 20Prolog will be most helpful .", "did you generate the InterProlog dynamic libraries with . makexsb dynmodule", "All i can find is swipl or plrc and neither work with interprolog .", "the thing is interprolog requires pl which i cant seem to find .", "Do i need to import the classes into my project so i can use interprolog", "Have you tried adding interprolog.jar to the build path located inside http : www.declarativa.com interprolog interprolog212.zip", "I know its quite abstract and no one really uses interprolog but any help is appreciated thanks", "so after aliasing you could start interprolog from the command-line and see if it works .", "i ended up just using XSB prolog worked fine", "SWI-Prolog and Yap Prolog support JPL Java-to-Prolog interface you may want to use it : http : www.swi-prolog.org packages jpl java-api index.html", "If i type pl into the terminal this should run swi-prolog it says .. . .. . but if i type in .. . .. . or .. . .. . prolog .. . .. . it runs swiprolog fine .", "This article How can I make a Java program that calls Prolog", "also how would you make java prolog aware of where the database is", "Now If i had say a frontend GUI coded in java swing say a login dialog which requested a username and password instead of using java code to authenticate and store passwords could I somehow use prolog to check the passwords instead", "You need to get an instance of a Prolog engine and execute any prolog command .", "I attached interprolog.jar as an external jar added the xsb to my path variable C : Users MyName config x86-pc-windows bin and I added the path to my xsb bin to the NativeEngine constructor See below .", "If you want to store the database in a traditional relational-database then I would use Java to create the clauses and have the prolog engine initialized with the data at application startup .", "My path variable already has the path to jdk1.7 and I already have xsb installed .", "I ve searched the term access-control prolog and found nothing .", "Im quite new to prolog so im trying my hardest .", "I suppose you will have the prolog database set up in advance and you can create the prolog command that will evaluate to true when a username password pair authenticates .", "Have I understood your question Is pl a symbolic link-to the prolog software", "Otherwise you can use something like consultFromPackage filename MyClass.class to load some prolog data from a file .", "So when the application starts the engine is told where to find the data that prolog will use .", "I assume it s currently in the default package i.e .", "Calling this from Java is then easy .", "bin swiprolog -f I m using the -f switch to say pass it into the prolog interpreter...check your documentation.. . .. . .. . Hope this helps Best regards Tom .", "Choose Java build path in the left side view .. . 3 .", "When you query from Java it uses the data from the file .", "Here is the code : .. . .. . when i run the program prolog initializes fine it tries to look for userlist.p which is in the same package 2nd line of code and then it throws this error : .. . .. . I looked at the code for consultFromPackage : .. . .. . but i can t seem to get to the root of the problem..i know this is all a bit far out but any help is appreciated at this point .", "Check the location of the pl executable by where pl or maybe you need to make the prolog source code .pl executable and add a header at the top of it.. . .. . .. . And use chmod u+x some file.pl .", "I have also tried ConsultFromPackage userlist.pl class as the pl file is indeed in the same package dir as the java files code location .", "I m using XSBSubprocessEngine say if my database : access.pl had : hasAccess tom 123 how would i pass information from two string variables in java to pl to check the db", "How can i go about doing so", "Thanks", "In Eclipse you accomplish this by : .. . .. . 1 .", "Right click you project select Properties .. . 2 .", "Select the Libraries tab .. . 4 .", "Click Add External Jar.. . and locate the interprolog.jar file .", "Now you should be able to use the API for example by typing new TermListModel and have Eclipse add the import com.declarativa.interprolog.gui.TermListModel for you .", "Sorry i understand this question is a big vague and foggy but any help would be appreciated .", "I see Thanks for the reply..In think database will I have a pair such as hasaccess tom 123 where tom is the user and 123 is the password", "@keval That is a start yes .", "With a set of clauses like that you can quite simply query for a given username and password .", "Thank you very much .", "thanks", "It depends .", "Yes you can use that", "can anyone help me", "I m having trouble with some of my code and I really cant trouble shoot this error .", "I m hitting a brickwall.. . .. . .. . oh and line 24 is the second line of code i posted .", "edit : content of userlist.p : .. . .. . following on from some of the suggestions below i moved loginhandler and related classes to their own package and also userlist.p to the package and now i get this error :", "What does userList.pl look like", "My only guess is that somehow hasAccess user pass doesn t play nice with whatever s in that file .", "hi there thanks for the reply .", "I have edited the original post and you can now see the contents of userlist.pl .", "cheers", "Do you have access to the source code for NativeEngine to see what it is trying to get a substring of and how it is getting the index for the substring", "i do i think but how would i do that", "break point", "actually it looks like i do not have access to the source .", "Yay for open-source I suppose .", "It s doing this : .. . .. . rc is your calling class .", "So I suppose your LoginHandler class is in the default package and that is tripping this code up", "Try putting it in a package i.e .", "add package blah to the top of it and move it to a directory with that name .", "It does this because it assumes the userlist.pl is actually in the same location as your code and it s trying to use the package name to find the location your code was loaded from .", "I don t think you can use consultFromPackage the way you are trying to actually since it supposedly can only parse a filename not a full blown path .", "Oh and you can get the source .", "hi there .", "@keval You might have missed my second edit .", "Try putting LoginHandler in a package .", "no package declaration at the top .", "I have moved it to its own package now will let you know what happens .", "Right moved both the consulting file userlist.pl and the loginhandler to its own package now getting this error : com.declarativa.interprolog.util.IPException : Problem consulting from package archive : C : Users Keval AppData Local Temp IP 5283895338735856757 userlist.p", "Is the second in the path confusing it", "If it s doing anything to examine each directory in the path it could be confused by an empty string maybe", "anyone", "any ideas appreciated .", "My guess is that there is something going wrong with the paths and it isn t finding user.p in the location it expects .", "Try starting with a minimal command-line test program to get a feel for how the libraries work in a simple prototype .", "When I run the HelloWorld program : .. . .. . I get from the first line : .. . .. . Any ideas on how to solve", "Thanks :", "did this work for you", "I was told there was errors with NativeEngine and used another option sorry if this doesn t help :", "anyone have any ideas how i can get around this", "Then when bash executes it checks to see the top bit of the file" ] }
{ "confidence": [ 98.99806213378906, 90.42182922363281, 88.77510070800781, 80.96742248535156, 80.07886505126953, 76.38269805908203, 72.6160888671875, 72.1476058959961, 71.9975814819336, 62.63173294067383, 61.29964065551758, 58.20063018798828, 56.44719314575195 ], "content": [ "Question : I have set up and installed both interprolog and swi-prolog on my linux machine following the instructions here : Interprolog with SWI instructions on Linux http : www.declarativa.com interprolog INSTALL.htm .. . .. . I have edited the unixVariables.sh to contain the path of java and swi-prolog pl executables on my machine and that my unixVariables.sh looks like : .. . .. . Now when I go to do . runSWISPListener.sh in the interprolog folder all i get is this : .. . .. . and now nothing else happens where as according to the instructions a java window should popup with a swiprolog engine listener . can anyone help me I know its quite abstract and no one really uses interprolog but any help is appreciated thanks .. . Answer : i ended up just using XSB prolog worked fine", "Question : I have set up and installed both interprolog and swi-prolog on my linux machine following the instructions here : Interprolog with SWI instructions on Linux http : www.declarativa.com interprolog INSTALL.htm .. . .. . I have edited the unixVariables.sh to contain the path of java and swi-prolog pl executables on my machine and that my unixVariables.sh looks like : .. . .. . Now when I go to do . runSWISPListener.sh in the interprolog folder all i get is this : .. . .. . and now nothing else happens where as according to the instructions a java window should popup with a swiprolog engine listener . can anyone help me I know its quite abstract and no one really uses interprolog but any help is appreciated thanks .. . Answer : According to the download page InterProlog has known issues with SWI-Prolog Version 5.10 : .. . .. . 5.4.6 or later known problems with 5.10 : - .. . .. . from http : www.declarativa.com interprolog INSTALL.htm .. . .. . Try an earlier version of SWI-Prolog", "Question : I have set up and installed both interprolog and swi-prolog on my linux machine following the instructions here : Interprolog with SWI instructions on Linux http : www.declarativa.com interprolog INSTALL.htm .. . .. . I have edited the unixVariables.sh to contain the path of java and swi-prolog pl executables on my machine and that my unixVariables.sh looks like : .. . .. . Now when I go to do . runSWISPListener.sh in the interprolog folder all i get is this : .. . .. . and now nothing else happens where as according to the instructions a java window should popup with a swiprolog engine listener . can anyone help me I know its quite abstract and no one really uses interprolog but any help is appreciated thanks .. . Answer : SWI-Prolog and Yap Prolog support JPL Java-to-Prolog interface you may want to use it : http : www.swi-prolog.org packages jpl java-api index.html", "Question : I m trying to set up an environment with interprolog and SWI prolog interprolog needs the location of swi s pl but i cant find it . All i can find is swipl or plrc and neither work with interprolog . If i type pl into the terminal this should run swi-prolog it says .. . .. . but if i type in .. . .. . or .. . .. . prolog .. . .. . it runs swiprolog fine . the thing is interprolog requires pl which i cant seem to find . anyone have any ideas how i can get around this thanks .. . Answer : I am not sure if you have it worked out . Ideally this is what you should do : .. . .. . Open runSWISPListener.sh . Change SWI BIN DIRECTORY pl to SWI BIN DIRECTORY swipl .. . .. . It will then work fine .", "Question : I m trying to set up an environment with interprolog and SWI prolog interprolog needs the location of swi s pl but i cant find it . All i can find is swipl or plrc and neither work with interprolog . If i type pl into the terminal this should run swi-prolog it says .. . .. . but if i type in .. . .. . or .. . .. . prolog .. . .. . it runs swiprolog fine . the thing is interprolog requires pl which i cant seem to find . anyone have any ideas how i can get around this thanks .. . Answer : will tell you where the swipl binary lives . However you need some way to make pl mean the same thing as swipl .. . .. . To do that you need to alias pl to swipl . The code alias pl swipl will do that in BASH . so after aliasing you could start interprolog from the command-line and see if it works .", "Question : I m trying to set up an environment with interprolog and SWI prolog interprolog needs the location of swi s pl but i cant find it . All i can find is swipl or plrc and neither work with interprolog . If i type pl into the terminal this should run swi-prolog it says .. . .. . but if i type in .. . .. . or .. . .. . prolog .. . .. . it runs swiprolog fine . the thing is interprolog requires pl which i cant seem to find . anyone have any ideas how i can get around this thanks .. . Answer : Have I understood your question Is pl a symbolic link-to the prolog software Check the location of the pl executable by where pl or maybe you need to make the prolog source code .pl executable and add a header at the top of it.. . .. . .. . And use chmod u+x some file.pl . Then when bash executes it checks to see the top bit of the file bin swiprolog -f I m using the -f switch to say pass it into the prolog interpreter...check your documentation.. . .. . .. . Hope this helps Best regards Tom .", "Question : I am currently using interprolog - which is basically java with a prolog backend allowing both java and prolog calls from each other respectively . Now If i had say a frontend GUI coded in java swing say a login dialog which requested a username and password instead of using java code to authenticate and store passwords could I somehow use prolog to check the passwords instead I ve searched the term access-control prolog and found nothing . Sorry i understand this question is a big vague and foggy but any help would be appreciated . .. . Answer : You need to get an instance of a Prolog engine and execute any prolog command . I suppose you will have the prolog database set up in advance and you can create the prolog command that will evaluate to true when a username password pair authenticates . Calling this from Java is then easy . You obtain a Prolog Engine implementation say SWISubprocessEngine http : www.declarativa.com interprolog htmldocs com declarativa interprolog SWISubprocessEngine.html and execute your prolog command with the command method . This article How can I make a Java program that calls Prolog http : www.declarativa.com interprolog faq.htm trying 20Prolog will be most helpful . Comment : I see Thanks for the reply..In think database will I have a pair such as hasaccess tom 123 where tom is the user and 123 is the password Comment : @keval That is a start yes . With a set of clauses like that you can quite simply query for a given username and password . Comment : Thank you very much . I m using XSBSubprocessEngine say if my database : access.pl had : hasAccess tom 123 how would i pass information from two string variables in java to pl to check the db Im quite new to prolog so im trying my hardest . thanks Comment : also how would you make java prolog aware of where the database is Comment : It depends . If you want to store the database in a traditional relational-database then I would use Java to create the clauses and have the prolog engine initialized with the data at application startup . Otherwise you can use something like consultFromPackage filename MyClass.class to load some prolog data from a file . So when the application starts the engine is told where to find the data that prolog will use . When you query from Java it uses the data from the file .", "Question : I am currently using interprolog - which is basically java with a prolog backend allowing both java and prolog calls from each other respectively . Now If i had say a frontend GUI coded in java swing say a login dialog which requested a username and password instead of using java code to authenticate and store passwords could I somehow use prolog to check the passwords instead I ve searched the term access-control prolog and found nothing . Sorry i understand this question is a big vague and foggy but any help would be appreciated . .. . Answer : Yes you can use that", "Question : null .. . Answer : I m trying to set up InterProlog in eclipse . My path variable already has the path to jdk1.7 and I already have xsb installed . I attached interprolog.jar as an external jar added the xsb to my path variable C : Users MyName config x86-pc-windows bin and I added the path to my xsb bin to the NativeEngine constructor See below . When I run the HelloWorld program : .. . .. . I get from the first line : .. . .. . Any ideas on how to solve Thanks : Comment : It might also be worth it to mention that I m using XSB 3.3.5 and INterProlog 2.2.a4 Comment : did you generate the InterProlog dynamic libraries with . makexsb dynmodule Comment : did this work for you Comment : I was told there was errors with NativeEngine and used another option sorry if this doesn t help :", "Question : I am currently trying to set up interprolog see http : www.declarativa.com interprolog and i ve followed the steps on the site but now I m wondering how i can use interprologs classes from my eclipse ide Do i need to import the classes into my project so i can use interprolog How can i go about doing so Thanks .. . Answer : Have you tried adding interprolog.jar to the build path located inside http : www.declarativa.com interprolog interprolog212.zip In Eclipse you accomplish this by : .. . .. . 1 . Right click you project select Properties .. . 2 . Choose Java build path in the left side view .. . 3 . Select the Libraries tab .. . 4 . Click Add External Jar.. . and locate the interprolog.jar file . Now you should be able to use the API for example by typing new TermListModel and have Eclipse add the import com.declarativa.interprolog.gui.TermListModel for you .", "Question : I m having a pretty rough time trying to make use of interprolog http : www.declarativa.com InterProlog default.htm .. . .. . I have some code trying to call a prolog command and the problem is the actual loading of my prolog database . Here is the code : .. . .. . when i run the program prolog initializes fine it tries to look for userlist.p which is in the same package 2nd line of code and then it throws this error : .. . .. . I looked at the code for consultFromPackage : .. . .. . but i can t seem to get to the root of the problem..i know this is all a bit far out but any help is appreciated at this point . thanks Comment : anyone any ideas appreciated . .. . Answer : My guess is that there is something going wrong with the paths and it isn t finding user.p in the location it expects . Try starting with a minimal command-line test program to get a feel for how the libraries work in a simple prototype .", "Question : I m having trouble with some of my code and I really cant trouble shoot this error . I m using Interprolog Java+Prolog see here http : www.declarativa.com interprolog .. . .. . here is the stacktrace : .. . .. . and the code in question : .. . .. . any ideas I m hitting a brickwall.. . .. . .. . oh and line 24 is the second line of code i posted . edit : content of userlist.p : .. . .. . following on from some of the suggestions below i moved loginhandler and related classes to their own package and also userlist.p to the package and now i get this error : Comment : What does userList.pl look like My only guess is that somehow hasAccess user pass doesn t play nice with whatever s in that file . Comment : hi there thanks for the reply . I have edited the original post and you can now see the contents of userlist.pl . cheers Comment : Do you have access to the source code for NativeEngine to see what it is trying to get a substring of and how it is getting the index for the substring Comment : i do i think but how would i do that break point Comment : actually it looks like i do not have access to the source . .. . Answer : Yay for open-source I suppose . It s doing this : .. . .. . rc is your calling class . So I suppose your LoginHandler class is in the default package and that is tripping this code up Try putting it in a package i.e . add package blah to the top of it and move it to a directory with that name . It does this because it assumes the userlist.pl is actually in the same location as your code and it s trying to use the package name to find the location your code was loaded from . I don t think you can use consultFromPackage the way you are trying to actually since it supposedly can only parse a filename not a full blown path . Oh and you can get the source . It s in the zip file http : www.declarativa.com interprolog interprolog212.zip linked from the website http : www.declarativa.com interprolog INSTALL.htm . Comment : hi there . I have also tried ConsultFromPackage userlist.pl class as the pl file is indeed in the same package dir as the java files code location . Comment : @keval You might have missed my second edit . Try putting LoginHandler in a package . I assume it s currently in the default package i.e . no package declaration at the top . Comment : I have moved it to its own package now will let you know what happens . Comment : Right moved both the consulting file userlist.pl and the loginhandler to its own package now getting this error : com.declarativa.interprolog.util.IPException : Problem consulting from package archive : C : Users Keval AppData Local Temp IP 5283895338735856757 userlist.p", "Question : I m having trouble with some of my code and I really cant trouble shoot this error . I m using Interprolog Java+Prolog see here http : www.declarativa.com interprolog .. . .. . here is the stacktrace : .. . .. . and the code in question : .. . .. . any ideas I m hitting a brickwall.. . .. . .. . oh and line 24 is the second line of code i posted . edit : content of userlist.p : .. . .. . following on from some of the suggestions below i moved loginhandler and related classes to their own package and also userlist.p to the package and now i get this error : Comment : What does userList.pl look like My only guess is that somehow hasAccess user pass doesn t play nice with whatever s in that file . Comment : hi there thanks for the reply . I have edited the original post and you can now see the contents of userlist.pl . cheers Comment : Do you have access to the source code for NativeEngine to see what it is trying to get a substring of and how it is getting the index for the substring Comment : i do i think but how would i do that break point Comment : actually it looks like i do not have access to the source . .. . Answer : Is the second in the path confusing it If it s doing anything to examine each directory in the path it could be confused by an empty string maybe" ] }
[ "yes-answer-long", "yes-answer-short" ]
yap
UNK_RELATION
sim-toolkit@gsm@72
sim-toolkit -- the sim application toolkit is an etsi defined standard @placeholder 11.14 that defines a framework on top of java card for sim resident application so-called sim-toolkit applets .
{ "confidence": [ 100.87796020507812, 100.63134002685547, 96.69786071777344, 96.69786071777344, 94.43338012695312, 91.77854919433594, 90.68682098388672, 89.4212417602539, 89.3629150390625, 88.1758041381836, 87.99320983886719, 86.75334167480469, 84.9980239868164, 84.21568298339844, 83.2210464477539, 82.34435272216797, 79.14434051513672, 76.5943603515625, 76.5943603515625, 73.92693328857422, 71.54782104492188, 71.10709381103516, 71.10709381103516, 69.31794738769531, 68.69795989990234, 68.69795989990234, 68.37797546386719, 68.25609588623047, 67.87144470214844, 67.17361450195312, 67.17361450195312, 67.17361450195312, 65.0792236328125, 64.81912994384766, 64.32262420654297, 64.32262420654297, 64.22964477539062, 64.17037963867188, 62.38123321533203, 60.525821685791016, 60.296165466308594, 60.236900329589844, 60.236900329589844, 59.96826171875, 59.9671516418457, 59.43574523925781, 59.42927551269531, 58.740509033203125, 57.835601806640625, 57.224365234375, 56.73236846923828, 56.73236846923828, 56.73236846923828, 56.73236846923828, 56.212554931640625, 54.737510681152344, 54.673828125, 54.63435363769531, 53.74726867675781, 52.798892974853516, 52.798892974853516, 52.798892974853516, 52.798892974853516, 52.798892974853516, 52.798892974853516, 52.593177795410156, 52.593177795410156, 52.27899169921875, 52.15932846069336, 52.02931213378906, 49.94795227050781, 49.94795227050781, 49.46277618408203, 48.688270568847656, 48.15880584716797, 47.43999481201172, 47.215675354003906, 46.01447296142578, 46.01447296142578, 45.999595642089844, 44.70027160644531, 44.53453063964844, 44.006595611572266, 43.49906921386719, 43.49906921386719, 43.32151794433594, 41.86226272583008, 41.145111083984375, 39.98579025268555, 39.690025329589844, 38.86867904663086, 36.53806686401367, 35.51254653930664, 33.84355163574219, 33.15162658691406, 32.58071517944336, 32.16246032714844, 32.16246032714844 ], "content": [ "Check out SIM Application Toolkit http : en.wikipedia.org wiki SIM 5FToolkit .", "I try to develop a Sim Application Toolkit Applet. .", "I m testing a SIM Toolkit application using AT Commands .", "Recently I m trying to work with SIM Application Toolkit .", "Not Android specific but there are a whole load of resources referenced in the answers to .. . .. . SIM Application Toolkit development http : stackoverflow.com questions 377877 sim-application-toolkit-development", "So it can t install those applets that used SIM Toolkit APIs .", "In the Sim Toolkit is default a menu entry working fine .", "I want my app to open sim-card toolkit so that a user can make payments via mobile provided in the sim-toolkit application Please help", "I want to build an application that accesses information from the sim-toolkit .", "My applet is not a SIM Toolkit applet it is a common Java Card applet .", "My client wants to access SIM card toolkit to recharge mobile .", "As it can t find SIM Toolkit library there it returns this error .", "I have been accessing Sim Toolkit Applications from puTTY terminal using huawei e303f modem and a sim .", "I would like to programmatically access an STK SIM Application Toolkit application without using my handset .", "Dear Android Developers .. . .. . I want to modify Sim toolkit application according to client requirement e.g app checks balance automatically.Manually Our Currier allow this feature in Sim toolkit .", "For SIM Toolkit it has to be CA tag in INSTALL MAKE SELECTABLE command .", "Yes It is a ETSI package I downloaded the SIM API packages from this : stackoverflow.com questions 22362327 http : stackoverflow.com questions 22362327 sim-toolkit-application-javacard-development-kit 22471187 22471187", "Network : Airtel .. . .. . I need to access Airtel SIM toolkit via my android application to recharge .", "I am trying to run SIM toolkit application with the help of AT commands with a Huawei Modem .", "In the final dialogue in the Sim toolkit app there is a choice between OK or Cancel How do I tell the SIM that the user pressed the OK key .", "You can t run SIM applets in Eclipse IDE without using a simulator and you need to use a SIM card simulator It can be a plugin for your IDE also or try to run your applet on a real SIM card .", "As we know that when we use any menu in sim-toolkit it send command to mobile network in ussd or sms format .", "Basically right now I am only trying to navigate sim-toolkit menu .", "Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit .", "You need to use a SIM card simulator or try to run it on a real SIM card .", "I have a real SIM card and a reader i think i can load my applet into this sim card.. .", "My client is a SIM card distributor in our location .", "Zip the sim folder .. . 6 .", "if it says Java card and SIM in the description http : www.smartcardfocus.com shop ilp id 776 smartcafe-expert-6-0-80k-sim p index.shtml is there a good chance it will support Java Card applets and STK APIs", "I have a USB modem that supports SIM Toolkit Class 2 features and is based on the Open AT Firmware .", "I am able to successfully interact with the SIM Toolkit by using the +STSF +STGI and +STGR commands .", "I have been trying to install a very small sample applet using SIM toolkit features such as uicc.toolkit.ProactiveHandler .", "Do I need Java Card for SIM based app", "Note that : I m afraid if the Java Card Development kit is able to convert applets with proprietary SIM APIs to CAP files .", "Have you unlocked the SIM", "Look at SIM tagged questions", "i am trying to develop a sim-toolkit access software using c .. . .. . then .. . .. . it returns .. . .. . i am expecting a menu selection string but it come like this", "While loading an applet to a sim-card i get Authentication failure error .", "4 : Get Input reported by SIM card is supported by MT .", "The SimToolkit application which is signed by the manufacturer or mobile operator so that it has special privileges is the only application which is permitted to communicate with the STK application on the SIM card .", "For doing that as far I know I have to activate the SIM toolkit functionality using AT+STSF 1 AT command which several GSM developer guides say .", "Actually is there any other per-requisite to activate the STK functionality of the SIM card", "After converting you need to upload this CAP file on the SIM card .", "SmartCafe Expert 3.2 72k http : www.smartcardfocus.com shop ilp id 521 smartcafe-expert-3-2-72k p index.shtml is a simple regular Java Card and does not contain SIM Toolkit APIs inside .", "I am tyring to automate our SIM based airtime loading facilities by using good-ol AT commands to acccess the Sim Toolkit application in our SIMs My question is regarding the AT Command STGR command type 2 get Inkey .", "Hi I have to design a simple application which has to reside in the SIM card of a GSM mobile .", "AT+STGI is used to open the SIM menu AT+STGR to select the menu .", "Because of the limited try of sim-card key i wonder this error means the card is blocked or nor", "where did you download the SIM APIs", "If this is very difficult solution can i make other application which Can communicate with sim and perform actions .", "Here is some steps I used to generate SIM API library : .. . .. . 1 .", "Copy the sim directory into your collection of export files directory .", "How we can convert SIM API contained packages to CAP files", "However according to example in documentation STIN : response is being sent by sim .", "The wikipedia article http : en.wikipedia.org wiki SIM 5FApplication 5FToolkit contains some information and pointers and the GSM 11.14 standard is available here http : www.3gpp.org ftp Specs html-info 1114.htm .", "The SIM toolkit - .. . .. . An app which makes calls to lower-level libraries which in turn interfaces with the modem firmware - .. . .. . https : github.com android platform packages apps stk .. . .. . Somewhat it depends on handset s Radio Interface Layer RIL implementation .", "As far as I know you CAN T run SIM applets in Eclipse IDE without any simulator .", "As far as I know JCDK Converter tool is able to convert pure Java Card APIs to CAP files only and it is not useful for SIM APIs right", "Just as you need to know the Javacard version of your card you need to know also what version of SIM API the card support .", "I would like to access the SIM menus on an Android phone using STK .", "I am trying to write an APK that shows the SIM Menus and perform operations on it .", "The STK as in Sim-Tool-Kit is actually available in the source code for AOSP .", "I want to get the menu list of the services given by the SIM .", "or is there any other way to select the menu of those services provided by the SIM .", "After further emails it seems SIM cards for development in small quantities i.e .", "I also receive +STIN replies as per the message flow shown here http : www.scribd.com doc 61188000 196 Messages-Exchanged-During-a-SIM-Toolkit-Operation .", "If anyone is familiar with the SIM Toolkit and accessing it through the AT Command set then I would appreciate some insight as to why I do not receive a response when an SMS message is sent out .", "Permission for a SIM to send an SMS is normally device dependent I remember the older Nokia phones had a setting that would prompt the user allow SIM to send message .", "I need to know how can I load this applet into my sim-card", "I am new to STK application and I have SIM card module 500 I wonder if there is any way to load STK application through serial monitor and dgbr RX TX port may be used.Thanks in ADVANCE", "I want to develop an app which can access SIM Tool Kit in android mobile .", "To load the applet into SIM I use ACR1281U as reader and Giesecke Devrient JLoad 2.3.0 as loader .", "I have a smart card reader gemplus pc sc .. . .. . I have a SIM card and the administration code .. . .. . I installed eclipse and added JAvaCard and SIM API libraries .. . .. . when i try to run the applet i get this error : .. . .. . and a appletviewer window appear with applet non inisialized as a message .", "Hello Abraham I did exactly what David said i extract the Annex B Export Files and copied the sim directory into the export files directory api export files everything work normaly now i can convert applets even with SIM API proprietary .", "A lot of SIM cards support STK and yes it can be used to send receive information .", "Actually not only displaying text also sms ussd sub items doesn t work too. . .. . .. . I have real sim cards from the manufacturer to develop and test some applets with the auth keys .", "I am a beginner in developpement i am trying to load stk applet into Sim card this is my question : .. . .. . I have an STK applet code source .", "What I do not receive is the Unsolicited Response +STCR from the SIM when an SMS message or USSD message is sent out .", "i am having problems with my applet because of the SIM APIs any idea to resolve this problem", "download here : sourceforge.net projects eclipse-jcde files http : sourceforge.net projects eclipse-jcde files I don t have any idea that you can use it for convert applets that contain SIM APIs or not but I m sure that it is sufficient for converting Java Card applets to CAP files", "However many current Android devices come with a ready-made SEEK implementation that could be used to access the UICC SIM card many devices by Samsung e.g .", "I want to communicate from my Android app to a Java Card applet loaded on a SIM card using APDUs under Android prior to 5.0 4.2.2 for example .", "In my experience most newer devices both Android and IOS are setup such that the SIM can send SMSs in the background without user awareness .", "If yes is there any other way to communicate from Android to SIM applet apart from SEEK", "You cannot simply add that functionality RIL extensions to access a UICC SIM-based secure element to an app .", "If you ll use UICC toolkit you have to use EA tag .", "Here is the lead up to when the SIM sends an SMS message : .. . .. . You can see that +STIN : 9 means an SMS message is sent out .", "Download related SIM API archieve for example 3GPP 43.019 v5.6.0 http : www.3gpp.org ftp Specs archive 43 series 43.019 43019-560.zip .. . 2 .", "If I cannot avoid that I really think SEEK is the best or the only way to communicate with my SIM applet can someone share a step-by-step manual for building such an example APK application including communication with the applet", "@takumar they depend on card manufacturers unless they have been clearly defined by the standard that defines the APDU s such as Global Platform .", "And my second question I use the sim.toolkit how can I use the uicc toolkit where can I download it", "but for applets that contains only Java Card API you can use it simply .", "ETSI TS 102 223 defines the Provide Local Information components .", "Please refer to ETSI 102 226 standard http : www.etsi.org deliver etsi ts 102200 102299 102226 06.08.00 60 ts 102226v060800p.pdf for full details .", "Following this post http : stackoverflow.com questions 30325663 send-apdu-commands-to-usim-sim-card-in-android thanks to @vojta and @jean and SEEK https : github.com seek-for-android pool wiki UsingSmartCardAPI I would like to build my app using RIL Radio Interface Layer .", "There is a tool in Java Card development kit named converter that you can use it to convert applets to CAP files .", "Sorry this was years ago I believe we abandoned the idea as doing transactions over SIMs was too slow for our needs we commissioned a direct connection api to one of our local telcos to perform transactions instead of using the SIM", "Take a look at these slides : defcon.org images defcon-21 dc-21-presentations Koscher-Butler https : www.defcon.org images defcon-21 dc-21-presentations Koscher-Butler DEFCON-21-Koscher-Butler-The-Secret-Life-of-SIM-Cards-Updated.pdf I think those are useful for you ." ] }
{ "confidence": [ 119.05152893066406, 115.93217468261719, 112.66867065429688, 108.57611846923828, 108.23648834228516, 107.59661865234375, 106.81340789794922, 104.82823944091797, 97.27593994140625, 95.91793823242188, 94.05242156982422, 93.61805725097656, 92.51854705810547, 92.10189819335938, 89.71448516845703, 88.54114532470703, 87.43975830078125, 84.9869613647461, 83.26023864746094, 79.96879577636719 ], "content": [ "Question : I have been trying to install a very small sample applet using SIM toolkit features such as uicc.toolkit.ProactiveHandler . After writing the applet and generating a file sampleapp.cap using the converter tool from the Java Card SDK I was unable to install sampleapp.cap file on the Java Card I was using for development . I am using global platform pro and am getting a 6a88 SW in response when trying to load the applet . To build : .. . .. . converter -classdir build -applet APP AID sampleapp.SampleToolkitApp sampleapp PKG AID 1.0 generates build sampleapp javacard sampleapp.cap .. . .. . To install with java card reader insterted : .. . .. . gp -d -v --install build sampleapp javacard sampleapp.cap .. . .. . output : .. . .. . Using the SmartCafe Expert 3.2 72k which I purchased as a Java Card . Also using JavaCard SDK 2.2.1 which is the supported version for that card and have used both 3GPP TS 43.019 v6.0.0 STK API technical specification and ETSI TS 102 241 13.0.0 UICC API for Java Card . The 6A88 SW indicates referenced data not found . Is this something specific to my card in that it hasn t implemented the STK stack Comment : As a follow up : Abraham s answer is correct . After further emails it seems SIM cards for development in small quantities i.e . 1 or 3 are not available to people who aren t big telcos . However there might be some for sale on alibaba ebay or similar . .. . Answer : SmartCafe Expert 3.2 72k http : www.smartcardfocus.com shop ilp id 521 smartcafe-expert-3-2-72k p index.shtml is a simple regular Java Card and does not contain SIM Toolkit APIs inside . So it can t install those applets that used SIM Toolkit APIs . In the loading process the OPEN on the card is trying to make a link between your applet and the used libraries . As it can t find SIM Toolkit library there it returns this error . Comment : I had a sneaking suspicion as much . Time to go shopping again but I appreciate the answer . Do you have any words of wisdom on knowing which Java Cards will support STK APIs e.g . if it says Java card and SIM in the description http : www.smartcardfocus.com shop ilp id 776 smartcafe-expert-6-0-80k-sim p index.shtml is there a good chance it will support Java Card applets and STK APIs", "Question : I try to develop a Sim Application Toolkit Applet. . Many simple examples found in internet but no success. . The problem is My menu entry comes in the STK menu but if I select it nothing happens. . I try to display text on event EVENT MENU SELECTION . Actually not only displaying text also sms ussd sub items doesn t work too. . .. . .. . I have real sim cards from the manufacturer to develop and test some applets with the auth keys . I test it on a Android 2.3 NFC smartphone . To load the applet into SIM I use ACR1281U as reader and Giesecke Devrient JLoad 2.3.0 as loader . In the Sim Toolkit is default a menu entry working fine . Here is my sample code. . Hope anybody has an idea. . Maybe some specific-install parameter on loading applet Thanks in advance Kutschka Comment : Where did you get the STK development kit Is it open like the jcdk you can find at Oracle s page .. . Answer : In order to use STK commands you have to properly install your applet . For SIM Toolkit it has to be CA tag in INSTALL MAKE SELECTABLE command . If you ll use UICC toolkit you have to use EA tag . Please refer to ETSI 102 226 standard http : www.etsi.org deliver etsi ts 102200 102299 102226 06.08.00 60 ts 102226v060800p.pdf for full details . Comment : Hello thank you ok after making selectable it works. . I can display the text. . I use the sim.toolkit and have read the Global Platform specification . The selectable install ..etc parameters are ok but I couldn t understand the install tokens the last part of the install parameter . Could you refer me please And my second question I use the sim.toolkit how can I use the uicc toolkit where can I download it Thank you .", "Question : I am a beginner in developpement i am trying to load stk applet into Sim card this is my question : .. . .. . I have an STK applet code source . I have a smart card reader gemplus pc sc .. . .. . I have a SIM card and the administration code .. . .. . I installed eclipse and added JAvaCard and SIM API libraries .. . .. . when i try to run the applet i get this error : .. . .. . and a appletviewer window appear with applet non inisialized as a message . please can someone help I need to know how can I load this applet into my sim-card all suggestions are welcome .. . .. . Thank you . Comment : Take a look at these slides : defcon.org images defcon-21 dc-21-presentations Koscher-Butler https : www.defcon.org images defcon-21 dc-21-presentations Koscher-Butler DEFCON-21-Koscher-Butler-The-Secret-Life-of-SIM-Cards-Updated.pdf I think those are useful for you . Comment : As far as I know you CAN T run SIM applets in Eclipse IDE without any simulator . You need to use a SIM card simulator or try to run it on a real SIM card . For uploading and installing your applets first of all you need to convert your applet to CAP file . You need to work with converter tool in Java Card development kit . instead of that you can simply use Eclipse-JCDE plugin to convert your applets . After converting you need to upload this CAP file on the SIM card . You can use some already-written open-source tools . GlobalPlatformPro is one of them . Google it Comment : Thank you for response I have a real SIM card and a reader i think i can load my applet into this sim card.. . But I think that I should add the JCOP plug-in to eclipse in order to get the .cap file . i cant find the package JCOP in internet i wonder if it is availble in free do you have an idea Comment : No you can t find a free version of it . But you can use Eclipse-JCDE plugin instead . download here : sourceforge.net projects eclipse-jcde files http : sourceforge.net projects eclipse-jcde files I don t have any idea that you can use it for convert applets that contain SIM APIs or not but I m sure that it is sufficient for converting Java Card applets to CAP files Comment : I added Eclipse JCDE plugin and it s work i can now create applet convert it to a .cap file and give it an AID ... . .. . Answer : You can t run SIM applets in Eclipse IDE without using a simulator and you need to use a SIM card simulator It can be a plugin for your IDE also or try to run your applet on a real SIM card . Moreover for uploading and installing your applets first of all you need to convert that program to a CAP file . There is a tool in Java Card development kit named converter that you can use it to convert applets to CAP files . Instead of using converter tool directly you can simply use Eclipse-JCDE http : sourceforge.net projects eclipse-jcde files plugin to work with this tool and convert your applets . After converting you need to upload this CAP file on the SIM card . You can use some already-written open-source tools to aim this goal . GlobalPlatformPro https : github.com martinpaljak GlobalPlatformPro is well-documented one . Note that : I m afraid if the Java Card Development kit is able to convert applets with proprietary SIM APIs to CAP files . but for applets that contains only Java Card API you can use it simply . Comment : Exactly i am having problems with my applet because of the SIM APIs any idea to resolve this problem Comment : @DGz Unfortunately no idea . where did you download the SIM APIs I think in some ETSI packages you can find useful tools . There was some question in this community useful for you . Look at SIM tagged questions Comment : Yes It is a ETSI package I downloaded the SIM API packages from this : stackoverflow.com questions 22362327 http : stackoverflow.com questions 22362327 sim-toolkit-application-javacard-development-kit 22471187 22471187 Comment : @DGz I left a comment there.I Hope David help us : Comment : Hello Abraham I did exactly what David said i extract the Annex B Export Files and copied the sim directory into the export files directory api export files everything work normaly now i can convert applets even with SIM API proprietary . Dont hesitate if you have any questions .", "Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : While I have not worked directly with SAT STK myself I can give a little information to where you can read more . The wikipedia article http : en.wikipedia.org wiki SIM 5FApplication 5FToolkit contains some information and pointers and the GSM 11.14 standard is available here http : www.3gpp.org ftp Specs html-info 1114.htm . This discussion thread http : www.bladox.com forum viewtopic.php t 236 sid 23485109e323905ee54acdb5ffb8823e contains some practical information .", "Question : I want to build an application that accesses information from the sim-toolkit . My carrier allows you to access services like checking your account balance sending and receiving cash and a whole lot of services . Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit . .. . Answer : Not Android specific but there are a whole load of resources referenced in the answers to .. . .. . SIM Application Toolkit development http : stackoverflow.com questions 377877 sim-application-toolkit-development Comment : Hi..i need get ussd code response and that response i need to do some modification.its possible bro. .", "Question : null .. . Answer : I want my app to open sim-card toolkit so that a user can make payments via mobile provided in the sim-toolkit application Please help Comment : possible duplicate of Android STK Menu using APK http : stackoverflow.com questions 9227732 android-stk-menu-using-apk", "Question : Hi I have to design a simple application which has to reside in the SIM card of a GSM mobile . But I dont have any idea how to get started . Till now I have only designed apps using J2ME . Do I need Java Card for SIM based app Thanks in advance for the help . .. . Answer : Check out SIM Application Toolkit http : en.wikipedia.org wiki SIM 5FToolkit . Check this simlar question too : http : stackoverflow.com questions 536682 getting-started-with-stk-programming Comment : sorry - but wikipedia isn t helpful at all in this case :", "Question : Im developing an android application for my client . My client is a SIM card distributor in our location . My client wants to access SIM card toolkit to recharge mobile . I dont have any idea how to do it Can anyone guide me in right direction . Network : Airtel .. . .. . I need to access Airtel SIM toolkit via my android application to recharge . .. . Answer : You can use STK service from platform packages . Take a look over the source of STK App that comes default with android . https : github.com android platform packages apps stk .. . An old documentation over this app can be found here http : www.kandroid.org online-pdk guide stk.html Comment : Thanks tushar I will look into the samples . Comment : @AnanthavelSundararajan Hey did you manage to get any help from the source code", "Question : I m testing a SIM Toolkit application using AT Commands . I have a USB modem that supports SIM Toolkit Class 2 features and is based on the Open AT Firmware . I am able to successfully interact with the SIM Toolkit by using the +STSF +STGI and +STGR commands . I also receive +STIN replies as per the message flow shown here http : www.scribd.com doc 61188000 196 Messages-Exchanged-During-a-SIM-Toolkit-Operation . What I do not receive is the Unsolicited Response +STCR from the SIM when an SMS message or USSD message is sent out . I am using the following Terminal Profile during initialization : .. . .. . Based on the Terminal Profile the Call Control bit is set to 1 or enabled . You will also notice that the Autoresponse is set to 1 . Therefore I receive an +STGI response when a message is sent . Here is the lead up to when the SIM sends an SMS message : .. . .. . You can see that +STIN : 9 means an SMS message is sent out . I believe based on my initialization I should also see an +STCR and there should be some text in the +STGI . If anyone is familiar with the SIM Toolkit and accessing it through the AT Command set then I would appreciate some insight as to why I do not receive a response when an SMS message is sent out . Thanks . Reference : 1 : Wavecom AT Commands Interface Guide for X51a - WM ASW OAT UGD 00016 Comment : Whats your modem .. . Answer : I think the USB modem is busy for doing other task . If you send response with 0x91xx instead of 0x9000 again and again while you don t receive Instruction byte ie 0x12 ie FETCH command . where XX means no of STK byte .", "Question : null .. . Answer : I have been accessing Sim Toolkit Applications from puTTY terminal using huawei e303f modem and a sim . I am writing AT commands specific to huawei modems . Basically right now I am only trying to navigate sim-toolkit menu . However according to example in documentation STIN : response is being sent by sim . But the same response I am not getting in my puTTY terminal . I am only getting OK response but no STIN : response . Here is my code--- .. . .. . Please Help I am stuck Comment : After AT STGR 0 0 1 3 try AT STGI . This will show you the possible STGI values . Are you supposed to get the result as a SMS", "Question : I want to build an application that accesses information from the sim-toolkit . My carrier allows you to access services like checking your account balance sending and receiving cash and a whole lot of services . Are there any resources tutorials or even just pointers on how I can access the info in the sim-toolkit . .. . Answer : The SIM toolkit - .. . .. . An app which makes calls to lower-level libraries which in turn interfaces with the modem firmware - .. . .. . https : github.com android platform packages apps stk .. . .. . Somewhat it depends on handset s Radio Interface Layer RIL implementation . NOTE : .. . .. . On many devices the RIL is proprietary so third-party developers only spend time getting the basic stuff like calls SMS data etc working rather than spending all their time reverse-engineering some crazy closed-source hardware . WIKI link that can be helpful - .. . .. . http : en.wikipedia.org wiki SIM Toolkit Comment : Hi..i need get ussd code response and that response i need to do some modification.its possible bro. . Comment : @ved-prakash spent days combing that code . . is there any specific part of it that makes the actual calls to the lower-level libs", "Question : I am tyring to automate our SIM based airtime loading facilities by using good-ol AT commands to acccess the Sim Toolkit application in our SIMs My question is regarding the AT Command STGR command type 2 get Inkey . In the final dialogue in the Sim toolkit app there is a choice between OK or Cancel How do I tell the SIM that the user pressed the OK key . I have tried to following to no success .. . .. . The documentation for my moden sierra gl6110 says that : For a GET INKEY with format set to Yes No the data shall contain : the value y when the answer is positive the value n when the answer is negative . If anybody could help out It would be greatly appreciated . Comment : did you find any solution to this problem Comment : Sorry this was years ago I believe we abandoned the idea as doing transactions over SIMs was too slow for our needs we commissioned a direct connection api to one of our local telcos to perform transactions instead of using the SIM .. . Answer : Try AT+STGR 1 It is a best way for confirmation .", "Question : null .. . Answer : Recently I m trying to work with SIM Application Toolkit . I want to get the menu list of the services given by the SIM . For doing that as far I know I have to activate the SIM toolkit functionality using AT+STSF 1 AT command which several GSM developer guides say . But While giving that command to set the functionality I m getting an ERROR result . Meanwhile I m using a modem which is STK supported . Whats the actual problem here or is there any other way to select the menu of those services provided by the SIM . I ve googled a lot about it but unfortunately not getting the real answer . Please help me in this regards . Thanks in advance . Comment : Have you entered ATI to check that you are on the right port you should see modem details Have you unlocked the SIM Can you send other AT commands What error-code are you seeing view the error-code by first entering AT+CMEE 1 and then re-trying AT+STSF 1 What happens if you try AT+STSF or AT+STSF Comment : Also see this question stackoverflow.com questions 536682 http : stackoverflow.com questions 536682 getting-started-with-stk-programming Comment : The modem is on the right port i m sure . The other basic AT command work fine such as sending sms . AT+CMEE 1 returns OK AT+STSF AT+STSF returns nothing but the AT+STSF 1 returns ERROR . Actually is there any other per-requisite to activate the STK functionality of the SIM card Comment : Does the 3rd answer in the question linked above help Comment : @HabiburRahman did you get to solve this problem I am also experiencing similar issues .", "Question : I want to communicate from my Android app to a Java Card applet loaded on a SIM card using APDUs under Android prior to 5.0 4.2.2 for example . My applet is not a SIM Toolkit applet it is a common Java Card applet . Following this post http : stackoverflow.com questions 30325663 send-apdu-commands-to-usim-sim-card-in-android thanks to @vojta and @jean and SEEK https : github.com seek-for-android pool wiki UsingSmartCardAPI I would like to build my app using RIL Radio Interface Layer . Where can I get those libs The only ones I can get is for Nexus - here https : developers.google.com android nexus drivers . If I understand it well I will have a different .apk file for each mobile manufacturer . Am I right If yes is there any other way to communicate from Android to SIM applet apart from SEEK If I cannot avoid that I really think SEEK is the best or the only way to communicate with my SIM applet can someone share a step-by-step manual for building such an example APK application including communication with the applet .. . Answer : You cannot simply add that functionality RIL extensions to access a UICC SIM-based secure element to an app . Instead the mobile phone has to support this functionality . You typically cannot replace the radio interface library telephony framework on the fly you could probably do such kind of patching on rooted devices but still that s not something you would typically integrate in your app . However many current Android devices come with a ready-made SEEK implementation that could be used to access the UICC SIM card many devices by Samsung e.g . GS3 and later Sony HTC and Motorola . When it comes to Nexus devices the Nexus 6 is the first that supports SEEK . On devices that support SEEK i.e . that come with the SEEK smartcard service preinstalled you can use SEEK by linking your application to the SEEK SDK-addon http : seek-for-android.googlecode.com svn-trunk repository 19 addon.xml or by integrating the Open Mobile API directly either as a library-project or by adding the source files into your application you can find the latest version here https : github.com seek-for-android platform packages apps SmartCardService tree android-5.0.0 r3-scapi openmobileapi src org simalliance openmobileapi . You can find a sample application for access to smartcard applications through SEEK here : https : github.com seek-for-android open-mobile-api-sample", "Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : Have a look at this -- http : www.mobitek-system.com SIMToolKit STK.html .. . .. . Hope it helps", "Question : null .. . Answer : I am trying to run SIM toolkit application with the help of AT commands with a Huawei Modem . I am OK with : .. . .. . I am suppose to get a SMS once the item is selected but I get no response . What could be wrong . All I see is OK in the terminal .", "Question : I m trying to develop a STK application but I don t know where to get the development kit . Right now for Javacard I m getting the one from Oracle s website but it doesn t have the sim.toolkit package . I don t want to buy it from Gemalto etc . Is there any free implementation I have found the ETSI - 3GPP http : www.3gpp.org DynaReport 0319.htm a zip file with some code and libraries but I don t know if this would be enough . Do I generate the cap jar file from the code there Thanks .. . Answer : The files from 3GPP should be enough to complement the Javacard libraries that you ve downloaded from Oracle . Just as you need to know the Javacard version of your card you need to know also what version of SIM API the card support . Check it againsts the 3GPP TS 03.19 that you ve mentioned or you may also check for 3GPP TS 43.019 http : www.3gpp.org DynaReport 43019.htm . Download the correct version . Here is some steps I used to generate SIM API library : .. . .. . 1 . Download related SIM API archieve for example 3GPP 43.019 v5.6.0 http : www.3gpp.org ftp Specs archive 43 series 43.019 43019-560.zip .. . 2 . Extract the 43019-560.zip file .. . 3 . Extract Annex A java.zip under it .. . 4 . Open the extracted Annex A java directory .. . 5 . Zip the sim folder .. . 6 . Rename the sim.zip extension to sim v5.6.0.jar .. . .. . Besides the JAR file you also need to copy the export files required when generating CAP file . 1 . Extract Annex B Export Files.zip .. . 2 . Open Annex B Export Files directory .. . 3 . Copy the sim directory into your collection of export files directory . Hope it helps Comment : How we can convert SIM API contained packages to CAP files As far as I know JCDK Converter tool is able to convert pure Java Card APIs to CAP files only and it is not useful for SIM APIs right Comment : We don t need to convert API to CAP file . What we need to do is to convert class files to CAP file . JCDK is able to convert any APIs . Just make sure that you put the JAR and the EXPort files of the API . Comment : I must add the JAR files to my project . but what about the Exp files where I must put them I know that I must put the in the directory of other export files but where are those Comment : You can add it under java card kit-2 2 2 api export files along with com java javacard and javacardx directory .", "Question : I would like to programmatically access an STK SIM Application Toolkit application without using my handset . GSM modem and or handset is attached to my PC via USB and or RS232 connection . I m looking to automate interaction with the STK application . To this end I have no idea whatsoever regarding ways of accomplishing this operation . Any assistance will be highly appreciated . Thanks . Comment : Nobody has any information that can help .. . Answer : This can be done by using AT commands like AT+STGI AT+STGR . AT+STGI is used to open the SIM menu AT+STGR to select the menu . This can also be done prorammatically using Serial Port Interface to GSM Modem . For more info click on the following link : http : www.google.co.in url sa t rct j q esrc s source web cd 1 cad rja ved 0CCIQFjAA url http 3A 2F 2Fwww.telit.com 2Fmodule 2Finfopool 2Fdownload.php 3Fid 3D2086 ei Ko2OUKa3KYyErQe7xIHICA usg AFQjCNFiEu0rPGDlv4AbRCBjEeO8 zbO5Q sig2 v44cGvc0JiqnouQRXcpBmg http : www.google.co.in url sa t rct j q esrc s source web cd 1 cad rja ved 0CCIQFjAA url http 3A 2F 2Fwww.telit.com 2Fmodule 2Finfopool 2Fdownload.php 3Fid 3D2086 ei Ko2OUKa3KYyErQe7xIHICA usg AFQjCNFiEu0rPGDlv4AbRCBjEeO8 zbO5Q sig2 v44cGvc0JiqnouQRXcpBmg", "Question : Dear Android Developers .. . .. . I want to modify Sim toolkit application according to client requirement e.g app checks balance automatically.Manually Our Currier allow this feature in Sim toolkit . I did a lot of search how i can accomplish this but could not get any where . what i did so far is .. . .. . 1-Rooted My Device . Got Hint From This Question Android STK Menu using APK http : stackoverflow.com questions 9227732 android-stk-menu-using-apk .. . .. . 2-Downloaded the source code of STK from github https : github.com android platform packages apps stk .. . .. . 3-Remove all errors of project by building and setting internal API . http : devmaze.wordpress.com 2011 01 18 using-com-android-internal-part-1-introduction .. . .. . when i am running this project getting this error .. . .. . Installation error : INSTALL FAILED SHARED USER INCOMPATIBLE .. . .. . I checked all stackoverflow questions e.g INSTALL FAILED SHARED USER INCOMPATIBLE while using shared user id http : stackoverflow.com questions 15205159 install-failed-shared-user-incompatible-while-using-shared-user-id .. . .. . but not found any solution . Please help me what i am doing wrong.my direction is wrong or not Please gave any suggestion any thing which can gave me idea . Thankx in advance.Sorry for my English i am new developer . Comment : Using a shared user id requires that you sign the apk with the same certificate as that used to sign whatever existing components you are sharing with . Since that is a closely held secret of the device vendor you can t do that . You might be able to re-sign the whole thing though . As you are finding it s hard to make just a little change in Android - it s really intended with the idea that 3rd parties will stick to the application APIs and vendors will do a full system build from source . Comment : Sir @ChrisStratton this app will not be publicly launched.I need to do custom app only on one device if there is any way i can do this please gave me idea what to do.I don t have any idea i just want to accomplish this.please help thankx Comment : If this is very difficult solution can i make other application which Can communicate with sim and perform actions . any help .. . Answer : As suggested in one of the comments the error is due to application being signed with a different certificate . This certificate dependency can be removed by changing the package names in the application . Because each java-package belongs-to the certificate with which it is signed .", "Question : null .. . Answer : As we know that when we use any menu in sim-toolkit it send command to mobile network in ussd or sms format . I need that sms or ussd to record and show it to me in android app .. . .. . I am calling the library service which i got in main activity like this .. . .. . USSD Service Class is like that : .. . .. . I have created MainActivity inside the UssdLibray structure is like that in the below picture : .. . .. . enter image description here http : i.stack.imgur.com aRxZw.png" ] }
[ "yes-answer-long", "yes-answer-short" ]
gsm
UNK_RELATION
pelican@python@58
pelican -- pelican is a static site generator written in @placeholder that supports the restructuredtext markdown and asciidoc formats .
{ "confidence": [ 63.56908416748047, 54.445167541503906, 53.81719970703125, 49.98474884033203, 49.25475311279297, 47.58854675292969, 46.00147247314453, 45.52407455444336, 45.45133972167969, 45.26068878173828, 45.26068878173828, 45.26068878173828, 44.85582733154297, 44.85582733154297, 44.6505241394043, 44.6505241394043, 44.54542541503906, 44.54069519042969, 44.32615661621094, 43.53700256347656, 43.05154037475586, 43.02593994140625, 43.01958465576172, 42.97521209716797, 42.97521209716797, 42.97521209716797, 42.89915466308594, 42.578216552734375, 42.482784271240234, 42.26296615600586, 42.253387451171875, 41.505977630615234, 41.22384262084961, 41.22384262084961, 41.22384262084961, 41.22384262084961, 41.22384262084961, 40.883182525634766, 40.54705047607422, 40.54705047607422, 40.54705047607422, 40.54705047607422, 40.384891510009766, 40.384891510009766, 40.384891510009766, 40.359779357910156, 40.35118865966797, 40.23616027832031, 40.23286437988281, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.1810302734375, 40.06084442138672, 39.86548614501953, 39.074012756347656, 39.069618225097656, 39.065216064453125, 39.065216064453125, 38.871742248535156, 38.871742248535156, 38.871742248535156, 38.871742248535156, 38.70957946777344, 37.76033020019531, 37.76033020019531, 37.7375602722168, 37.598167419433594, 37.598167419433594, 37.598167419433594, 37.3899040222168, 37.3899040222168, 37.3899040222168, 37.36099624633789, 37.36099624633789, 37.36099624633789, 37.36099624633789, 37.36099624633789, 37.36099624633789, 36.807373046875, 36.67885208129883, 36.42827224731445, 36.355926513671875, 36.26611328125, 36.20838165283203, 36.20838165283203, 36.20838165283203, 36.06888198852539, 36.06888198852539, 35.68568420410156, 35.68568420410156, 35.68568420410156, 35.68568420410156, 35.68568420410156, 35.68568420410156 ], "content": [ "I m using the static site generator Pelican https : github.com ametaireau pelican .", "I m using Pelican with Markdown .", "Is there a way to possibly do this given Pelican is a static site generator", "It seems as-if pelican virtualenvs pelican site content does the trick .", "There is the plugin pelican-alias https : github.com Nitron pelican-alias which can be installed by pip install pelican-alias .", "I m starting to use pelican with reStructuredText rst page format .", "You have to look at the source code https : github.com getpelican pelican of pelican .", "I am using Pelican to develop a full multilingual site .", "When I use Pelican to create a static webpage .", "I m using Pelican 3.6.3 to generate a site .", "I am building a pelican site hosted by gitlab .", "I want that site to use a pelican theme .", "I tried doing so pelican path virtualenvs pelican site content but it doesn t seem to work says unrecognized arguments .", "How do I install a pelican theme within my pelican site so that : .. . .. . 1 .", "I use Pelican 3.5.0 .", "Pelican lets me do that .", "I am building a static site with Pelican http : blog.getpelican.com and the i18n subsites plugin https : github.com getpelican pelican-plugins tree master i18n subsites .", "I have a Pelican blog where I write the posts in Markdown .", "I can update the pelican theme from the pelican theme git-repo .", "yes I add markdown after pelican-start so markdown files not in that directory this problem already solved thanks", "I am using Pelican for generation of web pages .", "Reinstall pelican doesn t help me so i m make a little fix in pelican Modifications was made in .. . .. . Library Python 2.7 site-packages pelican readers.py file .. . .. . at line 24 place .. . .. . instead of .. . .. . and at line 299 .. . .. . instead of .. . .. . Modification actual for pelican 3.6.0 but seems to applicable for other version if search for this lines in readers.py file .", "I m publishing a blog using Pelican and testing my first site .", "Pelican is nice anyways", "@h e u r e k a this is a pelican-specific question .", "From rst to html with pelican .", "According to the pelican documentation this should be possible .", "The site in progress can currently be seen at http : jerrya.gitlab.io heuristk .. . .. . Many pelican themes seem to be a subdirectory of a huge pelican git-repo https : github.com getpelican pelican-themes .", "Random article : https : github.com getpelican pelican-plugins tree master random article .. . .. . More pelican plugins : https : github.com getpelican pelican-plugins", "Considering what I wrote above the . . in your path instructs pelican to write the file to SITE output . . html5 SITE html5 .", "Differences .. . .. . List format : .. . Pelican does not understand the tags format of Jekyll .. . Categories : I m not sure if Pelican supports articles being in multiple categories .", "I m using Pelican http : blog.getpelican.com a static site generator to provide an html personal wiki or knowledge base using .org files as its base .", "Is there something similar like layout in Pelican", "Pelican seems to understand it when it is lowercase .", "Have you run pelican-quickstart", "Is there an existing method for pull quotes with Pelican", "I use the pelican-bootstrap3 theme .", "For those coming after me : Pelican is cool but it s aimed at a blog rather than a static site as sphinx is .", "I am using Pelican to generate a GitHub page .", "pelican doesn t process any non-standard metadata .", "I am using pelican 3.6.3 so that is strange .", "if you re using pip try .. . .. . and then restart pelican-quickstart", "Error : image not found : pelican content attach energy.png when the image and markdown are in the same folder .", "pip install pelican markdown .. . .. . done .. . .. . and now you are free to any problem mentioned above .", "I recently started using the pelican cms and I prefer to write my articles in HTML as opposed to rst or markdown .", "start .. . .. . 1 . create your pelican path mkdir path to pelican .. . 2 . go to path to pelican and create an isolate python environment with virtualenv venv .. . 3 . activate virtualenv source venv bin activate .. . 4 . install pelican under the venv without sudo", "I am building a site with Pelican and following this guide https : github.com getpelican pelican-plugins blob master i18n subsites localizing using jinja2.rst on localizing templates .", "you can download all the themes from pelican-theme repositorty on github : .. . .. . https : github.com getpelican pelican-themes tree master pelican-bootstrap3 static css .. . .. . change paper to whatever you like .", "I want to use Pelican to generate my blog site .", "Pelican is focused on publishing sites http : docs.getpelican.com en stable faq.html is-pelican-only-suitable-for-blogs regardless of purpose .", "I have Pelican http : blog.getpelican.com website with bootstrap3 https : github.com DandyDev pelican-bootstrap3 theme .", "My pelican blogs uses theme pelican-bootstrap3 and the color of code is always grey link below", "Pelican does not support multiple categories https : github.com getpelican pelican issues 349 .", "I m trying to install Pelican for python using pip install pelican but I get these errors .", "There is the Pelican Neighbours https : github.com getpelican pelican-plugins tree master neighbors plug-in that might do what you want .", "The Pelican twitter-bootstrap rst directives https : github.com getpelican pelican-plugins tree master twitter-bootstrap rst directives seems to provide the right functionality but for RST files .", "The Pelican plugin md inline extension https : github.com getpelican pelican-plugins tree master md inline extension goes partway to giving the needed functionality .", "Check out the pelican-bootstrap-3 help page on github https : github.com DandyDev pelican-bootstrap3 custom-css .", "That said Pelican uses Python-Markdown for parsing Markdown which has a very extensive Extension API https : pythonhosted.org Markdown extensions api.html .", "The usual syntax to make links with Pelican is : .. . .. . That works just fine .", "I would like to use prettify https : code.google.com p google-code-prettify instead of Pelican http : blog.getpelican.com s default code highligher on a Pelican site .", "I own a pelican Website and I want to create interactive d3.js visualization on my pelican article that : .. . .. . 1 .", "At lines 367ff https : github.com getpelican pelican blob master pelican contents.py L367 there are some very simple subclass definitions which could be of use .", "pelican.writers.py https : github.com getpelican pelican blob master pelican writers.py : This module brings together the templating-engine jinja2 the templates and the data to be inserted in the templates .", "Pelican seems like really cool tool .", "If not how do I migrate Jekyll metadata to Pelican", "I have no idea how Pelican handles the featured image .", "Any idea why the sort is not working with Pelican 3.4", "I just took a look at the source code https : github.com if1live pelican-jsfiddle for that plugin and it appears that Markdown is not supported .", "The solutions provided on web are for octopress and not for pelican-octopress-theme .", "So I m trying to generate a pelican based website .", "Have you read github.com getpelican pelican issues 1674 https : github.com getpelican pelican issues 1674", "TLDR : I am trying to do CSS line numbering in pelican while writing in markdown .", "Using Markdown in Pelican I can generate code blocks using the CodeHilite extension .", "Pelican doesn t support using pygments directly if you are using Markdown...only RST and .. . no to converting everything to RST .", "Pelican articles start like this : .. . .. . Jekyll articles start like this : .. . .. . I would like to migrate my blog from Jekyll to Pelican .", "I ve installed the pelican jsfiddle plugin and from a restructured text page I can call it by .. . .. . Doing so embeds the fiddle into the pelican page .", "https : github.com getpelican pelican-themes tree master zurb-F5-basic but I don t want to install EVERY pelican theme .", "How can I make pelican copy the CNAME file to the root of the output", "https : github.com getpelican pelican-themes blob master backdrop templates base.html", "How do you enable an archives tab on a pelican powered blog", "That s because pelican itself doesn t use Pygments directly .", "As for HTML contents pelican doesn t do anything except extracting the metadata from it .", "How can I coerce Pelican to include this attribute by default", "Everything is fully working thanks to the great plugin I18N Sub-sites : https : github.com getpelican pelican-plugins tree master i18n subsites .. . .. . To make that plugin work I added the full path of my pelican plugins to the main configuration : .. . .. . I want to share the site with a small tean so everyone can work on it .", "But for a start I think the following start points suffice : .. . .. . Common variables available for the standard templates http : docs.getpelican.com en 3.1.1 themes.html .. . pelican.contents.py https : github.com getpelican pelican blob master pelican contents.py : This is the module which contains most of the data-structures pelican uses and which are made available in the templates .", "So does the Pelican community have any thoughts", "I decided to modify Pelican template instead and make necessary transformations before class name is written .", "Is there any posibility to get a variable defined into pelicanconf.py file and pass it into simple pelican page rather than a template with markdown syntax", "Pelican has a lot of great features but it is focused on generating a blog not a static hierarchical website .", "Or is Pelican so focused on blogging they are just not up to the job of really generating and managing static sites", "I m using Pelican for a static blog and attempting to install the figure-ref https : github.com cmacmackin figure-ref extension .", "Dose anyone can give me a hint on how to change the fontsize with CSS for a Pelican Site .", "I am not sure about this .. . html rst directive http : nikhilkalige.github.io pelican-plugins-site plugin may work", "But apparently Pelican and Jekyll think one folder should be enough for anybody .", "But now when I do pelican content nothing happens .", "Is it possible to make Pelican understand the Jekyll tag list format", "have you tried using pelican --help for more information yet", "And I want to install just zurb not every pelican theme", "@Sebi I just tried it with Pelican 3.4 and it seems to work fine ." ] }
{ "confidence": [ 63.34932327270508, 61.416831970214844, 61.1267204284668, 61.00489807128906, 59.17877960205078, 58.36124038696289, 58.25144577026367, 58.02104187011719, 57.984127044677734, 57.385807037353516, 57.144405364990234, 56.366546630859375, 56.31964111328125, 56.20903778076172, 56.19680404663086, 55.96742248535156, 55.91691207885742, 55.32679748535156, 55.24977111816406, 54.91161346435547 ], "content": [ "Question : null .. . Answer : Pelican articles start like this : .. . .. . Jekyll articles start like this : .. . .. . I would like to migrate my blog from Jekyll to Pelican . However I like the Jekyll way to annotate metadata better . It is also supported by the Markdown preview on GitHub example https : github.com MartinThoma MartinThoma.github.io blob source posts 2015-12-03-find-papers.md in contrast to the Pelican header type example https : github.com ML-KA ML-KA.github.io blob source content paper-discussion-group.md . Is it possible to make Pelican understand the Jekyll tag list format If not how do I migrate Jekyll metadata to Pelican Differences .. . .. . List format : .. . Pelican does not understand the tags format of Jekyll .. . Categories : I m not sure if Pelican supports articles being in multiple categories . I m also not sure if I have that but again : Pelican doesn t understand the list format . I have no idea how Pelican handles the featured image . I guess one can access this from templates Is there something similar like layout in Pelican Differences which don t matter .. . The capital first letter seems not to matter . Pelican seems to understand it when it is lowercase . The --- before and after the metadata seems not to matter . Pelian has filename for Linking to static files http : docs.getpelican.com en 3.6.3 content.html linking-to-static-files . I guess I can write a script which searches for . . images and replaces it with filename images . Is it possible to tell Jekyll that filename should be replaced with . . This would be nice for a transition phase where I still use Jekyll but make the code acceptable for Pelican . Except for plugins and themes where no general answer can be given I m not aware of any other important differences Comment : The Jekyll metadata section is in YAML and there are well known parsers for that so you can probably write the migration script yourself . Pelican does not support multiple categories https : github.com getpelican pelican issues 349 . Comment : Use tags instead categories that is what you re looking for .", "Question : I recently started using the pelican cms and I prefer to write my articles in HTML as opposed to rst or markdown . Thats s fine . Pelican lets me do that . But I can t seem to find any way to specify the language for pre blocks so Pelican will run it through Pygments to generate syntax higlighting . The documentation only specifies how to do this with markdown or rst . .. . Answer : That s because pelican itself doesn t use Pygments directly . It s applied through md and rst processors . As for HTML contents pelican doesn t do anything except extracting the metadata from it . It s probably easier to use something like highlight.js https : highlightjs.org .", "Question : null .. . Answer : I m publishing a blog using Pelican and testing my first site . I m using the following command to publish on GitHub Pages : .. . .. . But I get this error : .. . .. . ERROR : Could not process . .md .. . .. . TypeError : u Pelican does not know how to parse s u Users guangyugeng PythonProjects virtualenvs pelican content .md .. . .. . How I do to fix the error Comment : . http : i.kinja-img.com gawker-media image upload s--g7XHnTp7-- 694060475489110161.jpg Comment : Do you have both : markdown files in that directory and that directory specified in pelicanconf.py Comment : yes I add markdown after pelican-start so markdown files not in that directory this problem already solved thanks", "Question : I m using Pelican 3.6.3 to generate a site . The source content is in Markdown and contains a number of tables . I ve tried generating output with four or five different Pelican themes but the tables never have any visible borders . All the table content is arranged neatly in rows and columns but there are no cell borders or outside borders . Is there a specific reason for this Am I intended to modify the CSS manually It seems unlikely that all of the theme authors would make this same design decision . Example of one of my tables : Comment : That s most likely your browsers default styles . Chrome doesn t display table borders by default anymore for example .. . Answer : Is the HTML attribute border set If so it is most likely the decision of your browser how to render the table . I checked a few themes myself just by having a quick glance at the CSS code no guarantee for correctness : .. . .. . I can imagine that depending on the contents the justification and other formatting aspects make having borders on all tables inappropriate . Consequently I can understand the design decision to per default disable table borders and let the user of the theme customize the behavior if required . On my website I use tables for many different things . Often especially when blocks like images or syntactically highlighted areas are included borders would make the table look weird . As of this I second this design decision . But still what if one wants borders on some tables Case-dependent styling using CSS is easy to achieve if special HTML classes can be specified in the article source file . Unfortunately python-markdown or markdown in general does not support this kind of feature . At least this is what a short Google research revealed . Maybe there is a python-markdown extension I did not recognize . . Another way would be to use another markup language . reStructuredText is more complex but also much more extensible in comparison to markdown . The table http : docutils.sourceforge.net docs ref rst directives.html tables directive natively supports the specification of HTML classes . I use reStructuredText myself and like the high amount of flexibility the markup language introduces . You could also let javascript do the job and set HTML classes likewise styling depending on the table contents . However I would not consider this a good solution as you create a dependency on javascript for the appearance of a static website . I hope this helps you : .. . .. . tl dr .. . .. . The specific reason is most likely to be more generally applicable as a theme . Yes you are invited to introduce the desired customizations yourself in the CSS code or wherever it suits you best .", "Question : I m starting to use pelican with reStructuredText rst page format . I have custom javascript jQuery things that I d like to control with div attributes like data-default-tpl basename with nested content . What to extend and what . I ve looked at Directives and nodes but I just can t wrap my head around how to do it . From rst to html with pelican . Comment : I ve found a solution that is not perfect . I ll write it here as an answer as soon as I have enough spare time to clean it up . .. . Answer : I am not sure about this .. . html rst directive http : nikhilkalige.github.io pelican-plugins-site plugin may work Comment : Using html rst plugin misses the point and writing html is exactly what I m trying to avoid .", "Question : null .. . Answer : I m using the static site generator Pelican https : github.com ametaireau pelican . I ve configured the ARTICLE URL http : docs.getpelican.com en stable settings.html highlight article url url-settings setting to include the year and month in the url . For example with .. . .. . My post url will be something like .. . .. . I would prefer the month to be lowecase i.e . Is there an easy way to achieve this Comment : .lower after the string Comment : @depperm where would you suggest putting lower Lowercasing ARTICLE URL wouldn t work I want to lowercase the strings that Pelican generates using ARTICLE URL . Comment : Easy way Not really . They come from date-formatting directly and in turn from your locale . Your best bet is to write a plugin to lowercase and set them as override url override save-as .", "Question : I have a Pelican blog where I write the posts in Markdown . I want each article to link-to the previous and next article in the sequence and to one random article . All the articles are generated with a python script resulting in a folder of markdown files called content . Here the files are like : .. . .. . article-slug1.md .. . another-article-slug.md .. . more-articles-slug.md .. . .. . .. . .. . Is there a token I can add to the markdown to randomly interlink link-to next previous If not how can I set this up in python Thanks in advance .. . Answer : There is the Pelican Neighbours https : github.com getpelican pelican-plugins tree master neighbors plug-in that might do what you want . You ll have to active the plug-in and update your template to get it to work . Adding plug-ins : Pelican-Plugins Readme https : github.com getpelican pelican-plugins blob master Readme.rst .. . Updating your template : Plug-in s Readme https : github.com getpelican pelican-plugins blob master neighbors Readme.rst", "Question : With Sphinx-doc http : sphinx-doc.org you can create a bunch of ReStructureText files with an index.rst file which includes a table of contents macro that auto generates a table of contents from the other included files and a conf.py that acts as a compilation config . You can then compile the lot into a single python-doc-style site complete with index navigation tools and a search function . Is there any comparable tool for markdown preferably pandoc-style markdown Comment : Is there also some markdown documentation tool which can produce PDF and ePub as easy as Sphinx does Comment : @white gecko Edit in Markdown http : daringfireball.net projects markdown syntax overview convert to XHTML with pandoc http : johnmacfarlane.net pandoc README.html and lastly convert to PDF with PrinceXML http : www.princexml.com which you may or may not use for free see CSO license http : www.princexml.com license . Again check out my website http : hamwaves.com cl-ocfd en index.html for details . There is an open-source alternative called wkhtmltopdf http : wkhtmltopdf.org which is not good at page breaking though . .. . Answer : Some static site generators that work with Markdown : .. . .. . Jekyll http : jekyllrb.com is very popular and also the engine behind GitHub pages http : pages.github.com . Python variants : Hyde http : ringce.com hyde or Pelican http : docs.getpelican.com en 3.1.1 .. . nanoc http : nanoc.ws used f.ex . in the GitHub API documentation http : developer.github.com v3 .. . Middlemanapp http : middlemanapp.com : maybe the best one I think none of them use pandoc maybe because it s written in Haskell but they all use an enhanced Markdown syntax or can be configured to use pandoc . Other interesting ways to generate a site from markdown : .. . .. . Markdown- Wikis that are file based : f.ex . Gollum https : github.com github gollum the Wiki-Engine that is also used by GitHub .. . Telegram https : telegr.am index : commercial written by David Pollak the inventor the Lift-Scala-framework .. . .. . Engines that use Pandoc : .. . .. . Gitit http : gitit.net : Pandoc Wiki .. . Pandoc-Plugin forIkiwiki https : github.com dubiousjim pandoc-iki .. . Yst static site generator http : github.com jgm yst .. . Gouda - generates a site from a directory of markdown files http : www.unexpected-vortices.com sw gouda .. . Rippledoc - generates a navigable site from nested directories of markdown files https : github.com uvtc rippledoc .. . .. . The definitive listing of Static Site Generators .. . .. . A good overview of static site generators : http : staticsitegenerators.net Comment : Hyde is basically a CMS right I don t want something that I have to leave runnning . Some of the others look interesting though thanks for the list Comment : As far as I know Hyde produce also static HTML just like Jekyll . Comment : For those coming after me : Pelican is cool but it s aimed at a blog rather than a static site as sphinx is . Comment : @naught101 What did you go for in the end I am looking for a similar solution .", "Question : I have a Pelican blog where I write the posts in Markdown . I want each article to link-to the previous and next article in the sequence and to one random article . All the articles are generated with a python script resulting in a folder of markdown files called content . Here the files are like : .. . .. . article-slug1.md .. . another-article-slug.md .. . more-articles-slug.md .. . .. . .. . .. . Is there a token I can add to the markdown to randomly interlink link-to next previous If not how can I set this up in python Thanks in advance .. . Answer : Random article : https : github.com getpelican pelican-plugins tree master random article .. . .. . More pelican plugins : https : github.com getpelican pelican-plugins Comment : Thanks but that one uses a javascript redirect . I d like to add an actual link-to a random article .", "Question : I am trying to attach an image in Pelican following the documentation here http : docs.getpelican.com en 3.6.3 content.html linking-to-static-files . Here is the markdown : .. . .. . and the pelicanconf.py : .. . .. . The .html files are written into output YYYY MM directory where the markdown gets interpreted as : .. . .. . in the .html while the images are written into output images folder . So the HTML files cannot find the images . How do I fix it Ideally I would like to store the images in the same folder as the .html files I think that is what attach does . Any help would be appreciated . .. . Answer : Make sure you are using attach and not filename . Also if you have energy.png in the same folder as blogpost.md then attach will work . With your example you must have energy.png in the images subfolder . The documentation states that you should be careful of images being attached to multiple pages . If energy.png is only being attached -ed to blogpost.md then it will get published alongside the resulting HTML file . Otherwise it may be moved to a place were otherblogpost.md won t expect it to be unless all files are in the same directory which is not going to happen in your case where the resulting html files are in the date subfolders . Comment : attach is not recognized at all I get the following error message : ERROR : Better Fig . Error : image not found : pelican content attach energy.png when the image and markdown are in the same folder . I am using pelican 3.6.3 so that is strange . Comment : Removed Better figures but now it cannot find the image : WARNING : Unable to find energy.png skipping url replacement . I also tried putting it in images energy.png which is where I would prefer it go so as to not clutter the content directory .", "Question : I decided to give pelican a try but when I run pelican-quickstart I get the following dialog : .. . .. . There was a similar error message in this post http : stackoverflow.com questions 23555906 importerror-no-module-named-html-parser and since I m running Python 2.7.6 on OS X 10.10 Yosemite there may be a similar issue . What s the best way to address this Comment : The answer in the post you linked says that the error occurs when you run the Python 3 version of the code under Python 2 . .. . Answer : I think that you ve probably encountered with version conflict problem in module six . Try sudo pip install virtualenv to create an isolate python environment . start .. . .. . 1 . create your pelican path mkdir path to pelican .. . 2 . go to path to pelican and create an isolate python environment with virtualenv venv .. . 3 . activate virtualenv source venv bin activate .. . 4 . install pelican under the venv without sudo pip install pelican markdown .. . .. . done .. . .. . and now you are free to any problem mentioned above . all the dependencies in the venv are isolated from the global environment . To quit the venv type deactivate", "Question : I m using Pelican for a static blog and attempting to install the figure-ref https : github.com cmacmackin figure-ref extension . Since I m using Markdown the plugin relies on the figureAltCaption https : github.com jdittrich figureAltCaption third-party Markdown extension . However I have no idea how to install it . Pelican has an MD EXTENSIONS configuration option http : docs.getpelican.com en 3.6.3 settings.html highlight md extensions but I ve tried a few obvious options with no luck . It seems like this is a dead-simple gimme but it s not clear how to proceed . Would love some suggestions . .. . Answer : Unfortunately the author of figureAltCaption appears to have not provided an install script . My suggestion would be to create one and contribute it as a pull request . This tutorial https : github.com waylan Python-Markdown wiki Tutorial : -Writing-Extensions-for-Python-Markdown about creating Extensions for Python-Markdown covers creating an install script as well . However as a shortcut you should be able to just copy the figureAltCaption.py file to the appropriate directory . Usually you want the site-packages directory . As this answer http : stackoverflow.com a 12950101 866026 shows just do the following from Python : .. . .. . Then copy the figureAltCaption.py file to the first directory returned . Now that the extension is on your PYTHONPATH it should be importable . From the Python prompt try : .. . .. . If you get no errors then it worked and you just need to tell Pelican about it . Comment : Worked like a charm thanks so much . I figured it was dead simple . I tried following the directions in the Python-Markdown extensions tutorial but kept running into bizarre errors related to the various fields I had to define in setup.py . Thanks", "Question : I m using Pelican with Markdown . I create blog posts as foo.md files which look like this : .. . .. . I would like a word in the title to be italicized but I can t use markdown in the Title : field if I write Light by Kelly Link it s interpreted literally . Do I have to change the theme in order to do this Comment : Since the is not being processed by markdown you could try Title : i Light i by Kelly Link Comment : @JohnLaRooy using raw HTML probably won t work as it will be escaped by the template . .. . Answer : So the relevant section of code in Pelican is I believe the following from readers.py starting c . line 183 : .. . .. . In short Pelican is looking to see if it is supposed to parse Markdown fields before writing them title is part of the meta dict . Based on that it looks like all you need to do is make sure that you have title in your FORMATTED FIELDS setting . Comment : Thanks quite helpful I did this but now for some reason the p p that Pelican wraps the formatted text in has an enormous margin . Comment : @EliRose What is the markup it returns You may need to modify the CSS now .", "Question : I m trying to use Pelican to generate a hierarchy of .html files with a hierarchy of .html and .md files as input . Pelican has a lot of great features but it is focused on generating a blog not a static hierarchical website . Sure it has that pages subdirectory but it doesn t respect subfolders in that directory instead it tries to flatten all of the files it finds into the same directory and then complains that it will overwrite files with the same slug . I m used to managing large sets of web pages in subfolders . When I put file.html in subfolder mysite a I expect the URL to be something like https : myserver mysite a file.html . But apparently Pelican and Jekyll think one folder should be enough for anybody . Am I missing something Or is Pelican so focused on blogging they are just not up to the job of really generating and managing static sites Pelican seems like really cool tool . The source is very well-written and it has lots of nice options . But I m starting to think that it s really not for generating static sites but rather for generating static blogs . Is anyone else using it the way I m suggesting .. . Answer : Pelican is focused on publishing sites http : docs.getpelican.com en stable faq.html is-pelican-only-suitable-for-blogs regardless of purpose . I recommend looking through the issues https : github.com getpelican pelican issues 1065 to see related questions . There is also a plugin that focuses squarely on replicating hierarchical content https : github.com akhayyat pelican-page-hierarchy .", "Question : I am using Pelican to develop a full multilingual site . Everything is fully working thanks to the great plugin I18N Sub-sites : https : github.com getpelican pelican-plugins tree master i18n subsites .. . .. . To make that plugin work I added the full path of my pelican plugins to the main configuration : .. . .. . I want to share the site with a small tean so everyone can work on it . So I would like to remove that hardcoded path from my settings . The plugin is not pip-installable . I would like that my team would not need to download the pelican-plugins repository and manually change that path . Any ideas Thank you in advance .. . Answer : You can use relative paths in PLUGIN PATHS . They will be relative to the settings file . So you can do a folder structure like this : .. . .. . And use .. . .. . Then you can just share the site folder with your team .", "Question : I have a Pelican blog where I write the posts in Markdown . I want each article to link-to the previous and next article in the sequence and to one random article . All the articles are generated with a python script resulting in a folder of markdown files called content . Here the files are like : .. . .. . article-slug1.md .. . another-article-slug.md .. . more-articles-slug.md .. . .. . .. . .. . Is there a token I can add to the markdown to randomly interlink link-to next previous If not how can I set this up in python Thanks in advance .. . Answer : I am not sure about the random article but for next and previous there is a Pelican plugin called neighbor articles https : github.com getpelican pelican-plugins tree master neighbors . Comment : Thank you . Can these be added to the .md files too or just into the theme files I want to make them contextual .", "Question : I am working with pelican static site generator for my blog I was using correctly but strangely I found that .md articles are not compiling and it throws me these strange errors . I looked at my article pages everything is fine this is my article header .. . .. . I couldn t find why I am getting this error I looked over the pelicanconf.py file particularly for the date section everything is ok here is my date section of my pelicanconf.py file .. . .. . These are the bunch of errors that pelican throws when I try to compile an article . .. . Answer : Your .md files are fine . You re getting errors from .html files in your content which looks like the output of a previous pelican run : .. . .. . Remove the blog output folder inside your content folder and the errors should go away .", "Question : I ve installed the pelican jsfiddle plugin and from a restructured text page I can call it by .. . .. . Doing so embeds the fiddle into the pelican page . How would I do this using a markdown page .. . Answer : I just took a look at the source code https : github.com if1live pelican-jsfiddle for that plugin and it appears that Markdown is not supported . In other words the plugin authors only included support for ReST but not Markdown . And understandably so . They used a ReST directive and Markdown has not concept of directives or anything like them . That said Pelican uses Python-Markdown for parsing Markdown which has a very extensive Extension API https : pythonhosted.org Markdown extensions api.html . I did a quick search and don t see that anyone has created a jsfiddle extension for Python-Markdown yet but it wouldn t be terribly difficult to do see a tutorial here https : github.com waylan Python-Markdown wiki Tutorial : -Writing-Extensions-for-Python-Markdown . If you are looking for any pre-existing syntax I did find this http : www.codeproject.com Articles 507944 Extending-Markdown-MarkdownSharp-for-jsFiddle-embe.aspx which was part of a different Markdown implementation . It uses FIDDLEID borrowing from the image syntax using a instead of . Of course as that is non-standard Markdown it will not work if you migrate to another Markdown implementation in the future . A common solution to that problem in the Markdown world it to implement something inside an HTML comment instead of some special custom syntax . Perhaps -- fiddle : FIDDLEID -- . Then if migrated to another Markdown implementation the comment would simply be ignored and nothing would break . Either way actually building such an extension is beyond the scope of this answer . Of course if you attempt to build it and run into issues those specific issues may be separate questions of their own . Comment : Thanks for the extensive research into this One reason I would not write an extension is that by the time I implemented something inside an html comment might as just include the html to embed the fiddle itself .", "Question : null .. . Answer : I want to use Pelican to generate my blog site . I install python 3 and Pelican by pip on Windows 7 with the guidance of docs quickstart http : docs.getpelican.com en 3.6.3 quickstart.html . And I created a directory under D : blog to store my site files . Then create a file named test.md under D : blog content and test.md s content is the same as the Quickstart guidance . When going to step Generate your site http : docs.getpelican.com en 3.6.3 quickstart.html generate-your-site I get an error in gitbash as follows : .. . .. . enter image description here http : i.stack.imgur.com 4v9kX.png .. . .. . So why it happened and how to fix it Thanks . Updated use pelican content --debug command to get traceback and the key traceback is here : .. . .. . enter image description here http : i.stack.imgur.com qIx4g.png Comment : Can you try a different markdown file maybe an empty one Comment : @poke I create an empty markdown file and get an error : Index Error string index out of range . Not just markdown file has the value error The rst file and html has the error too . Comment : Hm maybe it would be a good idea to bring this up on the GitHub page so the library authors can take a look at it . Comment : @poke OK . I will consider about it.THX Comment : Can you post the full traceback by running pelican with --debug", "Question : I m using Pelican http : blog.getpelican.com a static site generator to provide an html personal wiki or knowledge base using .org files as its base . Links to internal content in Pelican use the syntax filename path to file . However since I m using emacs org-mode I would also like to be able to follow such links to their relevant files in org-mode . I m hoping that there is a simple function I could write which would allow org-mode to follow such a link and open the relevant file without compromising Pelican s use of the internal link syntax . I suspect that this might be done by means of org-add-link-type and a function which parses the proper absolute path to the file . But my elisp-fu is weak and I m unsure of how to proceed . Help appreciated Edit : just to give an example I might have a link like file : filename path to file.org in an org file . Is there a way to get org to open the file by substituting maybe via regexp an absolute file path for filename but also wouldn t alter the original link so that Pelican can still process it correctly Comment : Is filename a literal string that is always the same Comment : filename is always the same yes . You can see the info on internal linking here http : docs.getpelican.com en 3.6.3 content.html linking-to-internal-content if you re interested . .. . Answer : I think you want something like : .. . .. . Link to internal content pelican : Users jkitchin blogofile-jkitchin.github.com blog blog.org .. . .. . exports to : Comment : Hmm . Thanks John . The trouble with this is that the link without filename will have to be an absolute link while the link with filename would not . For example I might have in the org file a link like I m on OS X pelican : Users Username bin pelican content path to file.org click me which would have to be changed to a relative-path like pelican : filename path to file.org click me . Note that Users Username bin pelican content has been replaced by filename . Comment : I edited the response to use a relative-path . Is that what you need Comment : The pelican links open in org-mode properly but don t give the right path in the html document . Am I right that this proposal assumes that I m using org to convert the files to html If so that might be a problem since I ve been letting pelican with org pandoc as a plugin do the conversion work . Comment : You are right I did assume you were using orgmode to generate the html . I don t know how org-pandoc works or if it can be customized . Comment : I ve decided that if I can ever get org-publish to work properly I ll go with something like the above solution . So thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
dict-protocol@server@89
dict-protocol -- dict is a protocol that allows users to connect to a remote dictionary @placeholder and query it for word definitions .
{ "confidence": [ 52.84825897216797, 51.180503845214844, 50.04859924316406, 50.04859924316406, 44.56739044189453, 41.738555908203125, 41.2127685546875, 40.26645278930664, 39.53694152832031, 38.01861572265625, 34.990787506103516, 33.475318908691406, 33.137691497802734, 31.239151000976562, 31.062158584594727, 30.584238052368164, 29.608779907226562, 29.191492080688477, 28.98069190979004, 28.26169204711914, 27.918052673339844, 27.081832885742188, 26.573917388916016, 25.9554500579834, 25.9554500579834, 25.9554500579834, 25.9554500579834, 25.26607894897461, 24.534038543701172, 24.493959426879883, 23.96336555480957, 22.363624572753906, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 20.603071212768555, 18.521604537963867, 18.521604537963867, 18.521604537963867 ], "content": [ "could someone who have more than 1500 reputation create new tag dict for dict-protocol", "I use the command-line DICT http : en.wikipedia.org wiki DICT client named dict like this : dict some word which will show me the meaning from the dictionary servers which I have configured .", "I send a request with php using cURL to dict.org with the dict-protocol .", "You may want to check what characterset the dict-protocol uses .", "Before I start let me state that I don t know the specific of the dict-protocol .", "In my understanding the most comprehensive dictionary database is the one at dict.org which supports the dict-protocol http : tools.ietf.org html rfc2229 and is where I am sending my cURL request .", "The response looks something like this : .. . .. . I was wondering if : .. . .. . a Is there a way to specify to curl or an option in the dict-protocol to not return all that extra information i.e .", "dict-like definition fetching using dictclient in Python :", "I found a Python module for the dict-protocol in the Ubuntu repositories that I ve installed apt-get install python-dictclient but unfortunately I couldn t find any documentation for this module .", "return self.messageid .. . .. . def getdbdescs self : .. . Gets a dict of available databases .", "I d like to interact with the dict servers from Python for example reimplement that command-line client in Python .", "c If this is not the way most dictionary websites retrieve their definitions how do they do it", "if hasattr self dbdescs : .. . return self.dbdescs .. . .. . self.sendcommand SHOW DB .. . self.dbdescs self.get100dict .. . return self.dbdescs .. . .. . def getstratdescs self : .. . Gets a dict of available strategies .", "Here is a Python3 version of dictlient https : raw.githubusercontent.com krisvandermerwe dictclient db077f0d806e0afa866106a0ec0ce7682ed1931c dictclient.py : .. . .. . .. . - - coding : UTF-8 - - .. . Client for the DICT protocol RFC2229 .. . .. . Copyright C 2002 John Goerzen .. . .. . This program is free software you can redistribute it and or modify .. . it under the terms of the GNU General Public License as published by .. . the Free Software Foundation either version 2 of the License or .. . at your option any later version .", "I could only make a connection to a dict server and was able to see apartial definition here s my attempt : .. . .. . If anyone has experience with this module please explain to me how to use it .", "The argument word is the word to look up .", "databases .. . a word .", "and .. . not database in self.getdbdescs : .. . raise Exception Invalid database s specified database .. . .. . self.sendcommand DEFINE + enquote database + + enquote word .. . code self.getresultcode 0 .. . .. . retval .. . .. . if code 552 : .. . No definitions .", "250 ok d m c 3 0 162 0.000r.. . .. . .. . b You probably noticed that the dict response returns information that is not displayed in the most user friendly way .", "return self.conn.define self.getname word .. . .. . def match self strategy word : .. . Get a match from within this database .", "Parameters are the database name and the word .. . to look up .", "def init self dictconn db word defstr None : .. . Instantiate the object .", "I am trying to implement a dictionary-type service .", "self.wfile.write command.encode + b n .. . .. . def define self database word : .. . Returns a list of Definition objects for each matching .. . definition .", "Arguments are database name .. . the strategy see available ones in getstratdescs and the .. . pattern word to look for .", "return self.conn.match self.getname strategy word .. . .. . class Definition : .. . An object corresponding to a single definition .", "self.conn dictconn .. . self.db db .. . self.word word .. . self.defstr defstr .. . .. . def getdb self : .. . Get the Database object corresponding to this definition .", "if not self.defstr : .. . self.defstr self.conn.define self.getdb .getname self.word 0 .getdefstr .. . return self.defstr .. . .. . def getword self : .. . Get the word this object describes .", "return .. . if code 150 : .. . raise Exception Unknown code d code .. . .. . while 1 : .. . code text self.getresultcode .. . if code 151 : .. . break .. . .. . resultword resultdb re.search .+ S+ text .groups .. . defstr self.get100block .. . retval.append Definition self self.getdbobj resultdb .. . resultword defstr .. . return retval .. . .. . def match self database strategy word : .. . Gets matches for a query .", "else : .. . self.conn.sendcommand SHOW INFO + self.name .. . self.info n .join self.conn.get100result 1 .. . return self.info .. . .. . def define self word : .. . Get a definition from within this database .", "Returns : initialcode bodytext 1lineperentry .. . finalcode .. . code text self.getresultcode .. . if code 100 or code 200 : .. . raise Exception Got s when 100-class response expected code .. . .. . bodylines self.get100block .split n .. . .. . code2 self.get200result 0 .. . return code bodylines code2 .. . .. . def get100dict self : .. . Used when expecting a dictionary of results .", "and not database in self.getdbdescs .keys : .. . raise Exception Invalid database name s database .. . .. . self.sendcommand MATCH s s s enquote database .. . enquote strategy .. . enquote word .. . code self.getresultcode 0 .. . if code 552 : .. . No Matches .. . return .. . if code 152 : .. . raise Exception Unexpected code d code .. . .. . retval .. . .. . for matchline in self.get100block .split n : .. . matchdict matchword matchline.split 1 .. . retval.append Definition self self.getdbobj matchdict .. . dequote matchword .. . if self.getresultcode 0 250 : .. . raise Exception Unexpected end-of-list code d code .. . return retval .. . .. . class Database : .. . An object corresponding to a particular database in a server .", "I tried to understand the modules s builtin help help dictclient but didn t succeed .", ".. . This program is distributed in the hope that it will be useful .. . but WITHOUT ANY WARRANTY without even the implied warranty of .. . MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .", "See the .. . GNU General Public License for more details .", ".. . You should have received a copy of the GNU General Public License .. . along with this program if not write to the Free Software .. . Foundation Inc . 59 Temple Place Suite 330 Boston MA 02111-1307 USA .. . A few small hacks to make it work on Python3 - KrisvanderMerwe 25 Aoril 2015 .. . .. . import socket re .. . .. . version 1.0.2.1 .. . .. . def dequote teks : .. . Will remove single or double quotes from the start and end of a string .. . and return the result .", "quotechars .. . while len teks and teks 0 in quotechars : .. . teks teks 1 : .. . while len teks and teks -1 in quotechars : .. . teks teks 0 : -1 .. . return teks .. . .. . def enquote teks : .. . This function will put a string in double quotes properly .. . escaping any existing double quotes with a backslash .", "It will .. . return the result .", "return + teks.replace + .. . .. . class Connection : .. . This class is used to establish a connection to a database server .", "You will usually use this as the first call into the dictclient library .", "Instantiating it takes two optional arguments : a hostname a string .. . and a port an int .", "The hostname defaults to localhost .. . and the port to 2628 the port specified in RFC .", "def init self hostname localhost port 2628 : .. . self.sock socket.socket socket.AF INET socket.SOCK STREAM .. . self.sock.connect hostname port .. . .. . self.rfile self.sock.makefile .. . self.wfile self.sock.makefile wb 0 .. . .. . self.saveconnectioninfo .. . .. . def getresultcode self : .. . Generic function to get a result code .", "It will return a list .. . consisting of two items : the integer result code and the text .. . following .", "You will not usually use this function directly .", "line self.rfile.readline .strip .. . code text line.split 1 .. . return int code text .. . .. . def get200result self : .. . Used when expecting a single line of text -- a 200-class .. . result .", "Returns intcode remaindertext .. . .. . code text self.getresultcode .. . if code 200 or code 300 : .. . raise Exception Got s when 200-class response expected s code text .. . .. . return code text .. . .. . def get100block self : .. . Used when expecting multiple lines of text -- gets the block .. . part only .", "Does not get any codes or anything", "Returns a string .", "data .. . while 1 : .. . line self.rfile.readline .strip .. . if line .", ": .. . break .. . data.append line .. . return n .join data .. . .. . def get100result self : .. . Used when expecting multiple lines of text terminated by a period .. . and a 200 code .", "Will read from .. . the initial 100 code to a period and the 200 code .", "dicl .. . for line in self.get100result 1 : .. . key val line.split 1 .. . dicl key dequote val .. . return dicl .. . .. . def saveconnectioninfo self : .. . Called by init to handle the initial connection .", "Will .. . save off the capabilities and messageid .", "code string self.get200result .. . assert code 220 .. . capstr msgid re.search .", ".", "string .groups .. . self.capabilities capstr.split .", "self.messageid msgid .. . .. . def getcapabilities self : .. . Returns a list of the capabilities advertised by the server .", "return self.capabilities .. . .. . def getmessageid self : .. . Returns the message id including angle brackets .", "The key is the db name .. . and the value is the db description .", "This command may generate .. . network traffic", "The key is the strat .. . name and the value is the strat description .", "This call may .. . generate network traffic", "if hasattr self stratdescs : .. . return self.stratdescs .. . .. . self.sendcommand SHOW STRAT .. . self.stratdescs self.get100dict .. . return self.stratdescs .. . .. . def getdbobj self dbname : .. . Gets a Database object corresponding to the database name passed .. . in .", "This function explicitly will not generate network traffic .", "If you have not yet run getdbdescs it will fail .", "if not hasattr self dbobjs : .. . self.dbobjs .. . .. . if dbname in self.dbobjs : .. . return self.dbobjs dbname .. . .. . We use self.dbdescs explicitly since we don t want to .. . generate net traffic with this request", ".. . if dbname and dbname", "and .. . not dbname in self.dbdescs.keys : .. . raise Exception Invalid database name s dbname .. . .. . self.dbobjs dbname Database self dbname .. . return self.dbobjs dbname .. . .. . def sendcommand self command : .. . Takes a command without a newline character and sends it to .. . the server .", "This is one of the main functions you will use .. . to interact with the server .", "Returns a list of Definition .. . objects .", "If there are no matches an empty list is returned .", ".. . Note : database may be which means to search all databases .. . or", "which means to return matches from the first database that .. . has a match .", "self.getdbdescs Prime the cache .. . .. . if database and database", "Returns a list of Definition objects .", "If there is no match an empty list is returned .", "self.getstratdescs Prime the cache .. . self.getdbdescs Prime the cache .. . if not strategy in self.getstratdescs .keys : .. . raise Exception Invalid strategy s strategy .. . if database and database", "def init self dictconn dbname : .. . Initialize the object -- requires a Connection object and .. . a database name .", "self.conn dictconn .. . self.name dbname .. . .. . def getname self : .. . Returns the short name for this database .", "return self.name .. . .. . def getdescription self : .. . if hasattr self description : .. . return self.description .. . if self.getname : .. . self.description All Databases .. . elif self.getname", ": .. . self.description First matching database .. . else : .. . self.description self.conn.getdbdescs self.getname .. . return self.description .. . .. . def getinfo self : .. . Returns a string of info describing this database .", "if hasattr self info : .. . return self.info .. . .. . if self.getname : .. . self.info This special database will search all databases on the system .", "elif self.getname", ": .. . self.info This special database will return matches from the first matching database .", "The return-value is the .. . same as from Connection.define .", "The return-value is .. . the same as from Connection.define .", "Requires : a Connection object .. . a Database object NOT corresponding to or", "Optional : a definition string .", "If not supplied .. . it will be fetched if when it is requested .", "return self.db .. . .. . def getdefstr self : .. . Get the definition string the actual content of this .. . definition .", "return self.word .. .", "While this link may answer the question it is better to include the essential parts of the answer here and provide the link for reference .", "Link-only answers can become invalid if the linked page changes .", "This is my code which on its own works and may be helpful for future readers : .. . .. . The server returns the definition as expected along with several headers that I do not need .", "I was wondering if anybody knew of any existing php library that will allow me to display this in a nicer way .", "Otherwise I d have to code my own ." ] }
{ "confidence": [ 66.39668273925781, 65.79142761230469, 54.47937774658203 ], "content": [ "Question : I use the command-line DICT http : en.wikipedia.org wiki DICT client named dict like this : dict some word which will show me the meaning from the dictionary servers which I have configured . I d like to interact with the dict servers from Python for example reimplement that command-line client in Python . I found a Python module for the dict-protocol in the Ubuntu repositories that I ve installed apt-get install python-dictclient but unfortunately I couldn t find any documentation for this module . I tried to understand the modules s builtin help help dictclient but didn t succeed . I could only make a connection to a dict server and was able to see apartial definition here s my attempt : .. . .. . If anyone has experience with this module please explain to me how to use it . Comment : could someone who have more than 1500 reputation create new tag dict for dict-protocol .. . Answer : dict-like definition fetching using dictclient in Python :", "Question : I am trying to implement a dictionary-type service . I send a request with php using cURL to dict.org with the dict-protocol . This is my code which on its own works and may be helpful for future readers : .. . .. . The server returns the definition as expected along with several headers that I do not need . The response looks something like this : .. . .. . I was wondering if : .. . .. . a Is there a way to specify to curl or an option in the dict-protocol to not return all that extra information i.e . 250 ok d m c 3 0 162 0.000r.. . .. . .. . b You probably noticed that the dict response returns information that is not displayed in the most user friendly way . I was wondering if anybody knew of any existing php library that will allow me to display this in a nicer way . Otherwise I d have to code my own . c If this is not the way most dictionary websites retrieve their definitions how do they do it In my understanding the most comprehensive dictionary database is the one at dict.org which supports the dict-protocol http : tools.ietf.org html rfc2229 and is where I am sending my cURL request . Thank you .. . Answer : Before I start let me state that I don t know the specific of the dict-protocol . I doubt that you ll be able to create a request that only delivers the text . The information you wish to discard looks like status information and is therefore useful . The way I d handle this is as follows : .. . .. . 1 . Read the curl response data into an array so that each line is an separate entry in the array . You could use explode and split at the new line character n to do this . 2 . Iterate the array EG for response as responseLine .. . 3 . perform a regex or some other form of pattern-matching on responseLine to find the definition . It looks like the actual text is the only responseLine which doesn t start with a number . You may want to check what characterset the dict-protocol uses . I haven t mentioned any error-handling but that should be straight forward . Comment : thank you do you happen to know what the auth.mime does Comment : that s exactly how I went about doing that . Thanks", "Question : I use the command-line DICT http : en.wikipedia.org wiki DICT client named dict like this : dict some word which will show me the meaning from the dictionary servers which I have configured . I d like to interact with the dict servers from Python for example reimplement that command-line client in Python . I found a Python module for the dict-protocol in the Ubuntu repositories that I ve installed apt-get install python-dictclient but unfortunately I couldn t find any documentation for this module . I tried to understand the modules s builtin help help dictclient but didn t succeed . I could only make a connection to a dict server and was able to see apartial definition here s my attempt : .. . .. . If anyone has experience with this module please explain to me how to use it . Comment : could someone who have more than 1500 reputation create new tag dict for dict-protocol .. . Answer : Here is a Python3 version of dictlient https : raw.githubusercontent.com krisvandermerwe dictclient db077f0d806e0afa866106a0ec0ce7682ed1931c dictclient.py : .. . .. . .. . - - coding : UTF-8 - - .. . Client for the DICT protocol RFC2229 .. . .. . Copyright C 2002 John Goerzen .. . .. . This program is free software you can redistribute it and or modify .. . it under the terms of the GNU General Public License as published by .. . the Free Software Foundation either version 2 of the License or .. . at your option any later version . .. . This program is distributed in the hope that it will be useful .. . but WITHOUT ANY WARRANTY without even the implied warranty of .. . MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the .. . GNU General Public License for more details . .. . You should have received a copy of the GNU General Public License .. . along with this program if not write to the Free Software .. . Foundation Inc . 59 Temple Place Suite 330 Boston MA 02111-1307 USA .. . A few small hacks to make it work on Python3 - KrisvanderMerwe 25 Aoril 2015 .. . .. . import socket re .. . .. . version 1.0.2.1 .. . .. . def dequote teks : .. . Will remove single or double quotes from the start and end of a string .. . and return the result . quotechars .. . while len teks and teks 0 in quotechars : .. . teks teks 1 : .. . while len teks and teks -1 in quotechars : .. . teks teks 0 : -1 .. . return teks .. . .. . def enquote teks : .. . This function will put a string in double quotes properly .. . escaping any existing double quotes with a backslash . It will .. . return the result . return + teks.replace + .. . .. . class Connection : .. . This class is used to establish a connection to a database server . You will usually use this as the first call into the dictclient library . Instantiating it takes two optional arguments : a hostname a string .. . and a port an int . The hostname defaults to localhost .. . and the port to 2628 the port specified in RFC . def init self hostname localhost port 2628 : .. . self.sock socket.socket socket.AF INET socket.SOCK STREAM .. . self.sock.connect hostname port .. . .. . self.rfile self.sock.makefile .. . self.wfile self.sock.makefile wb 0 .. . .. . self.saveconnectioninfo .. . .. . def getresultcode self : .. . Generic function to get a result code . It will return a list .. . consisting of two items : the integer result code and the text .. . following . You will not usually use this function directly . line self.rfile.readline .strip .. . code text line.split 1 .. . return int code text .. . .. . def get200result self : .. . Used when expecting a single line of text -- a 200-class .. . result . Returns intcode remaindertext .. . .. . code text self.getresultcode .. . if code 200 or code 300 : .. . raise Exception Got s when 200-class response expected s code text .. . .. . return code text .. . .. . def get100block self : .. . Used when expecting multiple lines of text -- gets the block .. . part only . Does not get any codes or anything Returns a string . data .. . while 1 : .. . line self.rfile.readline .strip .. . if line . : .. . break .. . data.append line .. . return n .join data .. . .. . def get100result self : .. . Used when expecting multiple lines of text terminated by a period .. . and a 200 code . Returns : initialcode bodytext 1lineperentry .. . finalcode .. . code text self.getresultcode .. . if code 100 or code 200 : .. . raise Exception Got s when 100-class response expected code .. . .. . bodylines self.get100block .split n .. . .. . code2 self.get200result 0 .. . return code bodylines code2 .. . .. . def get100dict self : .. . Used when expecting a dictionary of results . Will read from .. . the initial 100 code to a period and the 200 code . dicl .. . for line in self.get100result 1 : .. . key val line.split 1 .. . dicl key dequote val .. . return dicl .. . .. . def saveconnectioninfo self : .. . Called by init to handle the initial connection . Will .. . save off the capabilities and messageid . code string self.get200result .. . assert code 220 .. . capstr msgid re.search . . string .groups .. . self.capabilities capstr.split . self.messageid msgid .. . .. . def getcapabilities self : .. . Returns a list of the capabilities advertised by the server . return self.capabilities .. . .. . def getmessageid self : .. . Returns the message id including angle brackets . return self.messageid .. . .. . def getdbdescs self : .. . Gets a dict of available databases . The key is the db name .. . and the value is the db description . This command may generate .. . network traffic if hasattr self dbdescs : .. . return self.dbdescs .. . .. . self.sendcommand SHOW DB .. . self.dbdescs self.get100dict .. . return self.dbdescs .. . .. . def getstratdescs self : .. . Gets a dict of available strategies . The key is the strat .. . name and the value is the strat description . This call may .. . generate network traffic if hasattr self stratdescs : .. . return self.stratdescs .. . .. . self.sendcommand SHOW STRAT .. . self.stratdescs self.get100dict .. . return self.stratdescs .. . .. . def getdbobj self dbname : .. . Gets a Database object corresponding to the database name passed .. . in . This function explicitly will not generate network traffic . If you have not yet run getdbdescs it will fail . if not hasattr self dbobjs : .. . self.dbobjs .. . .. . if dbname in self.dbobjs : .. . return self.dbobjs dbname .. . .. . We use self.dbdescs explicitly since we don t want to .. . generate net traffic with this request .. . if dbname and dbname and .. . not dbname in self.dbdescs.keys : .. . raise Exception Invalid database name s dbname .. . .. . self.dbobjs dbname Database self dbname .. . return self.dbobjs dbname .. . .. . def sendcommand self command : .. . Takes a command without a newline character and sends it to .. . the server . self.wfile.write command.encode + b n .. . .. . def define self database word : .. . Returns a list of Definition objects for each matching .. . definition . Parameters are the database name and the word .. . to look up . This is one of the main functions you will use .. . to interact with the server . Returns a list of Definition .. . objects . If there are no matches an empty list is returned . .. . Note : database may be which means to search all databases .. . or which means to return matches from the first database that .. . has a match . self.getdbdescs Prime the cache .. . .. . if database and database and .. . not database in self.getdbdescs : .. . raise Exception Invalid database s specified database .. . .. . self.sendcommand DEFINE + enquote database + + enquote word .. . code self.getresultcode 0 .. . .. . retval .. . .. . if code 552 : .. . No definitions . return .. . if code 150 : .. . raise Exception Unknown code d code .. . .. . while 1 : .. . code text self.getresultcode .. . if code 151 : .. . break .. . .. . resultword resultdb re.search .+ S+ text .groups .. . defstr self.get100block .. . retval.append Definition self self.getdbobj resultdb .. . resultword defstr .. . return retval .. . .. . def match self database strategy word : .. . Gets matches for a query . Arguments are database name .. . the strategy see available ones in getstratdescs and the .. . pattern word to look for . Returns a list of Definition objects . If there is no match an empty list is returned . .. . Note : database may be which means to search all databases .. . or which means to return matches from the first database that .. . has a match . self.getstratdescs Prime the cache .. . self.getdbdescs Prime the cache .. . if not strategy in self.getstratdescs .keys : .. . raise Exception Invalid strategy s strategy .. . if database and database and not database in self.getdbdescs .keys : .. . raise Exception Invalid database name s database .. . .. . self.sendcommand MATCH s s s enquote database .. . enquote strategy .. . enquote word .. . code self.getresultcode 0 .. . if code 552 : .. . No Matches .. . return .. . if code 152 : .. . raise Exception Unexpected code d code .. . .. . retval .. . .. . for matchline in self.get100block .split n : .. . matchdict matchword matchline.split 1 .. . retval.append Definition self self.getdbobj matchdict .. . dequote matchword .. . if self.getresultcode 0 250 : .. . raise Exception Unexpected end-of-list code d code .. . return retval .. . .. . class Database : .. . An object corresponding to a particular database in a server . def init self dictconn dbname : .. . Initialize the object -- requires a Connection object and .. . a database name . self.conn dictconn .. . self.name dbname .. . .. . def getname self : .. . Returns the short name for this database . return self.name .. . .. . def getdescription self : .. . if hasattr self description : .. . return self.description .. . if self.getname : .. . self.description All Databases .. . elif self.getname : .. . self.description First matching database .. . else : .. . self.description self.conn.getdbdescs self.getname .. . return self.description .. . .. . def getinfo self : .. . Returns a string of info describing this database . if hasattr self info : .. . return self.info .. . .. . if self.getname : .. . self.info This special database will search all databases on the system . elif self.getname : .. . self.info This special database will return matches from the first matching database . else : .. . self.conn.sendcommand SHOW INFO + self.name .. . self.info n .join self.conn.get100result 1 .. . return self.info .. . .. . def define self word : .. . Get a definition from within this database . The argument word is the word to look up . The return-value is the .. . same as from Connection.define . return self.conn.define self.getname word .. . .. . def match self strategy word : .. . Get a match from within this database . The argument word is the word to look up . The return-value is .. . the same as from Connection.define . return self.conn.match self.getname strategy word .. . .. . class Definition : .. . An object corresponding to a single definition . def init self dictconn db word defstr None : .. . Instantiate the object . Requires : a Connection object .. . a Database object NOT corresponding to or databases .. . a word . Optional : a definition string . If not supplied .. . it will be fetched if when it is requested . self.conn dictconn .. . self.db db .. . self.word word .. . self.defstr defstr .. . .. . def getdb self : .. . Get the Database object corresponding to this definition . return self.db .. . .. . def getdefstr self : .. . Get the definition string the actual content of this .. . definition . if not self.defstr : .. . self.defstr self.conn.define self.getdb .getname self.word 0 .getdefstr .. . return self.defstr .. . .. . def getword self : .. . Get the word this object describes . return self.word .. . Comment : While this link may answer the question it is better to include the essential parts of the answer here and provide the link for reference . Link-only answers can become invalid if the linked page changes ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
hypertable@bigtable@104
hypertable -- hypertable is an open-source database inspired by publications on the design of google s @placeholder .
{ "confidence": [ 47.75164031982422, 47.0215950012207, 46.281158447265625, 46.281158447265625, 46.281158447265625, 46.281158447265625, 44.571876525878906, 44.565711975097656, 44.45710754394531, 43.996463775634766, 43.734474182128906, 43.71052932739258, 42.741661071777344, 42.741661071777344, 42.007389068603516, 42.007389068603516, 42.007389068603516, 41.65557098388672, 41.6036262512207, 41.6036262512207, 41.6036262512207, 41.25359344482422, 41.25359344482422, 40.98609161376953, 40.29194641113281, 40.29194641113281, 40.29194641113281, 40.29194641113281, 40.29194641113281, 40.29194641113281, 39.84805679321289, 39.49834442138672, 39.474849700927734, 38.958866119384766, 38.689109802246094, 38.689109802246094, 38.689109802246094, 37.610572814941406, 36.973663330078125, 36.973663330078125, 36.973663330078125, 36.973663330078125, 36.78388595581055, 36.78388595581055, 36.199188232421875, 35.835628509521484, 35.835628509521484, 35.835628509521484, 35.835628509521484, 35.835628509521484, 35.51432800292969, 34.47166061401367, 34.21940231323242, 34.21940231323242, 34.21940231323242, 34.21940231323242, 34.21940231323242, 34.21940231323242, 34.08037567138672, 34.08037567138672, 34.04833221435547, 33.38250732421875, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 32.50395584106445, 31.483844757080078, 31.483844757080078, 31.365921020507812, 31.365921020507812, 31.365921020507812, 31.365921020507812, 31.21573257446289, 30.63894271850586, 30.466960906982422, 29.768400192260742, 29.768400192260742, 29.768400192260742, 29.768400192260742, 29.768400192260742, 28.419923782348633, 28.419923782348633, 27.90291976928711, 27.87669563293457, 27.657917022705078, 26.738658905029297, 26.704479217529297, 26.704479217529297, 26.704479217529297, 26.704479217529297 ], "content": [ "Hypertable is an excellent choice for a crawl database .", "I have inserted data s in Hypertable .", "I want to fit this in hypertable .", "or writing Mapreduce output to Hypertable", "Is Hypertable production ready", "Hypertable is production ready .", "I need some data out of my hypertable .", "in hypertable they have the build-in indexes .", "which version of hypertable you are using", "Hypertable is an open-source high performance scalable database modeled after Google s Bigtable .", "Using Hypertable for windows .. . .. . hypertable select Col Id1 Col Id2 from test where Col Id2 131600 .. . .. . I get the following .. . .. . Error : Hypertable : : Exception : Column predicate name not identical with selected column - HYPERTABLE HQL parse-error at Hypertable : : Hql : : scan set column predicate name : : operator c : soft dev devel hypertable ht4w src cc hypertable lib HqlParser.h : 825 - HYPERTABLE HQ L parse-error .. . .. . This works as docs state .", "I have written some C code to store data into hypertable database .", "Both HBase and Hypertable require hadoop .", "The functionality of Select by condition is not available in Hypertable .", "I wonder if there is a limit for size of cell values in hypertable .", "Reading from Hypertable and feed it to Hadoop job", "The sad thing is that there is no much support community around hypertable .", "It s fairly simple : https : github.com cruppstahl hypertable blob v0.9.6 src java ThriftClient org hypertable thrift BasicClientTest.java", "Do you have experience with Hypertable", "I do have experience with Hypertable .", "Are there any visualisation tools to hypertable namespaces", "How can I remove multiple rows in one query in hypertable", "I have a table in hypertable where the row-key is a user id .", "2 Running OpenStack - do you get something like Hypertable BigTable open-source", "I don t have tremendous amount of HyperTable experience .", "hypertable output column names cc kw oc", "That s an object of class Hypertable : : ThriftGen : : ClientException .", "I don t know anything about Hypertable .", "Hypertable currently does not support WHERE ROW IN .", "How could I lock a few rows in Hypertable", "As Hypertable and HBase seem to be the two major open-source BigTable implementations what are the major pros and cons between these two databases", "However at every hypertable startup and despite any known from me memory tuning in the hypertable.cfg file EVEN WHEN ACCOUNTING FOR HEAP FRAGMENTATION the hypertable process uses all my RAM and starts to swap .", "make sure you have a PATH system environment variable point to the hypertable installation folder on my system is in : .. . .. . after that try from the cmd the command hypertable you need to get a hypertable welcome message .", "the hypertable tutorial : code.google.com p hypertable wiki HQLTutorial http : code.google.com p hypertable wiki HQLTutorial and here s a recent benchmark : highscalability.com blog 2012 2 7 http : highscalability.com blog 2012 2 7 hypertable-routs-hbase-in-performance-test-hbase-overwhelmed.html .", "Just want to install hypertable on top of HDFS 2.x .", "It seems everyone uses HBase instead however Hypertable claims to be much faster .", "Baidu chinese search-engine is using Hypertable extensively for their applications .", "Which are not hosted on hypertable.org http : hypertable.org or code.google.com p hypertable http : code.google.com p hypertable the infos all on these two sites i read already .", "How would one write a mapreduce job that writes the output data to hypertable", "how to insert multiple values in hypertable using hadoop python streaming", "And how would I code it using the HyperTable Java client", "I am using Hypertable : : ThriftClient and using mutator for mass insertion .", "I can inspect the data with the hypertable shell and was curios whether it is possible to pipe the result-of a HQL query into a file .", "I ve been testing on Hypertable recently since attracted by its a-priori ability to handle huge amounts of time-series data .", "Now to be at least partly sure I got It right I also checked out riak database-design key-value database unlike hypertable which is column database", "I m trying to develop a Web app in Perl using Hypertable http : www.hypertable.org .", "I am searching for a connector library that will allow me to connect to Hypertable DB .", "I use HyperTable on my Linux-box to store photos and movies .", "You can use HyperTable from any language with Thrift-support .", "Hypertable does have a Java client however out of the box .", "I m looking into Hypertable MongoDb Hbase Graph Database .. . but I m not sure which way to go .", "I am using Hypertable db with the front end of HyperRecord .", "stackoverflow.com questions 17955954 http : stackoverflow.com questions 17955954 hypertable-loading-data-using-mutators-vs-load-data-infile .", "Based on the read from https : groups.google.com forum msg hypertable-user ilBlGIIwh68 a2TWziSpkJcJ I tried .. . .. . and it worked .", "4gb .. . .. . According to : http : vschart.com compare apache-hive vs hypertable .. . .. . I havn t seen in in the documentation either .", "I want to know if I can install Hypertable on top of Hadoop 2.3.0 or 2.2.0 .", "In NoSql community I have heard very little or nothing about Hypertable in last 2 years .", "i have a code in Java languaje and I m using a example of Hypertable but i have a error .", "I d originally thought Hypertable was a viable alternative but in doing research I saw in their documents their mention that Mongo would be a more performant option while Hypertable had other benefits .", "Since HyperTable operates on Byte-Arrays you can simply put your file in the thrift-client as byte-array and HyperTable will compress it for you automagically if you have told it to do so in the column definition .", "I m using Hypertable basics and examples when you run a SELECT appears at the end of this code : .. . .. . But when I do the SELECT does not appear .", "Here is the script which generates the database look for the profile table : https : github.com cruppstahl hypertable blob v0.9.5 examples php microblog setup.hql", "My project involved loading close to 400 million rows of social media data into HyperTable to be used for real-time analytics .", "I was trying the example from Hypertable.com - nodejs platform to run Hypertable Thrift Client via nodeJS But was not able to connect to the Machine .", "However I searched and read for a long time and couldn t find what I want for Hypertable .", "Though maybe I am missing it I am not quite familiar with Hadoop Hypertable .", "I am using hypertable in java program I know it should be used in C++ .", "Please advice whether we can use SQL hypertable statement in Java program .", "download the hypertable sources and unpack them then look into this directory : .. . .. . it has a file called BasicClientTest.java which does a select query .", "I d like to use Go with either Postgres or Hypertable for a project but I m curious as to how mature and complete these interfaces are .", "I ended up going with Hypertable and it seems like Thrift will work reasonably well .", "see this thread for details : https : groups.google.com forum fromgroups topic hypertable-user igfvLv9IfA", "In hypertable time stamp must be unique you can time stamp as small as in nano seconds .", "Please tell me is it possible to install hypertable and thrift and also hadoop on xampp on windows-10 64bit to test a site .", "For now I have a table like .. . .. . I am still beginning to learn hypertable .", "Hypertable does not support transactions and does not have any locking or read-modify-write operations .", "I will get 1 row having category cars city mumbai and id 1..How can same be achived in hypertable query", "I have all of that and im constantly trying but since im missing some c knowledge and most of all the syntax for hypertable data insertion... .", "I ve evaluated most of the NoSQL solutions and it seems that using a combination of MongoDB Riak and HyperTable or HBase is the way to go .", "I think it is possible to cap memory utilization for MongoDB Riak and HyperTable via a startup parameter but how", "I ve installed Hypertable on my windows machine but I don t know how to connect to it .", "hypertable will work great - it s replicated distributed and compressed prefix compression for keys snappy for files on disk .", "i want to design a users table with the following fields in hypertable database : .. . .. . now the rowkey is the id of the user and i refer to this id a lot of stuff that belong to user i understand that in hypertable the only auto primary-key options is guid the reason i won t use the username as the rowkey is because the username can be changed if changed occurs i will have to update a lot of stuff in the entire database .", "I just try to install hypertable on hadoop follow official document first I deploy cdh4 on CentOS 6.5-32bit node in persudo-distribute mode .. . .. . then follow hypertable offical document to install hypertable on hadoop .. . .. . when I run .. . .. . get DfsBroker did not come up error .. . .. . I check the DfsBroker.hadoop.log in opt hypertable 0.9.7.16 get this .. . .. . but i JAVA HOME has been set and I test java run normally with .. . .. . and I try to run jrun individually it didn t prompt exec : java : not found .. . .. . I have seen similar problem after google .. . .. . but I have use all those solution I can find .. . .. . just get .. . .. . so if any one can give me a hint about this problem i ll be appreciated", "If I have the following table schema to log an exception in standard SQL schema : .. . .. . How would I design the same thing in HyperTable specifically what is the best approach for efficiency", "Doug - as recommended I tried to use mutator set cells or mutator set cells as arrays but for both I get this error Not an ARRAY reference at . lib Hypertable ThriftGen ClientService.pm .", "If you download hypertable sources or browse the sources online then you will find a PHP example project which implements a twitter-like microblogging site .", "Hypertable does not have auto-increments but uses random GUIDs for unique IDs if you don t want to provide your own ID .", "I m making the transition from a traditional SQL to HyperTable so it would help if you could explain how to structure the new schema .", "Here s the documentation on how to use unique keys in hypertable : hypertable.com documentation developer guide unique-cells http : hypertable.com documentation developer guide unique-cells", "The following examples are valid : .. . .. . The following examples are not valid because they select more than one column family or because the column family in the select clause is different from the one in the predicate these limitations will be removed in future versions of Hypertable :", "if you unpack the sources then you find all the files in src cc Hypertable RangeServer : .. . .. . CellCache.h CellCache.cc : the in-memory storage a std : : map with a custom memory allocator .. . .. . CellStoreV6.h CellStoreV6.cc : the on-disk storage", "I m trying to connect to a hypertable master machine hypertable is deployed via mesos When I copy hypertable.cfg file from master machine to some arbitrary machine after running start-thriftbroker.sh all I get is about ten lines of Waiting for ThriftBroker to come up.. . and then ERROR : ThriftBroker did not come up ThirftBroker s logfile says :", "Whenever I try to run the hypertable api test.js the first line that connects via thrift is throwing an error : .. . .. . It throws an error on the screen : .. . .. . assert.js : 92 throw new assert.AssertionError AssertionError : Error : connect ECONNREFUSED at null . anonymous FILE node-modules hypertable lib hypertable ThriftClient.js : 30 : 7 at EventEmitter.emit events.js : 95 : 17 at Socket . anonymous FILE node-modules hypertable node-modules thrift lib thrift connection.js : 104 : 12 at Socket.EventEmitter.emit events.js : 95 : 17 at net.js : 440 : 14 at process . tickCallback node.js : 415 : 13 .. . .. . Ref URL : http : www.hypertable.com documentation developer guide nodejs .. . .. . Any solution to this", "The hypertable software pleases me a lot for its user-friendliness while being very powerful and fast but I might be tempted to switch to the more memory-controllable cassandra if this problem finds no solution since I cannot throw RAM at it eternally .", "Hypertable exposes the high-level API through an Apache Thrift service stack therefore client libaries can be generated for many different languages - including C : .. . .. . Download Apache Thrift including the thrift compiler .. . Download the Hypertable IDL files Client.thrift and Hql.thrift from here https : github.com andysoftdev ht4w tree windows src cc ThriftBroker .. . Run the thrift compiler thrift-0.9.2 --gen csharp Client.thrift Hql.thrift .. . Pack all together .. . .. . For the Hypertable serialized API you ll need a SerializedCellReader SerializedCellWriter everything together is available for download here http : ht4w.softdev.ch index.php downloads .", "2 We don t run OpenStack at large enough scale to need something like Hypertable so I don t know if it s feasible but I know they offer a storage solution as part of the OpenStack suite .", "My needs : .. . .. . There are more reads than writes.But writes are also significantly large in numbers read : write 4 : 3 .. . .. . Can you please explain difference among HBase Hypertable and Cassandra", "I do not know much about HBase or Hypertable but we are using Cassandra and inserting more than 200 millions of records per day.We load this data at once in a day and works fine for us .", "The reason for this question is that HyperTable value-type is std : : string so whatever custom type you want to store in the table needs to be serialised and stored into the string and then deserialized for reading ." ] }
{ "confidence": [ 53.61298751831055, 50.60181427001953, 50.49230194091797, 50.35853576660156, 50.27867889404297, 49.19081115722656, 48.89332962036133, 48.162288665771484, 47.9090576171875, 47.79507064819336, 47.600399017333984, 47.56978988647461, 47.342498779296875, 46.949214935302734, 46.949214935302734, 46.81494140625, 46.758209228515625, 46.262664794921875, 46.26165771484375, 45.83324432373047 ], "content": [ "Question : tl rd : .. . .. . 1 . DB Partitioning with Primary Key .. . 2 . Index size problem . 3 . DB size grows around 1-3 GB per day .. . 4 . Raid setup . 5 . Do you have experience with Hypertable Long Version : .. . .. . i just build bought a home server : .. . .. . Xeon E3-1245 3 4 HT .. . 32GB RAM .. . 6x 1 5 TB WD Cavier Black 7200 .. . .. . I will use the Server Board INTEL S1200BTL Raid no money left for a raid controller . http : ark.intel.com products 53557 Intel-Server-Board-S1200BTL .. . .. . The mainboard has 4x SATA 3GB s ports and 2x SATA 6GB s .. . .. . I m not yet sure if i can setup all 6hdds in RAID 10 .. . .. . if not possible i thought 4x hdds Raid 10 MYSQL DB 2xhdds Raid 0 for OS Mysql Indexes . If raid 0 breaks its no problem for me i need only secure the DB .. . .. . About the DB : .. . .. . Its a web-crawler DB where domains urls links and such stuff gets stored . So i thought i partition the DB with the primary keys of each table like 1-1000000 1000001-2000000 and so on . When i do search insert select queries in the DB i need to scan the hole table cause some stuff could be in ROW 1 and the other in ROW 1000000000000 . If i do such partition by primary-key auto-increment will this use all my CPU cores So that it scans each partition parallel Or should i stick with one huge DB without a partition . .. . .. . The DB will be very big on my home System right now its .. . .. . I see i could fix the externlink link indexes i just added externlink cause i needed to query that field and i was not able to use the link index . Do you see what I could tune on the indexes My new system will have 32 GB but if the DB grows in this speed i will use 90 of the RAM in FEW wks months . Does a packed INDEX help How is the performance decrease The other important tables are under 500MB . From this table the data can be wiped when i have extracted all what i need . Do you have any experience with Hypertables http : hypertable.org Googles Bigtables . If I move to Hypertables would this help me in performance extracting data searching inserting selecting DB size . I read on the page but I m still some clueless . Cause you cant directly compare MYSQL with Hypertables . I will try it out soon must read the documentation first . What i need a solution which fits in my setup cause i have no money left for any other hardware setup . Thanks for help . .. . Answer : Hypertable is an excellent choice for a crawl database . Hypertable is an open-source high performance scalable database modeled after Google s Bigtable . Google developed Bigtable specifically for their crawl database . I recommend reading the Bigtable paper http : research.google.com archive bigtable.html since it uses the crawl database as the running example . Comment : Thanks for your answer Doug . Do you have experience with Hypertables and also do know some tutorial benchmarks etc . Which are not hosted on hypertable.org http : hypertable.org or code.google.com p hypertable http : code.google.com p hypertable the infos all on these two sites i read already . Also i googled few days and i didnt found anything useful . Thanks for helping . Comment : the hypertable tutorial : code.google.com p hypertable wiki HQLTutorial http : code.google.com p hypertable wiki HQLTutorial and here s a recent benchmark : highscalability.com blog 2012 2 7 http : highscalability.com blog 2012 2 7 hypertable-routs-hbase-in-performance-test-hbase-overwhelmed.html . The source package contains lot of example code as well . Comment : I do have experience with Hypertable . I wrote most of it . : The best thing to do is first install it by following the Standalone installation instructions : link http : www.hypertable.com documentation installation quick start standalone . After you ve done that walk through the HQL tutorial : link http : www.hypertable.com documentation developer guide . I also recommend reading the Overview and Architecture documents : link http : www.hypertable.com documentation . You can find code examples under the documentation section as well . We re moving away from code.google.com . Comment : The links came out bad in my previous comment here are better ones : Standalone Installation http : www.hypertable.com documentation installation quick start standalone HQL Tutorial http : www.hypertable.com documentation developer guide Overview http : www.hypertable.com documentation Architecture http : www.hypertable.com documentation architecture Code Examples http : www.hypertable.com documentation code examples . Comment : Ah cool and good to know that you wrote a part of if it : - i will test it out soon I m just curious how is the speed compared to MYSQL for example SELECT url FROM urls WHERE url blalbla nlafsdgdfg 1.html or using wildcard url blalbla and the other important thing the indexes for example in mysql my indexes are same big as the data or bigger how is on hypertable the indexes sizes . My database will be huge possible few TBs . Thanks for help .", "Question : I just try to install hypertable on hadoop follow official document first I deploy cdh4 on CentOS 6.5-32bit node in persudo-distribute mode .. . .. . then follow hypertable offical document to install hypertable on hadoop .. . .. . when I run .. . .. . get DfsBroker did not come up error .. . .. . I check the DfsBroker.hadoop.log in opt hypertable 0.9.7.16 get this .. . .. . but i JAVA HOME has been set and I test java run normally with .. . .. . and I try to run jrun individually it didn t prompt exec : java : not found .. . .. . I have seen similar problem after google .. . .. . but I have use all those solution I can find .. . .. . just get .. . .. . so if any one can give me a hint about this problem i ll be appreciated .. . Answer : Before starting cluster you have to run : .. . .. . Then you can check that all directories has been correctly set up : .. . .. . and also java version should work .. . .. . more information in the quick start http : hypertable.com documentation installation quick start cluster installation step-5---fhs-ize-installation .", "Question : null .. . Answer : I want to know if I can install Hypertable on top of Hadoop 2.3.0 or 2.2.0 . I do not want to use Cloudera for now because I am new to Hadoop and just want to learn one thing for now . Comment : What do you mean Reading from Hypertable and feed it to Hadoop job or writing Mapreduce output to Hypertable Comment : It s nothing to do with Mapreduce or Hadoop job . Just want to install hypertable on top of HDFS 2.x . Comment : Ok then edit your question because it is not clear .", "Question : If I have the following table schema to log an exception in standard SQL schema : .. . .. . How would I design the same thing in HyperTable specifically what is the best approach for efficiency And how would I code it using the HyperTable Java client .. . Answer : What is ID - is it an auto-incremented unique ID Hypertable does not have auto-increments but uses random GUIDs for unique IDs if you don t want to provide your own ID . Here s a link with more information : http : hypertable.com documentation developer guide unique-cells .. . .. . I would maybe combine Host and Port into a single column hypertable.com : 8080 but that s my personal preference . Everything else looks fine . You can simply translate this to a CREATE TABLE statement in HQL : .. . .. . You might also want to have secondary indices i.e . on ExceptionClass if you have frequent queries like .. . .. . Secondary indices are documented here : http : hypertable.com documentation developer guide secondary-indices .. . .. . Here s a sample which shows how to use the Java client . It s fairly simple : https : github.com cruppstahl hypertable blob v0.9.6 src java ThriftClient org hypertable thrift BasicClientTest.java Comment : Thanks for your answer . The question is what am I going to use as a key . In traditional SQL it would be a generated unique ID . I m making the transition from a traditional SQL to HyperTable so it would help if you could explain how to structure the new schema . Comment : You can use a GUID . Everything else can stay as is but as i wrote above you might want to create indices on some of the column families . Here s the documentation on how to use unique keys in hypertable : hypertable.com documentation developer guide unique-cells http : hypertable.com documentation developer guide unique-cells", "Question : Is Hypertable production ready I can find very little information online . It seems everyone uses HBase instead however Hypertable claims to be much faster . Comment : Tip : If you can find very little information online I wouldn t recommend using it for production just yet.. . Comment : Not true at all . The more Enterprise something is the less usage it will get from normal users and thus the less you will find about it online . Comment : The causal relationship between product being enterprise class and therefore lacking online documentation is not as straightforward . Consider IBM db2 or IBM Websphere - both have extensive documentation available online . On the other hand you have IBM zOS - it is certainly well documented but little of it is available online . Reason being is that zOS architecture has little competition being a closely-guarded system . So I think the criteria is - if product is unique and the ecosystem is closed - you ll see no publicly available documentation . Things are different for OSS . Comment : In NoSql community I have heard very little or nothing about Hypertable in last 2 years . Not sure about the status of project . PS : I have been working on HBase for a while . .. . Answer : Hypertable is production ready . Baidu chinese search-engine is using Hypertable extensively for their applications . The sad thing is that there is no much support community around hypertable .", "Question : i want to design a users table with the following fields in hypertable database : .. . .. . now the rowkey is the id of the user and i refer to this id a lot of stuff that belong to user i understand that in hypertable the only auto primary-key options is guid the reason i won t use the username as the rowkey is because the username can be changed if changed occurs i will have to update a lot of stuff in the entire database . same role append also to the email field . now user can login with his username or with his email . so i will need to retrieve entire row by email or by username . can you help me design this table thanks . Comment : Why don t you use e-mail as the rowkey That would be ideal for this - especially if you have to look up by e-mail . Comment : if the user will-change it email then i will need to update all the references in all the table . i need in the key some value that will not change . i will have the same amount of quires for the id and email and username Comment : Ah I see will only the e-mail change or the username as well If either or both of these can change you will need to use a index - either in HBase or external . Comment : the email and the username can change . in hypertable they have the build-in indexes . i don t know if hbase also have build-in indexes .. . Answer : If you download hypertable sources or browse the sources online then you will find a PHP example project which implements a twitter-like microblogging site . And basically it implements the same user table as you asked for with one difference : it uses the username as the row-key . But you can easily change this and use the GUID instead . Although from a user s perspective i think you very rarely change the username and i do not know any webpage that offers such a function . Changing email-address or location is of course necessary . Here is the script which generates the database look for the profile table : https : github.com cruppstahl hypertable blob v0.9.5 examples php microblog setup.hql Comment : my problem with the twitter example is that the user login with it email or with it username so i need to query by email or username . and not by the guid rowkey . hypertable is column oriented database so for query on two columns i think the best way is to use the column qualifier feature for the username and email columns fields for example : login : username login : email and then make a query like select login from accounts where login username email and then i will find the rowkey and query again by rowkey . Comment : If you use username or email as a row-key then your only problem is that you have to copy all those rows as soon as the user changes its username or email . Other than that there s no disadvantage . But if you want to use the GUID then you can simply have one column family which maps usernames or emails to GUIDs i.e . the cell value contains the username and the row-key is the GUID . Then run select guid from accounts where guid email@blah.com and fetch the row-key . Make sure to create a secondary index on the guid column family . You would not even need column qualifiers for that .", "Question : Ok I have some trouble getting through HyperTable http : hypertable.com Going through the docs and other stuff I am still not very confident at why I can t use the .. . .. . I am allowed only to do .. . .. . What if I want to select two columns using a rowkey Does this mean I am wont be allowed Or have I not understood something that is important Look like the latter to me . Using Hypertable for windows .. . .. . hypertable select Col Id1 Col Id2 from test where Col Id2 131600 .. . .. . I get the following .. . .. . Error : Hypertable : : Exception : Column predicate name not identical with selected column - HYPERTABLE HQL parse-error at Hypertable : : Hql : : scan set column predicate name : : operator c : soft dev devel hypertable ht4w src cc hypertable lib HqlParser.h : 825 - HYPERTABLE HQ L parse-error .. . .. . This works as docs state . Any help and guidance appreciated . Thanks . Wajih .. . Answer : You can use .. . .. . SELECT FROM table WHERE ROW rowkey .. . .. . type help select in the shell to get a full list of options and examples . Comment : But Why only on row keys Could it be performance issues Comment : the row-key is the primary index . if you want to search by values then you can use .. . WHERE VALUE REGEXP blah or .. . WHERE column blah the latter only works in 0.9.5.6 . Searching by value is slow unless you create a secondary index . See this blog post for more information : hypertable.com blog secondary indices have arrived http : www.hypertable.com blog secondary indices have arrived Comment : OK . so the primary index was the point i had missed . Thanks .", "Question : I need some data out of my hypertable . I can inspect the data with the hypertable shell and was curios whether it is possible to pipe the result-of a HQL query into a file . This would be useful for further investigations when the result set is large and one wants to format it or something else . Any ideas .. . Answer : sure : .. . .. . You can even compress the file : .. . .. . Type help select in the shell and you will get more info . Comment : worked fine it seems that i miss this in the description . thanks Comment : You can also use ht shell --config config file --namespace xyz query.hql tmp store in this file.dat to accomplish the same thing . query.hql will have your SELECT statement .", "Question : null .. . Answer : How would one write a mapreduce job that writes the output data to hypertable Using Hbase I was able to create an Hfile and bulk upload it from the job . However I searched and read for a long time and couldn t find what I want for Hypertable . Though maybe I am missing it I am not quite familiar with Hadoop Hypertable . Any tips is appreciated .", "Question : I am searching for a connector library that will allow me to connect to Hypertable DB . I ve installed Hypertable on my windows machine but I don t know how to connect to it . I m using ASP.NET 4.5 C in Visual Studio . I tried this one : http : ht4n.softdev.ch index.php getting-started-in-5min .. . .. . But I have no idea how to use it . Imported the ht4d.dll to the bin folder but don t know what else should I do . Thanks . .. . Answer : first make sure that the installation success . make sure you have a PATH system environment variable point to the hypertable installation folder on my system is in : .. . .. . after that try from the cmd the command hypertable you need to get a hypertable welcome message . i also download the ht4n connector and i created a console-application for test it i create a reference to the ht4n.dll .. . .. . and this is the code i used and it was connected successfully :", "Question : null .. . Answer : I was trying the example from Hypertable.com - nodejs platform to run Hypertable Thrift Client via nodeJS But was not able to connect to the Machine . Whenever I try to run the hypertable api test.js the first line that connects via thrift is throwing an error : .. . .. . It throws an error on the screen : .. . .. . assert.js : 92 throw new assert.AssertionError AssertionError : Error : connect ECONNREFUSED at null . anonymous FILE node-modules hypertable lib hypertable ThriftClient.js : 30 : 7 at EventEmitter.emit events.js : 95 : 17 at Socket . anonymous FILE node-modules hypertable node-modules thrift lib thrift connection.js : 104 : 12 at Socket.EventEmitter.emit events.js : 95 : 17 at net.js : 440 : 14 at process . tickCallback node.js : 415 : 13 .. . .. . Ref URL : http : www.hypertable.com documentation developer guide nodejs .. . .. . Any solution to this", "Question : I have application with 2 columns viz . city category . I want to fit this in hypertable . There is also id which I would like to add as ROW . My question is how do I fetch rows where city mumbai which should fetch 2 rows of ROW 1 . So suppose I would make similar query in MySQL. . I will get 1 row having category cars city mumbai and id 1..How can same be achived in hypertable query Thanks . .. . Answer : it seems to be a current limitation as writed in : http : hypertable.com documentation reference manual hql select .. . when you query for column you can get as results only the column values . they say : .. . .. . these limitations will be removed in future versions of Hypertable .. . .. . Column Value Predicate .. . .. . When specifying a column value predicate the column family must be identical to the column family used in the SELECT clause and exactly one column family must be selected . The following examples are valid : .. . .. . The following examples are not valid because they select more than one column family or because the column family in the select clause is different from the one in the predicate these limitations will be removed in future versions of Hypertable :", "Question : I ve been testing on Hypertable recently since attracted by its a-priori ability to handle huge amounts of time-series data . My version is 0.9.7.5 and I inserted about one million rows that each have about 1000 columns labeled date time : date with the corresponding values such as 100.0 this is not yet huge . However at every hypertable startup and despite any known from me memory tuning in the hypertable.cfg file EVEN WHEN ACCOUNTING FOR HEAP FRAGMENTATION the hypertable process uses all my RAM and starts to swap . Would anyone have any idea about why this is happening and maybe how to stop this very annoying behaviour The hypertable software pleases me a lot for its user-friendliness while being very powerful and fast but I might be tempted to switch to the more memory-controllable cassandra if this problem finds no solution since I cannot throw RAM at it eternally . Thanks a lot .. . .. . Nicolas Comment : Which processes exactly Can you run top to see which consume most Are you running all servers on the same machine Comment : Hey cruppstahl It s the rangeserver process . And I am in standalone mode . Comment : Still looking for an answer Anyone I understand there is a memory usage at startup but I would like to be able to estimate it before hand and to reduce it for following startups . .. . Answer : You can control the RangeServer s memory consumption with the configuration option Hypertable.RangeServer.MemoryLimit.Percentage . The default is 60 . If all servers run on the same machine then maybe reducing it to 40 will solve the issue . Comment : I ve already tried that and almost every memory tuning I ve seen on the configuration properties.. . Setting the MemoryLimit.Percentage even at 10 does not change anything .", "Question : I am using hypertable in java program I know it should be used in C++ . I want to use SELECT sql query in java program . But I am unable to select . The Result is coming as null . Please advice whether we can use SQL hypertable statement in Java program . If yes please give some sample code . Thanks . Comment : Please provide your own problematic code . We do not read minds here . .. . Answer : download the hypertable sources and unpack them then look into this directory : .. . .. . it has a file called BasicClientTest.java which does a select query . bye Christoph", "Question : null .. . Answer : how to insert multiple values in hypertable using hadoop python streaming i can able to insert values for single column but not more than one column . Following exception i get while i m trying .. . .. . map.py .. . .. . reduce.py .. . .. . input form hypertable will be tab separated values ex : this is text .. . .. . output table contains three columns i need to split the input text by tab and save it into hypertabel . hypertable output column names cc kw oc Comment : try showing what you exactly try not just the error every little bit helps", "Question : Could someone point me to post pdf explan here where I can learn more about hypertable database-design I have searched all over google but nothing useful comes up .. . .. . Main problem I have is how do I store data that you cant represent as key-value . For example lets say I want to track user reviews I may simply imitate relational databases generate new review key store all data I need and then for for product X store keys to all reviews in json format to x.reviews .. . .. . The other thing I came up with is simply have x.reviewKeys and then for each generated review push new key as a new version of that cell assuming that I can store infinite number of versions of the same cell . Second approach seems much more appropriate to me as I leave to database all the work I would implement in code . Does anyone know how to handle this problem or even better how does google handles this with their bigtable .. . Answer : This few hours of searching for anything that might result in understanding Hypertable database-design is definitely not enough but here is starting point if someone runs to this over google .. . .. . Now far as I understood it so far is that you can define column family say reviews and each column family can have infinite number of keys for example if you try to store user data you would probably write something like this .. . .. . userKey : info and have multiple properties like name address email .. . and you would be able to access that info simply by defining key to that entry so for example to get user address you would use userKey : info : address as key .. . .. . One thing that makes column families different if I understood it well is that you can get all that keys in column family so for example if you specify userKey : info you would get userKey : info : name userKey : info : address userKey : info : email as result which means that to store all the reviews I mentioned in my question you would create new column family and store keys to all reviews and you would end up with something like this key : reviews : review ID which would return IDs if you ask it to return key : reviews of all reviews and than you would simply use that ID to get details about specific review . so basically just like you have properties name address email in column family info here you would use review ID as column property . Now to be at least partly sure I got It right I also checked out riak database-design key-value database unlike hypertable which is column database and seems like they have bucket as alternative to column family so this at lest seems to be right implementation .. . .. . I dont know how they implemented this internally to make it efficient so I ll have to check it out and as I always create new account on SO I wont be able to update this post but if someone has more info post replay edit this post", "Question : I wonder if there is a limit for size of cell values in hypertable . I didn t found it in documentations so please share your experience if you ever tried to store big binary values in ht . .. . Answer : 4gb .. . .. . According to : http : vschart.com compare apache-hive vs hypertable .. . .. . I havn t seen in in the documentation either . Comment : To mark it as accepted I need a more reliable reference . Thanks anyway .", "Question : I am searching for a connector library that will allow me to connect to Hypertable DB . I ve installed Hypertable on my windows machine but I don t know how to connect to it . I m using ASP.NET 4.5 C in Visual Studio . I tried this one : http : ht4n.softdev.ch index.php getting-started-in-5min .. . .. . But I have no idea how to use it . Imported the ht4d.dll to the bin folder but don t know what else should I do . Thanks . .. . Answer : Hypertable exposes the high-level API through an Apache Thrift service stack therefore client libaries can be generated for many different languages - including C : .. . .. . Download Apache Thrift including the thrift compiler .. . Download the Hypertable IDL files Client.thrift and Hql.thrift from here https : github.com andysoftdev ht4w tree windows src cc ThriftBroker .. . Run the thrift compiler thrift-0.9.2 --gen csharp Client.thrift Hql.thrift .. . Pack all together .. . .. . For the Hypertable serialized API you ll need a SerializedCellReader SerializedCellWriter everything together is available for download here http : ht4w.softdev.ch index.php downloads .", "Question : null .. . Answer : I m using Hypertable basics and examples when you run a SELECT appears at the end of this code : .. . .. . But when I do the SELECT does not appear . How I can see this information Thanks .", "Question : I am asked to implement select for update in HQL in python . I haven t tried anything because I don t have a good idea how I am going to go about it . As select for update fetches rows after we disable autocommit and there by achieve locking on particular rows in the table until we commit and enable autocommit it seems to me a bit doubtful to achieve in hypertable . How could I lock a few rows in Hypertable For now I have a table like .. . .. . I am still beginning to learn hypertable . Some help will be appreciated . .. . Answer : Hypertable does not support transactions and does not have any locking or read-modify-write operations . However if you re just trying to implement a simple update you can just set the MAX VERSIONS 1 option on the columns as follows : .. . .. . Then each time you insert it will either 1 replace the old value or 2 insert the new value if it doesn t already exist . Comment : I was asked to handle and store parsed data in a table . So before inserting or updating I need to check whether its a duplicate and other things . So if rows are read simultaneously then there would be a problem as one of them would update them to parsed while the other would also fetch the same rows and update them again to parsed with different data ." ] }
[ "yes-answer-long", "yes-answer-short" ]
bigtable
UNK_RELATION
fody-propertychanged@inotifypropertychanged@51
fody-propertychanged -- fody add-in for injecting @placeholder code into properties .
{ "confidence": [ 65.09351348876953, 63.132537841796875, 60.697444915771484, 58.95878601074219, 58.330780029296875, 57.86417007446289, 56.60881423950195, 56.55132293701172, 55.23894500732422, 55.23894500732422, 53.15626907348633, 53.12470245361328, 52.38636779785156, 52.05268096923828, 51.73887252807617, 51.73887252807617, 51.69337463378906, 51.69337463378906, 51.69337463378906, 49.419979095458984, 49.02251434326172, 48.97265625, 47.827213287353516, 47.74969482421875, 47.74969482421875, 47.74969482421875, 47.2303466796875, 47.2303466796875, 47.151092529296875, 46.7133674621582, 45.66294479370117, 45.66294479370117, 44.850093841552734, 44.65238571166992, 44.65238571166992, 44.21726608276367, 43.16191482543945, 43.01402282714844, 42.94384765625, 42.565635681152344, 42.565635681152344, 42.565635681152344, 41.795494079589844, 41.795494079589844, 41.721351623535156, 40.480323791503906, 40.480323791503906, 40.480323791503906, 40.064605712890625, 40.064605712890625, 40.064605712890625, 38.59955596923828, 38.426239013671875, 38.39356994628906, 38.39356994628906, 38.39356994628906, 38.39356994628906, 38.35606384277344, 38.212554931640625, 37.92693328857422, 37.78105163574219, 37.4748649597168, 37.13077926635742, 37.13077926635742, 37.13077926635742, 37.00080871582031, 35.892539978027344, 35.892539978027344, 35.49956512451172, 35.4222412109375, 33.339149475097656, 33.339149475097656, 32.98408126831055, 32.958717346191406, 32.958717346191406, 31.962066650390625, 30.645675659179688, 30.40532684326172, 29.480300903320312, 28.779293060302734, 28.751121520996094, 27.40542221069336, 27.40542221069336, 27.40542221069336, 27.40542221069336, 27.40542221069336, 27.09323501586914, 26.267271041870117, 25.477731704711914, 25.338481903076172, 25.338481903076172, 24.40581703186035, 24.306381225585938, 23.800912857055664, 23.800912857055664, 23.7662410736084, 23.63735580444336, 23.118919372558594, 23.118919372558594, 23.118919372558594 ], "content": [ "I ve installed Nuget for Xamarin Studio and tried to add Fody PropertyChanged https : github.com Fody PropertyChanged to my iOS solution .", "Yes I m using Fody with PropertyChanged", "These aren t answers but they are relevant docs : github.com Fody PropertyChanged wiki Options https : github.com Fody PropertyChanged wiki Options github.com Fody PropertyChanged wiki SupportedToolkits https : github.com Fody PropertyChanged wiki SupportedToolkits", "When I set it to false it goes back to normal so the binding works I m using Fody https : github.com Fody Fody with the PropertyChanged addin .", "To prevent a lot of boiler code I m using Fody PropertyChanged .", "I was wondering whether it is possible for Fody-PropertyChanged https : github.com Fody PropertyChanged to raise PropertyChanged Project when the Model object raises its changed notifier .", "In the case of being inside the owning class it is just automatically injected into the code : github.com Fody PropertyChanged https : github.com Fody PropertyChanged", "Then as suggested in the documentation https : github.com Fody PropertyChanged wiki On PropertyName Changed add this method : .. . .. . This will trigger the expected PropertyChanged event .", "My entities implement INotifyPropertyChanged using fody-propertychanged .", "more info : https : github.com Fody PropertyChanged", "I am currently working on a project where we would like to use the Fody PropertyChanged https : github.com Fody PropertyChanged IL weaver .", "I would like to use the PropertyChanged.Fody https : github.com Fody PropertyChanged addin to handle all the PropertyChanged Notifications automatically .", "Not familiar with Fody but from this example https : github.com Fody PropertyChanged it looks like Fody takes care of the INotifyPropertyChanged for you try removing the INotifyPropertyChanged inheritance and the event call .", "No Fody-PropertyChanged does not currently support detecting wrapped properties in the way you describe .", "The Fody library should not be there at all .", "This class is part of the Fody package .", "I could do it manually of course but I d prefer to stick with Fody https : github.com Fody Fody .", "Are there are any traces of Fody https : github.com Fody Fody wiki or its dependencies references in the final weaved assembly", "https : github.com Fody Fody wiki TaskAddsAFlagInterface .. . .. . Do Fody addins leave any traces in final assembly", "You can see exactly how it works in the readme file https : github.com Fody PropertyChanged .. . .. . I use Fody everywhere in my MvvmCross apps .", "There is no reference to Fody in the project I deleted the Fody reference from the packages.config file and there is no XML file .", "I know that PostSharp offers a library for this but it is not free thus I would like to use Fody .. . .. . It appears that when I use both PostSharp and Fody https : github.com Fody Fody in a project the debug symbol files goes out of sync with the source code .", "see here for more details https : github.com Fody PropertyChanged wiki Attributes", "Is it possible to use both PostSharp and Fody in the same project", "Try adding a Fody nuget-package to your project .", "I guess you ve recently updated the Fody library", "For example https : github.com Fody PropertyChanged wiki WeavingWithoutAddingAReference .. . .. . However you should check the behavior of the specific addins you are using .", "I use the awesome weaver PropertyChanged.Fody https : github.com Fody PropertyChanged for avoiding INotifyPropertyChanged boilerplate .", "Maybe Fody not EF", "No Fody does not require any references not add any reference during ILWeaving .", "This allows Fody to avoid double processing of assemblies .", "This would be nice if Fody would handle this case automatically .", "Here is what I have tried so far : .. . .. . I am using Fody.PropertyChanged instead of implementing INotifyPropertyChangedEvent - Fody Property Changed on GitHub https : github.com Fody PropertyChanged .. . .. . Is there any better approach .", "If I disable either PostSharp or Fody then debugging works immediately again .", "I can t compile my application at all anymore because of Fody .", "Actually looking at Fody it is required .", "The Product class is POCO with fody-INotifyPropertyChanged magic included .", "Now when I try to build my solution I get the following error in the initial project that shouldn t have Fody installed : .. . .. . Fody : You don t seem to have configured any weavers .", "I am willing to check out the source code of Fody and make changes if needed .", "As such Fody injects an internal interface named ProcessedByFody into your assembly .", "Do Fody addins leave any references in final assembly", "Hopefully some Q A on here will get Fody noticed some more .", "I have a C Windows Phone 8 MVVM app with the Fody PropertyChanged package installed .", "I thought the Fody PropertyChanged package was supposed to make implementing property change-notification unnecessary .", "Will the Fody EF naming conflict for IsChanged cause any issues and if it will is there a way to instruct Fody to use a differently named property for the same purpose", "Have a look here http : nuget.org packages q fody for the list of available packages .", "This doesn t specifically address the project you don t want Fody in but sometimes VS gives vague odd errors .", "However when decompiling the TFS-generated binaries I find that they are not weaved : they still have the Fody attributes .", "Maybe it is because the NodeViewModel.Node property is currently not tracked bu Fody", "It works fine in debug mode but fody throws an exception in Release Mode .", "I m writing a sort algorithm visualizer in C WPF using MVVMLight and Fody .", "I have a ProjectModel and a ProjectViewModel class my Model handles direct manipulation of a project while the view model is providing the view friendly properties and commands .. . .. . However in my ViewModel I m exposing the read-only project contract for view binding .. . .. . So here the property Model doesn t change but the property Model.Project will-change and so Model will raise its PropertyChanged event when it does .. . .. . Now I know Fody-PropertyChanged https : github.com Fody PropertyChanged has the ability to detect if a property is dependent on another property in the same class and raise the change event if the other changes .", "So my question is whether I can somehow postpone Fody weaving till after the analysis is finished or if there is some other way to get Fody and FxCop to interact nicely", "So this really should be Several questions .. . .. . Does Fody leave any references in final assembly", "Nor does it require than any files be deployed to be used a runtime .. . .. . Does Fody leave any traces in final assembly", "Please see the following blog http : cam.macfar.net mitigating-the-billion-dollar-mistake-fody-edition .", "If I understood correctly end result doesn t have any references to the Fody .", "EDIT : Considering that your code starts working when you touch the Fody ied object I d start blaming Fody .", "Is there any way to configure fody to not check the value which is set to property - I have situations when value is the same and I want property to be set because I have additional logic in property setter that is not invoked .", "The error after that is the same as the 2nd error : .. . .. . Edit 4 : .. . .. . I really hope the dev of Fody sees this because we re at an absolute standstill until this is fixed .", "I ve got a Windows Phone 8 application using Fody to inject INotifyPropertyChanged into properties .", "This question was also asked here https : github.com Fody PropertyChanged issues 5 and from that issue.. . .. . .. . PropertyChanged.Fody makes the assumption that if you implement INotifyPropertyChanged then you would most likely want to notify for most if not all properties .", "The property access behavior is the same as-if the Fody package wasn t even there .", "I am not familiar with Fody but I suspect it is because there is no setter on Second.B .", "What I m asking for is Fody functionality to avoid creating manual subscribtions in Second .", "That means that in the example I don t see how did you actually define the null guard to be enabled for the first method argument and not to the second .. . .. . Tatu .. . .. . The reply to the above was : .. . .. . @Tatus Yes the final assembly has no references to Fody or any Fody extensions you used .", "Also check what Fody does - maybe it provides a transparent proxy wrapper in some point", "This is a very delayed fix for this issue but Fody needs the debug-information .mdb file associated with the outputted assembly to perform the weaving step .", "FodyWeavers.xml should look like this I had to add PropertyChanged to mine", "It does seem though Fody isn t your magic bullet as it will only inject the code in the owning class .", "I even looked at a diff of the de-compiled source before and after Fody and there are FxCop conflicts in places where methods weren t changed at all .", "Therefore you need to enable Symbols Only or Full when you build projects in release-mode when Fody is integrated into the build-process : .. . .. .", "However if I change the ShowDetailsVideo property at runtime the setters are accessed but not the getters indicating the wiring between the properties and the view element properties isn t working despite my use of the Fody PropetyChanged package .", "I have been using NotifyProperyWeaver and noticed it is deprecated in the latest build to Fody using PropertyChanged.Fody .", "Is there an easy and clean way to achieve such automatical updates using fody or do I have to create my own event to handle it", "Edit : apparently at this point it got tired of spitting out that error so it fabricated a new one .. . .. . Edit 2 : .. . .. . Also the error is allegedly taking place inside Fody.targets on line 50 which is .. . .. . Edit 3 : .. . .. . I deleted all the files associated with Fody and Nuget redownloaded them during the build-process .", "Ok that takes care of propagating the PropertyChanged event .", "Maybe indeed Fody does not provide solution for my problem however it seems that there still can be a simple way around similar to one you provided .", "So if your View Model class descends from a class like BindableBase see below you do not need the Fody PropertyChanged plugin at all but make sure you are calling SetProperty in your property setters instead of doing a direct assignment to the data member backing the property .", "We have been hard core about validating our arguments from the get go and did not have any FxCop analysis errors before Fody but when I added it through NuGet FxCop was seeing changes in places that shouldn t have any weaved code for property changed .", "I have managed to weave the assemblies this way : .. . .. . I have copied the contents of packages Fody.xx into Assemblies Fody .. . .. . I then have modified the .csproj to point to the copied .targets file towards the end of the .csproj : .. . .. . I suspect that the TFS maintainers are downloading the Nuget packages in another folder for instance to have only one copy of all the Nuget packages for all projects which would mean that this kind of package cannot work the regular way .", "I have the following classes using Fody.PropertyChanged weaving : .. . .. . From a class consuming MyClass I do not receive a PropertyChanged event .", "@LarsTech well if I remove the INotifyPropertyChanged inheritance then the consuming class can t subscribe to the PropertyChanged event", "@St cy who which object do you expect to raise PropertyChanged and with what argument Property Name", "Try adding the ListChanged event of the BindingList class to raise the PropertyChanged event : .. . .. . My OtherClass did not have to implement the INotifyPropertyChanged event :", "PropertyChanged should be raised in case another value is assigned to the property in your case another list to the Others property .", "I have several classes with properties that are simply wrapping properties from my generated classes like so : .. . .. . So ProperyChanged.Fody would do it s magic on my Car property and not the others but if I were to edit my Model.tt and add the ImplementPropertyChanged attribute my generated classes would all notify on property change .", "So if you need to know whether collection item change you need to subscribe to both PropertyChanged in case the collection is replaced and Others.CollectionChanged or Others.ListChanged", "could you check the version of Mono.Cecil.dll right-click in explorer and go through the properties you will find the version number .", "Visual studio will typically add the necessary ones back .", "Did you add your final solution in the update", "I define dependent properties like this : .. . .. . However this method does not work with subproperties .", "More of your code may help.. .", "Same problem.. . ended up with the INotifyPropertyChanged interface implementation .", "Create winform project targeting .net 4.5.1 .. . .. . Install-Package PropertyChanged.Fody", "I want to handle changes to the DecimalPlaces -Property of NumericUpDown therefore I have both tried declaring a .. . .. . and also manually subscribing the PropertyChanged - event in the ctor manually .", "Person.Info.Name If I change it in code my binding in XAML gets updated .", "When I debug a project I can no longer properly step through code .", "It looks similar to when you attach a debugger in VS to a process where the source code is different than that of the executing binary .", "A sample code : .. . .. . And the error I see is : .. . .. . Has anyone been able to do this with some workarounds" ] }
{ "confidence": [ 73.94286346435547, 69.51176452636719, 68.28123474121094, 66.05953979492188, 64.01924133300781, 63.74591064453125, 62.68635177612305, 62.484825134277344, 62.355712890625, 62.15875244140625, 60.366493225097656, 58.76040267944336, 56.509422302246094, 56.35296630859375, 56.34290313720703, 55.614418029785156, 55.394554138183594, 53.577945709228516, 52.96303176879883, 51.02876281738281 ], "content": [ "Question : I have a ProjectModel and a ProjectViewModel class my Model handles direct manipulation of a project while the view model is providing the view friendly properties and commands .. . .. . However in my ViewModel I m exposing the read-only project contract for view binding .. . .. . So here the property Model doesn t change but the property Model.Project will-change and so Model will raise its PropertyChanged event when it does .. . .. . Now I know Fody-PropertyChanged https : github.com Fody PropertyChanged has the ability to detect if a property is dependent on another property in the same class and raise the change event if the other changes . I was wondering whether it is possible for Fody-PropertyChanged https : github.com Fody PropertyChanged to raise PropertyChanged Project when the Model object raises its changed notifier . I could do it manually of course but I d prefer to stick with Fody https : github.com Fody Fody . Is this a bad idea Alternatively is this a bad MVVM practice to begin with Comment : what value do you get by wrapping Model Why not just bind directly to Model.Project Comment : bump . any more response to this .. . Answer : No Fody-PropertyChanged does not currently support detecting wrapped properties in the way you describe .", "Question : null .. . Answer : I ve installed Nuget for Xamarin Studio and tried to add Fody PropertyChanged https : github.com Fody PropertyChanged to my iOS solution . However I get the following error : .. . .. . Does somebody know how to get it to cooperate with iOS solutions", "Question : null .. . Answer : I am using the free edition of PostSharp extensively in a project . I would like to use the PropertyChanged.Fody https : github.com Fody PropertyChanged addin to handle all the PropertyChanged Notifications automatically . I know that PostSharp offers a library for this but it is not free thus I would like to use Fody .. . .. . It appears that when I use both PostSharp and Fody https : github.com Fody Fody in a project the debug symbol files goes out of sync with the source code . When I debug a project I can no longer properly step through code . It looks similar to when you attach a debugger in VS to a process where the source code is different than that of the executing binary . If I disable either PostSharp or Fody then debugging works immediately again . Is it possible to use both PostSharp and Fody in the same project Does this require special extra configuration Comment : Debugging with PostSharp should work . They have done a great job fixing this in the past versions . Maybe there are some new issues with that . Stepping into a property that has an aspect applied should take you to the aspect first .", "Question : Are there are any traces of Fody https : github.com Fody Fody wiki or its dependencies references in the final weaved assembly .. . Answer : So this really should be Several questions .. . .. . Does Fody leave any references in final assembly No Fody does not require any references not add any reference during ILWeaving . Nor does it require than any files be deployed to be used a runtime .. . .. . Does Fody leave any traces in final assembly Yes . Due to the nature of MSBuild and Visual studio it is very dificult to tell if an assembly has been changed as part of a build . As such Fody injects an internal interface named ProcessedByFody into your assembly . This allows Fody to avoid double processing of assemblies . https : github.com Fody Fody wiki TaskAddsAFlagInterface .. . .. . Do Fody addins leave any traces in final assembly Well the obvious answer to this one is Yes . All addins modify the target assembly in some way . Do Fody addins leave any references in final assembly This is optional and up to the creator of the addin . While many addins have a dll to reference this is usually just to provide metadata . The addin then removes the reference at compile-time . Meaning that it is not necessary to deploy that reference dll . For example https : github.com Fody PropertyChanged wiki WeavingWithoutAddingAReference .. . .. . However you should check the behavior of the specific addins you are using .", "Question : I am working on an Entity Framework WPF project which has hundreds of tables in the database . Many of the tables include a field named IsChanged . I am using a model base-class and PropertyChanged.Fody to handle the injection of INotifyPropertyChanged for all the models . Will the Fody EF naming conflict for IsChanged cause any issues and if it will is there a way to instruct Fody to use a differently named property for the same purpose Comment : These aren t answers but they are relevant docs : github.com Fody PropertyChanged wiki Options https : github.com Fody PropertyChanged wiki Options github.com Fody PropertyChanged wiki SupportedToolkits https : github.com Fody PropertyChanged wiki SupportedToolkits .. . Answer : To sum up what I had hoped to do was find some option that would tell Fody.PropertyChanged to use a field other than IsChanged for the same purpose . For instance to use a field named IsDataChanged rather than IsChanged . This was because the database administrator had designed the entire database so that each table has a field named IsChanged that he wanted to use for his own purposes which are different than what is needed in the application . To skirt the issue the database administrator renamed his fields to IsDataChanged . By doing this he has a field to use as he needs which will not be automatically maintained by either Entity Framework or Fody.PropertyChanged .", "Question : I ve got a WPF application using Caliburn.Micro . I want to be able to overlay the application with a shadow and progress ring from MahApps.Metro http : mahapps.com MahApps.Metro when I want the application to wait for some work to be done in the background . What I have at the moment actually works but the overlay is always-on at design-time . My ShellView window looks like this : .. . .. . My ShellViewModel class has a public bool property IsWaiting and when I set it to true the shadow and ring comes up and everything is disabled . When I set it to false it goes back to normal so the binding works I m using Fody https : github.com Fody Fody with the PropertyChanged addin . The only problem is that the Visibility property isn t collapsed at design-time . Is there a better way to have an overlay that works at design-time Comment : does ShellViewModel implement INotifyPropertyChanged Comment : Yes I m using Fody with PropertyChanged Comment : So you just want to set a value at design-time Comment : Yes the current Visibility binding doesn t default back to Collapsed like I thought it would .. . Answer : You can set a FallbackValue on your binding that will Collapse it in design-time .. . .. . You could also make IsWaiting a DependancyProperty and set the default there But I find this the easiest solution . Comment : Mate Legend Thanks : -", "Question : I ve got a Windows Phone 8 application using Fody to inject INotifyPropertyChanged into properties . I have Class First with property A which is binded to textbox in View : .. . .. . And class Second with property B depending on property A also binded to textbox : .. . .. . Updating A and AA works fine however B doesn t update automatically when first.A changes . Is there an easy and clean way to achieve such automatical updates using fody or do I have to create my own event to handle it .. . Answer : I am not familiar with Fody but I suspect it is because there is no setter on Second.B . Second should subscribe to changes in First and if First.A is the property being changed then that should use the private setter of B . .. . .. . Alternatively subscribe to First and then invoke B property changed event : Comment : Setter is not requiered to update the view . I added property AA in First which will update just fine when A changes . What I m asking for is Fody functionality to avoid creating manual subscribtions in Second . Comment : Actually looking at Fody it is required . In the case of being inside the owning class it is just automatically injected into the code : github.com Fody PropertyChanged https : github.com Fody PropertyChanged Comment : I ve seen that earlier however that doesn t solve my problem . Of course i could add an event and handle it in Second by setting B with a private setter to force an update but unfortunetelly that solution is not scaleable . Comment : It does seem though Fody isn t your magic bullet as it will only inject the code in the owning class . Have you looked into ReactiveUI It might offer something more elegant but still somewhat manual . Comment : According to your edit : it is not possible to use OnPropertyChanged event in class with ImplementPropertyChanged attribute . Maybe indeed Fody does not provide solution for my problem however it seems that there still can be a simple way around similar to one you provided .", "Question : I m working on a WPF project . To prevent a lot of boiler code I m using Fody PropertyChanged . This is a snippet of my problem : .. . .. . When I call SavePerson in MyViewModel It won t trigger the HasCardSet property . I ve added the PropertyChangedNotificationInterceptor and see that property Card changes on target People . But my breakpoint in HasCardSet does not trigger . Comment : how would binding now that HasCardSet has changed if it s not a part of a Person Comment : Well my Person has another property Info class and that has a string property Name . Person.Info.Name If I change it in code my binding in XAML gets updated . So why does that work and this doesn t Comment : @OP : It depends a lot on the way you update the property do you set the Person s Info property or just the Name of this property and the binding itself . More of your code may help.. . .. . Answer : IMO your HasCardSet property has to be declared in the Person class . Then as suggested in the documentation https : github.com Fody PropertyChanged wiki On PropertyName Changed add this method : .. . .. . This will trigger the expected PropertyChanged event . Note that your Binding should have your Person object as DataContext not directly your VM . Comment : Moved HasCardSet to Person and updated XAML to listen to Person.HasCardSet . This worked Didn t use the OnCardChanged .", "Question : I have the following classes using Fody.PropertyChanged weaving : .. . .. . From a class consuming MyClass I do not receive a PropertyChanged event . What is wrong here Comment : Not familiar with Fody but from this example https : github.com Fody PropertyChanged it looks like Fody takes care of the INotifyPropertyChanged for you try removing the INotifyPropertyChanged inheritance and the event call . Just a guess . Comment : @LarsTech well if I remove the INotifyPropertyChanged inheritance then the consuming class can t subscribe to the PropertyChanged event Comment : I m assuming you are having issues with the Others property and not the SomeText property Comment : @LarsTech exactly Comment : @St cy who which object do you expect to raise PropertyChanged and with what argument Property Name .. . Answer : Try adding the ListChanged event of the BindingList class to raise the PropertyChanged event : .. . .. . My OtherClass did not have to implement the INotifyPropertyChanged event : Comment : Ok that takes care of propagating the PropertyChanged event . This would be nice if Fody would handle this case automatically . I still need OtherClass to implement INotifyPropertyChanged since I want other classes to subscribe to the event . Comment : @St cy PropertyChanged.Fody is not going to implement this because basically it s wrong . PropertyChanged should be raised in case another value is assigned to the property in your case another list to the Others property . The collection itself should raise events in case the elements of the collection change . So if you need to know whether collection item change you need to subscribe to both PropertyChanged in case the collection is replaced and Others.CollectionChanged or Others.ListChanged Comment : @BatteryBackupUnit I understand your point . Thanks for clarifying .", "Question : I intended to use Fody.PropertyChanged in one of my projects and it was properly added via NuGet : .. . .. . I realized it was in the wrong project so I used the uninstall command : .. . .. . After that I added it to the proper project . Now when I try to build my solution I get the following error in the initial project that shouldn t have Fody installed : .. . .. . Fody : You don t seem to have configured any weavers . Try adding a Fody nuget-package to your project . Have a look here http : nuget.org packages q fody for the list of available packages . There is no reference to Fody in the project I deleted the Fody reference from the packages.config file and there is no XML file . What else should I do .. . Answer : This doesn t specifically address the project you don t want Fody in but sometimes VS gives vague odd errors . I just went through a similar issue after installing PropertyChanged.Fody for the first time and couldn t build as soon as I included and referenced it.. . I wonder if any of these details from my experience might help making sure these points exist in the project you want the lib in . 1 . Make sure you have the following references in your packages.config from when you ran Install-Package PropertyChanged.Fody : .. . 2 . Make sure there is FodyWeavers.xml in the top level of the project you want to use it in . 3 . FodyWeavers.xml should look like this I had to add PropertyChanged to mine", "Question : I ve got a WPF application using Caliburn.Micro . I want to be able to overlay the application with a shadow and progress ring from MahApps.Metro http : mahapps.com MahApps.Metro when I want the application to wait for some work to be done in the background . What I have at the moment actually works but the overlay is always-on at design-time . My ShellView window looks like this : .. . .. . My ShellViewModel class has a public bool property IsWaiting and when I set it to true the shadow and ring comes up and everything is disabled . When I set it to false it goes back to normal so the binding works I m using Fody https : github.com Fody Fody with the PropertyChanged addin . The only problem is that the Visibility property isn t collapsed at design-time . Is there a better way to have an overlay that works at design-time Comment : does ShellViewModel implement INotifyPropertyChanged Comment : Yes I m using Fody with PropertyChanged Comment : So you just want to set a value at design-time Comment : Yes the current Visibility binding doesn t default back to Collapsed like I thought it would .. . Answer : FallbackValue doesn t always work i.e . if your designer is actually bound to design-time data and FallbackValue actually modifies run-time behaviour of the binding which may be less than desirable in many situations . I made a markup extension that lets designers fiddle with the UI in the designer without worrying about messing up run-time behaviour . I wrote about it here : http : www.singulink.com CodeIndex post wpf-visibility-binding-with-design-time-control .. . .. . It can be used like this : .. . .. . The code for ValueExtension is as follows :", "Question : I am currently working on a project where we would like to use the Fody PropertyChanged https : github.com Fody PropertyChanged IL weaver . It appears to work fantastically but it is doing strange things to our FxCop http : msdn.microsoft.com en-us library bb429476 28v vs.80 29.aspx analysis built into visual-studio . We have CA1062 http : msdn.microsoft.com en-us library ms182182.aspx and CA2214 http : msdn.microsoft.com en-us library ms182331.aspx enabled : The former validates arguments of public methods and the latter checks for calls to overridable methods in constructors . The second one we have figured out is due to the fact that we are also using Caliburn.Micro which supplies a method called NotifyOfPropertyChanged which is virtual . This is a simple fix of changing the method to not be virtual . The first issue is much harder and seemingly random . We have been hard core about validating our arguments from the get go and did not have any FxCop analysis errors before Fody but when I added it through NuGet FxCop was seeing changes in places that shouldn t have any weaved code for property changed . I even looked at a diff of the de-compiled source before and after Fody and there are FxCop conflicts in places where methods weren t changed at all . So my question is whether I can somehow postpone Fody weaving till after the analysis is finished or if there is some other way to get Fody and FxCop to interact nicely Thanks in advance Comment : I cannot reproduce the problem . Could you please provide an example of a class for which CA1062 is apparently mis-firing .. . Answer : Example : .. . .. . It could be solved by changing the auto implemented property to use a backing field . Only the ones that are set while constructing the object .", "Question : I intended to use Fody.PropertyChanged in one of my projects and it was properly added via NuGet : .. . .. . I realized it was in the wrong project so I used the uninstall command : .. . .. . After that I added it to the proper project . Now when I try to build my solution I get the following error in the initial project that shouldn t have Fody installed : .. . .. . Fody : You don t seem to have configured any weavers . Try adding a Fody nuget-package to your project . Have a look here http : nuget.org packages q fody for the list of available packages . There is no reference to Fody in the project I deleted the Fody reference from the packages.config file and there is no XML file . What else should I do .. . Answer : I guess you ve recently updated the Fody library When it asked to replace the existing FodyWeavers.xml you might have permitted it to do so . If you have a backup of the project get the FodyWeavers.xml from that and replace it with the new one . Clean and Rebuild the solution . Comment : I did not update it . The Fody library should not be there at all . Seemingly it is not there but the project contains some hidden reference to it . Comment : Are you using the PropertyChanged.Fody library Comment : Read the initial post . In one of the projects I use in the other I don t want to yet it complains about it .", "Question : I intended to use Fody.PropertyChanged in one of my projects and it was properly added via NuGet : .. . .. . I realized it was in the wrong project so I used the uninstall command : .. . .. . After that I added it to the proper project . Now when I try to build my solution I get the following error in the initial project that shouldn t have Fody installed : .. . .. . Fody : You don t seem to have configured any weavers . Try adding a Fody nuget-package to your project . Have a look here http : nuget.org packages q fody for the list of available packages . There is no reference to Fody in the project I deleted the Fody reference from the packages.config file and there is no XML file . What else should I do .. . Answer : You need to also", "Question : I have been using NotifyProperyWeaver and noticed it is deprecated in the latest build to Fody using PropertyChanged.Fody . I had NotifyProperyWeaver to only weave the properties i had attributes on and all other notifying was disabled . Is there a way to configure PropertyChanged.Fody such that only attributed properties get weaved and not the reverse . I don t see any info in the documentation page on it is there a hidden property in the FodyWeavers.xml .. . Answer : This question was also asked here https : github.com Fody PropertyChanged issues 5 and from that issue.. . .. . .. . PropertyChanged.Fody makes the assumption that if you implement INotifyPropertyChanged then you would most likely want to notify for most if not all properties . If you wish to exclude them which should be the exception not the rule then you can add a DoNotNotifyAttribute to a class or a property . see here for more details https : github.com Fody PropertyChanged wiki Attributes Comment : That s a really bad assumption Comment : @EugeneStrizhok why where is no perf overhead Comment : Well . I may have overreacted . : But I see a rather frequent case-when automatic notification is introduced to an existing project and one may not wish to go through all types implementing INotifyPropertyChange in order to adapt them . In this case it will be desirable to be to set Fody.PropertyChanged behavior in a such way that it will only weave explicitly marked classes . Comment : As far I as remember NotifyPropertyWeaver had such an option . Comment : @EugeneStrizhok correct NotifyPropertyWeaver had such an option . but that that a legacy option due to the evolution of NPW . it was never a conscience design decision . so in the reboot with PropertyChanged.Fody it was removed . And the amount of code to support that feature was non-trivial so it was removed .", "Question : I have a C Windows Phone 8 MVVM app with the Fody PropertyChanged package installed . I have added the ImplementPropertyChanged directive before the class declaration : .. . .. . I have the following two properties in the class that I bind View elements to : .. . .. . One View element s Visibility property is bound to the View Model s ShowDetailsVideo property . Another View element s Visibility property is bound to the View Model s ShowMainScreen property . At runtime both property getters are accessed indicating that the pair of bound View elements are accessing the properties at least once . Also the two View elements do have the proper Visibility states . However if I change the ShowDetailsVideo property at runtime the setters are accessed but not the getters indicating the wiring between the properties and the view element properties isn t working despite my use of the Fody PropetyChanged package . The property access behavior is the same as-if the Fody package wasn t even there . How can I fix this and get it working so the view elements pair of Visibility properties are updated properly at runtime I thought the Fody PropertyChanged package was supposed to make implementing property change-notification unnecessary . Comment : I always used an Converter when dealing with Visibility have you tried that Comment : @Tico Were you binding to a bool property That s typically when someone uses a converter with Visibility properties . If you look at my code I m binding to properties that already are of type Visibility so no converter should be needed . Comment : Yes Robert my first converter was the classic bool example . But you can achieve what you want with Converter . In one case I used one to set the width of a textbox based on the amount of characters typed . What I m saying is give it a try . Comment : @Tico Are you saying that I should implement a Converter that converts a Visibility to a Visibility That s a non-operation . Comment : On second thoughts you re right . Sorry to waste your time . .. . Answer : I am adding this answer because this problem cost me several hours to hunt down and fix . I am marking the answer as community wiki because I am not seeking credit for it only to save someone else the trouble I went through diagnosing it . Below is the corrected View Model code to make the property changed notifications work properly . The View was not updating when bindable properties in the View Model were changed because I was not calling the base SetProperty method in the property setter instead I was only doing a direct assignment so a property changed notification was not triggered . You can see this in the property setter in my original post . Simply adding the SetProperty call fixed everything . So if your View Model class descends from a class like BindableBase see below you do not need the Fody PropertyChanged plugin at all but make sure you are calling SetProperty in your property setters instead of doing a direct assignment to the data member backing the property . Updated property setters getters .. . .. . BindableBase class that my View Model descends from", "Question : Are there are any traces of Fody https : github.com Fody Fody wiki or its dependencies references in the final weaved assembly .. . Answer : Please see the following blog http : cam.macfar.net mitigating-the-billion-dollar-mistake-fody-edition . If I understood correctly end result doesn t have any references to the Fody . That means that in the example I don t see how did you actually define the null guard to be enabled for the first method argument and not to the second .. . .. . Tatu .. . .. . The reply to the above was : .. . .. . @Tatus Yes the final assembly has no references to Fody or any Fody extensions you used . Comment : Thanks I assumed so . Hopefully some Q A on here will get Fody noticed some more . : Comment : @MeirionHughes Yeah I didn t even know of it until I saw this . I only knew of PostSharp this seems superior on so many levels after some research .", "Question : null .. . Answer : I use the awesome weaver PropertyChanged.Fody https : github.com Fody PropertyChanged for avoiding INotifyPropertyChanged boilerplate . I define dependent properties like this : .. . .. . However this method does not work with subproperties . What I want to achieve is something like this : .. . .. . When MyChild.FirstName changes I want ChildName to notify that it is also changed . Is is possible to achieve this without explicitly subscribing to MyChild.PropertyChanged and manually calling RaisePropertyChanged ChildName Comment : As far as I can tell this problem falls outside the realm of what PropertyChanged.Fody can solve . I ve started looking at functional reactive-programming via Reactive Extensions seems promising so far . Comment : Bello I m in the same situation.. . Have you got far on this Comment : @advapi I found the easiest way was to use some kind of subscription like MvvmCross WeakSubscribe : github.com MvvmCross MvvmCross tree 3.5 CrossCore https : github.com MvvmCross MvvmCross tree 3.5 CrossCore Cirrious.CrossCore WeakSubscription", "Question : Today I read about new plugin on net which Fody.PropertyChanged which is very simple and easy to use . Currently I am using MVVMCross where we have to call RaisePropertyChange Property again and again . Is it safe to use Fody.PropertyChanged with MVVMCross . Any One have experience of that I also watch this example of using MVVMCross and Foody.RaisePropertyChange .. . .. . https : github.com slodge BindingTalk blob master BindingTalk.Droid ViewModels FodySimpleViewModel.cs .. . .. . Or Is there any solution in MVVMCross from which we get rid from using RaisPropertyChange again and again .. . .. . Thanks .. . .. . Best Regard .. . Answer : As @devuxer said Fody.PropertyChanged won t slow down performance . It won t cause any more processing than the RaisePropertyChanged .. . because that s exactly what you get when compiling the app nothing else . You can see exactly how it works in the readme file https : github.com Fody PropertyChanged .. . .. . I use Fody everywhere in my MvvmCross apps . Models view models etc .. . .. . Note : If you add method binding https : github.com MvvmCross MvvmCross wiki Databinding rio to the mix you will get rid of tons of boilerplate code . I don t use a single Command in the whole app", "Question : null .. . Answer : Is there any way to configure fody to not check the value which is set to property - I have situations when value is the same and I want property to be set because I have additional logic in property setter that is not invoked . Comment : Same problem.. . ended up with the INotifyPropertyChanged interface implementation ." ] }
[ "yes-answer-long", "yes-answer-short" ]
inotifypropertychanged
UNK_RELATION
qqmlcomponent@modeling@84
qqmlcomponent -- in the qt framework the qqmlcomponent class encapsulates a qml qt @placeholder language component definition .
{ "confidence": [ 46.750755310058594, 46.29407501220703, 43.31673049926758, 41.63536071777344, 37.904052734375, 36.877410888671875, 36.877410888671875, 35.692806243896484, 35.692806243896484, 35.15142059326172, 35.11042022705078, 34.632568359375, 34.17235565185547, 33.360755920410156, 33.0942497253418, 32.34870910644531, 31.628679275512695, 31.628679275512695, 31.33153533935547, 30.97517204284668, 30.726945877075195, 30.444072723388672, 30.444072723388672, 30.140125274658203, 29.401926040649414, 29.065231323242188, 29.065231323242188, 28.99270248413086, 28.82501220703125, 28.772579193115234, 28.61481475830078, 28.611286163330078, 28.206653594970703, 28.02625846862793, 27.65386199951172, 27.363739013671875, 27.02187728881836, 26.548694610595703, 26.194074630737305, 26.162837982177734, 26.162837982177734, 26.06222152709961, 25.00946807861328, 24.97823143005371, 24.97823143005371, 24.97823143005371, 24.95025062561035, 24.758949279785156, 24.600549697875977, 24.281578063964844, 24.230995178222656, 24.211605072021484, 24.038402557373047, 23.992549896240234, 23.992549896240234, 23.765644073486328, 23.65282440185547, 23.65282440185547, 23.55844497680664, 23.5460205078125, 23.165645599365234, 23.138164520263672, 23.076868057250977, 22.468215942382812, 22.468215942382812, 22.468215942382812, 22.361412048339844, 22.283300399780273, 22.046533584594727, 21.95355796813965, 21.95355796813965, 21.441484451293945, 21.441484451293945, 21.441484451293945, 21.37999725341797, 21.37999725341797, 21.37999725341797, 21.37999725341797, 21.37999725341797, 21.37999725341797, 20.93203353881836, 20.93203353881836, 20.861927032470703, 20.72085952758789, 20.68463897705078, 20.30284881591797, 20.195390701293945, 20.195390701293945, 20.195390701293945, 20.195390701293945, 20.195390701293945, 20.195390701293945, 20.195390701293945, 19.955142974853516, 19.955142974853516, 19.70151710510254, 19.70151710510254, 19.70151710510254, 19.70151710510254, 19.70151710510254 ], "content": [ "This class combines a QQmlEngine and QQmlComponent to provide a convenient way to load a single QML file .", "I am creating a custom browser on Android using Qt Webview QML component of QT5.5 framework http : doc.qt.io qt-5 qml-qtwebview-webview.html .", "So far I managed to load my additional qml file into QQmlComponent : .. . .. . How do I display it in a separate window", "Here http : doc.qt.io qt-4.8 qmlreusablecomponents.html we have more information related to this question .. . .. . A component is an instantiable QML definition typically contained in a .qml file .", "So I use the following to create an object : .. . .. . But I get the error : .. . .. . QQmlComponent : Component is not ready .. . .. . I have also tried without luck foo bar.qml .", "Such a component is available as a property usually called contentItem http : doc.qt.io qt-5 qml-qtquick-controls-groupbox.html contentItem-prop .", "My qml component is working fine when in the Qt creator so why does it fail in deployment", "A component defined inline does not work after explicitly loaded by a loader http : doc.qt.io qt-5 qml-qtquick-loader.html .", "So How can I get access of QML component reference in C++ Qt backend", "It happens for Window http : doc.qt.io qt-5 qml-qtquick-window-window.html contentItem-attached-prop ScrollView http : doc.qt.io qt-5 qml-qtquick-controls-scrollview.html contentItem-prop Flickable http : doc.qt.io qt-5 qml-qtquick-flickable.html contentItem-prop and even GroupBox .", "I can t reference it like this : .. . .. . This is because itemDelegate is a Component : .. . .. . http : qt-project.org doc qt-5 qml-qtquick-controls-tableview.html itemDelegate-prop .. . .. . So QML can convert an Item to Component when it s embedded but not when it s referenced .", "For real QML debugging google Debugging Qt Quick Projects", "The currentIndex property is a property of the ListView item type http : doc.qt.io qt-5 qml-qtquick-listview.html currentIndex-prop not the attached property object http : doc.qt.io qt-5 qml-qtquick-listview.html properties .", "Change your class name in QML the class name is the name of the QML definition file .", "The component encapsulates the QML types within as-if they were defined in a separate QML file and is not loaded until requested in this case by the two Loader objects .", "As far as I know and according http : doc.qt.io qt-5 qml-qtqml-component.html details to the documentation .. . .. . The Component type essentially allows QML components to be defined inline within a QML document rather than as a separate QML file .", "What about Window.visible http : doc.qt.io qt-5 qml-qtquick-window-window.html visible-prop", "Qt.createComponent http : doc.qt.io qt-5 qml-qtqml-qt.html createComponent-method takes a url as its first argument .", "This command has automatically copied the compiled component files to QT import folder .", "Take a look at Dynamic QML Object Creation from JavaScript http : qt-project.org doc qt-5 qtqml-javascript-dynamicobjectcreation.html for a complete example and more detail .", "I m getting a linker-error that a whole host of symbols including QQmlEngine and QQmlComponent constructors are undefined from the main.cpp : .. . .. . I ve run qmake -project and rebuilt all .", "Here http : doc.qt.io qt-5 qml-qtquick-listview.html positionViewAtIndex-method the documentation of the method .", "I m new to Qt and didn t know if the way of launching the qml file might affect it in some way I don t understand .", "A Component is both a concept and a thing in QML .", "http : qt-project.org or relative e.g .", "From the url documentation http : doc.qt.io qt-5 qml-url.html : .. . .. . The url type refers to a resource locator like a file name for example .", "Now it becomes more useful item in all platforms but due some reasons in Windows we are not using QML it s pure QT Application .", "In the 4.8 docs http : qt-project.org doc qt-4.8 qdeclarativedynamicobjects.html creating-a-component-dynamically it is specified that : .. . .. . When using files with relative paths the path should be relative to the file whereQt.createComponent is executed .", "This is written in the documentation http : doc.qt.io qt-5 qml-qtqml-component.html details : .. . .. . Notice that while a Rectangle by itself would be automatically rendered and displayed this is not the case for the above rectangle because it is defined inside a Component .", "Another way to define a component is to use Component in a qml file .", "What is the difference between Component and Item in QML", "Hi Everyone i am new to QT and i am having trouble loading one qml through another qml Basically i have created a qml MyTabView MyTabView.qml .. . .. . and i am trying to show it through another qml main.qml which is in the same directory .. . .. . but when i try to run my project i get this error .. . .. . QQmlApplicationEngine failed to load component qrc : qml main.qml : 11 TabView is not a type .. . .. . Please note that i have M Caps in MyTabView.qml and that MyTabView.qml and main.qml are in the same directory .", "Why is a TextArea with .. . .. . always causing .. . .. . file : C : Qt 5.5 mingw492 32 qml QtQuick Controls ScrollView.qml : 340 : 13 : QML Item : Possible anchor loop detected on fill .", "I m using Qt 5.5 to create a small app .", "My root QML document now looks like this : .. . .. . Where MainWindow is a QML component with root element ApplicationWindow and AuxiliaryWindow is a component with root element Window .", "Changing to foobar.qml works fine with the directory structure : .. . .. . I notice however that there is no mention of relative URLs in the version 5 docs http : qt-project.org doc qt-5 qml-qtqml-component.html createObject-method so is there a new way to do this that I m missing", "I found the alternative components in QT5 : .. . .. . according to this wiki http : qt-project.org wiki QtDesktopComponents Qt Quick Controls replaced the former one Qt Desktop Components .", "I can t access to delegated QML Component in Repeater from C++ .", "Use attached property ListView.view http : doc.qt.io qt-5 qml-qtquick-listview.html view-attached-prop : .. . .. . This attached property holds the view that manages this delegate instance .. . .. . Small example :", "I must be I m using Qt Creator with the incomplete project structure as in OP .", "tickmarksEnabled : true plays a major role here which is not mentioned anywhere in qt docs .", "I need to hide The QML Window when opening the another QML Window while clicking the button I use Loader to open the another QML Window and its only hide the QML form components not QML Window but I currently use window component to opens the QML Window .. . .. . Here is my code : .. . .. . The above code only navigates the QML Window while the Button is clicked whereas I need to Hide the QML Window .", "However you can still emit it using the Qt meta system just use : .. . .. . It will work even if the signal is implemented on the QML side it will work even without casting to the concrete C++ type .", "Ran the command : qmake nmake install in qt-components-desktop components folder .", "Ran the command : qmake nmake install in qt-components-desktop src folder .", "I think it s a bug from Qt you can ignore it .", "I have a QML ListView where the delegate loads it s component from another file .", "Here is described how : http : doc.qt.io qt-5 qtqml-cppintegration-interactqmlfromcpp.html .. . .. . For example you could implement a findChild in qml like this : .. . .. . This qml function you can invoke from C++ like .. . .. . With the following additional lines-of-code : .. . .. . you get the following output :", "You can do that in a similar way as Qt Quick Controls does it http : code.qt.io cgit qt qtquickcontrols.git tree src controls Styles Base SliderStyle.qml n207 : .. . .. . Then listDelegate would become : .. . .. . Here s the correct code I simplified some of it :", "You can define a component in multiple ways but one easy way is to create a .qml file and name it as you name your component .", "Then instanciate the CustomItem from qml .", "In the app I m manually creating a component like so : .. . .. . My .qrc file IS included in the .pro file like so : .. . .. . All works well when I run from Qt creator .", "I advice you to look at QML controls styles source in QTHOME qml QtQuick Controls Styles Base to have an understanding of default styles of QML controls .", "Following are the steps I have followed based on these instructions http : stackoverflow.com questions 6298584 installing-qt-quick-components-for-desktop-for-use-with-qt-creator 9464679 9464679 : .. . .. . 1 .", "Added to PATH variable value in the environment-variables OS : Windows 8 C : Qt Qt5.3.1 5.3 msvc2012 opengl bin C : Qt Qt5.3.1 Tools QtCreator bin .. . .. . 3 .", "Or more precisely you could say your custom component is based on an Item if your .qml has Item as a root type .", "The editor of Qt Creator does not need this inclusion in order to find your type therefore it displays no error .", "But I am not able to instantiate custom QQuickItem in Qt could some one help me out of this", "I am a new user in QT Quick please help me .", "There is nothing similar between qml and xml .", "My complete model and delegate in single qml file only .", "You have to put your QML file in the Resources probably main.qrc qml in order to have it deployed .", "To fix them both first change this : .. . .. . to this : .. . .. . And then give your delegate an id : .. . .. . This is demonstrated in part by the Example Usage http : doc.qt.io qt-5 qml-qtquick-listview.html example-usage section of the documentation : .. . .. . ListView attaches a number of properties to the root item of the delegate for example ListView : isCurrentItem .", "I have some installation issues with the Qt Quick Components for Desktop using QT5 .", "Downloaded the tar.gz from http : qt.gitorious.org qt-components desktop trees master and unpacked the components .", "I am running Qt 5.5 on a 64-bit Windows 7 machine and compiling with MinGW .", "I have a qml file with Rectangle .", "I d like to move the component definition to a different file and provide the string currently defined by IMGDIR as a property .", "I just want to find a QML file and load it dynamically when the application executes so that the application can load different QML according to user operations .", "In my limited understanding on the QML side there is another tree containing all visible qml items components .", "So I assume the second solution will work if I use Window or ApplicationWindow QML type as a root element of my QML .", "As in QML concept all reusable thing is called components .", "Suppose I have a number of QML components .", "Now I understand that QML rules it all .", ": Unfortunately I gave up QML and switched to C++ again .", "QML applications usually need C++ to do complex tasks .", "I came across a weird problem when designing my application in QML .", "It will be better just add the QML file into resources and use qrc : protocol in URL .", "I have implemented custom QQuickItem which is exposed to QML .", "You need to pass -qmldir path to your qml files to macdeployqt .", "I googled a lot but I couldn t find how can I download this plugin for QT5 as in http : qt.gitorious.org qt-components desktop trees master for QT4 .", "We have an existing QT project written in C++ and we want to add something like the mapViewer example project to our existing UI .", "In this question you may even remove your main.c because it does nothing but loads your QML and the question is about qml -behaviour .", "parent refers to some container : .. . .. . qml : parentQQuickItem QML 15 0x3ad3590 container recGroupBox QMLTYPE 12 0x3ad2790 .. . .. . When the MouseArea in the Rectangle Rectangle is its parent : .. . .. . qml : parentQQuickRectangle 0x39d0cd0 recQQuickRectangle 0x39d0cd0", "because I am able to see the delegate component .", "The Component is not ready error means that you re calling createObject before the component is ready .", "I have a problem with adding new QML object to existing scene .", "Also your question requires an answer about QML but not c++ .", "An Item is a visual thing defined in QtQuick module which is usable in QML .", "When QML engine load that file you can use that as buttons or switches .", "These you can access at least through the children -property from within qml .", "QML files part of your projects will just work no imports are needed .", "In qml file I called value to read settings values .", "Below is the declaration of the component .", "Use Item instead of Component .", "Here s the QML : .. . .. . interestingly enough if I remove the anchors.centerIn : parent on the root Rectangle it works fine but doesn t center the content .", "It is common behaviour in most QML controls and windows that an inner item takes up all the children of the control itself .", "I was under the impression that OP wanted the end user to be able to choose a QML file.. . guess I misread .", "I guess the most common would be to creat a .qml file and set it as source to you quickview .", "I wasn t aware you need to pass -qmldir path to qml files to the macdeployqt tool ." ] }
{ "confidence": [ 67.62791442871094, 59.09920883178711, 56.643089294433594, 53.518707275390625, 52.107975006103516, 51.9942741394043, 48.16835403442383, 47.58133316040039, 47.48451232910156, 47.38172912597656, 46.281009674072266, 44.984737396240234, 44.655540466308594, 44.564239501953125, 44.27983093261719, 44.124290466308594, 43.32450866699219, 43.007389068603516, 42.843265533447266, 42.146602630615234 ], "content": [ "Question : In the 4.8 docs http : qt-project.org doc qt-4.8 qdeclarativedynamicobjects.html creating-a-component-dynamically it is specified that : .. . .. . When using files with relative paths the path should be relative to the file whereQt.createComponent is executed . So I use the following to create an object : .. . .. . But I get the error : .. . .. . QQmlComponent : Component is not ready .. . .. . I have also tried without luck foo bar.qml . Changing to foobar.qml works fine with the directory structure : .. . .. . I notice however that there is no mention of relative URLs in the version 5 docs http : qt-project.org doc qt-5 qml-qtqml-component.html createObject-method so is there a new way to do this that I m missing Comment : Try to output Component : : errorString for more diagnostics Comment : And don t they accept url in file : .. . format .. . Answer : I doubt this is directly related to relative paths . The Component is not ready error means that you re calling createObject before the component is ready . Instead you need to listen for the component s statusChanged signal and create the object only when the status changed to Component.Ready . Take a look at Dynamic QML Object Creation from JavaScript http : qt-project.org doc qt-5 qtqml-javascript-dynamicobjectcreation.html for a complete example and more detail . Comment : I also receive that error when I attempt to create from a nonexistent file though hence my assumption . Comment : @OllieFord If that s the case I d double check to make sure you re running the executable from the same path that the QML files are located in . Comment : I must be I m using Qt Creator with the incomplete project structure as in OP . Opening from project root works fine but from subdirectories does not . Comment : Also I can verify that it never becomes ready by doing while cmpnt Component.Ready cmpnt.createObject this which just hangs .", "Question : In my application I want to create another window with QML UI from C++ code . I know it s possible to create another window using QML Window type but I need the same thing from C++ code . So far I managed to load my additional qml file into QQmlComponent : .. . .. . How do I display it in a separate window .. . Answer : For anyone curious I ended up solving the problem with slightly different approach . My root QML document now looks like this : .. . .. . Where MainWindow is a QML component with root element ApplicationWindow and AuxiliaryWindow is a component with root element Window . Works just fine and you don t have to worry about loading two separate QML files . Comment : Very good : Nice solution Happy coding Alex", "Question : In my application I want to create another window with QML UI from C++ code . I know it s possible to create another window using QML Window type but I need the same thing from C++ code . So far I managed to load my additional qml file into QQmlComponent : .. . .. . How do I display it in a separate window .. . Answer : You can try to create new QQmlEngine", "Question : null .. . Answer : I am creating a custom browser on Android using Qt Webview QML component of QT5.5 framework http : doc.qt.io qt-5 qml-qtwebview-webview.html . I can successfully load the webpages . However I wanted to know if there is a way to show the popup windows that will be launched when any links on the webpage is clicked . Comment : I would try QDialog class", "Question : I have a delegate for a language-selection list . Each item in the list contains an icon and text . I d like to move the component definition to a different file and provide the string currently defined by IMGDIR as a property . Simply moving the entire text below to a separate LandDelegate.qml file and including it as : .. . .. . doesn t work . Below is the declaration of the component . Comment : doesn t work Comment : @Mitch no doesn t work . Thank you for your contribution anyway : - .. . Answer : As far as I know and according http : doc.qt.io qt-5 qml-qtqml-component.html details to the documentation .. . .. . The Component type essentially allows QML components to be defined inline within a QML document rather than as a separate QML file . Here http : doc.qt.io qt-4.8 qmlreusablecomponents.html we have more information related to this question .. . .. . A component is an instantiable QML definition typically contained in a .qml file . For instance a Button component may be defined in Button.qml . So in your case your LangDelegate.qml file doesn t need the root Component element . Use Item instead of Component . Example : .. . .. . LangDelegate.qml .. . .. . main.qml Comment : The extra langDlg item can be left out . : Comment : @jpnurmi You re right : Code updated . Thanks Comment : Thank you very much for the explanation . Seems to be easy indeed . P.S . : Unfortunately I gave up QML and switched to C++ again . Anyway any not trivial Quick application requires C++ to be touched . In my case I failed on models and filters Comment : @ValentinHeinitz I agree with you . QML applications usually need C++ to do complex tasks . Thanks to you anyway Happy coding :", "Question : In my application I want to create another window with QML UI from C++ code . I know it s possible to create another window using QML Window type but I need the same thing from C++ code . So far I managed to load my additional qml file into QQmlComponent : .. . .. . How do I display it in a separate window .. . Answer : You can achieve that using a single QQmlEngine . Following your code you could do something like this : .. . .. . I prefer QQmlApplicationEngine though . This class combines a QQmlEngine and QQmlComponent to provide a convenient way to load a single QML file . So you would have fewer lines of codes if you have the opportunity of using QQmlApplicationEngine . Example : .. . .. . We could also use QQuickView . QQuickView only supports loading of root objects that derive from QQuickItem so in this case our qml files couldn t start with the QML types ApplicationWindow or Window like in the examples above . So in this case our main could be something like this : Comment : Thanks for your answer . So I assume the second solution will work if I use Window or ApplicationWindow QML type as a root element of my QML . Am I correct I guess this is the thing I haven t realized - I thought I should create window from C++ somehow . Now I understand that QML rules it all . Comment : You re right : QQmlApplicationEngine does not automatically create a root window . After reading your message I think it s a good idea to update my answer with another option : using QQuickView . In this case as you know QQuickView only supports loading of root objects that derive from QQuickItem . Comment : For some reason your solution with one QQmlApplicationEngine and two loaded files didn t work for me the second window just refused to show up . Maybe it was some bug in my code . Anyway I ve found a better way to solve this problem in my case posted it as another answer . Thank you for your help anyway Comment : I am sorry to hear that : In case you want to see the code working or just to play with it I ve uploaded the code to GitHub . Anyway I saw your new answer and it s great :", "Question : What is the difference between Component and Item in QML The documentation is not absolutely clear here . What is the preferred type to use as a container for several widgets Can it be replacable by Rectangle For example what is the difference in the following declarations : .. . .. . and .. . .. . Why do we usually use Component when declaring a delegate Comment : What don t you understand about the docs They can t be improved if you don t say why they aren t clear . I think that they are quite clear and any answer you get here will most likely be a re-wording of what already exists . Comment : I agree with @Mitch the Qt documentation is the best docs I ve ever seen so if you found that not clear I think you won t find any help here . Comment : Added some example to the question description .. . Answer : The difference between those two snippets is that the Rectangle will be immediately displayed . This is written in the documentation http : doc.qt.io qt-5 qml-qtqml-component.html details : .. . .. . Notice that while a Rectangle by itself would be automatically rendered and displayed this is not the case for the above rectangle because it is defined inside a Component . The component encapsulates the QML types within as-if they were defined in a separate QML file and is not loaded until requested in this case by the two Loader objects . Because Component is not derived from Item you cannot anchor anything to it . When declaring delegates Component is used because there are several delegate items that must be created . A single Item doesn t work here . You can think of Component as a template that you can create objects from . Comment : Thanks for this note - that was my doubt point", "Question : What is the parent of MouseArea when it in the GroupBox parent refers to some container : .. . .. . qml : parentQQuickItem QML 15 0x3ad3590 container recGroupBox QMLTYPE 12 0x3ad2790 .. . .. . When the MouseArea in the Rectangle Rectangle is its parent : .. . .. . qml : parentQQuickRectangle 0x39d0cd0 recQQuickRectangle 0x39d0cd0 .. . Answer : It is common behaviour in most QML controls and windows that an inner item takes up all the children of the control itself . It happens for Window http : doc.qt.io qt-5 qml-qtquick-window-window.html contentItem-attached-prop ScrollView http : doc.qt.io qt-5 qml-qtquick-controls-scrollview.html contentItem-prop Flickable http : doc.qt.io qt-5 qml-qtquick-flickable.html contentItem-prop and even GroupBox . Such a component is available as a property usually called contentItem http : doc.qt.io qt-5 qml-qtquick-controls-groupbox.html contentItem-prop . If you write an example which prints such a property you ll see that contentItem is the parent you are searching for : .. . .. . Output : .. . .. . qml : parent QQuickItem QML 26 0x1411fc0 container contentItem QQuickItem QML 26 0x1411fc0 container Comment : Thanks If I want to refer to GroupBox from MouseArea I should only use GroupBox s id should I Comment : Yeah the id not the parent property .", "Question : I have a QML ListView where the delegate loads it s component from another file . When clicking on an delegate item I want to update ListView . CurrentIndex and highlight the selected item . It works when I explicitly set the id of the ListView . However since I want to use the delegate s Component also for other ListView s I m stuggeling to find a generic way how to access ListView.currentIndex from within a delegate Component . Here is the Code : .. . .. . main.qml .. . .. . Contact.qml Component used by delegate .. . .. . Any help is really appreciated .. . Answer : There are two problems here : .. . .. . You need to qualify ListView s attached-properties with the name of the item from which they re accessed . The currentIndex property is a property of the ListView item type http : doc.qt.io qt-5 qml-qtquick-listview.html currentIndex-prop not the attached property object http : doc.qt.io qt-5 qml-qtquick-listview.html properties . To fix them both first change this : .. . .. . to this : .. . .. . And then give your delegate an id : .. . .. . This is demonstrated in part by the Example Usage http : doc.qt.io qt-5 qml-qtquick-listview.html example-usage section of the documentation : .. . .. . ListView attaches a number of properties to the root item of the delegate for example ListView : isCurrentItem . In the following example the root delegate item can access this attached property directly as ListView.isCurrentItem while the child contactInfo object must refer to this property as wrapper.ListView.isCurrentItem .", "Question : Hi Everyone i am new to QT and i am having trouble loading one qml through another qml Basically i have created a qml MyTabView MyTabView.qml .. . .. . and i am trying to show it through another qml main.qml which is in the same directory .. . .. . but when i try to run my project i get this error .. . .. . QQmlApplicationEngine failed to load component qrc : qml main.qml : 11 TabView is not a type .. . .. . Please note that i have M Caps in MyTabView.qml and that MyTabView.qml and main.qml are in the same directory . Can someone point me what mistake i am doing One thing i want to point is that when i replace all the code of MyTabView.qml instead of MyTabView inside main.qml the program does not give any error and runs correctly . Thanks in advance Comment : You have called your own class TabView whilst using Qt s TabView simultaneously . Change your class name in QML the class name is the name of the QML definition file . Comment : I have changed the name of my xml file to MyTabView.xml and is calling MyTabView in the main.xml but i get the same error MyTabView is not a type .. . Answer : Have you added the file to your Resources Adding your MyTabView.qml to your project in the same directory of main.qml is not sufficient . You have to put your QML file in the Resources probably main.qrc qml in order to have it deployed . The editor of Qt Creator does not need this inclusion in order to find your type therefore it displays no error . Nota : when you write xml I assume you mean qml including the name of the files .", "Question : I m using Qt 5.5 to create a small app . In the app I m manually creating a component like so : .. . .. . My .qrc file IS included in the .pro file like so : .. . .. . All works well when I run from Qt creator . However when I deploy the app using the macdeployqt tool and try to run the app I get that assert hit . Sure enough I tried to put a loop around the .isReady and it will hang forever . What is the proper way for doing this My qml component is working fine when in the Qt creator so why does it fail in deployment Thanks Comment : Can you post more code Mabe you can test if is loading with isLoading if the assert hits Comment : This was actually the same issue as my other question on the QmlComponent . I wasn t aware you need to pass -qmldir path to qml files to the macdeployqt tool . .. . Answer : This turned out to be simple . You need to pass -qmldir path to your qml files to macdeployqt . It is actually required if you have QML files but I somehow didn t see it in the documentation .", "Question : I came across a weird problem when designing my application in QML . The following code works : .. . .. . I have a bunch of functions properties and loaders in this item delegate which is an Item object . Problems arise when I try to reuse this delegate in a ListView . I can t reference it like this : .. . .. . This is because itemDelegate is a Component : .. . .. . http : qt-project.org doc qt-5 qml-qtquick-controls-tableview.html itemDelegate-prop .. . .. . So QML can convert an Item to Component when it s embedded but not when it s referenced . And I can t make it a component since components can t have functions loaders properties etc . How can I reuse my delegate .. . Answer : Solved by wrapping the item inside the component : Comment : I m also struggling with this issue but your code is not working for me because I actually have a list of Component s . In my case I have a PageIndicator with a list of Image type components inside and I m trying to assign an element of that list to the delegate property . Have you ever used a container for assigning a value to a delegate", "Question : I m getting a linker-error that a whole host of symbols including QQmlEngine and QQmlComponent constructors are undefined from the main.cpp : .. . .. . I ve run qmake -project and rebuilt all . Browsing other questions and the docs it seems the include should be QQmlEngine but this is not found and QtQml QQmlEngine is . Are they one in the same or is that the problem Comment : I ll edit the actual error output in in the morning no WiFi at home at the moment .. . Answer : Add the following to your .pro file : Comment : Ah that got it thanks Seems like 5 settings for every change sometimes Now I m getting component not ready though not sure if related", "Question : What is the difference between Component and Item in QML The documentation is not absolutely clear here . What is the preferred type to use as a container for several widgets Can it be replacable by Rectangle For example what is the difference in the following declarations : .. . .. . and .. . .. . Why do we usually use Component when declaring a delegate Comment : What don t you understand about the docs They can t be improved if you don t say why they aren t clear . I think that they are quite clear and any answer you get here will most likely be a re-wording of what already exists . Comment : I agree with @Mitch the Qt documentation is the best docs I ve ever seen so if you found that not clear I think you won t find any help here . Comment : Added some example to the question description .. . Answer : A Component is both a concept and a thing in QML . An Item is a visual thing defined in QtQuick module which is usable in QML . Those two things are conceptually different . As in QML concept all reusable thing is called components . You can define a component in multiple ways but one easy way is to create a .qml file and name it as you name your component . i.e : Button.qml or Swithc.qml . When QML engine load that file you can use that as buttons or switches . Another way to define a component is to use Component in a qml file . This allows you to define a new component inline . A component defined inline does not work after explicitly loaded by a loader http : doc.qt.io qt-5 qml-qtquick-loader.html . An Item on the other hand is a simple type defined in QtQuick module . I think it is OK to call an Item a Component even though an Item is not technically inherited from Component . Or more precisely you could say your custom component is based on an Item if your .qml has Item as a root type .", "Question : I have a qml file with Rectangle . I would like to trigger the onClicked from C++ back-end . So How can I get access of QML component reference in C++ Qt backend .. . Answer : You should use QObject : : findChild to locate the object and simply invoke the signal as you would a nominal method . But there is a catch as QQuickRectangle itself is a private class so it is not directly available for use in the C++ API . Also it doesn t really have a clicked signal not unless you implemented one yourself . And if you did it won t be part of the C++ interface . Also there is no onClicked signal the signal is clicked and onClicked : is the handler hook . However you can still emit it using the Qt meta system just use : .. . .. . It will work even if the signal is implemented on the QML side it will work even without casting to the concrete C++ type . Now if your object is not directly in the root object tree you will not be able to find it and will have no choice but to pass a reference to it from the QML side to a C++ slot or invokable function . Comment : I have tried to call the slot of QML onPropertyNameChanged from invokeMethod but it is not handling I think signal can only be invoked . Comment : @Ashif - there is no such object onSignalName - this is just an assist provided to make declarative connections it cannot be invoked .", "Question : When I use Qt.createComponent to create component dynamically the stutas is always Component.error but I cannot understand the reason . I used it like that : .. . .. . If the MyPage.qml does not exist in the qrc file the error is .. . .. . qrc : MyPage.qml : -1 File not found .. . .. . If I set the full path of MyPage.qml I get a Network error . When I add the SeriesSelectionPage.qml file to the resource file it works . But it shouldn t be dynamic I just want to find a QML file and load it dynamically when the application executes so that the application can load different QML according to user operations . Anyone knows how to do that I m going crazy . .. . Answer : Qt.createComponent http : doc.qt.io qt-5 qml-qtqml-qt.html createComponent-method takes a url as its first argument . From the url documentation http : doc.qt.io qt-5 qml-url.html : .. . .. . The url type refers to a resource locator like a file name for example . It can be either absolute e.g . http : qt-project.org or relative e.g . pics logo.png . A relative URL is resolved relative to the URL of the containing component . So as long as you re using relative URLs from within a file that is loaded from a QRC file you ll need to use the qrc scheme : Comment : It will be better just add the QML file into resources and use qrc : protocol in URL . Comment : I was under the impression that OP wanted the end user to be able to choose a QML file.. . guess I misread . Comment : Yes you are right . looks like your first version of answer is more correct : Sorry Comment : No I think you re right and I just read the question incorrectly Haha . : Comment : Thank you all . I m so sorry that my English is too weak to express clearly .", "Question : Hi Everyone i am new to QT and i am having trouble loading one qml through another qml Basically i have created a qml MyTabView MyTabView.qml .. . .. . and i am trying to show it through another qml main.qml which is in the same directory .. . .. . but when i try to run my project i get this error .. . .. . QQmlApplicationEngine failed to load component qrc : qml main.qml : 11 TabView is not a type .. . .. . Please note that i have M Caps in MyTabView.qml and that MyTabView.qml and main.qml are in the same directory . Can someone point me what mistake i am doing One thing i want to point is that when i replace all the code of MyTabView.qml instead of MyTabView inside main.qml the program does not give any error and runs correctly . Thanks in advance Comment : You have called your own class TabView whilst using Qt s TabView simultaneously . Change your class name in QML the class name is the name of the QML definition file . Comment : I have changed the name of my xml file to MyTabView.xml and is calling MyTabView in the main.xml but i get the same error MyTabView is not a type .. . Answer : You should rename your TabView.qml to something like MyTabView.qml . Because of that import .. . .. . you have conflict of TabView from QtQuick.Controls 1.2 and local folder . Comment : I have changed the name of my xml file to MyTabView.xml and is calling MyTabView in the main.xml but i get the same error MyTabView is not a type Comment : @bourne Why do you use xml extension for your source files There is nothing similar between qml and xml .", "Question : Hi Everyone i am new to QT and i am having trouble loading one qml through another qml Basically i have created a qml MyTabView MyTabView.qml .. . .. . and i am trying to show it through another qml main.qml which is in the same directory .. . .. . but when i try to run my project i get this error .. . .. . QQmlApplicationEngine failed to load component qrc : qml main.qml : 11 TabView is not a type .. . .. . Please note that i have M Caps in MyTabView.qml and that MyTabView.qml and main.qml are in the same directory . Can someone point me what mistake i am doing One thing i want to point is that when i replace all the code of MyTabView.qml instead of MyTabView inside main.qml the program does not give any error and runs correctly . Thanks in advance Comment : You have called your own class TabView whilst using Qt s TabView simultaneously . Change your class name in QML the class name is the name of the QML definition file . Comment : I have changed the name of my xml file to MyTabView.xml and is calling MyTabView in the main.xml but i get the same error MyTabView is not a type .. . Answer : I had a similar problem . qrc : AGview.qml : 8 : 15 : AGraph is not a type .. . .. . I solved it : my original code in my main.cpp : .. . .. . the working one : .. . .. . I think without the slash it don t search in the actual folder .", "Question : I have some installation issues with the Qt Quick Components for Desktop using QT5 . Following are the steps I have followed based on these instructions http : stackoverflow.com questions 6298584 installing-qt-quick-components-for-desktop-for-use-with-qt-creator 9464679 9464679 : .. . .. . 1 . Downloaded the tar.gz from http : qt.gitorious.org qt-components desktop trees master and unpacked the components . 2 . Added to PATH variable value in the environment-variables OS : Windows 8 C : Qt Qt5.3.1 5.3 msvc2012 opengl bin C : Qt Qt5.3.1 Tools QtCreator bin .. . .. . 3 . Run the vcvars32.bat script Visual Studio 2012 . 4 . Ran the command : qmake nmake install in qt-components-desktop components folder . 5 . Ran the command : qmake nmake install in qt-components-desktop src folder . This command has automatically copied the compiled component files to QT import folder . During step 5 I got these errors : .. . .. . I understand that these errors are occurred because the source code is for QT4 and these include deceleration like QtGui QApplication are no longer exist in QT5 . I googled a lot but I couldn t find how can I download this plugin for QT5 as in http : qt.gitorious.org qt-components desktop trees master for QT4 . Any idea or maybe there is another issue that I missed .. . Answer : I found the alternative components in QT5 : .. . .. . according to this wiki http : qt-project.org wiki QtDesktopComponents Qt Quick Controls replaced the former one Qt Desktop Components . So for using these components when porting QML code from QT4.x to QT5.x you need to replace import Qt.labs.components version in your QML file with import QtQuick.Controls version . Hope this will help someone.. .", "Question : I have a QML ListView where the delegate loads it s component from another file . When clicking on an delegate item I want to update ListView . CurrentIndex and highlight the selected item . It works when I explicitly set the id of the ListView . However since I want to use the delegate s Component also for other ListView s I m stuggeling to find a generic way how to access ListView.currentIndex from within a delegate Component . Here is the Code : .. . .. . main.qml .. . .. . Contact.qml Component used by delegate .. . .. . Any help is really appreciated .. . Answer : Use attached property ListView.view http : doc.qt.io qt-5 qml-qtquick-listview.html view-attached-prop : .. . .. . This attached property holds the view that manages this delegate instance .. . .. . Small example :" ] }
[ "yes-answer-long", "yes-answer-short" ]
modeling
UNK_RELATION
sharpdevelop@mono@141
sharpdevelop -- sharpdevelop also styled as develop is a free and open-source integrated development-environment ide for the microsoft .net @placeholder gtk and glade platforms and supports development in c visual basic .net boo f ironpython and ironruby programming-languages .
{ "confidence": [ 49.53620910644531, 49.254005432128906, 49.12646484375, 47.944374084472656, 44.19325256347656, 43.71548843383789, 43.40203094482422, 43.132102966308594, 43.11357116699219, 42.62276840209961, 42.50989532470703, 42.22224044799805, 42.22224044799805, 41.88740539550781, 41.44055938720703, 41.31017303466797, 41.31017303466797, 41.31017303466797, 41.31017303466797, 41.17597961425781, 41.14255905151367, 41.09654998779297, 40.43313980102539, 40.36296081542969, 39.84852981567383, 39.6328010559082, 39.6328010559082, 39.6328010559082, 39.6328010559082, 39.6328010559082, 39.34864044189453, 39.26405334472656, 39.14053726196289, 39.007568359375, 39.007568359375, 39.007568359375, 38.73028564453125, 38.63404846191406, 38.61726760864258, 38.55311965942383, 38.389122009277344, 37.98925018310547, 37.5375862121582, 37.38008117675781, 37.38008117675781, 37.38008117675781, 37.38008117675781, 36.97658920288086, 36.47129440307617, 36.30039978027344, 36.10639953613281, 35.96085739135742, 35.95613098144531, 35.95613098144531, 35.68414306640625, 35.20357894897461, 35.20357894897461, 34.553279876708984, 34.553279876708984, 34.365604400634766, 34.328643798828125, 34.328643798828125, 34.328643798828125, 34.328643798828125, 34.328643798828125, 34.328643798828125, 34.328643798828125, 34.12389373779297, 33.85869598388672, 33.76138687133789, 33.76138687133789, 33.24896240234375, 33.24896240234375, 32.99868392944336, 32.781986236572266, 32.68170166015625, 32.602684020996094, 31.964855194091797, 31.84585952758789, 31.84585952758789, 31.84585952758789, 31.84585952758789, 31.831783294677734, 31.63486099243164, 31.35301971435547, 31.084819793701172, 30.827289581298828, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 30.218372344970703, 29.993282318115234 ], "content": [ "I m using SharpDevelop as IDE .", "The program is called SharpDevelop and it is an IDE am using for C .", "SharpDevelop is not Visual Studio .", "As IDE i use SharpDevelop or develop however you would spell it .", "@M.kazemAkhgary I m not using Visual Studio but SharpDevelop .", "This is worked code in visual-studio .. . .. . And this is the code worked in IronPython console .. . .. . Both of these methods are not working in SharpDevelop .", "As a workaround for SharpDevelop 5.1 you can copy the OxyPlot.dll and OxyPlot.WindowsForms.dll files into C : Program Files x86 SharpDevelop 5.1 bin .. . .. . Then restart SharpDevelop and then you can open the form in the designer without any errors .", "SharpDevelop also has-many more features than the Express editions like built-in refactoring and VB.NET - C translation tools so there are good reasons to prefer SharpDevelop as your free IDE .", "SharpDevelop is a code editor Visual Studio Xamarin alternative .", "Currently I develop ASP.Net web site using SharpDevelop IDE and doesn t have any Visual Studio version installed on my machine .", "I m using the software SharpDevelop C .", "I am writing a C NotifyIcon Application with SharpDevelop .", "I need the C to VB converter in SharpDevelop 4.4 .", "In sharpdevelop use the Source and Design tabs .", "Is there in Sharpdevelop a feature to draw shapes like an ellipses into a form", "Switch to SharpDevelop 4", "This is Sharpdevelop 3.2 Beta by the way", "Installed SharpDevelop 5.1 .. . 2 .", "Unable to reproduce this with SharpDevelop .", "Not familiar with SharpDevelop", "I ve written a small C program on SharpDevelop .", "Also another approach to consider would be to add the changes directly to the SharpDevelop source code and submit a pull request so they can be included in SharpDevelop directly .", "I finally settled on SharpDevelop which is an IDE with an included converter .", "Yes you can install SharpDevelop side-by-side with Visual Studio 2015 .", "Create a C empty SharpDevelop project .. . 3 .", "I have SharpDevelop 4.1 and 4.4 .", "SharpDevelop has a designer for Windows Forms .", "There is not Windows RT version of SharpDevelop at all .", "What version of SharpDevelop are you using", "I can t use ctypes in Sharpdevelop .", "Build SharpDevelop from source and stop the IssueManager from running .", "Neither SharpDevelop nor Visual Studio have an Ellipse control for Windows Forms in the Toolbox .", "Since I am also creating a graphical interface to the script I am using SharpDevelop SD as my IDE .", "SharpDevelop 4 includes a settings file template .", "I m trying to use SharpDevelop for a Windows Form App .", "The VS uninstaller wasn t written to support SharpDevelop .", "I am using SharpDevelop 4.4 and IronPython 2.7.5 in Windows 8 32 pc .", "File a bug https : github.com icsharpcode sharpdevelop issues and wait for someone from the SharpDevelop team to fix the bug .", "I ve created a C program on SharpDevelop which uses the BigInteger structure .", "Maybe SharpDevelop has something similar .", "In SharpDevelop you would have to write the XAML yourself to see the Ellipse .", "You can use it perfectly well with Visual Studio or SharpDevelop .", "You won t be able to load it using SharpDevelop but will with C Express .", "This bug should be fixed in SharpDevelop 5.1.0.5173 and above .", "SharpDevelop does not support 64-bit debugging .", "Well SharpDevelop kindly suggests that the if can be converted into a switch .", "By the way : why can t you use SharpDevelop 4.0", "I ve created a very simple class to represent an object in SharpDevelop one that I would expect to be error-free and workable .", "@jwarner112 your confusion comes from how SharpDevelop and Visual Studio differs .", "it s going to be used in SharpDevelop v4 Mirador .", "The tutorial is for WPF and Visual Studio does have an Ellipse control for WPF but SharpDevelop does not have one that you can drag from the Toolbox .", "I am currently not in a position to use Sharpdevelop 4 it would be better if I can use that new code editor in old Sharpdevelop 3.x .", "Older SharpDevelop versions up to 4.x had better VB support .", "AvalonEdit which is the newer text-editor included with SharpDevelop has a version 4.4.2 .", "In SharpDevelop if there is a designer available for the file then you can open the designer by : .. . .. . 1 .", "I use visual-studio at work but don t have it on my home computer so I downloaded SharpDevelop .", "Usually tutorials on the web say : Create a Custom Action project in Visual Studio but this does not exist in SharpDevelop .", "It looks like SharpDevelop 4.4 does not have the same problem and can open the form in the designer .", "Open project in SharpDevelop select project - set compile to Set target CPU to x86-64 processor .", "Looking at the SharpDevelop source code that check box does not do anything even if it was enabled .", "How can I disable the code inspection in SharpDevelop 5.1", "It looks like a bug in SharpDevelop 5.1 being unable to resolve the OxyPlot assemblies .", "Should I add the default case to the switch and ignore SharpDevelop", "The SharpDevelop suggestions are like Resharper and the SonarQube are like Code Analysis .", "But main issue is how to publish web site because there is no such option available in SharpDevelop .", "by using some scripts on SharpDevelop Project or by any other possible way .", "Most of SharpDevelop 3.x is hard-coded to use ICSharpCode.TextEditor .", "In sharpdevelop and visual-studio 2015RC when debugging the program runs just fine and opens and everything works no errors .", "If I search here and on other forums how to add a Settings file in SharpDevelop IDE I use v4.3 installed it when it was new no need so far for updates I only find posts of 5+ years ago which state that there s no settings editor in SharpDevelop .", "I m only a beginner I ve made a very simple program on SharpDevelop C but it doesn t work .", "I ve just made a small C program on SharpDevelop that simply calculates the square-root of the first few integers .", "There are other ways to extend SharpDevelop using extension paths in the addin system .", "AvalonEdit is an advanced WPF text-editor - part of the SharpDevelop project .", "Additionally public at the line public int empID also is associated with the following error : .. . .. . Is there a particular knack to working with SharpDevelop or is my IDE broken or am I even missing something stupid", "I have both Visual Studio 2010 and SharpDevelop 4.4 at my disposal though I d like to learn both evenly if possible because I like open-source IDEs but value experience in Visual Studio as well .", "I am following a tutorial to learn C but it is getting annoying switching between Media Player and SharpDevelop program .", "I m trying to develop an MS Office Addin in C .Net and I don t have access to Visual Studio .", "Note that the version of SharpDevelop I m using is 4.2 and it is portable so I m wondering if the reasons I m getting this error is : .. . .. . Microsoft XNA is not properly installed .. . or a Problem with SharpDevelop .. . .. . And if there is any solution for my problem that doesn t require Admin rights or Installation .", "You can always run MonoDevelop so what s the point of using SharpDevelop and Wine", "So how do I get both of these files in SharpDevelop to use them as I can do it in VS", "switch https : www.dropbox.com s 87yrzrtbvsiuknk switch.png raw 1 .. . .. . I m using Windows 10 x64 and Sharpdevelop 4.4.2 .", "The software I m using is SharpDevelop 5 Xcopyable portable version because I cannot install any software .", "I m using Sharpdevelop 5.1.0.5134 with .NET 4.5.51209 to make desktop application based on Windows.Forms .. . .. . At first everything was fine no warnings and the designer shows the form correctly and I can easily add components .", "SharpDevelop has a really cool feature for code-completion http : community.sharpdevelop.net blogs siegfried pammer archive 2010 04 09 what-happened-to-alt-ins-in-sharpdevelop-4-0.aspx in special cases .", "Instead I m using SharpDevelop as my IDE but my question is equally relevant to anyone developing using any other IDE or compiling from the command line.. . .. . .. . I ve done a bit of searching for guides on how to develop AddIns but they all seem to require Visual Studio and follow these steps : .. . .. . 1 .", "However while using SharpDevelop I noticed that when you create a Label via the designer the property that controls the text in that Label is not called Text like it is in visual-studio but I assumed it would be since they are both c .", "I have manually put the files under myProject bin Debug files Note : manually copy-pasted file not sure if i need to import in any way through the application - using SharpDevelop IDE .", "Here it is : .. . .. . It should just calculate pi but it only returns a lot of 1s instead.. . SharpDevelop doesn t report any error .", "I have already added an icon to the .exe file from the Properties Menu in SharpDevelop .", "You ever need help with SharpDevelop then lookup how to do it in VS they have very similar interfaces .", "I don t see a reason why it would refuse to build debug a project that works in SharpDevelop .", "So you end up changing the code to an if sentence : .. . .. . With this code neither SonarQube nor SharpDevelop complain at all .", "There was a bug fix https : github.com mrward SharpDevelop commit 1c8095f0c1ac316bf404272da9788c872538ced3 applied for problems resolving the solution .", "When i type import ctypes SharpDevelop shows me an intellisence item ctypes and ctypes test .", "SharpDevelop gives no error traceback but the console window has some text but it is vanishing very quick .", "I have completed my installation packages of my exe file I am using SharpDevelop for it .", "SharpDevelop allows you to create installers using WiX so I am assuming that is what you are creating .", "I am very curious to know if it is possible to replace the normal ICSharpCode.TextEditor with AvalonEdit in Sharpdevelop 3.x .", "Frankly speaking AvalonEdit is way too better than ICSharpCode.TextEditor so it would be better to use AvalonEdit in Sharpdevelop 3.x .", "I am trying to make encryption work on sharpdevelop using IronPython to encrypt text but I am getting the error below : .. . .. . Specified key is not a valid size for this algorithm ." ] }
{ "confidence": [ 72.77054595947266, 66.73604583740234, 62.96739196777344, 60.142669677734375, 56.79819869995117, 56.62841033935547, 56.560203552246094, 55.60472106933594, 54.504600524902344, 54.32245635986328, 53.59497833251953, 52.29039001464844, 52.12506103515625, 51.87043380737305, 51.39863204956055, 50.97621154785156, 50.78826904296875, 50.706153869628906, 50.66664505004883, 50.353782653808594 ], "content": [ "Question : I m trying to develop an MS Office Addin in C .Net and I don t have access to Visual Studio . Instead I m using SharpDevelop as my IDE but my question is equally relevant to anyone developing using any other IDE or compiling from the command line.. . .. . .. . I ve done a bit of searching for guides on how to develop AddIns but they all seem to require Visual Studio and follow these steps : .. . .. . 1 . Install the Interop Assemblies .. . 2 . Create a Visual Studio .Net Project I m unable to do this bit .. . 3 . Extend the VS ThisAddIn template .. . .. . What I ve managed to do is to : .. . .. . 1 . Install the Interop Assemblies .. . 2 . Create a C empty SharpDevelop project .. . 3 . Add a GAC reference to Microsoft.Office.Interop.Outlook .. . 4 . Add a COM reference to Microsoft Office 12.0 Object Library .. . 5 . add the line using Outlook Microsoft.Office.Interop.Outlook .. . 6 . and the line using Office Microsoft.Office.Core .. . 7 . Look at some example code and realise that they all refer to VS templates and VSTO libraries Microsoft.Office.Tools which I don t have . Where do I go from here Is there a guide tutorial I ve missed or can someone provide some pointers Comment : This looks like trying to eat soup with a fork anyway you should be on the right track .. . you could try MonoDevelop it should be somewhat similar to VS but I have little experience with it Comment : What I m really after is an IDE independent way of creating a Microsoft Office AddIn using C . So the choice of IDE shouldn t be a factor . Comment : @sprocketonline - You do understand there nothing special about visual-studio projects right Comment : @Ramhound Yes but how do I get the Microsoft.Office.Tools libraries and where can I find some example code that doesn t rely on the ThisAddIn partial class that the Visual Studio template creates Comment : If there s a way to install Microsoft.Office.Tools and somewhere I can copy the template generated code from without having Visual Studio and doesn t violate any licenses that may be a solution... . .. . Answer : NetOffice http : netoffice.codeplex.com is a great set of version-independent interop assemblies for Office . This is all you need to make add-ins using SharpDevelop and the project has a bunch of tutorials and samples too including some for Outlook . If you re making an add-in for Excel using Excel-DNA http : exceldna.codeplex.com which you need to expose user-defined worksheet functions from .NET NetOffice still gives you a complementary set of libraries for accessing the Excel COM automation interfaces from your Excel-DNA add-in so they work together well . For both NetOffice and Excel-DNA you ll also be able to use the free Visual Studio Express editions with some small tricks needed to get debugging working . Visual Studio Express does not include VSTO at all . SharpDevelop also has-many more features than the Express editions like built-in refactoring and VB.NET - C translation tools so there are good reasons to prefer SharpDevelop as your free IDE . Comment : NetOffice looks fantastic . Wish I had seen this before starting with Visual STudio but still not too late to switch to Sharp Develop : D Comment : NetOffice is just a collection of .NET libraries you use instead of the special VSTO libraries or the Office interop assemblies . You can use it perfectly well with Visual Studio or SharpDevelop .", "Question : I m trying to develop an MS Office Addin in C .Net and I don t have access to Visual Studio . Instead I m using SharpDevelop as my IDE but my question is equally relevant to anyone developing using any other IDE or compiling from the command line.. . .. . .. . I ve done a bit of searching for guides on how to develop AddIns but they all seem to require Visual Studio and follow these steps : .. . .. . 1 . Install the Interop Assemblies .. . 2 . Create a Visual Studio .Net Project I m unable to do this bit .. . 3 . Extend the VS ThisAddIn template .. . .. . What I ve managed to do is to : .. . .. . 1 . Install the Interop Assemblies .. . 2 . Create a C empty SharpDevelop project .. . 3 . Add a GAC reference to Microsoft.Office.Interop.Outlook .. . 4 . Add a COM reference to Microsoft Office 12.0 Object Library .. . 5 . add the line using Outlook Microsoft.Office.Interop.Outlook .. . 6 . and the line using Office Microsoft.Office.Core .. . 7 . Look at some example code and realise that they all refer to VS templates and VSTO libraries Microsoft.Office.Tools which I don t have . Where do I go from here Is there a guide tutorial I ve missed or can someone provide some pointers Comment : This looks like trying to eat soup with a fork anyway you should be on the right track .. . you could try MonoDevelop it should be somewhat similar to VS but I have little experience with it Comment : What I m really after is an IDE independent way of creating a Microsoft Office AddIn using C . So the choice of IDE shouldn t be a factor . Comment : @sprocketonline - You do understand there nothing special about visual-studio projects right Comment : @Ramhound Yes but how do I get the Microsoft.Office.Tools libraries and where can I find some example code that doesn t rely on the ThisAddIn partial class that the Visual Studio template creates Comment : If there s a way to install Microsoft.Office.Tools and somewhere I can copy the template generated code from without having Visual Studio and doesn t violate any licenses that may be a solution... . .. . Answer : EDIT : I missed the reference to Outlook my apolgies . For Outlook look here http : stackoverflow.com questions 1721523 outlook-and-programming-with-c-sharp . Outlook Redemption is useful . I m not a Word Expert but there are plenty of tutorials on the web . For Excel I d suggest you actually look at ExcelDNA http : exceldna.codeplex.com .. . .. . Plenty of SO questions on this topic . See Exposing .net methods as Excel functions http : stackoverflow.com questions 54387 exposing-net-methods-as-excel-functions for example as additional advice on where to start and what your options are . Comment : Is there anything similar for Outlook or Word Comment : @sprocketonline - Just use the same basic principle .", "Question : null .. . Answer : I am using SharpDevelop 4.4 and IronPython 2.7.5 in Windows 8 32 pc . I can t use ctypes in Sharpdevelop . But i can in IronPython console and even in visual-studio-2013 . When i type import ctypes SharpDevelop shows me an intellisence item ctypes and ctypes test . How to fix this . This is worked code in visual-studio .. . .. . And this is the code worked in IronPython console .. . .. . Both of these methods are not working in SharpDevelop . Comment : Could you explain what you mean by not working That doesn t really tell me a lot . I understand it isn t giving you intellisense but does the code run If not what is the traceback Comment : SharpDevelop gives no error traceback but the console window has some text but it is vanishing very quick .", "Question : I am pulling my hair out trying to debug an Excel Addin from SharpDevelop 5.1 which I created via NetOffice 1.7.3 . These are the steps I ve done so far : - .. . .. . 1 . Installed SharpDevelop 5.1 .. . 2 . Installed NetOffice 1.7.3 .. . 3 . Ran Developer Toolbox.exe and clicked Create New Project and clicked the following : - .. . 1 . Project Type .. . 1 . Automation Addin .. . 2 . Use NetOffice Tools : checked .. . 3 . Project Folder : some dir .. . 2 . Environment .. . 1 . Language : C .. . 2 . Environment : VS 2010 Express .. . 3 . .NET Runtime : 4.0 Client Profile .. . 3 . Office applications : .. . 1 . Clicked : Excel .. . 4 . Assembly Information .. . 1 . Name : my name .. . 2 . Description : my description .. . 5 . Load Behavior .. . 1 . User available to : Current User .. . 2 . Decide when it has to be loaded : 3 Load at startup .. . 6 . User interface . 1 . Check all 4 options .. . 7 . Create project .. . 4 . Open project in SharpDevelop select project - set compile to Set target CPU to x86-64 processor . enter image description here http : i.stack.imgur.com 860RN.png .. . .. . So I ve been able to build the addin and run it in Excel no problem - it s just the debugging which I can t do . Is there some setting or property which I need to set Any help will be much appreciated . .. . .. . NOTE 1 - the About page in SharpDevelop shows the following : - .. . .. . NOTE 2 - I have already installed MS Visual Studio the but the community edition doesn t let you do Excel addin development see https : msdn.microsoft.com en-us library bb398242.aspx and IMO the Visual Studio Professional version is too expensive see https : www.visualstudio.com en-us products vs-2015-product-editions.aspx for pricing . .. . Answer : SharpDevelop does not support 64-bit debugging . Did you try using the VS community edition to open your existing project file I don t see a reason why it would refuse to build debug a project that works in SharpDevelop . If VS complains about invalid project types try removing the ProjectTypeGuids element from the project file . These GUIDs just tell VS which plugins should be used to open the project they usually don t have any effect on simple building debugging . Comment : You are absolutely right . VS Community Edition works nicely with a project build in NetOffice many thanks", "Question : I am working in SharpDevelop C and I am wondering if there is a way to always keep the program to stay on top of every other window . I am following a tutorial to learn C but it is getting annoying switching between Media Player and SharpDevelop program . It s not that big of a deal I know but just wondering if there is a way to achieve this . Comment : What kind of program console windows forms wpf Comment : I don t completely understand your question . The program is called SharpDevelop and it is an IDE am using for C . SharpDevelop is a code editor Visual Studio Xamarin alternative . Comment : I thought you meant the program you re trying to develop . .. . Answer : Yes there are tools to have media-player and 99 of any app staying on top . Because I won t recommend one please search Always On Top or Window on top .. . .. . If you want to write your own you need to find get window handle of the top-level window of that application then do something like w is the HWND . Sample code in c++ : .. . .. . In C you need P Invoke . Comment : Thank you . I downloaded Turbo Top and I got it working now .", "Question : I m using Sharpdevelop 5.1.0.5134 with .NET 4.5.51209 to make desktop application based on Windows.Forms .. . .. . At first everything was fine no warnings and the designer shows the form correctly and I can easily add components . After that I added OxyPlot correctly from the Package Management Console and I found the new PlotView component in the Custom Comonents tab . The problem is that I can t add the component to the Form from the tools tab so I did it by writing the equivalents statements in the source file . The building process went fine and the application worked fine but now I can t see the Form in the designer tab and instead I got this message : .. . .. . How can I solve this problem Comment : probably some dependencies within the default constructor of the form remember that usually designers need to be able to create a form from scratch without additional context Comment : I m sorry but I didn t understand . Actually I m an electrical engineer and my knowledge in computer is limited It would be desirable if you can simplify it to me Comment : I actually missed part of the error . The fact that your code builds it doesnt mean its good : There are still some things that can go wrong in the run time . One of them is binding libraries and here it is your problem the component you added needs OxyPlot.WindowsForms.PlotView class definition which probably stays in OxyPlot library or sth like this . Just reference it to the project and it should work fine . Comment : here is the project file drive.google.com file d 0B9shvGtKbyqxYWMtVjlyNTR0Rmc https : drive.google.com file d 0B9shvGtKbyqxYWMtVjlyNTR0Rmc view usp sharing Comment : sorry but I dont have time to debug your project also I dont use sharpdevelop no idea why would one with VS Community available for free : Reference the library and will be fine otherwise just switch to VS and use nuget : P .. . Answer : It looks like a bug in SharpDevelop 5.1 being unable to resolve the OxyPlot assemblies . It looks like SharpDevelop 4.4 does not have the same problem and can open the form in the designer . As a workaround for SharpDevelop 5.1 you can copy the OxyPlot.dll and OxyPlot.WindowsForms.dll files into C : Program Files x86 SharpDevelop 5.1 bin .. . .. . Then restart SharpDevelop and then you can open the form in the designer without any errors . This bug should be fixed in SharpDevelop 5.1.0.5173 and above . Comment : perfect result awsome", "Question : null .. . Answer : I ve signed the Windows RT Desktop version of Sharpdevelop but I continuously get this error : .. . .. . http : pastebin.com i51GCPje .. . .. . All I need to do is get the exe compiled . I can sign it separately . Thanks for any help Qiangong2 Comment : This is Sharpdevelop 3.2 Beta by the way Comment : There is not Windows RT version of SharpDevelop at all . Even Microsoft does not support desktop apps in RT . Comment : @LexLi I have jailbroken my RT machine . It may not be supported by Microsoft but it s there . I just need help fixing the errors . I have .NET v4.0.30319 installed . The errors aren t CPU-type specific . As you can see here : chentiangemalc.wordpress.com 2013 03 18 https : chentiangemalc.wordpress.com 2013 03 18 sharpdevelop-rt-edition-beta-code-windows-forms-directly-on-windows-rt It works on RT .", "Question : null .. . Answer : Currently I develop ASP.Net web site using SharpDevelop IDE and doesn t have any Visual Studio version installed on my machine . Application is very simple like addition of 2 number for example . But main issue is how to publish web site because there is no such option available in SharpDevelop . or any workaround for publishing web site Comment : You can use msbuild.exe to compile and publish asp.net . I don t have the command I use available at the moment but you can probably google your way through it knowing about msbuild .", "Question : Is there in Sharpdevelop a feature to draw shapes like an ellipses into a form In this Tutorial http : www.dotnetperls.com ellipse it says that you should drag an ellipse to the form using the toolbox . But I don t see any tools for drawing shapes onto windows forms . Maybe this is just possible with Visual Studio .. . Answer : Neither SharpDevelop nor Visual Studio have an Ellipse control for Windows Forms in the Toolbox . The tutorial is for WPF and Visual Studio does have an Ellipse control for WPF but SharpDevelop does not have one that you can drag from the Toolbox . In SharpDevelop you would have to write the XAML yourself to see the Ellipse .", "Question : null .. . Answer : I m working on an IronPython script that is to be executed by another 3rd party application Ansys HFSS that provides a scripting interface for automation etc . Since I am also creating a graphical interface to the script I am using SharpDevelop SD as my IDE . I would like to be able to take advantage of SharpDevelop s debugging tools but I don t seem to be able to get it to work . I see that SD supports an Attach to process.. . feature which describes what I would like to do . However I don t have access to the parent Python engine as it being spawned by the 3rd party application . I have found many solutions that talk about creating a Python engine within a C application that can be connected to by an external debugger . Unfortunately I haven t been able to find any cases where a Python engine is created within an existing Python engine . Can anyone provide a solution", "Question : I use visual-studio at work but don t have it on my home computer so I downloaded SharpDevelop . I recently found out visual-studio is free for students anyway so I ll be using that from now on . However while using SharpDevelop I noticed that when you create a Label via the designer the property that controls the text in that Label is not called Text like it is in visual-studio but I assumed it would be since they are both c . My understanding is that the designer is just a GUI version of XML code and that it creates the XML code for you . If you navigate to that XML file I thought maybe the name of that property was arbitrary and you could change it there but that didn t work either . Any thoughts Comment : Actually Visual Studio Community which have almost all the functionality of VS Pro is free even for small company . .. . Answer : It s correct that they are both c but probably one is WinForms and another is WPF https : en.wikipedia.org wiki Windows Presentation Foundation . The designer use XAML https : msdn.microsoft.com en-us library cc295302.aspx that is an XML-based markup language developed by Microsoft . Instead of a Text property the Label has a Content property The reason for that is that the Label can host any kind of control directly inside of it instead of just text . This content can be a string as well .", "Question : How can I disable the code inspection in SharpDevelop 5.1 It annoys me as hell and slows down typing speed due to constant code checks . There is a checkbox in Tools - Options - Coding - C - Code inspection but it is read-only . .. . Answer : It looks like it is not currently possible to disable code-analysis . Looking at the SharpDevelop source code that check box does not do anything even if it was enabled . So your options are : .. . .. . 1 . Disable the C addin . Which will break C completely . 2 . Disable all the analysis rules . 3 . Build SharpDevelop from source and stop the IssueManager from running . 4 . File a bug https : github.com icsharpcode sharpdevelop issues and wait for someone from the SharpDevelop team to fix the bug . 5 . Switch to SharpDevelop 4", "Question : I am very curious to know if it is possible to replace the normal ICSharpCode.TextEditor with AvalonEdit in Sharpdevelop 3.x . Frankly speaking AvalonEdit is way too better than ICSharpCode.TextEditor so it would be better to use AvalonEdit in Sharpdevelop 3.x . I am currently not in a position to use Sharpdevelop 4 it would be better if I can use that new code editor in old Sharpdevelop 3.x . Can anyone please shed some light on it Thanks in advance . .. . Answer : Most of SharpDevelop 3.x is hard-coded to use ICSharpCode.TextEditor . You can use an AddIn to replace the text-editor see samples DisplayBinding AlternateEditor but you lose all of the following features : .. . .. . Code completion .. . Refactoring .. . Search + Replace .. . Forms designer .. . and some more.. . .. . .. . All of those features were rewritten to use the new text-editor interfaces in SharpDevelop 4 . This took us several months of development time . So no using AvalonEdit in SD 3.x is not possible unless you have a lot of time to spend backporting these changes . By the way : why can t you use SharpDevelop 4.0", "Question : SharpDevelop has a really cool feature for code-completion http : community.sharpdevelop.net blogs siegfried pammer archive 2010 04 09 what-happened-to-alt-ins-in-sharpdevelop-4-0.aspx in special cases . In some cases very little modification is needed for the code completed when it spits out code for a constructor or overridden ToString GetHashCode and the Equals methods . It allows you to select properties from your class to be included null checks in constructors etc . Does Visual Studio have anything like this does Resharper do this Since my office is straight Microsoft I generally have to develop in VS plus I like VS s text-alignment better . .. . Answer : For a few things SharpDevelop does you can use Code Snippets https : msdn.microsoft.com en-us library z41h7fat.aspx . There is a rather long list of snippets already included like ctor switch blocks try...catch blocks etc . You can also add your own placeholders https : msdn.microsoft.com en-us library eehb4faa.aspx for example . It doesn t include variable property names but a lot of other stuff though . For overrides it adds a default template but that one isn t that complete as SharpDevelops one .", "Question : null .. . Answer : Is it possible to run sharp develop on Linux using mono I have already tried it on wine but the only supported version is 2 . n .. . This version does not support .Net 4 . Comment : You can always run MonoDevelop so what s the point of using SharpDevelop and Wine Comment : That it doesn t support VB.net and WPF Comment : Then why not use Windows directly Wine is a best effort project and you simply have to help yourself in such cases .", "Question : null .. . Answer : I want to add a simple Custom Action to my WiX installer that redirects the user to a URL like described in this post : WiX : Simple way to prompt user to install .NET pre-requisite http : stackoverflow.com questions 12671246 wix-simple-way-to-prompt-user-to-install-net-pre-requisite .. . .. . However I am NOT using Visual Studio but currently SharpDevelop . I have tried for several days to get this CustomAction working but without success . Usually tutorials on the web say : Create a Custom Action project in Visual Studio but this does not exist in SharpDevelop . It actually seems very complicated to add the correct dependencies and tags in the XML to get it properly set up . Does anybody know of a step-by-step tutorial how to create a Custom Action in WiX Comment : I have managed to finally create the CustomAction as described in the mentioned post ActionResult DotNetCheck but it really was pretty hard to define all the correct dependencies . In particular I had to set the RequiredTargetFramework to .NET 3.5 in the CustomAction while my application is actually for 4.0 and it took me a while to find this out . The documentation for this part of WiX could really be better .", "Question : I need the C to VB converter in SharpDevelop 4.4 . I already have VS2015 Community installed . I would like to ask if they work nicely together and whether installing this older version of SharpDevelop after installing VS2015 will not cause any issues . .. . Answer : Yes you can install SharpDevelop side-by-side with Visual Studio 2015 . There should not be any problems .", "Question : null .. . Answer : I m using SharpDevelop 4.4.2 on a Windows 8.1 Update 1 computer and on a Visual Basic Windows Form and I m trying to retrieve the operating-system s name info but when I use this code : .. . .. . it gives this error in the output : .. . .. . Any ideas why Comment : Do you have an Imports System line Comment : Spell it correctly - Environment Comment : I m so dumb... . thanks alot guys .", "Question : I have a project written in VB and I need to convert the whole project to C project . I don t want to do it file by file I found some online converters but they convert only lines of codes not the whole project . I found on researches and here was written that I saw this question http : stackoverflow.com questions 4559950 how-to-convert-full-c-sharp-project-to-vb-net there was written that .. . .. . The best part about Sharpdevelop is it converts the whole project source files from VB and C and the other way .. . .. . And I also researched on Google that if you Right Click on the project I found here http : community.sharpdevelop.net forums t 12434.aspx that Right click on the project in the Projects window and select Convert - From VB.NET to C . But when I right-click on The Project in the Projects window I can d find that Convert . Is there any tool I have to install for SharpDevelop and then I will be able to convert my project Thanks Comment : This thread should not have been closed with 9719 views and 21452 views for its next linked SO question . This is very common issue and I was googling same matter so finally found my answer here from MattWard by redirecting from the other linked question which is already closed too Please reopen this topic . .. . Answer : Sorry but I ve not come across any tools that will convert the entire project . I ve just created a interim c project and converted small parts at a section at time in the past . The conversion is not a straight one-2-one code-map for a variety of reasons due to the differences in the languages . Small steps and some good unit-testing help speed things up . Alternatively if your code uses code generators tools supplied by CodesmithTools they often have compiler switches that will help change .net languages . This will definitely help in my humble opinion . Comment : Thanks for your answer . I guess I have to convert the project converting files one by one :", "Question : null .. . Answer : I ve been programming in C on my Uni Laptop which conveniently does not allow any installations . Regardless using ShaprDevelopPortable I was working on a project when I noticed Microsoft.Xna.Framework 3.0 in the search list for references . I immediately tried a to compile the default template for XNA-4.0 when I received these errors : .. . .. . Now I don t know if the functionality of GameTime has been removed from XNA-3.0 to XNA-4.0 but surely Microsoft.Xna.Framework.Game would still be there Note that the version of SharpDevelop I m using is 4.2 and it is portable so I m wondering if the reasons I m getting this error is : .. . .. . Microsoft XNA is not properly installed .. . or a Problem with SharpDevelop .. . .. . And if there is any solution for my problem that doesn t require Admin rights or Installation . Comment : Would you go into a boxing match with one hand tied behind your back Why are you developing on a machine with so many restrictions Comment : @Noctis Well I m not gonna carry my desktop around with me I understand this is a lot of restrictions and I m not having much trouble working with SharpDevelop for simple projects its just that compiling XNA on my laptop would allow me to do most of my programming on the go ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mono
UNK_RELATION
jquery-ui-layout@html@85
jquery-ui-layout -- jquery-ui-layout is a plugin for jquery-ui that helps to layout @placeholder elements in border layouts and adds functionality to resize close and hide each panel of the layout .
{ "confidence": [ 84.34855651855469, 81.28260803222656, 81.04827880859375, 76.7596206665039, 73.35414123535156, 73.35414123535156, 73.35414123535156, 72.87193298339844, 72.66613006591797, 71.17637634277344, 69.48172760009766, 69.353759765625, 68.408447265625, 67.67005157470703, 66.81155395507812, 66.81155395507812, 66.79029846191406, 66.08001708984375, 66.08001708984375, 65.31950378417969, 64.54338073730469, 63.68128204345703, 62.674537658691406, 62.674537658691406, 62.674537658691406, 62.36561965942383, 62.19646453857422, 60.56562042236328, 59.10934829711914, 58.162208557128906, 57.99488830566406, 57.99488830566406, 57.45094299316406, 55.708194732666016, 52.22315216064453, 52.07900619506836, 51.50196075439453, 49.40834045410156, 48.9830207824707, 48.868980407714844, 48.806854248046875, 48.09647750854492, 46.639915466308594, 45.91872024536133, 45.91872024536133, 45.69369888305664, 45.1796760559082, 44.687137603759766, 43.831016540527344, 43.825103759765625, 43.62082290649414, 42.72608184814453, 41.82204818725586, 41.82204818725586, 39.58656692504883, 39.02417755126953, 38.24777603149414, 37.16767883300781, 37.151206970214844, 36.30204772949219, 34.98992156982422, 34.98992156982422, 34.79841232299805, 34.63587188720703, 34.63587188720703, 33.6590461730957, 33.499114990234375, 33.17201614379883, 32.78636169433594, 32.60604476928711, 31.95013427734375, 31.95013427734375, 31.850404739379883, 31.850404739379883, 31.510948181152344, 31.31222152709961, 30.68268585205078, 30.60161590576172, 30.60161590576172, 30.60161590576172, 30.09363555908203, 29.69736099243164, 28.9420108795166, 28.289642333984375, 26.504945755004883, 26.16072654724121, 25.763744354248047, 24.918087005615234, 24.327186584472656, 22.59123992919922, 22.298725128173828, 21.811302185058594, 21.666187286376953, 21.641841888427734, 21.281352996826172, 20.718656539916992, 20.55282974243164, 20.34776496887207, 19.790760040283203, 19.790760040283203 ], "content": [ "Or how can I make a 2x2 panel layout using jQuery UI-layout or another plugin", "Is it an option in jQuery UI Layout or just css", "Ive been experimenting with the adjustable grids plugin jquery-ui-layout . .", "I looked at official jquery-ui-layout demos e.g .", "I m running into a strange and obscure issue in jQuery UI-layout .", "I m using jQuery UI Layout Plug-in in my code .", "How can I make the datetimepicker work properly in the jquery-ui-layout .", "I just started using Jquery UI Layout plugin and I m attempting to add vertical-text to the west closed tab .", "I am using the jquery-ui-layout plugin in a website : jQuery UI Layout Hompage http : layout.jquery-dev.com .. . .. . There are options togglerContent open and togglerContent closed that allow you to place html inside of the toggler .", "My feeling is that somehow Bootstrap and JQuery UI Layout are not playing nicely .", "I use jQuery UI Layout plug-in to implement my page layout splitter .", "I have a pane that it part of a set of panes created using the plugin jQuery UI Layout http : layout.jquery-dev.com .", "I have a problem when creating a nested layout : .. . .. . Angular executes first the link function of the inner ui-layout directive but for the jquery-ui-layout plugin to work it requires to call tElm .layout options of the outer first otherwise the layout is not rendered correctly .", "Having the jquery-ui-layout plugin and two sortable lists elements drag drop in only one direction .", "I found jQuery-UI Layout which works perfectly.. . accept it seems to require a center pane which doesn t exist in a 2x2 layout .", "The demo pages on the jQuery UI Layout website do not exhibit this problem because they all put the outermost layout directly inside the body element .", "I tried this but I still see the right border of ui-layout-pane .", "I m using JQuery UI Layout http : layout.jquery-dev.net and I did not find an answer in official documentation... .", "On most pages in my app I have the north east south west panes showing with jQuery UI Layout .", "We have been using JQuery UI Layout Plugin http : layout.jquery-dev.com demos simple.html for most of our projects .", "In the ui-layout directive I call to tElm .layout options .", "I d like to add drag-and-drop support to the angular-ui-layout ui-layout library .", "I ve reported the issue here : https : groups.google.com forum topic jquery-ui-layout pHHxkewV9ZI", "toggler desired http : i.stack.imgur.com VxVVk.png .. . .. . EDIT : Does anyone know if this is possible by modifying jQuery UI Layout settings", "I have problem showing the datetimepicker in jquery-ui-layout it will show behind the south pane .", "Use UI layout plug-in to initialize layout but it can t work .", "http : jsfiddle.net jc3rj681 2 .. . .. . Using the plugin jQuery UI Layout http : layout.jquery-dev.com I have several different panes .", "If it helps then what I m really trying to do is to create directives that wrap jquery-ui-layout link-to the website http : layout.jquery-dev.net .", "Screenshot 2 http : i.stack.imgur.com Puf90.png .. . .. . Here is the JSFiddle link https : jsfiddle.net 4Lfqc4wq 1 .. . .. . The position : absolute is a constraint because it is added by jQuery UI Layout http : layout.jquery-dev.com .. . .. . Is there a specific setting that I can include to make jqGrid 4.9.0 compatible with jQuery ui Layout once again", "I am trying to create a full page interface using the excellent jQuery UI Layout plugin http : layout.jquery-dev.net documentation.cfm .", "I m trying to get a simple vertical splitter bar working using jQuery UI Layout 1.30.0.3079-rc http : www.nuget.org packages jQuery.UI.Layout .", "I have read through the jQuery UI Layout documentation and searched on Google but I haven t found anything useful so far .", "I like to make the ui-layout-west section fixed width and like to hide the resizable bar .", "So I have a directive for ui-layout and directives for center west etc .", "I can not figure what is wrong with my HTML so jquery-ui-layout library does not want to recalculate widths heights of containers when Zooming Out in Browser Chrome Firefox .", "In this case I am using two plugins : jQuery UI layout plugin http : layout.jquery-dev.net index.cfm Trent datetime picker plugin http : trentrichardson.com examples timepicker .", "I have an UI Layout with a noth pane and a south one divided in west and east .", "I tried setting .layout to but it throws off the layout of the central pane then .", "In the angular-ui-layout module to set the size we need to pass a value like div ui-layout-container size 20 is it possible to pass a model so when ever model value gets changed the size of the panel should also change .", "This is a 2x2 layout .", "But you can try something like the following probably with a resize function that ll resize the panes manually - .. . .. . .. . var testLayout body .layout .. . applyDefaultStyles : true .. . east : .. . spacing closed : 100 toggler width .. . spacing open : 100 .. . togglerLength closed : 200 toggler height length .. . togglerLength open : 200 .. . .. . .. . .. . eastToggle .click function .. . .. . testLayout.toggle east .. . .. . .. . .. . .. . attempt .click function .. . resize east 20 .. . .. . .. . .. . A function to resize the tab .. . function resize region space .. . Width of the new center pane .. . var newCenterWidth parseInt body .ui-layout-center .css width .split px 0 + testLayout.options.east.spacing closed - space .. . .. . Change the options so they don t affect the layout when you expand collapse again .. . testLayout.options.east.spacing closed space .. . testLayout.options.east.spacing open space .. . .. . Manually resize the panes .. . body .ui-layout-resizer- + region .css width space .. . body .ui-layout-center .css width newCenterWidth .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src http : layout.jquery-dev.net lib js jquery.layout-latest.js script .. . div class ui-layout-center Center div .. . div class ui-layout-north North div .. . div class ui-layout-south South div .. . div class ui-layout-east East div .. . div class ui-layout-west West .. . br .. . br .. . .. . button id eastToggle Toggle East Panel button .. . br .. . br .. . button id attempt Change Width button .. . div", "Then I have code that traverses the model and create html template that conforms with ui-layout and compile it for display .", "Simple question from a newbie : how do I have jQuery UI layout revert to the original iframe numbering after panels have been closed and reopened", "Load page via AJAX from server the page is matched rules of UI layout .", "There is just a small piece of grid over and therefore i see the scrollbars for that specific area defined by ui-layout splitter .", "The issue seems to have occured in the past as documented here : https : groups.google.com forum topic jquery-ui-layout ZaJxX3NbPx4 .. . .. . But in that post they said it was tied to showOverflowOnHover - an attribute I have set to false both by default in the plugin and again in each instance .", "Answering my own question : in fact the contentSelector option of jQuery layout did the trick .", "You have to think it such as a nested layout .", "why not just remove the .layout call all together", "Can the layout plug-in be used in dynamic load layout page", "Please let me know how we can achieve the layout with togglers when instantiation is done for layout .", "My requirement refers to the demo referred in jQuery UI Layout http : layout.jquery-dev.net demos custom 5ftogglers.html .. . .. . I need to get the 3 togglers as demonstrated above but my integration is not showing me the three coloured toggler buttons .", "The setting .fn.jqm false force the usage more of jQuery UI instead of jqModal and jqDnR used by default .", "If you use jQuery UI js and not only css independent from jqGrid then the settings .fn.jqm false could have sense .", "We attempted a simple layout example using Bootstrap containers but the layout will not render in fact no html is rendered .", "However the real website will have to enclose the layout in a nested div .", "What can I do to fix the layout", "Again i m only using sizePane west 300 on the main Layout .", "actually there are two divs with the same name ui-layout-north as u can see in the jsfiddle. . thats y i tried using an id.. . bt that dint wrk. . ive tried ur answer. . it actually breaks the div elements", "I have two nested layouts the mainLayout and the westlayout which looks like this : .. . .. . The Main layout consists of two panes West and Center .", "But I failed when the layout is loaded dynamically AJAX view loading .", "In the end I was always reestructuring all the layout with all the divs percentual .", "One problem is that the size of each section of the layout is not retained after a new render because I recreate the entire template and render it the size of each section is lost .", "In the example that you posted it is .. . .. . But I do not see them in your code yet you are refering to them in your layout definition", "QUESTION : Is there a way I can apply these layout changes without having to toggle the pane twice for them to apply", "I d recommend you to add jQuery UI Touch Punch http : touchpunch.furf.com too to have better support of tablets see here http : stackoverflow.com a 30374861 315935 .", "you just missed to give height to your layout-container just similar to xxx .. . .. . I just modified following single line : .. . .. . Rest of the code was perfect .", "solution 2 is not what I am looking after since it adds a vertical scrollbar in div.ui-layout-center which I don t want .", "You would have to include jQuery for this so that Angular uses jQuery instead of jQlite .", "Maybe with some jquery", "I was wondering if how I can modify the settings of that toggle button or anything else for that matter after the layout has already been instantiated .", "In my JS Fiddle http : jsfiddle.net c92whe17 6 I can access the layout and toggle a pane Open or Closed in a click handler function .", "Actually e.controller is an Angular extension to jqLite or jQuery .", "jQlite is an implementation of a cut-down version of the jQuery API .", "I don t specified a width or height for the grid and used ui-grid-auto-resize .", "A lot of those ui elements have settings that need to be overridden in css using important have you tried eliminating css as the culprit already", "I think ui-grid s autoresize has a bug .", "But if I change the HTML to no longer use the body-content div and use body to create the layout we are fine .", "it may well be that the heights are set for body html in the layout CSS and order of loading matters .", "To go fully responsive you ll have to redo all the layout thinking in percentages example :", "It will be a class defining a method to register nested controllers and another one for executing the desired command here .. . .layout .. . on this element and then on all of its children .", "Your problem is the z-index in this file jquery-ui.css search for the class .ui-datepicker and add the property like this : .. . .. . For the moment I overwrite the class you can check it here http : jsfiddle.net luissanchezm86 jxTUw 15 .. . .. . Hope it helps", "I did the things as below : .. . .. . There was only one difference : .. . .. . I am calling layout at page load then on button click I m adding the togglers : .. . .. . something like above .", "I want the other pane s to be always there for other UI purposes .", "It is documented here https : docs.angularjs.org api ng function angular.element - look for jQuery jqLite Extras .", "Also found this post : jquery-sortable list accross different panes http : stackoverflow.com questions 7260660 jquery-sortable-list-accross-different-panes", "When I click on slider button to completely close a pane is always the pane that I want to hide that is hidden except for east pane in which is closed its north child while I want to hide south one .", "You can do : .. . .. . It doesn t update the UI until you toggle it though unless you can find some refresh method so I m just toggling it twice .", "HTML : .. . .. . jQuery : .. . .. . As you can see it almost works but the scrolling doesn t work horizontally .", "I only need this one pane to resize in this fashion .", "Am creating layout for a container div which has two divs inside one is west pane and another in center pane now am changing the width of the container div and then trying to set the west pane size to fill the entire container div its not working as expected this is what i tried .. . .. . Here is the working fiddle sample http : jsfiddle.net VuQ9z 1 .", "You were close .", "This means that the outer directive is responsible for coordinating the creation of the layouts .", "The problem is just that you can t set the div tabs with height : 100 because the outer div has overflow : hidden .. . .. . It will have the same height as its container but as the footer is at the same level as the div tabs it will be hidden because the div.ui-layout-center has the overflow : hidden .", "on css : .. . .. . and on Java script : .. . .. . Any ideas about how to remove teh resiable bar or hide it", "I am trying to create a layout structured like this : .. . .. . north pane .. . center pane .. . a header div .. . a notebook-like tab panel .. . with at least one tab .. . a footer div .. . .. . header div and footer div has to be always visible the tab should take all remaining space and should have a vertical scroll bar if needed .", "Am i missing any call to child layouts or something", "Or changing the elements attributes directly width and position .", "But when the second iframe panel is closed the third iframe panel becomes frames 1 making it the target of iframe panel 1 .", "Iframe panel 1 links will not target panel 2 again until the third panel is opened+ closed ." ] }
{ "confidence": [ 91.0726318359375, 90.07987976074219, 81.65091705322266, 80.06930541992188, 77.08668518066406, 76.51968383789062, 75.26524353027344, 74.85132598876953, 73.00603485107422, 72.45751190185547, 71.20032501220703, 70.21537780761719, 70.07923126220703, 69.18385314941406, 68.58857727050781, 68.42753601074219, 67.80825805664062, 67.6158218383789, 67.06808471679688, 65.0087890625 ], "content": [ "Question : http : jsfiddle.net jc3rj681 2 .. . .. . Using the plugin jQuery UI Layout http : layout.jquery-dev.com I have several different panes . When the user resizes the window to a small size I would like to call a function that changes the minsize and size of the pane so that I can make it smaller with the window . I can do this but for the changes to apply I must toggle closed and then toggle open the pane . This creates a lot of flickering and ends up being pretty messy looking . I only need this one pane to resize in this fashion . QUESTION : Is there a way I can apply these layout changes without having to toggle the pane twice for them to apply Check out this Fiddle that I made : http : jsfiddle.net jc3rj681 2 .. . .. . In here the changes to the width of the show-hide button don t get applied until you toggle the pane . If you can make this width change work without toggling I m sure it would solve my problem as well . .. . Answer : I m not sure if there is a callback function or any special utility method that ll do the trick . But you can try something like the following probably with a resize function that ll resize the panes manually - .. . .. . .. . var testLayout body .layout .. . applyDefaultStyles : true .. . east : .. . spacing closed : 100 toggler width .. . spacing open : 100 .. . togglerLength closed : 200 toggler height length .. . togglerLength open : 200 .. . .. . .. . .. . eastToggle .click function .. . .. . testLayout.toggle east .. . .. . .. . .. . .. . attempt .click function .. . resize east 20 .. . .. . .. . .. . A function to resize the tab .. . function resize region space .. . Width of the new center pane .. . var newCenterWidth parseInt body .ui-layout-center .css width .split px 0 + testLayout.options.east.spacing closed - space .. . .. . Change the options so they don t affect the layout when you expand collapse again .. . testLayout.options.east.spacing closed space .. . testLayout.options.east.spacing open space .. . .. . Manually resize the panes .. . body .ui-layout-resizer- + region .css width space .. . body .ui-layout-center .css width newCenterWidth .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script src http : layout.jquery-dev.net lib js jquery.layout-latest.js script .. . div class ui-layout-center Center div .. . div class ui-layout-north North div .. . div class ui-layout-south South div .. . div class ui-layout-east East div .. . div class ui-layout-west West .. . br .. . br .. . .. . button id eastToggle Toggle East Panel button .. . br .. . br .. . button id attempt Change Width button .. . div Comment : thanks . yeah I think it is simplest and easiest way and prevents the flickering I have now . I will try this and see if it works correctly with the automatically-resizing center pane", "Question : I m trying to make a clone of jsfiddle . This is a 2x2 layout . I found jQuery-UI Layout which works perfectly.. . accept it seems to require a center pane which doesn t exist in a 2x2 layout . How can I disable the center pane Or how can I make a 2x2 panel layout using jQuery UI-layout or another plugin .. . Answer : Simply consider one of your column as center pane and then divide it horizontally in two sub-panes . You have to think it such as a nested layout .", "Question : null .. . Answer : I m using JQuery UI Layout http : layout.jquery-dev.net and I did not find an answer in official documentation... . I have an UI Layout with a noth pane and a south one divided in west and east . East is divided in north and south . When I click on slider button to completely close a pane is always the pane that I want to hide that is hidden except for east pane in which is closed its north child while I want to hide south one . How can I set which pane must be closed everytime that I click a specific slide button Thank you .", "Question : I m kind of new in all this angular.. . I have a custom directive lets call it myDar . Inside this directive I define a link function . In my html I want to to use multiple nested tags of this directive as follows : .. . .. . I want the link function of outer to be executed first . How do I do this That s the general question . If it helps then what I m really trying to do is to create directives that wrap jquery-ui-layout link-to the website http : layout.jquery-dev.net . So I have a directive for ui-layout and directives for center west etc . In the ui-layout directive I call to tElm .layout options . I have a problem when creating a nested layout : .. . .. . Angular executes first the link function of the inner ui-layout directive but for the jquery-ui-layout plugin to work it requires to call tElm .layout options of the outer first otherwise the layout is not rendered correctly . Comment : Can you please explain in details what you need to run in which linking function Comment : Btw angular.module app .directive myDar .. . will register myDar as snake-case in the html my-dar .. . my-dar .. . Answer : For this you will take advantage of the directive s controller . It will be a class defining a method to register nested controllers and another one for executing the desired command here .. . .layout .. . on this element and then on all of its children . This means that the outer directive is responsible for coordinating the creation of the layouts . The full example code is : .. . .. . Replace the line console.log PAYLOAD : + this . element.attr id with the actual code to run . See relevant fiddle : http : jsfiddle.net 8xSjZ .. . .. . If the outer directive was different than the current getting the parent controller would be as easy as requiring y . In this case it gives us the current controller therefore we have to loop e.parent ourselfes . Comment : Great answer . One question : how does the e.controller y work Does this directly call the constructor of the Controller class Comment : Hi thanks . Actually e.controller is an Angular extension to jqLite or jQuery . It is documented here https : docs.angularjs.org api ng function angular.element - look for jQuery jqLite Extras . What it does in short is that it finds an existing controller with the given name attached to the element . So it does not call the constructor it expects the controller to be already constructed and attached to the element . Comment : Thank you . Much appreciated . Comment : One more question : Consider I do not have nested a directive so I have something like div level 1 id a y followed by another div id other level 2 y . While processing the first div in the link function I would like to access the second div using angular.element div level 2 and subsequently the controller using .controller y . See this plunkr : plnkr.co edit oIpvQP http : plnkr.co edit oIpvQP . I get a JQLite exception Looking up elements via selectors is not supported by jqLite See : docs.angularjs.org api angular.element quot http : docs.angularjs.org api angular.element quot Comment : You would have to include jQuery for this so that Angular uses jQuery instead of jQlite . jQlite is an implementation of a cut-down version of the jQuery API . It does not support this kind of selector i.e . div level 2 . I guess there should be some other way to do this by reorganizing your logic .", "Question : I m running into a strange and obscure issue in jQuery UI-layout . I have a dropdown in one of my panes and whenever you click on it it opens but you can select anything . The issue seems to have occured in the past as documented here : https : groups.google.com forum topic jquery-ui-layout ZaJxX3NbPx4 .. . .. . But in that post they said it was tied to showOverflowOnHover - an attribute I have set to false both by default in the plugin and again in each instance . Here is my initialization code : .. . .. . splitter inside is inside of splitter . Anyone else run into this or have any idea on how to fix it I m working on producing a fiddle but having some trouble . .. . Answer : Try this", "Question : I m kind of new in all this angular.. . I have a custom directive lets call it myDar . Inside this directive I define a link function . In my html I want to to use multiple nested tags of this directive as follows : .. . .. . I want the link function of outer to be executed first . How do I do this That s the general question . If it helps then what I m really trying to do is to create directives that wrap jquery-ui-layout link-to the website http : layout.jquery-dev.net . So I have a directive for ui-layout and directives for center west etc . In the ui-layout directive I call to tElm .layout options . I have a problem when creating a nested layout : .. . .. . Angular executes first the link function of the inner ui-layout directive but for the jquery-ui-layout plugin to work it requires to call tElm .layout options of the outer first otherwise the layout is not rendered correctly . Comment : Can you please explain in details what you need to run in which linking function Comment : Btw angular.module app .directive myDar .. . will register myDar as snake-case in the html my-dar .. . my-dar .. . Answer : Depending on the exact use-case a compile function might be a good fit . compile functions are executed before link functions and - what s more important - in reverse order . Meaning parent first . Another solution could be to execute the relevant code of your child directives using timeout . Comment : The no-second timeout did the trick for me since it defers to the next digest cycle .", "Question : I am using the jquery-ui-layout plugin in a website : jQuery UI Layout Hompage http : layout.jquery-dev.com .. . .. . There are options togglerContent open and togglerContent closed that allow you to place html inside of the toggler . I want to include text in my EAST pane but my problem is the text displays horizontally across a vertical toggler so only the first character can be seen . toggler bad http : i.stack.imgur.com MgXLN.png .. . .. . How can I display it so that it reads vertically instead Like either of sry very rough mock-up the options below . Is it an option in jQuery UI Layout or just css toggler desired http : i.stack.imgur.com VxVVk.png .. . .. . EDIT : Does anyone know if this is possible by modifying jQuery UI Layout settings .. . Answer : .parentPane .. . border : 1px solid ccc .. . .. . .. . .parentPane div .. . display : inline-block .. . height : 100px .. . vertical-align : top .. . text-align : center .. . .. . .. . .eastPane .. . background-color : CA7DBD .. . width : 49.5 .. . .. . .. . .westPane .. . background-color : 4679BD .. . width : 49.5 .. . .. . .. . .rotator .. . background-color : ccc .. . display : inline-block .. . margin-top : 20px .. . position : relative .. . transform : rotate 90deg .. . .. . .wizard1 .. . left : 0 .. . .. . .wizard2 .. . right : 40px .. . .. . .. . .wizard2 .. . right : 40px .. . .. . .. . .wizard3 .. . right : 80px .. . .. . .. . .wizard4 .. . right : 120px .. . .. . .. . .. . .. . div class parentPane .. . div class eastPane East Pane div .. . div class westPane div West Pane div .. . div class rotator wizard1 Wizard 1 div .. . div class rotator wizard2 Wizard 2 div .. . div class rotator wizard3 Wizard 3 div .. . div class rotator wizard4 Wizard 4 div .. . div .. . div .. . .. . You can make use of CSS3 transform property . This would rotate the text however the alignment wouldn t still various such container s div s or span s apart . Hence you would use relative positioning to align them next to each other . This is the general syntax you would use of rotation . Making use of the relative positioning you can define the distance between multiple content where the text is vertical . See the below snippet .. . .. . .. . .rotator .. . background-color : ccc .. . display : inline-block .. . margin-top : 20px .. . position : relative .. . transform : rotate 90deg .. . .. . .. . .wizard1 .. . left : 0 .. . .. . .. . .wizard2 .. . right : 40px .. . .. . .. . .wizard2 .. . right : 40px .. . .. . .. . .wizard3 .. . right : 80px .. . .. . .. . .wizard4 .. . right : 120px .. . .. . .. . .. . div class rotator wizard1 Wizard 1 div .. . div class rotator wizard2 Wizard 2 div .. . div class rotator wizard3 Wizard 3 div .. . div class rotator wizard4 Wizard 4 div .. . .. . Hope this helps", "Question : null .. . Answer : I just started using Jquery UI Layout plugin and I m attempting to add vertical-text to the west closed tab . Any idea on how where I would add text to the west closed tab", "Question : I like to make the ui-layout-west section fixed width and like to hide the resizable bar . I tried this but I still see the right border of ui-layout-pane . on css : .. . .. . and on Java script : .. . .. . Any ideas about how to remove teh resiable bar or hide it .. . Answer : Try specifying the spacing open http : layout.jquery-dev.net documentation.cfm Option spacing open and spacing closed http : layout.jquery-dev.net documentation.cfm Option spacing closed options instead of panespacing : Comment : that worked thank you so much", "Question : null .. . Answer : I use jQuery UI Layout plug-in to implement my page layout splitter . But I failed when the layout is loaded dynamically AJAX view loading . Can the layout plug-in be used in dynamic load layout page My situation : .. . .. . 1 . Load page via AJAX from server the page is matched rules of UI layout . 2 . Use UI layout plug-in to initialize layout but it can t work . Thanks . Comment : You are asking a yes or no type question here so.. . maybe Comment : when are you calling the .splitter before or after the ajax call You should call it after the ajax request loads the html", "Question : Having the jquery-ui-layout plugin and two sortable lists elements drag drop in only one direction . See example : http : layout.jquery-dev.net demos droppable.html Each list is in a different pane . I can t make elements do drag drop to either list regardless I set the property connectWith : ul to each sortable list . .. . Answer : Found my problem . float : left directly applied to the .. . .. . was messing all up . Also found this post : jquery-sortable list accross different panes http : stackoverflow.com questions 7260660 jquery-sortable-list-accross-different-panes", "Question : null .. . Answer : On most pages in my app I have the north east south west panes showing with jQuery UI Layout . On one page I do not want any panes to show . I have added the following code to this one page but the four panes still show : .. . .. . What am I doing wrong here Comment : why not just remove the .layout call all together Comment : I tried setting .layout to but it throws off the layout of the central pane then . I spent all day yesterday trying to adjust the CSS for this page but was getting tangled in a rat s nest with adding the necessary stylesheet files and cloning alternate versions of other stylesheets .", "Question : We have been using JQuery UI Layout Plugin http : layout.jquery-dev.com demos simple.html for most of our projects . We have started a new project that uses Bootstrap as the framework . We attempted a simple layout example using Bootstrap containers but the layout will not render in fact no html is rendered . My feeling is that somehow Bootstrap and JQuery UI Layout are not playing nicely . Now for the code : .. . .. . This is what we are trying to do for HTML : .. . .. . This is what we are trying to do for Javascript : .. . .. . However the HTML doesn t render at all we don t see the West or Center text . But if I change the HTML to no longer use the body-content div and use body to create the layout we are fine . Working HTML : .. . .. . Working JS : .. . .. . Here is a JSFiddle http : jsfiddle.net jasonwilczak 7su526xo 4 of it not working and here is a JSFiddle http : jsfiddle.net jasonwilczak 7su526xo 5 of it working . .. . Answer : This page http : getbootstrap.com getting-started third-box-sizing at Bootstrap s site tells you how to circumvent the issue . In short box-sizing : border-box messes around some calculations . If you want to test this quickly go to your bootstrap css file and comment the lines that modify box-sizing then refresh the page -- this worked well for me . Just add this CSS snippet : Comment : see the demo of this at jsfiddle.net 8vno1sxk http : jsfiddle.net 8vno1sxk", "Question : I m trying to get a simple vertical splitter bar working using jQuery UI Layout 1.30.0.3079-rc http : www.nuget.org packages jQuery.UI.Layout . Here is my test page : .. . .. . I want the two content divs to stretch to fill the container horizontally but stretch to fill their content vertically . The div widths work exactly as desired but the heights are always zero pixels unless I hardcode the height in the CSS e.g . Hardcoding the height is not an acceptable solution . In the real website the contents of these divs could be anything from a small fraction of the window height to several multiples of it and the div class RequiredBorder div must enclose the whole lot and size to content . I have read through the jQuery UI Layout documentation and searched on Google but I haven t found anything useful so far . Things I have already tried that didn t work : .. . .. . This renders the container and all its contents with zero width and height . This renders the container and all its contents filling the entire browser window overlaying the rest of the content . The demo pages on the jQuery UI Layout website do not exhibit this problem because they all put the outermost layout directly inside the body element . When I tried that in my page it did work correctly . However the real website will have to enclose the layout in a nested div . I am testing this page in IE 11 and Firefox 29 . Both exhibit exactly the same behaviour . .. . Answer : Um I know this wont work but try adding this div height : 4em width : 4em script very good chance this wont work- - Comment : I don t understand what you are trying to achieve with this . I tried it anyway and it just set the content to a fixed size which is not what I am looking for .", "Question : jsFiddle http : jsfiddle.net jxTUw 14 is provided for better illustration . In this case I am using two plugins : jQuery UI layout plugin http : layout.jquery-dev.net index.cfm Trent datetime picker plugin http : trentrichardson.com examples timepicker . The pop-up datetime picker will be blocked by the west pane resize bar . If I set option west showOverflowOnHover : true the scroll bar won t work . I am follow the overflow setting instruction here http : layout.jquery-dev.net documentation.cfm Drop-Downs but still not get it through yet . Or maybe there is a conflict between these two plugins Comment : The problem is the bar that divides in two the screen which is overlapping the datepicker Comment : yes that s my problem . I want the date picker will be on the upper layer . Let me know if you still not quite sure . Thanks .. . Answer : Your problem is the z-index in this file jquery-ui.css search for the class .ui-datepicker and add the property like this : .. . .. . For the moment I overwrite the class you can check it here http : jsfiddle.net luissanchezm86 jxTUw 15 .. . .. . Hope it helps Comment : Thank you very much . Problem solved I was waiting the count down to accept your answer. . very quick answer lol Comment : lol you re welcome", "Question : I m running into a strange and obscure issue in jQuery UI-layout . I have a dropdown in one of my panes and whenever you click on it it opens but you can select anything . The issue seems to have occured in the past as documented here : https : groups.google.com forum topic jquery-ui-layout ZaJxX3NbPx4 .. . .. . But in that post they said it was tied to showOverflowOnHover - an attribute I have set to false both by default in the plugin and again in each instance . Here is my initialization code : .. . .. . splitter inside is inside of splitter . Anyone else run into this or have any idea on how to fix it I m working on producing a fiddle but having some trouble . .. . Answer : I had the same problem in Firefox where a select list menu inside a UI.Layout pane would disappear when hovered . I finally tracked it down to the interaction of the following : .. . .. . 1 . overflow : auto on pane .. . 2 . the : before content : component of the micro clearfix applied to pane .. . 3 . evt.stopPropagation in addHover in UI.Layout source .. . .. . You can remove any one of these factors to solve the problem . However the bigger issue seems to be bugs in the UI.Layout source code since evt.stopPropagation is NOT the cause of the problem merely a trigger . Commenting out this line will fix the problem even though this line of code doesn t run when the select list bug occurs . I ve reported the issue here : https : groups.google.com forum topic jquery-ui-layout pHHxkewV9ZI", "Question : I can not figure what is wrong with my HTML so jquery-ui-layout library does not want to recalculate widths heights of containers when Zooming Out in Browser Chrome Firefox . In my HTML all white panes are connected to each other but when I Zoom Out they get disconnected.. . I looked at official jquery-ui-layout demos e.g . this one : http : layout.jquery-dev.com demos example.html As you can see on Zoom Out elements their inline style attributes dynamically change their values . But in my code - it does not happen - values remain the same.. . Here s how sections look in my code when Zoom Out a few times in browser : .. . .. . White sections get disconnected from each other http : i.stack.imgur.com 3luYo.png .. . .. . http : plnkr.co edit DhQyktteFfyd5hrKxJQX p preview .. . .. . To see a problem please choose Launch the preview in a separate window in plunker and then Zoom Out in browser a few times .. . Answer : You were 99.99 correct in your approach . you just missed to give height to your layout-container just similar to xxx .. . .. . I just modified following single line : .. . .. . Rest of the code was perfect . Comment : You are a genius sir : I was fighting with this problem for 2 weeks I ll award you a bounty in 15hrs StackOverflow prevents me from doing it earlier Comment : Thanks Yaru . Please don t call me sir.. . : Glad to know it helped you .", "Question : We have been using JQuery UI Layout Plugin http : layout.jquery-dev.com demos simple.html for most of our projects . We have started a new project that uses Bootstrap as the framework . We attempted a simple layout example using Bootstrap containers but the layout will not render in fact no html is rendered . My feeling is that somehow Bootstrap and JQuery UI Layout are not playing nicely . Now for the code : .. . .. . This is what we are trying to do for HTML : .. . .. . This is what we are trying to do for Javascript : .. . .. . However the HTML doesn t render at all we don t see the West or Center text . But if I change the HTML to no longer use the body-content div and use body to create the layout we are fine . Working HTML : .. . .. . Working JS : .. . .. . Here is a JSFiddle http : jsfiddle.net jasonwilczak 7su526xo 4 of it not working and here is a JSFiddle http : jsfiddle.net jasonwilczak 7su526xo 5 of it working . .. . Answer : The issue seems to be with height calculations . The following CSS adjustment helps in your demo although is not a perfect fix . With some additional CSS inspection I m sure you will find the proper final adjustments to make .. . .. . http : jsfiddle.net 25m9qsar 1 Comment : Thank you This appears to be the answer . Give me a few minutes to verify and I will mark it as so or not depending : Comment : it may well be that the heights are set for body html in the layout CSS and order of loading matters . I didn t dig into it very far Comment : This did the trick thank you very much", "Question : null .. . Answer : In the angular-ui-layout module to set the size we need to pass a value like div ui-layout-container size 20 is it possible to pass a model so when ever model value gets changed the size of the panel should also change . Expecting : .. . .. . OR how to set open close of a pane on button click event instead of clicking on small arrows in the divider Comment : Have you tried doing this What happened And please use a different post for multiple questions Comment : I m trying to. . but no luck. . I guess I should build my own directive : Comment : Having the same problem . Any conclusion Comment : @nitech I have implemented my own directive to resize to collapse :", "Question : Ive been experimenting with the adjustable grids plugin jquery-ui-layout . . I was able to set the width of each divs using the plugins. . bt when it comes to height ive only been allowed to adjust the heights of outer div . I was wondering if it is possible to to adjust the height of inner north div ive added in the jsfiddle link http : jsfiddle.net J4bJ3 1 .. . .. . ive tried facetContainer .css height : 50 on load-time . bt it will not wrk .. . Answer : A lot of those ui elements have settings that need to be overridden in css using important have you tried eliminating css as the culprit already edit .. . .. . If I change : .. . .. . to : .. . .. . Resulting in : .. . .. . enter image description here http : i.stack.imgur.com cvNiy.png .. . .. . And when using an id on an element implement the rule as follows : .. . .. . enter image description here http : i.stack.imgur.com RLsk4.png Comment : ive added all the css and js files in the jsfiddle. . the ones tht ive used... . Comment : Yes I overlooked it the first time . Sorry about that . I updated my answer and it seems that this does the trick . Comment : Sam did this answer your question If so could you please mark the answer . If not what went wrong Comment : actually there are two divs with the same name ui-layout-north as u can see in the jsfiddle. . thats y i tried using an id.. . bt that dint wrk. . ive tried ur answer. . it actually breaks the div elements Comment : Ok I edited my answer . What looks broken about this" ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
ternary-representation@digits@99
ternary-representation -- the base-3 positional numeral system which represents numbers using the @placeholder 0 1 and 2 .
{ "confidence": [ 47.8892822265625, 46.737213134765625, 41.63231658935547, 38.34840393066406, 38.24981689453125, 37.14640808105469, 36.28368377685547, 36.11759948730469, 35.81818389892578, 35.360992431640625, 34.94053649902344, 34.826866149902344, 34.78655242919922, 33.53279495239258, 33.525970458984375, 33.015201568603516, 32.497230529785156, 32.32014083862305, 32.304656982421875, 31.99559783935547, 30.964073181152344, 30.956207275390625, 30.861379623413086, 30.84756088256836, 30.833005905151367, 30.775779724121094, 30.743160247802734, 30.450695037841797, 30.391281127929688, 30.385189056396484, 30.222644805908203, 30.222644805908203, 30.050338745117188, 29.865835189819336, 29.775012969970703, 29.55504035949707, 29.377052307128906, 29.36456298828125, 29.1884765625, 29.057863235473633, 28.864660263061523, 28.641582489013672, 28.641582489013672, 28.641582489013672, 28.52760887145996, 28.452056884765625, 28.31093978881836, 28.31093978881836, 28.26021957397461, 28.26021957397461, 28.21576690673828, 28.151229858398438, 28.098312377929688, 28.00197982788086, 28.00197982788086, 27.995527267456055, 27.652252197265625, 27.61370086669922, 27.579448699951172, 27.413997650146484, 27.413997650146484, 27.413997650146484, 27.413997650146484, 27.413997650146484, 27.37413787841797, 27.331146240234375, 27.2498779296875, 26.83283042907715, 26.66463851928711, 26.58314323425293, 26.503620147705078, 26.48736572265625, 26.277423858642578, 26.277423858642578, 25.916427612304688, 25.805007934570312, 25.790719985961914, 25.764087677001953, 25.76045036315918, 25.76045036315918, 25.76045036315918, 25.76045036315918, 25.76045036315918, 25.76045036315918, 25.76045036315918, 25.429611206054688, 25.413230895996094, 25.318180084228516, 25.169586181640625, 25.09467315673828, 25.00834846496582, 25.00834846496582, 24.96415901184082, 24.837055206298828, 24.748443603515625, 24.748443603515625, 24.748443603515625, 24.748443603515625, 24.694927215576172, 24.665119171142578 ], "content": [ "Yes those are not ternary numbers but they are almost in a valid base 3 representation .", "For unsigned a trit could hold 0 1 and 2 .", "I suppose a trit is a bit with three states 0 1 and 2 .", "Those who replied about fractional positive values completely missed the concept of the ternary system which is based on 0 +1 and -1 .", "Also math is easy with ternary take for instance take the base 3 number 20120 177 2 represents-1 and negate it reverse the flow of electricity of each bit so -1 is +1 visa versa and zero stays unchanged then with the correct number formats and hardware you get 10210 or 020120 which is -177 .", "Trinary Ternary can use one of 2 modes : Balanced aka -1 0 +1 or unbalanced 0 1 2 but is not simply on or off or more correctly has 2 on states .", "I got the following question : A trinary computer uses trits instead of bits a trit can have values 0 1 or 2 .", "Actually I think most ternary logic uses +1 0 and -1 states not 0 +0.5 and +1.0 states .", "2 0 1 mod 3 2 1 2 mod 3 2 2 1 mod 3 2 3 2 mod 3 .. .", "With ternary you have 3 3 + 9 outputs .", "I need to convert arbitary length binary into an exact ternary-representation .", "The following code is the wrong direction it is a conversion from ternary to binary based on the fact that 3 2 2 3 + 1 using only binary addition .", "We get this representation in uncarried ternary .", "I can replace int with long-long int but ideally I would like to convert a stream not a fixed size number into a ternary-representation an array of trits ranging from 0..2", "- 2 3 13 + 2 3 12 +..+ 2 3 9 - why the LSB starts with multiplying it with 3 9 and not 3 0", "So for example 120 0 1+2 3+1 9 9+6 15 16-1 4 n -1 .", "For a two input ternary system this number is much higher about 19683 .", "Maybe something like : 0 2 1", "I think using a big integer library would suffice although I m not sure and feel that there should be better way calculate the ternary-representation .", "In your example : odd : 0+1 +1 even : 2 .", "Extract the ternary-representation for each binary bit from the table .", "I m solving a problem where you convert a base-10 positive integer between 0 and 1000000000 to a balanced ternary form as part of Google s code challenge .", "The logic for a binary adder is far simpler than one for ternary numbers or for that matter decimal ones .", "When compared directly Ternary is the integer base with the highest radix economy followed closely by binary and quaternary .", "You now have an easy way to get the low-order base 3 digit by scanning the binary representation of n and usually only addition of either 1 or 2 at each bit position where a 1 occurs .", "Parsing through a string representing a ternary number like binary just 3 I need to be able to know if the result is 1-less than a multiple of 4 .", "There are also ternary logic gates around but very few ternary computers .", "Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 .", "One trit actually represents about 1.58496 log 3 bits of information .", "Even some modern systems use a type of ternary logic aka SQL which implements ternary logic as a means of handling NULL field content .", "Sure but a ternary bit a tet", "Balanced Ternary Trinary is better .", "For all trinary numbers with length 36 including those starting with 0 s how many have exactly equal counts of 1 s and 2 s or exactly one more 1 than 2", "Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions", "Unfortunately 3 bits 2 3 is not exactly represented by 2 trits 3 2 .", "@Potatoswatter thanks for the link-to the article but it supports the idea that ternary is more efficient overall radix 3 is 58 more efficient .", "Arithmetic is defined on integers not the representation of integers in a specific base .", "To convert say the ternary number a 9+b 3+c to binary one starts with the binary representation of a then multiplies that by 3 i.e shift and add then adds the binary representation of b multiplies the result by 3 and adds c . .. . .. . It seems to me this should be doable with a map to get the binary representation of the ternary digits and a fold of a b - a+3 b", "You ve proposed a system of -1 0 and +1 but transistors don t work that way they like to have their voltage or current going in one direction only .", "-1 0 1 Make your output in such a manner .", "Then multiply that by the number of different arrangements of N 2 s in the positions not taken by a 1 and also for N-1 2 s . Find the sum of those 36 numbers .", "I think that ternary would be more efficient .", "If there was a serious case to switch to ternary or decimal then they would .", "You want to build a ternary search tree", "Presumably it would either be an array of chars on the range 0 . . 2 or an array of numeric values on the range 0-2", "If you tried to set thresholds on the circuit and use 0 +1 +2 instead you run into a different set of problems .", "I m not asking for some way to convert base-2 to base-3 I do know how to do this .", "The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions .", "I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 .", "Well whatever most means.. . but I imagine it is as easy to detect the differences between +1 and 0 as it is between -1 and 0 .", "I first designed a 16-bit computer using binary then got to trying to do it with ternary .", "You can read about the ternary number system http : en.wikipedia.org wiki Ternary numeral system for more details .", "@Stephen Classic conversion : a 2 0 + b 2 1 etc .", "First compute a table in advance for each binary bit we need the representation in ternary .", "He s not loading into integers but he s still loading into a non-binary non-ternary representation for translation purposes .", "The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system .", "I need an exact representation .", "2 to the 6 is 64 and 3 to 6 is 729.. .", "In a 3-state system this would have to be taken into account too .", "Also : If a bit is a piece of binary-data what would a piece of ternary data be.. .", "The ternary equivalent of the bit just caused too much outrage", "From what I ve read there are some ternary computers in use .", "It s possible to show that every ternary digit depend on all binary one .", "as far as I ve read about it ternary search tree seems to be solution .", "Multiplying dividing by 2 is simple in any base so the easiest way to convert any base to from binary is to repeatedly multiply divide by 2 keeping track of carry parity .", "There has even been some theories and even possibly starting some tests on the Josephson Effect which would allow for ternary memory cells using circulating superconducting currents either clockwise counterclockwise or off .", "Let say you already have the binary representation of n . Then consider how the powers of 2 work out mod 3 .", "But say you want to convert 3486784400 base 10 to base 3 .", "Is your array of bits an array of 0 and 1 char values", "http : www.falstad.com circuit +1+5.0E-6+2.803162489452614+47+5.0+50 0Aw+496+272+496+336+0 0Ad+352+272+496+272+1+0.805904783 0Ad+208+272+352+272+1+0.805904783 0Aw+208+272+208+336+0 0Ad+352+608+304+608+1+0.805904783 0Ad+400+608+352+608+1+0.805904783 0Ag+352+608+352+656+0 0Ar+400+608+496+336+0+100.0 0Ar+304+608+208+336+0+100.0 0AL+352+272+352+240+0+0+false+5.0+-5.0 0A", "They would not need to be bigger just have the option for 3 possibilities instead of 2 .", "For signed values a trit could hold binary s 1 and 0 but also -1 without the need for a sign bit .", "Explanation : the largest 64 digit trinary number is 3433683820292512484657849089280 3 64-1 .", "If we use 3 states then the main problem arising due to this are .. . .. . 1 .", "To make a 3-state bit would take 2 transistors but you could make 2 binary bits out of the same transistors and have 4 states instead of 3 .", "log 3 6 log 2 9.5097750043269382", "In other words the powers alternate between being 1 mod 3 and being 2 mod 3 .", "10112 8+2+1 11 9 + 2 1023 .. . 100011000011010100110100101110000110111010001111010111010001101001011011011111101100110100101111000101101000101010110101001011000011010010000001110111101010010001000110101110110001111011101110011111101100111010111011010010011100101111111000110001100110001111101101110111101101100011110110110110001001010100101110100001101010110101000110101101100000101101110001110001101010000001100000011111101011100100000110001100010100000010011000110000001001001000011001011110001010010010101011011010000111001100011110111100012 7343280200542654154029818354420920722408633707396360612751407162736942742985658428558632312175242897575484682660836397639769592568209070221085927986634481 120101101102202000202110120010002111102222121202200020021201201112210211201001222210200111200102021101111121121102012112011202220000110101001221221212111121011111210021101021120001112000021212110020221002202112202201110102102002220212210201220121021010101000011222000111102102211201220220112022010020020012212110012211120019", "These are practical reasons why it is not done but mathematically it is perfectly possible to build a computer on ternary logic .", "At the time ternary computers were considered the rest of the world was still also working on the binary computers", "I suspect that politics between the two had a lot to do with the USA s binary s eventual popularity over the USSR s ternary .", "I am actually thinking about trying to implement a very basic FPGA based ternary computer one day .", "Binary took the stage and now a switch to ternary would be a change of everything we know .", "I m basically working on ternary implementation in java .I don t wanna use ajax .", "I ve read ternary by ajax so just mentioned it I don t want to use this .", "A trinary computer has a 9-trit floating-point representation of a number .", "Even there the number of levels will be a power of 2 so that the output can be easily converted to binary for use by the rest of the system .", "So the 1 lsb digit is one more than 0 the 3 2nd digit is one less than 4 the 9 3rd digit is 1 more than 8 the 27 4th digit is one less than 28 etc .", "From binary to ternary would be slightly more complicated as ternary addition and probably subtraction would be required working on that .", "The second digit is now a 2 a legal ternary digit so go on to the third digit .", "Code could be sent through 3 pieces at a time instead of the modern 2 for the same or less power .", "every 3 bits and convert them to 2 trits because trits approximately represent 1.5 bits .", "The alternative would be process each character in the base2 number one by one in which case you ll be dividing by all the powers of 3 for each digit in the base2 representation .", "3 .", "With the expansion of fiber optics and expansive hardware ternary would actually take us to a much more expansive and faster state for a much lower cost .", "I am aware of ways to convert individual int to ternary : .. . .. . Alas with a bitstream even a long-long long int wouldn t suffice .", "I don t know anything about ternary search tree and yeah by build if you mean populate and then search then I want to build one .", "So far I have the code to produce regular ternary plots and my data is in a .txt file and is of the form : .. . .. . Thanks in advance for any help .", "Because 3 6 729 is approximately 2 9.5 724 .", "Why wouldn t that same method work for conversion to ternary" ] }
{ "confidence": [ 63.645042419433594, 62.69920349121094, 61.456520080566406, 59.806705474853516, 59.341285705566406, 57.37662124633789, 57.22751998901367, 57.09111785888672, 56.962066650390625, 56.32154846191406, 53.57688903808594, 51.181602478027344, 47.33075714111328, 45.47956085205078, 43.81917190551758, 43.31378173828125, 42.31587600708008, 42.060943603515625, 41.878204345703125, 41.15946960449219 ], "content": [ "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : I think there might be some different different views of the problem though I m not sure any of them are faster or better . For example the lower order base 3 digit of n is just n mod 3 . Let say you already have the binary representation of n . Then consider how the powers of 2 work out mod 3 . 2 0 1 mod 3 2 1 2 mod 3 2 2 1 mod 3 2 3 2 mod 3 .. . In other words the powers alternate between being 1 mod 3 and being 2 mod 3 . You now have an easy way to get the low-order base 3 digit by scanning the binary representation of n and usually only addition of either 1 or 2 at each bit position where a 1 occurs .", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : I m afraid I don t know enough Haskell to be able to express this in code but I wonder if using Horner s rule for evaluating polynomials might yield a method . For example a x 2 + b x + c can be evaluated as c+x b+x a . To convert say the ternary number a 9+b 3+c to binary one starts with the binary representation of a then multiplies that by 3 i.e shift and add then adds the binary representation of b multiplies the result by 3 and adds c . .. . .. . It seems to me this should be doable with a map to get the binary representation of the ternary digits and a fold of a b - a+3 b", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : I think that everybody is missing something important . First compute a table in advance for each binary bit we need the representation in ternary . In MATLAB I d built it like this although every other step after that will be done purely by hand the computation is so easy . Now consider the binary number 011000101 which happens to be the decimal number 197 as we will find out later . Extract the ternary-representation for each binary bit from the table . I ll write out the corresponding rows . Now just sum . We get this representation in uncarried ternary . Yes those are not ternary numbers but they are almost in a valid base 3 representation . Now all you need to do is to do the carries . Start with the units digit . 5 is larger than 2 so subtract off the number of multiples of 3 and increment the second digit of the result as appropriate . The second digit is now a 2 a legal ternary digit so go on to the third digit . Do that carry too .. . .. . Finally yielding the now completely valid ternary number.. . Were my computations correct I ll let MATLAB make the final judgement for us : .. . .. . Have I pointed out just how trivial this operation was that I could do the conversion entirely by hand going essentially directly from binary to ternary at least once I had that initial table written down and stored Comment : I ll note that this approach works for essentially a direct conversion between any two number bases as long as you compute the appropriate table first . So if you wish to convert from base 3 to base 7 and do it more than once you can do it efficiently .", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : In case this is homework pseudocode to write x in base b backwards : .. . .. . I m sure you can figure out how to write the result forwards instead of backwards . Note that needs to be C-style integer-division the result is an integer truncated toward zero . Note that this doesn t depend at all on the base that the arithmetic is performed in . Arithmetic is defined on integers not the representation of integers in a specific base . .. . .. . Edit : Based on your updated question I would slam the digit representation into an integer via ors and shifts and use the algorithm described above with integer-arithmetic . Certainly you could do it as you describe but it seems like an awful lot of work . Comment : Please see update to the question I clarified what it is about .", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : You can use some clever abbreviations for converting . The following code is the wrong direction it is a conversion from ternary to binary based on the fact that 3 2 2 3 + 1 using only binary addition . Basically I m converting two ternary digits in three binary digits . From binary to ternary would be slightly more complicated as ternary addition and probably subtraction would be required working on that . I m assuming the least significant digit in head of the list which is the only way that makes sense so you have to read the numbers backwards . Edit Here is the binary to ternary direction as expected a little bit more lengthy : .. . .. . Edit2 A slightly improved version of subT which doesn t need addT Comment : Yep that s the solution I ve been coming to myself but it s cumbersome . I believe it s possible to manage making it shorter by generating the conversion templates not specifying all in pattern-matching .", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : No you can t convert a base2 number to a base3 number without loading it into an integer . The reason is that 2 and 3 are coprime - they have no common factors . If you were working with base2 and base4 or even base6 and base9 then the set of integers up to the lowest common multiple of the two bases would be represented by two isomorphic sets . For example 13 base4 0111 base2 so converting 1313 base4 01110111 base2 - it s a find and replace operation . At least the solution that you have works and is relatively simple . If you need to improve performance then convert the entire base2 representation to an integer before starting the base3 conversion it means less modulus operations . The alternative would be process each character in the base2 number one by one in which case you ll be dividing by all the powers of 3 for each digit in the base2 representation . Comment : Looks like @woodchips was able to do what you said can t be done . Comment : He s not loading into integers but he s still loading into a non-binary non-ternary representation for translation purposes . It s a clever solution but it s still an intermediary language so I don t see that it s significantly different . e.g . how do you resolve 01 + 01 + 01 03 in binary or ternary You can t .", "Question : I need to convert arbitary length binary into an exact ternary-representation . Ideally given an array of bits char buffer n the algorithm would be able to produce a array of trits analog of bits and vice versa . Is there such an algorithm I am aware of ways to convert individual int to ternary : .. . .. . Alas with a bitstream even a long-long long int wouldn t suffice . I think using a big integer library would suffice although I m not sure and feel that there should be better way calculate the ternary-representation . A visual example : .. . .. . The short stream is simple because since it nicely fits into an int the nth trit function can be used but the long stream doesn t and so apart from using a big integer library no easy solution occurs to me . Comment : One trit actually represents about 1.58496 log 3 bits of information . If I understand you correctly you are saying that I can take i.e . every 3 bits and convert them to 2 trits because trits approximately represent 1.5 bits . Unfortunately 3 bits 2 3 is not exactly represented by 2 trits 3 2 . I need an exact representation . Comment : Is your array of bits an array of 0 and 1 char values Or is it an array of 8-bit numbers that will be decomposed bit-by-bit i.e . via your nth trit function Likewise.. . what do you want your resulting array of trits to look like Presumably it would either be an array of chars on the range 0 . . 2 or an array of numeric values on the range 0-2 Maybe something like : 0 2 1 Comment : For example my code above takes an int and gives back the exact nth trit . I can replace int with long-long int but ideally I would like to convert a stream not a fixed size number into a ternary-representation an array of trits ranging from 0..2 .. . Answer : Multiplying dividing by 2 is simple in any base so the easiest way to convert any base to from binary is to repeatedly multiply divide by 2 keeping track of carry parity . 10112 8+2+1 11 9 + 2 1023 .. . 100011000011010100110100101110000110111010001111010111010001101001011011011111101100110100101111000101101000101010110101001011000011010010000001110111101010010001000110101110110001111011101110011111101100111010111011010010011100101111111000110001100110001111101101110111101101100011110110110110001001010100101110100001101010110101000110101101100000101101110001110001101010000001100000011111101011100100000110001100010100000010011000110000001001001000011001011110001010010010101011011010000111001100011110111100012 7343280200542654154029818354420920722408633707396360612751407162736942742985658428558632312175242897575484682660836397639769592568209070221085927986634481 120101101102202000202110120010002111102222121202200020021201201112210211201001222210200111200102021101111121121102012112011202220000110101001221221212111121011111210021101021120001112000021212110020221002202112202201110102102002220212210201220121021010101000011222000111102102211201220220112022010020020012212110012211120019", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : If you are doing it with a computer things are already in binary so just repeatedly dividing by 3 and taking remainders is about as easy as things get . If you are doing it by hand long division in binary works just like long division in decimal . just divide by three and take remainders . if we start with 16 .. . .. . so in ternary 121 Comment : In fact I need by hand algorithm to be implemented in program cause data used in computation is data structure having 0 1 states for numerals not some integer . Comment : After thinking about this there is always an implicit-conversion to decimal . In every step the decimal representation is always considered . 100 binary 4 in decimal divided by 11 3 . It s still being converted . Comment : @Vadim You are almost certainly better off converting your data-structures into numbers and using the computer arithmetic . Comment : @Jeff M : there is no implicit-conversion to decimal . division is the same in any base -- it s defined on integers themselves not on their representations in any specific base .", "Question : I need to convert arbitary length binary into an exact ternary-representation . Ideally given an array of bits char buffer n the algorithm would be able to produce a array of trits analog of bits and vice versa . Is there such an algorithm I am aware of ways to convert individual int to ternary : .. . .. . Alas with a bitstream even a long-long long int wouldn t suffice . I think using a big integer library would suffice although I m not sure and feel that there should be better way calculate the ternary-representation . A visual example : .. . .. . The short stream is simple because since it nicely fits into an int the nth trit function can be used but the long stream doesn t and so apart from using a big integer library no easy solution occurs to me . Comment : One trit actually represents about 1.58496 log 3 bits of information . If I understand you correctly you are saying that I can take i.e . every 3 bits and convert them to 2 trits because trits approximately represent 1.5 bits . Unfortunately 3 bits 2 3 is not exactly represented by 2 trits 3 2 . I need an exact representation . Comment : Is your array of bits an array of 0 and 1 char values Or is it an array of 8-bit numbers that will be decomposed bit-by-bit i.e . via your nth trit function Likewise.. . what do you want your resulting array of trits to look like Presumably it would either be an array of chars on the range 0 . . 2 or an array of numeric values on the range 0-2 Maybe something like : 0 2 1 Comment : For example my code above takes an int and gives back the exact nth trit . I can replace int with long-long int but ideally I would like to convert a stream not a fixed size number into a ternary-representation an array of trits ranging from 0..2 .. . Answer : Balanced Ternary Trinary is better . -1 0 1 Make your output in such a manner .", "Question : I need to convert arbitary length binary into an exact ternary-representation . Ideally given an array of bits char buffer n the algorithm would be able to produce a array of trits analog of bits and vice versa . Is there such an algorithm I am aware of ways to convert individual int to ternary : .. . .. . Alas with a bitstream even a long-long long int wouldn t suffice . I think using a big integer library would suffice although I m not sure and feel that there should be better way calculate the ternary-representation . A visual example : .. . .. . The short stream is simple because since it nicely fits into an int the nth trit function can be used but the long stream doesn t and so apart from using a big integer library no easy solution occurs to me . Comment : One trit actually represents about 1.58496 log 3 bits of information . If I understand you correctly you are saying that I can take i.e . every 3 bits and convert them to 2 trits because trits approximately represent 1.5 bits . Unfortunately 3 bits 2 3 is not exactly represented by 2 trits 3 2 . I need an exact representation . Comment : Is your array of bits an array of 0 and 1 char values Or is it an array of 8-bit numbers that will be decomposed bit-by-bit i.e . via your nth trit function Likewise.. . what do you want your resulting array of trits to look like Presumably it would either be an array of chars on the range 0 . . 2 or an array of numeric values on the range 0-2 Maybe something like : 0 2 1 Comment : For example my code above takes an int and gives back the exact nth trit . I can replace int with long-long int but ideally I would like to convert a stream not a fixed size number into a ternary-representation an array of trits ranging from 0..2 .. . Answer : It s possible to show that every ternary digit depend on all binary one . So you can t do better than read the whole string of bits and then do the conversion .", "Question : I need to convert arbitary length binary into an exact ternary-representation . Ideally given an array of bits char buffer n the algorithm would be able to produce a array of trits analog of bits and vice versa . Is there such an algorithm I am aware of ways to convert individual int to ternary : .. . .. . Alas with a bitstream even a long-long long int wouldn t suffice . I think using a big integer library would suffice although I m not sure and feel that there should be better way calculate the ternary-representation . A visual example : .. . .. . The short stream is simple because since it nicely fits into an int the nth trit function can be used but the long stream doesn t and so apart from using a big integer library no easy solution occurs to me . Comment : One trit actually represents about 1.58496 log 3 bits of information . If I understand you correctly you are saying that I can take i.e . every 3 bits and convert them to 2 trits because trits approximately represent 1.5 bits . Unfortunately 3 bits 2 3 is not exactly represented by 2 trits 3 2 . I need an exact representation . Comment : Is your array of bits an array of 0 and 1 char values Or is it an array of 8-bit numbers that will be decomposed bit-by-bit i.e . via your nth trit function Likewise.. . what do you want your resulting array of trits to look like Presumably it would either be an array of chars on the range 0 . . 2 or an array of numeric values on the range 0-2 Maybe something like : 0 2 1 Comment : For example my code above takes an int and gives back the exact nth trit . I can replace int with long-long int but ideally I would like to convert a stream not a fixed size number into a ternary-representation an array of trits ranging from 0..2 .. . Answer : Your algorithm is not so good if the bit buffer is long because each output trit repeats all the divisions also needed for smaller values of n . So converting this algorithm to bignum arithmetic will not be what you want . Another approach : scanning the bits left to right each new one updates the previous value : .. . .. . A trinary number with n trits t i has the value .. . .. . So a trinary representation of val updated for a new scanned bit becomes .. . .. . To make the code simple let s compute the trits in an array of unsigned chars . After they re done you can repack them any way you like . Comment : +1 for the explanation and algorithm . Exactly what I needed . Thanks", "Question : Does anybody know or may point to some source to read about a method or algorithm to convert a number represented in binary numeral system into the ternary one my particular case or universal algorithm for such conversions The solution I ve already implemented is to convert a number to decimal first and then convert it into required numeral system . This works but there are two steps . I wonder if it could be done in one step easily without implementing ternary arithmetic first Is there some trick guys UPD : It seems I didn t manage to describe clearly which way of conversion I m looking for . I m not asking for some way to convert base-2 to base-3 I do know how to do this . You may consider that I have algebraic data-structures for ternary and binary numbers in Haskell it looks like this : .. . .. . And there are two obvious ways to convert one to another : first is to convert it into Integer first and get the result not interesting way second is to implement own multiplication and addition in base-3 and compute the result multiplying digit values to respective power of two straightforward and heavy . So I m wondering if there s another method than these two . Comment : How are you converting to decimal Why wouldn t that same method work for conversion to ternary Comment : @Stephen : He s looking for a direct conversion no intermediary conversion to decimal . Comment : @Jeff M : Right . He converts from base 2 to base 10 without any intermediary conversions . The same algorithm will allow him to convert from base 2 to base 3 without any intermediate conversions . Comment : @Stephen Classic conversion : a 2 0 + b 2 1 etc . So I ll have to implement multiplication in ternary arithmetic . This is what I d like to avoid just for fun to find some tricky and fast way . Comment : @Stephen : Ah I see your point . .. . Answer : I don t think there s a super-efficient way . The solution I ve already implemented is to convert a number to decimal first . I assume that you are actually converting to some built-in integer type first . I don t think that built-in integer has anything to do with base 10 . Though when you print it there will be a base 10 conversion . Maybe you d expect there to be some algorithm which looks at the input one digit at a time and produces the output . But say you want to convert 3486784400 base 10 to base 3 . You ll need to examine every digit before producing output because .. . .. . ..also .. . .. . compute the result multiplying digit values to respective power of two .. . .. . explicitly computing a power isn t necessary see http : stackoverflow.com questions 3358662 convert-from-base-60-to-base-10 Comment : The solution I ve already implemented is to convert a number to decimal first . - it was mistake just converting mentioned algebraic type BNumber to Integer .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : There are some people here that have no idea what they are talking about . I first designed a 16-bit computer using binary then got to trying to do it with ternary . First to all that are saying the hardware is too difficult it is difficult to differentiate the values...well you re completely wrong I can make a not gate in ternary and I don t even need transistors only diodes which in case anyone here doesn t realize can be made smaller and more efficiently on a die . Secondly you need to realize that +1 and -1 are THE SAME THING one flows one way the other flows the other there is no difference between them it makes complete sense . Also math is easy with ternary take for instance take the base 3 number 20120 177 2 represents-1 and negate it reverse the flow of electricity of each bit so -1 is +1 visa versa and zero stays unchanged then with the correct number formats and hardware you get 10210 or 020120 which is -177 . Some people here just seem to think binary is better because the way things are is better my question to these people in the middle ages bleeding blood was common but does that make it the best medical practice far from it . Almost every breakthrough in science was formed from a new idea that at first seemed useless for instance microwaves . http : www.falstad.com circuit +1+5.0E-6+2.803162489452614+47+5.0+50 0Aw+496+272+496+336+0 0Ad+352+272+496+272+1+0.805904783 0Ad+208+272+352+272+1+0.805904783 0Aw+208+272+208+336+0 0Ad+352+608+304+608+1+0.805904783 0Ad+400+608+352+608+1+0.805904783 0Ag+352+608+352+656+0 0Ar+400+608+496+336+0+100.0 0Ar+304+608+208+336+0+100.0 0AL+352+272+352+240+0+0+false+5.0+-5.0 0A", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : Sure but a ternary bit a tet would be more complicated you d still be storing the same amount of information just in base3 instead of base2 and the power if two-state components is the simplicity . Why not just go ahead and make a 10-state base10 .. . .. . Binary computing is related to binary AND OR and NOT gates their immense simplicity and ability to be combined into arbitrarily complex structures . They are the cornerstone of literally all the processing your computer does . If there was a serious case to switch to ternary or decimal then they would . It isn t a case of they tried it like that and it just stuck Comment : Side note : It s a trit from trinary digit . Comment : Side note 2 : you d actually be able to store more in a trit than a bit . For signed values a trit could hold binary s 1 and 0 but also -1 without the need for a sign bit . For unsigned a trit could hold 0 1 and 2 . Binary would require 2 bits to equate . And in the case of a deca system you d be able to hold an immense amount of information over a bit or even a trit .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : Of course we d be able to hold more data per bit just like our decimal number system can hold far more data in a single digit . But that also increases complexity . Binary behaves very nicely in many cases making it remarkably simple to manipulate . The logic for a binary adder is far simpler than one for ternary numbers or for that matter decimal ones . You wouldn t magically be able to store or process more information . The hardware would have to be so much bigger and more complex that it d more than offset the larger capacity . Comment : Does that come from actual experience designing hardware or simply a gut instinct Comment : ojblass : It comes from people actually making decimal computers in the 1940s onwards . There are also ternary logic gates around but very few ternary computers . See for example Wikipedia s article on the history of computing hardware : en.wikipedia.org wiki History of computing hardware http : http : en.wikipedia.org wiki History of computing hardware http : en.wikipedia.org wiki Ternary logic and en.wikipedia.org wiki Ternary computer http : en.wikipedia.org wiki Ternary computer Comment : By definition the logic for trits is more complicated than bits . In binary if you have two bit inputs you have 2 2 4 outputs . With ternary you have 3 3 + 9 outputs . Comment : @James : computers are complicated one way or another v see en.wikipedia.org wiki Radix economy Radix times required digits http : en.wikipedia.org wiki Radix economy Radix times required digits for background on the studies that led early engineers to decide on binary . Comment : @Potatoswatter thanks for the link-to the article but it supports the idea that ternary is more efficient overall radix 3 is 58 more efficient . The only reason there provided was noise immunity from voltage fluctuations which is honestly a good reason especially during the early days of computing . Less so now though.. .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : Lots of misinformation here . Binary has a simple on off switch . Trinary Ternary can use one of 2 modes : Balanced aka -1 0 +1 or unbalanced 0 1 2 but is not simply on or off or more correctly has 2 on states . With the expansion of fiber optics and expansive hardware ternary would actually take us to a much more expansive and faster state for a much lower cost . Modern coding could still be used much like 32-bit software is still able to be used on 64 bit hardware in combination with newer ternary codes at least initially . Just need the early hardware to check which piece of info coming through or the software to announce ahead of time if it is a bit or a trit . Code could be sent through 3 pieces at a time instead of the modern 2 for the same or less power . With fiber optic hardware instead of the modern on off binary process it would be determined by 0 off and the other 2 switches as orthogonal polarizations of light . As for security this could actually be made massively more secure for the individual as each PC or even user is set to a specific polarization specs that is only to be sent received between the user and the destination . The same would go for the gates with other hardware . They would not need to be bigger just have the option for 3 possibilities instead of 2 . There has even been some theories and even possibly starting some tests on the Josephson Effect which would allow for ternary memory cells using circulating superconducting currents either clockwise counterclockwise or off . When compared directly Ternary is the integer base with the highest radix economy followed closely by binary and quaternary . Even some modern systems use a type of ternary logic aka SQL which implements ternary logic as a means of handling NULL field content . SQL uses NULL to represent missing-data in a database . If a field contains no defined value SQL assumes this means that an actual value exists but that the value is not currently recorded in the database . Note that a missing value is not the same as either a numeric value of zero or a string value of zero length . Comparing anything to NULL even another NULL results in an UNKNOWN truth state . For example the SQL expression City Paris resolves to FALSE for a record with Chicago in the City field but it resolves to UNKNOWN for a record with a NULL City field . In other words to SQL an undefined field represents potentially any possible value : a missing city might or might not represent Paris . This is where trinary logic is used with modern day binary systems albeit crude . Comment : This is a late response that probably won t do anyone any good but I contend that your comparison of the binary trinary transition being analogous to the 32-bit 64-bit transition is fallacious . In the latter case nothing truly changed about the function of the hardware at a fundamental level the instruction mov eax ebx will do precisely the same thing in either instruction-set . With the trinary binary distinction this is no longer a reasonable guarantee : a trinary register may look very different from a binary register mov eax ebx might not mean the same thing to both encodings . Comment : @bionicOnion : I don t see a problem with backwards compatibility . The binary code 89 d8 in 0 1 bits would stay the same in trits but you get a lot more opcodes where any one of these 16 trits can be -1 . And those are not the same opcode .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : There are also theories that suggest that fiber optics could use light frequencies i.e.color to differentiate states thereby allowing a near infinite depending on resolution of the detection unit number of base possibilities . Logic gates are definitely feesible for any base but let s use trinary for an example : .. . .. . For a trinary XOR gate it could be exclusive to one or any of the three states it is comparing OR one of the other three states . It could also tie two of the three states together for a binary output . The possibilities increase literally exponentially . Of course this would require more complex hardware and software but the complexity should decrease the size and more importantly the power read heat . There is even talk of using trinary in a nano computing system where there is a microscopic bump a hole or unchanged to represent the three states . Right now we are in sort of a QWERTY type problem . Qwerty was designed to be inefficient because of a problem with typing mechanics that no longer exists but everyone who uses keyboards today learned to use the qwerty system and no one wants to change it . Trinary and higher bases will someday break through this issue when we reach the physical limitations of binary computing . Maybe not for another twenty years but we all know that we cannot continue doubling our capability every year and a half forever .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : A lot of it has to do with the fact that ultimately bits are represented as electrical impulses and it s easier to build hardware that simply differentiates between charged and no charge and to easily detect transitions between states . A system utilizing three states has to be a bit more exact in differentiating between charged partly charged and no charge . Besides that the charged state is not constant in electronics : the energy starts to bleed eventually so a charged state varies in actual level of energy . In a 3-state system this would have to be taken into account too . Comment : Actually I think most ternary logic uses +1 0 and -1 states not 0 +0.5 and +1.0 states . Comment : Well whatever most means.. . but I imagine it is as easy to detect the differences between +1 and 0 as it is between -1 and 0 . Comment : Try writing code that distinguishes three values using only one if-statement . no case allowed Comment : can i make up a language construct Comment : @IfLoop Are you referring to Fortran s Arithmetic If", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : Another major hurdle is that there are a much larger number of logic operations that would need to be defined . The number of operators is found by the formula b b i where b is the base and i is the number of inputs . For a two input binary system this works out to 16 possible operators . Not all of this are usually implemented in gates and some gates cover more than one condition however all of them can be implemented with three or less of the standard gates . For a two input ternary system this number is much higher about 19683 . While several of these gates would be similar to one another ultimately the ability to design basic circuits manually would be almost impossible . While even a freshmen engineering student is able to design basic binary circuits in their head .", "Question : Isn t a three state object immedately capable of holding more information and handling larger values I know that processors currently use massive nets of XOR gates and that would need to be reworked . Since we are at 64 bit we can represent 2 63 possible states computing the equivalent ternary http : en.wikipedia.org wiki Ternary 5Fcomputer generation could support number with 30 more tens places log 3 63-2 63 . I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0 . Would some compexity of the hardware power consumption or chip density offset any gains in storage and computing power .. . Answer : Screwball s reply is correct and corrects some of the misstatements offered here . Those who replied about fractional positive values completely missed the concept of the ternary system which is based on 0 +1 and -1 . When first constructed by the Russians in the 1950 s the competition between USSR and USA was intense . I suspect that politics between the two had a lot to do with the USA s binary s eventual popularity over the USSR s ternary . From what I ve read there are some ternary computers in use . Moscow has some in use at their university and IBM has some in its labs . There are references to others but I couldn t distinguish how serious they are or if they are just for experimentation or play . Apparently they are much less costly to build and they use far less energy to operate ." ] }
[ "yes-answer-long", "yes-answer-short" ]
digits
UNK_RELATION
keypoint@algorithm@91
keypoint -- in computer-vision field a keypoint is an interest point detected by the sift @placeholder .
{ "confidence": [ 45.70465087890625, 44.8407096862793, 44.00312805175781, 43.71577072143555, 42.99213790893555, 41.98005294799805, 40.59681701660156, 40.59681701660156, 39.99407196044922, 39.10646057128906, 38.986297607421875, 38.904296875, 38.904296875, 38.904296875, 38.47242736816406, 38.09297180175781, 37.72100830078125, 37.5400276184082, 37.45719528198242, 36.63123321533203, 36.63123321533203, 35.325111389160156, 35.19919204711914, 34.64201354980469, 34.64201354980469, 34.64201354980469, 34.64201354980469, 33.57231140136719, 33.55223846435547, 33.55223846435547, 33.55223846435547, 33.55223846435547, 32.246116638183594, 32.246116638183594, 31.15516471862793, 30.71397590637207, 30.71397590637207, 30.71397590637207, 30.635488510131836, 30.617443084716797, 30.494625091552734, 30.494625091552734, 30.494625091552734, 29.40485191345215, 29.40485191345215, 29.40485191345215, 29.40485191345215, 29.40485191345215, 29.101682662963867, 28.449005126953125, 28.098730087280273, 28.098730087280273, 28.098730087280273, 28.098730087280273, 28.098730087280273, 27.95633316040039, 27.95633316040039, 27.95633316040039, 27.95633316040039, 26.866561889648438, 26.866561889648438, 26.866561889648438, 26.566587448120117, 26.566587448120117, 25.560440063476562, 25.560440063476562, 25.113357543945312, 24.52096939086914, 24.344989776611328, 24.02358627319336, 23.467639923095703, 23.46188735961914, 23.0452880859375, 22.946136474609375, 22.881563186645508, 22.717464447021484, 22.717464447021484, 22.717464447021484, 22.717464447021484, 22.717464447021484, 22.573122024536133, 22.450069427490234, 22.237743377685547, 22.237743377685547, 22.161518096923828, 22.161518096923828, 22.12884521484375, 22.013145446777344, 21.73904800415039, 21.571043014526367, 21.571043014526367, 21.267000198364258, 20.936973571777344, 20.264921188354492, 20.213668823242188, 19.855979919433594, 19.63085174560547, 19.475067138671875, 19.475067138671875, 19.307659149169922 ], "content": [ "This is the size field of OpenCV s KeyPoint class .", "Here are the keypoints detected using GoodFeaturesToTrack keypoint detection .", "The output of feature-detection is a std : : vector cv : : KeyPoint where every keypoint contain : .. . .. . Point2f pt : coordinates of the keypoint .. . float size : diameter of the meaningful keypoint neighborhood .. . float angle : computed orientation of the keypoint -1 if not applicable .", "With the use of DRAW RICH KEYPOINTS flags in drawKeypoints for each keypoint the circle around keypoint with keypoint size and orientation will be drawn .", "Take the keypoint I ve circled lets call it Image 1 Keypoint 1 .", "Is there a some relationship between the keypoint size and the octave or sublevel when it is detected", "Is it the same with the KeyPoint class", "KeyPoint Quality KPQ .. . 5 .", "Keypoint matching is a problem with several dimensions .", "The angle field is the dominant orientation of the keypoint this could be set to -1 note .", "The keypoint of the training set which will have the most votes will be associate to the keypoint of query set .", "KeyPoint stores salient points description .", "These points is gotten by hand not by KeyPoint Detector .", "I want each pixel to be a keypoint", "Usually keypoint detectors work on a local neighbourhood around a point .", "Possible duplicate of : stackoverflow.com questions 17015995 http : stackoverflow.com questions 17015995 opencv-sift-descriptor-keypoint-radius", "Why are the first keypoint x and y values NANs", "Its these distances between them and Image 1 Keypoint 1 that I want to obtain so to compare them against Image 2 Keypoint 1 and its 5 surround keypoints in the same area see below so as to not just compare a keypoint to another keypoint but to compare known shapes based off of the locations of the keypoints .", "I need to iterate over the detected keypoints accessing the x y and size fields of each keypoint .", "So maybe the problem is somehow related to the keypoint detection .", "KeyPoint Quality-Adaptive Scale KPQ-AS .. . 7 .", "This is the orientation of the keypoint which we will cover next .", "I haven t work with Java CV but in C++ OpenCV Keypoint is structure for ONE keypoint while detector needs to get a vector of keypoints .", "Think for example of a keypoint that originates from the corner of a window of a house .", "You can do a filter on the pixels distance between two keypoint .", "I remember there was a bug in one of those versions regarding keypoint extraction .", "But looking at the cout for the first keypoint the x and y values are soft NANs .", "If my thoughts are right then there are some questions in my experiment : a keypoint in RGB image may have value zero in the corresponding depth image therefore an actual matched keypoint in the RGB image may not be matched in the transformed point cloud .", "As I understand the orientation of a keypoint is determined by the peak pixel gradient among around .", "I am trying to understand how to get the descriptor for a given KeyPoint in OpenCV .", "Could you explain in more detail what are the params passed to the KeyPoint object", "Ok I get it but then the way of creating the KeyPoint and pass it to the DescriptorExtractor is ok", "It seems with these results that BRISK is not better to describe a keypoint than ORB", "Each keypoint that you detect has an associated descriptor that accompanies it .", "The class id member field can be used in practice to store any information that you find useful for each keypoint .", "I have found some short description about the class id of a keypoint .", "It will be processed by the application using Sobel Edge Detection Algorithm and Keypoint Matching .", "In Keypoint Matching the image will be compared to my images saved in the asset folder .", "We can easily identify that the top of the cameraman as an interest point matches with the rotated version because we take a look at points that surround the keypoint and see what orientation all of these points are in.. . and from there that s how the orientation is computed .", "My writing to file looks like this : .. . .. . But so far I have been utterly unable to read this back out into its original state of std : : vector cv : : KeyPoint so to do keypoint matching .", "He kept the two best candidates for a match with a given query keypoint ie points that had the lowest distance or highest similarity .", "Compute for each keypoint a descriptor that is for example the offsets in normalized coordinates of the 4 or 5 closest keypoints .. . 4 .", "The problem was that the keypoint extractor didn t clear the output vectors before extracting new keypoints : .. . .. . I had to patch it like this :", "Look at the lines below : .. . .. . I wrote them to see if my interpretation regarding KeyPoint is valid .", "Here is my code : .. . .. . Should I set the size param of KeyPoint to 32 for 32x32 patch .", "OpenCV KeyPoint class http : docs.opencv.org modules features2d doc common interfaces of feature detectors.html highlight featuredetector FeatureDetector .. . .. . Another reference here .", "still remember that the whole keypoint feature-detection thing will find exactly this specific model .", "I am working with OpenCV keypoints and I got a questions about keyPoint size and octave .", "While debugging I have noticed that the vector for Key Points of type vector KeyPoint is empty and hence the code fails from this point on and exceptions are thrown .", "According to OpenCV KeyPoint http : docs.opencv.org java org opencv features2d KeyPoint.html documentation there is response field in every keypoints that : .. . .. . float response : The response by which the strongest keypoints have been selected .", "The opencv keypoint structure has pt X Y coordination and angle Orientation but I could not understand where is the Scale parameter", "I ve spent some months studying and making experiments with the process of keypoint detection description and matching .", "My first try was to use KeyPoint Matching with SURF as Detector Descriptor and BF as Matcher .", "D - The Homography output is the basic code from the Documentation given the DMatch containing the keypoint locations for all the inliers .", "Some frameworks only do a keypoint detection while other frameworks are simply a description framework and they don t detect the points .", "When comparing 2 images via feature-extraction how do you compare keypoint distances so to disregard those that are obviously incorrect", "in reality you can t make any assumptions about the amount of translation rotation shearing that s why you have to rely on comparing features not keypoint locations .", "If you try to access the first keypoint before the loop begins cout it- pt.x or cout keypoints 0 .pt.x do you still get incorrect readings", "save file : .. . .. . read file : .. . .. . link-to http : answers.opencv.org http : answers.opencv.org question 4040 to-save-vector-keypoint-to-file-using-builtin-write-function", "Why the orientation of a keypoint yellow line is different with the major most frequent orientation in its description most popular bin in green here", "I know that a keyPoint have a coordinate x y and size which simply can be described as a circle with x y center and radius of size .", "1 Yes there is in general a relationship between the keypoint size or scale and the octave and sublevel of detection : the bigger the size scale the higher the combined octave and sublevel .", "In reference manual of OpenCV 2.4.3 KeyPoint : : class id is described as object id that can be used to clustered keypoints by an object they belong to .", "Due to lack of my adequate knowledge about keypoint I can t understand whats the purpose of class id .", "And i don t understand why i do like this way : Follow the link http : stackoverflow.com questions 20537280 keypoint-list-to-matofkeypoint rq 1", "But when I stream from Kinect and convert the RGB stream to grayscale and use keypoint detector the Flann based detector fails to extract keypoints from the stream .", "Can be used for further sorting or subsampling .. . int octave : octave pyramid layer from which the keypoint has been extracted .. . int class id : object id that can be used to clustered keypoints by an object they belong to", "For example I write an object detector algorithm in c++ and I tell you that if you give me a collection of keypoints I ll modify their class id field to tell you which object each keypoint belongs-to .", "The point what I don t undestand concern the 16 entries for each hypothesis .. . .. . Here is what I understood : .. . .. . In order to associate any keypoint from the query keypoints set to the trained keypoints set we are going to use the voting process of the Hough transform .", "See http : docs.opencv.org java 2.4.2 org opencv features2d KeyPoint.html .. . The correct way to manually initialize it in Java will be : .. . .. . or to get a list of keypoints for image : .. . .. . DMatch constains a description of a matching keypoint descriptors .", "I am new to computer-vision + OpenCV so probably a better explanation than OpenCV s documentation could help .", "The larger the circle the larger the scale was that the point was detected at .", "The process for finding SIFT keypoints is : .. . .. . 1 . blur and resample the image with different blur widths and sampling rates to create a scale space .. . 2 . use the difference of gaussians http : en.wikipedia.org wiki Difference of Gaussians method to detect blobs at different scales the blob centers become our keypoints at a given x y and scale .. . 3 . assign every keypoint an orientation by calculating a histogram of gradient orientations for every pixel in its neighbourhood and picking the orientation bin with the highest number of counts .. . 4 . assign every keypoint a 128-dimensional feature vector based on the gradient orientations of pixels in 16 local neighbourhoods .. . .. . Step 2 gives us scale invariance step 3 gives us rotation invariance and step 4 gives us a fingerprint of sorts that can be used to identify the keypoint .", "I read about SIFT SURF Fern BRIFT and even the evolution algorithms .", "Select a pixel p in the image which is to be identified as an interest point or not .", "The function gives the corners in Point2f type .If you want to compute the descriptors we need the keypoints and converting Point2f to Keypoint with the code snippet below leads to the loss of scale and rotational invariance .", "Here are some links to get you started with Bag of Words : https : gilscvblog.wordpress.com 2013 08 23 bag-of-words-models-for-visual-categorization .. . .. . Sample code : http : answers.opencv.org question 43237 pyopencv from-and-pyopencv to-for-keypoint-class", "I opened a new question because it s not directly connected to this one : stackoverflow.com questions 25752497 http : stackoverflow.com questions 25752497 keypoint-matching-just-works-two-times-java-opencv", "Is it possible to have the system know where one keypoint is in relation to another and then discard the matches that on one image are right next to each other but are in completely different places on the other", "EDIT : .. . .. . I checked your code so you should do : .. . .. . However when you get back KeyPoint you have location but loosed other information .", "SIFT http : me.berkeley.edu young sift.png", "But please be aware that this will depend on the choice of key point detector SIFT SURF .. . as well as its implementation .", "For example the combination Detector-Descriptor-Matcher SURF-SURF-FlannBased does not works for me and gives me the following error : .. . .. . juan@juan-HP-G62-NoteBook-PC : workspace keypoint Debug . keypoint Creating feature detector descriptor extractor and descriptor matcher .. . .. . .. . Can not create feature detector or descriptor extractor or descriptor matcher of given types .", "Anyway the signature of the function that the question talks about is void cv : : evaluateFeatureDetector const Mat img1 const Mat img2 const Mat H1to2 std : : vector KeyPoint keypoints1 std : : vector KeyPoint keypoints2 float repeatability int correspCount const Ptr FeatureDetector fdetector which seems different from points within the homograph that you defined in your answer .", "In MATLAB 2011 onwards MSER can be combined with SURF descriptors Included in the Computer Vision System ToolBox .", "@VIctor I used a computer-vision library called Dlib : dlib.net http : dlib.net .", "Have a look at David Lowe s paper of SIFT : SIFT http : www.cs.ubc.ca lowe papers ijcv04.pdf for some insights .", "BTW the SIFT tutorial is a classic .", "Now what you mean by circular .. . that correlates with the scale that the point was detected at .", "I want get the SIFT feature for specified points .", "The equations can be found in the SIFT paper page 11 .", "Try your code with sift or surf .", "Keypoint and write code : .. . .. . In order to test if this has worked I then comment out the above block minus the following lines : .. . .. . I am then using the following code to read the keypoints and draw them on the image : .. . .. . However when the program starts it is showing the image minus any keypoints .", "SIFT flow http : people.csail.mit.edu celiu SIFTflow is an example of this .", "I am using VLfeat open-source for extracting SIFT keypoints and their descriptions .", "After searching for an answer to this 1 http : docs.opencv.org modules features2d doc common interfaces of feature detectors.html 2 http : stackoverflow.com questions 7643342 convert-keypoints-to-mat-or-save-them-to-text-file-opencv 3 http : stackoverflow.com questions 19074380 how-to-save-stdvectorkeypoint-to-a-text-file-in-c 4 http : stackoverflow.com questions 14898540 converting-mat-to-keypoint I am still confused on both .. . .. . If this is possible .. . and if so how to do it .. . .. . I want to be able to read from an .xml file which has had a cv : : Mat containing Point2f keypoints written to it reading it back into its original state of std : : vector cv : : KeyPoint .", "Basically if you want to detect keypoints regardless of scale and orientation when they talk about orientation of keypoints what they really mean is that they search a pixel neighbourhood that surrounds the keypoint and figure out how this pixel neighbourhood is oriented or what direction this patch is oriented in .", "The estimate with the higher count of inliers wins .. . David Lowe performed another kind of filtering in the original SIFT paper .", "We were using SIFT in openCV 2.4.3 and we decided to upgrade to openCV 2.4.6 .", "Error detected at line 25 ." ] }
{ "confidence": [ 63.58675765991211, 59.986305236816406, 52.40953063964844, 51.2889518737793, 48.58298110961914, 47.264163970947266, 47.264163970947266, 45.95768356323242, 45.73889923095703, 45.24129104614258, 44.55071258544922, 44.490047454833984, 44.31747817993164, 44.165775299072266, 44.117061614990234, 41.80099868774414, 41.049644470214844, 41.044288635253906, 40.6615104675293, 40.36423110961914 ], "content": [ "Question : I am working with OpenCV keypoints and I got a questions about keyPoint size and octave . I know that a keyPoint have a coordinate x y and size which simply can be described as a circle with x y center and radius of size . And I know that there are some octave levels during which the image is being downsampled by 2 that the keyPoints are being detected . I have 2 questions about this . 1 . Is there a some relationship between the keypoint size and the octave or sublevel when it is detected 2 . What is the maximum number of octave levels that image can have As at every octave level the image is being downsampled by 2 does that mean that the answer is Log 2 image-size And what about sublevel Comment : Possible duplicate of : stackoverflow.com questions 17015995 http : stackoverflow.com questions 17015995 opencv-sift-descriptor-keypoint-radius .. . Answer : 1 Yes there is in general a relationship between the keypoint size or scale and the octave and sublevel of detection : the bigger the size scale the higher the combined octave and sublevel . But please be aware that this will depend on the choice of key point detector SIFT SURF .. . as well as its implementation . Have a look at David Lowe s paper of SIFT : SIFT http : www.cs.ubc.ca lowe papers ijcv04.pdf for some insights . enter image description here http : i.stack.imgur.com mmL0m.jpg .. . .. . 2 That would indeed in theory be the maximum number of octaves for an image in practice this will never be used : if I am recalling correctly the OpenCV SIFT detector only uses 2 or 3 octaves with each 3 intermediate scales . Comment : Thanks for a thoughtful answer . For the second question how it might be somehow surprising for KAZE the number of sublevels is limited to 11 and number of ocvaves with 15 . I am using KAZE and AKAZE detectors . So they does not depend on the image-size . I have reached at this point by trying many examples .", "Question : I want get the SIFT feature for specified points . These points is gotten by hand not by KeyPoint Detector . My question is : I only know the position of the points but have no idea about the size and angle value . How should I set this value Here is my code : .. . .. . Should I set the size param of KeyPoint to 32 for 32x32 patch . Is this implementation reasonable .. . Answer : Usually keypoint detectors work on a local neighbourhood around a point . This is the size field of OpenCV s KeyPoint class . The angle field is the dominant orientation of the keypoint this could be set to -1 note . OpenCV KeyPoint class http : docs.opencv.org modules features2d doc common interfaces of feature detectors.html highlight featuredetector FeatureDetector .. . .. . Another reference here . http : physics.nyu.edu grierlab manuals opencv classcv 1 1KeyPoint.html Comment : So am I right to set size to 32 Comment : And setting size to 32 means : a 32x32 local neighbourhood patch around a point right Comment : I d say so yes . But it is quite meaningless since what you are marking are just points and not keypoints . It ll be a question of what these points are used for in the next stage of the algorithm . Comment : Thanks for you answer In face these points are landmark points of face and will be used for face alignment . Comment : Yes right . I m familiar with such a technique . Consider marking an answer correct if it does solve your problem .", "Question : I am trying to understand how to get the descriptor for a given KeyPoint in OpenCV . So far my code looks like follows : .. . .. . The problem is that I am getting no data in the descriptor . What am I missing Could you explain in more detail what are the params passed to the KeyPoint object I am new to computer-vision + OpenCV so probably a better explanation than OpenCV s documentation could help . Comment : Let me understand the points are 0 0 and 10 10 Comment : Yes that s what opencv s doc says . Comment : Then see my answer : .. . Answer : You re trying to computer ORB on the points 0 0 and 10 10 but they are too close to the image border so ORB can t compute descriptors in those locations . ORB as well as the other binary descriptors filters them out . EDIT : since you asked about usage I m editing the answer . You should pass the whole image . I use it as : Comment : Ok I get it but then the way of creating the KeyPoint and pass it to the DescriptorExtractor is ok If I take a small patch of 5x5 in the image when computing the descriptor should I pass the whole image or only that patch Comment : See my answer :", "Question : When using OpenCV for example algorithms like SURF are often used to detect keypoints . My question is what actually are these keypoints I understand that they are some kind of points of interest of an image . I also know that they are scale invariant and I know they are circular . Also I found out that they have orientation but I couldn t understand what actually it is . It is an angle but between the radius and something Can you give some explanation please I think I need first something simpler and after that it will be easier to understand the papers . Comment : I think it would be useful for future readers if you added some of the references that explains your key findings . Comment : Key-points should simply be points x y imo . What describes a point and basically the region around it should be called a descriptor . Some keypoints mix those terms and they become points with an attached description vector just like @rayryeng explained . Comment : @William - That s a good point that many people confuse . I ll add that to my post . Thanks Comment : Sorry I forgot . Consider it done : Comment : Actually thank you .. . Answer : Those are some very good questions . Let s tackle each point one by one : .. . .. . My question is what actually are these keypoints Keypoints are the same thing as interest points . They are spatial locations or points in the image that define what is interesting or what stand out in the image . The reason why keypoints are special is because no matter how the image changes.. . whether the image rotates shrinks or is subject to distortion you should be able to find the same keypoints in the image . Here s an example from a post I wrote a while ago : .. . .. . http : i.stack.imgur.com L4RUT.png .. . .. . Source : module object has no attribute drawMatches opencv python http : stackoverflow.com questions 20259025 module-object-has-no-attribute-drawmatches-opencv-python 26227854 26227854 .. . .. . The image on the right is a rotated version of the left image . I ve also only displayed the top 10 matches between the two images . If you take a look at the top 10 matches these are points that we probably would want to focus on that would allow us to remember what the image was about . We would want to focus on the face of the cameraman as well as the camera the tripod and some of the buildings in the background . You see that these same points were found between the two images and these were successfully matched . Therefore what you should take away from this is that these are points in the image that are interesting and that they should be found no matter how the image is distorted . I understand that they are some kind of points of interest of an image . I also know that they are scale invariant and I know they are circular . You are correct . Scale invariant means that no matter how you scale the image you should still be able to find those points . .. . .. . Now as what William said in his comment to you above keypoints are really just spatial locations in the image . What makes keypoints different between frameworks is the way you describe these keypoints . These are what are known as descriptors . Each keypoint that you detect has an associated descriptor that accompanies it . Some frameworks only do a keypoint detection while other frameworks are simply a description framework and they don t detect the points . There are also some that do both - they detect and describe the keypoints . SIFT and SURF are examples of frameworks that both detect and describe the keypoints . .. . .. . Now what we re venturing into is the descriptor part - scale and orientation . The keypoints we ve nailed that concept down but we need the descriptor part if it is our purpose to try and match between keypoints in different images . Now what you mean by circular .. . that correlates with the scale that the point was detected at . Take for example this image that is taken from the VLFeat Toolbox tutorial http : www.vlfeat.org overview sift.html : .. . .. . http : www.vlfeat.org demo sift basic 2.jpg .. . .. . You see that any points that are yellow are interest points but some of these points have a different circle radius . These deal with scale . How interest points work in a general sense is that we decompose the image into multiple scales . We check for interest points at each scale and we combine all of the points together that build the output . The larger the circle the larger the scale was that the point was detected at . Also there is a line that radiates from the centre of the circle to the edge . This is the orientation of the keypoint which we will cover next . Also I found out that they have orientation but I couldn t understand what actually it is . It is an angle but between the radius and something Basically if you want to detect keypoints regardless of scale and orientation when they talk about orientation of keypoints what they really mean is that they search a pixel neighbourhood that surrounds the keypoint and figure out how this pixel neighbourhood is oriented or what direction this patch is oriented in . This is important for matching so that you can match keypoints together . Take a look at the first figure I have with the two cameramen - one rotated while the other isn t . If you take a look at some of those points how do we figure out how one point matches with another We can easily identify that the top of the cameraman as an interest point matches with the rotated version because we take a look at points that surround the keypoint and see what orientation all of these points are in.. . and from there that s how the orientation is computed . Usually when we want to detect keypoints we just take a look at the locations . However if you want to match keypoints between images then you definitely need the scale and the orientation to facilitate this . .. . .. . Hope this helps", "Question : null .. . Answer : Boy do I need some help I need to iterate over the detected keypoints accessing the x y and size fields of each keypoint . The code I am using is almost all copied from tutorials . Here is a section of the code where I m having trouble . and the output I get . I get 12 keypoints . The imshow looks correct and shows 12 keypoints . But looking at the cout for the first keypoint the x and y values are soft NANs . The first size is correct . The next 11 x y and size values are all correct . Why are the first keypoint x and y values NANs I am probably accessing them incorrectly but everything i have tried gives the same results . Thanks for any help . Barry . Comment : If you try to access the first keypoint before the loop begins cout it- pt.x or cout keypoints 0 .pt.x do you still get incorrect readings Comment : I discovered the problem . I am using SimpleBlobDetector . I was setting the param params.filterByArea false . This caused the error . I set params.filterByArea true params.minArea 0.1 and the NANs disappeared .", "Question : I am using VLfeat open-source for extracting SIFT keypoints and their descriptions . The image below shows one of them . The yellow disc indicates the keypoint s scale radius and orientation line . The green frame indicates its description i.e . 4x4 8-bin orientation histogram . The question itself is simple . Why the orientation of a keypoint yellow line is different with the major most frequent orientation in its description most popular bin in green here As I understand the orientation of a keypoint is determined by the peak pixel gradient among around . Then shouldn t it be natural for the orientation to be also shown in green Is it because the green frame is much bigger than the keypoint s scale SIFT http : me.berkeley.edu young sift.png Comment : Image not showing Comment : Sorry . I updated the image link . .. . Answer : There are at least three things to consider in order to explain why this needs not to be the case : .. . .. . The first one is the fact that the main yellow orientation has a 36bin histogram and the descriptor green orientations are 8bin this allows for an error of a couple 30 of degrees . The second one is that the descriptor histograms green are calculated after the feature area was rotated by its main yellow orientation so they would at very least be shifted by this rotation . But the most important reason is that both orientations are calculated from the same region but a different neighbourhood different in size and position altoghether so the gradients of them need not to be similar at all .", "Question : I am using VLfeat open-source for extracting SIFT keypoints and their descriptions . The image below shows one of them . The yellow disc indicates the keypoint s scale radius and orientation line . The green frame indicates its description i.e . 4x4 8-bin orientation histogram . The question itself is simple . Why the orientation of a keypoint yellow line is different with the major most frequent orientation in its description most popular bin in green here As I understand the orientation of a keypoint is determined by the peak pixel gradient among around . Then shouldn t it be natural for the orientation to be also shown in green Is it because the green frame is much bigger than the keypoint s scale SIFT http : me.berkeley.edu young sift.png Comment : Image not showing Comment : Sorry . I updated the image link . .. . Answer : I think this is just a matter of visualization used in VLfeat . As described here http : www.vlfeat.org overview frame.html standard http : www.vlfeat.org demo frame standard.jpg .. . .. . the standard oriented frame will be visualized as a circle with a radius pointing downwards . The same applies here . If you rotate the frame such that the radius points downwards then the major gradient direction of the frame should be horizontal which is agreed in most histograms inside the 4x4 squares . I think this convention makes sense because the radius pointing downwards is aligned with the main strokes of the frame which is visually intuitive but orthogonal to the major gradient direction .", "Question : null .. . Answer : I am tring to implement the Hough transform voting process . I read the article of LOWE : Distinctive Image Features from Scale-Invariant Keypoints https : www.cs.ubc.ca lowe papers ijcv04.pdf and another published earlier : Invariant Features from Interest Point Groups http : citeseerx.ist.psu.edu viewdoc download doi 10.1.1.66.4499 rep rep1 type pdf .. . .. . Here are my issue : .. . .. . For the context I want to compare the keypoints from an image Image2 with the keypoints of another image Image1 . In that context I assume the Image1 is my trained image and Image2 my Query image . The point what I don t undestand concern the 16 entries for each hypothesis .. . .. . Here is what I understood : .. . .. . In order to associate any keypoint from the query keypoints set to the trained keypoints set we are going to use the voting process of the Hough transform . The keypoint of the training set which will have the most votes will be associate to the keypoint of query set . What is the main idea of the Hough Transform . For doing this each keypoints set is move in a Hough Space : x y S Theta . Then six loops are made for : .. . .. . for each point of the query transformed keypoints : .. . .. . x 0 - 0.25 width : step 1 .. . .. . y 0 - 0.25 height : step 1 .. . .. . S 0 - S 2 : step 1 .. . .. . 0 - 360 : step 30 .. . .. . for each point of the trained transformed keypoints .. . .. . if a point from the trained keypoints is inside the constraints so it s position in the accumulator is increase . .. . Then just before moving to the next query transformed keypoints the accumulator is read and the index with the highest value is associate as corresponding keypoints from the trained transformed keypoints . I do think I missunderstood something and I have no idea about the 16 entries . Thanks in advance for any help .", "Question : I only can get image features form MAT file but I also want some other information such as positions orientation and scale . How can I get these information could anyone offer its code Thank you in advance . .. . Answer : The output of feature-detection is a std : : vector cv : : KeyPoint where every keypoint contain : .. . .. . Point2f pt : coordinates of the keypoint .. . float size : diameter of the meaningful keypoint neighborhood .. . float angle : computed orientation of the keypoint -1 if not applicable . Its possible values are in a range 0 360 degrees . It is measured relative to image coordinate system y-axis is directed downward ie in clockwise . float response : the response by which the most strong keypoints have been selected . Can be used for further sorting or subsampling .. . int octave : octave pyramid layer from which the keypoint has been extracted .. . int class id : object id that can be used to clustered keypoints by an object they belong to Comment : Thank you I am a new beginner of OPENCV . I thought these are included in MAT file . Comment : what kind of MAT file Here http : docs.opencv.org trunk doc tutorials features2d feature-detection feature detection.html feature-detection is a tutorial about feature-detection it reads two images into two cv : : Mat s detects feature points over them and finally draws the points over the images . With the use of DRAW RICH KEYPOINTS flags in drawKeypoints for each keypoint the circle around keypoint with keypoint size and orientation will be drawn .", "Question : When comparing 2 images via feature-extraction how do you compare keypoint distances so to disregard those that are obviously incorrect I ve found when comparing similar images against each other most of the time it can fairly accurate but other times it can throws matches that are completely separate . So I m after a way of looking at the 2 sets of keypoints from both images and determining whether the matched keypoints are relatively in the same locations on both . As in it knows that keypoints 1 2 and 3 are so far apart on image 1 so the corresponding keypoints matched on image 2 should be of a fairly similar distance away from each other again . I ve used RANSAC and minimum distance checks in the past but only to some effect they don t seem to be as thorough as I m after . Using ORB and BruteForce .. . .. . EDIT .. . .. . Changed x y and z to 1 2 and 3 .. . .. . EDIT 2 -- I ll try to explain further with quick Paint made examples : .. . .. . Say I have this as my image : .. . .. . enter image description here http : i.stack.imgur.com OcxMb.png .. . .. . And I give it this image to compare against : .. . .. . enter image description here http : i.stack.imgur.com tWk7L.png .. . .. . Its a cropped and squashed version of the original but obviously similar . Now say you ran it through feature-detection and it came back with these results for the keypoints for the two images : .. . .. . enter image description here http : i.stack.imgur.com IaRV2.png enter image description here http : i.stack.imgur.com mzozd.png .. . .. . The keypoints on both images are in roughly the same areas and proportionately the same distance away from each other . Take the keypoint I ve circled lets call it Image 1 Keypoint 1 . enter image description here http : i.stack.imgur.com rcDzn.png .. . .. . We can see that there are 5 keypoints around it . Its these distances between them and Image 1 Keypoint 1 that I want to obtain so to compare them against Image 2 Keypoint 1 and its 5 surround keypoints in the same area see below so as to not just compare a keypoint to another keypoint but to compare known shapes based off of the locations of the keypoints . enter image description here http : i.stack.imgur.com rjZ42.png .. . .. . -- .. . .. . Does that make sense Comment : your example is far too constructed and easy . in reality you can t make any assumptions about the amount of translation rotation shearing that s why you have to rely on comparing features not keypoint locations . Comment : Well its an incredibly simplified example so to get the point across . But anyway surely you can be able to have an image with known keypoints that you re happy with then be able to know the relationship between all of these i.e . the relational distances between them and the shape of the keypoints and use that to compare with another images keypoints to get ride of those that don t fall roughly into that known shape from your own image on top of comparing features too obviously .. . Answer : Keypoint matching is a problem with several dimensions . These dimensions are : .. . .. . spatial distance ie the x y distance as measured from the locations of two keypoints in different images .. . feature distance that is a distance that describes how much two keypoints look alike . Depending on your context you do not want to compute the same distance or you want to combine both . Here are some use cases : .. . .. . optical flow as implemented by opencv s sparse Lucas-Kanade optical flow http : docs.opencv.org modules video doc motion analysis and object tracking.html calcopticalflowpyrlk . In this case keypoints called good features are computed in each frame then matched on a spatial distance basis . This works because the image is supposed to change relatively slowly the input frames have a video framerate .. . image stitching as you can implement from opencv s features2d http : docs.opencv.org modules features2d doc features2d.html free or non-free http : docs.opencv.org modules nonfree doc feature detection.html . In this case the images change radically since you move your camera around . Then your goal becomes to find stable points ie points that are present in two or more images whatever their location is . In this case you will use feature distance . This also holds when you have a template image of an object that you want to find in query images . In order to compute feature distance you need to compute a coded version of their appearance . This operation is performed by the DescriptorExtractor http : docs.opencv.org modules features2d doc common interfaces of descriptor extractors.html class . Then you can compute distances between the output of the descriptions : if the distance between two descriptions is small then the original keypoints are very likely to correspond to the same scene point . Pay attention when you compute distances to use the correct distance function : ORB FREAK BRISK rely on Hamming distance while SIFt and SURF use a more usual L2 distance . Match filtering .. . .. . When you have individual matches you may want to perform match filtering in order to reject good individual matches that may arise from scene ambiguities . Think for example of a keypoint that originates from the corner of a window of a house . Then it is very likely to match with another window in another house but this may not be the good house or the good window . You have several ways of doing it : .. . .. . RANSAC performs a consistency check of the computed matches with the current solution estimate . Basically it picks up some matches at random computes a solution to the problem usually a geometric transform between 2 images and then counts how many of the matchings agree with this estimate . The estimate with the higher count of inliers wins .. . David Lowe performed another kind of filtering in the original SIFT paper . He kept the two best candidates for a match with a given query keypoint ie points that had the lowest distance or highest similarity . Then he computed the ratio similarity query best similarity query 2nd best . If this ratio is too low then the second best is also a good candidate for a match and the matching result is dubbed ambiguous and rejected . Exactly how you should do it in your case is thus very likely to depend on your exact application . Your specific case .. . .. . In your case you want to develop an alternate feature descriptor that is based on neighbouring keypoints . The sky is obviously the limit here but here are some steps that I would follow : .. . .. . 1 . make your descriptor rotation and scale invariant by computing the PCA http : en.wikipedia.org wiki Principal component analysis of the keypoints : .. . .. . Form a matrix from KP locations in current image .. . cv : : Mat allKeyPointsMatrix gatherAllKeypoints keypoints .. . .. . Compute PCA basis .. . cv : : PCA currentPCA allKeyPointsMatrix 2 .. . .. . Reproject keypoints in new basis .. . cv : : Mat normalizedKeyPoints currentPCA.project allKeyPointsMatrix .. . .. . .. . 2 . optional sort the keypoints in a quadtree or kd-tree for faster spatial indexing .. . .. . 3 . Compute for each keypoint a descriptor that is for example the offsets in normalized coordinates of the 4 or 5 closest keypoints .. . 4 . Do the same in your query image .. . 5 . Match keypoints from both mages based on these new descriptors . Comment : I ve edited my question to further explain myself Comment : I ve added a section that addresses your problem more specifically . Comment : I ve been looking into that for the past couple of days and it is so confusing.. . Could you elaborate a bit more please @sansuiso", "Question : In reference manual of OpenCV 2.4.3 KeyPoint : : class id is described as object id that can be used to clustered keypoints by an object they belong to . Due to lack of my adequate knowledge about keypoint I can t understand whats the purpose of class id . My another question is by using feature detector descriptor and matcher we can detect matching keypoints of a query object in a training image . But how can segment out the query object in the training image . Can we use grabcut or watershed algorithm if yes how Answer of either question will be helpful . Thanks in advance.. . .. . Answer : The class id member field can be used in practice to store any information that you find useful for each keypoint . As the documentation says you can store for example the id of a detected object . For example you have an image extract keypoints from it e.g . with SURF run some object detector with these features and the result is that each input feature contains now in class id the id of the corresponding object or -1 if they are attached to no object . I don t actually know if this field is filled by some OpenCV function or it is just for your use . Regarding your second question matching features may not be enough to segment out your object because features can be located inside the object so that you don t get any information about the outline . This is a good starting point though if you have more information about the object . For example if you know that your object is planar a poster on the wall you can use the feature matches to compute a homography between the input and the training images . This would give you an outline . Or for example a large collection of close matched features may be an indication of the presence of an object . From that you may try some other color segmentation edge matching etc . Comment : @ChoronoTrigger thanks for your helpful ans . but class id is not still clear to me . what did you mean by run some object detector with these features Comment : I mean that any algorithm can use that field for information purposes . For example I write an object detector algorithm in c++ and I tell you that if you give me a collection of keypoints I ll modify their class id field to tell you which object each keypoint belongs-to .", "Question : null .. . Answer : In my opencv project I try to compute sift features I detect keypoints and compute descriptors . What I know it should contains 4 parameter : X Y Scale and Orientation . The opencv keypoint structure has pt X Y coordination and angle Orientation but I could not understand where is the Scale parameter can you explain me about this parameter", "Question : When using OpenCV for example algorithms like SURF are often used to detect keypoints . My question is what actually are these keypoints I understand that they are some kind of points of interest of an image . I also know that they are scale invariant and I know they are circular . Also I found out that they have orientation but I couldn t understand what actually it is . It is an angle but between the radius and something Can you give some explanation please I think I need first something simpler and after that it will be easier to understand the papers . Comment : I think it would be useful for future readers if you added some of the references that explains your key findings . Comment : Key-points should simply be points x y imo . What describes a point and basically the region around it should be called a descriptor . Some keypoints mix those terms and they become points with an attached description vector just like @rayryeng explained . Comment : @William - That s a good point that many people confuse . I ll add that to my post . Thanks Comment : Sorry I forgot . Consider it done : Comment : Actually thank you .. . Answer : I m not as familiar with SURF but I can tell you about SIFT which SURF is based on . I provided a few notes about SURF at the end but I don t know all the details . .. . .. . SIFT http : en.wikipedia.org wiki Scale-invariant feature transform aims to find highly-distinctive locations or keypoints in an image . The locations are not merely 2D locations on the image but locations in the image s scale space meaning they have three coordinates : x y and scale . The process for finding SIFT keypoints is : .. . .. . 1 . blur and resample the image with different blur widths and sampling rates to create a scale space .. . 2 . use the difference of gaussians http : en.wikipedia.org wiki Difference of Gaussians method to detect blobs at different scales the blob centers become our keypoints at a given x y and scale .. . 3 . assign every keypoint an orientation by calculating a histogram of gradient orientations for every pixel in its neighbourhood and picking the orientation bin with the highest number of counts .. . 4 . assign every keypoint a 128-dimensional feature vector based on the gradient orientations of pixels in 16 local neighbourhoods .. . .. . Step 2 gives us scale invariance step 3 gives us rotation invariance and step 4 gives us a fingerprint of sorts that can be used to identify the keypoint . Together they can be used to match occurrences of the same feature at any orientation and scale in multiple images . .. . .. . SURF http : en.wikipedia.org wiki SURF aims to accomplish the same goals as SIFT but uses some clever tricks in order to increase speed . For blob detection it uses the determinant of Hessian http : en.wikipedia.org wiki Blob detection The determinant of the Hessian method . The dominant orientation is found by examining the horizontal and vertical responses to harr wavelets http : en.wikipedia.org wiki Haar wavelet . The feature descriptor is similar to SIFT looking at orientations of pixels in 16 local neighbourhoods but results in a 64-dimensional vector . SURF features can be calculated up to 3 times faster than SIFT features yet are just as robust in most situations . .. . .. . For reference : .. . .. . A good SIFT tutorial http : www.aishack.in tutorials sift-scale-invariant-feature-transform-introduction .. . .. . An introduction to SURF http : docs.opencv.org trunk doc py tutorials py feature2d py surf intro py surf intro.html Comment : Very nice . Totally love the tl dr differences between SURF and SIFT . Comment : @rayryeng Thanks though it s only because I don t really know enough to say anything more . I haven t really used SURF before . Comment : I would have never known BTW the SIFT tutorial is a classic . That s the first thing I read before Lowe s paper . Comment : @rayryeng Author of the tutorial here - glad to hear you liked it Comment : @UtkarshSinha I love your work and AI Shack . Keep writing", "Question : When comparing 2 images via feature-extraction how do you compare keypoint distances so to disregard those that are obviously incorrect I ve found when comparing similar images against each other most of the time it can fairly accurate but other times it can throws matches that are completely separate . So I m after a way of looking at the 2 sets of keypoints from both images and determining whether the matched keypoints are relatively in the same locations on both . As in it knows that keypoints 1 2 and 3 are so far apart on image 1 so the corresponding keypoints matched on image 2 should be of a fairly similar distance away from each other again . I ve used RANSAC and minimum distance checks in the past but only to some effect they don t seem to be as thorough as I m after . Using ORB and BruteForce .. . .. . EDIT .. . .. . Changed x y and z to 1 2 and 3 .. . .. . EDIT 2 -- I ll try to explain further with quick Paint made examples : .. . .. . Say I have this as my image : .. . .. . enter image description here http : i.stack.imgur.com OcxMb.png .. . .. . And I give it this image to compare against : .. . .. . enter image description here http : i.stack.imgur.com tWk7L.png .. . .. . Its a cropped and squashed version of the original but obviously similar . Now say you ran it through feature-detection and it came back with these results for the keypoints for the two images : .. . .. . enter image description here http : i.stack.imgur.com IaRV2.png enter image description here http : i.stack.imgur.com mzozd.png .. . .. . The keypoints on both images are in roughly the same areas and proportionately the same distance away from each other . Take the keypoint I ve circled lets call it Image 1 Keypoint 1 . enter image description here http : i.stack.imgur.com rcDzn.png .. . .. . We can see that there are 5 keypoints around it . Its these distances between them and Image 1 Keypoint 1 that I want to obtain so to compare them against Image 2 Keypoint 1 and its 5 surround keypoints in the same area see below so as to not just compare a keypoint to another keypoint but to compare known shapes based off of the locations of the keypoints . enter image description here http : i.stack.imgur.com rjZ42.png .. . .. . -- .. . .. . Does that make sense Comment : your example is far too constructed and easy . in reality you can t make any assumptions about the amount of translation rotation shearing that s why you have to rely on comparing features not keypoint locations . Comment : Well its an incredibly simplified example so to get the point across . But anyway surely you can be able to have an image with known keypoints that you re happy with then be able to know the relationship between all of these i.e . the relational distances between them and the shape of the keypoints and use that to compare with another images keypoints to get ride of those that don t fall roughly into that known shape from your own image on top of comparing features too obviously .. . Answer : You can do a filter on the pixels distance between two keypoint . Let s say matches is your vector of matches kp 1 your vector of keypoints on the first picture and kp 2 on the second . You can use the code above to eliminate obviously incorrect matches . You just need to fix a threshold .", "Question : Dears 1-I know the Point class is regarding two channel integer value coordinates points : like MatOfPoint is a vector of integer points . Is it the same with the KeyPoint class I know It is a class containing salient points.Is it true to look at them as two channel float value coordinates points Look at the lines below : .. . .. . I wrote them to see if my interpretation regarding KeyPoint is valid . Please validate this . 2-what is Dmatch match.trainIdx I mean what is trainIdx Peace .. . Answer : KeyPoint stores salient points description . It stores x y angle size etc . See http : docs.opencv.org java 2.4.2 org opencv features2d KeyPoint.html .. . The correct way to manually initialize it in Java will be : .. . .. . or to get a list of keypoints for image : .. . .. . DMatch constains a description of a matching keypoint descriptors . See http : docs.opencv.org java 2.4.2 org opencv features2d DMatch.html .. . It is returned by DescriptorMatcher implementation match knnmatch radiusmatch functions . You pass matrixes queryDescriptors and trainDescriptors to one of these functions . trainIdx is a row index in trainDescriptors which is closest to a given descriptor in queryDescriptors . I d suggest reading original OpenCV description and examples for C++ Java provides only mapping to C++ functionality through JNI . Comment : Hey I just had a little question and could not find the answer while it is not worth a separate question : what is the difference between Mat.cols and Mat.width", "Question : null .. . Answer : I am doing a research in the topic of 3D feature detectors and descriptors for point-clouds . I am supposed to use ready implementations in my application but I have noticed that there are no implemented functions or toolboxes for this area . I would like any matlab help in the following detectors 3D point cloud as input : .. . .. . 1 . Local Surface Patches LSP .. . 2 . Intrinsic Shape Signatures ISS .. . 3 . Heat Kernel Signature HKS .. . 4 . KeyPoint Quality KPQ .. . 5 . Laplace-Beltrami Scale-Space LBSS .. . 6 . KeyPoint Quality-Adaptive Scale KPQ-AS .. . 7 . Salient Points SP .. . 8 . 3d scale dependent corners .. . 9 . Laplace-Beltrami Scale space LBSS .. . .. . Thanks in advance . I appreciate any help", "Question : null .. . Answer : Recently I have made research on descriptors for RGB-D images but I m facing problems on how to compute the recall-precision now . My direct thoughts are first after detecting and describing the keypoints converting the two depth images into point-clouds respectively . Second using ground truth data rotation matrices and vectors to transform the two point-clouds to a world coordinate system . Third just computing recall-precision as what will do on a single point cloud . If my thoughts are right then there are some questions in my experiment : a keypoint in RGB image may have value zero in the corresponding depth image therefore an actual matched keypoint in the RGB image may not be matched in the transformed point cloud . How could I compute the recall-precision correctly", "Question : I m java developer .My goal is to detect image keypoints using javaCV .. . .. . this is my code : .. . .. . but when I run this code I got an access violation exception .. . .. . I can t see where is the problem Comment : any response please .. . Answer : I haven t work with Java CV but in C++ OpenCV Keypoint is structure for ONE keypoint while detector needs to get a vector of keypoints . You have to use analogue of std : : vector used in C++ in Java . e.g . Array or something similar .", "Question : We were using SIFT in openCV 2.4.3 and we decided to upgrade to openCV 2.4.6 . After the upgrade the memory usage jumped from about 150MB to 1.2GB in openCV 2.4.6 . Does someone knows if is this a bug or something that we need to configure now Our image has 1.4MB . This behavior was observed on iOS . The problem seems to be happening also in Linux CentOs . Tks Comment : I have a similar problem using OpenCV 2.4.10 in Linux . The memory is correctly deleted afterwards so there is no memory leak it s just that the process uses 17 MB of RAM alone and 1 GB when the feature-detection is running . .. . Answer : I remember there was a bug in one of those versions regarding keypoint extraction . I saw it with ORB so I don t know if it is the same problem here but I tell you in case it can be of any help . The problem was that the keypoint extractor didn t clear the output vectors before extracting new keypoints : .. . .. . I had to patch it like this : Comment : We had seen this same behavior but it isn t the problem we are facing now . The huge memory usage occurs when we do the first Feature Detection and when the detection completes the huge allocated memory gets free . Tks . Comment : Even though I think your answer can help someone else . Tks +1 Comment : And how many features do you get Maybe the threshold values mean something different now and you are getting many more features than before . Comment : The detector parameters are the same all with default values . I m getting 8k KeyPoints in version 2.4.6 and 2k KeyPoints in version 2.4.3 .", "Question : When comparing 2 images via feature-extraction how do you compare keypoint distances so to disregard those that are obviously incorrect I ve found when comparing similar images against each other most of the time it can fairly accurate but other times it can throws matches that are completely separate . So I m after a way of looking at the 2 sets of keypoints from both images and determining whether the matched keypoints are relatively in the same locations on both . As in it knows that keypoints 1 2 and 3 are so far apart on image 1 so the corresponding keypoints matched on image 2 should be of a fairly similar distance away from each other again . I ve used RANSAC and minimum distance checks in the past but only to some effect they don t seem to be as thorough as I m after . Using ORB and BruteForce .. . .. . EDIT .. . .. . Changed x y and z to 1 2 and 3 .. . .. . EDIT 2 -- I ll try to explain further with quick Paint made examples : .. . .. . Say I have this as my image : .. . .. . enter image description here http : i.stack.imgur.com OcxMb.png .. . .. . And I give it this image to compare against : .. . .. . enter image description here http : i.stack.imgur.com tWk7L.png .. . .. . Its a cropped and squashed version of the original but obviously similar . Now say you ran it through feature-detection and it came back with these results for the keypoints for the two images : .. . .. . enter image description here http : i.stack.imgur.com IaRV2.png enter image description here http : i.stack.imgur.com mzozd.png .. . .. . The keypoints on both images are in roughly the same areas and proportionately the same distance away from each other . Take the keypoint I ve circled lets call it Image 1 Keypoint 1 . enter image description here http : i.stack.imgur.com rcDzn.png .. . .. . We can see that there are 5 keypoints around it . Its these distances between them and Image 1 Keypoint 1 that I want to obtain so to compare them against Image 2 Keypoint 1 and its 5 surround keypoints in the same area see below so as to not just compare a keypoint to another keypoint but to compare known shapes based off of the locations of the keypoints . enter image description here http : i.stack.imgur.com rjZ42.png .. . .. . -- .. . .. . Does that make sense Comment : your example is far too constructed and easy . in reality you can t make any assumptions about the amount of translation rotation shearing that s why you have to rely on comparing features not keypoint locations . Comment : Well its an incredibly simplified example so to get the point across . But anyway surely you can be able to have an image with known keypoints that you re happy with then be able to know the relationship between all of these i.e . the relational distances between them and the shape of the keypoints and use that to compare with another images keypoints to get ride of those that don t fall roughly into that known shape from your own image on top of comparing features too obviously .. . Answer : What is it you are trying to do exactly More information is needed to give you a good answer . Otherwise it ll have to be very broad and most likely not useful to your needs . And with your statement determining whether the matched keypoints are relatively in the same locations on both do you mean literally on the same x y positions between 2 images I would try out the SURF algorithm . It works extremely well for what you described above though I found it to be a bit slow unless you use gpu acceleration 5fps vs 34fps . Here is the tutorial for surf I personally found it very useful but the executables are for linux users only . However you can simply remove the OS specific bindings in the source code and keep only the opencv related bindings and have it compile + run on linux just the same . https : code.google.com p find-object Tutorials .. . .. . Hope this helped Comment : You ve misread what I wrote see my EDIT -- I meant that the arbitrary positions of the keypoints x y and z NOT the x y coordinates of the keypoints ." ] }
[ "yes-answer-long", "yes-answer-short" ]
algorithm
UNK_RELATION
zend-pdf@pdf@47
zend-pdf -- questions related to zend-pdf the @placeholder manipulation engine component of zend-framework .
{ "confidence": [ 69.47692108154297, 63.00792694091797, 55.43143081665039, 53.584251403808594, 52.11396026611328, 51.02532196044922, 50.29429244995117, 49.74188995361328, 49.54705047607422, 49.54705047607422, 48.863792419433594, 48.863792419433594, 48.863792419433594, 48.46812057495117, 46.94147491455078, 46.625755310058594, 46.462772369384766, 45.735565185546875, 45.735565185546875, 44.87401580810547, 43.60024642944336, 43.60024642944336, 43.16566467285156, 43.08001708984375, 42.31737518310547, 42.15876770019531, 42.07360076904297, 42.07360076904297, 42.07360076904297, 41.62844467163086, 41.62844467163086, 41.55337142944336, 41.171634674072266, 39.60237121582031, 39.455928802490234, 39.455928802490234, 39.08274841308594, 38.89659118652344, 38.00368118286133, 37.64533233642578, 37.29192352294922, 37.262794494628906, 36.80195999145508, 36.09617614746094, 36.063690185546875, 34.78992462158203, 34.78992462158203, 34.23789596557617, 34.23695373535156, 34.028717041015625, 33.7864990234375, 33.634483337402344, 33.413780212402344, 33.116146087646484, 32.71031188964844, 32.71031188964844, 31.81291389465332, 31.718427658081055, 31.26981544494629, 31.26981544494629, 31.228302001953125, 31.010225296020508, 29.73645782470703, 29.73645782470703, 29.28872299194336, 28.918014526367188, 28.918014526367188, 28.918014526367188, 28.343873977661133, 28.221900939941406, 28.126527786254883, 28.0556640625, 27.928783416748047, 27.530563354492188, 27.430227279663086, 27.30944061279297, 26.852760314941406, 26.642162322998047, 26.550228118896484, 26.550228118896484, 26.32033920288086, 26.15645980834961, 26.15645980834961, 26.15645980834961, 25.88070297241211, 25.88070297241211, 25.88070297241211, 25.73973846435547, 25.73583221435547, 25.73583221435547, 25.73583221435547, 25.73583221435547, 25.73583221435547, 25.73583221435547, 25.368396759033203, 25.368396759033203, 25.326114654541016, 25.326114654541016, 25.326114654541016, 25.326114654541016 ], "content": [ "possible duplicate of Zend Framework PDF multiline problems http : stackoverflow.com questions 1330322 zend-framework-pdf-multiline-problems", "I use Zend PDF to generate PDF .", "Now I have a problem with Zend pdf .", "This is not a feature that is built into Zend PDF so you will need to implement it yourself .", "I m having issues with wordwrapping with Zend Framework2 PDF .", "The font is not part of the Zend framework .", "I am new in Zend framework .", "Is there another way to get the same details out of a .pdf file with something other than an old version of the Zend framework", "Now I have to draw that text on a pdf file with Zend PDF but the new line is ignored .", "So i have decided to convert PDF version to make compatible with Zend Pdf .", "In first time I want it with function zend-pdf but i can t success with it .", "I am using Zend-pdf to draw data that get from database .", "I am using Zend PDF trying to print Russian words .", "I m creating dynamic PDF using drawings fonts and images using Zend framework Zend Pdf .", "You use Zend Framework 2 view scripts to render the result and use above module to convert it into a PDF file .", "In previous versions of the Zend framework I would do the following : .. . .. . It seems that Zend has eliminated Zend pdf from the framework sometime after version 1.9 .", "See : http : framework.zend.com wiki display ZFPROP Zend Pdf+text+drawing+improvements+-+Nico+Edtinger .. . .. . The solution provided on Zend Framework PDF multiline problems http : stackoverflow.com questions 1330322 zend-framework-pdf-multiline-problems probably will help you further .", "Why are you using such an old version of Zend Framework", "PHP 5.4.16 Zend Framework 2.4.4 CentOS7", "You can limit the character-set when embedding a font in Flash just curious if this is also available in Zend PDF", "I am used zend and need to print report as in PDF and i want to draw location for image .", "I m trying to generate a PDF file using Zend but I keep getting errors when trying to set the font .", "I am working on API which gives me PDF ver 1.7 in response and my project is using zend-pdf library which doesn t support parsing of PDF version 1.7 .", "But I can t print arabic in zend .", "http : stackoverflow.com questions 4363460 how-to-rotate-text-while-creating-pdf-in-zend-framework .. . .. . My question is : how do I rotate the setting back when I have printed the address box", "Now I m currently working on convert html file to pdf in Zend Framework I m using TCPDF for doing this following is my code .", "What I understand is that the fonts should be on the server Zend PDF is just finding the font by name .", "100 100 .. . See also : Zend PDF tutorial http : devzone.zend.com article 2525", "The reslts of wkhtml2pdf are vastly better than anything hand drawn with Zend PDF stuff .", "DrawTextBlock is not existing in Zend Framework as it is a proposal for a improvement by Nico Edtinger .", "This is now possible with the release of Zend Framework 1.9 and the addition of support for annotations .", "But this time I m working with PrinceXML and Zend .", "I ve found this http : stackoverflow.com questions 3775768 zend-pdf-permission-problem stackoverflow topic but I didn t help me much .", "I m working in Symfony 2.5 and want to use the zend-framework for pdf zend-pdf .. . .. . I tried the classloader but I probably do something wrong because it doesn t work of course .. .", "You can use a Zend Framework 2 module you tagged your question with zend-framework-2 I assume you use it then called DomPdfModule https : github.com raykolbe DOMPDFModule .", "The following code will create a blank page with a clickable area at the bottom left corner that contains a hyperlink : .. . .. . The above snippet was tested with Zend Framework 1.10.7 but should work on all versions of Zend Framework from 1.9.7 onwards .", "try for save in Zend app directory .. . .. . or for save in Downloads", "The process of using zend-framework seems a little too much for what I need .", "You might want to try Zend Server since it provide this component at installation time .", "You are right so I agree with @Bobrowsky probally these are just artifacts maybe related with resizing algotith of Zend .", "Not sure why Zend is treating the string differently .", "I will certainly re-try implementing JasperReports using Zend Server .", "you can add this function to wrap text .. . .. . Also you can refer this detail Document http : devzone.zend.com 1776 creating-pdf-documents-with-zend-framework to solve your issue .. . .. . hope this will sure help you .", "I am having issues and believe I do not know how to properly load Zend Framework or external libraries in general .", "I thought in autoload.php but I would not know how.. . this is my autoload.php the standard one : .. . .. . I tried adding it in my controller like this : .. . .. . But then he says : .. . .. . Attempted to load class Zend Pdf from namespace Zend Pdf .", "Zend PDF standard fonts are generally equal to Latin1 character so to work with other languages an appropriate ttf font should be referenced so that is what I am doing... . .. . .. . return Zend Pdf Font : : fontWithPath this- getFontFileDir .", "This is still an issue in Zend pdf I would recommend you to use TCPDF here is the link for that http : www.tcpdf.org .. . .. . Go through there examples .. . .. . http : www.tcpdf.org examples.php .. . .. . If you still want to stick with zend-pdf may this link be helpful .", "If pdf is generated in Mac OS X it opens sucessfully there .. . .. . For better understanding just try to follow the steps as mentioned in Zend pdf document throws error in magento due to presence of html contents http : stackoverflow.com questions 12214990 zend-pdf-document-throws-error-in-magento-due-to-presence-of-html-contents 12217962 comment16382418 12217962 .", "I need to generate reports in my PHP website in zend-framework .. . .. . Formats required : .. . .. . Please recommend robust and fast solution for generating reports in PHP .", "70px below the top edge of the page So the top of the image for Zend is below the bottom of the image .", "I am editing a document using zend-pdf magento invoice .. . .. . And I am trying to achive to print the address block in the left top quadrant of an A4 paper 90 degrees rotated for envelope window .. . .. . Using the hints found here : How to rotate text while creating PDF in Zend Framework", "I am using Zend PDF to generating the pdf file I used below to create a image or logo in page top left .. . .. . But images shown in bottom left when ever I increase or decrease the float value only the image-size will changes not move to top left corner .", "I have problems with arabic characters in pdfs when printing invoices the problem seem to relate to the pdf lib of zend so i decide to use tcpdf .. . .. . now most blogs about this just explain the steps to but tcpdf at your lib and call it from your code .. . .. . but i don t know where to call it and use it to create my custom pdf then output the pdf .. . .. . i tried to call it from the get Pdf function from this file .. . .. . app-code core Mage Sales Model Order Pdf Invoice.php .. . .. . but i didn t work it gives me an error says something is already outputed .. . .. . where should i use the tcpdf lib and disable the functionality of the default pdf zend lib", "So by This link http : stackoverflow.com questions 173503 how-to-generate-pdf-files-with-utf-8-multibyte-characters-using-zend-framework I include my own font but it s show message like this : .. . .. . Any on have any idea to resolve it", "Edit : .. . .. . I also tried this in Zend Pdf and it had the following result using the demo file that comes with the Zend Framework : .. . .. . Is it impossible to parse PDFs greater than 1.4", "I m going to build the solution in our Zend framework environment and I think I d prefer if the solution used Zend Pdf if that s possible .", "Is it possible to merge or paste a PDF-file into antother PDF", "In order to make the sample code below run you will need to grab a copy of the ZF2 framework and copy the Zend Memory folder into the library folder that was created when you downloaded ZendPdf from Github .", "You were measuring from the bottom but handing the top left corner first : .. . .. . Zend interprets the 2nd coordinate value as the bottom of the image .", ". . vendor zend library : . . application classes : . . application classes e xcpetions : . . application forms because i used zf1 and there where problems with the namespaces .", "I using Zend.1.7.2 in my project and i need report printing like Crystal report in C or VB.net .", "it opens the file and overlays some text with zend-pdf package .. . .. . then adds the file to a zip folder I open it repeats this process until all the files are zipped and then returns a string to the browser with the url for the file and it tells the browser to download it and the user saves or opens the zip file .", "I want to put image to my pdf file from code function in zend that i get simple example from here http : framework.zend.com manual 1.12 en zend.pdf.drawing.html and this is my code .. . .. . but i get errors like this .. . .. . any help with it .", "when i want to load a pdf template i do get an error message : .. . .. . Fatal error : Uncaught Error : Call to undefined method ZendPdf PdfDocument : : getPageDictionary in usr local zend apache2 htdocs test vendor zendframework zendpdf library ZendPdf PdfDocument.php : 516 ... .", "The pdf component allows only to set plain text and not any markup attached .", "Last time I checked which admittedly was a couple of years ago the two versions were functionally equivalent so you should probably just use the version that matches the version of Zend Framework that you re actually using .", "Loading ZendPdf from Zend Framework 2 Standalone .. . .. . Download the ZendPdf project from github https : github.com zendframework ZendPdf using the instructions on the project page or clone the repository directly using git if you prefer .", "There are many many benefits to using this approach one of which is that you don t have to have a full copy of Zend Framework 2 installed simply to get a working autoloader .", "I built an pdf document which is based on database records of 2 related tables .", "For example I want to create a site with : pdf new ZendPdf PdfDocument pdf- pages page1 pdf- newPage A4 And then for example i want to add a second page which is a saved pdf file .", "The PDF i want to to paste or merge is a simple picture that is going to appear at the bottom of the finished PDF :", "PDF 1.5", "Setasign is offering a PDF parser as a commercial addon http : www.setasign.de products pdf-php-solutions fpdi-pdf-parser to FPDI .", "Buyers guide PDF : http : www.consumer.ftc.gov articles pdf-0083-buyers-guide.pdf", "Are you using big size images to create the pdf", "I don t know if this advice still applies but you can read about it here : .. . .. . Where to get and how to use zend-pdf standalone http : stackoverflow.com questions 14717024 where-to-get-and-how-to-use-zend-pdf-standalone 14721150 14721150 .. . .. . I have switched to TCPDF but I don t think you can extract document properties with it .", "Some code examples : Merging two pdf s : .. . .. . Adding new page to existing pdf :", "I think I ll end up using fpdi setasign.de products pdf-php-solutions fpdi http : www.setasign.de products pdf-php-solutions fpdi", "I found that using commerical version of FPDI PDF-Parser http : www.setasign.de products pdf-php-solutions fpdi-pdf-parser solved my problem .", "If you have Acrobat PDF writer you can manipulate the job settings to make the PDF you are printing savingAs to be compatible to PDF 1.4 .", "the image inserted into PDF http : i.stack.imgur.com x1nld.jpg .. . .. . When I open the pdf in any browser Chrome FF IE it looks OK but in Adobe PDF reader I get this : .. . .. .", "I am able to generate a pdf and show it to the browser .", "http : www.wikihow.com Unsecure-a-Secure-PDF-File", "Try to incorporate fonts into pdf to see if could helps .", "PDF loads normally in adobe-reader .", "pages is the pages of the existing pdf file .", "Try opening the PDF using Notepad .", "The program is creating PDF attachments with and loading pdf files with Zend Pdf .", "I paste here the whole action where it is generated the pdf .", "If I start building the pdf document it takes much time .", "Do I need one because the controller builds the pdf", "Very interesting is that I have 2 different pdf-dokuments .", "I am using ZendPdf to reorder some pages in a PDF .", "Is there any way to convert pdf version to older version using php", "The expected size of image in PDF should be something like 168x120px based on the coordinates I provide however the actual size inside PDF is much bigger .", "The PDF using full size image being scaled when drawing it in PDF this one https : dl.dropboxusercontent.com u 15391592 test.pdf is OK in both cases .", "I have created pdf template and loaded it as below .. . .. . I need loaded image position in pdf and save", "i would like to merge 4 PDF 1 page files to 1 pdf file 1 page .", "filename new.pdf pdf- save filename works while filename forms new.pdf pdf- save filename doesn t .", "I am trying to add an existing PDF created otherwise to a PDF created with FPDF using FPDI ." ] }
{ "confidence": [ 69.48921966552734, 64.54296875, 64.43185424804688, 63.52898406982422, 63.03963088989258, 62.7950553894043, 60.33918762207031, 60.044925689697266, 57.524253845214844, 57.0710563659668, 56.298439025878906, 54.51534652709961, 54.04328536987305, 52.181949615478516, 51.70957565307617, 51.70957565307617, 50.824546813964844, 49.957237243652344, 49.91201400756836, 49.33391189575195 ], "content": [ "Question : null .. . Answer : I have a variable with the following content . Now I have to draw that text on a pdf file with Zend PDF but the new line is ignored . How can i draw the break Comment : possible duplicate of Zend Framework PDF multiline problems http : stackoverflow.com questions 1330322 zend-framework-pdf-multiline-problems Comment : Definitely a duplicate . The short answer is that you need to manually split your strings and call the drawText method multiple times .", "Question : I using ZendFW 1.7.2 in my project and need to save PDF file . i am success for use function drawText but some of my data is too long so i need it break line . Now i get a solution from http : devzone.zend.com 1776 creating-pdf-documents-with-zend-framework that use function drawTextBlock but when i test with it.It s can t success any always return errors Fatal error : Call to undefined method Zend Pdf Page : : drawTextBlock .. . .. . I think it s relate problem with something configuration Anyone used to success on it please share it to me I am looking to see your reply soon . Thanks Comment : Why are you using such an old version of Zend Framework .. . Answer : DrawTextBlock is not existing in Zend Framework as it is a proposal for a improvement by Nico Edtinger . See : http : framework.zend.com wiki display ZFPROP Zend Pdf+text+drawing+improvements+-+Nico+Edtinger .. . .. . The solution provided on Zend Framework PDF multiline problems http : stackoverflow.com questions 1330322 zend-framework-pdf-multiline-problems probably will help you further .", "Question : I am new in Zend framework . Now I have a problem with Zend pdf . I am trying to make a pdf document which contains arabic as well as english . But I can t print arabic in zend . Please help me with any tutorials or sample code links . .. . Answer : This is still an issue in Zend pdf I would recommend you to use TCPDF here is the link for that http : www.tcpdf.org .. . .. . Go through there examples .. . .. . http : www.tcpdf.org examples.php .. . .. . If you still want to stick with zend-pdf may this link be helpful . http : devzone.zend.com 1064 zend pdf-tutorial Comment : Thanks for your help yashankit vyas i will try it Comment : IT works perfectly....Thanks alote", "Question : I use Zend PDF to generate PDF . I want to show a page number on each page in the footer . Is this possible .. . Answer : This is not a feature that is built into Zend PDF so you will need to implement it yourself .", "Question : In previous versions of the Zend framework I would do the following : .. . .. . It seems that Zend has eliminated Zend pdf from the framework sometime after version 1.9 . Is there another way to get the same details out of a .pdf file with something other than an old version of the Zend framework I m running PHP 5.4 at this point on RedHat if that makes any difference .. . Answer : There is a standalone version of ZendPdf that you could use . It can be found here : .. . .. . https : github.com zendframework ZendPdf .. . .. . I mention it because it may be viable solution for you ie . you get to use what is essentially the old Zend Pdf but without including the entire framework and with some improvements like namespaces . As of two years ago there was a little bit of trickery required to get it working . I don t know if this advice still applies but you can read about it here : .. . .. . Where to get and how to use zend-pdf standalone http : stackoverflow.com questions 14717024 where-to-get-and-how-to-use-zend-pdf-standalone 14721150 14721150 .. . .. . I have switched to TCPDF but I don t think you can extract document properties with it .", "Question : I have success to test my code with function Zend Pdf for easy to understand this is my code : .. . .. . My cods will show in pdf file .. . .. . and This is reporting for br hello world : LALALA..... . .. . .. . My question .. . .. . how i can resolve this problem by i can write tag html in it by well like tag br is should know any one used to understand on it please . Any help .. . I am looking forword to see your reply soon . thanks . Comment : there is no indication in the documentation that Zend Pdf Page supports html2pdf conversion .. . Answer : What you want to achieve is you have html so text with markup and that must be converted into a PDF file . This is unfortunately not the goal of Zend Pdf . The pdf component allows only to set plain text and not any markup attached . You can use a Zend Framework 2 module you tagged your question with zend-framework-2 I assume you use it then called DomPdfModule https : github.com raykolbe DOMPDFModule . You use Zend Framework 2 view scripts to render the result and use above module to convert it into a PDF file . Comment : thanks for this info it s a good solution but i can t up-grand full of my project by this point . but any way i will chose it for my second project", "Question : I am editing a document using zend-pdf magento invoice .. . .. . And I am trying to achive to print the address block in the left top quadrant of an A4 paper 90 degrees rotated for envelope window .. . .. . Using the hints found here : How to rotate text while creating PDF in Zend Framework http : stackoverflow.com questions 4363460 how-to-rotate-text-while-creating-pdf-in-zend-framework .. . .. . My question is : how do I rotate the setting back when I have printed the address box so I continue with 0 degrees rotation .. . .. . Also : does the rotation 0 0 mean that it rotates the paper itself using the top left corner as an anchor it seems I am also loosing the bearing on the paper when using this method .. . .. . many thanks .. . Answer : Rotate back using", "Question : null .. . Answer : I am working on API which gives me PDF ver 1.7 in response and my project is using zend-pdf library which doesn t support parsing of PDF version 1.7 . So i have decided to convert PDF version to make compatible with Zend Pdf . Is there any way to convert pdf version to older version using php Thanks", "Question : I use Zend PDF to generate PDF . I want to show a page number on each page in the footer . Is this possible .. . Answer : This is a simple way to display a page number on the bottom right corner of each page :", "Question : I m working in Symfony 2.5 and want to use the zend-framework for pdf zend-pdf .. . .. . I tried the classloader but I probably do something wrong because it doesn t work of course .. . I don t know where to add my classloader.. . I thought in autoload.php but I would not know how.. . this is my autoload.php the standard one : .. . .. . I tried adding it in my controller like this : .. . .. . But then he says : .. . .. . Attempted to load class Zend Pdf from namespace Zend Pdf . Did you forget a use statement for another namespace How do I solve this thanks . .. . Answer : you should register new namespace for it .. . .. . I have follow solution to connect zf library .. . .. . 1 zf library is located at vendor gamma zf library .. . .. . 2 venvodor zf composer.json .. . .. . 3 app autoload.php .. . .. . 4 make composer update to generate new namespace .. . .. . 5 use at service controller as Comment : thanks for making it clear it worked i added set include path DIR . . . vendor zend library : . . application classes : . . application classes e xcpetions : . . application forms because i used zf1 and there where problems with the namespaces . Comment : Yes right - added include path to my example", "Question : I have problems with arabic characters in pdfs when printing invoices the problem seem to relate to the pdf lib of zend so i decide to use tcpdf .. . .. . now most blogs about this just explain the steps to but tcpdf at your lib and call it from your code .. . .. . but i don t know where to call it and use it to create my custom pdf then output the pdf .. . .. . i tried to call it from the get Pdf function from this file .. . .. . app-code core Mage Sales Model Order Pdf Invoice.php .. . .. . but i didn t work it gives me an error says something is already outputed .. . .. . where should i use the tcpdf lib and disable the functionality of the default pdf zend lib thanks Comment : any help ................ . .. . Answer : Go through this stackoverflow link below only refer this question for your foundation.... . .. . .. . create a pdf with tcpdf in magento http : stackoverflow.com questions 20563370 create-a-pdf-with-tcpdf-in-magento .. . .. . and This will help you for you solution directly ... . .. . .. . http : www.ashrafulabedein.com use-tcpdf-magento", "Question : I am using Zend-pdf to draw data that get from database . but when i get a long data it s make me draw duplicate data like : .. . .. . enter image description here http : i.stack.imgur.com dKPkX.png .. . .. . For my own idea I want limit length of data if it s long than length I want it break line br but I can t know how to do it . So everyone can fix this problem I am looking to see your reply soon thanks . .. . Answer : you can add this function to wrap text .. . .. . Also you can refer this detail Document http : devzone.zend.com 1776 creating-pdf-documents-with-zend-framework to solve your issue .. . .. . hope this will sure help you .", "Question : I m trying to save a simple pdf with one page but it doesn t work . This is what I do : .. . .. . I always get this error : .. . .. . PDF error : Can not open test.pdf file for writing . I ve found this http : stackoverflow.com questions 3775768 zend-pdf-permission-problem stackoverflow topic but I didn t help me much . They say to change the save path but change it to what Let s say for example I want to download it to my Downloads folder how can I do this My Downloads folder on mac is : Users myname Downloads .. . Answer : try for save in Zend app directory .. . .. . or for save in Downloads Comment : Tried that already and both didn t work . Same error ... . Comment : So web server user may not have permissions for writing in that directories . You can try to save in tmp test.pdf if that works change permissions to proper one for directory where you want save it .", "Question : I spent the last 2 days looking for answers on how to use zend-pdf as standalone . Everything I found on google refers to a pdf.php that I can t find anywhere . I have found zend-pdf here https : github.com zendframework ZendPdf .. . .. . I don t want to install the entire framework on the server and I don t want people to tell me to use fpdf or tcpdf or anything else . zend-pdf seems to be the perfect solution . I just want to know how to use it asstandalon . Any clear instructions Thank you .. . Answer : To begin with it is worth noting that the version of ZendPdf that you are referring to is the version that was originally included in ZF2 but was dropped from the framework some time in 2011 . As a side note I spoke to Matthew Weier O Phinney ZF2 project lead about this at ZendCon 2012 and he said that if anybody wants to put their hand up to maintain this class we can get it back into the ZF2 framework . The ZF2 version that we re talking about here although semantically identical to the ZF1 version is syntactically different due to the fact that the ZF2 developers did the conversion to namespaces and some other refactoring before they decided to split it off from the main project . Most maybe even all of the ZendPdf examples are for Zend Pdf from ZF1 and they won t work with this version unless you deal with the autoloading and the other syntactical differences . I hadn t used this standalone version until today and discovered that it DOES NOT RENDER the resulting PDF document unless you include one folder of source code from the ZF2 framework . In order to make the sample code below run you will need to grab a copy of the ZF2 framework and copy the Zend Memory folder into the library folder that was created when you downloaded ZendPdf from Github . Once you ve done that the following stand-alone PHP code will allow you to use ZendPdf to create a PDF file : .. . .. . This is not production-ready code by any stretch of the imagination . You ll want a more robust autoloader for starters . Anyway I hope this solves your immediate problem and or gets you on the right track . Good luck Comment : Thanks for clarifying the whole Zend pdf state . The process of using zend-framework seems a little too much for what I need . Sorry for being a little impatient on my original post . Basically I need to write over an existing pdf and attach it to an email using php mailer . It is an online store which is already working but I need to add the sale of gift certificates . I have a pdf-form I might need to remove the digital form in it and need to write the valu9e and serial-number on it . I think I ll end up using fpdi setasign.de products pdf-php-solutions fpdi http : www.setasign.de products pdf-php-solutions fpdi", "Question : I am using Zend PDF trying to print Russian words . My code is .. . .. . but the result is .. . .. . So it is printing something weird . I read that the issue might have to do with fonts and Unicode so I am planning to fix it by doing this : .. . .. . How can i find the path to this font in on an IBM i AS 400 machine One more very basic question . The font will be coming from the server . What I understand is that the fonts should be on the server Zend PDF is just finding the font by name . The font is not part of the Zend framework . Is my understanding correct I am just curious how a Chinese or in general a non-English language speaker will access a website like Google Yahoo or StackOverflow . What i am trying to ask is if the person doesn t know English and the keyboard is not in English how they will type the url Or am I completely wrong Is the url in English only Is the above is possible or not Comment : Zod the first part of your question is about rendering Russian text . The second part of the question is about the internationalized domain-name system - en.wikipedia.org wiki Internationalized domain-name http : en.wikipedia.org wiki Internationalized domain-name . Are these two parts related If not may I suggest removing the second part and placing it in a separate question .. . Answer : True Type fonts are optional on the IBM i . Have your IBM admin look at this web page : http : publib.boulder.ibm.com infocenter iseries v6r1m0 index.jsp topic rzalu rzalucontruetype.htm If this doesn t fit your needs have the admin create a directory for you and copy the fonts you need into that . Comment : Thanks for resposnse . i look into the font folder . its empty . you know where we can download TNR.PFB font files . Is it possible Comment : That is a PostScript font not True Type . You should be able to find it in QIBM ProdData OS400 Fonts PSFonts Latin", "Question : I am using Zend PDF trying to print Russian words . My code is .. . .. . but the result is .. . .. . So it is printing something weird . I read that the issue might have to do with fonts and Unicode so I am planning to fix it by doing this : .. . .. . How can i find the path to this font in on an IBM i AS 400 machine One more very basic question . The font will be coming from the server . What I understand is that the fonts should be on the server Zend PDF is just finding the font by name . The font is not part of the Zend framework . Is my understanding correct I am just curious how a Chinese or in general a non-English language speaker will access a website like Google Yahoo or StackOverflow . What i am trying to ask is if the person doesn t know English and the keyboard is not in English how they will type the url Or am I completely wrong Is the url in English only Is the above is possible or not Comment : Zod the first part of your question is about rendering Russian text . The second part of the question is about the internationalized domain-name system - en.wikipedia.org wiki Internationalized domain-name http : en.wikipedia.org wiki Internationalized domain-name . Are these two parts related If not may I suggest removing the second part and placing it in a separate question .. . Answer : I don t know the intricacies of Unicode and PHP on the IBM i http : www-03.ibm.com systems i but the Microsoft TrueType Core Fonts can be downloaded from http : sourceforge.net projects corefonts files the 20fonts final . You may want to review the licensing http : en.wikipedia.org wiki Core fonts for the Web Program termination and software licence agreement issues and how it relates to your application .", "Question : null .. . Answer : I d like to overlay output from PrinceXML onto pages from a PDF in the file system . I m going to build the solution in our Zend framework environment and I think I d prefer if the solution used Zend Pdf if that s possible . Any suggestions I suppose I could use something like fpdf fpdi and somehow channel the PrinceXML output through that but has anyone used Zend Pdf to do an overlay with the output from PrinceXML and a static PDF template file Comment : So you ll produce a PDF document using PrinceXML and then you want to merge some of those pages into an existing PDF document If its just inserting pages from one PDF into another yes you could do that with Zend Pdf or even the command-line pdftk yeah it sux to have to run a binary to get something done but pdftk is awfully quick so the speed may justify the inelegance . But if you want to overlay page that is pick some elements off a page in one document and add to a page in an existing document hmmm no don t know how you would go about doing that in PHP at all . Comment : @JamesG - Thanks for responding James . What I specifically want to do is place the contents of a static PDF from the file system behind a generated PDF from PrinceXML . As in I ll merge two pages together from two different files to make one page and do that for each page in the generated PDF . I have done this before in PHP using fpdf and fpdi fpdi is an extension to fpdf that adds this functionality . It even has an option for putting page 1 from the static PDF behind all of the odd pages and page 2 behind all the even pages . But this time I m working with PrinceXML and Zend .", "Question : I am placing text on pdf something like this using Zend Pdf : .. . .. . But now I want to rotate text to 90 degree on pdf . How is it possible Thanks .. . Answer : How about : .. . page- rotate 0 0 M PI 12 .. . page- drawText Hello world 100 100 .. . See also : Zend PDF tutorial http : devzone.zend.com article 2525 Comment : Thanks . It worked . Comment : Do you need to rotate back before continuing", "Question : I have problem when i want draw PDF in France language in my project but it s can t draw correct character with spacial character like ... . to ecirc or oacute as they code . So by This link http : stackoverflow.com questions 173503 how-to-generate-pdf-files-with-utf-8-multibyte-characters-using-zend-framework I include my own font but it s show message like this : .. . .. . Any on have any idea to resolve it pleas help me to fix it . I am looking to see your reply soon . Thanks .. . Answer : You can use default font . Just use encoding UTF-8 every time you draw a text .", "Question : I m new to PHP only having worked with a LAMP stack a little bit . I would like to use Zend PDF to fill forms using PHP . I am having issues and believe I do not know how to properly load Zend Framework or external libraries in general . Here is what I have currently : .. . .. . I was using count as a test but I m looking to use the setTextField functions . I do not have a Loader Autoloader.php as referenced in some guides . How do I properly load the library so that I can use the setTextField function PHP 5.4.16 Zend Framework 2.4.4 CentOS7 .. . Answer : There are a few issues with your question . Firstly the Zend Pdf you mentioned above belongs-to ZF1 not ZF2 . If you really are talking about ZF2 then the class is called ZendPdf and can be used as a standalone component - you do not need to have a full copy of ZF2 available for the autloading composer will generate an autoloader - you will just need to require that in your script . Last time I checked which admittedly was a couple of years ago the two versions were functionally equivalent so you should probably just use the version that matches the version of Zend Framework that you re actually using . Which brings me to the next issue . Because I wasn t completely sure which version you were referring to I did a quick text search and discovered that the setTextField method only exists in Zend Pdf from ZF1 not the ZendPdf class that is related to ZF2 so I m not sure why you mentioned ZF2 in your question . But anyway I figured out how to get the ZF2 version working before I made that discovery so I ve included both methods below for completeness . Also you have an error in your require-once statement - it should not have the . : included at the start . Now on to my actual answer . Loading Zend Pdf from Zend Framework 1 Standalone .. . .. . This should work : .. . .. . You will obviously need to adjust the paths in the code above in order to make it work properly but once you do that and run the script you should end up with example.pdf being created . Loading ZendPdf from Zend Framework 2 Standalone .. . .. . Download the ZendPdf project from github https : github.com zendframework ZendPdf using the instructions on the project page or clone the repository directly using git if you prefer . Change into the directory where ZendPdf has been placed and run composer install to download the supporting files . In that same directory ie . the project root of ZendPdf create a file called test.php with the following contents : .. . .. . Run php test.php and the example.pdf file should be created . The magic in that second solution comes from composer which creates the autoload.php file for you . There are many many benefits to using this approach one of which is that you don t have to have a full copy of Zend Framework 2 installed simply to get a working autoloader . Comment : What an amazing answer thank you so much . I was referring to ZF2 but did not realize Zend Pdf was only in ZF1 . After testing it out it looks like ZendPdf doesn t have the ability to edit text fields only draw . I suppose I ll be playing with coordinates for a while . Thank you for the help Comment : You are welcome - glad I could help . Good luck with your coding Comment : I do have one more question if you could still help me . filename new.pdf pdf- save filename works while filename forms new.pdf pdf- save filename doesn t . how do I save open in other directories Comment : What happens when you try to save to the forms directory Do you get a message saying Can not open forms new.pdf for writing If so it is most likely a problem with file-permissions . You need to ensure that the directory you are trying to save the file to A exists and B is writable by the user or group that the script is running as . Comment : Looks like that was it along with changing it to forms new.pdf . Thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
pdf
UNK_RELATION
dce@toolkit@69
dce -- the distributed-computing environment dce is a framework and @placeholder for developing client-server applications developed in the early 1990s .
{ "confidence": [ 42.81110763549805, 41.08598327636719, 38.97148132324219, 38.65269470214844, 35.356666564941406, 33.72087860107422, 33.72087860107422, 33.72087860107422, 33.613189697265625, 32.92612838745117, 32.44550704956055, 30.916942596435547, 30.916942596435547, 29.72829818725586, 29.72829818725586, 28.19973373413086, 25.156362533569336, 24.656116485595703, 24.656116485595703, 21.85218048095703, 21.239168167114258, 20.52398681640625, 20.52398681640625, 18.43523406982422, 18.43523406982422, 18.231128692626953, 18.197986602783203, 18.101545333862305, 17.71088409423828, 17.565719604492188, 17.482641220092773, 17.131973266601562, 16.971046447753906, 16.607946395874023, 16.488021850585938, 16.17908477783203, 16.17908477783203, 15.721207618713379, 15.721207618713379, 15.651856422424316, 15.620750427246094, 15.400324821472168, 14.687990188598633, 14.546509742736816, 14.546509742736816, 14.546509742736816, 14.546509742736816, 14.507187843322754, 14.44583797454834, 14.44583797454834, 13.832810401916504, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086, 12.62405014038086 ], "content": [ "I am fetching all values in DCE Dynamic Content Elements in the DCE extension .", "I would expect that DCE is faster .", "As is explained on the following link : http : www.nsnam.org docs dce release 1.1 manual html dce-user-newapps.html there are certain requirements like flags in the makefile that have to be adjusted to generate a binary that can be used by dce .", ".. . disabling the build for iperf3 profile seems to be required for DCE build .", "Why not just use DCOM which runs on top of DCE", "I ll try to design my own content elements with DCE Dynamic Content Elements .", "http : docs.typo3.org typo3cms extensions dce Tutorial Index.html Your problem might be solved.. .", "Using the extension DCE elements I created a fluid template generating a li item for every item created .", "In NS-3 DCE Network simulator 3 Direct Code Exectution with NS-3 version 3.21 and dce version 1.4 one of the included binaries by default is iperf .", "I am a postgraduate student of information security and I need some information about DCE RPC protocol that is used in WMI commands .", "SunRPC or DCE RPC works on top of UDP at least SunRPC can use UDP or on top of TCP .", "DCE uses a binary protocol while XML-RPC uses XML on top of HTTP .", "This can be fixed by a patch https : github.com teto ns-3-dce commit 0f99952aee3d919a9dca0082ecc53f91751389b4 of teto .", "Can someone describe from a network point of view what RPC SUN and or DCE is and why it deviates from standard TCP behavior", "I work with ASA firewalls so this behavior becomes very apparent when the inspection of DCE RPC is not enabled since the firewall will block it because it sees it as a threat .", "To compile DCE you first run . waf configure and finally you build the program : .. . .. . I admit I ve run out of ideas to fix this .", "Since iperf3 is not backwards compatible with iperf2 and iperf3 offers some interesting new features it would be very helpful if I could use iperf3 with NS-3 dce .", "With the hint form vijay rami http : stackoverflow.com users 4156460 vijay-rami I found out that you have to render images in dce like this : .. . .. . Of course you have to edit in the first line field : image to your name .", "Now I have seen that there has to be something here https : msdn.microsoft.com en-us library cc244264.aspx but I have not been able to find what it is where it is located.. . .. . .. . Have you had any experience with DCE-RPC in C++", "I ve been trying to compile Direct Code Execution DCE - an extension to the network simulator ns-3 that can run real programs VLC iperf within the simulator via providing a fake POSIX layer - without success since my upgrade to ubuntu xenial .", "otherDce.fieldname the output on other pages.In tt content table all values of DCE is entered in column name pi flexform data is in xml if i write select pi flexform from tt content then i will get all values from the xml.but i need to fetch the data by individual index.i have tried but i am not getting i have used that XPATH to fetch xml but its not working what to do now link for XPATH : http : docs.typo3.org typo3cms extensions cobj xpath Tutorials UsingXpathToReadFlexformValues Index.html", "Now I have a task to write rpc server and client by the dcerpc library implement by samba .", "Is there an example or tutorial for writing a rpc server and client RPC Helloworld by the samba s rpc implement", "It happened first when upgrading my compiler : gcc version 5.3.1 20160413 Ubuntu 5.3.1-14ubuntu2 .. . .. . More info on : https : github.com direct-code-execution ns-3-dce issues 46 .. . .. . Here is the result-of : . waf build -v https : transfer.sh tj7uf temp .. . .. . And at https : transfer.sh qE5Cd link-step the results of : .. . .. . search for R X86 64 PLTOFF64 .. . .. . Looking forward to any hint .. . .. . Cheers", "Is there any benchmark about encoding decoding certain common typed data in Microsoft RPC NDR engine http : msdn.microsoft.com en-us library windows desktop hh802751 28v vs.85 29.aspx DCE 1.1 http : pubs.opengroup.org onlinepubs 9692999399 in comparison with that in XML-RPC-C C++ http : xmlrpc-c.sourceforge.net windows.php in the de-facto C C++ implementation in XML-RPC http : xmlrpc.scripting.com default.html", "The way that I understand it is a client reaches out to a server with a unique source port and then switches the source port after the TCP three way handshake finishes .", "Tried with Windows 2008 server .", "This field is not encrypted when used with DCOM but with Windows Server 2012 R2 that field is encrypted by default .", "A kind of socket that you send to the server and if it was well coded the server would execute something .", "client calls the RPC service over this new connection which the client may use for multiple RPC calls .", "What do I look for on the windows linux server .", "Typically in order for an RPC client to contact call an RPCserver it first contacts some sort of lookup server called portmapper or rpcbind in the case of SunRPC which replies with the location IP address and port-number of where the actual server is running .", "client tears down the connection to the portmapper .. . client establishes a new connection to the service using the IP address and port-number that pormapper gave it .", "portmapper replies with the IP address and port-number of the service the client asked for .", "Pardon my curiosity but what exactly HPC task are you going to achieve using distributed-objects", "I see that the Linux server is using Major version 5 and minor version 0 .", "Another question is : I have to execute functions in a device server that I do not know .", "I have an application hosted on Linux 5.5 that uses SMB and RPC calls to a Windows server to gain some data from the registry .", "The problem is that when I have a look at the wireshark traces I see a response coming from the windows-server stating that bind nak reason protocol version not supported .", "Normally the portmapper service runs on the same machine as the RPC server programs .", "Instead a firewall wanting to support this kind of setup would need to open up the portmapper port catch the RPC messages going to that well known port of portmapper inspect the message content exchanged with the portmapper to extract the IP address and port-number from the RPC messages the portmapper is itself implemented as an RPC server in order to dynamically open a port between the RPC server and client .", "Everyone who tries to utilize JMH framework to create some meaningful tests will see JMH sample tests http : hg.openjdk.java.net code-tools jmh file tip jmh-samples src main java org openjdk jmh samples .", "Microsoft has been doing the same in WCF namely Peer Name Resolution Protocol PRNP in the recent .NET framework 3.5 .", "In DCERPC protocol there is a field called stub data .", "That field includes the command that we execute via WMI .", "Does anyone know what encryption algorithm is used", "screenshot http : i.stack.imgur.com W7KPy.jpg", "When a client wants to connect to or call an RPC service it performs these actions : .. . .. . Connects to the portmapper on a well known standard destination port and asks it where the particular service it wants to connect to is .", "So from a networking perspective : .. . .. . RPC Servers listens on a random port-number which may change each time that server program is re started .", "At startup the RPC server connects to the portmapper which runs on a well known port and register itself with which IP address and port-number it s listening on .", "Actually I have to choose between Windows RPC http : msdn.microsoft.com en-us library windows desktop aa374358 28v vs.85 29.aspx and XML-RPC-C C++ http : xmlrpc-c.sourceforge.net windows.php to implement my own common object infrastructure for High Performance Computing on Windows .", "As we went through them we stucked by the dead-code elemination JMHSample 08 DeadCode.java .", "Excerpt : .. . .. . The measurement of measureWrong will be approximately the same as for the baseline test .", "Because the return-value of the Math.log is never used .", "Therefore the HotSpot compiler will eliminate the dead-code .", "Ok understood but how can the compiler decide that Math.log can be eliminated .", "As we looked closely to the test we note that Math.log is a native method .", "And native calls go down to the OS and execute a corresponding lib .", "Right", "This lead us to the assumption that native calls could be eliminated by the compiler if their return-value is not used and they don t perform io operations .", "We wonder what if the lib which resides somewhere in the OS and which handles the native calls from the java world provides no return-value but does io operations e.g .", "logging .", "Will those instructions completely be wiped out", "To proof our assumption we reconstructed the scenario with a simple JMH test and a native call .", "We compiled three c-native libs to perform : .. . .. . 1 . returning 42 .. . 2 . parameter addition .. . 3 . empty file creation .. . .. . As we called them in a JMH test similarly to measureWrong test none of them has been eliminated not even the one which doesn t perform an io operation .", "Due to the test result our assumption cannot be confirmed .", "Native calls cannot be optimized out meaning that Math.log and custom native calls do not have the same basis .", "They are not equaly native .", "Maybe we made a mistake in our native lib code and at least the native call of test 1 should have been eleminated .", "If this is true we will share our code with you .", "So we searched further and found a term Intrinsics where java code will be replaced with a corresponding to the architecture very optimized code .", "java.lang.Math.log is having such intrinsic implementation .", "Are there any relations between the Natives and Intrinsics", "If the above assumption of the relationship between Natives and Intrinsics is valid will the compiler perform the following steps to eliminate the native call", "At the compile-time the HotSpot checks the existence of the intrinsic implementation in jdk", "for the Math.log and replaces Math.log with that code .", "Afterwards the second check happens where HotSpot looks after the return-value of a method .", "And on this outcome the HotSpot decides to eliminate the Math.log call completely .", "Math.log is acctually an intrinsic .", "This means it is known to the JIT and substituted with a predefined set of machine instructions .", "Also native instructions are not eliminated by the jit as it cannot prove they do not have side effects .", "Android might still treat its native methods as intrinsics .", "As we looked closely to the test we note that Math.log is a native method .", "Native calls don t go to the OS they go to a native library via JNI .", "That may end up going to the OS or it may go into some user provided lib .", "In the case of native methods in the JDK we can also expect some native calls to be compiled as intrinsics .", "This lead us to the assumption that native calls could be eliminated by the compiler if their return-value is not used and they don t perform io operations .", "The JVM does not look into arbitrary native calls to determine what sort of side effects they may or may not have .", "This means native calls are indeed made as method calls on the assembly level you jump into foriegn code somewhere another frame on the stack etc . .", "This also means that the JVM cannot eliminate them or their dependant inputs .", "Native calls cannot be optimized out meaning that Math.log and custom native calls do not have the same basis .", "Yes .", "Are there any relations between the Natives and Intrinsics", "Some native JDK methods are intrinsics .", "But normal JDK methods can be intrinsics too .", "The set of intrinsic methods is also different from one JVM to the next .", "If the above assumption of the relationship between Natives and Intrinsics is valid will the compiler perform the following steps to eliminate the native call" ] }
{ "confidence": [ 52.992332458496094, 46.156837463378906, 44.6958122253418, 44.38090515136719, 44.338294982910156, 43.29411315917969, 43.02341079711914, 38.35954666137695, 38.02339553833008, 36.58146286010742, 35.988746643066406, 21.045122146606445, 16.395103454589844, 14.222526550292969, 12.659165382385254 ], "content": [ "Question : null .. . Answer : Is there any benchmark about encoding decoding certain common typed data in Microsoft RPC NDR engine http : msdn.microsoft.com en-us library windows desktop hh802751 28v vs.85 29.aspx DCE 1.1 http : pubs.opengroup.org onlinepubs 9692999399 in comparison with that in XML-RPC-C C++ http : xmlrpc-c.sourceforge.net windows.php in the de-facto C C++ implementation in XML-RPC http : xmlrpc.scripting.com default.html Actually I have to choose between Windows RPC http : msdn.microsoft.com en-us library windows desktop aa374358 28v vs.85 29.aspx and XML-RPC-C C++ http : xmlrpc-c.sourceforge.net windows.php to implement my own common object infrastructure for High Performance Computing on Windows . Any recommandation about which with regard to their performance Thank you . Best Regards .. . .. . Yang Comment : DCE uses a binary protocol while XML-RPC uses XML on top of HTTP . I would expect that DCE is faster . Also it is deeply integrated into Windows and there are various tools in the SDK to support it midl for example . I ve used XML-RPC to connect a Python GUI to a C++ backend on Linux but the C++ XML-RPC implementation was tedious to use . Why not just use DCOM which runs on top of DCE Pardon my curiosity but what exactly HPC task are you going to achieve using distributed-objects Comment : @HristoIliev Hmm...DCOM should be what I m looking for . It s not exactly about HPC task but currently an infrastructure of common object storage based on DHT that allows further implementation of channel in Hoare s CSP . I use DHT for scalable and fault-tolerant naming as well as load-balancing of those objects . Microsoft has been doing the same in WCF namely Peer Name Resolution Protocol PRNP in the recent .NET framework 3.5 . Comment : Correction : DCOM is not applicable here .", "Question : In NS-3 DCE Network simulator 3 Direct Code Exectution with NS-3 version 3.21 and dce version 1.4 one of the included binaries by default is iperf . This version of iperf is 2.0.5 however and the newest version of iperf is 3.0.10 . Since iperf3 is not backwards compatible with iperf2 and iperf3 offers some interesting new features it would be very helpful if I could use iperf3 with NS-3 dce . As is explained on the following link : http : www.nsnam.org docs dce release 1.1 manual html dce-user-newapps.html there are certain requirements like flags in the makefile that have to be adjusted to generate a binary that can be used by dce . I can t get it to work however . I tried changing all 3 Makefiles that came with iperf3 -fpic CFLAG and -pie -rdynmic LDFLAGS but I m still getting an error when I m trying to build it : .. . .. . Does anyone know what to do Any help is really appreciated Comment : try to change -fpic to -fPIC .. . Answer : You can follow this guide https : groups.google.com forum topic ns-3-users RkFPqXSkyvs to build iperf3 with libOS : .. . .. . .. . the above error is due to bad compatibility between gcc profile option -pg and PIC option . .. . because the main binary iperf3 was built even with this error you can see the iperf3 binary at top src .libs iperf3 . .. . disabling the build for iperf3 profile seems to be required for DCE build . patches are welcome .. . .. . However currently you cannot run iperf3 due to missing symbol h errno location . This can be fixed by a patch https : github.com teto ns-3-dce commit 0f99952aee3d919a9dca0082ecc53f91751389b4 of teto .", "Question : I ll try to design my own content elements with DCE Dynamic Content Elements . The problem I have a problem when I try to work with images . I created a select field for images which works fine . In the fluid template I have the following code for handling the image : .. . .. . But if I try to insert the content element Typo3 throws me this exeption : .. . .. . I already found out that this is pretty sure a bug in Typo3 but how can I fix it .. . Answer : Check This Tutorial and set it accordingly . http : docs.typo3.org typo3cms extensions dce Tutorial Index.html Your problem might be solved.. .", "Question : null .. . Answer : I am fetching all values in DCE Dynamic Content Elements in the DCE extension . But I need single field data fetching . So that i can directly show for eg . otherDce.fieldname the output on other pages.In tt content table all values of DCE is entered in column name pi flexform data is in xml if i write select pi flexform from tt content then i will get all values from the xml.but i need to fetch the data by individual index.i have tried but i am not getting i have used that XPATH to fetch xml but its not working what to do now link for XPATH : http : docs.typo3.org typo3cms extensions cobj xpath Tutorials UsingXpathToReadFlexformValues Index.html Comment : your question is very vague . Try to post some code-snippets to explain what you need to accomplish Comment : hi @rob-ot..sorry for this now i have edited my question....could you please guide me.. .", "Question : null .. . Answer : I am a postgraduate student of information security and I need some information about DCE RPC protocol that is used in WMI commands . In DCERPC protocol there is a field called stub data . That field includes the command that we execute via WMI . This field is not encrypted when used with DCOM but with Windows Server 2012 R2 that field is encrypted by default . Does anyone know what encryption algorithm is used screenshot http : i.stack.imgur.com W7KPy.jpg", "Question : Can someone describe from a network point of view what RPC SUN and or DCE is and why it deviates from standard TCP behavior The way that I understand it is a client reaches out to a server with a unique source port and then switches the source port after the TCP three way handshake finishes . I work with ASA firewalls so this behavior becomes very apparent when the inspection of DCE RPC is not enabled since the firewall will block it because it sees it as a threat . I have read a few MS TechNet articles and other website definitions to include watching about five Youtube videos which all seem to explain it from a programmers perspective but I have yet to fully understand this concept since I am not a programmer . .. . Answer : Note that there is nothing that deviates from standard TCP regarding the RPC protocols . SunRPC or DCE RPC works on top of UDP at least SunRPC can use UDP or on top of TCP . Typically in order for an RPC client to contact call an RPCserver it first contacts some sort of lookup server called portmapper or rpcbind in the case of SunRPC which replies with the location IP address and port-number of where the actual server is running . So from a networking perspective : .. . .. . RPC Servers listens on a random port-number which may change each time that server program is re started . At startup the RPC server connects to the portmapper which runs on a well known port and register itself with which IP address and port-number it s listening on . Normally the portmapper service runs on the same machine as the RPC server programs . When a client wants to connect to or call an RPC service it performs these actions : .. . .. . Connects to the portmapper on a well known standard destination port and asks it where the particular service it wants to connect to is . portmapper replies with the IP address and port-number of the service the client asked for . client tears down the connection to the portmapper .. . client establishes a new connection to the service using the IP address and port-number that pormapper gave it . client calls the RPC service over this new connection which the client may use for multiple RPC calls . These RPC calls are just application message exchanged on top of a TCP connection . In the case UDP is used instead of TCP it works much the same but there s no naturally no connection setup teardown being performed over the network .. . .. . This presents a problem for firewalls since the servers listens on randomly chosen port numbers one cannot administratively allow access to a particular port-number . Instead a firewall wanting to support this kind of setup would need to open up the portmapper port catch the RPC messages going to that well known port of portmapper inspect the message content exchanged with the portmapper to extract the IP address and port-number from the RPC messages the portmapper is itself implemented as an RPC server in order to dynamically open a port between the RPC server and client . Comment : Thank you for that excellent explanation", "Question : I ll try to design my own content elements with DCE Dynamic Content Elements . The problem I have a problem when I try to work with images . I created a select field for images which works fine . In the fluid template I have the following code for handling the image : .. . .. . But if I try to insert the content element Typo3 throws me this exeption : .. . .. . I already found out that this is pretty sure a bug in Typo3 but how can I fix it .. . Answer : Got it . With the hint form vijay rami http : stackoverflow.com users 4156460 vijay-rami I found out that you have to render images in dce like this : .. . .. . Of course you have to edit in the first line field : image to your name .", "Question : null .. . Answer : I ve been trying to compile Direct Code Execution DCE - an extension to the network simulator ns-3 that can run real programs VLC iperf within the simulator via providing a fake POSIX layer - without success since my upgrade to ubuntu xenial . To compile DCE you first run . waf configure and finally you build the program : .. . .. . I admit I ve run out of ideas to fix this . It happened first when upgrading my compiler : gcc version 5.3.1 20160413 Ubuntu 5.3.1-14ubuntu2 .. . .. . More info on : https : github.com direct-code-execution ns-3-dce issues 46 .. . .. . Here is the result-of : . waf build -v https : transfer.sh tj7uf temp .. . .. . And at https : transfer.sh qE5Cd link-step the results of : .. . .. . search for R X86 64 PLTOFF64 .. . .. . Looking forward to any hint .. . .. . Cheers Comment : N.B . you can get it to print errors in English so you don t need to translate them and can google for them by setting LANG C before running the build . That is likely to produce an error more like unresolved relocation blah blah . You re unlikely to get any good answers unless you provide more information about what you re doing e.g . the exact linker command that fails . Currently your question is just I m doing something and it gives this error .. . you need to explain the something . Comment : Upgraded my message as you advised did not find any helpful comments though . Comment : hum adding -fPIC seems to do the trick . Comment : In the end that didn t work . I ve edited the message with more logs", "Question : Using the extension DCE elements I created a fluid template generating a li item for every item created . Now I would like to have every first to second item a wrapper . So that : .. . .. . Becomes : .. . .. . Is this possible in a fluid template Perhaps in combination with Typoscript Comment : You can use for and if viewhelper with Operator . f : if condition iteration.index 2 .. . Answer : Sure you need the for viewhelper in addition to its counters iterators . The you can use the if viewhelper to check for your condition . The API has some examples : http : api.typo3.org typo3cms current html class t y p o3 1 1 c m s 1 1 fluid 1 1 view helpers 1 1 for view helper.html details .. . .. . https : docs.typo3.org typo3cms ExtbaseGuide Fluid ViewHelper For.html", "Question : I have to check a Profinet Network in order to get all the components . I could ask them via NSMP or DCP but I need the UUID to after that executing functions via RPC . The problem is that there was a function named LookUpBegin next and stop that did the work for Windows NT but is unsupported after Vista OS . Now I have seen that there has to be something here https : msdn.microsoft.com en-us library cc244264.aspx but I have not been able to find what it is where it is located.. . .. . .. . Have you had any experience with DCE-RPC in C++ Best way Any sample whatever . Another question is : I have to execute functions in a device server that I do not know . Is there any function of RPC that allows to execute a function giving an id or similar and a string A kind of socket that you send to the server and if it was well coded the server would execute something . Because I have been able to sniff the traces via Wireshark . So I could know some part of them . .. . Answer : Solution : make your own packets and send them via sockets . Wireshark can help .", "Question : I ll try to design my own content elements with DCE Dynamic Content Elements . The problem I have a problem when I try to work with images . I created a select field for images which works fine . In the fluid template I have the following code for handling the image : .. . .. . But if I try to insert the content element Typo3 throws me this exeption : .. . .. . I already found out that this is pretty sure a bug in Typo3 but how can I fix it .. . Answer : For the Template use this code : .. . .. . Notice field : fal is not the variable name you set it s part of the configuration below the variable name : Comment : I can confirm that this works . It s a little bit confusing because you might think field : is the field name . Maybe it s intended to be but doesn t work like this in this case .", "Question : null .. . Answer : Now I have a task to write rpc server and client by the dcerpc library implement by samba . I wanted to get some info from samba.org and the source in past 4 days . Unfortunately i get nothing useful to me . Is there an example or tutorial for writing a rpc server and client RPC Helloworld by the samba s rpc implement Thx a lot", "Question : null .. . Answer : I have an application hosted on Linux 5.5 that uses SMB and RPC calls to a Windows server to gain some data from the registry . The problem is that when I have a look at the wireshark traces I see a response coming from the windows-server stating that bind nak reason protocol version not supported . I see that the Linux server is using Major version 5 and minor version 0 . Tried with Windows 2008 server . Same problem seen . Due to this I am not able to get the data I want . Any idea how I could decode the problem What do I look for on the windows linux server . Note : - The initial to and fro using SMB protocol is successful . That is I can see in the wireshark traces that there was a negotiation of protocol then I can see commands such as session setup andx request session setup andx response NT create andx request NT create andx response etc etc .", "Question : Everyone who tries to utilize JMH framework to create some meaningful tests will see JMH sample tests http : hg.openjdk.java.net code-tools jmh file tip jmh-samples src main java org openjdk jmh samples . As we went through them we stucked by the dead-code elemination JMHSample 08 DeadCode.java . Excerpt : .. . .. . The measurement of measureWrong will be approximately the same as for the baseline test . Because the return-value of the Math.log is never used . Therefore the HotSpot compiler will eliminate the dead-code . Ok understood but how can the compiler decide that Math.log can be eliminated . As we looked closely to the test we note that Math.log is a native method . And native calls go down to the OS and execute a corresponding lib . Right This lead us to the assumption that native calls could be eliminated by the compiler if their return-value is not used and they don t perform io operations . We wonder what if the lib which resides somewhere in the OS and which handles the native calls from the java world provides no return-value but does io operations e.g . logging . Will those instructions completely be wiped out To proof our assumption we reconstructed the scenario with a simple JMH test and a native call . We compiled three c-native libs to perform : .. . .. . 1 . returning 42 .. . 2 . parameter addition .. . 3 . empty file creation .. . .. . As we called them in a JMH test similarly to measureWrong test none of them has been eliminated not even the one which doesn t perform an io operation . Due to the test result our assumption cannot be confirmed . Native calls cannot be optimized out meaning that Math.log and custom native calls do not have the same basis . They are not equaly native . Maybe we made a mistake in our native lib code and at least the native call of test 1 should have been eleminated . If this is true we will share our code with you . So we searched further and found a term Intrinsics where java code will be replaced with a corresponding to the architecture very optimized code . java.lang.Math.log is having such intrinsic implementation . Are there any relations between the Natives and Intrinsics If the above assumption of the relationship between Natives and Intrinsics is valid will the compiler perform the following steps to eliminate the native call At the compile-time the HotSpot checks the existence of the intrinsic implementation in jdk for the Math.log and replaces Math.log with that code . Afterwards the second check happens where HotSpot looks after the return-value of a method . And on this outcome the HotSpot decides to eliminate the Math.log call completely . Comment : Math.log is acctually an intrinsic . This means it is known to the JIT and substituted with a predefined set of machine instructions . Also native instructions are not eliminated by the jit as it cannot prove they do not have side effects . Android might still treat its native methods as intrinsics . .. . Answer : As we looked closely to the test we note that Math.log is a native method . And native calls go down to the OS and execute a corresponding lib . Right Native calls don t go to the OS they go to a native library via JNI . That may end up going to the OS or it may go into some user provided lib . In the case of native methods in the JDK we can also expect some native calls to be compiled as intrinsics . This lead us to the assumption that native calls could be eliminated by the compiler if their return-value is not used and they don t perform io operations . The JVM does not look into arbitrary native calls to determine what sort of side effects they may or may not have . This means native calls are indeed made as method calls on the assembly level you jump into foriegn code somewhere another frame on the stack etc . . This also means that the JVM cannot eliminate them or their dependant inputs . Native calls cannot be optimized out meaning that Math.log and custom native calls do not have the same basis . Yes . Are there any relations between the Natives and Intrinsics Some native JDK methods are intrinsics . But normal JDK methods can be intrinsics too . The set of intrinsic methods is also different from one JVM to the next . If the above assumption of the relationship between Natives and Intrinsics is valid will the compiler perform the following steps to eliminate the native call The Math.log function is transformed into a special node in the C2 compiler IR intermediate representation . This node can be optimized away because it is known to have no side effects and it s value is never used . If the value is used the JVM knows to emit specialized machine code for this node . In summary : Intrinsics are optimized method replacements built into the JVM compiler . They can be used to replace any method native or otherwise with : .. . .. . 1 . Specialized assembly code .. . 2 . Specialized IR code .. . 3 . An internal JVM method call .. . 4 . A combination of the above Comment : Thank you for the detailed and helpful answer . The lack of knowledge about possible side effects within the native-code explains why our native call was not eliminated .", "Question : null .. . Answer : I am new to this community and also to R so please feel free to tell me if I have to consider a specific question format or if I get something wrong . .. . .. . I am trying to create a discrete choice design using R and I discovered AlgDesign and support.CEs . Nevertheless I have not yet figured out how to do exactly what I would like to do . Is it possible to do fractional factorial designs which also account for two-way interaction effects not only main effects I found a question with regard to fractional factorial designs here but this one was only interested in main effects . And here is my exact design problem : I have 6 attributes with the following number of levels 6 3 3 3 2 2 . A full factorial would result in 432 possible combinations if I got that right . I would like to create a choice design with 2 alternatives plus opt out option which should consider main effects and two-way interactions . The design should be as efficient as possible . How can I measure D-efficiency The respondents should answer two blocks of 8 choice sets . I am not sure yet whether it makes sense to define more choice sets though and apply then a random selection in the questionnaire itself . Using support.CEs I created two blocks with 18 questions each . I did not specify the number of choice sets though this was an automatic result . And I have no idea whether interaction effects are considered with this design . Could anybody help me please .. . .. . Thanks in advance" ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
es2015@ecmascript-2015@114
es2015 -- use this tag where the question specifically relates to new features technical changes code updates in @placeholder .
{ "confidence": [ 19.521215438842773, 18.11128807067871, 18.11128807067871, 16.902252197265625, 16.439510345458984, 16.269142150878906, 15.988107681274414, 15.718180656433105, 15.508222579956055, 15.508222579956055, 14.867636680603027, 14.802315711975098, 14.584602355957031, 14.584602355957031, 14.584602355957031, 14.390377044677734, 14.063672065734863, 13.834709167480469, 13.706026077270508, 13.672401428222656, 13.672401428222656, 13.541812896728516, 13.430835723876953, 13.306071281433105, 13.306071281433105, 13.306071281433105, 13.306071281433105, 13.246929168701172, 13.174674987792969, 13.174674987792969, 12.978351593017578, 12.940216064453125, 12.812627792358398, 12.812627792358398, 12.812627792358398, 12.73428726196289, 12.708921432495117, 12.58294677734375, 12.58294677734375, 12.511408805847168, 12.510629653930664, 12.458948135375977, 12.424781799316406, 12.424781799316406, 12.424781799316406, 12.41301441192627, 12.41301441192627, 12.407549858093262, 12.384248733520508, 12.338793754577637, 12.262474060058594, 12.240941047668457, 12.172380447387695, 12.172380447387695, 12.172380447387695, 12.172380447387695, 12.092093467712402, 12.039897918701172, 12.039897918701172, 12.039897918701172, 12.039897918701172, 11.916229248046875, 11.896143913269043, 11.896143913269043, 11.896143913269043, 11.896143913269043, 11.530288696289062, 11.52146053314209, 11.52146053314209, 11.52146053314209, 11.442941665649414, 11.442941665649414, 11.442941665649414, 11.404287338256836, 11.402700424194336 ], "content": [ "As Benjamin said in his answer TC39 explicitly decided not to include this feature at least for ES2015 .", "I ve been experimenting with subclassing the built-in String object in ES2015 using Node 5.3.0 .", "Example : .. . .. . Conclusion .. . .. . The short of it is that private properties aren t something ES2015 fixed but rather just fiddled around with .", "I thought maybe this was an appropriate comment to put here since it relates to your answer .", "The .constructor property is simply inherited from X.prototype where it is set by default when you create the constructor function the new-operator does have nothing to do with it .", "Just change the return new class .. . to return .. . and change the usage to not use the new keyword .", "Good question .", "When the new https : developer.mozilla.org en-US docs Web JavaScript Reference Operators new-operator is used on X a new object is created inheriting X.prototype .", "Both will be called as the new instance is constructed .", "var b new Thing b.init .", "Or if this is a separate question I can write a question .", "It would be better if you could explain how your code answers the OP s question", "Any undefined properties in that new object including constructor are looked up from there .", "There is no copying of properties happening and no .constructor property is created by the new call .", "Try var x new X x.hasOwnProperty constructor false .", "It should not be called with new either .", "But you could mimic that behaviour by not attaching the new properties to the object but keeping them inside a class constructor and use getters and setters to reach the hidden properties .", "But it s too much boilerplate code for my taste :", "This new approach has two other benefits : .. . .. . 1 .", "Thanks to the magic of babel you can use this today .", "Unless you know what it is you should not use it .", "-1 this does not answer your question really .", "function X var x new X x.constructor X is true so for all intends and purposes my statement should be correct", "Can t you just use public variable2 true under class", "You can of course use : .. . .. . In the constructor like you suggested .", "Please don t use a prototype method named after the class itself .", "If you really want to use this approach the canonical name for the method is init .", "However afaik the symbols currently contained in the spec are only used to describe internal properties like prototype and there is no way to create and use them in user code .", "Note that the getters and setters gets redefine on each new instance of the class .", "new class is a horrible antipattern http : stackoverflow.com q 10406552 1048572 .", "Sorta like having 2 constructors where you separate out the declarations and the other constructor actions you want to take and stylistically makes it not too hard to understand that s what is going on too .", "ES7 and beyond .. . .. . A new proposal for ES7 is being worked on that allows more concise instance-variables through class declarations and expressions - https : esdiscuss.org topic es7-property-initializers", "@ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations .", "Just to add to Benjamin s answer class-variables are possible but you wouldn t use prototype to set them .", "As it stands it seems hardly possible to use ES6 classes like real oop classes which is somewhat disappointing.. .", "Can t you use Object.getOwnPropertySymbols", "getInitialState should not be used with es6 code .", "The code to reproduce the issue follows : .. . .. . The code above demonstrates that the prototype chain isn t being setup as I would expect .", "What it won t allow you to do is seamlessly transition async code back into sync code so this.findOne will return a promise .", "Half-answers .. . .. . JavaScript is unfortunately a language where half-answers are often more accessible than real ones .", ".. . .. . NOTE : I very purposefully do not use the typical idiomatic ideas of initializing like an init or initialize method because those are often used differently .", "As a result your User object may not be populated immediately after called new User id : 1234 .", "The code is as following : .. . .. . Card Component : .. . .. . Welcome Panel Component :", "It s best to avoid code only answers .", "Update 1 : .. . .. . Here s an updated version of my code .", "So we use the scoped variables method to create a private WeakMap then use that WeakMap to retrieve private data associated with this .", "Despite that here s how you would use Symbols : .. . .. . Underscores .. . .. . The old default just use a public property with an underscore prefix .", "MyClass.foo gives bar but new MyClass .foo is undefined .. . .. . If you want to also have access to your class variable from an instance you ll have to additionally define a getter : .. . .. . I ve only tested this with Traceur but I believe it will work the same in a standard implementation .", "Other Updates .. . .. . The command I used to browserify dflow http : g14n.info dflow as a window global object was .. . .. . browserify -s dflow -e index.js -o dist dflow.js .. . .. . I changed it cause I prefer to use require also inside the browser so now I am using .. . .. . browserify -r . index.js : dflow -o dist dflow.js .. . .. . and so I changed the bower.moduleType to node in my bower.json file .", "What @Bergi and @Quentin Roy are getting as is you are straying away from the actual question in relation to ES6 classes .", "You can use closures with IIFEs in ES5 too .", "Example : .. . .. . This example uses an Object to use one WeakMap for multiple private properties you could also use multiple WeakMaps and use them like age.set this 20 or write a small wrapper and use it another way like privateProps.set this age 0 .", "I agree I ve noticed that a lot of people angry to JS because they try to use it like Java like they get used to because JS syntax looks similar and they assume that it works the same way.. .", "Stylistically we could use that that to make an ES6 class that stylistically still makes sense but does not group the typical actions taking place in the constructor with all the property declarations we re doing .", "We simply use the actual JS constructor as the declaration area then make a class named function that we otherwise treat as the other constructor stuff area calling it at the end of the true constructor .", "I find it s a nice style to use when dealing with a lot of declarations and or a lot of actions needing to happen on instantiation and wanting to keep the two ideas distinct from each other .", "I use npm scripts and so I can take advantage of npm package name variable and write once the script I use to browserify .", "I m running the code untranspiled using a bunch of harmony flags .", "funny thing the first code works just fine in firefox.. .", "It s just something we need to assume trusted code won t do .", "This is a half-answer because an Object s Symbol keys can be listed by external code .", "This doesn t really answer the question at all as PrivatePerson is not a class that can be inherited from or whose prototype can be extended it s just a factory function .", "Of course with React v13 everything works fine and there is no need to use the workaround mentionned .", "But you can create private access to properties like this : .. . .. . Use modules .", ".. . .. . Use module-pattern factory function and closure to achieve proper encapsulation .", "As for angularjs in itself I might use globals yes but read my update .", "It seems like using Symbols is similar to doing const myPrivateMethod Math.random Something.prototype +myPrivateMethod function .. . new Something +myPrivateMethod .This isn t really privacy it s obscurity in the sense of traditional JavaScript .", "However if I manually fix the proto using the code below everything works correctly .", "@Cody : Your whole module code does have its own scope in ES6 anyway no need for an IEFE .", "The options should refer to the different ways to modularize some JavaScript code : .. . .. . amd : using AMD define like requirejs .", "I ve yet to find a definitive answer to the question but my quick and dirty solution has been working for the moment so I ll leave it as the answer for anyone who runs into the same problem .", "Second OP question was : How can I prevent access to instance.property and my answer is : an example of how.. . Third if you have any better idea - let s hear it", "I updated my post with additional thoughts about the question what to do with unsupported package-managers - yet again this field is not mandatory or used for anything right now - its value is informative only .", "use-strict .. . .. . class Str extends String .. . constructor ...args .. . super ...args .. . Object.setPrototypeOf this new.target.prototype .. . .. . .. . capitalize .. . return this.slice 0 1 .toUpperCase this.slice 1 .. . .. . .. . .. . var s new Str asdf .. . console.log s.constructor .. . Function : Str .. . .. . console.log s . proto .. . Str .. . .. . console.log s.capitalize .. . Asdf .. . .. . I m really curious to know why the inheritance is not working as I d expect .", "Very much like how you can use reflection in languages like C and Java to access private fields ." ] }
{ "confidence": [ 20.696754455566406, 17.452255249023438, 15.555992126464844, 15.111631393432617, 14.761696815490723, 13.778348922729492, 12.677475929260254, 12.487040519714355, 12.11373233795166, 11.836674690246582, 11.448335647583008, 11.238373756408691, 11.226189613342285, 11.17003059387207, 11.17003059387207, 10.840901374816895, 10.672873497009277 ], "content": [ "Question : I ve been experimenting with subclassing the built-in String object in ES2015 using Node 5.3.0 . I m running the code untranspiled using a bunch of harmony flags . Here s the full command : node --harmony --harmony modules --harmony destructuring --harmony rest parameters --harmony arrow-functions --harmony spreadcalls --harmony object --harmony default-parameters --harmony new target --harmony reflect --harmony modules t.js .. . .. . Given that the spec specifically says the String object is made to be subclassable See section 21.1.1 The String Constructor I m struggling to understand if this is something that I m doing wrong or a bug in Node or maybe even V8 . The code to reproduce the issue follows : .. . .. . The code above demonstrates that the prototype chain isn t being setup as I would expect . However if I manually fix the proto using the code below everything works correctly . use-strict .. . .. . class Str extends String .. . constructor ...args .. . super ...args .. . Object.setPrototypeOf this new.target.prototype .. . .. . .. . capitalize .. . return this.slice 0 1 .toUpperCase this.slice 1 .. . .. . .. . .. . var s new Str asdf .. . console.log s.constructor .. . Function : Str .. . .. . console.log s . proto .. . Str .. . .. . console.log s.capitalize .. . Asdf .. . .. . I m really curious to know why the inheritance is not working as I d expect . Comment : you don t capture the passed argument in the first one Comment : I can t answer about extending String but this.slice 0 1 .toUpperCase is wrong . You probably want this.substr 0 1 .toUpperCase . Comment : funny thing the first code works just fine in firefox.. . Comment : @naomik What s wrong with slice 0 1 Comment : The ES6 spec does allow for subclassing built-ins but engines still need to implement support . The Compatibility Table https : kangax.github.io compat-table es6 test-miscellaneous subclassables String is subclassable says it does support it under strict-mode but it doesn t because s instanceof Str true . So unfortunately it doesn t look like subclassing String is possible for the current version of Node .. . Answer : I ve yet to find a definitive answer to the question but my quick and dirty solution has been working for the moment so I ll leave it as the answer for anyone who runs into the same problem . You can fix the prototype chain when inheriting from the String built-in using the following line in your constructor : .. . .. . Object.setPrototypeOf this new.target.prototype .. . .. . The new.target.prototype bit ensure that should you inherit further from your own type the prototype chain will continue to be correct .", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : As Benjamin said in his answer TC39 explicitly decided not to include this feature at least for ES2015 . However the consensus seems to be that they will add it in ES2016 . The syntax hasn t been decided yet but there s a preliminary proposal https : esdiscuss.org topic es7-property-initializers for ES2016 that will allow you to declare static properties on a class . Thanks to the magic of babel you can use this today . Enable the class-properties transform according to these instructions http : babeljs.io docs plugins transform-class-properties and you re good to go . Here s an example of the syntax : .. . .. . This proposal is in a very early state so be prepared to tweak your syntax as time goes on . Comment : Yes that s not ES6 . Unless you know what it is you should not use it .", "Question : Is it possible to create private properties in ES6 classes Here s an example . How can I prevent access to instance.property .. . Answer : To expand on @loganfsmyth s answer : .. . .. . The only truly private data in JavaScript is still scoped variables . You can t have private properties in the sense of properties accessed internally the same way as public properties but you can use scoped variables to store private data . Scoped variables .. . .. . The approach here is to use the scope of the constructor function which is private to store private data . For methods to have access to this private data they must be created within the constructor as well meaning you re recreating them with every instance . This is a performance and memory penalty but some believe the penalty is acceptable . The penalty can be avoided for methods that do not need access to private data by adding them to the prototype as usual . Example : .. . .. . Scoped WeakMap .. . .. . A WeakMap can be used to avoid the previous approach s performance and memory penalty . WeakMaps associate data with Objects here instances in such a way that it can only be accessed using that WeakMap . So we use the scoped variables method to create a private WeakMap then use that WeakMap to retrieve private data associated with this . This is faster than the scoped variables method because all your instances can share a single WeakMap so you don t need to recreate methods just so that they re all accessing their own WeakMap . Example : .. . .. . This example uses an Object to use one WeakMap for multiple private properties you could also use multiple WeakMaps and use them like age.set this 20 or write a small wrapper and use it another way like privateProps.set this age 0 . This method could also be done with Map but WeakMap is better because Map will create memory-leaks unless you re very careful and for this purpose the two aren t otherwise different . Half-answers .. . .. . JavaScript is unfortunately a language where half-answers are often more accessible than real ones . The WeakMap approach is technically a half-answer because somebody could have tampered with the global WeakMap object but I consider it less so than other half-answers because all JavaScript code can be broken by mangled globals . It s just something we need to assume trusted code won t do . Scoped Symbols .. . .. . A Symbol is a type of primitive value that can serve as a property name . You can use the scoped variable method to create a private Symbol then store private data at this mySymbol . This is a half-answer because an Object s Symbol keys can be listed by external code . Despite that here s how you would use Symbols : .. . .. . Underscores .. . .. . The old default just use a public property with an underscore prefix . While not a private property by any stretch of the imagination this is easily the simplest most readable and fastest approach . Thanks to the convention s prevalence it does a good job of communicating that the property should be private and that often gets the job done . Example : .. . .. . Conclusion .. . .. . The short of it is that private properties aren t something ES2015 fixed but rather just fiddled around with . So the state of things is that there are a list of options none wholly superior each with pros and cons . I m sorry . Comment : The first example snippet scoped variables is a total antipattern - each returned object will have a different class . Don t do that . If you want privileged methods create them in the constructor . Comment : Wrapping a class inside a function seems to defeat the whole purpose of using classes in the first place . If you already use the function to create an instance you might as well place all your private public members inside that function as well and forget about the whole class keyword . Comment : @Bergi @Kokodoko I edited the scoped variables approach to be slightly faster and not break instanceof . I admit I was thinking of that approach as included only for completeness sake and should have given more thought to how much it is actually capable of . Comment : your this.greet in the first example should use an arrow function so that it inherits lexical this automatically", "Question : I am creating my first Bower component . After running bower init the script asks me what types of modules does this package expose with these options : .. . .. . amd .. . es6 .. . globals .. . node .. . .. . what is the difference between these options .. . Answer : Initial .. . .. . I m using bower init for first time too . The options should refer to the different ways to modularize some JavaScript code : .. . .. . amd : using AMD define like requirejs . node : using Node.js require . globals : using JavaScript module-pattern to expose a global variable like window.JQuery . es6 : using upcoming EcmaScript6 module feature . In my case I wrote a Node.js module dflow http : g14n.info dflow but I m using browserify to create a dist dflow.js file that exports a global dflow var : so I selected globals . Other Updates .. . .. . The command I used to browserify dflow http : g14n.info dflow as a window global object was .. . .. . browserify -s dflow -e index.js -o dist dflow.js .. . .. . I changed it cause I prefer to use require also inside the browser so now I am using .. . .. . browserify -r . index.js : dflow -o dist dflow.js .. . .. . and so I changed the bower.moduleType to node in my bower.json file . The main motivation was that if my module name has a dash for example my project flow-view http : g14n.info flow-view I need to camelize the global name in flowView . This new approach has two other benefits : .. . .. . 1 . Node and browser interface are the same . Using require on both client-side and server-side let me write only once the code examples and reuse them easily on both contexts . 2 . I use npm scripts and so I can take advantage of npm package name variable and write once the script I use to browserify . This is another topic but it is really worth that you consider how it is useful the latter benefit : let me share the npm.scripts.browserify attribute I use in my package.json .. . .. . browserify : browserify -r . index.js : npm package name -o dist npm package name .js Comment : you can actually using require inside of define for ex : define function require exports module use-strict module.exports Collection : require . collection View : require . view", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : Just to add to Benjamin s answer class-variables are possible but you wouldn t use prototype to set them . For a true class variable you d want to do something like the following : .. . .. . From within a class-method that variable can be accessed as this.constructor.foo or MyClass.foo . These class-properties would not usually be accessible from to the class instance . i.e . MyClass.foo gives bar but new MyClass .foo is undefined .. . .. . If you want to also have access to your class variable from an instance you ll have to additionally define a getter : .. . .. . I ve only tested this with Traceur but I believe it will work the same in a standard implementation . JavaScript doesn t really have classes https : developer.mozilla.org en-US docs Web JavaScript Guide Details of the Object Model . Even with ES6 we re looking at an object- or prototype-based language rather than a class-based language . In any function X X.prototype.constructor https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object constructor points back to X . When the new https : developer.mozilla.org en-US docs Web JavaScript Reference Operators new-operator is used on X a new object is created inheriting X.prototype . Any undefined properties in that new object including constructor are looked up from there . We can think of this as generating object and class-properties . Comment : Your points 2 and 3 are incorrect . There is no copying of properties happening and no .constructor property is created by the new call . Comment : @Bergi you are right about 2 : it is not really copying but a lookup up the prototype chain which opens up special possibilities . I will see how I can reformulate this . What do you think is wrong about 3 though function X var x new X x.constructor X is true so for all intends and purposes my statement should be correct Comment : Try var x new X x.hasOwnProperty constructor false . The .constructor property is simply inherited from X.prototype where it is set by default when you create the constructor function the new-operator does have nothing to do with it . Comment : Updated . I didn t want to go into much more detail than what is needed to give additional context to my answer but clearly there shouldn t be any inaccuracies and I think they re fixed now .", "Question : I am creating my first Bower component . After running bower init the script asks me what types of modules does this package expose with these options : .. . .. . amd .. . es6 .. . globals .. . node .. . .. . what is the difference between these options .. . Answer : If you don t know it s quite likely globals is the right answer for you . Either way you need to understand : .. . .. . what is and why AMD http : requirejs.org docs whyamd.html .. . what is a nodejs module http : nodejs.org api modules.html .. . what is ecmascript-6 and especially es6 modules http : wiki.ecmascript.org doku.php id harmony : modules .. . .. . UPDATE .. . .. . This feature was introduced very recently in bower and is not documented at all yet AFAIK . It essentially describes the moduleType which states for what module technology the package is meant to be consumed see above . Right now It doesn t have any effect apart from setting the moduleType property in the bower.json file of the package . See https : github.com bower bower pull 934 for the original pull-request . UPDATE 2 .. . .. . A few additional points to answer comments : .. . .. . right now AFAIK there is no validation done on the moduleType property - which means that people are technically allowed to use whatever value they want for it including angularjs if they feel inclined to do so .. . the bower committee https : github.com bower bower pull 1129 issuecomment-37359448 seems to not be keen toward the inclusion of additional non-interoperable proprietary moduleTypes think composer angular etc - which is easily understandable but yet again nothing really prevents people from using the moduleType value they want .. . an exception to the previous is the somewhat recent inclusion of the yui moduleType so there are exceptions to be made assuming they are part of a concerted plan https : github.com bower bower pull 1129 issuecomment-37828996 .. . .. . What I would do if I were to author a package for a not-listed package manager and publish it on bower I would author an es6 module and use patch es6-transpiler https : github.com square es6-module-transpiler to output the package format I need . Then I would either and : .. . .. . petition the bower guys to include my package technology as a choice based on the fact it s supported by es6-transpiler as a target .. . publish my package including both the es6 module version of it and the transpiled XXX version of it and use es6 as a moduleType .. . .. . Disclaimer : I don t have real-life experience authoring angularjs modules . Comment : would globals be the right answer for creating an AngularJS module package Comment : I updated my post with additional thoughts about the question what to do with unsupported package-managers - yet again this field is not mandatory or used for anything right now - its value is informative only . As for angularjs in itself I might use globals yes but read my update . Hope that helps . Comment : I m using node . Does that mean I am exposing node-modules I am also using angular which was what I was installing using bower when I noticed that I had a message telling me I had No bower.json file to save to use bower init to create one . Or if this is a separate question I can write a question . I thought maybe this was an appropriate comment to put here since it relates to your answer . Thanks", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : Since your issue is mostly stylistic not wanting to fill up the constructor with a bunch of declarations it can be solved stylistically as well . The way I view it many class based languages have the constructor be a function named after the class name itself . Stylistically we could use that that to make an ES6 class that stylistically still makes sense but does not group the typical actions taking place in the constructor with all the property declarations we re doing . We simply use the actual JS constructor as the declaration area then make a class named function that we otherwise treat as the other constructor stuff area calling it at the end of the true constructor . Both will be called as the new instance is constructed . Sorta like having 2 constructors where you separate out the declarations and the other constructor actions you want to take and stylistically makes it not too hard to understand that s what is going on too . I find it s a nice style to use when dealing with a lot of declarations and or a lot of actions needing to happen on instantiation and wanting to keep the two ideas distinct from each other . .. . .. . NOTE : I very purposefully do not use the typical idiomatic ideas of initializing like an init or initialize method because those are often used differently . There is a sort of presumed difference between the idea of constructing and initializing . Working with constructors people know that they re called automatically as part of instantiation . Seeing an init method many people are going to assume without a second glance that they need to be doing something along the form of var mc MyClass mc.init because that s how you typically initialize . I m not trying to add an initialization process for the user of the class I m trying to add to the construction process of the class itself . While some people may do a double-take for a moment that s actually the bit of the point : it communicates to them that the intent is part of construction even if that makes them do a bit of a double take and go that s not how ES6 constructors work and take a second looking at the actual constructor to go oh they call it at the bottom I see that s far better than NOT communicating that intent or incorrectly communicating it and probably getting a lot of people using it wrong trying to initialize it from the outside and junk . That s very much intentional to the pattern I suggest . .. . .. . For those that don t want to follow that pattern the exact opposite can work too . Farm the declarations out to another function at the beginning . Maybe name it properties or publicProperties or something . Then put the rest of the stuff in the normal constructor . Comment : Please don t use a prototype method named after the class itself . That s non-idiomatic in JS don t try to make it look like another language . If you really want to use this approach the canonical name for the method is init . Comment : @Bergi - init is a pattern used often and often meant to be called from outside the class when the outside user wants to initialize i.e . var b new Thing b.init . This is a 100 stylistic choice that I d prefer to communicate that it is a 2nd function that is automatically called by taking advantage of the patterns found in other languages . It s far less likely that someone would look at this and assume that they need to call the MyClass method from outside more likely that they d realize the intent is a 2nd method acting in construction i.e . called by itself on instantiation . Comment : Hm I might realise that by looking at the constructor but not from the method name MyClass . Comment : @Bergi - you very well might not realize it at first just from looking at the method name MyClass . But you wouldn t get false assumptions from it either . At worst you might not know JS and think it s the actual constructor...but since it acts like that and the only things happening in the true constructor are declarations...that actually would not be that improper of a way of treating it . Comment : @Bergi - Taking a pattern from another language and applying it to JS in a way that isn t technically what s happening but still works is not completely without precedent . You can t tell me nobody has noticed that the myvar standard way of referring to variables intended to hold jQuery objects isn t conveniently similar to the pattern of having at the beginning of variables that so many PHP programmers are used to . Just that little implication that yeah it s not the same exact thing...but look...it s still a variable because that is a way variables are done in some languages helps .", "Question : Is it possible to create private properties in ES6 classes Here s an example . How can I prevent access to instance.property .. . Answer : Short answer no there is no native support for private properties with JS6 classes . But you could mimic that behaviour by not attaching the new properties to the object but keeping them inside a class constructor and use getters and setters to reach the hidden properties . Note that the getters and setters gets redefine on each new instance of the class . Javascript 6 .. . .. . Javascript 6 Comment : As of now -- as far as I m concerned -- THIS SHOULD BE THE ACCEPTED ANSWER as you must have a closure with the current spec . Comment : I like this solution the best . I agree it shouldn t be used for scaling but it s perfect for classes that will usually only be instantiated once per include . Comment : new class is a horrible antipattern http : stackoverflow.com q 10406552 1048572 . Don t do this . If you want to return an object just return an object-literal and don t confuse anyone . Comment : This doesn t really answer the question at all as PrivatePerson is not a class that can be inherited from or whose prototype can be extended it s just a factory function . It should not be called with new either . Comment : What @Bergi and @Quentin Roy are getting as is you are straying away from the actual question in relation to ES6 classes . Just change the return new class .. . to return .. . and change the usage to not use the new keyword . This which is a factory-method is a perfectly viable solution IF you can live without ES6 classes .", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : The notes in the ES wiki for the proposal in ES6 maximally minimal classes http : wiki.ecmascript.org doku.php id strawman : maximally minimal classes note : .. . .. . There is intentionally no direct declarative way to define either prototype data properties other than methods class-properties or instance property .. . .. . Class properties and prototype data properties need be created outside the declaration . .. . Properties specified in a class definition are assigned the same attributes as-if they appeared in an object-literal . This means that what you re asking for was considered and explicitly decided against . .. . .. . but.. . why Good question . The good people of TC39 want class declarations to declare and define the capabilities of a class . Not its members . An ES6 class declaration defines its contract for its user . Remember a class definition defines prototype methods - defining variables on the prototype is generally not something you do . You can of course use : .. . .. . In the constructor like you suggested . Also see the summary of the consensus http : wiki.ecmascript.org lib exe fetch.php id strawman 3Amaximally minimal classes cache cache media strawman : maxminclasssemantics.pdf . ES7 and beyond .. . .. . A new proposal for ES7 is being worked on that allows more concise instance-variables through class declarations and expressions - https : esdiscuss.org topic es7-property-initializers Comment : @wintercounter the important thing to take from it is that allowing defining properties would define them on the prototype like the methods and not on each instance . Maximally minimal classes is still at its very core prototypical inheritance . What you really want to do in your case is share structure and assign members for each instance . This is simply not what classes in ES6 aim for - sharing functionality . So yes for sharing structure you d have to stick to the old syntax . Until ES7 at least : Comment : You might want to mention static properties Comment : Oops brain fart . I forgot that static works only for methods as well . Comment : Maybe the good people at TC39 should name this concept something other than class if they don t want it to behave like the rest of the programming world expects from something named class . Comment : See also the Class Fields Static Properties proposal already implemented in Babel http : babeljs.io : github.com jeffmo es-class-fields-and-static-properties https : github.com jeffmo es-class-fields-and-static-properties", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : In your example : .. . .. . Because of MY CONST is primitive https : developer.mozilla.org en-US docs Glossary Primitive we can just do : .. . .. . But if MY CONST is reference-type like static get MY CONST return string alert output is string false . In such case delete-operator can do the trick : .. . .. . And finally for class variable not const : Comment : Nice one . But it s too much boilerplate code for my taste : Comment : Please avoid the delete-operator if alone for performance reasons . What you actually want here is Object.defineProperty .", "Question : I m trying to call a generator function inside a class from the constructor it runs but nothing happens my console.log are not printing as-if the generator function is never called . Update 1 : .. . .. . Here s an updated version of my code . I am able to access my findOne function with the next function but since I wrapped users with co-monk I tough there was no need to call it . I m still not sure why I need to call next 0 function 2 times to jump over the yield call . Therefore I m now getting undefined when I print the output of userData . If my issue is related to understand on how yield works maybe pointing me to direction could help me . I tried using generator functions with yield calls apart from a class and it worked perfectly fine with monk co-monk . Update 2 : .. . .. . I should also mention that I m using babel6 for transcript . Comment : this.findOne id is a syntax-error . Comment : My bad I made a typo before posting this . Thanks for pointing it out . .. . Answer : It looks like the docs for co-monk are a bit vague but looking at the one test it has https : github.com tj co-monk blob master test index.js it needs to be used within co . What it won t allow you to do is seamlessly transition async code back into sync code so this.findOne will return a promise . As a result your User object may not be populated immediately after called new User id : 1234 . Comment : Thank you for you r kind reply . What I did finally i got out the generator function out of my class and inside findOne function i returned a promise from monk db call . I then used generator function with yield call from the contoller function into this.body response . It s way cleaner that way . Here my upvote for you annnnnnnnnnnnnnnd my 5o points bounty since you were the only one to answer me - thanks a lot Comment : You re welcome : Glad you got it working .", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : What about the oldschool way In constructor you mention only those vars which have to be computed . I like prototype inheritance for this feature -- it can help to save a lot of memory in case if there are a lot of never-assigned vars . Comment : Defining properties on the prototype is almost never desirable . This is why it wasn t included in ES6 maximally minimal classes in the first place . Comment : This doesn t save memory and it just makes performance much worse than if you had declared them in the constructor . codereview.stackexchange.com a 28360 9258 http : codereview.stackexchange.com a 28360 9258 Comment : Also this defeats the purpose of using ES6 classes in the first place . As it stands it seems hardly possible to use ES6 classes like real oop classes which is somewhat disappointing.. . Comment : @Kokodoko real oop -- you mean like i.e . in Java I agree I ve noticed that a lot of people angry to JS because they try to use it like Java like they get used to because JS syntax looks similar and they assume that it works the same way.. . But from the inside it is quite differ as we know . Comment : It s not just about language syntax though . The OOP philosophy lends itself quite well to programming in general - especially when creating apps and games . JS has traditionally been implemented in building webpages which is quite different . Somehow those two approaches need to come together since the web is becoming more about apps as well .", "Question : Is it possible to create private properties in ES6 classes Here s an example . How can I prevent access to instance.property .. . Answer : Update : A proposal with nicer syntax https : github.com zenparsing es-private-fields is on its way . Contributions welcome . .. . .. . Yes there is - for scoped access in objects - ES6 introduces Symbol s http : people.mozilla.org jorendorff es6-draft.html sec-symbol-objects . Symbols are unique you can t gain access to one from the outside except with reflection like privates in Java C but anyone who has access to a symbol on the inside can use it for key access : Comment : Can t you use Object.getOwnPropertySymbols Comment : @BenjaminGruenbaum : Apparently Symbols no longer ensure true privacy : stackoverflow.com a 22280202 1282216 http : stackoverflow.com a 22280202 1282216 Comment : @trusktr through thre keys No . Through the symbols Yes . Very much like how you can use reflection in languages like C and Java to access private fields . Access modifiers aren t about security - they re about clarity of intent . Comment : It seems like using Symbols is similar to doing const myPrivateMethod Math.random Something.prototype +myPrivateMethod function .. . new Something +myPrivateMethod .This isn t really privacy it s obscurity in the sense of traditional JavaScript . I would consider private JavaScript to mean using closures to encapsulate variables . Those variables are hence not accessible through reflection . Comment : Also I feel that using the private and protected keywords would be so much cleaner than Symbol or Name . I prefer dot notation rather than bracket notation . I d like to keep using a dot for private things . this.privateVar", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : Babel http : babeljs.io supports class-variables in ESNext check this example - http : esnextb.in gist ad168ed095aeac5ce098", "Question : Currently in ES5 many of us are using the following pattern in frameworks to create classes and class-variables which is comfy : .. . .. . With ES6 you have the ability to create classes native way but there is no option to have class-variables : .. . .. . Sadly this won t work as classes only can hold functions . I understand that i can this.myVar true from the constructor but i don t want to junk my constructor especially when i have 20-30+ params for a bigger class . I was thinking of many ways to handle this issue but didn t find any good one yet . For example to create a ClassConfig handler and pass my parameter-object which is separatelly declared from the class than the handler would attach to the class . I was thinkon on WeakMaps also to integrate somehow . What kind of ideas would you have to handle this situation Comment : your main problem is that you ll have a repetition of this.member member at your constructor with 20-30 parameters Comment : Can t you just use public variable2 true under class This would define it on the prototype . Comment : @ : Yes and also i want to use my constructor for initialization procedures and not for variable declarations . Comment : @derylius : This is the main problem it doesn t have such feature . Even public private usage is not decided yet in the ES6 draft . Give it a test spin : es6fiddle.net http : www.es6fiddle.net Comment : According to the latest it has this function : wiki.ecmascript.org doku.php id harmony : classes http : wiki.ecmascript.org doku.php id harmony : classes .. . Answer : This is a bit hackish combo of static and get works for me .. . .. . elsewhere used Comment : I d recommend singleton instance as a property name so that everybody understands what you are doing here .", "Question : I have an ES6 class : .. . .. . That I can export in ES6 using this expression source : react ES6 browserify https : github.com tcoopman react-es6-browserify .. . .. . This works fine . Now I would like to use ES6 inheritance to extend my BaseClass class : .. . .. . But when I call React.createClass on the ExtendedClass class I got the following exception : .. . .. . I know React 0.13 is supposed to be more ES6 friendly but is there any ways to handle that EDIT : .. . .. . I m using Traceur to compile my ES6 classes . The output for ExtendedClass looks like : Comment : getInitialState should not be used with es6 code . Instead set your initial state in the constructor constructor props super props this.state message : Hello Comment : This post has been posted at the time React was NOT supporting ES6 v12 . It is not relevant anymore . Of course with React v13 everything works fine and there is no need to use the workaround mentionned . .. . Answer : There is a great post about writing ReactJS in ES6 . http : ilikekillnerds.com 2015 02 developing-react-js-components-using-es6 .. . .. . Anyway when using ES6 you don t use React.createClass . you just create class that extends React.Component .. . .. . Also in ES6 you don t have getInitialState not defaultProps . it s replaced in favor using this.state inside constructor . Check out this example . Let s say you have Card component and Welcome Panel that extends Card component . The code is as following : .. . .. . Card Component : .. . .. . Welcome Panel Component :", "Question : I have an ES6 class : .. . .. . That I can export in ES6 using this expression source : react ES6 browserify https : github.com tcoopman react-es6-browserify .. . .. . This works fine . Now I would like to use ES6 inheritance to extend my BaseClass class : .. . .. . But when I call React.createClass on the ExtendedClass class I got the following exception : .. . .. . I know React 0.13 is supposed to be more ES6 friendly but is there any ways to handle that EDIT : .. . .. . I m using Traceur to compile my ES6 classes . The output for ExtendedClass looks like : Comment : getInitialState should not be used with es6 code . Instead set your initial state in the constructor constructor props super props this.state message : Hello Comment : This post has been posted at the time React was NOT supporting ES6 v12 . It is not relevant anymore . Of course with React v13 everything works fine and there is no need to use the workaround mentionned . .. . Answer : Here is the workaround I ve found : .. . .. . Inside React.js library I ve updated the ReactCompositeComponentInterface to add a custom policy for constructor As far as I know there s no way to customize this interface properly : .. . .. . Then in the ExtendedClass you have to redefine every method even if you don t customize them : .. . .. . I m not happy with this dirty solution but it will do the job waiting for a 0.13 version that hopefully will solve those issues ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ecmascript-2015
UNK_RELATION
tga@file-format@50
tga -- truevision tga or targa is a raster image @placeholder with a long history of use in computer games primarily because it was the first generally available format supporting 24-bit images .
{ "confidence": [ 54.89472961425781, 49.56667709350586, 48.96164321899414, 48.756370544433594, 48.7099609375, 47.44382095336914, 47.13337707519531, 45.706539154052734, 45.62220764160156, 45.61274337768555, 45.51100540161133, 45.342437744140625, 45.246891021728516, 44.510093688964844, 44.321327209472656, 44.259151458740234, 43.444068908691406, 43.18392562866211, 42.90769577026367, 42.90769577026367, 42.45722579956055, 41.85363006591797, 41.84550476074219, 41.804317474365234, 41.52071762084961, 41.42017364501953, 41.35384750366211, 41.34787368774414, 41.155670166015625, 41.155670166015625, 41.155670166015625, 41.155670166015625, 40.85036849975586, 40.67039489746094, 40.41733932495117, 40.41733932495117, 40.18229675292969, 40.112464904785156, 40.112464904785156, 40.112464904785156, 40.05229187011719, 39.70631790161133, 39.58047866821289, 39.07891845703125, 38.80268859863281, 38.80268859863281, 38.80268859863281, 38.453643798828125, 38.376686096191406, 37.864036560058594, 37.69930648803711, 37.32029724121094, 37.27864456176758, 37.20387649536133, 36.7583122253418, 36.7583122253418, 36.7583122253418, 35.903038024902344, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.61543655395508, 35.49834060668945, 35.097450256347656, 35.097450256347656, 35.0951042175293, 35.0951042175293, 35.0951042175293, 35.0951042175293, 35.0951042175293, 34.89448547363281, 34.88071060180664, 34.798885345458984, 34.72720718383789, 34.70187759399414, 34.51205825805664, 34.51205825805664, 34.51205825805664, 34.51205825805664, 34.51205825805664, 34.33182907104492, 33.99172592163086, 33.92949676513672, 33.92949676513672, 33.55828094482422, 33.18962860107422, 33.18962860107422, 33.18962860107422, 33.18962860107422, 33.18962860107422, 33.18962860107422, 33.18962860107422, 32.985435485839844, 32.985435485839844, 32.985435485839844, 32.985435485839844 ], "content": [ "Example TGA 24-bit file from Photoshop : .. . .. .", "I m writing the TGA reader for 16 24 and 32-bit TGA files created with Photoshop .", "Targa format http : local.wasp.uwa.edu.au pbourke dataformats tga .. . .. . Do you want to use a palette", "Do you want ASP.NET to process the TGA images or do you want ASP.NET to deliver TGA images to a browser to view", "I wrote a TGA loader to load TGA files .", "You can save image in TGA format using Encode To TGA plugin : http : u3d.as rWt", "yes I want to view TGA images on asp.net .", "And as long the .png image is loaded correctly the problem is in the loader I m using for .tga .", "Is there a way to show a TGA image on the browser or it is not supported", "I was able to find a TGA reader http : www.codeproject.com Articles 31702 NET-Targa-Image-Reader and I can convert TGA to image types supported by .NET library .", "I exported an image with gimp into a tga image while implementing a parser for tga-textures using rle .", "It loads and saves 32-bit TGA files just fine but when it comes to loading and saving 24-bit it messed up .", "And the files are tga .", "I am trying to edit a TGA 32-bit .", "I m trying to save a TGA image .", "The problem could be depending on the TGA algorithm which do not support compressed TGA .", "Tga image files are not known image files for webpages I think .", "As you already know browsers do not support TGA images .", "I m trying to load a tga .", "A .tga file is NOT a text file .", "I have a TGA file and a library that allready has everything that I need to read TGA and use them .", "Image need to create TGA alpha channel transparent http : i.stack.imgur.com gpFTb.jpg .. . .. . I want to draw TGA alpha channel transparent like that .. . .. . TGA alpha channel transparent i want .. . .. .", "I dont know whether it is possible to view tga image files on asp.net", "Example tga files avail", "I ve tested with different .tga images and all of them resulted the same mirroring .", "If plugins are not an option you will need to convert the TGA image to a format browsers can handle e.g .", "according to wikipedia and other question about tga here tga does not use padding", "Either use uncompressed format such as .tga or since you re using directx use .dds format .", "Type 2 stands for uncompressed TGA .", "Specifically I neglected the footer of the TGA .", "but with imagick i can t open a TGA .", "Tga supports different pixel depths .", "Here is a link about the TGA format : http : www.fileformat.info format tga egff.htm .. . .. . I am not expecting anyone to code a solution but if anyone have a theory on how i can do it that would be great .", "Does someone has an example of saving a tga file 32-bit", "I am looking for something small and simple that reads just TGA images .", "I m working on turning a sequence of TGA images into a video using ffmpeg .", "Not every image is stored the same way -- it seems you are assuming TGA PPM .", "Make sure you do not compress the TGA and that the TGA order less important is in a Bottom Left origin .", "I managed to open a TGA file using some scripts but it seems that I need imagick to save it also as a TGA .", "The TGA header is described rather well here http : www.paulbourke.net dataformats tga a random pick of Google results .", "Here is an example TGA anyway thanks .", "Because the .tga file is treated as a THREE.DataTexture which does not flip Y by default .", ".. . .. . The above routine works mostly for PPM images but it will fail on TGA because its header is organized differently .", "The TGA image specification contains these two fields : .. . .. . This seems strange to me .", "I m having a problem with loading a tga from a PVR .", "The header file : .. . .. . Here is the load TGA function :", "TGA is inferior in nearly every aspect compared to PNG .", "What is the use of a zero size raw packet inside a tga file", "I have a problem when i use imagick of php to draw TGA alpha channel transparent .. . .. . My picture : .. . .. . Image need to create TGA alpha channel transparent .. . .. .", "One alternative might be plugins such as flash silverlight .. . which I believe do support TGA images .", "It supports TGA among many other formats .", "I need to read-write tga files from vb I found TargaImage.dll nice lib but it allows only read tga .", "I couldn t find anything on detecting padding in TGA files .", "You can view my struggles here doing it : stackoverflow.com questions 14095604 load-24-bit-tga http : stackoverflow.com questions 14095604 load-24-bit-tga and then you can view how to actually do it here : stackoverflow.com questions 20595340 http : stackoverflow.com questions 20595340 loading-a-tga-bmp-file-in-c-opengl", "I have a TGA image encoded in Base64 .. . .. . https : gist.github.com 984770 .. . .. . But it doesn t show on the browser .", "I have an assigment in C where i have too flip a .tga image horizontaly and verticaly by doing changes to the header .", "Maybe you could help each other According to the TGA specifications your image type 1 is wrong for grayscale .", "If your texture is in dds-format or whatever and you want to change it to tga just use an online picture converter .", "As the title suggests I ve been having problems loading .tga files .", "Vlad : I believe TGA doesn t pad like BMP .", "In fact a jpg to tga conversion could do the trick too. .", "What library are you using to read your TGA file", "In C I would like to read a .tga picture into a string variable .", "I am new to android and need to save a bitmap as a tga file .", "And I also need to know how to load a tga file .", "Yeah but how come the .png version is loaded correctly and .tga isn t", "The goal is that I open the file add some text and save it again as TGA 32-bit .", "What is the recommended method to load images in C that gives access to the colour alpha data so I can extract it to the TGA", "Could it have to do with the fact that TGA images were designed for special video cards", "I ve been able to load data from the TGA header but when I attempt to load the actual image data it fails .", "If the TGA order was upside-down it would not affect the loading just displaying image upside-down in render .", "I have been trying to make this program to convert a tga image for color into black and white .", "Either start experimenting with text-only image-formats such as PPM or look up how to read binary-data and the TGA Specifications .", "It can be noticed in the following image http : i.stack.imgur.com KVqxh.png where the left one is .tga and the right one is .png .", "Click the tags png http : stackoverflow.com questions tagged png and tga http : stackoverflow.com questions tagged tga and then their More info links for resources .", "i d like to get some help on my issue with .tga file-format parsing .", "Your use of read mode w fgets and fscanf suggests you think the TGA specifications are for text-files while in fact they are in a binary format .", ".tga format is documented somewhere https : en.wikipedia.org wiki Truevision TGA and many beginner tutorials specifically deal with loading this particular format without 3rd party libraries .", "Because the result i get when trying this program on a tga file is an unopenable picture with no height .", "Photoshop since at least version 7 does support TGA with alpha-channel .", "I do need when loading TGA files to swap the color components .", "I have run into an issue while trying to write a .tga file reader .", "There is any way with code to export a .png or .tga file to local disk in Unity", "I will provide more information including the TGA files if needed .", "I ve a problem with 16-bit targa file .", "I am looking for a small and free TGA image loading class or library for java .", "I have tried using this The android version Java TGA loader http : stackoverflow.com questions 1514035 java-tga-loader but all I get is a solid white screen .", "I have read Wiki http : en.wikipedia.org wiki Truevision TGA and I know that the 5-4 bits of the Eighteenth byte of tga file represent the direction of tga file .", "User can upload a jpg file which on upload we need to convert it to TGA format .", "And imagemagick support TGA http : www.imagemagick.org script formats.php Read Write .", "I am trying to load a TGA file in Android NDK .", "If so how would I let it know that I want to encode it as TGA", "So the code for the TGA UTI would be : .. . .. . ...in place of kUTTypeImage etc", "I have control over both writing and reading the TGA .", "Even so : both TGA and PNG formats can be found on the web .", "Writing a loader for TGA is relatively straightforward so for an exercise : go for it .", "I think the problem you have is that you re assuming a TGA file is padded and it isn t .", "So i am writing a programm that converts a tga file from color to greyscale and save it as a new file .", "You must be in the same class as this person http : stackoverflow.com questions 20175511 problems-converting-tga-files-to-black-and-white", "I m using the following code to save a Bitmap to a .tga file at the moment : .. . .. . The expected output is something like this :" ] }
{ "confidence": [ 71.31417083740234, 70.02735137939453, 68.034423828125, 67.12545776367188, 66.90283203125, 66.06095123291016, 65.74868774414062, 64.22032165527344, 63.550384521484375, 63.514713287353516, 63.451072692871094, 62.756385803222656, 60.38140106201172, 56.93186569213867, 56.91044616699219, 55.69088363647461, 54.98246765136719, 54.379852294921875, 54.027774810791016, 53.50091552734375 ], "content": [ "Question : Very very slight problem with my Targa Reader . One pixel is off and 2 extra pixels are black : S .. . .. . The 24-bit targa file I m loading looks like : enter image description here http : i.stack.imgur.com 2S9hh.png .. . .. . Notice the White pixel in the very top left corner . The very first pixel at the top left is white . But when I save the file pixels back as a 24-bit bitmap it looks like : enter image description here http : i.stack.imgur.com 6IGQx.png .. . .. . Notice that the white pixel is somehow in the top right as well as 2 black pixels above it . I cannot for the life of me figure out why everything else is correct except for that. . It s bothering me because I m so close to being able to load TGA s . Any idea what is wrong with my code below I m writing the TGA reader for 16 24 and 32-bit TGA files created with Photoshop . .. . Answer : I think you have the header size wrong . The various bits are defined as below the assertions are there just to make sure the compiler packs the structures properly . Comment : Thank you I solved it . I had to set the thing to 18 and change the location I was reading from . This solved it for sure . P.S . My name is also Brandon : Thanks a lot .", "Question : I m writing a tool to automate some of our asset making for a game . What I want to do is take a folder of PNG files combine them into a texture atlas and then export the atlas as a TGA and the UV coords to XML . I m not sure which method I should use to load the PNG files in C as there seem to be several . What is the recommended method to load images in C that gives access to the colour alpha data so I can extract it to the TGA I also already have TGA creation code in C++ which I plan to move to C but I m wondering if there is anything already available in .Net to create save TGAs Thanks for reading . .. . Answer : I dont have a code sample but i can give you a guideline .. . .. . 1 . Load PNG using Image.FromFile . .NET supports loading PNG .. . 2 . Open a file handle to your targa . Create an XmlDocument . .NET doesnt support targa so you have to manually write it . 3 . Lock the bitmap to get at the pixels . GetPixel is very slow . I think the method is named LockBits . You get a pointer to the surface to read the pixels .. . 4 . Write to targa . Targa is a container format so any bitmap should fit . 5 . Save the UV as Xml . Targa format http : local.wasp.uwa.edu.au pbourke dataformats tga .. . .. . Do you want to use a palette Since your making a game i would recommend you compute a palette for your bitmaps and put that into the targa to reduce the file size . Oh before i forget .NET doesnt use RGBA instead the pixels are BGRA . Dont ask me why but its like that .", "Question : I am looking for a small and free TGA image loading class or library for java . Ideally the result is a BufferedImage . Yes I have already googled but most results are outdated or are quite big libraries that contain a lot of other stuff i dont need . I am looking for something small and simple that reads just TGA images . Thanks .. . Answer : I had uncompressed targa images so had to tweak example code . Here is my edit it should support uncompressed targa 24bit BGR and 32bit BGRA Comment : Hi Whome Are you still here thanks for your answer it almost perfectly solved my problem but there is still a small blemish that is never correct tga file s direction . Comment : Im here your problem is an orientation is wrong flipped mirrored On screen or saved to png file Example tga files avail Comment : Hi Whome here is my problem and somebody has offered me the answer...Thanks . stackoverflow.com questions 29845136 http : stackoverflow.com questions 29845136 how-to-get-the-direction-of-tga-file-in-java", "Question : I wrote a TGA loader to load TGA files . It loads and saves 32-bit TGA files just fine but when it comes to loading and saving 24-bit it messed up . Example TGA 24-bit file from Photoshop : .. . .. . enter image description here http : i.stack.imgur.com W1gxo.png .. . .. . My output : .. . .. . enter image description here http : i.stack.imgur.com wZAso.png .. . .. . Any idea what is wrong with it I did the padding the same way as my bitmap loader and it works but the TGA doesn t. . : S The code below can compile and load TGA s just in case anyone is wanting to test it . Comment : What are the exact dimensions of your test image Comment : 117 x 91 px in size . .. . Answer : Your code has for sure at least a couple of problems : .. . .. . this is not the correct way to read a two-bytes value.. . 0xFF is 255 and not 256 : the correct way is .. . .. . Your code has also a different problem in the same area when writing : .. . .. . the code is wrong note that for example you only consider the low 8 bits of width . A correct version would be instead Comment : Hmm I tried this . It for some reason still does the same thing . Comment : Thank you sir . I fixed what you said and it fixed it for larger images . I had to remove the padding to fix it for all images .", "Question : As the title suggests I ve been having problems loading .tga files . I ve been using this http : thatotherdev.com 2010 11 07 loading-tga-files-in-c-for-use-with-opengl for reference and as far as I can tell Apart from using c++ functions instead of c ones I m doing the same thing . I do get a texture but it s a garbled version of what it should be and I m not really sure why . Please excuse all the mistakes I m just trying to get it working . Header : .. . .. . Cpp : Comment : Not an answer. . but. . ensure padding and read all at once And don t forget endianess if you ever want it to be portable. . Comment : What is bpp after reading the file header Vlad : I believe TGA doesn t pad like BMP . Comment : bpp is supposed to be bits per pixel or pixel depth . It s 24 for RGB images . I tried checking the adding alignment of the various bits but they seem to be fine . I m unsure of how to parse the data after reading it as one big chunk . Comment : @Sullivan : my question was what is the value of bpp after you read it from the file . Comment : It has the ascii value of 24 which seems to be an instruction in ascii . .. . Answer : When you read in the data you assume the targa file has 24 bits per pixel file.read char data imageSize 3 without checking the value of bpp . You then pass the image data to OpenGL and say your data is in 32-bpp BGRA format . You should check what the value of bpp is allocate and read the data based on that value and also pass the correct data format to OpenGL BGR or BGRA depending on whether the alpha channel is included in the image or not . Comment : Thank you so much I can t belive I was trying to use an RGB image when opengl was expecting an RGBA image . Thank you to everyone for their help and advice .", "Question : Loading a .obj model with a .mtl material using a Targa image as texture the image is loaded mirrored . It can be noticed in the following image http : i.stack.imgur.com KVqxh.png where the left one is .tga and the right one is .png . Opening both images in an image editor they show to be the same . And as long the .png image is loaded correctly the problem is in the loader I m using for .tga . I m using the TGALoader http : threejs.org docs Reference Loaders TGALoader class to load the texture . The problem seems to be related to the following code from function getTgaRGBA from TGALoader.js : .. . .. . If the result from switch was 0x02 the image would be loaded corrected without being mirrored . I ve tested with different .tga images and all of them resulted the same mirroring . I don t understand well what does the parameter of switch means.. . Could you guys help me to figure it out and how could I solve my problem .. . Answer : Your texture is flipped . Use this pattern : .. . .. . three.js r.74 Comment : Yeah but how come the .png version is loaded correctly and .tga isn t I think it s some issue within the TGALoader . Is there a way that I can check automatically wether the image is flipped or not So that I always correct it before I use Comment : Because the .tga file is treated as a THREE.DataTexture which does not flip Y by default . Study the source code or step through it with a debugger . Comment : A bug as been fixed in TGALoader in r.76dev . Setting flipY should no longer be necessary .", "Question : I am looking for a small and free TGA image loading class or library for java . Ideally the result is a BufferedImage . Yes I have already googled but most results are outdated or are quite big libraries that contain a lot of other stuff i dont need . I am looking for something small and simple that reads just TGA images . Thanks .. . Answer : We use this class copied from some open-source project to read TGA files . It s really old . It can only handle Targa files with most basic encoding . Give it a try . Comment : thanks a lot a first try gives me an arrayoutofboundsexception in this line : for int i 0 i nb i++ pixels idx++ v Comment : @clamp change nb to nb", "Question : I wrote a TGA loader to load TGA files . It loads and saves 32-bit TGA files just fine but when it comes to loading and saving 24-bit it messed up . Example TGA 24-bit file from Photoshop : .. . .. . enter image description here http : i.stack.imgur.com W1gxo.png .. . .. . My output : .. . .. . enter image description here http : i.stack.imgur.com wZAso.png .. . .. . Any idea what is wrong with it I did the padding the same way as my bitmap loader and it works but the TGA doesn t. . : S The code below can compile and load TGA s just in case anyone is wanting to test it . Comment : What are the exact dimensions of your test image Comment : 117 x 91 px in size . .. . Answer : I think the problem you have is that you re assuming a TGA file is padded and it isn t . So your buffers are the wrong size and you index them wrongly . That you do so symmetrically for input and output means that it almost works but the padding byte ends up in the image which as it s out by one byte per line results in a diagonal stripe up the image alternating through the colour channels . You reads will be returning less bytes than you expected but you re not checking . Though 6502 http : stackoverflow.com users 320726 6502 is completely correct about you handling 2-byte fields incorrectly - however this particular image is less than 255 pixels wide high so doesn t suffer . Comment : Ahh that padding Grr. . I removed it and it worked . I couldn t find anything on detecting padding in TGA files . It doesn t seem to have the 4-byte boundary stuff that Bitmaps have . Which is what I assumed when writing it . I fixed what he mentioned as well . It fixed the problem for larger images like you said . Thank you guys", "Question : I don t understand when we writing a tga header why are we doing something like that to put the dimensions of the picture : .. . .. . Thanks in advance Comment : It s not clear what you re asking here . Comment : You can view my struggles here doing it : stackoverflow.com questions 14095604 load-24-bit-tga http : stackoverflow.com questions 14095604 load-24-bit-tga and then you can view how to actually do it here : stackoverflow.com questions 20595340 http : stackoverflow.com questions 20595340 loading-a-tga-bmp-file-in-c-opengl .. . Answer : TGA width and height is written as two bytes I assume that header is of type : .. . .. . then to properly write width which I suppose of type int you have to put at index 12 low byte least significant byte value of width and at index 13 hi byte most significant byte part of width . so if width is 1023 then in binary it is : 1111111111 so at header 12 you need to put 1023 255 which is 11111111 in binary and in header 13 you put 11 : .. . .. . you could actually rewrite above as : .. . .. . The fact that you dont write directly integer to you header is because tga file can be read on systems with different byte ordering in its specification you can read : .. . .. . 3 Byte Ordering TGA files are stored using the Intel byte ordering convention least significant byte first most significant byte last . For this reason applications running on Motorola-based systems will need to invert the ordering of bytes for short and long values after a file has been read .. . .. . so this way of writing width makes your code platform independent . Comment : +1 Good answer . Small nit : so this way of writing width makes this format platform independent . It makes the code platform independent the format already is .", "Question : I have read Wiki http : en.wikipedia.org wiki Truevision TGA and I know that the 5-4 bits of the Eighteenth byte of tga file represent the direction of tga file . So there is 4 permutations 00 01 10 11 to show us the direction which direction does each permutation stand for .. . Answer : From the PDF Truevision TGA FILE FORMAT SPECIFICATION Version 2.0 https : en.wikipedia.org wiki Truevision TGA cite note-3 linked on the Wikipedia page . Bits 5 4 : These bits are used to indicate the order in which pixel data is transferred from the file to the screen . Bit 4 is for left-to-right ordering and bit 5 is for top-to-bottom ordering as shown below . Comment : Thanks for your explation it s solved my problem perferctly . Give you an up vote", "Question : I dont know whether it is possible to view tga image files on asp.net Tga image files are not known image files for webpages I think . But there might be a control to view tag image files for asp.net Thanks in advance . Comment : Do you want ASP.NET to process the TGA images or do you want ASP.NET to deliver TGA images to a browser to view Comment : yes I want to view TGA images on asp.net . Comment : ASP.NET is a server-side only technology . You can t view an image on it . You can either deliver an image for viewing in a browser or read it process it then deliver it to the browser . There s a difference between those two . Which are you after .. . Answer : As you already know browsers do not support TGA images . One alternative might be plugins such as flash silverlight .. . which I believe do support TGA images . If plugins are not an option you will need to convert the TGA image to a format browsers can handle e.g . jpg . You could use an HttpHandler for this . This article http : www.jigar.net articles viewhtmlcontent3.aspx shows the use of httphandlers to generate thumbnails on the fly . You can use this same approach and use a library such as ImageMagick http : www.imagemagick.org script index.php to do the conversion and return the image in jpg format on the fly . Here you find a codeproject article http : www.codeproject.com KB dotnet ImageMagick in VBNET.aspx explaining how to use ImageMagick within an asp.net website .", "Question : I am trying to create a mass image converter for common image types . I was able to find a TGA reader http : www.codeproject.com Articles 31702 NET-Targa-Image-Reader and I can convert TGA to image types supported by .NET library . However there is no converter of something to TGA in .NET except the external dll files with .NET wrappers . I don t have any experience with GDI+ objects which are apperantly the key for conversion . So is there any example or idea that can get me started Or is there a very simple way that I am missing .. . Answer : http : www.imagemagick.org - ImageMagick is a very useful cross-platform tool for converting from one image type to another . You can use the included command-line utilities to do batch conversions . It supports TGA among many other formats . Comment : imagemagick beats code.google.com p devil-net https : code.google.com p devil-net by a long shot", "Question : I have run into an issue while trying to write a .tga file reader . For 32-bit targas photoshop fills the alpha channel with 255 which is still standard and works but in 16-bit targas photoshop fills the alpha bit with zeros . Is there any way I can tell that a Targa has come from Photoshop so I can fill the alpha bit with 1s Comment : What if you check whether the alpha channel contains a 0 bit and if it does then set it to 1 Comment : because that could break if someone loaded a 16bit image that was actually using the alpha channel Comment : Well he would rarely use the alpha channel to set all pixels to zero alpha would he Comment : I was hoping there was an approach that was 100 reliable Comment : There IS the case of the 1x1 transparent image but other than that this would work . .. . Answer : The version 2.0 specification http : www.dca.fee.unicamp.br martino disciplinas ea978 tgaffs.pdf of the Targa file-format contains a so called Extension area which has a Software ID field . This field holds the name of the application that created the file . Maybe you could check whether Photoshop produces version 2.0 Targa files and if it does what Software ID does it write to this specific field then in your application check for this ID . As Targa 1.0 file-format does not have such a field I m not sure whether detecting Photoshop is possible at all . Comment : thanks but there is no information stored after the image data shouldn t photoshop be saving these images with a bit depth of 15 if they don t plan on using the alpha", "Question : Since a few days im working on a tool where i need to draw textures on several file-format with directX 11 . After googling a lot i didnt found how to do . I m using D3DX11CreateShaderResourceViewFromFile for load .dds and .png files but i read somewhere else that .tga isn t supported anymore . I read something too about D3DLOCKED RECT to set each pixels of the texture and read .tga files to know these pixels but that was for directX 9 . Any help or tips Thanks in advance . Comment : TGA is inferior in nearly every aspect compared to PNG . Can you simply convert your files Comment : No unfortunately i must keep theses differents file-format . Because my tool create a .txt file that will be used this another program so the users will have to convert again not really practical . Comment : @BartekBanachewicz : Nope . PNG takes much longer to decompress . .. . Answer : note : I don t use D3D11 .. . .. . MSDN page for D3DX11CreateShaderResourceViewFromFile http : msdn.microsoft.com en-us library windows desktop ff476283 28v vs.85 29.aspx says there is DirectXTex http : directxtex.codeplex.com library that should be able to load .tga files using LoadFromTGAFile http : directxtex.codeplex.com wikipage title TGA 20I O 20Functions referringTitle DirectXTex routine . You should give it a try . If it doesn t work for you you ll have to write your own texture loader . because it was possible to make your loader for textures in D3D9 it should be possible to do the same thing in D3D11 . .tga format is documented somewhere https : en.wikipedia.org wiki Truevision TGA and many beginner tutorials specifically deal with loading this particular format without 3rd party libraries . Two advices : .. . .. . 1 . Next time when in doubt read documentation . 2 . DON T look at .png format . This format loads very slowly jpeg is faster uncompressed bmp is faster dds is faster and most likely isn t suitable for games that need to load many images often it is okay to use it for start menu ending screen etc . Either use uncompressed format such as .tga or since you re using directx use .dds format . Your images most likely will take extra disk space but will load more quickly . Comment : I was more interested by setting the texture pixel by pixel and read the file-format for know these pixel than use another library and i found how to do . Btw thanks for help . If someone is interested by this follow this link gamedev.net topic 583161-d3d11-creating-a-dynamic-texture http : www.gamedev.net topic 583161-d3d11-creating-a-dynamic-texture Comment : @Aulaulz : You don t ever set textures pixel by pixel . You LOCK it then dump entire pixel array into memory at once and then unlock it . In DX9 generating mipmaps for the texture could also be your responsibility . Comment : I would have to if i had to use D3D9 but i use D3D11 and there is no Lock and Unlock function . Anyway what i ve done to resolve my problem is setting pixel at the texture creation with the D3D11 SUBRESOURCE DATA parameter in function ID3D11Device : : Create2DTexture .", "Question : I have been trying to make this program to convert a tga image for color into black and white . But i have no clue how to go about it . I am verry new to C and have yet to get the hang of the syntax and even proper usage of ubuntu . I think my problem is somthing with tha tga files header cant be read . Because the result i get when trying this program on a tga file is an unopenable picture with no height . height 0 . Is there some good links for one to read up on C Comment : Your use of read mode w fgets and fscanf suggests you think the TGA specifications are for text-files while in fact they are in a binary format . Not every image is stored the same way -- it seems you are assuming TGA PPM . Either start experimenting with text-only image-formats such as PPM or look up how to read binary-data and the TGA Specifications . Comment : I should maby read moar up on things before asking . Comment : That never hurts . Try a one-step-at-a-time approach -- your problem description seems that you were already writing out the converted TGA file while the problem clearly originated with your input . Sprinkle lots of printf s into your load image function to continuously check if you get the numbers you expected . .. . Answer : Personal note : A longer answer after reading Why Stackoverflow sucks http : sergworks.wordpress.com 2012 09 26 why-stackoverflow-sucks . That should be Required Reading for everyone who gets Moderator privileges . The problem is your load image code seems designed to read PPM ASCII-based images : .. . .. . Each PPM image consists of the following : 1 . A magic number for identifying the file-type . A ppm image s magic number is the two characters P6 . 2 . Whitespace blanks TABs CRs LFs . 3 . A width formatted as ASCII characters in decimal . 4 . Whitespace . 5 . A height again in ASCII decimal . 6 . Whitespace . 7 . The maximum color value Maxval again in ASCII decimal . Must be less than 65536 and more than zero . 8 . A single whitespace character usually a newline . 9 . A raster of Height rows .. . .. . .. . -- your first fgets reads then discards the magic number line followed by reading the width and height and then discarding the maxval line . It ought to work for PPM images and you could rename this routine load ppm image were it not for a single important issue : after all that ASCII stuff you switch to fread and so here is Warning 1 . Before opening your file decide whether you are going to read exclusively ASCII text or might need to read binary-data . .. . .. . The problem is that text mode w converts certain characters when reading and writing into others . That s built-in behavior in all common C libraries it attempts to fix the end-of-line characters mess that a previous generation of programmers left us with . Now reading text-files in text mode got a bit simpler but reading binary-data is impossible . You can t be sure you got exactly what was in the file . Let s get on with Warning 2 : not all file formats are the same . .. . .. . The above routine works mostly for PPM images but it will fail on TGA because its header is organized differently . The TGA header is described rather well here http : www.paulbourke.net dataformats tga a random pick of Google results . The specification describes bytes so first thing to do is change your fopen line to .. . .. . and by the way a good practice is to test if it was successful : .. . .. . Then you can use fgetc or fread to read one or more bytes . Here comes Warning 3 : use fread with care . fread reads multiple bytes in the order in which they are stored into the file and so you would think it may read an item such as width and height -- each a 2-byte integer value -- in one read operation . But fread does not know the order of the bytes in your system nor in the file itself and so it could be it reads lo-hi as in the specification I pointed to while in your computer the order of bytes in an integer is hi-lo . To clarify : if the file contains this .. . .. . and you read then store this with fread width 1 2 fp these 2 bytes get stored into computer memory in that same order . The bytes are in Big-Endian order the large byte is at the end . But if your computer happens to be a Little-Endian order system you would not get the value 0x0080 128 but 0x8000 32768 instead The way to circumvent this is to read one byte at a time : .. . .. . will always read the data in the correct order : low first then high . Only the sum gets stored in the order for your system but that s now irrelevant . With the above I think I m out of warnings . Using the TGA specifications as a guide you can now open the file read the header one byte at a time until you have all information that s needed and continue to fread your raw image data into memory . You can safely use fread to read your image bytes three at a time because they will appear in the same order into memory as they were read they are not integers or larger so the memory order is not an issue . A good approach to ensure you are reading the correct information is this : .. . .. . 1 . Read one byte at a time to prevent endianness issues . 2 . Add a comment in your code detailing what it is .. . 3 . Print out the value .. . 4 . Check with the specifications if the value is allowed . To get you started after the fopen line and the required check if it worked : .. . .. . . . and so on . When the entire header has been read and you didn t encounter surprises you are ready to set up things to read the actual image data . No changes needed there your existing code should work just fine . .. . .. . Post-edit : I see I used .. . .. . where the color map type is in fact a byte not an integer . That is to allow a belt-and-suspenders approach . If you encounter the end of the file while you are reading the header the code that fgetc returns is EOF . EOF cannot be stored into a char because it is an integer value : 0xFFFFFFFF more accurately : int -1 . If you store it into a char you cannot distinguish it from the perfectly okay value 0x000000FF the value 255 . The belt-and-suspender approach is to check each and every single byte : .. . .. . Overkill if you are working with a known file and you know it s a valid TGA you can view and edit it with bitmap editors but if you ever plan to work on files of which you don t know if they are valid you might need this .", "Question : I have a TGA file and a library that allready has everything that I need to read TGA and use them . This class has a method called pixels that returns a pointer that is pointed to the memory area where pixel are stored as RGBRGBRGB.. . .. . .. . My question is how can I take the pixel value Cause if I make something like this : .. . .. . It gives back to me what is proprably the address . I ve found this code on this site : .. . .. . I think that It can work great for me but how can I tell the program to read from my img Comment : What library are you using to read your TGA file Comment : one probably made from my university called tga io Comment : What s a 3d ouse .. . Answer : Tga supports different pixel depths . And we don t know what library you re using . But generally speaking pixels should return a pointer to a buffer containing pixels . Say for sake of argument it unpacks the pixels into 8-bit per channel subpixels then each pixel is represented by 3 bytes . So to access a pixel at a given offset in the buffer : .. . .. . If you know the width of the image buffer then you can get a pixel by its x and y coordinates : Comment : yes I have the buffer made of 24 bit for each pixel and the image is 50 50 . Comment : if you want the value of a pixel at x y then your addressing must be something like this : int p y Width +x NumChannels byte r Buffer p+0 byte g Buffer p+1 byte b Buffer p+2 Note : int Channels BitDepth 8", "Question : I exported an image with gimp into a tga image while implementing a parser for tga-textures using rle . A snipped from a hex editor formatted for better understanding : .. . .. . According to the specs packet 1 repeats the color 06 06 0B FF some kind of black 3 times because the bits 0-6 of 0x83 equal 3 and bit 7 is the flag for a rle packet . Same with packet 3 3 times the color 05 05 0 FF . But what does packet 2 mean because of the missing flag in bit 7 it should be raw packet but it hasn t any length What is the use of a zero size raw packet inside a tga file Thanks in advance .. . Answer : After several hours i finally found the solution the size given inside the packet is -1 so if it says that the size is zero it means the total size of the packet is 1 . Lil bit tricky but reasonable .", "Question : null .. . Answer : I am trying to edit a TGA 32-bit . The goal is that I open the file add some text and save it again as TGA 32-bit . I managed to open a TGA file using some scripts but it seems that I need imagick to save it also as a TGA . but with imagick i can t open a TGA . Does someone has an example of saving a tga file 32-bit For opening I could also work from a .jpg file .. . .. . Thanks .. . .. . Wouter Comment : I doubt you will find an example in php . TGA was never accepted against file formats like tiff and the like and is more or less dead these days . Comment : There is indeed no much information about this topic . Problem is that I would have a background-generator for a game . And the files are tga . In fact a jpg to tga conversion could do the trick too. . But the 32-bit seems to be a problem", "Question : The TGA image specification contains these two fields : .. . .. . This seems strange to me . Why is the position of an image on the screen contained in the data for the image itself I would expect that images don t care about where they are positioned since that s the responsibility of the rendering engine . Could it have to do with the fact that TGA images were designed for special video cards Here s a link-to the TGA spec for reference : http : www.dca.fee.unicamp.br martino disciplinas ea978 tgaffs.pdf .. . Answer : After some conversation we ve deduced that these fields were used to decompose large images into many smaller images . For example the 3Dfx video cards were most efficient at drawing full-screen images if you split the image into 256x256 blocks . The offset of those blocks on the screen could be represented using this field which would allow the renderer to reconstruct the original image . See this Twitter thread : https : twitter.com Donzanoid status 496248178799550464", "Question : i d like to get some help on my issue with .tga file-format parsing . i have the code which i use for a long time : .. . .. . but it keeps failing occasionally for some image resolutions mostly odd numbers and non-POT resolutions . it results in distorted image with diagonal patterns or wrong colors . last time i ve encountered it - it was 9x9 24bpp image showing weird colors . i m on windows so it means little-endian rendering with opengl i m taking in account alpha channel existence when passing image data with glTexImage2D . i m saving my images with photoshop not setting RLE flag . this code always reads correct image-resolution and color depth . example of image causing trouble : http : pastie.org private p81wbh5sb6coldspln6mw .. . .. . after loading problematic image this code : .. . .. . outputs this : .. . .. . so i guess it does read correct data . that brings us to opengl .. . .. . texture compression code is omitted cause it s not active for that texture . .. . Answer : most image format save image data aligned 4 bytes commonly . for example resolution : 1rows 1columns each row has one pixel so if RGB is used each row has 3bytes . and will be extend to 4bytes for alignment because the CPU like that . english is not my native language so my bad grammar will kill you . just try to understand it . Comment : according to wikipedia and other question about tga here tga does not use padding" ] }
[ "yes-answer-long", "yes-answer-short" ]
file-format
UNK_RELATION
autocad-plugin@.net@57
autocad-plugin -- external libraries autolisp objectarx @placeholder that can be integrated into autocad for customization .
{ "confidence": [ 56.732479095458984, 53.384361267089844, 49.4934196472168, 48.841148376464844, 47.58576965332031, 47.00373077392578, 46.65728759765625, 46.20572280883789, 46.19520950317383, 44.662147521972656, 44.38502883911133, 43.71742248535156, 43.200889587402344, 43.200889587402344, 43.200889587402344, 43.200889587402344, 42.763038635253906, 42.72145080566406, 42.72145080566406, 41.9131965637207, 41.792747497558594, 41.667823791503906, 41.667823791503906, 41.11601257324219, 41.014549255371094, 40.13270568847656, 40.13270568847656, 39.83041000366211, 39.83041000366211, 39.697479248046875, 39.604087829589844, 39.604087829589844, 39.604087829589844, 39.604087829589844, 39.604087829589844, 39.604087829589844, 39.604087829589844, 39.301116943359375, 39.218650817871094, 39.218650817871094, 39.12232971191406, 38.97606658935547, 38.56407928466797, 38.56407928466797, 38.34112548828125, 38.30522155761719, 38.30522155761719, 38.2952880859375, 38.2952880859375, 38.07102584838867, 38.07102584838867, 37.872459411621094, 37.38123321533203, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.81142807006836, 36.77215576171875, 36.77215576171875, 36.339393615722656, 36.339393615722656, 36.23360824584961, 36.23360824584961, 35.93063735961914, 35.360626220703125, 35.296356201171875, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.27836608886719, 35.225860595703125, 35.1065673828125, 35.1065673828125, 35.1065673828125, 34.93474197387695, 34.93474197387695, 34.8302116394043, 34.781105041503906, 34.781105041503906, 34.50197982788086, 34.184486389160156, 33.8011474609375, 33.8011474609375, 33.8011474609375, 33.8011474609375 ], "content": [ "I don t believe ZWCAD will have the same APIs as AutoCAD not you tagged your question as autocad-plugin and objectarx both applies only to AutoCAD not ZWCAD", "Why have you tagged autocad and objectarx", "Can I use this ObjectARX SDK to develop tool for AutoCAD 2012", "For Example : .. . .. . ADS C .. . .. . ObjectARX C++ .. . .. . AutoCAD .Net C", "There is a .Net Autocad plugin in which a WCF service is used to call a method on another process external to Autocad .", "ObjectARX SDK is available for AutoCAD 2014 and later versions only .", "If you need to call AutoCAD from an external application you can use COM Automation or AutoCAD Console .", "Load LISP or any other customization on AutoCAD is quite easy with Autoloader approach .", "I have created a basic plugin for AutoCAD .", "That s the easiest way to NETLOAD your plugin into AUtoCAD .", "We are planning to upgrade from AutoCAD 2012 to AutoCAD 2016 .", "Version of AutoCAD", "This will work on AutoCAD 2012 and newer .", "AutoCAD 2016 is not supported .", "AutoCAD Lisp is executed asynchronously .", "I m working on an AutoCAD plug-in .", "If you need to automate from external apps check the AutoCAD Console available on AutoCAD 2013+ .. . 2 .", "ObjectARX which is the C++ version of the AutoCAD API still use resbuf for XData but not anymore for Entity property access .", "From the AutoCAD ObjectARX help file : .. . .. . PolygonMesh.MSize .. . .. . Accesses the vertex count in the M direction .", "In my AutoCAD LISP plugin I run external application by startapp then need to do some action after external application will be closed .", "Also you should not use AutoCAD references on external applications i.e .", "This application is an extension for AutoCAD .", "Autocad 2014 @Maxence", "I m developing an AutoCAD Plugin and I can t capture unhandled exceptions .", "See also the tag wiki for AutoCAD http : stackoverflow.com tags autocad info", "Is this 64-bit AutoCAD or 32-bit", "At first run AutoCAD configures itself .", "What version bitness of AutoCAD is this", "Welcome to AutoCAD development", "An AutoCAD Toolpalette can be created as described in this blog post http : through-the-interface.typepad.com through the interface 2009 10 adding-items-to-an-autocad-tool-palette-using-net.html with code or this blog post http : adndevblog.typepad.com autocad 2013 06 working-with-toolpalette-groups-using-net.html with downloaded sample .", "Yes ZWCAD API is not exactly the same as AutoCAD .", "Drag axBlock.lsp over your AutoCAD window .", "To use AutoCAD user has to close form first .", "The more recent version is for AutoCAD 2014 OrderByLayer19.dll", "I have the following 2D polylines in autocad .", "I have one problem related to the Autocad and MS.Excel .", "I am developing a VBA macro to use in AutoCAD .", "Do You know answer how can I handle this problem on AutoCAD", "I m very new to Autocad programming few months new but I managed to write an application with about 10 Autocad commands .", "resbuf in C++ AutoCAD API is a linked-list which handles all AutoCAD basic data types .", "I am a new developer in Autocad API using C .", "In ObjectARX C++ and the AutoCAD .Net API C VB.Net you access entity property using specific methods and accessors respectively see examples at the bottom .", "You can try to hide Editor.StartUserInteraction it and use a synchronous way to send a command to AutoCAD like P Invoke of acedCmd but I ve tried it and it crashes AutoCAD .", "That said starting on AutoCAD 2012 you can use Autoloader mechanism http : adndevblog.typepad.com autocad 2013 01 autodesk-autoloader-white-paper.html .", "I ve also implemented an autocad connector say Project3.dll which is loaded via netload inside autocad this connector uses the form of Project1.dll and that form has to be extended also in autocad .", "I downloaded DotSoft s DoByLayer tool for AutoCAD and ran the NETLOAD command as instructed on my AutoCAD 2016 product but for some reason there is no ORDERBYLAYER command like there should be .", "AutoCAD 2016 supports Microsoft Visual Studio 2012 and 2013 .. . .. . AutoCAD 2015 supports Microsoft Visual Studio 2012 .. . .. . .. . .. . .. . Why is it like that", "It would have an interface similar to AutoCAD .", "I am new to AutoCAD programming .", "Typically calling an AutoCAD command is a bad idea .", "If you leave it TRUE AutoCAD will behave unexpectedly .", "I m writing a plugin for AutoCAD and want to import all the blocks it will use at the beginning to make sure that they are available when needed .", "AutoCAD OEM should be a better choice if you need an UI similar to AutoCAD but there is no support for IFC .", "As ZWCAD don t have all functionality of AutoCAD but it is very simmilar at least at this point .", "I m trying to write a method that will properly draw a block in AutoCAD .", "I m trying to draw a series of polyhedrons in AutoCAD that represent a wall .", "I ve got a question about will this method work with autocad 2009", "For now I have to make n versions for every autocad : .. . .. . and so on .", "My end user require to access autocad while windows form is open .", "Currently AutoCAD is being un-accessible if c windows form is open .", "Is there a way to make both the autocad and windows form accessible simultaneously", "NETLOAD the proper version I tried OrderByLayer19.dll for AutoCAD 2016 .", "I m writing an AutoCAD tool that publishes drawings from a dsd file .", "The following three functions are from a course by AutoCAD written by Jerry Winters .", "This is my c code to identify the block containing attribute in autocad .", "Or is that some weird bug from the form being in an Autocad Plug-in", "If you create any temporary AutoCAD objects that do not get added to the database you must explicity call .Dispose on them or AutoCAD may crash", "Could some experienced Autocad .NET developer provide a best practice or at least an ok or not wrong practice for managing Autocad commands in a rather large project", "I have been tasked with translating an AutoCAD plugin from VBA to VB.NET and I m currently a bit stuck .", "Check more about AutoCAD plugin development at the Developer Center http : www.autodesk.com developautocad .", "I am using Autocad 2012 with the API provided .", "This is AutoCAD 2015 on a 32-bit Windows 7 machine", "should i make a custom button to stretch it or it can be done via autocad", "After searching on internet I learned that I have to reference dll files from autocad", "I have recently installed AutoCad 2016 which now has the Editor.Command and Editor.CommandAsync functions however all the help forum posts that I can find refer to using it to call AutoCad commands such as LINE CIRCLE etc .", "I d like to enumerate all entities in an Autocad Drawing but not using Autocad.Interop reference .", "Or is it somehow availible to be called as a normal method not as a text-command sent to be processed by AutoCAD", "AutoCAD looks for an application s command methods on the type that bears this attribute .", "From the docs : .. . .. . AutoCAD itself never creates a constant AttributeReference object .", "First resbuf was the ADS version of the AutoCAD API which was a C API .", "I ve been playing around with AutoCAD API s PolygonMesh class .", "I m trying to draw a wall in AutoCAD which is comprised of a series of rectangles .", "If not has AutoCad been run opened at least once for the user", "Does AutoCAD picks the configuration from first run only", "At first the program discovers the available versions of AutoCAD and shows it to the User .", "So now I expand the scope of my question to include AutoCAD as the root of the problem is loading the dll in autocad .", "if AutoCAD solution will fail on ZWCAD we can treat it as ZWCAD API bug and then for sure I will remove tags .", "Since you can install AutoCAD in any folder on any drive you would have to scan all drives deeply .", "Thanks so with the help of DXF code we can describe any objects of Autocad .", "It may also be worth knowing I ve migrated from Visual Studio 2012 to Visual Studio 2013 and AutoCAD 2014 to AutoCAD 2015", "This failed when AutoCAD tried to call your command handler : .. . .. . AutoCAD is not going to give you that objectToRestore argument it doesn t know beans about your interface .", "Or do you have multiple auto cad libraries of different autocad versions in your references", "For completeness sake here is the Jig class i reference in the insert code .. . .. . One note regarding working in .NET ObjectARX there is a an issue with the single-threaded nature of AutoCAD and the fact that the .NET garbage collector runs on a separate thread .", "I ve looked in the ObjectARX SDK in AutoCAD Help on the Autodesk Developer Network in SO and the broader internet but I can t find documentation for the Autodesk.AutoCAD.Interop dll only documentation for the in-process .NET API .", "Should I start to develop a plugin for AutoCAD or should I develop a standalone software", "If you still need to register your plugin DLL library manually you can create a registry key for it https : knowledge.autodesk.com support autocad troubleshooting caas sfdcarticles sfdcarticles How-to-autoload-DLLs-with-AutoCAD.html but it s a bit tricky due many AutoCAD versions of verticals e.g .", "Try to see the link below it might help you 1 1 : stackoverflow.com questions 1338955 autocad-in-vb-net rq 1 http : stackoverflow.com questions 1338955 autocad-in-vb-net rq 1", "There are some examples of using it to start AutoCAD : .. . .. . http : through-the-interface.typepad.com through the interface 2007 12 launching-autoc.html .. . .. . How to close a file in Autocad using C keeping acad.exe running", "We have considered the possibility of presence of multiple version of AutoCAD and thus according to user choice we have to dynamically load required DLLs from that version of AutoCAD .", "There seems to be something for Autocad 360 : autocad360.desk.com customer en portal articles https : autocad360.desk.com customer en portal articles 1089127-embedding-autocad-360-into-your-website" ] }
{ "confidence": [ 68.16087341308594, 61.81386947631836, 59.09014129638672, 57.77277374267578, 57.699073791503906, 57.64934158325195, 57.422630310058594, 57.10503005981445, 56.83475875854492, 55.86736297607422, 54.689666748046875, 53.53002166748047, 53.130531311035156, 52.96649169921875, 52.63352966308594, 52.20489501953125, 51.38026428222656, 51.06944274902344, 50.62285614013672, 49.24742126464844 ], "content": [ "Question : I am new to AutoCAD programming . I need to build software to automate some task for AutoCAD 2012 . But I am confused with the following : - .. . .. . 1 . Should I start to develop a plugin for AutoCAD or should I develop a standalone software 2 . ObjectARX SDK is available for AutoCAD 2014 and later versions only . Can I use this ObjectARX SDK to develop tool for AutoCAD 2012 Thanks to all for your valuable suggestions and time . Comment : See also the tag wiki for AutoCAD http : stackoverflow.com tags autocad info .. . Answer : Welcome to AutoCAD development Indeed there is a getting started tutorial at http : www.autodesk.com myfirstautocadplugin and a blog with lots of samples for various scenarios as http : adndevblog.typepad.com autocad and a broader overview of the all the APIs available at http : www.autodesk.com developautocad .. . .. . About your questions : .. . .. . 1 . You can do a plugin or external app but notice that only plugins can use the pure .NET API the external apps can only use COM API which is not as good and quite old . If you need to automate from external apps check the AutoCAD Console available on AutoCAD 2013+ .. . 2 . The SDK is very similar but Autodesk made a major remodeling of the API on 2013 release therefore anything developed for 2012 will not work on 2013 you need to rebuild at least . If you have a code developed for 2013 it can work until 2016 but testing is recommended .", "Question : I have an application which is written in C++ and I have to migrate it to C . This application is an extension for AutoCAD . resbuf in C++ AutoCAD API is a linked-list which handles all AutoCAD basic data types . It looks like this .. . .. . So each resbuf contains specific data described by restype member . For example restype with code 410 is layer name . So on C it looks like this .. . .. . In that application resbuf structure is used as a way for working with AutoCAD objects and wherever I meet resbuf I change it on using object Line Polyline MText and so on directly . But now I found usage of resbuf with code 10 and I opened the documentation and found the following .. . .. . 10 : Primary point . This is the start point of a line or text entity center of a circle and so on . And I don t know the way of migrating it . Because for each object it s a different property . The only idea is something like this . But I don t like it . May be there is a better way of doing it . Do you have any idea .. . Answer : First resbuf was the ADS version of the AutoCAD API which was a C API . ObjectARX which is the C++ version of the AutoCAD API still use resbuf for XData but not anymore for Entity property access . In ObjectARX C++ and the AutoCAD .Net API C VB.Net you access entity property using specific methods and accessors respectively see examples at the bottom . Use the DXF table http : www.autodesk.com techpubs autocad acad2000 dxf group codes in numerical order dxf 01.htm to read code in a resbuf linked-list . Second code DXF 410 is just a string . Someone may use it and store a layer name if he wants but entity layer is referenced by DXF code 8 . Last DXF code 10 means the first meaningful point for the entity . This can either be the center of a circle or the 1st point of a line etc.. . This is why using the resbuf requires a lot more attention and understand how the underlying AutoCAD database structure is organized than using accessors . For Example : .. . .. . ADS C .. . .. . ObjectARX C++ .. . .. . AutoCAD .Net C", "Question : There is a .Net Autocad plugin in which a WCF service is used to call a method on another process external to Autocad . Autocad entities are wrapped in custom classes and passed through WCF . Once the call returns the plug-in needs to write the result back into Autocad database . Here is the problem : ObjectId is needed to fetch the object and write the result back WCF serialize the data and ObjectId is not serializable . So I don t have access to the object . Is there any workaround solution for this .. . Answer : For each of your entity you can get handle directly without mediator objectId . use Entity.Handle property . Further from autocad guide .. . .. . Each object contained with in the Database object is assigned several unique ids . The unique ways you can access objects are : Entity handle ObjectId Instance pointer The most common method is to access an object by its Object Id . Object Ids work well if your projects utilize both COM interop and the managed .NET API . If you create custom AutoLISP functions you may need to work with entity handles . Handles are persistent between AutoCAD sessions so they are the best way of accessing objects if you need to export drawing information to an external file which might later need to be used to update the drawing . The ObjectId of an object in a database exists only while the database is loaded into memory . Once the database is closed the Object Ids assigned to an object no longer exist and maybe different the next time the database is opened .", "Question : null .. . Answer : When we ask User to select distance by acedGetDist User can input value by keyboard like 4.0 or click pair or points . Everything is OK as long as User draws in scale 1 : 1 . but when User want to draw in other scale distance given by points will be the same but if User input value I need to recalculate it . How can I check how User input value First I tried to check system variable lastpoint but it is not updated when pick points in acedGetDist . I use ZWCAD maybe that s why it s not updated .. . .. . Any ideas how to check how User input value Comment : I don t believe ZWCAD will have the same APIs as AutoCAD not you tagged your question as autocad-plugin and objectarx both applies only to AutoCAD not ZWCAD Comment : Yes ZWCAD API is not exactly the same as AutoCAD . As ZWCAD don t have all functionality of AutoCAD but it is very simmilar at least at this point . Both AutoCAD API and ZWCAD API have acedGetDist and it should work the same way . Do You know answer how can I handle this problem on AutoCAD if AutoCAD solution will fail on ZWCAD we can treat it as ZWCAD API bug and then for sure I will remove tags . Comment : so I made a quick test with AutoCAD API : the acedGetDist method always return the true value not the scaled value regardless the input method pick point or numeric value and regardless the scale CANNOSCALE value Comment : And that is how I understand it should be . To know scale I don t use CANNOSCALE maybe I should but I don t In my application-settings I let User to input scale and save it into drawing XData of Dictionary . Application is for traffic organization default scale is 1 : 1000 so drawing in meters . But sometimes needs to draw in other scale like 1 : 500 In application I draw for example pedestrian crossing . So I ask for width by acedGetDist when User click points everythig is OK . but if write 4.0 User want 4 meters of pedestrian crossing even if scale is 1 : 500 Comment : oh ok so if you keep the scale on your xData then AutoCAD or ZWCAD will not know it.. . I would say that you can ask the user for unit to ensure is correct whenever your scale is not default or as expected by your app logic", "Question : In my AutoCAD LISP plugin I run external application by startapp then need to do some action after external application will be closed . How can I do it maybe I can substitute startapp by something else .. . Answer : AutoCAD Lisp is executed asynchronously .", "Question : I am working on a project where I have to figure out what version of AutoCAD is installed in the target computer . We have considered the possibility of presence of multiple version of AutoCAD and thus according to user choice we have to dynamically load required DLLs from that version of AutoCAD . At first the program discovers the available versions of AutoCAD and shows it to the User . Then after selection of a specific version the program copies DLLs like accoremgd.dll acdbmgd.dll acmgd.dll to the program directory . But when I try to load those dll dynamically it shows following error : .. . .. . Could not load file or assembly accoremgd.dll or one of its dependencies . The specified module could not be found . StackTrace : .. . .. . at System.Reflection.RuntimeAssembly . nLoad AssemblyName fileName String codeBase Evidence assemblySecurity RuntimeAssembly locationHint StackCrawlMark stackMark IntPtr pPrivHostBinder Boolean throwOnFileNotFound Boolean forIntrospection Boolean suppressSecurityChecks at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName AssemblyName assemblyRef Evidence assemblySecurity RuntimeAssembly reqAssembly StackCrawlMark stackMark IntPtr pPrivHostBinder Boolean throwOnFileNotFound Boolean forIntrospection Boolean suppressSecurityChecks at System.Reflection.RuntimeAssembly.InternalLoadFrom String assemblyFile Evidence securityEvidence Byte hashValue AssemblyHashAlgorithm hashAlgorithm Boolean forIntrospection Boolean suppressSecurityChecks StackCrawlMark stackMark at System.Reflection.Assembly.LoadFrom String assemblyFile at DynamicDLLAdd.Form1.btnLoad Click Object sender EventArgs e in e : AutoCadOperations Test.AutoCadLoad Re DynamicDLLAdd Form1.cs : line 140 .. . .. . My sub-routine which dynamically loads the file is : .. . .. . I think the problem might with the dll s dependencies . What should be done Is there any documents or articles available Update : The program s Target Framework is 4.0 and Platform target is Any CPU . I ran fuselogvw.exe and I think here might be some clue to my problem . I have no idea what is going on here so I have added a picture . It would be a great help if clarifies it . enter image description here http : i.stack.imgur.com 7S7uD.png Comment : Use the Fusion Log Viewer fuslogvw.exe to enable logging of binding errors or this http : stackoverflow.com a 16049933 21567 if you must . .. . Answer : You should not manually load AcMgd AcCoreMgd nor AcDbMgd on your DLL library there references are loaded on AutoCAD process acad.exe by default only from acad.exe folder and when you NETLOAD your DLL library i.e . your plugin it will link automatically . When compiling your DLL library set Copy Local FALSE on AutoCAD references . If you leave it TRUE AutoCAD will behave unexpectedly . Also you should not use AutoCAD references on external applications i.e . a .EXE project on Visual Studio . The references are in fact a thin layer to access the real implementation in C++ compiled as .ARX dynamic libraries and will only work in process with acad.exe . If you need to call AutoCAD from an external application you can use COM Automation or AutoCAD Console . See this reply http : stackoverflow.com a 38480420 4838205 . That said starting on AutoCAD 2012 you can use Autoloader mechanism http : adndevblog.typepad.com autocad 2013 01 autodesk-autoloader-white-paper.html . In summary you can define a PackageContents.xml file that will define which DLL library to load according to the AutoCAD version that your customer have . That s the easiest way to NETLOAD your plugin into AUtoCAD . If you still need to register your plugin DLL library manually you can create a registry key for it https : knowledge.autodesk.com support autocad troubleshooting caas sfdcarticles sfdcarticles How-to-autoload-DLLs-with-AutoCAD.html but it s a bit tricky due many AutoCAD versions of verticals e.g . Civil 3D Plant 3D Map 3D etc . . There is certain logic on the registry keys check more here http : adndevblog.typepad.com autocad 2013 08 registry-values-for-productid-and-localeid-for-autocad.html . Check more about AutoCAD plugin development at the Developer Center http : www.autodesk.com developautocad .", "Question : Does anyone know how to show quick select dialog by click on button on my new autocad form . I use SendStringToExecute method but it sends the command after closed the dialog .. . .. . the above code dose not work any one can help thanks to all Comment : Version of AutoCAD Comment : You d have to hide the form first as I m assuming it s modal . Comment : Autocad 2014 @Maxence .. . Answer : I think this is not possible . You cannot run a command while a modal-dialog box is displayed . You can try to hide Editor.StartUserInteraction it and use a synchronous way to send a command to AutoCAD like P Invoke of acedCmd but I ve tried it and it crashes AutoCAD . Typically calling an AutoCAD command is a bad idea . .NET is not AutoLISP . You can implement an interface similar to the QSELECT command and use it from your dialog box . Comment : Even if you found a way to do it I d be surprised if it was robust . In my experience that sort of thing leads to all sorts of mysterious crashes and weird unexplained errors .", "Question : Is it possible to change the Constant property of an AttributeReference the property IsConstant is readonly Comment : Why have you tagged autocad and objectarx Do you have a specific problem you re trying to solve by changing attribute values which isn t possible as it s part of the class s metadata If so then explain that problem as there may be another solution . .. . Answer : You need to change the AttributeDefinition in the block table record property Constant not the AttributeReference . This property is shared with all the AttributeReference . From the docs : .. . .. . AutoCAD itself never creates a constant AttributeReference object . AutoCAD creates the AttributeReference objects for each BlockReference based on the AttributeDefinition objects within the referenced BlockTableRecord . If a constant AttributeDefinition is encountered then AutoCAD uses the AttributeDefinition itself instead of creating a matching AttributeReference .", "Question : Autodesk mentions here http : usa.autodesk.com adsk servlet index id 1911627 siteID 123112 that AutoCAD plugins need to be developed with a particular Visual Studio version e.g . AutoCAD 2016 supports Microsoft Visual Studio 2012 and 2013 .. . .. . AutoCAD 2015 supports Microsoft Visual Studio 2012 .. . .. . .. . .. . .. . Why is it like that I understand that you need to use particular .NET Framework versions according to your AutoCAD versions . But why the IDE You can set your target framework version for each project . Is it because of compiler debuger issues We are planning to upgrade from AutoCAD 2012 to AutoCAD 2016 . So we need a new IDE for our plugins and would prefer the latest Visual Studio version 2015 .. . Answer : This strict VS version is for ObjectARX C++ only . For .NET you just need the proper framework version to develop or if you already have a DLL legacy compatibility should work . But there is an exception see below : .. . .. . 1 . AutoCAD 2007 - 2012 : compile your code with AcDbMgd and AcMgd and your code should work on all these versions except if you use a feature that is not available on the version you re executing .. . 2 . AutoCAD 2013 - 2017 : this new cycle also need reference to AcCoreMgd therefore you need a separate compiled DLL .. . .. . For C++ there is a additional requirement regarding Decorated Names https : msdn.microsoft.com en-us library 56h2zst2.aspx and VS compiles the code using this . Therefore you can adjust the Toolset but need the specific version installed to compile your code . I might say that if you re using ActiveX COM you have some different concerns : the references are different on 32 and 64 bit and between AutoCAD major versions so it s easier to use late-binding or compile different DLLs for each version platform .", "Question : There is a .Net Autocad plugin in which a WCF service is used to call a method on another process external to Autocad . Autocad entities are wrapped in custom classes and passed through WCF . Once the call returns the plug-in needs to write the result back into Autocad database . Here is the problem : ObjectId is needed to fetch the object and write the result back WCF serialize the data and ObjectId is not serializable . So I don t have access to the object . Is there any workaround solution for this .. . Answer : You have to serialize the value handle of the ObjectId since it is not serializable : .. . .. . Then when you deserialize your Class object you will be able to get the objectId by calling the method GetObjectId Database database long handleValue Comment : Thanks Zimer for the answer . I am aware of this workaround . But am concerned with GetObjectId performance on large numbers . What does this method actually do Does it create new ObjectId or look for it on the database Comment : @ali : Zimmer is right . In fact I can t see how this plugin is serializing entities otherwise . They too contain the ObjectId . Not to mention they are not marked serializable . They do however implement MarshalByRefObject which means they can be sent via remoting but not WCF not to my knowledge anyways . My guess is they are either using some remoting magic or they re using POCO representation of the entity properties . If the latter is the case then they are doing what Zimer is suggestion . Comment : @ali : Btw.. . Handle s are persisted IDs with the document . ObjectId s are transient IDs with the session . So it s actually retrieving the session s registered ObjectId for the object from the drawing s database for the session . The code will also has to account for the fact that the Handle is a hexadecimal value so use this.. . ObjectId oid currentDB.GetObjectId false new Handle Convert.ToInt64 handle 16 0 Comment : @ali : Based on the documentation of Autodesk ObjectARX this method returns the objectId of the object that has the handle value contained in objHandle so we can say that it will look for it on the database . Comment : @Zimer : Sorry about my second comment with the code example . For some reason I thought I saw that you were using a string . I overlooked the fact you were passing it as long .", "Question : I ve looked in the ObjectARX SDK in AutoCAD Help on the Autodesk Developer Network in SO and the broader internet but I can t find documentation for the Autodesk.AutoCAD.Interop dll only documentation for the in-process .NET API . For example there s plenty of info about the Application object : .. . .. . http : docs.autodesk.com ACD 2013 ENU index.html url files GUID-4E1AAFA9-740E-4097-800C-CAED09CDFF12.htm topicNumber d30e712496 .. . .. . ...but no similar information about the AcadApplication object exposed by Autodesk.AutoCAD.Interop . Where can I find detailed information about the interop API There are some examples of using it to start AutoCAD : .. . .. . http : through-the-interface.typepad.com through the interface 2007 12 launching-autoc.html .. . .. . How to close a file in Autocad using C keeping acad.exe running http : stackoverflow.com questions 17741728 how-to-close-a-file-in-autocad-using-c-sharp-keeping-acad-exe-running 17757356 17757356 .. . .. . ...etc . But I m looking for object graphs method descriptions etc . for the interop API i.e . the kind of information available for the in-process .NET API . .. . Answer : I asked this on the Autodesk forums and learned that the documentation for the interop dll s can be found by looking up the documentation for the old VBA interface .", "Question : We are planning to develop a 3D CAD GIS application . It would have an interface similar to AutoCAD . 1 . It would have following features .. . 2 . 3D CAD model space .. . 3 . CAD edit tools .. . 4 . GIS data-import and export tools .. . 5 . Support file exchange formats - DWG IFC SHP DXF PDF SQLITE etc .. . 6 . Pointcloud support .. . 7 . Handling large dataset .. . Answer : Adding to @Maxence reply http : stackoverflow.com a 38243482 4838205 AutoCAD OEM will allow you to fully customize the UI with your own but requires a special business agreement . Alternatively you can just create a regular AutoCAD plugin .NET C++ LISP VBA http : www.autodesk.com developautocad that perform customization on the UI and can include some commands this plugin app can then be published and sold through Autodesk App Store https : apps.autodesk.com . Finally AutoCAD is available as a webservice called Design Automation https : developer.autodesk.com in case you just want to batch-process files on the cloud . It can also be viewed on the browser see Viewer https : developer.autodesk.com .", "Question : I have created a basic plugin for AutoCAD . In my plugin some task is being done through c windows form . My end user require to access autocad while windows form is open . Currently AutoCAD is being un-accessible if c windows form is open . To use AutoCAD user has to close form first . Is there a way to make both the autocad and windows form accessible simultaneously .. . Answer : Yes you can use a modeless form : .. . .. . But it s not very intuitive I would suggest a PaletteSet that hosts a user control . I prefer the Modal way and inside a button where you need the user to select something on the drawing use a EditorUserInteraction object Comment : Thanks It works", "Question : I have been tasked with translating an AutoCAD plugin from VBA to VB.NET and I m currently a bit stuck . The command I m working on creates a new layer or select it as the active layer if it already exist then executes 2 -INSERT commands giving a point selected by the user and a dwg-file . Then the previous active layer is reset as the active layer . The insert-command looks something like this : .. . .. . Note : All the line-breaks in the command are added as vbCR not vbCrLf . My question is how can I achieve the same result in .NET against ObjectARX I can t use SendStringToExecute because it is async with no callback so in other words I can t reset the current layer once it s done executing . There has to be some way to replicate this functionality in pure .NET code probably using the BlockTable but I have no idea how . I ve tried following the article found here : http : through-the-interface.typepad.com through the interface 2006 08 import blocks f.html but that had no visible effect on the document at all . I also tried to use myDatabase.Insert transform otherDatabase False and the command-prompt said something about blocks already existing and thus beeing skipped yet I still saw no changes . I have no idea how much magic the -INSERT command actually does behind the scenes but would it be viable to replicate it in .NET Or is it somehow availible to be called as a normal method not as a text-command sent to be processed by AutoCAD .. . Answer : The code example in the Through the Interface post imports the blocks but does not insert them into the drawing . You have to create a BlockReference and add it to the model space . It also inserts all the blocks from the file not the file as a single block . Here is the code I use to import a file as a whole block . This function returns a block reference you can insert into your drawing . Here would be the example of using that function to insert a block into the file . In this example I use a jig which allows the user to drop the object onto a location they want otherwise you could just set the position . And here is also the CheckLayer function I called . Just as a note Kean s blog is a great resources I pretty much learned all of the above code from there . For completeness sake here is the Jig class i reference in the insert code .. . .. . One note regarding working in .NET ObjectARX there is a an issue with the single-threaded nature of AutoCAD and the fact that the .NET garbage collector runs on a separate thread . If you create any temporary AutoCAD objects that do not get added to the database you must explicity call .Dispose on them or AutoCAD may crash The crash will seem random too since it will be triggered by the garbage collector thread . See this post http : through-the-interface.typepad.com through the interface 2008 06 cleaning-up-aft.html . Comment : Thanks . I m checking this once I get to work tomorow . Also I use the Using-statement on almost anything so everything get s disposed guaranteed even with exceptions etc . . Comment : Do you know if there is any simple way to get autocad to pop-up with it s enter multiple attributes strings -window Like if I just use the -IMPORT command it will pop-up with a window telling me to enter Revision Number and Revision Name . Can I get the same behaviour some way in .NET Comment : Not sure about that but you can set attributes in code so you could always just show your own Modal dialog to get the info . Comment : Yeah . I m working on that . Problem is that I have to generate a dialog based on the attributes as there can be any number of them -.- . Insert handled that automagically for me .", "Question : In my AutoCAD LISP plugin I run external application by startapp then need to do some action after external application will be closed . How can I do it maybe I can substitute startapp by something else .. . Answer : There are at least two ways of synchronize it : .. . .. . or using Command :", "Question : I m trying to continue working on my plugins for AutoCAD in Visual Studio 2013 . I opened up my project files and all the references to Autodesk libraries were missing . To remedy this I added references to the following dll files from ObjectARX 2015 shown in the dlls image attached . I am using the following Autodesk namespaces : .. . .. . Adding the missing references makes the errors go away until I try to test my program at which point I get new errors underlining Autodesk references in gray instead of red as shown in the attached image . I have no idea why the added references are not working . It may also be worth knowing I ve migrated from Visual Studio 2012 to Visual Studio 2013 and AutoCAD 2014 to AutoCAD 2015 enter image description here http : i.stack.imgur.com Bcbdq.png .. . .. . enter image description here http : i.stack.imgur.com YNk55.png Comment : I m unsure why they have that gray line under them . Are yout setting your copy local setting to false for those references Or do you have multiple auto cad libraries of different autocad versions in your references BTW I don t see any reason you should have all of those references . You should only need runtime for what you have in your class . .. . Answer : You need to change your target .NET framework . If the Dll s that you are referencing are built for 4.0 you need to target 4.0 . If they are built for 4.5 you need to target 4.5 . Here are the steps to change the target framework if you don t know how . http : msdn.microsoft.com en-us library bb398202.aspx", "Question : what s the use of this folder I need to load a lisp in automatic way without using acad.lsp and acaddoc.lsp . Will I find there the answer I m asking that because i saw an add-on i have load something from there . Thanks guys Dennis .. . Answer : Load LISP or any other customization on AutoCAD is quite easy with Autoloader approach . Just create a PackageContents.xml place everything inside a .bundle folder and copy-paste at one of predefined locations c : program files autodesk application plugins . See a complete description at http : adndevblog.typepad.com autocad 2013 01 autodesk-autoloader-white-paper.html .. . .. . Here is a minimal PackageContents.xml sample : Comment : Thank you man I ll try after holiday : Comment : BTW you should not place your files under Autodesk Shared folder this for is for autodesk applications only Comment : I spent all the day trying to find the solution . Really thanks man After that my program will be ready for the distribution : Comment : I ve got a question about will this method work with autocad 2009 Thanks Comment : This will work on AutoCAD 2012 and newer . Sorry .", "Question : I am a new developer in Autocad API using C . How could I create Palette and put some blocks inside it . After searching on internet I learned that I have to reference dll files from autocad .. . Answer : An AutoCAD Toolpalette can be created as described in this blog post http : through-the-interface.typepad.com through the interface 2009 10 adding-items-to-an-autocad-tool-palette-using-net.html with code or this blog post http : adndevblog.typepad.com autocad 2013 06 working-with-toolpalette-groups-using-net.html with downloaded sample . Note each post shows a different approach . You may also consider a WinForm User control as a PaletteSet object .", "Question : I downloaded DotSoft s DoByLayer tool for AutoCAD and ran the NETLOAD command as instructed on my AutoCAD 2016 product but for some reason there is no ORDERBYLAYER command like there should be . Does anyone maybe have any idea why it s not working Comment : Ideally you should not have to NETLOAD the plugin DLL the apps should load automatically according to its .bundle folder . But if you re NETLOADing it make sure it s on a local folder no network folders . Also is there any error message Where did you download it from Comment : Thanks for the reply @Augusto . I downloaded it from here dotsoft.com freestuff.htm http : www.dotsoft.com freestuff.htm The download is a zip file that only contains the DLL s an image and a htm file with the instructions on using the NETLOAD command . .. . Answer : AutoCAD 2016 is not supported . The more recent version is for AutoCAD 2014 OrderByLayer19.dll Comment : The thing is it worked on a previous installation of Windows . Comment : You are on Windows 10 Comment : Well I did install a clean copy of Windows 10 a month or so ago and that may have been the Windows on which the plug in worked with AutoCAD 2016 but due to all the optimisation issues with Windows 10 I reverted back to Windows 8.1 which is the current installation the plug in does not seem to want to work with AutoCAD 2016 .", "Question : There is a .Net Autocad plugin in which a WCF service is used to call a method on another process external to Autocad . Autocad entities are wrapped in custom classes and passed through WCF . Once the call returns the plug-in needs to write the result back into Autocad database . Here is the problem : ObjectId is needed to fetch the object and write the result back WCF serialize the data and ObjectId is not serializable . So I don t have access to the object . Is there any workaround solution for this .. . Answer : You can use the property ObjectId.OldIdPtr which is an IntPtr serializable . To get your ObjectId back just do : .. . .. . It s a more direct way than using the handle which need a lookup Comment : Yes indeed it s more easier . Thanks . Comment : Thanks Maxence . The ObjectId has got many other parameters e.x Database . Would they still be valid once the ObjectId is created in this way I shall try it . Comment : Yes the only state in ObjectId is a pointer to his unmanaged counterpart . All properties are retrieved from the unmanaged side ." ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
google-cloud-messaging@ios@112
google-cloud-messaging -- google-cloud-messaging is a service to allow data to be sent remotely to android and @placeholder applications and chrome extensions and packaged apps .
{ "confidence": [ 72.89002227783203, 72.327880859375, 70.47021484375, 69.88594055175781, 67.96438598632812, 66.80329132080078, 66.35464477539062, 64.1193618774414, 63.541664123535156, 63.4559326171875, 63.230587005615234, 63.230587005615234, 62.837608337402344, 62.837608337402344, 62.837608337402344, 62.25560760498047, 62.14186096191406, 62.06889343261719, 62.06889343261719, 61.607051849365234, 61.54957580566406, 60.97032928466797, 60.75580596923828, 60.697391510009766, 60.697391510009766, 60.55974578857422, 60.304412841796875, 60.304412841796875, 60.304412841796875, 60.21034622192383, 60.185272216796875, 60.06550216674805, 59.74778366088867, 59.74778366088867, 59.74778366088867, 59.57890319824219, 59.46918487548828, 59.11629104614258, 58.810829162597656, 58.810829162597656, 58.56500244140625, 58.10759735107422, 58.07315444946289, 57.883583068847656, 57.844478607177734, 57.75624465942383, 57.58828353881836, 57.58828353881836, 57.58828353881836, 57.58828353881836, 57.58828353881836, 57.58828353881836, 57.58828353881836, 57.318359375, 57.088863372802734, 56.78160858154297, 56.484317779541016, 56.484317779541016, 56.27763366699219, 56.20006561279297, 56.19390106201172, 56.193416595458984, 56.193416595458984, 56.045372009277344, 55.868492126464844, 55.766780853271484, 55.59550476074219, 55.57440185546875, 55.29155349731445, 55.285369873046875, 55.23515319824219, 55.05508804321289, 55.05508804321289, 55.05508804321289, 55.05508804321289, 55.05508804321289, 55.05508804321289, 55.05508804321289, 54.828948974609375, 54.765045166015625, 54.765045166015625, 54.705047607421875, 54.58424758911133, 54.51247024536133, 54.51247024536133, 54.51247024536133, 54.3248176574707, 54.3248176574707, 54.3248176574707, 54.3248176574707, 54.3248176574707, 54.3248176574707, 54.26131820678711, 53.949424743652344, 53.781219482421875, 53.74957275390625 ], "content": [ "Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging .", "Google Cloud Messaging GCM is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions .", "Create a Google Cloud Messaging for Chrome did the trick .", "This is a sample code .. . .. . Source : Google Cloud Messaging Tutorial https : www.simplifiedcoding.net google-cloud-messaging-tutorial-android-application", "Google cloud Messaging - a@gmail.com .", "The server is a PHP program that uses Google Cloud Messaging for Chrome service .", "I implemented google-cloud-messaging for a android client using the example from here : https : developers.google.com cloud-messaging android client .", "Google Cloud Messaging for Chrome won t it s used for Chrome Apps in the Chrome Web Store .", "Here s a Official Google Documentation for Cloud Messaging you may try to test GCM here : developers.google.com cloud-messaging https : developers.google.com cloud-messaging", "possible duplicate of Handling registration ID changes in Google Cloud Messaging on Android http : stackoverflow.com questions 16838654 handling-registration-id-changes-in-google-cloud-messaging-on-android", "I need a sample application for Google Cloud messaging .", "Google Cloud Messaging Call from PHP .", "After update you will get Google Cloud Messaging for Android library in Extras", "Make sure that the enable API that you use is Google Cloud Messaging for Android .", "I m using Google Cloud Messaging api to implement an Android client .", "And.. . don t forget to enable the Google Cloud Messaging service in the main Google APIs Console page .", "The default push in Android Google Cloud Messaging for Android is a silent push .", "developers.google.com cloud-messaging faq https : developers.google.com cloud-messaging faq", "Same goes with firebase-cloud-messaging questions tagged firebase-cloud-messaging .", "So I checked enabled APIs APIs and Auth - APIs Enabled APIs and realised that I had enabled Google Cloud Messaging for Chrome not Google Cloud Messaging for Android .", "In Google Cloud Messaging what is exactly the registration ID maximum length", "firebase.google.com docs cloud-messaging android client https : firebase.google.com docs cloud-messaging android client", "Activate Cloud Messaging for Android API .. . 2 .", "I registered Google Cloud Messaging GCM system .", "Google Cloud Messaging Push message problem .", ".. . .. . As per the recent highlights https : developers.google.com android guides releases may 2016 - v90 : .. . .. . Firebase Cloud Messaging builds on and improves the Google Cloud Messaging API .", "Maybe you haven t activated Google Cloud Messaging for Android in API COnsole .", "Go to the API enable Google Cloud Messaging for Android .. . .. . 3 .", "i want to work with google-cloud-messaging for my android app .", "Use this GCM Android https : developers.google.com cloud-messaging android start .. . .. . You can try using the Google Cloud Messaging https : developers.google.com cloud-messaging library instead of the deprecated library that contains GCMRegistrar .", "Try this firebase.google.com docs cloud-messaging chrome client https : firebase.google.com docs cloud-messaging chrome client", "Apparently Google Cloud Messaging become Firebase Cloud Messaging : firebase.google.com docs cloud-messaging https : firebase.google.com docs cloud-messaging not sure if it is related still investigating .", "For this it is necessary that the mobile app registers with Google Cloud Messaging GCM .", "This is indeed caused by unrealistic heartbeat intervals in Google Cloud Messaging .", "I am developing an application which uses Google Cloud Messaging .", "You can keep using Google Cloud Messaging with com.google.android.gms.gcm but we recommend upgrading https : developers.google.com cloud-messaging android android-migrate-fcm to com.google.firebase : firebase-messaging .", "If the message is sent successfully the regID must be wrong invalid and google-cloud-messaging cannot deliver the message .", "The official docs http : developer.android.com google gcm index.html on Google Cloud Messaging for Android does mention that GCM can be used to develop an instant messaging app .", "It s listed in the new docs for this : developers.google.com cloud-messaging android client https : developers.google.com cloud-messaging android client", "developers.google.com cloud-messaging android start https : developers.google.com cloud-messaging android start", "As I mentioned in my answer here http : stackoverflow.com a 37671576 4625829 : .. . .. . An FCM Token or much commonly known as a registrationToken like in i.stack.imgur.com Ubwmo.png google-cloud-messaging questions tagged google-cloud-messaging .", "For references : developers.google.com cloud-messaging http https : developers.google.com cloud-messaging http", "Google Cloud Messaging : Send message to all users http : stackoverflow.com questions 27202601 google-cloud-messaging-send-message-to-all-users .. . 2 .", "This is exactly similar to Android Cloud messaging .", "Then I added the features for Google Cloud Messaging GCM .", "I m implementing the new Google Cloud Messaging following the guides from the Google Developers page here https : developers.google.com cloud-messaging android client .. . .. . I ve successfully run and test it .", "scroll down to extra and check Google Cloud Messaging and install .", "http : www.zinniakhan.com 2014 07 check-google-cloud-messaging-gcm-client.html .", "I need to create an XMPP server in Node.js to communicate with Google Cloud Messaging .", "Which port and protocol does Google Cloud Messaging GCM use", "SERVICE NOT AVAILABLE is one of the most frustrating problems with Google Cloud Messaging .", "This occurred within the context of coding against Google Cloud Messaging but applies elsewhere .", "I am having trouble in executing Google Cloud Messaging in Swift .", "check this link developers.google.com cloud-messaging android https : developers.google.com cloud-messaging android android-migrate-fcm", "FCM firebase cloud messaging can be implemented with Android iOS and web specified Google Chrome only .", "Answer : FCM Firebase Cloud Messaging is a improved version of the Google Cloud Messaging API it have all features of GCM with some additional features also .", "Using agsXMPP to connect to Google Cloud Messaging XMPP API for the purpose of sending notification to Android devices .", "I have a Titanium app working on Android with Google Cloud Messaging and we ve been asked to port it to Nokia X .", "developers.google.com cloud-messaging android client https : developers.google.com cloud-messaging android client", "On Android you have Google Cloud Messaging and on iOS Apple Push Notification Service .", "http : stackoverflow.com questions 30746645 how-to-implement-google-cloud-messaging-topic-messaging-in-chrome but it did not help much .", "I am following http : javapapers.com android google-cloud-messaging-gcm-for-android-and-push-notifications", "I tried solution provided by Shardool in http : javapapers.com android android-multicast-notification-using-google-cloud-messaging-gcm", "How can I integrate the new Google Cloud Messaging https : en.wikipedia.org wiki Google 5fCloud 5fMessaging in a PHP backend", "I am trying to get Google Cloud Messaging GCM to work on Android with local device groups as described on https : developers.google.com cloud-messaging android client-device-group .", "I also had to activate both Chrome and Android Cloud Messaging API s .", "In case you want to migrate this is the official guide : developers.google.com cloud-messaging android https : developers.google.com cloud-messaging android android-migrate-fcm", "@RakeshL refer developers.google.com cloud-messaging https : developers.google.com cloud-messaging", "I was just looking at the new Google Cloud Messaging GCM and I was wondering if it is possible to use GCM for Instant Messaging on your Android application", "You can also check this tutorial http : hayageek.com google-cloud-messaging-for-chrome for more information and sample code .", "Wanted to understand the fundamental reasons for push-notification like Google Cloud Messaging earlier called Google Cloud to Device Messaging being more battery friendly for cloud -- device communication", "C2DM developers are strongly encouraged to move to Google Cloud Messaging GCM .", "checkout How to fix Google Cloud Messaging Registration error : SERVICE NOT AVAILABLE", "I am implementing Google Cloud Messaging in my application .", "@RakeshL you should switch to the new Google Cloud Messaging", "I m trying to build an app using Google Cloud Messaging .", "I m trying to implement functionality similar to Google Cloud Messaging .", "It looks like you are using Google Cloud Messaging to push to the device .", "You should use FCM Firebase Cloud Messaging .", "see firebase.google.com docs cloud-messaging https : firebase.google.com docs cloud-messaging notifications managing-device-groups-on-the-app-server", "Refer this : developers.google.com cloud-messaging https : developers.google.com cloud-messaging concept-options hl en lifetime", "Google Cloud Messaging for Android http : developer.android.com google gcm index.html is meant just for pushing from server to Android client .", "Create an Instant Messaging app using Google Cloud Messaging GCM http : www.appsrox.com android tutorials instachat .. . .. . So it is possible to use GCM for Instant Messaging on Android to answer your question .", "Just to be sure have run the Part 4 sample from developers.google.com cloud-messaging android start https : developers.google.com cloud-messaging android start", "try this for implementing GCM or new API with FCM developers.google.com cloud-messaging android client https : developers.google.com cloud-messaging android client", "I suggest you read through the documentation first developers.google.com cloud-messaging android client https : developers.google.com cloud-messaging android client", "Rev 19 11 would not shown up Extras Google Cloud Messaging for Android Library in SDK Manager .", "Because Google Cloud Messaging for Android will give you access to the normal GCM API .", "Is there anyway Google Cloud messaging could be used for this purpose to send a message to my application on a particular android phone.... .", "Check that Google Cloud Messaging for Android appears on the enabled APIs in APIs- enabled APIs .", "Similar : stackoverflow.com questions 16838654 http : stackoverflow.com questions 16838654 handling-registration-id-changes-in-google-cloud-messaging-on-android", "Have you already downloaded Google Cloud Messaging for Android Library http : stackoverflow.com questions 21575794 gcmregistrar-cannot-be-resolved", "Android Cloud to Device Messaging C2DM is deprecated .", "I am trying to use new Google Cloud Messaging system but I have some problems .", "It cannot find the cloud messaging .", "I have implemented App Engine Backend with Google Cloud Messaging https : cloud.google.com mobile messaging add module to send message ." ] }
{ "confidence": [ 81.40917205810547, 75.41590881347656, 71.53182983398438, 70.84211730957031, 70.71996307373047, 69.99386596679688, 69.81461334228516, 69.3643569946289, 69.18431091308594, 69.17984008789062, 68.40773010253906, 68.00421142578125, 68.00130462646484, 67.71268463134766, 67.35350799560547, 66.82498168945312, 66.6640625, 66.31483459472656, 66.24726867675781, 66.18810272216797 ], "content": [ "Question : How to get data payload from GCM in browser client I get push-notification and all . In response from GCM I get an empty objet field data . I want to send push-notification with message by client in a browser . How can I do that .. . Answer : First for downstream messaging GCM provides two types of payload : notification and data . In Data payload you need to include the developer s custom key-value pairs only and the client app must handle the message . You can read the documentation here https : developers.google.com cloud-messaging concept-options payload about data in the message payload . I will suggest you to read this documentation Implementing GCM Client on Chrome https : developers.google.com cloud-messaging chrome client to know more information in setting up the GCM in the browser client . Make sure that the enable API that you use is Google Cloud Messaging for Android . Because Google Cloud Messaging for Android will give you access to the normal GCM API . Google Cloud Messaging for Chrome won t it s used for Chrome Apps in the Chrome Web Store . You can also check this tutorial http : hayageek.com google-cloud-messaging-for-chrome for more information and sample code . Comment : Not working with using in browser Request my body data is null : registration ids : XXX notification : body : XXX title : XXX icon : XXX content available : true collapse key : XXX Service-worker with not writting install and activate : self.addEventListener push function event event.waitUntil self.registration.showNotification XXX body : XXX icon : XXX", "Question : I was just looking at the new Google Cloud Messaging GCM and I was wondering if it is possible to use GCM for Instant Messaging on your Android application I saw you can send data like a message from a server but is it also possible to send from one device to another one And how would this work Some example code would be really helpful. . .. . .. . Tnx .. . Answer : The official docs http : developer.android.com google gcm index.html on Google Cloud Messaging for Android does mention that GCM can be used to develop an instant messaging app . ...or it could be a message containing up to 4kb of payload data so apps like instant messaging can consume the message directly . So we went ahead and created an instant messaging app using GCM . The server-side is powered by Google App Engine . You can read the complete tutorial here . Create an Instant Messaging app using Google Cloud Messaging GCM http : www.appsrox.com android tutorials instachat .. . .. . So it is possible to use GCM for Instant Messaging on Android to answer your question . However reliability of GCM compared to XMPP for IM is another topic . Comment : Cool tutorial . How much time did it take you to create this And how much people were involved", "Question : i got confused by gcm today . I dont know if my registrationid is correct . I got characters and a colon in front of a registrationid starting with APA . The Pattern is xXXXxxX : APA.. . . I implemented google-cloud-messaging for a android client using the example from here : https : developers.google.com cloud-messaging android client . If i use a older implementation for example with GCMRegistrar i only get a registration id starting with APA . Till now i though a registration id has to start with APA . Is the stuff before the colon some tokenspecific stuff Do i have to pass the full token to the webservice or is it okay if i cut the chars before the colon and send the registration starting with APA Comment : BTW : GCM is deprecated . Use FCM Comment : GCM is not deprecated . they will support the current version of gcm but new features will be added to fcm as google announced . developers.google.com cloud-messaging faq https : developers.google.com cloud-messaging faq .. . Answer : gcm.register is deprecated . use instance id https : developers.google.com cloud-messaging registration method with token instead . https : developers.google.com cloud-messaging android legacy-regid .. . .. . GCM register is deprecated starting May 28 2015 . New app development should use the Instance ID API to handle the creation rotation and updating of registration tokens . For more information see Registering Client Apps and Set up a GCM Client App on Android . Comment : I know that . register is deprecated . I didn t used it . I used the instance id . Like in the link i posted is shown . My question is only about the Chars before the Colon an the Colon itself . Comment : use tokens insstead of former regids", "Question : I want to build a messaging app for web using Google s Firebase . In this app a user should send and receive messages to from other users . I checked Google s Firebase website but I got lost . Can you tell me where to start Can you show me any tutorial or something like that related to Firebase web messaging I welcome any suggestions . Thanks . .. . Answer : FCM firebase cloud messaging can be implemented with Android iOS and web specified Google Chrome only . So for using it on web application for all browser we have to implement the firebase-database . You can see this implementation of firebase-database http : stackoverflow.com a 38199481 5610686 Comment : @Qualwebs can we use google s push-notification for chrome web sites with firebase . What is the major difference between google-cloud-messaging push notifications for web vs google firebase push notifications . We want to send push notifications for websites using google push notifications and firebase is this possible Comment : You can start here : firebase.google.com docs cloud-messaging chrome client https : firebase.google.com docs cloud-messaging chrome client", "Question : Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging . What does this mean for existing users of GCM and what migration if any are needed Comment : since the today updates Android Build Tools 25.1.6 GCM doesn t works for me . seems that you need to stick with 25.1.1 if you want to keep GCM . Comment : Hi @sonique the error you found was an unrelated issue that we experienced yesterday and that we already fixed . GCM will continue to work and the migration to FCM is recommended but not necessary . Comment : @DiegoGiorgini what step did you follow to fix it I still get exception because firebase look here : stackoverflow.com questions 37312340 http : stackoverflow.com questions 37312340 Comment : I am answering in that thread now . .. . Answer : The cloud infrastructure will mostly remain the same so existing GCM apps should continue to work fine . Although I haven t found any mention of a deprecation policy from Google yet it would be unusual for Google to and they have little reason to break existing GCM infrastructure SDK code . FCM seems like a better version of GCM being available on multiple platforms even web and simpler to setup compare to GCM . Migration guides are available for Android http : developers.google.com cloud-messaging android android-migrate-fcm and iOS http : developers.google.com cloud-messaging ios ios-migrate-fcm Comment : In case you want to migrate this is the official guide : developers.google.com cloud-messaging android https : developers.google.com cloud-messaging android android-migrate-fcm", "Question : I am working on sending push notifications with FCM . I am able to send notifications successfully to a set of devices when I know their IDs . But now I want to send notifications to a topic as mentioned here : https : firebase.google.com docs cloud-messaging topic-messaging .. . .. . They have documented the server-side pretty well . But I am not sure how to subscribe to a topic on the client-side My client includes chrome packaged app web browsers ionic based mobile-application for different platforms . .. . .. . So in summary how do I make users subscribe to topics Please help me out . Thanks in advance . PS : I did go through How to get registered into GCM topics from javascript for Chrome http : stackoverflow.com questions 35230286 how-to-get-registered-into-gcm-topics-from-javascript-for-chrome and How to implement Google Cloud Messaging - Topic Messaging in Chrome http : stackoverflow.com questions 30746645 how-to-implement-google-cloud-messaging-topic-messaging-in-chrome but it did not help much . Comment : I ve looked around the docs. . it seems that Topic Messaging for Chrome still isn t available GCM and FCM . .. . Answer : I ve looked around the docs . It seems that Topic Messaging for Chrome still isn t available for GCM and FCM . Added this as an answer for better visibility .", "Question : Hello Friends I am new to this stackoverflow community but have wide experience in developing code using various programming-languages like android . Today I was implementing GCM with one of my application I was facing some problem of delay in push-notification message . I was reading about it on goggle and found somewhere that some new service named FCM launched by google recently . I read various article or blog but did not find much information from there . I have some questions in mind pls give your views all stackoverflowian are heartily invited to give their suggestion . Why we need this FCM . FCM over GCM . Is GCM now depreciated . Are they going to stop all services support of gcm . How to update my old applications from GCM to FCM . Can anyone show me the original link where google announced the FCM .. . over GCM because i did not found this originally posted google . Thank you All .. . Jordan Chaffins Comment : short answer will be FCM is the new version of GCM and I believe every-one want to stick to the latest... . Comment : Thank you all for giving such nice answers . @all Comment : Why stackoverflow not allowing me to upvote a good answer . Can any one suggest me . Comment : Possible duplicate of stackoverflow.com q 37311188 4625829 http : stackoverflow.com q 37311188 4625829 .. . Answer : First of all Welcome to Stack-Overflow family . If you will do Google for 5 minutes about this I am sure you will found numerous post related to your question . I Googled it for you and found something useful please see if this help you somehow . 1 . Why we need this FCM . Answer : FCM Firebase Cloud Messaging is a improved version of the Google Cloud Messaging API it have all features of GCM with some additional features also . Google recommending this they wrote Firebase is known for being cross-platform so FCM now makes a natural fit in the Firebase suite of features designed for Android iOS and mobile web . Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging . See new Release https : developers.google.com android guides releases may 2016 - v90 .. . .. . Source URL : https : developers.google.com cloud-messaging faq .. . .. . 2 . FCM over GCM . Answer : FCM is the new version of GCM under the Firebase brand . It inherits GCM s core infrastructure with new SDKs to make Cloud Messaging development easier . Benefits of upgrading to FCM SDK include : .. . .. . Simpler client development . You no longer have to write your own registration or subscription retry logic . An out-of-the-box notification solution . You can use Firebase Notifications a serverless notifications solution with a web-console that lets anyone send notifications to target specific audiences based on Firebase Analytics insights . Source URL : https : firebase.google.com support faq gcm-fcm .. . .. . 3 . Is GCM now depreciated . Are they going to stop all services support of gcm . Answer : Yes some features of GCM is already depreciated and now in coming days GCM are going to fully depreciated . See here https : developers.google.com cloud-messaging android legacy-regid registration-state-sync-handling But Google says We will continue to support the current version of GCM Android and iOS SDKs because we know a lot of developers are using GCM SDKs today to handle notifications and client app upgrade takes time . But all new client-side features will be added to FCM SDKs only moving forward . You are strongly encouraged to upgrade to FCM SDKs . Source URL : https : developers.google.com cloud-messaging faq .. . .. . 4 . How to update my old applications from GCM to FCM . Answer : Import your GCM project as a Firebase project - : .. . .. . In the Firebase console select Import Google Project . .. . Select your GCM project from the list of existing projects and select Add Firebase . .. . In the Firebase welcome screen select Add Firebase to your Android App . .. . Provide your package name and SHA-1 and select Add App . A new google-services.json file for your Firebase app is downloaded . .. . Select Continue and follow the detailed instructions for adding the Google Services plugin in Android Studio . Source URL : https : developers.google.com cloud-messaging android android-migrate-fcm .. . .. . 5 . Can anyone show me the original link where google announced the FCM over GCM because i did not found this originally posted google . Answer : Please see the below picture : - And for more reading please visit the below mentioned URL . enter image description here http : i.stack.imgur.com TvyRi.jpg .. . .. . Source URL : https : developers.google.com cloud-messaging android android-migrate-fcm Comment : I am trying up-voting you but it says that i does not have enough reputation . How to do that how I can appreciate you . Comment : I am glad it helps you . @JordanChaffins Comment : Can i expect FCM to be glitch free as i faced many troubles using GCM. . @RobiKumarTomar Comment : Yes GCM is depreciated now . See here This is incorrect . GCM has not yet been deprecated . The thing you linked to was an older GCM API that was deprecated back in 2015 in favor of using InstanceID to get registration tokens for GCM . Comment : Yes we all can hope this but FCM messaging and notifications development is very easier than GCM . @ManishNikam", "Question : i got confused by gcm today . I dont know if my registrationid is correct . I got characters and a colon in front of a registrationid starting with APA . The Pattern is xXXXxxX : APA.. . . I implemented google-cloud-messaging for a android client using the example from here : https : developers.google.com cloud-messaging android client . If i use a older implementation for example with GCMRegistrar i only get a registration id starting with APA . Till now i though a registration id has to start with APA . Is the stuff before the colon some tokenspecific stuff Do i have to pass the full token to the webservice or is it okay if i cut the chars before the colon and send the registration starting with APA Comment : BTW : GCM is deprecated . Use FCM Comment : GCM is not deprecated . they will support the current version of gcm but new features will be added to fcm as google announced . developers.google.com cloud-messaging faq https : developers.google.com cloud-messaging faq .. . Answer : GCM Registration Token is equal to registration id so is Instance ID . As I mentioned in my answer here http : stackoverflow.com a 37671576 4625829 : .. . .. . An FCM Token or much commonly known as a registrationToken like in i.stack.imgur.com Ubwmo.png google-cloud-messaging questions tagged google-cloud-messaging . As described in the GCM docs : .. . .. . An ID issued by the GCM connection servers to the client app that allows it to receive messages . Note that registration tokens must be kept secret . Different terms point to the same thing . The format for the registration token may also vary as seen this answer http : stackoverflow.com q 32809847 4625829 : .. . .. . The GCM registration token is usually around 140 chars in length and can contain colons underscores and hyphens . Maximum size is supposed to be 4k . Though I m not entirely sure with regards to the character length I think I ve read on a post here somewhere that it may exceed that number . Do search around . Comment : so i pass xyxzyzz : APA... . to the webservice . Thanks for the Answer Comment : AFAIK yeah . I think I ve encountered a registration token like that before. . Do try it . You can never know for sure if you don t test it out . :", "Question : Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging . What does this mean for existing users of GCM and what migration if any are needed Comment : since the today updates Android Build Tools 25.1.6 GCM doesn t works for me . seems that you need to stick with 25.1.1 if you want to keep GCM . Comment : Hi @sonique the error you found was an unrelated issue that we experienced yesterday and that we already fixed . GCM will continue to work and the migration to FCM is recommended but not necessary . Comment : @DiegoGiorgini what step did you follow to fix it I still get exception because firebase look here : stackoverflow.com questions 37312340 http : stackoverflow.com questions 37312340 Comment : I am answering in that thread now . .. . Answer : In addition to what @PritamBaral s post . FCM s core is composed of GCM itself . There is no actual need to migrate to it but it is encouraged since when migrated to FCM all of the features tied to it will be available for use . When referring to the Firebase Official Pricings Page https : firebase.google.com pricing the features that are included for free are : .. . .. . Analytics App Indexing Authentication Dynamic Links FCM Invites Notifications Crash Reporting Remote Config .. . .. . Pre-IO GCM implementations should still work for a longer time in the future as stated in the GCM and FCM FAQs https : developers.google.com cloud-messaging faq : .. . .. . We will continue to support the current version of GCM Android and iOS SDKs because we know a lot of developers are using GCM SDKs today to handle notifications and client app upgrade takes time . .. . But all new client-side features will be added to FCM SDKs only moving forward . You are strongly encouraged to upgrade to FCM SDKs . .. . .. . As per the recent highlights https : developers.google.com android guides releases may 2016 - v90 : .. . .. . Firebase Cloud Messaging builds on and improves the Google Cloud Messaging API . You can keep using Google Cloud Messaging with com.google.android.gms.gcm but we recommend upgrading https : developers.google.com cloud-messaging android android-migrate-fcm to com.google.firebase : firebase-messaging . Comment : but you can t handle a background message with Firebase Cloud Messaging or is that possible", "Question : I am trying to get Google Cloud Messaging GCM to work on Android with local device groups as described on https : developers.google.com cloud-messaging android client-device-group . I have enabled the following services in the web-console https : console.developers.google.com : .. . .. . Google Cloud Messaging for Android .. . Google Cloud Pub Sub .. . Google+ API .. . .. . I have also created the following credentials : .. . .. . API key with specified package name and SHA-1 certificate keyprint .. . OAuth 2.0 client IDs Web application .. . .. . My Android code looks as follows error-handling etc . has been stripped : .. . .. . The submitted JSON to https : android.googleapis.com gcm notification looks something like this : .. . .. . The response contents is : .. . .. . What am I doing wrong Comment : Just to be sure have run the Part 4 sample from developers.google.com cloud-messaging android start https : developers.google.com cloud-messaging android start Comment : It s clear that you have made a thorough effort to get this working . I also tried and failed . There are two other SO questions for the same issue one recent http : stackoverflow.com questions 33895099 gcm-client-based-device-group-management and the other http : stackoverflow.com questions 26242452 google-cloud-messaging-401-unauthorized-is-returned-when-creating-notification from a year ago . Neither have a solution . The instructions https : developers.google.com cloud-messaging android client-device-group are clearly wrong or incomplete . Very frustrating Comment : Yes . I started out from the examples and have attempted to move it to local device groups since I don t want to have an unnecessary app server in the solution architecture . The examples assume that you have an app server available . .. . Answer : Here s the recap based on the correct answer by greywolf82 . The correct code should follow these principles error-handling etc . has been stripped : .. . .. . The submitted JSON to https : android.googleapis.com gcm notification looks something like this : .. . .. . The response contents is :", "Question : If not middleware what is the correct architectural term for it GCM website : https : developers.google.com cloud-messaging .. . Answer : Yes . By definition : .. . .. . Middleware https : en.wikipedia.org wiki Middleware is a computer software that provides services to software applications beyond those available from the operating-system . It acts as a bridge between an operating-system or database and applications especially on a network . For this instance GCM acts like a bridge between servers and client apps https : developers.google.com cloud-messaging gcm Android iOS OS . So to me it s safe to call it a middleware .", "Question : I m implementing the new Google Cloud Messaging following the guides from the Google Developers page here https : developers.google.com cloud-messaging android client .. . .. . I ve successfully run and test it . But my problem now is I have different productFlavors with different applicationId packageName and different GCM Project Id . The google-services.json have to be put at the app google-services.json not the flavors folder . Is there any way to make the google-services.json config different for many flavors Comment : if you just want you use the sender-id then generate key without any package name from google console . Comment : The line apply plugin : com.google.gms.google-services in gradle file seems to put gcm strings into app build generated res google-services debug values values.xml .. . Comment : The best answer I ve found for this is on this question http : stackoverflow.com a 30965053 404525 .. . Answer : I have found that the google-services plugin is quite useless for projects that want to add GCM . It only generates the following file which simply adds your project ID as a string resource : .. . .. . It appears that you only need it if you copied the sample code verbatim directly from the Cloud Messaging for Android https : developers.google.com cloud-messaging android start guide . Here is the example line : .. . .. . Solution .. . .. . If you want to be able to switch API projects for different build types or product flavors you can just define your own constants and choose the appropriate one when calling the getToken API . For Product Flavors .. . .. . The above code works for switching between debug and release builds . For product flavors you would define different API keys in a java source file and place the files in their corresponding product flavor directory . For reference : Gradle Build Variants https : developer.android.com tools building configuring-gradle.html workBuildVariants Comment : @swimmingtomars You may be applying the google-service plugin unnecessarily . If you use this method you can t apply the google-services plugin . See the accepted answer if you require this plugin for service other than GCM .", "Question : I am using GCM services to push information from server . If I use browser key it shows the sucess mesaage as : multicast id : 4849013215736515938 success : 1 failure : 0 canonical ids : 0 results : message id : 0 : 1348742583011905 2adac3a0f9fd7ecd but i did not get any notifications on device . And if I use server key it shows Unauthorized Error 401 . My code is shown below : .. . .. . Please help me for this issue . Thanks in advance . Comment : refer this stackoverflow.com a 21628030 1765530 http : stackoverflow.com a 21628030 1765530 Comment : can u make a small step list of google configuration .. . Answer : I tried everything in this thread and still no luck . So I checked enabled APIs APIs and Auth - APIs Enabled APIs and realised that I had enabled Google Cloud Messaging for Chrome not Google Cloud Messaging for Android . As soon as I enabled the latter it worked immediately . Double check you have the right API enabled Comment : This is the good solution Works great . Create a Google Cloud Messaging for Chrome did the trick . Thank you :", "Question : How can I integrate the new Google Cloud Messaging https : en.wikipedia.org wiki Google 5fCloud 5fMessaging in a PHP backend Comment : sherif.mobi 2012 07 gcm-php-push-server.html http : www.sherif.mobi 2012 07 gcm-php-push-server.html Comment : I ve written a small OOP-library with an implementation of GCM-server . Hope it will help someone : Check it on GitHub - github.com CodeMonkeysRu GCMMessage https : github.com CodeMonkeysRu GCMMessage Comment : @HelmiB : I tried your code on website it executes without any error but the result is empty . Also the message won t deliver . Please help me . I m in a really need of it . Comment : My fork of GCMMessage support exponential backup which is mandatory for using Google s API . It uses a redis-server for queuing messages and supports the new endpoint as well as iOS : github.com stevetauber php-gcm-queue https : github.com stevetauber php-gcm-queue Comment : Its very simple all you need is just an app server GCM server and an app hosting that service . Refer this example . Here localhost acts as app server feelzdroid.com 2016 02 http : www.feelzdroid.com 2016 02 android-google-cloud-messaging-push-notifications-gcm-tutorial.html .. . Answer : After searching for a long time finally I am able to figure out what I exactly needed Connecting to the GCM using PHP as a server-side-scripting language The following tutorial will give us a clear idea of how to setup everything we need to get started with GCM .. . .. . Android Push Notifications using Google Cloud Messaging GCM PHP and MySQL http : www.androidhive.info 2012 10 android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql", "Question : I am following http : javapapers.com android google-cloud-messaging-gcm-for-android-and-push-notifications to send push notifications via GCM . Everything works fine but i am able to send push-notification to just one device . Registering another device replaces registration id of previous device . I tried solution provided by Shardool in http : javapapers.com android android-multicast-notification-using-google-cloud-messaging-gcm but its not working . Any suggestion would be of great help . Here are my gcm.php codes that registers device and sends push notifications but only to a single device registered recently . gcm.php .. . .. . Please tell me how do I store multiple device registration ids in GCMRegid.txt and send notifications to each of the registered device .. . Answer : Sending Push Notification to multiple devices is same as we send to individual device . Just store the registration token of all registered device to your server . And when calling the push-notification with curl I am assuming you are using php as server-side Put all the registration id in an array . This is a sample code .. . .. . Source : Google Cloud Messaging Tutorial https : www.simplifiedcoding.net google-cloud-messaging-tutorial-android-application", "Question : I developed an application which used GCM technology and everything is OK . I observed that the registration ID of the device changes after a period of time and this has caused a problem in my app because my app is dependent on the Reg ID . So how I can get a fixed Reg ID for clients Comment : possible duplicate of Handling registration ID changes in Google Cloud Messaging on Android http : stackoverflow.com questions 16838654 handling-registration-id-changes-in-google-cloud-messaging-on-android Comment : @trante that SO question is ages old and a waste of time . .. . Answer : The periodical refresh never happened and the registration refresh is not included in the new GCM library . The only known cause for registration ID change is the old bug of apps getting unregistered automatically if they receive a message while getting upgraded . Until this bug is fixed apps still need to call register after upgrade and so far the registration ID may change in this case . Calling unregister explicitly usually changes the registration ID too . The suggestion workaround is to generate your own random identifier saved as a shared preference for example . On each app upgrade you can upload the identifier and the potentially new registration ID . This may also help tracking and debugging the upgrade and registration changes on server-side .", "Question : I m creating an android app like Tinder and creating a messaging service similar to Tinder s- in that each user gets a push-notification and messages with one another . So far I m using Google Cloud Messaging but running into some trouble with ID s API synchronization . Does anyone know what type of messaging how code Tinder uses .. . Answer : May this tutorial can help u out : http : www.appsrox.com android tutorials instachat", "Question : I developed an application which used GCM technology and everything is OK . I observed that the registration ID of the device changes after a period of time and this has caused a problem in my app because my app is dependent on the Reg ID . So how I can get a fixed Reg ID for clients Comment : possible duplicate of Handling registration ID changes in Google Cloud Messaging on Android http : stackoverflow.com questions 16838654 handling-registration-id-changes-in-google-cloud-messaging-on-android Comment : @trante that SO question is ages old and a waste of time . .. . Answer : I read the 2 reasons over here http : blog.pushbullet.com 2014 02 12 keeping-google-cloud-messaging-for-android-working-reliably-techincal-post when you GCM Registration Id might change : .. . .. . 1 . You ll need to re-register every device each time you update your app . 2 . You ll also need to re-register a device if the version of Android it s running has been updated .. . .. . P.S : The below old answer s reference has been removed from Google s page so might not be valid anymore .. . .. . If you see the second point under the heading Enable GCM on Architectural Overview http : developer.android.com google gcm gcm.html arch page it says : .. . .. . Note that Google may periodically refresh the registration ID so you should design your Android application with the understanding that the com.google.android.c2dm.intent.REGISTRATION intent may be called multiple times . Your Android application needs to be able to respond accordingly . So for handling that you should have a Broadcast Listener which could handle com.google.android.c2dm.intent.REGISTRATION intent which Google send to the app when it has to refresh the registration ID . The broadcast receiver will have the onReceive method with an Intent . From the intent you can get the Bundle using which you can extract the new registration ID from Google . You can save that and send it to the 3rd part server to replace your previous registered ID for that user . Also you may see this http : stackoverflow.com a 17892734 1306419 answer on the question In GoogleCloudMessaging API how to handle the renewal or expiration of registration ID http : stackoverflow.com questions 17335572 in-googlecloudmessaging-api-how-to-handle-the-renewal-or-expiration-of-registra . Discussion on Should applications call gcm.register every seven days to ensure valid registration IDs http : stackoverflow.com questions 17891399 should-applications-call-gcm-register-every-seven-days-to-ensure-valid-registr 17892487 17892487 question might also be of some use . Hope this helps you understand how to handle it . Comment : I don t think your quote is valid anymore . That piece of text does not exist below the Enable GCM heading .", "Question : Does any browser in iOS support push notifications similar to Chrome on Android Google seems to mention it in their GCM presentation video but I can t find any information about it . .. . Answer : I think what you are looking for is the push notifications for web-applications . Basically push messaging for web apps can be implemented through service workers and web app manifests . The documentation https : developers.google.com cloud-messaging chrome client only describe the implementation on chrome app but there is a reference on how you can implement it in web apps . You can check the full implementation Here https : developers.google.com web fundamentals getting-started hl en Comment : You re right . But none of the browsers I checked support service workers on iOS . I already have a web app that works fine on desktop and android chrome but it doesn t work on iOS . So I was wondering if there s something different that I have to do for iOS or if it s just not supported .", "Question : I am trying to get Google Cloud Messaging GCM to work on Android with local device groups as described on https : developers.google.com cloud-messaging android client-device-group . I have enabled the following services in the web-console https : console.developers.google.com : .. . .. . Google Cloud Messaging for Android .. . Google Cloud Pub Sub .. . Google+ API .. . .. . I have also created the following credentials : .. . .. . API key with specified package name and SHA-1 certificate keyprint .. . OAuth 2.0 client IDs Web application .. . .. . My Android code looks as follows error-handling etc . has been stripped : .. . .. . The submitted JSON to https : android.googleapis.com gcm notification looks something like this : .. . .. . The response contents is : .. . .. . What am I doing wrong Comment : Just to be sure have run the Part 4 sample from developers.google.com cloud-messaging android start https : developers.google.com cloud-messaging android start Comment : It s clear that you have made a thorough effort to get this working . I also tried and failed . There are two other SO questions for the same issue one recent http : stackoverflow.com questions 33895099 gcm-client-based-device-group-management and the other http : stackoverflow.com questions 26242452 google-cloud-messaging-401-unauthorized-is-returned-when-creating-notification from a year ago . Neither have a solution . The instructions https : developers.google.com cloud-messaging android client-device-group are clearly wrong or incomplete . Very frustrating Comment : Yes . I started out from the examples and have attempted to move it to local device groups since I don t want to have an unnecessary app server in the solution architecture . The examples assume that you have an app server available . .. . Answer : Found the trick : you are using a google account to take the id token you need to use EXACTLY the email as notification key name . So if you are using foo@gmail.com you need to use this address as notification key name . Comment : Spamming the same answer across multiple answers is not the appropriate course to take . If you can copy and paste an answer the questions are likely duplicates . Vote to close them as such . Comment : I tried but I can t I don t know why I can t found the response to mark as duplicate . Sorry . Since there are a LOT of people looking for a response is better to spam it on all related questions . If a moderator wants to delete them is ok for me . I just tried to help other developers . Edit : it seems you can t mark it as duplicate because the original question must have an accepted answer . Comment : You are absolutely right . This did the trick . Thank you very much -- Just a curious question : How did you ever figure that out Comment : Side note : I have notified Google that they should update the documentation with this info . : - Comment : After several emails with customer service..... ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
android-4.2-jelly-bean@operating-system@89
android-4 .2 - jelly-bean -- android-4 .2 - jelly-bean api level 17 is the version of android @placeholder preceded by android 4.1 .
{ "confidence": [ 87.28125762939453, 84.96809387207031, 84.96809387207031, 83.34893798828125, 77.2168960571289, 76.15618133544922, 75.83320617675781, 74.18461608886719, 73.40713500976562, 70.12837219238281, 69.64187622070312, 69.64187622070312, 67.12154388427734, 65.70956420898438, 65.70956420898438, 63.573822021484375, 63.573822021484375, 63.18922805786133, 62.419456481933594, 62.120452880859375, 61.99242401123047, 60.63640594482422, 60.63640594482422, 59.841835021972656, 59.64150619506836, 59.64150619506836, 59.01802062988281, 58.909629821777344, 58.768226623535156, 58.768226623535156, 58.768226623535156, 58.768226623535156, 58.749427795410156, 58.69456481933594, 57.71852493286133, 57.18876266479492, 56.874412536621094, 56.25574493408203, 55.947811126708984, 55.872093200683594, 55.64735412597656, 55.64735412597656, 55.557403564453125, 55.29447555541992, 54.83591079711914, 54.83591079711914, 54.83591079711914, 54.83591079711914, 54.83591079711914, 54.13846206665039, 53.417236328125, 53.314598083496094, 53.304527282714844, 53.25600814819336, 53.167659759521484, 52.96383285522461, 52.89383316040039, 52.824398040771484, 52.574058532714844, 52.574058532714844, 52.295127868652344, 52.12805938720703, 52.12805938720703, 52.061607360839844, 51.685672760009766, 51.668216705322266, 51.668216705322266, 51.668216705322266, 51.62508773803711, 51.62508773803711, 51.61374282836914, 51.237247467041016, 50.99164581298828, 50.97584915161133, 50.97508239746094, 50.97508239746094, 50.899925231933594, 50.73199462890625, 50.7230224609375, 50.596458435058594, 50.516082763671875, 50.50844955444336, 50.36044692993164, 50.36044692993164, 49.883140563964844, 49.709415435791016, 49.69521713256836, 49.46278381347656, 49.38227462768555, 49.06513595581055, 49.046241760253906, 48.911537170410156, 48.8596076965332, 48.73399353027344, 48.73399353027344, 48.73399353027344, 48.36280822753906, 48.36280822753906, 48.36280822753906 ], "content": [ "The following problem appears on Android Jelly Bean .", "Possible duplicate of Where is Android 4.1 Jelly bean source code", ".. . .. . What are the workarounds or proper ways for basic-authentication in Android Jelly Bean 4.1", "It is not available for any of the Jelly Bean versions of Android .", "I am using the media codec API released in Android 4.1 Jelly Bean .", "Android updated Wi-Fi Direct API with Jelly Bean in API level 16 .", "I am stuck in a problem in Android 4.2 Jelly Bean .", "http : stackoverflow.com questions 11618907 where-is-android-4-1-jelly-bean-source-code", "My webview app works fine with touchend events in android version older than Jelly Bean .", "THe Pre Android Version enclosed the SSID in quotes While post Jelly Bean doesnot http : developer.android.com reference android net wifi WifiInfo.html getSSID", "the logcat don t show anything using android jelly bean and the manifest part is done .", "This was working perfectly in previous Android versions but with jelly bean 4.3 kill my app .", "But in Jelly Bean the touchend events are not reliable .", "How do i make sure captions work on Android Jelly bean 4.1 4.2 4.3 too as the option is not available in settings", "I am trying to develop an app using wifi direct in android Jelly Bean 4.1.1 .", "possible duplicate of Jelly Bean DatePickerDialog --- is there a way to cancel", "I have jelly bean on my phone .", "StandardCharset doesn t exist in Jelly Bean .", "I m using with android-studio and I can t run jelly bean on any emulator it is stuck on the opening black screen with the android title", "So most of the apps in jelly bean have a on screen search button .", "Also if you want that this code should run only for Jelly bean you can put this code in below if block var ver window.navigator.appVersion ver ver.toLowerCase if ver.indexOf android 4.1 0 required code here", "I am creating an alert dialog on Android Jelly Beans OS .", "I am adding Jelly Beans Support to my Android Kitkat application .", "It looks like there is a bug with Jelly Bean 4.1 that causes the text-size of dates in CalendarView to be disproportionally small on hi-res devices .", "The question is : Do you want to support Jelly Bean", "in Jelly Bean and now only provides a Done button .", "Working Android 2.2 DatePicker http : i.stack.imgur.com T27Fj.png .. . .. . Android 4.1 DatePicker .. . .. .", "Android 4.1 with no hardware keys on phone front .", "http : stackoverflow.com questions 11444238 jelly-bean-datepickerdialog-is-there-a-way-to-cancel", "I ve tried to use new systrace from jelly bean release but with no luck .", "Jelly Bean doesn t seem to like the maxlength attribute of HTML for text input .", "is there any way to make this work in jelly bean without migrating to Fragments", "@Chris : I m saying that adk release 0512 will not work with Jelly Bean devices since they present version 2 which it doesn t understand .", "so using this method as provided in Android documentation WifiManager in Android Documentation http : developer.android.com reference android net wifi WifiManager.html getScanResults .. . .. . In other all devices and versions It works fine Just giving problem on Android Jelly Bean .", "On Android SDK Level 19+ my method works but on Android 17 my approach leads into nothing", "Code works great on Android versions 2.x 3.x . 4.0.x Now with Jelly Bean and v4.1.x authentication fails with the following messages in the LogCat : .. . .. . The Authentication code we using for HttpURLConnection as in the Android documentation : .. . .. . Upon further investigation and troubleshooting we found out that this code is not being called in 4.1 Jelly Bean", "Note that in Android 2 . the onStop for android.app.Dialog does nothing at all and in 4 .", "In Jelly Bean the pronunciation is really smooth so I was thinking may be there is some kind of API for access to that service", "Since API level 16 Jelly Bean there is the possibility to add actions to a notification with .. . .. . But when I add an action to a notification and the action is pressed the notification is not going to be dismissed .", "Android 4 defaults to Hardware Acceleration On .", "But still when i try to install my app on the jelly bean device it says : - No active compatible AVD s or devices found .", "With the Jelly Bean update the Search Key now always starts Google NOW search functionality .", "I then decided to test on an Android 4.1 emulator .", "In API 17 Android introduced the ability to present content on secondary displays .", "The class in the link has the smarts to only call that method in jelly bean .", "I am looking for how we change the vibrate settings in Jelly Bean .", "Is there a way to remove the gray bar on static notification created by Jelly Bean", "It s only on galaxy nexus after update to Jelly Bean .", "Presentation class is newly introduced in Jelly Bean Plus 4.2.1 .", "Protocol version 2 is supported by Android 4.1 API Level 16 and higher it doesn t say that version 1 is not supported by 4.1 and it would be pretty bizarre to find that existing hardware would be abandoned just like that .", "The problem is this code isn t working in Android version 4.x.x .", "Someone found different in the Android source code in this related topic I think issue we having is related to that difference : HttpURLConnection worked fine in Android 2.x but NOT in 4.1 : No authentication challenges found http : stackoverflow.com questions 11810447 httpurlconnection-worked-fine-in-android-2-x-but-not-in-4-1-no-authentication-c", "I got to know that to avoid this error I need to build my native against Android toolchain generated for API level 16 since Jelly beans starts from api level 16 .", "It says android : .. . tags requires api level 21+ .", "API 17 Link : http : developer.android.com about versions android-4.2.html DisplayManager : http : developer.android.com reference android-hardware display DisplayManager.html", "I am trying to program for Android 4.2 device but the book I have is teaches Android 4.0 called Beginning Android App Development 4 http : www.wrox.com WileyCDA WroxTitle Beginning-Android-4-Application-Development.productCd-1118199545.html .", "It s strange most of them happened in Android 4 .", "This is a work around for android version 4.1.1 .", "My invitation is sent out like this : .. . .. . I ve read a lot on wifi direct on android and it s been working fine until I updated the phones to jelly bean. . anyone knows what could be wrong", "Now I have to write an app for android Jelly Bean 4.2.2 the app can work on just one device which ships currently only with 4.2.2 which has to discover and connect to BLE devices .", "I m working with media codec for an .mp4 file on jelly-bean and getting this in logcat .. . .. . Can anyone tell me what is this", "The target can still be jelly bean you just need to change the min sdk version to get it running on eclair 2.1 .", "Unfortunately this means existing firmware compiled with the original version of the library are not compatible with Jelly Bean devices .", "On a side note android 2.1 is api level 7 and android 4.2 is api level 17 so you can also try this : .. . .. . You can find the list of Api level for different android OS versions here http : developer.android.com guide topics manifest uses-sdk-element.html", "Right Now when i try to install my app on any jelly bean device it says : .. . .. . No active compatible AVD s or devices found .", "But iframe has no support for older android versions 4.1 or 4.2 in phonegap app .", "iframe is not supported in android 4.1 . . that what is the main problem here", "Not Working Android 4.1 DatePicker http : i.stack.imgur.com Bw3w0.png", "But the progress-bar appears fine on Android 4.1 .", "Android 4.1 includes offline voice typing .", "This was working fine till jelly bean in this version when I start an activity using startActivityForResult the application restart automatically when the onActivityResult has to be called .", "Starting from Android 4.1 API level 16 MediaCodec APIs have been introduced .", "same issue android 4.1 on emulator August 30th 2012 vote here code.google.com p android issues detail id 34860 https : code.google.com p android issues detail id 34860", "I developed on two HTC One Vs which couldn t update to Jelly Bean due to ram restrictions and an HTC One X+ which has 4.1 .", "Its happening because i need to change the android project properties and need to specify the target Api level as 16 .", "In eclipse i did Project Properties Android Select API level to 16 and Apply .", "On android 4.1.2 and other android 4 versions I do not recall the code worked fine .", "How do you access Android 4.2 s developer settings when the method prescribed on their developer site http : developer.android.com about versions jelly-bean.html 42-dev-options does not work", "Android tablet .", "It does not work for me with Android 6.0.1 .", "I want the minimum sdk to support jelly bean devices so I set the min sdk to 17 .", "I have Android NDK Version android-ndk-r10d .", "But if it was not part of android 2.x a dialog is fine .", "Delete .android adbkey on your desktop machine .. . .. . 2 .", "Tested and confirmed behaviour on Android 2.1-update1 and Android 4.2.2 .", "developer.android.com reference android-view https : developer.android.com reference android-view View.html SYSTEM UI FLAG HIDE NAVIGATION", "My ANDROID SDK HOME was set to .. . Android sdk when the folder was at .. . Android android-sdk .", "I have already searched a lot for an answer over the internet such as this http : stackoverflow.com questions 28217333 how-to-record-android-devices-screen-on-android-version-below-4-4-kitkat question but didn t found an answer .", "My current implementation works until 4.1 using the airplane mode but as I found out now airplane mode can t be changed without root permission in the latest jelly bean releases .", "the newest version of the ADT only allows me to compile with Android 17 -- it will allow you to compile with any Android SDK that you have downloaded .", "I have 2 devices one with Android 4.2 jellybean and another one with Android 2.3 Gingerbread .", "Added in API level 17 .", "If you compile against Android 3 or 4 you can .", "To reiterate : This is a confirmed bug in Android .", "My target is Android 4.2 .", "Or is it generated by the android system itself", "After build when I run it on my Jelly Bean device It crashes with error mentioned as the title of this question .", "In simulator I can run my app but on device with Jelly Bean OS I get a crash .", "It s just that in jelly bean it takes additional measures avoiding the bug before routing the callback and that involves calling that honeycomb+ method ." ] }
{ "confidence": [ 107.92106628417969, 101.91571044921875, 95.27824401855469, 94.4581527709961, 92.55421447753906, 90.1519546508789, 87.51612854003906, 85.99369049072266, 84.54806518554688, 84.29377746582031, 84.07766723632812, 83.85418701171875, 83.706298828125, 82.74301147460938, 82.1692886352539, 81.67454528808594, 80.50550842285156, 80.37552642822266, 79.00645446777344, 78.81788635253906 ], "content": [ "Question : We are making HttpURLConnection based request to the Web server using HTTP Basic Authentication . Code works great on Android versions 2.x 3.x . 4.0.x Now with Jelly Bean and v4.1.x authentication fails with the following messages in the LogCat : .. . .. . The Authentication code we using for HttpURLConnection as in the Android documentation : .. . .. . Upon further investigation and troubleshooting we found out that this code is not being called in 4.1 Jelly Bean .. . .. . What are the workarounds or proper ways for basic-authentication in Android Jelly Bean 4.1 Someone found different in the Android source code in this related topic I think issue we having is related to that difference : HttpURLConnection worked fine in Android 2.x but NOT in 4.1 : No authentication challenges found http : stackoverflow.com questions 11810447 httpurlconnection-worked-fine-in-android-2-x-but-not-in-4-1-no-authentication-c .. . Answer : We were able to solve Jelly Bean not calling getPasswordAuthentication of the Authenticator via the following new method : .. . .. . Then just call this function after opening the connection : .. . .. . The @TargetApi for Froyo annotation is only necessary since we are still supporting API 7 while Base64 was added in API 8 Comment : This header trick doesn t work for me when i m trying to do a multipart", "Question : We are making HttpURLConnection based request to the Web server using HTTP Basic Authentication . Code works great on Android versions 2.x 3.x . 4.0.x Now with Jelly Bean and v4.1.x authentication fails with the following messages in the LogCat : .. . .. . The Authentication code we using for HttpURLConnection as in the Android documentation : .. . .. . Upon further investigation and troubleshooting we found out that this code is not being called in 4.1 Jelly Bean .. . .. . What are the workarounds or proper ways for basic-authentication in Android Jelly Bean 4.1 Someone found different in the Android source code in this related topic I think issue we having is related to that difference : HttpURLConnection worked fine in Android 2.x but NOT in 4.1 : No authentication challenges found http : stackoverflow.com questions 11810447 httpurlconnection-worked-fine-in-android-2-x-but-not-in-4-1-no-authentication-c .. . Answer : For a 401 UNAUTHORIZED response with Android s httpURLConnection your server must send back a authenticate header like this.. . .. . WWW-Authenticate : Bogus realm blahblah comment use form to log in .. . as per .. . http : tools.ietf.org html rfc2616 search 10.4.2 401 Unauthorized Comment : This is the true solution . The Android HttpURLConnectionImpl rely on the server to provide a way for the client to authenticate .", "Question : null .. . Answer : Where can I find Source Code for JellyBean 4.2 Music Player Source Code Is it available in any site I could not find anywhere . Tried https : android.googlesource.com platform packages apps Music +refs but haven t found 4.2 there . Comment : Possible duplicate of Where is Android 4.1 Jelly bean source code http : stackoverflow.com questions 11618907 where-is-android-4-1-jelly-bean-source-code Comment : Searched that site but haven t found that Comment : Maybe android.googlesource.com platform packages apps Music + https : android.googlesource.com platform packages apps Music + android-4.2.2 r1.2 Comment : Got that finally . Thank you @tynn", "Question : My application was working perfectly on my Android 2.2 emulator . I then decided to test on an Android 4.1 emulator . The DatePickerDialog looks a little different and for some reason when I press on Done the onDateSet listener gets called twice and causes problems in my application . I know this because the log shown below in the code is printed twice whenever I click on Done .. . .. . Android 2.2 DatePicker .. . .. . Working Android 2.2 DatePicker http : i.stack.imgur.com T27Fj.png .. . .. . Android 4.1 DatePicker .. . .. . Not Working Android 4.1 DatePicker http : i.stack.imgur.com Bw3w0.png Comment : same issue android 4.1 on emulator August 30th 2012 vote here code.google.com p android issues detail id 34860 https : code.google.com p android issues detail id 34860 Comment : possible duplicate of Jelly Bean DatePickerDialog --- is there a way to cancel http : stackoverflow.com questions 11444238 jelly-bean-datepickerdialog-is-there-a-way-to-cancel .. . Answer : According to Ankur Chaudhary s brilliant answer http : stackoverflow.com a 26034036 905801 on the similar TimePickerDialog issue if we checked inside onDateSet if the given view isShown or not it will solve the whole issue with the minimal effort with no need for extending the picker or checking for some hideous flags going around the code or even checking for the OS version just do the following : .. . .. . and of course the same can be done for onTimeSet as per Ankur s answer", "Question : My application was working perfectly on my Android 2.2 emulator . I then decided to test on an Android 4.1 emulator . The DatePickerDialog looks a little different and for some reason when I press on Done the onDateSet listener gets called twice and causes problems in my application . I know this because the log shown below in the code is printed twice whenever I click on Done .. . .. . Android 2.2 DatePicker .. . .. . Working Android 2.2 DatePicker http : i.stack.imgur.com T27Fj.png .. . .. . Android 4.1 DatePicker .. . .. . Not Working Android 4.1 DatePicker http : i.stack.imgur.com Bw3w0.png Comment : same issue android 4.1 on emulator August 30th 2012 vote here code.google.com p android issues detail id 34860 https : code.google.com p android issues detail id 34860 Comment : possible duplicate of Jelly Bean DatePickerDialog --- is there a way to cancel http : stackoverflow.com questions 11444238 jelly-bean-datepickerdialog-is-there-a-way-to-cancel .. . Answer : To reiterate : This is a confirmed bug in Android . Two workarounds have already been suggested saving the state in a instance variable or asking the Dialog if it isShown . But isShown seems to be unreliable according to this answer s comments http : stackoverflow.com a 26034036 3968618 for example and saving the state gets messy if you want to re-show the dialog . A better solution is to save the state inside the Dialog itself : .. . .. . It s clean and effective .", "Question : I have made an android app minSdkVersion 19 and targetSdkVersion 19 . I have targetted it for devices having kitkat .Now i want to add Jelly Beans support to it . Right Now when i try to install my app on any jelly bean device it says : .. . .. . No active compatible AVD s or devices found . Relaunch this configuration after connecting a device or starting an AVD . .. . .. . I am not sure how to proceed . Comment : So then you need to make the app for an older version of the SDK . JellyBean is from SdkVersion 16 so you d definitely need to recompile the app for minSdkVersion 16 at the very least . .. . Answer : if you re using android-studio .. . .. . go to you re app gradle and change .. . .. . defaultConfig applicationId com.example minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName 1.0 .. . .. . and if you re using eclipse in you re manifest file change this .. . .. . uses-sdk android : minSdkVersion 16 android : targetSdkVersion 23 android : maxSdkVersion 23 Comment : Is maxSdkVersion really needed here I doubt that it s a good idea to restrict your app to a maximum SDK version in any case . Comment : no i added it as it is so that he can relate to the code Comment : i have specified minSdkVersion 16 and targetSdkVersion 19 . I have also installed Sdk Platfrom for API levels 16 to 19 . i.e 16 17 19 . But still when i try to install my app on the jelly bean device it says : - No active compatible AVD s or devices found . Relaunch this configuration after connecting a device or starting an AVD . Comment : I think i found the reason . Its happening because i need to change the android project properties and need to specify the target Api level as 16 . In eclipse i did Project Properties Android Select API level to 16 and Apply . Although its giving many errors when i build now . But those are valild errors as some xml properties i am using currently are not there in API level 16 .", "Question : My application was working perfectly on my Android 2.2 emulator . I then decided to test on an Android 4.1 emulator . The DatePickerDialog looks a little different and for some reason when I press on Done the onDateSet listener gets called twice and causes problems in my application . I know this because the log shown below in the code is printed twice whenever I click on Done .. . .. . Android 2.2 DatePicker .. . .. . Working Android 2.2 DatePicker http : i.stack.imgur.com T27Fj.png .. . .. . Android 4.1 DatePicker .. . .. . Not Working Android 4.1 DatePicker http : i.stack.imgur.com Bw3w0.png Comment : same issue android 4.1 on emulator August 30th 2012 vote here code.google.com p android issues detail id 34860 https : code.google.com p android issues detail id 34860 Comment : possible duplicate of Jelly Bean DatePickerDialog --- is there a way to cancel http : stackoverflow.com questions 11444238 jelly-bean-datepickerdialog-is-there-a-way-to-cancel .. . Answer : I think this is related I started testing on 4.1 today and have found some javascript-events seem to fire twice . Mostly click at the moment . Weirdly if i add-in an alert it sometimes fires once . The behaviour is oddly inconsistent . The javascript-events only respond in this way on android 4.1 . iPhone seems fine as do all previous versions of android i have tried so far including 4.0.x . It seems like an error with the browser or the way its handling javascript to me but thats just a guess . Comment : Are there any suggestions for how to solve this error Any workarounds : Comment : Nothing i have found so far . Also extra to the above it only seems to be on click or touch-events . not all events . when i get some time I will create a bug report on the android bug list .", "Question : My application was working perfectly on my Android 2.2 emulator . I then decided to test on an Android 4.1 emulator . The DatePickerDialog looks a little different and for some reason when I press on Done the onDateSet listener gets called twice and causes problems in my application . I know this because the log shown below in the code is printed twice whenever I click on Done .. . .. . Android 2.2 DatePicker .. . .. . Working Android 2.2 DatePicker http : i.stack.imgur.com T27Fj.png .. . .. . Android 4.1 DatePicker .. . .. . Not Working Android 4.1 DatePicker http : i.stack.imgur.com Bw3w0.png Comment : same issue android 4.1 on emulator August 30th 2012 vote here code.google.com p android issues detail id 34860 https : code.google.com p android issues detail id 34860 Comment : possible duplicate of Jelly Bean DatePickerDialog --- is there a way to cancel http : stackoverflow.com questions 11444238 jelly-bean-datepickerdialog-is-there-a-way-to-cancel .. . Answer : Try setting a boolean to check for a double fire within the same dialog . Something similar to : .. . .. . This double fire issue also happens with onTimeSet of a TimePickerDialog and this check also works for those . Comment : Yes that should work . I hope they fix this issue soon . Comment : Toggle back the fired variable to false so that the DatePicker continues to work afterwards . By the way the problem also occurs in the TimePicker dialogs . Comment : This work-around concept also works for the TimePicker dialogs by using a similar fired check upon creation . Comment : OMG - I have been going crazy trying to figure out why the code in the onDateSet from the datepicker wasn t working right and after some toastMEssages realized it was firing twice . Thank you sooo much - 11 hours trying to debug and it was that damn issue . THANK YOU Comment : This is an incomplete solution . The bug https : code.google.com p android issues detail id 34860 c21 is calling onDateSet both upon pressing the Done button and when the dialog is dismissed . The latter is additionally problematic because the date will be set when the user cancels i.e . presses back or taps outside of the dialog . The solution posted here does not resolve this problem .", "Question : so a couple of months ago I ve started developing some WiFi-Direct applications . A few days ago I updated both of my Galaxy Nexus to Jelly Bean 4.1.x and tested my applications but it seems like there s something messed up again. . It was already a pain in the ass to get the main functionality set up on ICS but now it does not work anymore . All i get is something like this in my logcat : .. . .. . The Invitation dialog pops up correctly at the second phone and sometimes random it even works but only in every fifth try or something . So the logcat tells me as I m no professional with android-intern codes that the negotiation simply fails the device gets lost for a brief moment and is then discovered again seems all kinda messed up . My invitation is sent out like this : .. . .. . I ve read a lot on wifi direct on android and it s been working fine until I updated the phones to jelly bean. . anyone knows what could be wrong If you need more code samples or any specific part of the code just tell me as I don t know what could be reliable for this . Thank you for your help . EDIT : .. . .. . Changed the WifiP2pConfig.wps.setup method to display which resulted in device 1 displaying a PIN code device 2 popping up a dialog with an input field - after entering the correct pin this is what logcat told me : .. . .. . Interesting would be : 08-31 15 : 13 : 43.491 : W wpa-supplicant 384 : p2p-p2p0-3 : Could not connect to kernel driver .. . .. . I think . Looks like a bug in Android s own wifi-direct-framework to me Comment : Seems like group formation only fails if you re in another wifi network like in your home wifi or such. . so Android fails to disable it - thus fails to connect via WiFi Direct . Comment : Did u find any solution for this Comment : I developed on two HTC One Vs which couldn t update to Jelly Bean due to ram restrictions and an HTC One X+ which has 4.1 . In my experience the One Vs worked most of the time where as the One X+ would fail more frequently . .. . Answer : Android updated Wi-Fi Direct API with Jelly Bean in API level 16 . As you already know the core API was first added along with ICS in API level 14 . Here you can find the added classes regarding Wi-Fi Direct .. . .. . Some classes here use WifiP2pManager class as parameter . You better take a look at them yourself : .. . .. . http : developer.android.com reference android net wifi p2p nsd package-summary.html .. . .. . IMO your application might be corrupted manipulated or what-so-ever after this update in API 16 . I see that you have created your own method for sending invitation to other peer altough this is not really needed . Peers get invitation automatically in Wi-Fi Direct . Thus you can leave it handle the invitation process itself . Once again I suggest you take a look at here http : developer.android.com guide topics connectivity wifip2p.html unless you did it before . Comment : Nope my application still works like a charm. . But in the new JB API it s getting better some of the errors are not showing up anymore . Especially those driver-related which were really hard to catch .", "Question : In simulator I can run my app but on device with Jelly Bean OS I get a crash . Any idea why This is the line I need character-encoding : .. . .. . byte out str.getBytes StandardCharsets.UTF 8 Comment : developer.android.com reference java nio charset https : developer.android.com reference java nio charset StandardCharsets.html It was added in API Level 19 Android 4.4 Comment : What can I use insead of StandardCharsets Comment : Fidor ist right StandardCharset doesn t exist in Jelly Bean . Comment : I would always use UTF-8 .. . Answer : StandardCharsets was added in API Level 19 https : developer.android.com reference java nio charset StandardCharsets.html . It is not available for any of the Jelly Bean versions of Android . Comment : How would you downgrade my codeline byte out str.getBytes StandardCharsets.UTF 8 Comment : @J nos : Use getBytes instead of getBytes Charset . Comment : @J nos You can also use getBytes UTF-8 .", "Question : I am adding Jelly Beans Support to my Android Kitkat application . I have mentioned minsdk version as 16 and targerSdk version as 19 . Currently I am building it against API level 19 . After build when I run it on my Jelly Bean device It crashes with error mentioned as the title of this question . I got to know that to avoid this error I need to build my native against Android toolchain generated for API level 16 since Jelly beans starts from api level 16 . I have Android NDK Version android-ndk-r10d . So I went to my NDK directory and used the following command to create a standalone toolchain for API level 16 . Above command created a directory named android-toolchain-16 in usr local . I added the the path usr lo0cal android-toolchain-16 bin to my PATH variable . Then I went on and build my native using the script I have . Then I built my app and tried . But it still crashes . Do I need to download a lower version of Android NDK Because right now I am using android-ndk-r10d . As I found from the web android-ndk-8b was released right after API level 16 . Or what else I can do I am using OS X 10.9.5 with i5 64 bit . .. . Answer : I got the answer for the problem . wait4 function comes from wait.h file which is present in my SYSROOT at two places : - SYSROOT usr include linux wait.h SYSROOT usr include sys wait.h . wait.h coming from sys folder has the definition of wait4 method .In my case it had included wait.h coming from linux folder . As soon as i change the include wait.h to include sys wait.h . It works .", "Question : I am trying to get results of the latest access-point scan . so using this method as provided in Android documentation WifiManager in Android Documentation http : developer.android.com reference android net wifi WifiManager.html getScanResults .. . .. . In other all devices and versions It works fine Just giving problem on Android Jelly Bean . It doesn t give the SSID name in the results retrieved from this method . I have read in many places that there is a problem of double quotes in the Jelly Bean and yes it is true because I have checked the currently connected wifi name and it was enclosed in so I only removed the starting and ending quotes and it give me good name . But while getting the results from WifiManger.getScanResults It is not even giving the SSID name in the retrieved result . Here is the code .. . .. . Can anyone help me in this problem Thanks in Advance . Comment : can you please show the code what you have done . Comment : updated the question . Added the code in question . @pavanmvn .. . Answer : THe Pre Android Version enclosed the SSID in quotes While post Jelly Bean doesnot http : developer.android.com reference android net wifi WifiInfo.html getSSID Comment : You Should Accept My Answer @Suman Ansari", "Question : In my Android app I enable my specific app-search to be triggered via the search key in a number of my activities using this mechanism from the manifest .. . .. . with the appropriate search activity . This all worked fine until recently . With the Jelly Bean update the Search Key now always starts Google NOW search functionality . On this site : http : www.android.com about jelly-bean I found in the Google Search section this statement : .. . .. . Has Google taken over all use of this key completely or is there a way to recover it If I can t recover it then it s UI design changes in almost all activities to add a Search menu option or action button... . .. . Answer : This has been done specifically to circumvent patent issue . This has been mostly done only in USA where apple recently got an injunction on galaxy nexus . So all Android phones in USA will show this behavior from now on . So most of the apps in jelly bean have a on screen search button . Comment : OK so to all intents and purposes : This is how it is from now on deal with it . I have added the search button on-screen in most of my Activities . Thanks .", "Question : In simulator I can run my app but on device with Jelly Bean OS I get a crash . Any idea why This is the line I need character-encoding : .. . .. . byte out str.getBytes StandardCharsets.UTF 8 Comment : developer.android.com reference java nio charset https : developer.android.com reference java nio charset StandardCharsets.html It was added in API Level 19 Android 4.4 Comment : What can I use insead of StandardCharsets Comment : Fidor ist right StandardCharset doesn t exist in Jelly Bean . Comment : I would always use UTF-8 .. . Answer : The question is : Do you want to support Jelly Bean If yes : You can instead use the String-Parameterized version of the getBytes Method . You could even split codelines to use one version over the other depended on API Version running . I do not recommend this If no : Just restrict your app to a minimum API-Version equal to or higher than 19 .", "Question : null .. . Answer : Is there any way to disable the cell antenna in android 4.2 and up I need to be able to disable it from my application . My current implementation works until 4.1 using the airplane mode but as I found out now airplane mode can t be changed without root permission in the latest jelly bean releases . Do you have any solution to this Regards Cristian Comment : Are you trying to disable cellular data If so you can try this http : stackoverflow.com questions 8970729 how-to-change-the-network-state-of-device-from-source-code-in-android . Comment : no to disconnect the phone from the network .", "Question : Jelly Bean doesn t seem to like the maxlength attribute of HTML for text input . It certainly restricts the number of input characters but the moment you attempt to type beyond the allowed number of character the text box fails . Now you won t be able to type in any other text boxes and nor will you be able to delete the already input character in that text box . If you haven t already faced this then try it yourself on a simple HTML and check . Please tell me if you have any clue for solving this . Comment : P.S . : this happens in android s webview .. . Answer : I have also experienced the same problem in my app .. . .. . for now I have handled it with js which removes all maxlength attributes from input text and textarea and stops user from inputing more than the required text . Here it is assumed that all input text and textarea have unique id . Code is also available at jsfiddle http : jsfiddle.net VpTt4 .. . .. . The bug for this issue was already opened at 35264 http : code.google.com p android issues detail id 35264 Comment : I have added rahul s suggestion in above code . Also if you want that this code should run only for Jelly bean you can put this code in below if block var ver window.navigator.appVersion ver ver.toLowerCase if ver.indexOf android 4.1 0 required code here", "Question : null .. . Answer : On a Samsung Galaxy Tab 3 7 Wifi SM-T210 Jelly Bean 4.1 I used to be able to use permanently ADB through TCP just by turning on Developer Mode activating ADB setting the property persistent.adb.tcp.port to 5555 and finally rebooting the device . Now that I updated the firmware of the device to Kikat 4.4.2 ADB does not go into TCP mode even though the procedure I do is exactly the same . Also I ve tried the same on a Samsung Galaxy Tab 4 7 Wifi SM-T230 Kitkat and the same happens . Does anyone know why this changed and how can I run ADB through TCP on Android Kitkat", "Question : Is there a way I can use the text-to-speech from the new Google Voice In Jelly Bean the pronunciation is really smooth so I was thinking may be there is some kind of API for access to that service Thanks .. . Answer : Yes it is possible to access the Google Now voice using the Android TTS APIs . You need to use KEY FEATURE NETWORK SYNTHESIS in the params parameter for the TextToSpeech.speak call . See .. . .. . http : developer.android.com reference android speech tts TextToSpeech.Engine.html KEY FEATURE NETWORK SYNTHESIS .. . .. . and .. . .. . http : developer.android.com reference android speech tts TextToSpeech.html speak java.lang.String int java.util.HashMap http : developer.android.com reference android speech tts TextToSpeech.html speak 28java.lang.String 20int 20java.util.HashMap 3Cjava.lang.String 20java.lang.String 3E 29", "Question : so a couple of months ago I ve started developing some WiFi-Direct applications . A few days ago I updated both of my Galaxy Nexus to Jelly Bean 4.1.x and tested my applications but it seems like there s something messed up again. . It was already a pain in the ass to get the main functionality set up on ICS but now it does not work anymore . All i get is something like this in my logcat : .. . .. . The Invitation dialog pops up correctly at the second phone and sometimes random it even works but only in every fifth try or something . So the logcat tells me as I m no professional with android-intern codes that the negotiation simply fails the device gets lost for a brief moment and is then discovered again seems all kinda messed up . My invitation is sent out like this : .. . .. . I ve read a lot on wifi direct on android and it s been working fine until I updated the phones to jelly bean. . anyone knows what could be wrong If you need more code samples or any specific part of the code just tell me as I don t know what could be reliable for this . Thank you for your help . EDIT : .. . .. . Changed the WifiP2pConfig.wps.setup method to display which resulted in device 1 displaying a PIN code device 2 popping up a dialog with an input field - after entering the correct pin this is what logcat told me : .. . .. . Interesting would be : 08-31 15 : 13 : 43.491 : W wpa-supplicant 384 : p2p-p2p0-3 : Could not connect to kernel driver .. . .. . I think . Looks like a bug in Android s own wifi-direct-framework to me Comment : Seems like group formation only fails if you re in another wifi network like in your home wifi or such. . so Android fails to disable it - thus fails to connect via WiFi Direct . Comment : Did u find any solution for this Comment : I developed on two HTC One Vs which couldn t update to Jelly Bean due to ram restrictions and an HTC One X+ which has 4.1 . In my experience the One Vs worked most of the time where as the One X+ would fail more frequently . .. . Answer : To mark this question as answered I ll just copy my solution to this problem : .. . .. . Seems like group formation only fails if you re in another wifi network like in your home wifi or such. . so Android fails to disable it - thus fails to connect via WiFi Direct . I had to make sure the devices were not in a wifi network .", "Question : I am trying to display video buffers on an android . I am using the media codec API released in Android 4.1 Jelly Bean . The sample goes like this : .. . .. . configure method accepts 3 other arguments apart from MediaFormat . I have been able to figure out MediaFormat somehow but I am not sure about the other 3 parameters . below . Any leads Also what should I do with the MediaCrypto argument if I am not encrypting my video buffers . Requirements : Comment : Have a look at the example provided in the answer to my question here 1 . 1 : stackoverflow.com questions 13418093 http : stackoverflow.com questions 13418093 mime-type-of-android-camera-previewformat .. . Answer : Just for completeness : .. . .. . To decode - .. . .. . MediaSurface is the surface to render the frame to or null if not rendering .. . .. . MediaCrypto should be null if the is no encryption .. . .. . flags 0 if decoding or MediaCodec.CONFIGURE FLAG ENCODE if encoding Comment : how to get crypto scheme UUID" ] }
[ "yes-answer-long", "yes-answer-short" ]
operating-system
UNK_RELATION
beanstalk-maven-plugin@maven@111
beanstalk-maven-plugin -- the maven beanstalk plugin is a wrapper for the amazon beanstalk api for usage from @placeholder projects .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
maven
UNK_RELATION
principalcontext@api@119
principalcontext -- principalcontext class is part of the microsoft .net system directory services account management @placeholder .
{ "confidence": [ 45.00558853149414, 45.00558853149414, 43.56468963623047, 42.20751190185547, 40.66775131225586, 40.507606506347656, 40.44807434082031, 40.383506774902344, 39.21860885620117, 39.21860885620117, 38.08512878417969, 37.682586669921875, 36.01786804199219, 36.01786804199219, 36.01786804199219, 35.1405143737793, 34.88439178466797, 33.99238586425781, 33.7575569152832, 33.52588653564453, 33.52588653564453, 33.47431564331055, 33.415061950683594, 33.2303352355957, 32.163970947265625, 31.932300567626953, 31.70648956298828, 31.70648956298828, 31.70648956298828, 30.57301139831543, 30.533771514892578, 30.267215728759766, 29.58570098876953, 29.567584991455078, 29.112775802612305, 29.067832946777344, 29.067832946777344, 27.934356689453125, 27.934356689453125, 27.77523422241211, 27.620920181274414, 27.24313735961914, 26.71951675415039, 26.112442016601562, 26.112442016601562, 26.10965919494629, 25.310638427734375, 24.61235809326172, 23.657033920288086, 22.903783798217773, 21.770305633544922, 21.770305633544922, 21.44082260131836, 20.967052459716797, 19.55524444580078, 19.407005310058594, 19.407005310058594, 19.197837829589844, 19.024879455566406, 18.937767028808594, 18.216751098632812, 17.139551162719727, 17.09832763671875, 16.985702514648438, 16.958881378173828, 16.876747131347656, 16.76630401611328, 16.71866798400879, 16.71866798400879, 16.385774612426758, 16.3265380859375, 16.174518585205078, 15.997430801391602, 15.869436264038086, 15.840377807617188, 15.840377807617188, 15.762604713439941, 15.676406860351562, 15.58519172668457, 15.438650131225586, 15.419025421142578, 15.39499568939209, 15.194589614868164, 15.177473068237305, 15.038976669311523, 15.027271270751953, 15.012821197509766, 15.002904891967773, 14.93646240234375, 14.629127502441406, 14.629127502441406, 14.629127502441406, 14.52210521697998, 14.28660774230957, 14.226686477661133, 14.226686477661133, 14.226686477661133, 14.226686477661133, 14.211287498474121, 13.93202018737793 ], "content": [ "PrincipalContext ctx new PrincipalContext ContextType.Domain yourdomain.com", "PrincipalContext context new PrincipalContext ContextType.Domain sDomain .", "using PrincipalContext ctx new PrincipalContext ContextType.Domain mydc.local : 389 .", "From debugging the PrincipalContext .", "My resolution was to resort to .NET 2.0 ADSI code in-place of PrincipalContext .", "I m using the PrincipalContext class above to establish a connection to the target directory and specify credentials for performing operations against the directory .", "I have a PrincipalContext that uses SSL .", "I am using PrincipalContext object for Active Directory queries .", "Is there a way to do the same thing using the PrincipalContext", "The createPrincipalContext method returns a PrincipalContext with ContextType.Machine and the machine name .", "In that case you may not be able to user PrincipalContext .", "When I trace the PrincipalContext ctx into the class it appears to disconnect from the DomainController .", "I found the old LogonUser API and the new PrincipalContext object .", "If you need to authenticate a user and validate credentials you can use PrincipalContext .", "Question : How can I add multiple Organizational Units in PrincipalContext .", "In principal it works fine however is the first connect to the AD-LDS via the PrincipalContext-class extremely slow 30 seconds+ .", "When you re creating a new instance of PrincipalContext you re not specifying username and password .", "I am using this code from a .NET Forms application to try and create a PrincipalContext object .", "I wrote a program that reads the UserPrincipal of an User in our Active Directory via PrincipalContext .", "I am trying to connect to an LDAP server in C using PrincipalContext .", "I needed to specify the name of my domain controller when declaring the PrincipalContext .", "If i do not pass in a UserName Password the PrincipalContext constructor will use the credentials of the account running the application-pool hosting the asp.net application in IIS to connect to Active Directory .", "I am trying to use PrincipalContext to check if a local user group exists on a remote computer .", "I am just curious as to why you need an external .dll to do basic PrincipalContext in .NET. . is there something I am missing here. .", "As seen in the code snippet above i m establishing a connection to Active Directory in a Domain by providing a UserName Password in the PrincipalContext constructor .", "If you use a PrincipalContext with just .. . .. . it will run using the credentials of the thread that calls it .", "So please tell me how can I use PrincipalContext to connect to openldap", "For that I am connecting the machine using PrincipalContext method then get the specified user and finally change the password .", "I am searching for a solution for the issue I am having with SSL LDAP authentication using PrincipalContext .", "I have attempted to do so by using roughly 6 variations of my call to PrincipalContext .", "I am using PrincipalContext from the System.DirectoryServices.AccountManagement namespace for authentication in my application against Active Directory I am using the ValidateCredentials function .", "I have installed an openldap for windows-server and I use LDAPAdmin to connect to it by its default values : .. . .. . Now I want to use PrincipalContext to add users to my ou People The problem is I can t even connect to the server using PrincipalContext .", "I have searched the Net and found a lot of answers on how to connect to a ldap server but none of them are working for me.I keep getting a NullReferenceException or ServerNotFoundException for different combination of provided parameters for PrincipalContext constructor .", "A colleague create a compact C class that wraps the PrincipalContext actually took the code from another working application and streamlined it a bit see below .", "If i use the code above to query Active Directory and the UserName account passed in the PrincipalContext constructor is in a domain that has no trust with the target domain domain to be queried i get the below error .", "I d really like to use the PrincipalContext because it s easy and smart but I know that usign LogonUser you can get a token to use for Impersonating user", "The method I created to do the work is this : .. . .. . it looks for a given user in a given group using an existing PrincipalContext and if it finds it removes from group and deletes .", "I also know that i could do it like this : .. . .. . But i want to work arount PrincipalContext because i need to Use this remotely on a PC wich is in no Domain .", "I have dig into the source code of PrincipalContext it used DirectoryEntry which used unsafe native method System.DirectoryServices.Interop.UnsafeNativeMethods.ADsOpenObject to open LDAP connection .", "Try PrincipalContext ctx new PrincipalContext ContextType.Domain yourdomain.com CN users CN mydomain CN workgroup ContextOptions.SecureSocketLayer ContextOptions.Negotiate userName password Since you already have admin privileges just try to bind simply by providing the name of the domain .", "Would i be correct to assume that if the PrincipalContext construct was changed to .. . .. . the code would execute successfully as long as the client is in the target domain", "at System.DirectoryServices.DirectoryEntry.Bind Boolean throwIfFail at System.DirectoryServices.DirectoryEntry.Bind .. . at System.DirectoryServices.DirectoryEntry.get AdsObject at System.DirectoryServices.PropertyValueCollection.PopulateList .. . at System.DirectoryServices.PropertyValueCollection..ctor DirectoryEntry entry String propertyName .. . at System.DirectoryServices.PropertyCollection.get Item String propertyName .. . at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer .. . at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit .. . at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize .. . at System.DirectoryServices.AccountManagement.PrincipalContext.get QueryCtx .. . at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper PrincipalContext context Type principalType Nullable 1 identityType String identityValue DateTime refDate .. . at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType PrincipalContext context Type principalType IdentityType identityType String identityValue at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity PrincipalContext context IdentityType identityType String identityValue at ChangeControl.HelpersSystem.GetEmail String uId in C : Work Simon ChangeControl ChangeControl HelperClasses HelpersSystem.vb : line 24 .. . .. . I have had a look around and this is the closest thing that match s what I am trying to do .. . .. . Previous similar BUT NOT THE SAME issue .", "So here s the error message that always appears I know it is executing the C CLR code OK as I had other attribute validation issues within the class-library CLR to deal with and it finally got to the point of making the call to PrincipalContext and fails there : .. . .. . I read some stuff about Windows Identity impersonation but I can t understand why that is needed if I can t even get AD to run the PrincipalContext call when all the services involved are running as domain admin privs .", "I thought I could use PrincipalContext as one of the follows : .. . .. . or .. . .. . but none of them are working.Some say that I should provide username and password so I did that but I keep getting exception .", "If you look at the documentation for the PrincipalContext constructors it should be quite clear : .. . .. . or .. . .. . So you basically need : .. . .. . your context type here : ContextType.Domain .. . the domain-name try just the Netbios name e.g .", "at System.DirectoryServices.DirectoryEntry.Bind Boolean throwIfFail at System.DirectoryServices.DirectoryEntry.Bind at System.DirectoryServices.DirectoryEntry.get SchemaEntry at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer DirectoryEntry de at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor DirectoryEntry ctxBase Boolean ownCtxBase String username String password ContextOptions options at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry DirectoryEntry entry at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit --- End of inner-exception stack-trace --- at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize at System.DirectoryServices.AccountManagement.PrincipalContext.get QueryCtx at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper PrincipalContext context Type principalType Nullable 1 identityType String identityValue DateTime refDate at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType PrincipalContext context Type principalType String identityValue at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity PrincipalContext context String identityValue .. . .. . My method : .. . .. . But this is working fine : .. . .. . How come I cant work with UserPrincipal using the Context with SSL", "I ve read 50 web pages looking for an answer to this error we ve temporarily made the user that SQLserver runs as a Domain Admin dev system--terrible practice I m sure called it from a logged in SQL user with domain admin rights given the domain service account that the code is able to pass in for explicit .NET AD connection domain admin taken the user and password options off the call to PrincipalContext to see if SQLServer s user or the calling user s privs would control it tried different combinations of the Options on the PrincipalContext constructor call etc .", "I am having problems with PrincipalContext : .. . .. . It works in such scenarios : .. . .. . local to local machine .. . local to virtual-machine .. . domain machine to workgroup machine .. . .. . However it doesn t work in opposite direction : .. . .. . virtual-machine to local host .. . workgroup machine to domain machine .. . .. . I am getting these errors : .. . .. . Unhandled Exception : System.IO.FileNotFoundException : The network path was not found .", "Assuming some one deploys a service say in IIS that service is running under the context of account X and this account X has access to the domain i want to query would it be possible to call that service in the PrincipalContext constructor such that i use the credentials under which the service is running under to connect to AD that i want to query .", "I looked at this question http : stackoverflow.com questions 15622304 error-when-using-principalcontext-validatecredentials-to-authenticate-against-a and saw that people were saying that if PrincipalContext.ValidateCredentials was under too heavy of a load then it could start throwing exceptions and I noticed elsewhere people were saying it was always returning false .", "This is after several of my corrections checks and info from google and stackoverflow : .. . .. . Here is where I m getting the UserPrincipal so that I have some user info about the groups and things like that : .. . .. . When I look through the log paths it seems that this problem is comming not from the PrincipalContext but from the UserPrincipal .", "Does any one know how i can also specify the connection time out in the PrincipalContext Constructor i m running into connection time out issues i was wondering if i can control after how long the connection can time out .", "http : stackoverflow.com questions 8716347 c-sharp-active-directory-principalcontext-userprincipal-ismemberof-error and this too Very similar same solution as what I have but not working for me http : stackoverflow.com questions 14162099 userprincipal-findbyidentity-throws-exception-there-is-no-such-object-on-the-s .. . .. . What I would like help with is what other variables if any do I need to provide as I have tried with a user name and password too and this didn t work either and gave this same error message .", "I have some C code using System.DirectoryServices.AccountManagement that is used to allow a user to change their Active Directory user account password .", "We were able to turn on CLR set the DB to TRUSTWORTHLY and so on then do the CREATE ASSEMBLY s for his code and the resources it needs with UNSAFE option since the code is not part of Microsoft s subset of .NET classes vetted to run within SQLServer : .. . .. . All the creates and subsequent ALTERs run fine we ALTER the last one whenever we change the custom class-library XXXXXXX CLR which i ve obscured here.. . the CLR stored procedure creates fine and executes OK up until it tries to SAVE the user through the PrincipalContext object .", "I am working on synchronization between internal .NET application between active-directory for all users and groups .", "I am getting all users and groups from Active Directory and save these data in .NET application database .", "As the official documentation on MSDN https : msdn.microsoft.com en-us library system.directoryservices.accountmanagement 28v vs.110 29.aspx states : .. . .. . The System.DirectoryServices.AccountManagement namespace provides uniform access and manipulation of user computer and group security principals across the multiple principal stores : Active Directory Domain Services AD DS Active Directory Lightweight Directory Services AD LDS and Machine SAM MSAM .", "Are you sure the user is part of the TestGroup and not part of a group that is part of the TestGroup", "Recently I ve been implementing custom ExtendedUserPrincipal class similar to sample here http : blogs.msdn.com b kaevans archive 2012 04 11 querying-active-directory-using-principal-extensions-in-system-directoryservices-accountmanagement.aspx .", "I use the System.Management package for a Management-scope .", "Exception while using DirectoryEntry object on windows-7 http : stackoverflow.com questions 13955880 system-io-filenotfoundexception-the-network-path-was-not-found-exception-while .. . and here : .. . http : www.peppercrew.nl index.php 2011 09 connect-to-remote-registry-fails-with-an-error-is-preventing-this-key-from-being-opened .. . .. . Enable File and Print sharing in the Firewall .. . Start the Remote Registry Service .. . Add remote user access to this registry entry : HKEY LOCAL MACHINE SYSTEM CurrentControlSet Control SecurePipeServers winreg .. . .. . However I can t change services and registry settings on production servers .", "System.DirectoryServices.AccountManagement manages directory objects independent of the System.DirectoryServices namespace . .. . .. . Those classes are useful for Active Directory only - they are not portable to other generic LDAP stores .", "sorry for late comments.yes the user is part of that group .", "System.IO.FileNotFoundException : The system cannot find the file specified .", "This all runs succesfully but after the AD admin tries to check the results he reports that he found the User and by opening the entry he gets the error : .. . .. . The Active Directory Domain Services object could not be displayed .. . .. . Any ideas please", "I am writing a permissions system for my WPF application that needs to work with both Active Directory and local machine accounts the system may or may not be connected to a network .", "I want to be able to add or remove users from my Active Directory .", "My computer is already joined to an Active Directory domain controller .", "I think this gets updated more often than just changes to the account .", "The only part of the code that is from the production code that was failing is the AreCredentialsValid call .", "Is there a single piece of information that I can store that can refer to either an AD account or a local account", "I ve spend the last few days searching the net for what may have caused the issue .", "Assuming a .net framework version of 3.5 or higher : wouldn t user.Context suffice", "It do not have SID or SAM account name .", "I checked in debug and the name of the account is UserA .", "Scenario : Active Directory username search should return results against a search item i.e .", "I m trying to follow the tutorial here http : ricardodsanchez.com 2013 05 24 how-to-use-active-directory-groups-to-restrict-access-to-controller-actions-in-asp-net-mvc-and-make-your-application-even-more-secure on setting up Active Directory and using security groups .", "I am asking for something like a LastModifedDate property for an Active Directory object .", "Ok finally it seems that I ve found it : .. . .. . The problem comes from the circumstance that my dev computer was not part of a domain .", "This code produced no errors and never returns false on the same system that was returning those false negatives .", "I have been trying to extend the s.ds.am.UserPrincipal class in VS 2010 VB app as I require access to AD User properties that are not by default a part of the UserPrincipal .", "I believe it is because the dll is not found after the update at C : Program Files x86 Reference Assemblies Microsoft Framework .NETFramework v4.5.1 System.DirectoryServices.Acc ountManagement.dll - not sure what to do with that clue though. .", "You may want to create an App Pool for this site and have it run as a user that has access to make the Active Directory calls you re doing .", "But i m wondering if its possible to create some kind of service running under an account that has access to the domain being queried and then use that services hosting account information username password to connect to AD instead of passing the username and passowrd directly as above .", "You might need to enable delegation for the account being used .", "Lets assume the password-hash is created using this class https : msdn.microsoft.com en-us library system.security.cryptography.rngcryptoserviceprovider.aspx .. . .. . Or if the above is not possible is it possible to at-least get the password-hash of a given account such that i can compare the password-hash returned from AD with the hash supplied to check if they match", "I have used following c code to validate my local account : .. . .. . But it is giving exception as : .. . .. . Logon failure : the user has not been granted the requested logon type at this computer .", "I need to create a contact in Active Directory .", "I need to find users in Active Directory and if I could not find them create them .", "More on what @DakotahHicock was saying.. . Are you asking for something like a LastModifedDate property for an Active Directory object", "I have an application which has certain functionality secured by performing an Active Directory lookup via DirectoryServices .", "It seems to me that it first tries to connect to some non existing host or directory and then after a timeout the 30 seconds connects to my AD-LDS and does what it is supposed to do .", "The user is part of the TestGroup group even i am getting the retval false @line retVal user.IsMemberOf groupPrincipal and in event-viewer it is showing msg as The user name or password is incorrect .", "I trying to search my organization Active directory for users .", "I can connect successfully via Apache Directory Studio and Pentaho .", "I am using LdapAuthentication to log a user into Active Directory .", "I tested the same scenario with a different active-directory and it worked in all scenarios .", "You could create a poco class to hold the name and display name instead .. . .. . For limiting the properties of the response look at this question http : stackoverflow.com q 7628977 1841212", "contact is not a security principal no SID SAM account name it also don t have many of the attributes supported by user also e.g ." ] }
{ "confidence": [ 56.277286529541016, 51.84953308105469, 51.61026382446289, 51.54316329956055, 46.871543884277344, 46.08693313598633, 45.790069580078125, 44.941978454589844, 43.91289520263672, 43.13023376464844, 43.0528564453125, 41.930946350097656, 41.782840728759766, 40.2781867980957, 38.670204162597656, 37.42063522338867, 36.27568054199219, 35.803951263427734, 34.4744873046875, 34.42930221557617 ], "content": [ "Question : I have installed an openldap for windows-server and I use LDAPAdmin to connect to it by its default values : .. . .. . Now I want to use PrincipalContext to add users to my ou People The problem is I can t even connect to the server using PrincipalContext . I have searched the Net and found a lot of answers on how to connect to a ldap server but none of them are working for me.I keep getting a NullReferenceException or ServerNotFoundException for different combination of provided parameters for PrincipalContext constructor . I thought I could use PrincipalContext as one of the follows : .. . .. . or .. . .. . but none of them are working.Some say that I should provide username and password so I did that but I keep getting exception . So please tell me how can I use PrincipalContext to connect to openldap P.S . My computer is already joined to an Active Directory domain controller . .. . Answer : As the official documentation on MSDN https : msdn.microsoft.com en-us library system.directoryservices.accountmanagement 28v vs.110 29.aspx states : .. . .. . The System.DirectoryServices.AccountManagement namespace provides uniform access and manipulation of user computer and group security principals across the multiple principal stores : Active Directory Domain Services AD DS Active Directory Lightweight Directory Services AD LDS and Machine SAM MSAM . System.DirectoryServices.AccountManagement manages directory objects independent of the System.DirectoryServices namespace . .. . .. . Those classes are useful for Active Directory only - they are not portable to other generic LDAP stores . If you need to support OpenLDAP either use DirectoryEntry and those functions or use the lower level System.DirectoryServices.Protocol bare-bones LDAP layer . Comment : OH I didn t know that .Thanks a lot :", "Question : I m using the PrincipalContext class above to establish a connection to the target directory and specify credentials for performing operations against the directory . Does any one know how i can also specify the connection time out in the PrincipalContext Constructor i m running into connection time out issues i was wondering if i can control after how long the connection can time out . .. . Answer : Well I guess the answer is no unfortunately . I have dig into the source code of PrincipalContext it used DirectoryEntry which used unsafe native method System.DirectoryServices.Interop.UnsafeNativeMethods.ADsOpenObject to open LDAP connection . As per this blog : http : blogs.msdn.com b dsadsi archive 2012 06 06 how-to-specify-timeout-for-ldap-bind-in-net.aspx there is no way to configure the timeout on ADsOpenObject . However it also mentioned that if using LdapConnection directly then it is possible to set the timeout . In that case you may not be able to user PrincipalContext .", "Question : null .. . Answer : I m trying to add my first CLR routine to SQLServer 2008 will upgrade to 2014 soon . The goal is to add a user object to Active Directory passing in a dozen or so attribute values to create the user based on data coming from an interface to an ERP the interface works fine the data is good . A colleague create a compact C class that wraps the PrincipalContext actually took the code from another working application and streamlined it a bit see below . We were able to turn on CLR set the DB to TRUSTWORTHLY and so on then do the CREATE ASSEMBLY s for his code and the resources it needs with UNSAFE option since the code is not part of Microsoft s subset of .NET classes vetted to run within SQLServer : .. . .. . All the creates and subsequent ALTERs run fine we ALTER the last one whenever we change the custom class-library XXXXXXX CLR which i ve obscured here.. . the CLR stored procedure creates fine and executes OK up until it tries to SAVE the user through the PrincipalContext object . Code and error message we are getting follow . I ve read 50 web pages looking for an answer to this error we ve temporarily made the user that SQLserver runs as a Domain Admin dev system--terrible practice I m sure called it from a logged in SQL user with domain admin rights given the domain service account that the code is able to pass in for explicit .NET AD connection domain admin taken the user and password options off the call to PrincipalContext to see if SQLServer s user or the calling user s privs would control it tried different combinations of the Options on the PrincipalContext constructor call etc . ... . etc . for remaining attributes....we ve done this using FIM and other C middleware libary calls for years ignore the details...we definitely have the correct AD attributes covered with the params we are passing in but I don t want to expose all that here . So here s the error message that always appears I know it is executing the C CLR code OK as I had other attribute validation issues within the class-library CLR to deal with and it finally got to the point of making the call to PrincipalContext and fails there : .. . .. . I read some stuff about Windows Identity impersonation but I can t understand why that is needed if I can t even get AD to run the PrincipalContext call when all the services involved are running as domain admin privs . I know I can t use that approach for real security non-starter but would like to know why it doesn t work and what alternative to try here so I can arrive at a solution that would fly for a production implementation . I did bounce SQLServer after putting the service account it is running under in the domain admins group BTW . Many thanks for your kind review of this long-winded problem . Comment : That code does run if you add it to a simple console program The callstack mentions a CreateUser method . I don t see that directly in the code snippet you have . Where is principal.Save called Comment : It sounds like you covered the bases and then some . By default the security context for SQLCLR is the Log On As account of the SQL Server NT service each instance has its own service so be sure you are setting the Login for the correct instance . If you aren t using Impersonation then this is the only account to configure for security and whatever login calls the stored proc is irrelevant . If you enable Impersonation then the Windows Login not SQL login running the proc is the only security context you need to worry about . You might need to enable delegation for the account being used . Comment : Also have you checked the Windows Event Log There is often additional info in there that could help . And is AD set up with a policy that disallows certain account-oriented actions from certain machines or only allows from certain machines A great test would be if you could create a console app of this code put it on this SQL Server machine and run it from xp-cmdshell which is also running in the security context of the Log On As account of the SQL Server NT service . Comment : rene there s an invocation like p.save down below the code I included after another dozen or so attributes are set . CreateUser starts dozens of lines above the part I showed where it goes to actually create the AD user object I think it boils down to an access-control security problem . srutzky thanks for the great suggestions we ll run those down Monday morning .", "Question : As seen in the code snippet above i m establishing a connection to Active Directory in a Domain by providing a UserName Password in the PrincipalContext constructor . After the connection is made i query the connected Active Directory for FirstName and LastName . If i do not pass in a UserName Password the PrincipalContext constructor will use the credentials of the account running the application-pool hosting the asp.net application in IIS to connect to Active Directory . But i m wondering if its possible to create some kind of service running under an account that has access to the domain being queried and then use that services hosting account information username password to connect to AD instead of passing the username and passowrd directly as above . Assuming some one deploys a service say in IIS that service is running under the context of account X and this account X has access to the domain i want to query would it be possible to call that service in the PrincipalContext constructor such that i use the credentials under which the service is running under to connect to AD that i want to query . My intention here would be not to provide the UserName Password but also avoid using the credentials that the application-pool hosting the ASP.NET application is running under . I want to establish a connection to AD using the security context of an external service . .. . Answer : If you use a PrincipalContext with just .. . .. . it will run using the credentials of the thread that calls it . See this MSDN link https : msdn.microsoft.com en-us library bb298328 28v vs.110 29.aspx for more info .", "Question : null .. . Answer : The method I created to do the work is this : .. . .. . it looks for a given user in a given group using an existing PrincipalContext and if it finds it removes from group and deletes . This all runs succesfully but after the AD admin tries to check the results he reports that he found the User and by opening the entry he gets the error : .. . .. . The Active Directory Domain Services object could not be displayed .. . .. . Any ideas please", "Question : I need to logon a user on my application verifying his credentials . I found the old LogonUser API and the new PrincipalContext object . I d really like to use the PrincipalContext because it s easy and smart but I know that usign LogonUser you can get a token to use for Impersonating user What exactly is impersonation Is there a way to do the same thing using the PrincipalContext Thank you .. . Answer : You would typically use impersonation if you need to execute your application as a different user usually with more specific access than the one is currently logged in . The term Impersonation in a programming context refers to a technique that executes the code under another user context than the user who originally started an application i.e . the user context is temporarily changed once or multiple times during the execution of an application . If you need to authenticate a user and validate credentials you can use PrincipalContext .", "Question : I am using this code from a .NET Forms application to try and create a PrincipalContext object . I also tried this with but got the same error . I have also tried ADAdmin@mydomain.workgroup as the user id . I am getting this error .. . .. . I am logged in as a user with DomainAdmin privileges in AD . The computer I am running this from has DomainAdmin privileges in AD . This http : stackoverflow.com questions 21529386 error-an-operations-error-occurred-in-system-directoryservices-accountmanagem link has a solution but it is for IIS and it didn t work for me . This http : forums.asp.net t 1970631.aspx Error 20An 20operations 20error 20occurred 20when 20using 20FindByIdentity solution didn t work either . Comment : Try PrincipalContext ctx new PrincipalContext ContextType.Domain yourdomain.com CN users CN mydomain CN workgroup ContextOptions.SecureSocketLayer ContextOptions.Negotiate userName password Since you already have admin privileges just try to bind simply by providing the name of the domain . PrincipalContext ctx new PrincipalContext ContextType.Domain yourdomain.com Comment : I used SecureSocketLayer and got this error The ContextOptions passed are invalid for this store type . Either Negotiate or SimpleBind must be specified and they cannot be combined . Comment : It looks like you don t have SSL installed . Try SimpleBind . Comment : @Burzum the second suggestion in your first comment worked I just used the domain and it worked . Comment : Please open a new question and provide some details on your IIS . .. . Answer : Since you have mentioned that the user has already admin privileges you only need to specify ContextType and your Domain .", "Question : I have a PrincipalContext that uses SSL . This works fine when using a method like Context.ValidateCredentials . But when I need to find a user using UserPrincipal.FindByIdentity I get the following error : .. . .. . System.Runtime.InteropServices.COMException : The server is unwilling to process the request . at System.DirectoryServices.DirectoryEntry.Bind Boolean throwIfFail at System.DirectoryServices.DirectoryEntry.Bind at System.DirectoryServices.DirectoryEntry.get SchemaEntry at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer DirectoryEntry de at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor DirectoryEntry ctxBase Boolean ownCtxBase String username String password ContextOptions options at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry DirectoryEntry entry at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit --- End of inner-exception stack-trace --- at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInit at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize at System.DirectoryServices.AccountManagement.PrincipalContext.get QueryCtx at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper PrincipalContext context Type principalType Nullable 1 identityType String identityValue DateTime refDate at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType PrincipalContext context Type principalType String identityValue at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity PrincipalContext context String identityValue .. . .. . My method : .. . .. . But this is working fine : .. . .. . How come I cant work with UserPrincipal using the Context with SSL If I remove SSL it works fine. . .. . Answer : I changed my ContextOptions to Negotiate and SSL . Then it worked", "Question : If i use the code above to query Active Directory and the UserName account passed in the PrincipalContext constructor is in a domain that has no trust with the target domain domain to be queried i get the below error . System.DirectoryServices.AccountManagement.PrincipalServerDownException : The server could not be contacted . --- System.DirectoryServices.Protocols.LdapException : The LDAP server is unavailable . Would i be correct to assume that if the PrincipalContext construct was changed to .. . .. . the code would execute successfully as long as the client is in the target domain Lets assume the first code with UserName and Password was called by a client in domain A trying to search for user info in domain B here establishing context failed because the account used is in domain A that has no trust with domain B . .. . .. . am i correct to assume that if i change the ContextType to Machine and the client calling the code is in domain B the code would execute succefully .. . Answer : No that would not be a correct assumption . ContextType.Machine means that you want to work with local accounts . Your PrincipalSearcher will end up searching the local SAM database rather than Active Directory", "Question : I am trying to use PrincipalContext to check if a local user group exists on a remote computer . I am having problems with PrincipalContext : .. . .. . It works in such scenarios : .. . .. . local to local machine .. . local to virtual-machine .. . domain machine to workgroup machine .. . .. . However it doesn t work in opposite direction : .. . .. . virtual-machine to local host .. . workgroup machine to domain machine .. . .. . I am getting these errors : .. . .. . Unhandled Exception : System.IO.FileNotFoundException : The network path was not found . .. . Unhandled Exception : System.Runtime.InteropServices.COMException : The network path was not found . The first exception is for virtual-machine second for workgroup machine . All machines have user with the same name and password and the code was executed from that user . How to solve this issue .. . Answer : I found the answer . It looks that DirectoryServices doesn t work on remote Windows 7 or newer . I guess when a computer is in a workgroup then it is local and we can connect and when it is in a domain then it is remote . I followed steps described here : .. . System.IO.FileNotFoundException : The network path was not found . Exception while using DirectoryEntry object on windows-7 http : stackoverflow.com questions 13955880 system-io-filenotfoundexception-the-network-path-was-not-found-exception-while .. . and here : .. . http : www.peppercrew.nl index.php 2011 09 connect-to-remote-registry-fails-with-an-error-is-preventing-this-key-from-being-opened .. . .. . Enable File and Print sharing in the Firewall .. . Start the Remote Registry Service .. . Add remote user access to this registry entry : HKEY LOCAL MACHINE SYSTEM CurrentControlSet Control SecurePipeServers winreg .. . .. . However I can t change services and registry settings on production servers . I found such way to get group :", "Question : I am working with an ASP.Net using VB.Net application . Testing and working locally this code block executes perfectly fine . However since promoting it up to our development web server for initial testing however instead of getting the users email-address from AD I am getting this error message . at System.DirectoryServices.DirectoryEntry.Bind Boolean throwIfFail at System.DirectoryServices.DirectoryEntry.Bind .. . at System.DirectoryServices.DirectoryEntry.get AdsObject at System.DirectoryServices.PropertyValueCollection.PopulateList .. . at System.DirectoryServices.PropertyValueCollection..ctor DirectoryEntry entry String propertyName .. . at System.DirectoryServices.PropertyCollection.get Item String propertyName .. . at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer .. . at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit .. . at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize .. . at System.DirectoryServices.AccountManagement.PrincipalContext.get QueryCtx .. . at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper PrincipalContext context Type principalType Nullable 1 identityType String identityValue DateTime refDate .. . at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType PrincipalContext context Type principalType IdentityType identityType String identityValue at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity PrincipalContext context IdentityType identityType String identityValue at ChangeControl.HelpersSystem.GetEmail String uId in C : Work Simon ChangeControl ChangeControl HelperClasses HelpersSystem.vb : line 24 .. . .. . I have had a look around and this is the closest thing that match s what I am trying to do .. . .. . Previous similar BUT NOT THE SAME issue . http : stackoverflow.com questions 8716347 c-sharp-active-directory-principalcontext-userprincipal-ismemberof-error and this too Very similar same solution as what I have but not working for me http : stackoverflow.com questions 14162099 userprincipal-findbyidentity-throws-exception-there-is-no-such-object-on-the-s .. . .. . What I would like help with is what other variables if any do I need to provide as I have tried with a user name and password too and this didn t work either and gave this same error message . I have also tried without the IdentityType too and still get the same issue . Any and all help very much appreciated . Comment : What s the exception that is thrown Comment : @Kirk this is the exception type System.DirectoryServices.DirectoryServicesCOMException .. . Answer : This sounds like a permission issue . Check the App Pool that the web site is running under and make sure it has the access needed . You may want to create an App Pool for this site and have it run as a user that has access to make the Active Directory calls you re doing . On your local computer it probably has heightened access that it needs and works . By default the App Pools don t have access to much of anything . Comment : I will put a request in to my domain admin guys and get the access opened . might take a few days but will let you know", "Question : null .. . Answer : I have an application which has certain functionality secured by performing an Active Directory lookup via DirectoryServices . I am in the midst of migrating this code from a web host in our old domain to a new domain . The code worked flawlessly on the old domain . However errors occur when testing it against the new domain . We have a full trust between domains as our goal is to migrate off of the old domain . The new domain employs the use of read only domain controllers within the domain but restricted from the internal network via firewall rules . Only perimeter DMZ servers in the domain can reach the read only domain controllers . Here is the problematic line of code : .. . .. . When testing against the new domain I am receiving this : .. . .. . COMException 0x8007203a : The server is not operational . and this : .. . .. . ActiveDirectoryServerDownException : The server is not operational . Along with the FQDN of the read only domain controller . Since I am specifying the name of the DC then shouldn t my request go to that DC Could this be a DNS routing issue in our LDAP SRV records I have view only access to DNS and I discovered that the read only DC is referenced in the internal site where the web host resides . Also those SRV records do not have a priority set . They are all 0 . The sys admins insist that there must be a programmatic method for pointing to the primary DC . I have attempted to do so by using roughly 6 variations of my call to PrincipalContext . I would prefer to stick with the modern API and not resort to writing LDAP strings . On the sys admin side of things what can be researched or inspected On the programmatic side of things am I directing my request properly Is there an alternative method or surefire way of avoiding the DC Perhaps it is up to DNS but at this point I am uncertain . Troubleshooting : When I run netstat from the command-line on the web host during an LDAP request I see where an ldap connection is requested to our two writeable DC s . Afterwards a request is also sent to the read only DC and the error is thrown . Comment : When you re creating a new instance of PrincipalContext you re not specifying username and password . Does the logged in user has enough access If yes just try simply binding to domian . using PrincipalContext ctx new PrincipalContext ContextType.Domain mydc.local : 389 . I also see that you re using a default port 389 which is not secure.If you re planning on any types of authentication you need to get your sys admin to install SSL certificate . I highly encourage . It will save you a lot of time . And last thing to try is changing the ContextOptions to SimpleBind . Comment : Thanks for the input . I tried all of that to no avail . After spending a week on this problem I moved on . My resolution was to resort to .NET 2.0 ADSI code in-place of PrincipalContext . That code worked without error .", "Question : null .. . Answer : I ve got an application that needs to be able to use the windows-authentication for either the local machine or a domain . Previously I was using PrincipalContext.ValidateCredentials http : msdn.microsoft.com en-us library bb154889 v vs.110 .aspx and it was working fine at first then it started randomly returning false for correct credentials . I looked at this question http : stackoverflow.com questions 15622304 error-when-using-principalcontext-validatecredentials-to-authenticate-against-a and saw that people were saying that if PrincipalContext.ValidateCredentials was under too heavy of a load then it could start throwing exceptions and I noticed elsewhere people were saying it was always returning false . The question I linked suggested using LogonUser instead from the advapi32.dll library . That s fine the only issue is that I d like to be able to reliably break the PrincipalContext.ValidateCredentials call before saying another method will work . This code produced no errors and never returns false on the same system that was returning those false negatives . I d like to break it so I can make sure that the LogonUser call isn t going to have the same issue . Comment : I am just curious as to why you need an external .dll to do basic PrincipalContext in .NET. . is there something I am missing here. . Comment : @DJKRAZE the external is for when I switch it over to use the LogonUser call . I missed that when cleaning the code to post it . Comment : you can do that without the external using and or writing some small AD code but I will look at your code more in detail to see if I see any additional issues or possible causes. . Comment : also wonder why you are using a Dictionary instead of a List to store this Dictionary objects if I am not mistaken will fail if you have duplicate keys I would recommend an array Comment : @DJKRAZE This is just a test program who s one job is to try to break the PrincipalContext.ValidateCredentials . The only part of the code that is from the production code that was failing is the AreCredentialsValid call . Everything else is just setting up tests for the AreCredentialsValid .", "Question : null .. . Answer : I am trying to connect to an LDAP server in C using PrincipalContext . I ve validated the network parameters and authentication settings are all correct using Apache Directory Studio . This is the code I m using : .. . .. . I must connect using SSL and my credentials are SSO . I ve tried with and without specifying the sDefaultOU as the container parameter . The error it throws at the last line is : .. . .. . System.NullReferenceException : Object reference not set to an instance of an object . at System.DirectoryServices.AccountManagement.PrincipalContext.ReadServerConfig String serverName ServerProperties properties at System.DirectoryServices.AccountManagement.PrincipalContext.DoServerVerifyAndPropRetrieval at System.DirectoryServices.AccountManagement.PrincipalContext..ctor ContextType contextType String name String container ContextOptions options String userName String password Comment : Do you have SSL installed Does your user has enough rights Try simply binding without specifying username and password . PrincipalContext context new PrincipalContext ContextType.Domain sDomain . Comment : How would I know if I have SSL installed I can connect successfully via Apache Directory Studio and Pentaho . Comment : Here s what I get when I try binding without user pw : System.DirectoryServices.Protocols.DirectoryOperationException : The server is unavailable . at System.DirectoryServices.Protocols.LdapConnection.ConstructResponse Int32 messageId LdapOperation operation ResultAll resultType TimeSpan requestTimeOut Boolean exceptionOnTimeOut at System.DirectoryServices.Protocols.LdapConnection.SendRequest DirectoryRequest request TimeSpan requestTimeout at System.DirectoryServices.Protocols.LdapConnection.SendRequest DirectoryRequest request Comment : Ask you sys admin if SSL installed . But to check it yourself set your ContextOptions just to ContextOptions.SecureSocketLayer . If you don t have it s going to throw a message . Unless you changed it the default port is 636 . You re connecting to 1234 Is that intentionally Comment : Setting ContextOptions just to ContextOptions.SecureSocketLayer throw this error : System.ArgumentException : The ContextOptions passed are invalid for this store type . Either Negotiate or SimpleBind must be specified and they cannot be combined . at System.DirectoryServices.AccountManagement.PrincipalContext..ctor ContextType contextType String name String container ContextOptions options String userName String password at System.DirectoryServices.AccountManagement.PrincipalContext..ctor ContextType contextType String name String container ContextOptions options", "Question : I am working on synchronization between internal .NET application between active-directory for all users and groups . I am getting all users and groups from Active Directory and save these data in .NET application database . I am using PrincipalContext object for Active Directory queries . I want to determine if changing user or group to provide high performance . Is there any way that for example LastModifiedDate property for GroupPrincipal or UserPrincipal objects . Comment : Just to clarify you are asking if there is some way to only get the information that changed Ex : If the only change since the last update was John Smith was added to Administrators then your pull will only have that change or are you asking for a fast way to search through for changes Comment : More on what @DakotahHicock was saying.. . Are you asking for something like a LastModifedDate property for an Active Directory object So if I modified the user bloggs joe today by adding him to the Administrators group then the LastModifiedDate would update to today This would be so that you did not have to scan for changes Comment : I am asking for something like a LastModifedDate property for an Active Directory object . If user is updated i determine to update user or group in database . .. . Answer : I believe the User Attritbute you re looking for is called : Comment : I think this gets updated more often than just changes to the account . I m looking at ours and all accounts show updated in the last week but I know for a fact that 99 had no changes Comment : It is probably picking up changes to object permissions . If OP is looking for a more granular solution that inspects specific types of changes a more detailed solution will be required . Comment : It appears to me that that is what OP is going to need to do . WhenChanged is about as close as you re going to get but you will get so many false positives it makes it effectively useless for what he wants to do . It will probably take more time to check this field than it would to just process the employee depending on what is processed per employee", "Question : null .. . Answer : I am searching for a solution for the issue I am having with SSL LDAP authentication using PrincipalContext . Here is the code that I am using : .. . .. . I am receiving following error when I execute the code : .. . .. . System.DirectoryServices.AccountManagement.PrincipalServerDownException : The server could not be contacted . --- System.DirectoryServices.Protocols.LdapException : The LDAP server is unavailable . .. . .. . I have no clue on what causes this error . Any help in resolving this will be greatly appreciated . Thank you in advance .", "Question : null .. . Answer : If you use the System.DirectoryServices.AccountManagement.PrincipalContext constructor that takes a user name and password that user name and more disconcertingly password are held internally as plain text strings in the object . Is there a way around this obvious security risk Comment : Where do you got this information from Comment : From debugging the PrincipalContext . If you drill down into the object in the debugger you can see the user name and password as plain text .", "Question : I ve been using this little function without any issue for the past few years to validate user credentials . The createPrincipalContext method returns a PrincipalContext with ContextType.Machine and the machine name . My development-machine automatically updated to the latest version of Windows 10 this week and since then principalContext.ValidateCredentials has been throwing the following exception . System.IO.FileNotFoundException : The system cannot find the file specified . .. . .. . Other than the machine update nothing else was changed . I ve spend the last few days searching the net for what may have caused the issue . Can anyone point me in the direction of a cause and if possible a solution Comment : Just to say I have the same problem and I m currently investigating . Please add an update if you find a solution Comment : I have used up all my debugging knowledge on this . The error seems to occur in IAds.GetInfo but that s COM code so there s no source available . Process Monitor doesn t throw up any clues it doesn t look like there s any attempt to access a file . Happens on two machines for me I may have to rollback to the previous Windows 10 build Comment : I gave up trying to figure out what caused the issue and instead tried a workaround . I was debugging using IIS Express under Web Servers when i got the issue . I created a local site on the machine and changed Servers to Local IIS and pointed the Project Url to it . from there I was able to debug with out getting the FileNotFoundException . Comment : Weird . I m already using local IIS so that s not my problem . I ll try recreating the IIS app and see if that fixes it Comment : I believe it is because the dll is not found after the update at C : Program Files x86 Reference Assemblies Microsoft Framework .NETFramework v4.5.1 System.DirectoryServices.Acc ountManagement.dll - not sure what to do with that clue though. . .. . Answer : Try change your build platform target to AnyCPU i found that if my platform target is x86 I have this issue Why yet have no idea seems like win 10 bug", "Question : I have been trying to extend the s.ds.am.UserPrincipal class in VS 2010 VB app as I require access to AD User properties that are not by default a part of the UserPrincipal . This is a new concept to me and I have found some useful code on here as well but I have run into 2 problems with my extensions that I cannot seem to figure out . Problem 1 : When I attempt to use my UserPrincipalEx to retrieve a user I receive the following error . ERROR : .. . .. . CODE TO PRODUCE ERROR : .. . .. . Problem 2 : When I attempt to create a new user with my UserPrincipalEx I receive the following error . When I trace the PrincipalContext ctx into the class it appears to disconnect from the DomainController . ERROR : .. . .. . CODE TO PRODUCE ERROR : .. . .. . CLASS : .. . Answer : PROBLEM 1 .. . .. . I was able to solve Problem 1 by adding the following to the top of the class after the Imports .. . .. . PROBLEM 2 .. . .. . I have also been banging my head against this for to long and was finally able to resolve Problem 2 . The DirectoryOU variable did not contain a correct path the intended AD OU . I was missing a comma and after staring at everything for 30 minutes I finally noticed the issue .", "Question : I ve been at this for a while and I m always getting : .. . .. . System.DirectoryServices.AccountManagement.PrincipalServerDownException .. . .. . Which I think means my connection setup connection-string is wrong . When I write dsquery server on cmd on the computer where the Active Directory is I get : .. . .. . CN DCESTAGIO CN SERVERS CN Default-First-Site-Name CN Sites CN Configuration DC estagioit DC local .. . .. . I ve tried the following connecting in the following ways : .. . .. . 1 : .. . .. . 2 : .. . .. . 3 : .. . .. . 4 : .. . .. . 5 : .. . .. . And some other ways.. . .. . .. . Any ideas on what s wrong and how I can make this connection work PS : The ip is correct seen as I ve used it to ping and it s working . PSS : I really really need this working ASAP if you have any suggestions at all they re all welcome . .. . Answer : If you look at the documentation for the PrincipalContext constructors it should be quite clear : .. . .. . or .. . .. . So you basically need : .. . .. . your context type here : ContextType.Domain .. . the domain-name try just the Netbios name e.g . YOURDOMAIN - or leave NULL for default domain .. . optionally a container as an LDAP path - a distinguished name full path but without any LDAP : prefix .. . .. . So try something like this : .. . .. . or .. . .. . or .. . .. . or Comment : Thanks you really saved me man" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
mkv@matroska@98
mkv -- this tag is for questions about playback of creation of and programmatic interaction with @placeholder multimedia container .mkv .mka files .
{ "confidence": [ 47.50587463378906, 43.8153076171875, 42.94609832763672, 42.92978286743164, 42.82683181762695, 41.79704284667969, 41.080467224121094, 40.496917724609375, 40.1230583190918, 40.10758972167969, 40.10758972167969, 39.65459442138672, 39.36417770385742, 39.27436828613281, 39.000999450683594, 38.75294876098633, 38.548004150390625, 38.47637176513672, 38.27427291870117, 38.16777801513672, 37.99505615234375, 37.838645935058594, 37.838645935058594, 37.838645935058594, 37.838645935058594, 37.67472457885742, 37.67472457885742, 36.7320556640625, 36.7320556640625, 35.40578079223633, 35.40578079223633, 35.40578079223633, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.76523208618164, 34.350547790527344, 34.350547790527344, 34.350547790527344, 34.350547790527344, 34.350547790527344, 34.350547790527344, 33.963653564453125, 33.65864562988281, 33.65864562988281, 33.49681091308594, 33.24395751953125, 32.91211700439453, 32.332366943359375, 32.332366943359375, 32.332366943359375, 32.332366943359375, 31.917682647705078, 31.917682647705078, 31.917682647705078, 31.674339294433594, 31.606216430664062, 31.337066650390625, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.625362396240234, 30.12948226928711, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.51877212524414, 29.39193344116211, 29.384937286376953, 28.19249725341797, 28.19249725341797, 28.19249725341797, 28.19249725341797, 28.19249725341797, 28.19249725341797, 28.19249725341797, 28.091670989990234, 28.091670989990234, 28.091670989990234, 28.091670989990234, 28.091670989990234 ], "content": [ "Is there any library for playing MKV matroska multimedia container files in Flash AS3 MXML", "Found the solution myself : the problem was in missing mime-type definitions for mkv mka in Windows registry .", "MKV is not a codec .", "I have both files here as mkv and mp4 .", "Now i am trying to decode this mkv files first reading mkv file using ffmpeg s AvFormatContext and getting an AvPacket .", "My video is an .mkv file .", "I m trying to play some .mkv files - but many files stop playback at 00 : 00 : 02 .", "It doesn t affect the correctness of mp4 mkv files .", "I created a context menu extension and registered it for mp4 avi and mkv files using this code : .. . .. . It s working for .mp4 and .avi but not showing for .mkv files .", "Also MKV isnt a codec but a wrapper .", "I want to convert .mkv to .264 .", "This mkv files was created like this first rtp frames taken from network and dumped to a file then this file converted to mkv by the help of program named mkvmerge .", "So the desired output is an mkv .", "I have mkv files which holds h264 encoded video streams .", "Like Zuljin said MKV is not a codec .", "A the top level you have your container formats mp4 mkv etc .", "I recently downloaded a large number of mkv files with names formatted like South Park S01E01 Cartman Gets an Anal Probe 640x480 Phr0stY .mkv .", "You can use the FFmpeg https : ffmpeg.org download.html multimedia framework to attach an image as MKV metadata .", "I have a media-player that I made using c and I wanted to decode mkv formats but I can t find any good info about the codec or how to encode decode mkv files .", "How to read the metadata of a MKV movie files in C or C or C++ or AS3", "I converted it to H.264 MKV with HandBrake but this process did not set the interlaced flag in the MKV file .", "Can I use MPMoviePlayerController and add to it mkv codecs", "There is some framework that let me open the .mkv file", "I need to convert hundreds of movies in .mkv to .mp4 .", "mp4 is played fine while mkv still fails .", "Is your input an mp4 or another mkv", "Nope I can t recognise it in the MKV .", "I made a simple graph to write MKV file .", "mkv isn t a supported format for HTML5 video .", "I m trying to change the format from .mp4 to .mkv .", "Other mp4s are working but they were not converted from .mkv .", "First you should remux the mkv with mkvmerge .", "How can I play mkv video into my iOS App", "I have a mkv-file with h264 video and one 5.1 audio track .", "I have one mkv file that doesn t have valid duration .", "But i cannot understand which part is mkv header which part is h264 .", "How are the mkv-file splitters filters doing the extract audio video work", "Is there any way to play a MKV video on browser Chrome and Mozilla Firefox", "But I only want to decode MKV video on my iPhone for study purposes .", "How can I decode matroska mkv video format", "The same mkv plays fine on both the PC and the WDTV if copied to a flashdrive .", "DLNA includes no mkv support http : www.dlna.org dlna-for-industry technical-overview", "does anybody know how to extract subtiles from MKV files using pure Java", "The .mkv files were created using MakeMKV which creates uncompressed movies http : www.makemkv.com .", "After installing ffmpeg https : www.ffmpeg.org put this line on a bat file on the same folder of the .mkv files .", "I have been using ffmpeg to convert my MKV files to MP4 without having to re-encode anything .", "Now the player fails to open mkv files from the PC through DLNA streaming .", "When displaying the list of files on WDTV the player shows only filename for mkv videos - no file size time etc .", "You perfectly right about the wrapper thing...so what could I do to reproduce mkv in my app", "Anyway how could I programmatically add a cover image to an mkv file", "Currently I m using libav for reading writing video data from to mkv .", "mkv is a video container https : en.wikipedia.org wiki Comparison of video container formats and H.264 is an encoding format https : en.wikipedia.org wiki Comparison of video-codecs .", "http : hybridego.net entry Matroska-Header .. . .. . Also I ve seen references to the EBML library being used to decode MKV files .", "I m just curious : how do you do extract an AAC streams from mkv-video files to plain AAC files .", "MinMedia Local Area Network Win7 MKV links http : i.stack.imgur.com JMDsg.png", "Homenet - MKV file playing in browser HTML5 player http : i.stack.imgur.com 9OYoJ.png", "Can you recognize the audio delay in the mkv and have you tried a remux", "Are there any mkv parser libraries for iOS please suggest some links .", "The purpose of doing this is because my Smart samsung TV doesn t play MKV files .", "configuration file for Apache or elsewhere that might force how MKV files are handled by my host", "Good day I would like to convert my .mkv files to .mp4 using FFmpeg .", "Enough soapbox now to the MKV and M4A file anomaly : when I click on a link-to an MKV demo video file from my web host Hostgator the browser both Chrome and Firefox starts downloading instead of playing the MKV file .", "my subtitles are already in my .mkv container but when they play on the webplayer they are so large it chops off half of the stuff and u cant even read it in fullscreen .", "I ve reinstalled my Win-7 a couple of day ago changed from 32 bits to 64 and now I have a strange problem with mkv files .", "I try to load an mkv from an URL into my MPMoviePlayerController .. . .. . But a black screen with nothing in it to play appears .", "I am trying to use libx265 to encode my raw YUV file to a MKV file for the purposes of testing .", "Normally I would use what HTML5 offers me but the problem is that mkv x264 is not supported by all browsers .", "Adding ffprobe output : f-0.mp4 clip .. . .. . f-0.mkv clip :", "Run ffprobe -show entries stream codec type duration start time -of compact f-0.mp4 and same for the MKV .", "So the problem is not in broken mkv or network communication - something must be wrong with the codecs installed on the PC .", "Maybe some settings should be tweaked to make mkv-s play but I have no idea what to check .", "I also tried to encode the same file to mkv and mp4 using the same codec settings .", "In my case streaming mkv worked before I reinstalled Windows so it is supported by both server and client .", "I m very rusty on Linux and new to transcoding but the script I currently have is the following : .. . .. . Which as I understand it simply copies the audio and video components within the mkv container and inserts them into a new mp4 container .", "Unfortunately not until Chrome Firefox etc start supporting MKV video natively at least no way I could find", "for .mkv file you can use this code.. . .. . .. . but make sure only chrome support this code it may help you", "Can anyone tell me How to play .mkv videos in ASP.NET MVC using or not using Microsoft.Web.Helpers.Video helper", "Raw jpg : .. . .. . mkv converted to mp4 : .. . .. . jpg originally bmp to mp4 : .. . .. . final trimmed concat output :", "Hi i will paste console output for every type jpeg mkv and final join .", "I have a MKV file I want to play on my website but none of the flash players have subtitle support .", "VLC web plugin can play the mkv and use the subtitle streams even audio and u can customize the buttons or the functions .", "In fact there re two modules : one defines Ebml reader writer and another one describes structure for MKV .", "I ve got an MKV file whose source is interlaced NTSC MPEG-2 video .", "I use .mkv videos on my website but the VLC media plugin for browsers is effectively useless .", "How can we detect within a program whether DivX and MKV codecs are already installed or not", "Are you want to check if user has any application that can play avi mkv .", "This thread http : superuser.com questions 472420 handbrake-settings-to-convert-mkv-to-mp4-while-retaining-the-original-quality mentions that there is no need for video-conversion just changing the container might suffice .", "I basically want to run a batch-file and it goes through a folder including all subdirectories and changes the container of all mkv files to mp4 converting the sound to AAC if necessary .", "These Apache .htaccess AddType entries for MKV MOV and M4B work in Google Chrome but not in Firefox .", "Preferably it will create the new mp4 file in the same place with the same name and then delete the mkv .", "Here is a very basic pipeline that just re-muxes h264 video data in an mp4 file into an mkv file .", "filesink location tmp bbb2.mkv .. . .. . Video formats are usually more like a bundle of data than an individual file .", "Try the following : .. . .. . But again if your .mkv already contains H.264 AAC USE THE FIRST SOLUTION .", "I just tried to convert the following MKV on my root server via ssh : .. . .. . to a .mp4 file using avconv .", "Can someone please give me the proper arguments to encode an HD MKV to a Google TV readable format", "I would like to watch my MKV movie collection encoded mostly using x264 codec from the browser without converting the format .", "From the image2 demuxer https : www.ffmpeg.org ffmpeg-formats.html image2-2 of ffmpeg documentation creating an MKV file from a set of JPEG pictures seems simple .", "To scale with ffmpeg I used this command : .. . .. . Now the mkv is fine my LG TV read it looks awesome but.... . size went from 3 3Gb to 12Gb", "I mean without doing reconversion how do you extract an AAC coded file from an mkv to a self-contained file perhaps WAV", "All works fine but now I have a problem : I have an encoding pipeline for creating an mp4 out of my mkv video ." ] }
{ "confidence": [ 60.979393005371094, 52.32683563232422, 51.602970123291016, 50.90864562988281, 50.735836029052734, 47.10069274902344, 47.088443756103516, 45.92060470581055, 45.92060470581055, 45.291297912597656, 45.0871467590332, 44.763763427734375, 44.62093734741211, 43.8243522644043, 43.693084716796875, 43.506500244140625, 42.91674041748047, 42.38380813598633, 41.369659423828125, 41.17537307739258 ], "content": [ "Question : I ve reinstalled my Win-7 a couple of day ago changed from 32 bits to 64 and now I have a strange problem with mkv files . Before the update I used WDTV Live player to stream videos from the PC and everything worked flawlessly . Now the player fails to open mkv files from the PC through DLNA streaming . Other formats can still be played . The same mkv plays fine on both the PC and the WDTV if copied to a flashdrive . And the same file used to play on WDTV before Windows upgrade . So the problem is not in broken mkv or network communication - something must be wrong with the codecs installed on the PC . I m using K-Lite codec pack but the version I had before the upgrade was probably much older than the one I have now . Maybe some settings should be tweaked to make mkv-s play but I have no idea what to check . Any ideas on configuring the media server are appreciated . Update : a detail which may help to solve the problem . When displaying the list of files on WDTV the player shows only filename for mkv videos - no file size time etc . So the problem must be in the container not in codecs . I also tried to encode the same file to mkv and mp4 using the same codec settings . mp4 is played fine while mkv still fails . Comment : do you use Windows shares for streaming Comment : I m using media streaming provided by Windows Media Player and its services . It uses DLNA protocol and used to work perfectly . Comment : I m using Windows shares and the built-in codecs of the WD . DLNA includes no mkv support http : www.dlna.org dlna-for-industry technical-overview Comment : AFAIK DLNA is just a protocol which can be used to stream anything . In my case streaming mkv worked before I reinstalled Windows so it is supported by both server and client . Using shares has its disadvantages e.g . you can not control client device from the server or transcode media on the fly to the format understood by the client . Comment : OK I can only say : I m using Win8 64k shares and WD TV Live and can stream MKV and AVI MP4 TS .. . over WLAN in 1080p without any trouble . I never used DLNA . .. . Answer : Found the solution myself : the problem was in missing mime-type definitions for mkv mka in Windows registry . It s easy to google adding the required registry entries and rebooting makes everything work as expected . Comment : Care to share rather than recommend google Not sure what i m looking for .", "Question : The purpose of doing this is because my Smart samsung TV doesn t play MKV files . This thread http : superuser.com questions 472420 handbrake-settings-to-convert-mkv-to-mp4-while-retaining-the-original-quality mentions that there is no need for video-conversion just changing the container might suffice . After reading multiple threads on how to change the container of MKV to MP4 I downloaded and compiled the FFMPEG with libfdk aac support from here http : taer-naguur.blogspot.ca 2013 10 ffmpeg-autobuild-tool-x64.html . I tried converting a sample MKV file using this command : .. . .. . but getting the following errors copied from command-prompt : .. . .. . Also tried using this command : .. . .. . But this screws up the video quality and I start seeing some bad pixelated patches during the playback . Any help would be appreciated . Just an FYI : I got this far by reading blogs and posts . I have 0 knowledge about video-conversion . Comment : Your second command ffmpeg -i input.wav .. . has no video track input . So it can t screw up the video quality . .. . Answer : If you can t play the video after your first command then evidently your TV can t deal with the originally encoded video stream . So - give a shot at re-encoding with another codec . This will produce a high quality re-encoded version it will take a while to re-encode :", "Question : I found this screenshot that s showing that you can add a cover image to an mkv file in a way that it is displayed in the Windows explorer using Shark007+icaros . enter image description here http : i.stack.imgur.com Hl7aC.png .. . But these tools are messing with the system in some really bad way . A lot of people are having problems with it and I super regret that I installed it . I m glad I got my Windows to boot again.. . Anyway how could I programmatically add a cover image to an mkv file And would I need to change something in the registry to make Windows display them I m not really looking for code I m more looking for something like the format the cover needs to have and the byte at which I have to inject insert the image file etc . Comment : Why the close vote .. . Answer : You can use the FFmpeg https : ffmpeg.org download.html multimedia framework to attach an image as MKV metadata . More Windows builds can be found at Zeranoe http : ffmpeg.zeranoe.com builds . Example CLI usage : .. . .. . -c copy copy all streams in the source file without re-encoding .. . -attach image.jpg attach a JPEG image .. . -metadata : s : t mimetype image jpeg set the attachement MIME type .. . .. . On nix the same can be accomplished with MKVToolNix https : mkvtoolnix.download downloads.html . Ubuntu demo : .. . .. . enter image description here http : i.stack.imgur.com MKfXr.png .. . .. . .. . .. . Programmatic approach : .. . .. . use the ffmpeg C libraries to attach or replace the cover art .. . write a custom Shell Extension https : msdn.microsoft.com en-us library windows desktop ff468984 v vs.85 .aspx to read the MKV http : www.matroska.org format and display the image attachement as thumbnail . Comment : But does attaching an image mean that it is visible in the file explorer of Windows Like on the screenshot . Comment : I just tried it . It always displays the default icon on Windows 8.1 . : Comment : Yeah I already mentioned that tool in my question . And it is not an option for me . I d really like to know what that tool does internally and how I could replicate it . I mean it s probably just some registry changes right Comment : I actually don t want to use any third party tool for that . I also don t want to force my users to have codec packs installed etc . Comment : Of course it is possible . The question is just how And I wouldn t say that ffmpeg is the way . It surely is a way but not really a programmatic solution . It s a workaround I could live with . But for making the Windows explorer display the covers I definitely need a programmatic solution that doesn t involve running third party executables .", "Question : null .. . Answer : I have mkv files which holds h264 encoded video streams . This mkv files was created like this first rtp frames taken from network and dumped to a file then this file converted to mkv by the help of program named mkvmerge . Now i am trying to decode this mkv files first reading mkv file using ffmpeg s AvFormatContext and getting an AvPacket . But i cannot understand which part is mkv header which part is h264 . Is there another way or any suggestion for my way of parsing", "Question : Is there any library for playing MKV matroska multimedia container files in Flash AS3 MXML I am looking for an open-source or similar to open-source implementation . Since my MKV file has only Theora video I am okay even if library supports only one type of video stream . .. . Answer : You can only play videos in Flash that the player natively supports . If you write or convert an actual video codec in ActionScript or even use the C to Flash bytecode compiler the performance will not be good enough to get acceptable video quality . For internal purposes we implemented a Motion JPEG display within ActionScript and even though all that did was modify the headers a bit and display a series of jpeg files using mostly native-code the effective framerate was poor . Flash player natively supports a few formats .. . .. . On2 VP6 .. . Sorenson Spark Sorenson H.263 .. . H.264 .. . .. . Mostly everyone uses H264 which is the most recently added . Comment : Good answer but Screen video isn t a codec or a format . Flash only supports the 3 codecs noted . Flash Lite for mobile-devices also allows playback of device video 3gpp etc if the device has native codecs but that s different from Flash having built-in support . Comment : @fenomas thanks for pointing that out . I got that from wikipedia and was a bit confused but I checked Adobe s official list and it showed only the three codecs . kb2.adobe.com cps 402 kb402866.html http : kb2.adobe.com cps 402 kb402866.html", "Question : null .. . Answer : I ve encountered a few MKV s that had no audio . I m just curious : how do you do extract an AAC streams from mkv-video files to plain AAC files . I mean without doing reconversion how do you extract an AAC coded file from an mkv to a self-contained file perhaps WAV How are the mkv-file splitters filters doing the extract audio video work same question is for how to extract store audio from mpegs . thank you for your time if you can read this .", "Question : Good day I would like to convert my .mkv files to .mp4 using FFmpeg . I have tried the following code : ffmpeg -i input.mkv -c : v libx264 -c : a libvo aacenc output.mp4 .. . .. . but I get the error Error while opening encoder for output stream 0 : 1 - maybe incorrect parameters such as bit rate rate width or height . Any way to get around this I have tried setting the bitrate of the audio but the problem seems to persist . Regards Rikus Honey Comment : Related : superuser.com questions 639983 https : superuser.com questions 639983 avconv-cant-convert-stream-to-mp4-file-fails-with-unable-to-set-encoding-para Comment : As the error says you have incorrect or missing parameters . Refer to : trac.ffmpeg.org wiki Encode H.264 https : trac.ffmpeg.org wiki Encode H.264 Comment : mkv is a video container https : en.wikipedia.org wiki Comparison of video container formats and H.264 is an encoding format https : en.wikipedia.org wiki Comparison of video-codecs . You cannot convert a container to an endoding . Comment : @Rikus Honey Did you enable libvo-aacenc like this --enable-libvo-aacenc . Why don t you use libfaac or libfdk aac . They are free . .. . Answer : I suggest you first check whether your .mkv file already has H.264 AAC streams in the first place . Because if it does all you have to do is copy the streams and change the container : .. . .. . If it doesn t you probably got rejected because you didn t specify a bitrate to libvo aacenc . Try the following : .. . .. . But again if your .mkv already contains H.264 AAC USE THE FIRST SOLUTION . I ll be faster and will have a better quality . Comment : You can use -codec copy or -c copy instead of -vcodec copy -acodec copy . Comment : Also if you want to encode using x264 it s usually a good idea to set some specific encoding settings preset and some method of rate q control see trac.ffmpeg.org wiki Encode H.264 https : trac.ffmpeg.org wiki Encode H.264", "Question : null .. . Answer : I created a context menu extension and registered it for mp4 avi and mkv files using this code : .. . .. . It s working for .mp4 and .avi but not showing for .mkv files . I tried investigating the registry but couldn t find a clue there . Can anyone help me where to look", "Question : How to read the metadata of a MKV movie files in C or C or C++ or AS3 for example such .. . Answer : There is always attempting to parse the header yourself . http : hybridego.net entry Matroska-Header .. . .. . Also I ve seen references to the EBML library being used to decode MKV files . http : ebml.sourceforge.net Good luck", "Question : null .. . Answer : I am just searching around to find some information about how play an .mkv file on new Apple TV assuming for example that the file is on a NAS over a local network . There is some framework that let me open the .mkv file thanks Comment : Check out AVPlayerViewController and AVPlayer .", "Question : Background : .. . .. . My current videofile is put in a Linux based system that streams content RTP to other users . I m filming and sending the content to the server after I change the and make sure the encoding is correct I stumble upon issues . I ve tried doing this using ffmpeg however the system I m injecting this file in won t recognize it and stream it to another device . I m doing all the transcoding and such on a Windows system .. . .. . Error : What I m getting is .. . .. . Maybe I m not preparing it for RTSP Is that the issue . Cause what I see is that the files that are able to stream are encoded using Gstreamer .. . .. . So I thought. . perhaps ffmpeg does not do that well let s give gst-launch a try . I need pointers as to how to go about this . What I have : .. . .. . OSSBuild of GStreamer .. . ffmpeg utils .. . input.mp4 - H264 Main profile L3.1 - Pixel format yuvj420p .. . Audio in container .. . .. . What I need probably : .. . .. . output.mkv - H264 Main profile L4.1 - Pixel format yuv420p - RTP prepared rtph264pay module .. . .. . Audio removed .. . .. . I have h264 analyze output from both the movie I filmed . From the movie that is successfully streamed and the movies from my attempts with ffmpeg Comment : What system are you using to stream the content What does it state in its documentation about what file formats it can handle Comment : @mpr The system is a streaming server running on a Linux based OS . The only format it can handle is the matroska container with h264 coded content . Comment : So the desired output is an mkv . Is your input an mp4 or another mkv I see conflicting info in your description and sample code . If all you re trying to do is convert mp4 to mkv that s something GStreamer can do but the pipeline will vary depending on whether you want to add the audio tracks and perhaps some other factors . Are you doing the conversion in Windows or in Linux Also what created the input video It may be the problem if ffmpeg couldn t handle it . Note that RTP RTSP really only deals with the streaming side of things . It doesn t affect the correctness of mp4 mkv files . Comment : @mpr Sorry I accidentally changed the format when I changed the name . Changed it and added more info to the question that should cover your questions in the comments . I m trying to change the format from .mp4 to .mkv . Running a Windows 7 with ffmpeg and gstreamer built for windows . A digital camera produces input.mp4 with audio . I don t want the audio in output.mkv . .. . Answer : So this question can go in a whole bunch of different directions depending on what you re trying to do . Here is a very basic pipeline that just re-muxes h264 video data in an mp4 file into an mkv file . It ignores the audio . No re-encoding is necessary . gst-launch-0.10 filesrc location bbb.mp4 qtdemux video x-h264 h264parse matroskamux filesink location tmp bbb.mkv .. . .. . Here is another pipeline that demuxes an mp4 file re-encodes it using the out-of-the-box x264 settings and re-muxes it into an mkv file . gst-launch-0.10 filesrc location bbb.mp4 decodebin2 videoconvert x264enc h264parse matroskamux filesink location tmp bbb2.mkv .. . .. . Video formats are usually more like a bundle of data than an individual file . A the top level you have your container formats mp4 mkv etc . then often within those containers you have video and audio data stored in various formats h264 video AAC audio etc . . Then at the streaming level you have protocols like RTP RTSP is a sort of wrapper protocol for negotiating one or more RTP streams and MPEGTS . You may also want to double check what your camera is producing . You can run ffprobe on it : .. . .. . ffprobe whatever.mp4 .. . .. . You can also try creating simple test videos from scratch to see if GStreamer can even make anything your server can understand . gst-launch-0.10 videotestsrc num-buffers 120 ffmpegcolorspace x264enc profile main h264parse matroskamux filesink location tmp main.mkv .. . .. . gst-launch-0.10 videotestsrc num-buffers 120 ffmpegcolorspace x264enc profile baseline h264parse matroskamux filesink location tmp baseline.mkv .. . .. . gst-launch-0.10 videotestsrc num-buffers 120 ffmpegcolorspace x264enc profile high h264parse matroskamux filesink location tmp high.mkv Comment : Seems like a great pipeline and thank you for the explanation . Still getting the error though Comment : Are you running GStreamer 0.10 or 1.0 What is the name of the video server software you re using", "Question : I need to convert hundreds of movies in .mkv to .mp4 . The .mkv files were created using MakeMKV which creates uncompressed movies http : www.makemkv.com . I need them to all be converted to .mp4 so my Chromecast can support it . Is there a script I can use to automate this Using Windows 10 . Here is the page on what Chromecast supports natively : https : developers.google.com cast docs media .. . .. . Thanks EDIT : I want the new file to be a smaller file size than the original and go in another folder while leaving the original file can this be done with ffmpeg Comment : you should take a look to at ffmpeg : ffmpeg.org https : www.ffmpeg.org .. . Answer : After installing ffmpeg https : www.ffmpeg.org put this line on a bat file on the same folder of the .mkv files . this command is just changing the video containers so you are copying the video codec and audio codec and nothing is being re-encoded as said here http : askubuntu.com questions 396883 how-to-simply-convert-video-files-i-e-mkv-to-mp4 . Comment : Thanks but will this leave the file at the original size I am looking at 20+ GB movies my WiFi that Chromecast will be using is slow so I want to make the files smaller as well without losing quality . Can I automate this also Comment : Preserving exactly the same quality is very hard or even impossible to do but you can try a number of simple web converters like clipchamp.com https : clipchamp.com and see if any output resolution meets your standards", "Question : How can we detect within a program whether DivX and MKV codecs are already installed or not For my apps I need to check user OS Windows for some requirements . Are there any specific registry keys that I can check Or should I check for file association of these types What s the best solution Comment : MKV is not a codec . It is container for video audio and subtitles streams . You should be more specific what you are trying to achieve . Are you want to check if user has any application that can play avi mkv . or you want to check codecs xvid divx H.264 theora availability . Comment : I need to check codecs availability . Comment : Like Zuljin said MKV is not a codec . It s not even a video format . It s a video container that can contain a lot of different things . Comment : Check those 2 links tanvon.wordpress.com 2008 08 30 enumerating-directshow-filters http : tanvon.wordpress.com 2008 08 30 enumerating-directshow-filters msdn.microsoft.com en-us library dd375617 v vs.85 .aspx http : msdn.microsoft.com en-us library dd375617 v vs.85 .aspx This can help you in displaying all available DirectShow Filters that are used by Windows Media Player to display videos .. . Answer : Include a dummy video in your resources that is similar to the video content you want to play then try to load it off-screen if it works you know that the codecs are correctly installed for the format you care about i.e . both the container and video audio codecs are there and they are working", "Question : re : http : www.gooplusplus.com minmedia demo minmedia.php .. . .. . I am working on what may eventually become a Minimalist Media Server for Local Area Networks with option to launch files to Chromecast . It was prompted by a discovery that there are no UPnP DLNA client Chrome apps or easy media access methods for Chromebooks . While Plex works on Chromebooks Chromecast redirection only works through a Plex web link . In any case most media servers seem like a lot of unnecessary overhead and periodic disk thrashing when all that is wanted is a simple and direct way to play via wifi from a few terabytes of LAN-hosted media files . IMO thumbnails and category features etc . just get in the way of the actual viewing or listening . Enough soapbox now to the MKV and M4A file anomaly : when I click on a link-to an MKV demo video file from my web host Hostgator the browser both Chrome and Firefox starts downloading instead of playing the MKV file . When I click the link-to the same file locally Civet Web Server an open-source fork of Mongoose the MKV file plays normally in an HTML5 browser window . The opposite occurs with M4A music files . A click on a Hostgator-hosted M4A file link plays in the browser s HTML5 web player . A click on the file hosted locally prompts downloading instead of playing . So can some expert out there tell me why links to these two types of media files behave differently locally vs on the internet Is it a function of the 1 host Hostgator or 2 the web server Apache vs Civet Web Is there some mime type etc . configuration file for Apache or elsewhere that might force how MKV files are handled by my host MinMedia Local Area Network Win7 MKV links http : i.stack.imgur.com JMDsg.png Comment : Another curious finding is that by simply renaming an MKV file to MP4 it will play in the browser s default HTML5 player from both a local and internet link . Example : just copy video.MKV to video.mkv.MP4 An internet click on the first will be downloaded while the second will start playing . A similar quirk happens if you rename audio.AAC to audio.aac.M4A or audio.aac.MP4 .. . Answer : Reference : http : www.homenetvideo.com demo index.php Test 20Formats .. . .. . How an HTML5 browser like Google Chrome handles MKV M4V MOV M4A M4B seems to be dependent on the web server s config file . Here s what I added to my Hostgator homenetvideo.com .htaccess file : .. . .. . Here s what I added to my LAN web server civetweb.conf file : .. . .. . These formats on both local network and external servers now play from the browser HTML5 player : .. . .. . .. . Homenet Local Media Server - Test Format http : i.stack.imgur.com zKRL0.png .. . .. . Homenet - MKV file playing in browser HTML5 player http : i.stack.imgur.com 9OYoJ.png Comment : These Apache .htaccess AddType entries for MKV MOV and M4B work in Google Chrome but not in Firefox . Frankly I don t even bother with Internet Explorer . Comment : For Google Chrome users with VLC installed : --- AddType application x-vlc-plugin .pls .flv", "Question : I have a MKV file I want to play on my website but none of the flash players have subtitle support . I heard DivX web player does but I do not know how to use divx webplayer . Please help .. . Answer : Try using this website for auto code generation for video files : .. . .. . http : labs.divx.com WebPlayerCodeGenerator Comment : Works but the subtitles are so big they go out of the screen-size Comment : Do you want to permanently embed the subtitles in the movie . Comment : my subtitles are already in my .mkv container but when they play on the webplayer they are so large it chops off half of the stuff and u cant even read it in fullscreen . Comment : I would suggest changing the subtitles in the container locally . Like using some sort of subtitle editor . Hard embed it in your video and then upload . Atleast I think it should work . Comment : Yeah but I have hundreds of videos I can t go through all of them doing that o o", "Question : Background : .. . .. . My current videofile is put in a Linux based system that streams content RTP to other users . I m filming and sending the content to the server after I change the and make sure the encoding is correct I stumble upon issues . I ve tried doing this using ffmpeg however the system I m injecting this file in won t recognize it and stream it to another device . I m doing all the transcoding and such on a Windows system .. . .. . Error : What I m getting is .. . .. . Maybe I m not preparing it for RTSP Is that the issue . Cause what I see is that the files that are able to stream are encoded using Gstreamer .. . .. . So I thought. . perhaps ffmpeg does not do that well let s give gst-launch a try . I need pointers as to how to go about this . What I have : .. . .. . OSSBuild of GStreamer .. . ffmpeg utils .. . input.mp4 - H264 Main profile L3.1 - Pixel format yuvj420p .. . Audio in container .. . .. . What I need probably : .. . .. . output.mkv - H264 Main profile L4.1 - Pixel format yuv420p - RTP prepared rtph264pay module .. . .. . Audio removed .. . .. . I have h264 analyze output from both the movie I filmed . From the movie that is successfully streamed and the movies from my attempts with ffmpeg Comment : What system are you using to stream the content What does it state in its documentation about what file formats it can handle Comment : @mpr The system is a streaming server running on a Linux based OS . The only format it can handle is the matroska container with h264 coded content . Comment : So the desired output is an mkv . Is your input an mp4 or another mkv I see conflicting info in your description and sample code . If all you re trying to do is convert mp4 to mkv that s something GStreamer can do but the pipeline will vary depending on whether you want to add the audio tracks and perhaps some other factors . Are you doing the conversion in Windows or in Linux Also what created the input video It may be the problem if ffmpeg couldn t handle it . Note that RTP RTSP really only deals with the streaming side of things . It doesn t affect the correctness of mp4 mkv files . Comment : @mpr Sorry I accidentally changed the format when I changed the name . Changed it and added more info to the question that should cover your questions in the comments . I m trying to change the format from .mp4 to .mkv . Running a Windows 7 with ffmpeg and gstreamer built for windows . A digital camera produces input.mp4 with audio . I don t want the audio in output.mkv . .. . Answer : My guess is that input.mp4 contains NAL of type 9 as the error message points out . Access unit delimiters NAL type 9 should not be in an mp4 . To me it looks like your camera is muxing an illegal h.264 bitstream format into input.mp4 . MP4s should contain size prefixed NALs and no SPS type 7 PPS type 8 or AUs type 9 . Now the question is how to filter out the AUs or just pass them through . I would try a stream copy - dropping the audio - see : https : ffmpeg.org ffmpeg.html Stream-copy Comment : I will give this a try", "Question : How can I play mkv video into my iOS App Can I use MPMoviePlayerController and add to it mkv codecs I try to load an mkv from an URL into my MPMoviePlayerController .. . .. . But a black screen with nothing in it to play appears . Comment : Probably not i dont think you can add Codecs to the base media stuff . Also MKV isnt a codec but a wrapper . Comment : You perfectly right about the wrapper thing...so what could I do to reproduce mkv in my app .. . Answer : The simple answer is no . You can use FFMPEG to accomplish this using https : github.com iMoreApps ffmpeg-avplayer-for-ios Comment : Have you ever used it Comment : I ve used FFMpeg in different capacities and built custom players however this looks like the simplest option to meet your requirements in a simple api and package . Comment : Could you send me the simplest demo you can do I don t need special commands like subtitle ecc ecc just play pause and stop . Comment : no is that even a serious question Comment : I downloaded FFMPEG and there is an example in so I tried to import the minimum required into a new test project . When I run the app I got an error which says that Audio unit framework is missing even if there actually is...that s why I asked you a demo...sorry.. .", "Question : I recently downloaded a large number of mkv files with names formatted like South Park S01E01 Cartman Gets an Anal Probe 640x480 Phr0stY .mkv . I want to strip all of the text except for the actual episode names . Here is the code I have so far . Everything works fine up until the os.rename line where it stops and causes the except clause to execute . When I print new1 the correct string is returned . Can anyone see why the rename isn t working .. . Answer : You should use os.path.join to combine the components of a file path not + .", "Question : null .. . Answer : Is there any way to play a MKV video on browser Chrome and Mozilla Firefox Native HTML5 Video Player plays back the video but no audio and Divx Web Player became obsolete since Chrome 45 . Any and all help appreciated : Comment : you ll either have to transcode and switch the container to mp4 or use the EME capabilities in javascript to process the frames and feed them to the buffer I ve seen examples for DASH but not re-containerization", "Question : How to read the metadata of a MKV movie files in C or C or C++ or AS3 for example such .. . Answer : You might try asking this over at doom9 forums in their development section . Also mediainfo.dll might also work for you ." ] }
[ "yes-answer-long", "yes-answer-short" ]
matroska
UNK_RELATION
azure-webjobs@web@118
azure-webjobs -- azure-webjobs provide an easy way to run scripts or programs as background processes on app service @placeholder apps .
{ "confidence": [ 64.84428405761719, 63.33183288574219, 60.864768981933594, 60.32720947265625, 57.321929931640625, 56.889923095703125, 56.863590240478516, 56.70721435546875, 56.3057975769043, 55.92729187011719, 55.92729187011719, 55.518524169921875, 55.28166198730469, 54.921165466308594, 54.41230010986328, 54.2302360534668, 54.16094970703125, 54.095375061035156, 54.095375061035156, 54.09382629394531, 53.9348258972168, 53.64653015136719, 53.0983772277832, 52.40874481201172, 52.012020111083984, 51.9212646484375, 51.9212646484375, 51.9212646484375, 51.844947814941406, 51.844947814941406, 51.83854675292969, 51.61973571777344, 51.47289276123047, 51.47199630737305, 51.34254455566406, 51.34254455566406, 51.34254455566406, 51.34254455566406, 51.088706970214844, 50.105079650878906, 50.0577507019043, 49.9931640625, 49.81406784057617, 49.81406784057617, 49.70503616333008, 49.47492980957031, 49.3925895690918, 49.25679016113281, 49.25679016113281, 49.23027420043945, 49.128665924072266, 49.10149383544922, 48.42723083496094, 48.17655944824219, 47.982147216796875, 47.982147216796875, 47.982147216796875, 47.982147216796875, 47.982147216796875, 47.80109786987305, 47.80109786987305, 47.744571685791016, 47.63888931274414, 47.63888931274414, 47.10786056518555, 47.10786056518555, 46.93384552001953, 46.76683044433594, 46.70024108886719, 46.099639892578125, 46.099639892578125, 46.099639892578125, 46.099639892578125, 46.04554748535156, 46.042327880859375, 45.980133056640625, 45.833221435546875, 45.768272399902344, 45.74109649658203, 45.74109649658203, 45.726993560791016, 45.726993560791016, 45.726993560791016, 45.67559051513672, 45.255889892578125, 45.18016815185547, 44.609642028808594, 44.609642028808594, 44.571163177490234, 44.571163177490234, 44.571163177490234, 44.571163177490234, 44.571163177490234, 44.451656341552734, 44.199363708496094, 44.19571304321289, 43.989768981933594, 43.92388153076172 ], "content": [ "Azure Webjobs and Azure Automation runbooks use Azure scheduler in the background .", "I m testing out Azure Webjobs .", "github.com Azure azure-webjobs-sdk issues 629 https : github.com Azure azure-webjobs-sdk issues 629", "On WAWS use Azure WebJobs", "Webjobs are any executable that can run on Azure so .NET programs will run fine .", "github.com Azure azure-webjobs-sdk wiki EventHub-support https : github.com Azure azure-webjobs-sdk wiki EventHub-support", "There is a close relationship between Azure Scheduler and Azure WebJobs .", "Azure Webjobs https : azure.microsoft.com en-us documentation articles web-sites-create-web-jobs permit to execute programs or scripts in an Azure Web App context : it s stored in an Azure Web App folder .", "Taken from the Azure SKD Samples Gitthub https : github.com Azure azure-webjobs-sdk-samples .. . .. . CustomTraceWriter.cs https : github.com Azure azure-webjobs-sdk-samples blob master BasicSamples MiscOperations CustomTraceWriter.cs .. . .. . Program.cs https : github.com Azure azure-webjobs-sdk-samples blob master BasicSamples MiscOperations Program.cs", "That appears to be just how Azure WebJobs works .", "In my experience Slowcheetah does not work with Azure Webjobs .", "I have two Azure WebJobs .", "So you need to create : .. . .. . azure-webjobs-dashboard .. . azure-webjobs-hosts .. . azure-jobs-hosts-archive .. . azure-jobs-hosts-output .. . .. . Hope it helps someone .", "I m not using the WebJobs SDK because it only supports Azure Storage .", "The code is on github at https : github.com Azure azure-webjobs-sdk .", "With Azure WebJobs you now can add long running processes .", "See asp.net aspnet overview developing-apps-with-windows-azure http : www.asp.net aspnet overview developing-apps-with-windows-azure getting-started-with-windows-azure-webjobs", "IS Azure Webjobs have its own memory allocation", "Azure WebJobs SDK now supports instance methods .", "As i understand it scheduled webjobs is just triggered webjobs that is run using Azure Scheduler if you open Azure Scheduler in management portal you can see the webjobs and even configure them in more detail .", "Specifically Azure WebJobs does not have any internal support for scheduling WebJobs relies on the Azure Scheduler to call into the .scm.azurewebsites.net website .", "I am developing an Azure WebJobs executable that I would like to use with multiple Azure web sites .", "I am new to Azure WebJobs .", "I ve run into this kind of hosting issue recently too but I had just found Azure WebJobs SDK Extensions https : github.com Azure azure-webjobs-sdk-extensions which does not deal with EventHub at all .", "See my tutorial asp.net aspnet overview developing-apps-with-windows-azure http : www.asp.net aspnet overview developing-apps-with-windows-azure getting-started-with-windows-azure-webjobs .", "Please log a bug in the public repo github.com Azure azure-webjobs-sdk issues https : github.com Azure azure-webjobs-sdk issues for this so we can improve .", "There is an ongoing Github issue https : github.com Azure azure-webjobs-sdk issues 554 about this and there is also a PR regarding a new Blob scanning strategy https : github.com Azure azure-webjobs-sdk pull 637 .", "Hi JS I ve opened an issue github.com Azure azure-webjobs-sdk-extensions issues 39 https : github.com Azure azure-webjobs-sdk-extensions issues 39 but can you use the InThreadScope", "See also blog.amitapple.com post 2015 06 scheduling-azure-webjobs http : blog.amitapple.com post 2015 06 scheduling-azure-webjobs for more info on this mechanism .", "This article was very useful : blog.amitapple.com post 2015 06 scheduling-azure-webjobs http : blog.amitapple.com post 2015 06 scheduling-azure-webjobs .VtB0WvkrJhE .", "Webjobs run as background processes in the context of an App Service web app API app or mobile app whereas Functions run using a Classic Dynamic App Service Plan .", "The Azure WebJobs SDK Core extensions https : github.com Azure azure-webjobs-sdk-extensions core-extensions contain a binding for ExecutionContext which allows you to access invocation specific system information in your function .", "http : stackoverflow.com questions 30328775 dependency-injection-using-azure-webjobs-sdk .. . .. . And for continuous webjobs .. . .. . http : www.ryansouthgate.com 2016 05 10 azure-webjobs-and-dependency-injection", "@GGleGrand if it helps Webjobs that run on the Azure Scheduler are known to have issues .", "Feel free to open a bug here : https : github.com Azure azure-webjobs-sdk .. . 2 .", "Thanks bug created here https : github.com Azure azure-webjobs-sdk issues 560", "See this page https : github.com Azure azure-webjobs-sdk-extensions blob master README.md timertrigger for more info .", "I m trying to publish a Azure website along with some azure-webjobs using Visual Studio 2013 .", "Azure PowerShell is not currently supported from the sandbox in which WebJobs runs .", "For triggered scheduled WebJobs - Console.Out Console.Error are routed to the WebJobs specific run log file also accessible using the Azure portal and stored at data jobs triggered jobName runId .", "I had a look at Extensible Triggers and Binders with Azure WebJobs SDK 1.1.0-alpha1 https : azure.microsoft.com en-us blog extensible-triggers-and-binders-with-azure-webjobs-sdk-1-1-0-alpha1 .", "Are webjobs the correct service to use", "See https : github.com Azure azure-webjobs-sdk issues 628 more for details .", "A very simple question : .. . Why would someone use the Azure Scheduler if Azure WebJobs are free", "I m in the process of migrating a couple of Jobs that were previously scheduled and run through Quartz.Net to Azure Webjobs .", "However I discovered a new preview feature Azure WebJobs as Api App on Azure new portal .", "Azure websites deployment slots are not an easy concept to understand together with WebJobs it gets a little bit more difficult .", "Friends .. . .. . I am trying to setup Continuous Integration with Azure WebJobs .", "Azure WebJobs will host your code executable that is doing the work .", "- HTTP stuff is a little wonky but it works .. . .. . Azure Functions .. . .. . Azure Functions is all about taking that core purpose of the WebJobs SDK hosting it as a service and making it easy to get started with other languages .", "I would add. . if you wish to do it in C CloudStorageAccount storageAccount .. . CloudBlobClient blobClient storageAccount.CreateCloudBlobClient the container for this is companystyles blobClient.GetContainerReference azure-webjobs-dashboard .CreateIfNotExists blobClient.GetContainerReference azure-webjobs-hosts .CreateIfNotExists blobClient.GetContainerReference azure-jobs-hosts-archive .CreateIfNotExists blobClient.GetContainerReference azure-jobs-hosts-output .CreateIfNotExists", "In Azure WebJobs one way to do this is to create a script file for each WebJob with the command-line-arguments : MyApplication.exe arg1 arg2 .", "Looking at the Kudu Azure WebJobs API docs https : github.com projectkudu kudu wiki WebJobs-API I see there are several calls I can do to manage WebJobs programmatically .", "I run several Azure webjobs on the site some of which are triggered others that are continuous .", "With that I can browse to the azure-webjobs-hosts container in the Azure portal and find the file specified by BlobName .", "For some simple single processing using Azure WebJobs with Azure Storage is a good choice but seems to be not suitable for your current needs .", "This issue was recently discussed in the public repo here http : github.com Azure azure-webjobs-sdk issues 581 .", "This might help you : .. . .. . http : nicholasjackson.github.io azure python python-packages-and-azure-webjobs", "To add to Yiding answer Azure Scheduler and Azure WebJobs actually work together and complete each other in that sense .", "Based on the comments mentioned here http : blog.amitapple.com post 2015 06 scheduling-azure-webjobs WebJobs run into the timezone configured for the WebApp where your WebJob is hosted .", "For triggered WebJobs there is support for command-line-arguments per run in the API but it is still unsupported by the Azure portal : https : github.com projectkudu kudu wiki WebJobs-API invoke-a-triggered-job .", "Just browse the storage account configured for your Azure WebJob Dashboard using a tool like Microsoft Azure Storage Explorer and delete the content of azure-jobs- and azure-webjobs- containers : .. . .. .", "We are using Microsoft.Azure.WebJobs.Script.Host.exe https : github.com Azure azure-webjobs-sdk-script wiki option-2-no-http-functionwebhook-support Queue Trigger .. . .. . How do we set the node version for Azure WebJobs", "Relationship between Azure WebSites WebJobs and Scheduler http : i.stack.imgur.com 95NbS.png .. . .. . As such it is possible to use PowerShell cmdlets for these services to setup Azure WebJobs to be triggered on schedule using Azure Scheduler .", "Scheduled WebJobs use Azure Scheduler behind the scene to trigger the webjob .", "I just updated to the newest Azure WebJobs Nuget which may be circumstantial .", "I ve opened an request Add IDependencyScope to handle scoping https : github.com Azure azure-webjobs-sdk-extensions issues 39 to the Azure Webjob team .", "As the description in your link Azure Mobile Services has been superseded by Azure App Service Mobile Apps and is scheduled for removal from Azure .", "for calling a WebJobs SDK method sample : http : thenextdoorgeek.com post WAWS-WebJob-to-upload-FREB-files-to-Azure-Storage-using-the-WebJobs-SDK .", "I can create a queue for each but how to make this work with the Azure Webjobs SDK", "C code included in the following post : .. . .. . http : chriskirby.net blog running-your-azure-webjobs-with-the-kudu-api", "If so you should be able to find that blob in your storage account azure-webjobs-hosts locks guid lockid .", "In the Beta version of Azure WebJobs SDK we changed the attribute names as described below .", "Found some further background in the github docs https : github.com Azure azure-webjobs-sdk-extensions wiki Binding-Attributes too .", "We can consider webjobs as background tasks .", "From what I understand Azure Functions seem to overlap with Azure Webjobs features and I have some difficulty to understand when to choose between Function and Webjob : .. . .. . Unlike Webjobs Functions can only be triggered it hasn t been designed to run continuous process but you can write code to create a continuous function .", "There is a sample showing how to do this here https : github.com Azure azure-webjobs-sdk-script-samples tree master WebJobScript .", "For checking-pointing you can receive a batch of events github.com Azure azure-webjobs-sdk wiki EventHub-support https : github.com Azure azure-webjobs-sdk wiki EventHub-support and the checkpoint is called once for the whole batch .", "Is there a good way to use proper dependency-injection for projects based on Azure WebJobs SDK", "Yeah @Steven I tried to find a way to implement correctly DI with Azure Webjobs.. .", "See the custom TraceWriter sample here https : github.com Azure azure-webjobs-sdk-samples blob master BasicSamples MiscOperations Program.cs .", "First of all add the JobHostConfiguration Tracing as described here in the Local Development section https : github.com Azure azure-webjobs-sdk-extensions wiki TimerTrigger .", "See the release notes here http : github.com Azure azure-webjobs-sdk wiki Release-Notes for more details on these new features .", "Looking at WebJobsShutdownWatcher source there are a couple of conditions that need to be followed for shutdown callback to run : github.com Azure azure-webjobs-sdk blob master src https : github.com Azure azure-webjobs-sdk blob master src Microsoft.Azure.WebJobs.Host WebjobsShutdownWatcher.cs", "Not for Azure web apps .", "Scheduled WebJobs are just WebJobs which have had an Azure Scheduler Job created to call our URL on a schedule but we also support the schedule property as mentioned previously .", "On Demand WebJobs aka .", "Scheduled WebJobs aka .", "Am beginner to using Azure Services In what scenarios we have to go with WebJobs RunBooks Schedulars .", "But when playing with Azure Webjobs the Webjob process never uses more than 5 of the CPU available .", "I want to do some simple debugging and Console.Writeline no longer seems to be supported by Azure WebJobs .", "I think perhaps that my reference to Azure and WebJobs in general here is a Red Herring .", "Unfortunately the WebJobs SDK does not support using Azure storage emulator as some features it uses are not supported by this emulator .", "Instead do what David suggests if you re not using any other features of the WebJobs SDK or you could use the SDK TimerTrigger which lets you run recurring work like this samples here https : github.com Azure azure-webjobs-sdk-extensions blob master src ExtensionsSample Samples TimerSamples.cs .", "In addition you should have a look at the Webjob documentation about BlobTrigger : How to use Azure blob storage with the WebJobs SDK https : azure.microsoft.com en-us documentation articles websites-dotnet-webjobs-sdk-storage-blobs-how-to .. . .. . The WebJobs SDK scans log files to watch for new or changed blobs .", "I m trying to getting Webjobs to run locally with the Azure emulator but it s generating an exception .", "This looks like the way to do it with VSTS .. . .. . https : blogs.msdn.microsoft.com tfssetup 2016 05 18 deploying-and-schedule-azure-webjobs-from-vsts-to-azure-web-app-with-bonus-cron-scheduling .. . .. . Basically .. . .. . 1 .", "I ve created some Azure Webjobs https : azure.microsoft.com en-us documentation articles websites-webjobs-resources that use triggers and I ve just learnt about Azure Functions https : azure.microsoft.com en-us documentation services functions ." ] }
{ "confidence": [ 89.71012878417969, 89.27592468261719, 84.50971221923828, 80.78407287597656, 79.04630279541016, 75.17330169677734, 73.60885620117188, 72.6836929321289, 71.70588684082031, 71.31536865234375, 71.19979858398438, 70.41122436523438, 70.26351165771484, 69.81318664550781, 69.60696411132812, 69.54472351074219, 68.73527526855469, 68.64814758300781, 68.6185302734375, 68.52162170410156 ], "content": [ "Question : Am beginner to using Azure Services In what scenarios we have to go with WebJobs RunBooks Schedulars . what is the difference between them . Comment : Have you read the documentation : - .. . Answer : Azure Scheduler https : azure.microsoft.com en-us documentation articles scheduler-intro permit to call http endpoints and send messages in Azure Storage Queues or Azure Service bus periodically . Azure Webjobs https : azure.microsoft.com en-us documentation articles web-sites-create-web-jobs permit to execute programs or scripts in an Azure Web App context : it s stored in an Azure Web App folder . We can consider webjobs as background tasks . All of the following programs or scripts are accepted .jar .js .py .php .sh .ps1 .cmd .bat . Web jobs can be executed continually periodically using CRON expression or on demand . Azure Automation Runbooks https : azure.microsoft.com en-us documentation articles automation-intro permit to execute PowerShell scripts periodically . Runbooks can access all Azure Services and external services . Azure Webjobs and Azure Automation runbooks use Azure scheduler in the background .", "Question : I m writing a WebAPI application to perform a number of long running background processing tasks . I m noticing that my test data loading task is being killed by System.Threading.ThreadAbortException even after I disable the pool recycling in IIS . I know that there is a way to run a very long running a few hours long background tasks within a Web application but I just do not know how exactly that is done - either some specific configuration settings a coding technique a Wen.config parameter etc.. . Can anyone share some practical way of doing this please Comment : This might help stackoverflow.com questions 7913034 http : stackoverflow.com questions 7913034 best-practice-longrunning-task-creation Comment : Or maybe this stackoverflow.com questions 19965342 http : stackoverflow.com questions 19965342 launching-a-long-running-process-asynchronously 20650951 20650951 Comment : In Azure a cloud service-worker role is the most robust mechanism . In WAWS you can use the WebJobs SDK for long running asynch processes . See asp.net aspnet overview developing-apps-with-windows-azure http : www.asp.net aspnet overview developing-apps-with-windows-azure getting-started-with-windows-azure-webjobs .. . Answer : You DON T want to use IIS ASP.Net to run a long running process it was not designed for that . Only use it for the initial call in Web.API to kick off your service by using MSMQ or inserting a row into a table that tells your separate process what to do . Create a separate application - either a Console application where you would use Windows Scheduler to periodically run the app and check for new work items or a Windows Service that periodically checks your work item store for work items . You can then use the ThreadPool etc to asynchronously run your process . Comment : With Azure WebJobs you now can add long running processes . See my tutorial asp.net aspnet overview developing-apps-with-windows-azure http : www.asp.net aspnet overview developing-apps-with-windows-azure getting-started-with-windows-azure-webjobs .", "Question : I ve created some Azure Webjobs https : azure.microsoft.com en-us documentation articles websites-webjobs-resources that use triggers and I ve just learnt about Azure Functions https : azure.microsoft.com en-us documentation services functions . From what I understand Azure Functions seem to overlap with Azure Webjobs features and I have some difficulty to understand when to choose between Function and Webjob : .. . .. . Unlike Webjobs Functions can only be triggered it hasn t been designed to run continuous process but you can write code to create a continuous function . You can write Webjobs and Functions using many languages C node.js python .. . but you can write your function from the Azure portal so it is easier and quicker to develop test and deploy a Function . Webjobs run as background processes in the context of an App Service web app API app or mobile app whereas Functions run using a Classic Dynamic App Service Plan . Regarding the scaling Functions seems to give more possibilities since you can use a dynamic app service plan and you can scale a single function whereas for a webjob you have to scale the whole web app . So for sure there is a pricing difference if you have an existing web app running you can use it to run a webjob without any additional cost but if I don t have an existing web app and I have to write code to trigger a queue should I use a webjob or a Function Is there any other considerations to keep in mind when you need to choose Comment : This is a blog post I owe . : I ll try to prepare a response but this may be a bit open ended for Stack Overflow so you may need to ask this on MSDN if it gets closed . Comment : So Chris let me know when it will be available . Cheers . Comment : Just replied . Let me know if there is anything you want more elaboration on . My wife is staring at me to leave work so it may be a bit rushed here and there . Comment : No worry it is not urgent Thanks a lot .. . Answer : There are a couple options here within App Service . I won t touch on Logic Apps or Azure Automation which also touch this space . Azure WebJobs .. . .. . This article https : azure.microsoft.com en-us documentation articles web-sites-create-web-jobs is honestly the best explanation but I ll summarize here . On Demand WebJobs aka . Scheduled WebJobs aka . Triggered WebJobs .. . .. . Triggered WebJobs are WebJobs which are run once when a URL is called or when the schedule property is present in schedule.job https : azure.microsoft.com en-us documentation articles web-sites-create-web-jobs CreateScheduledCRON . Scheduled WebJobs are just WebJobs which have had an Azure Scheduler Job created to call our URL on a schedule but we also support the schedule property as mentioned previously . Summary : .. . .. . + Executable Script on demand .. . + Scheduled executions .. . - Have to trigger via .scm endpoint .. . - Scaling is manual .. . - VM is always required .. . .. . Continuous WebJobs non SDK .. . .. . These jobs run forever and we will wake them up when they crash . You need to enable Always On for these to work which means running them in Basic tier and above . Summary : .. . .. . + Executable Script always running .. . - Requires always on - Basic tier and above .. . - VM is always required .. . .. . Continuous WebJobs with the WebJobs SDK .. . .. . These aren t anything from a WebJobs the feature point of view . Essentially we have this sweet SDK we wrote targeting WebJobs which lets you execute code based on simple triggers . I ll talk about this more later on . Summary : .. . .. . + Executable Script always running .. . + Richer logging dashboard .. . + Triggers supported along with long running tasks .. . - Requires always on - Basic tier and above .. . - Scaling is manual to set up .. . - Getting started can be a bit tiresome .. . - VM is always required .. . .. . Azure WebJobs SDK .. . .. . Azure WebJobs SDK is a completely separate SDK from WebJobs the platform feature . It s designed to be run in a WebJob but can really be run anywhere . We have customers who run them on worker roles and even on prem or other clouds though support is only best effort . The SDK is just about making it easy to run some code in reaction to some event and make binding to services etc . easy . This is honestly best covered in some docs https : azure.microsoft.com en-us documentation articles websites-dotnet-webjobs-sdk-get-started but the heart of it is that event + code nature . We ve also done some cool extensiblity work but that s secondary to the core purpose . Summary : .. . .. . Most of these are mentioned above .. . + You can extend and run whatever you want . Full control . - HTTP stuff is a little wonky but it works .. . .. . Azure Functions .. . .. . Azure Functions is all about taking that core purpose of the WebJobs SDK hosting it as a service and making it easy to get started with other languages . We also introduce the Serverless concept here because it made a lot of sense to do so - we know how our SDK scales so we can do intelligent things for you . Azure Functions is a very heavily managed experience . We aren t supporting bringing your own host . Currently we don t support custom extensions but its something we re investigating . We re opinionated about what you can and can t do but for the things we enable they are slick and easy to use and manage . Most of the framework things we ve done to improve Functions go through the WebJobs SDK though . For instance we ll be uploading a new NuGet for WebJobs which really drastically increases the speed of logging which has huge perf benefits for WebJobs SDK users . In shipping Functions as WebJobs SDK as a Service we ve really improved a lot of experience issues . + Lots of languages supported .. . + Fully managed dynamic scaling .. . + Easy to use portal w UX for managing connections etc . - Host not customizable yet .. . Runs in a separate app which requires some configuration in your repo but makes long term maintenance much easier . strike No tooling yet strike Some tooling is now in alpha - https : www.npmjs.com package azurefunctions .. . .. . I m probably biased since Functions is our latest and greatest but feel free to shoot more cons for Functions my way . I ll probably end up publishing a blog which elaborates a bit more but I tried to keep this as succinct as possible for this forum . Comment : Thanks Chris I am going to build some samples around Azure Function and let you know when I ll have a little be more experience with the product . Comment : Sounds awesome . DM me on Twitter @crandycodes if you have any questions . I can help you get your samples promoted on Azure.com if you d like as well if you want to share them . Comment : Chris I ve implemented a sample project that use web jobs to prove the benefit of using microservices over monolithic app . Should it be relevant to use azure function to create a sample that show how to deal with microservices and serverless azure functions Comment : I could see that being useful . I know there is a lot of room to discuss how to transition from server to serverless application patterns . That kind of seems related to what you just described . Comment : So Azure Function is running on top of the webjob sdk I ve noticed while changing some app settings that my function app is running inside a web app is that correct So functions inside the app are triggered by some kind of an internal webjob", "Question : I scheduled a webjob to run daily at 2 am using cron expression 0 0 2 following tutorial from Create a scheduled WebJob using a CRON expression https : azure.microsoft.com en-in documentation articles web-sites-create-web-jobs and my server is created in north central US region so i hope it should run in US central timezone but seems it running at different time than what i specified . .. . Answer : Based on the comments mentioned here http : blog.amitapple.com post 2015 06 scheduling-azure-webjobs WebJobs run into the timezone configured for the WebApp where your WebJob is hosted . From this post : .. . .. . enter image description here http : i.stack.imgur.com Ukik5.png .. . .. . Assuming you have not configured anything for the timezone your cron job should use UTC which is the default timezone in Azure . From Changing the server time zone on Azure Web Apps https : blogs.msdn.microsoft.com tomholl 2015 04 06 changing-the-server-time-zone-on-azure-web-apps you can specify the time zone you want your application to run in by making an application setting called WEBSITE TIME ZONE and set it to a proper value . From this blog post : .. . .. . If your app is hosted as a Web App on the Azure App Service formerly known as Azure Websites until recently you were completely out of luck . However there is now an easy and supported way to change the time zone for your w3wp process and any processes it spawns : .. . .. . All you need to do is add an Application Setting via the portal or the management APIs called WEBSITE TIME ZONE and set that to the name of the time zone as defined in the Windows Registry under HKLM Software Microsoft Windows Nt CurrentVersion Time Zones for example AUS Eastern Standard Time . Comment : I see it s running in UTC GMT timezone . Comment : Nice didn t know about the reg key . I added that to the wiki https : github.com projectkudu kudu wiki Configurable-settings set-the-time-zone .", "Question : I ve created some Azure Webjobs https : azure.microsoft.com en-us documentation articles websites-webjobs-resources that use triggers and I ve just learnt about Azure Functions https : azure.microsoft.com en-us documentation services functions . From what I understand Azure Functions seem to overlap with Azure Webjobs features and I have some difficulty to understand when to choose between Function and Webjob : .. . .. . Unlike Webjobs Functions can only be triggered it hasn t been designed to run continuous process but you can write code to create a continuous function . You can write Webjobs and Functions using many languages C node.js python .. . but you can write your function from the Azure portal so it is easier and quicker to develop test and deploy a Function . Webjobs run as background processes in the context of an App Service web app API app or mobile app whereas Functions run using a Classic Dynamic App Service Plan . Regarding the scaling Functions seems to give more possibilities since you can use a dynamic app service plan and you can scale a single function whereas for a webjob you have to scale the whole web app . So for sure there is a pricing difference if you have an existing web app running you can use it to run a webjob without any additional cost but if I don t have an existing web app and I have to write code to trigger a queue should I use a webjob or a Function Is there any other considerations to keep in mind when you need to choose Comment : This is a blog post I owe . : I ll try to prepare a response but this may be a bit open ended for Stack Overflow so you may need to ask this on MSDN if it gets closed . Comment : So Chris let me know when it will be available . Cheers . Comment : Just replied . Let me know if there is anything you want more elaboration on . My wife is staring at me to leave work so it may be a bit rushed here and there . Comment : No worry it is not urgent Thanks a lot .. . Answer : @johnnaras Yes you can create scheduled functions as you will find in the Azure Functions documentation https : azure.microsoft.com en-us documentation articles functions-triggers-bindings timer-trigger . Basically you need to modify the function.json file and add a CRON like expression or a hh : mm : ss value in the Schedule parameter . For your 30 minute triggered function it should look something like this : Comment : Jose I think you should create a new question and post your answer there because your answer is not related to this topic", "Question : I plan to use WebJobs as a lightweight substitute for NServiceBus but wanted to first verify that routine SQL Azure Database queries can be made from a triggered WebJob handler My database access will be through EntityFrameworks . This SO thread indicates that WebJobs does not support SQL Database but I hope this just means that SQL Database cannot be used as a triggering mechanism for a WebJob handler Azure Web Job - How to connect to an Azure MS SQL Database http : stackoverflow.com questions 21758043 azure-web-job-how-to-connect-to-an-azure-ms-sql-database .. . .. . I have not found a WebJob sample that issues SQL Database queries but since a WebJob has access to the same app-config as the main WebSite I assume database-connection details can be made available .. . Answer : Webjobs are any executable that can run on Azure so .NET programs will run fine . The triggering mechanism is specific and CANNOT utilize SQL Azure but you can run SQL Azure in your executable code WITHIN the webjob itself . For Example this webjob waits for the message web-jobs-testing-sql on testwebjobsqueue before executing the query on the SQL Azure database and writing the results to the text file in the configured storage container : .. . .. . Of course it would be best to store your connection-string storage container names etc . in the configuration settings of your website hosting the webjob you can do this in the app settings and connection strings sections of the configure tab in the azure portal so you don t have any settings in files accessible on the website . Comment : Thank you for the extensive code example I was hoping for positive confirmation because I want to get a pilot example of my first Azure app running without the additional burden of configuring web and worker roles plus associated costs . I should not be critical of the docs since WebJobs is in beta but I feel there is too much emphasis demonstrating how to configure WebJobs rather than how to invoke and what can be done within a WebJob . Comment : I agree but there are a few decent examples around . The one I posted is based on one of my production jobs without the SQL . Right now I m just keeping things simple while in preview and until more functionality is added but what is there will get the job done for now . I ll dig up a few more links for you and post here later . Comment : is there a way to know the IP address of the machine running the web job The reason is that I m planning to access a SQL Azure database that is protected IP filtering . Comment : @Shankar Yes the WebJobs are run on your Azure Web App instance so assuming you are not using shared instances or auto-scaling you can find the IP adresses under Properties- Outbound IP Addresses .", "Question : I have an Azure website with a production and staging slot with multiple instances . I run several Azure webjobs on the site some of which are triggered others that are continuous . I understand triggered webjobs will only run once on one instance . My current setup is : .. . .. . Production site has no deployment other than swapping from staging .. . .. . Staging website is setup to continuous-deployment from bitbucket .. . .. . Webjobs are deployed from within VS to production slot using publish to Azure since AFAIK there is no support for continuous-deployment of webjobs that are schedule based .. . .. . The VS solution for the website is different from the VS solution containing webjobs .. . .. . I noticed when I swap production and staging webjobs are also swapped I realized this when I had deployed a new webjob to production and subsequently did a website deployment followed by a swap the newly deployed webjob was no longer in the production slot My questions : .. . .. . 1 . is it possible to prevent webjobs from swapping between production and staging webjobs are really entirely different pieces of code than the website .. . .. . 2 . What exactly is swapped for webjobs Binaries Schedule Both 3 . how do i prevent all webjobs from running on the staging slot My webjobs do not need to be highly available and i can test them offline easily . 4 . If i VS deploy webjobs to the staging slot and do a swap then the current staging slot will be missing the deployed webjob and I ll lose it when i do my next website update so where should i be deploying my webjobs There is a related thread http : stackoverflow.com questions 24438789 azure-webjobs-and-deployment-slots but it assumes the webjob is deployed simultaneously with a website which is not what I have currently . I really like websites and webjobs but it seems the story related to continuous independent deployment of webjobs and websites is broken . Would really appreciate advice Thanks .. . Answer : Azure websites deployment slots are not an easy concept to understand together with WebJobs it gets a little bit more difficult . I suggest reading the following post to get a better understanding on deployment slots - http : blog.amitapple.com post 2014 11 azure-websites-slots including the comments section for useful information .. . .. . To get a better understanding on how WebJobs work and deployed see this post - http : blog.amitapple.com post 74215124623 deploy-azure-webjobs .. . .. . It is important to understand that : .. . .. . 1 . When swapping deployment slots you actually swap the content files of the website between the 2 slots . 2 . WebJobs are part of the website content . So when you swap the slot you actually swap the website files including the WebJob . Note it is a bad practice to deploy a WebJob directly and not as part of your website files repository this is probably the cause of issues you are having . To prevent WebJobs from running on the staging slot you can add an app setting called WEBJOBS STOPPED and set it to 1 in the azure portal . source https : github.com projectkudu kudu wiki Web-jobs configuration-settings . Make sure this app setting is sticky to the slot otherwise it ll propagate to the production slot . Comment : Thanks for your response Amit . I didn t know it was bad practice to deploy a WebJob directly Visual Studio Azure integration actually encourages it with a publish to Azure button in a WebJob project in VS . It seems at the very least it should not be making it that easy to follow a bad practice Is there some place I can provide that feedback to the team Git deployment was a huge win for me wrt WebJobs vs . CloudServices . This weakens the story a little bit since it means a website redeployment is necessary to update a WebJob . Comment : publish to Azure for a WebJob is the same as for a Website the problematic practice is to mix together git deployment and publish to Azure msdeploy it is best to use one deployment method . Comment : Got it do you know if i add all my webjobs to the same VS solution as my website which is git deployed when I do a commit for a change in a webjob is it going to redeploy my website even if the only update is to a webjob What about other webjobs that have not been updated I worry about how long the deployment will take if its one monolithic solution with all webjobs and a website . Comment : It will build the web app and webjobs but only deploy copy files that were changed .", "Question : I m writing a WebAPI application to perform a number of long running background processing tasks . I m noticing that my test data loading task is being killed by System.Threading.ThreadAbortException even after I disable the pool recycling in IIS . I know that there is a way to run a very long running a few hours long background tasks within a Web application but I just do not know how exactly that is done - either some specific configuration settings a coding technique a Wen.config parameter etc.. . Can anyone share some practical way of doing this please Comment : This might help stackoverflow.com questions 7913034 http : stackoverflow.com questions 7913034 best-practice-longrunning-task-creation Comment : Or maybe this stackoverflow.com questions 19965342 http : stackoverflow.com questions 19965342 launching-a-long-running-process-asynchronously 20650951 20650951 Comment : In Azure a cloud service-worker role is the most robust mechanism . In WAWS you can use the WebJobs SDK for long running asynch processes . See asp.net aspnet overview developing-apps-with-windows-azure http : www.asp.net aspnet overview developing-apps-with-windows-azure getting-started-with-windows-azure-webjobs .. . Answer : It looks like the best answer to my problem is to combine a self-hosted WebAPI with TopShelf windows service implementation . This way I can write my WebAPI controller code the usual way and those long running tasks will not get killed by IIS . Thanks everyone for your help -Eugene", "Question : Does Azure SDK provide an option to fetch the last job run time programmatically to check and apply a specific logic based on the time . .. . Answer : There really isn t an easy way to get that information programmatically . All that information is stored in the storage account that drives the WebJobs Dashboard but the storage format is tailored for the Dashboard so might not be easy to consume for your usage . We have had feature requests for something similar to what you are asking for see this issue https : github.com Azure azure-webjobs-sdk issues 623 in our public repo . Feel free to add your scenario details to that issue .", "Question : null .. . Answer : For a Azure Web App we have set environment WEBSITE NODE DEFAULT VERSION to 6.3.0 and also specified the node engine in www-server package.json : .. . .. . This seems fine - process.versions.node shows that our Web App is using node 6.3.0 . However WebJobs on the same Web App instance seems to use Node 5.9.1 instead of 6.3.0 . We are using Microsoft.Azure.WebJobs.Script.Host.exe https : github.com Azure azure-webjobs-sdk-script wiki option-2-no-http-functionwebhook-support Queue Trigger .. . .. . How do we set the node version for Azure WebJobs We need at-least 6.1.0 Comment : I test a nodejs webjob with simple script console.log process.versions.node it works fine on my side . What s your entire application looks like Comment : @ Gary Liu http : stackoverflow.com users 4989668 gary-liu-msft process.versions.node gives you a version 5.9.1 Comment : 6.3.0 as I set of WEBSITE NODE DEFAULT VERSION at App settings Comment : I verified that WEBSITE NODE DEFAULT VERSION is set to 6.3.0 but when a node script is run via the WebJob process.versions.node gives version 5.9.1 . I m not sure what s wrong . Thanks for your answer Comment : Are you using azure webjob SDK to invoke the node.js script but leveraging original pure Azure Web Apps node.js environment", "Question : I m testing out Azure Webjobs . I wrote a console-application which polls a SQL database for new work and processes it . I m not using the WebJobs SDK because it only supports Azure Storage . I upload the job it runs and then it fails with a exception that says it wasn t able to connect to the SQL Database instance . I m wondering what connection-string is being used is it getting the connection-string from the Azure Website . The logs give me this : .. . .. . I would like to write data to these logs like what is the connection-string that is being used . I tried Console.WriteLine Debug.WriteLine Console.Error.WriteLine . None of them show up in the in my WebJob log . Apparently I could get the data by just raising an exception with the message text showing what I want but there must be a better way How do I write SYS INFO lines and ERR lines to the log Comment : you wrote my question for me . Going to look for an answer . Can you please drop an answer here if you do resolve it .. . Answer : Regarding logs : .. . .. . For continuous WebJobs - Console.Out and Console.Error are routed to the application logs they will show up as file blob or table storage depends on your configuration of the application logs similar to your Website . Also the first 100 lines in each invocation will also go to the WebJob log file to ease debugging pain when the WebJob fails at startup accessible using the Azure portal but also saved on your site s file system at data jobs continuous jobName . For triggered scheduled WebJobs - Console.Out Console.Error are routed to the WebJobs specific run log file also accessible using the Azure portal and stored at data jobs triggered jobName runId . Console.Out is treated marked as INFO and Console.Error as ERROR . Regarding connection strings : .. . .. . You can access your connection strings the same as in your website using the ConfigurationManager class for WebJobs not written in .NET you can find these connection strings and app settings as environment-variables all the same as with your Website . Comment : I believe once you turn application logging on it turns itself off in 12 hours . Something to keep in mind . Comment : True for file system blob storage and table storage will not turn off . Comment : Only unfortunate thing I have noticed is that console output written during a job execution is not logged with the job itself as far as I can tell any debug output you write has to be in the exception message if you want more context around a failure case .", "Question : A very simple question : .. . Why would someone use the Azure Scheduler if Azure WebJobs are free .. . .. . I couldnt find any topic regarding azure-webjobs vs azure scheduler .. . .. . The main difference is that the webjob contains everything that the scheduler can do : .. . .. . .. . Scheduler can make HTTP calls .. . .. . WebJob can do that and more run SQL commands etc .. . Answer : 1 . Continuous jobs are monitored and if they exit they are re-executed . In this way they act more like services in your local machine . There is a module that monitors and keeps your app working . Always-ON is a feature that will help your site stay alive and hence your webjobs to continuously run . 2 . Scheduler is used to trigger the webjobs . It uses the scheduler user account not the back-end account . This way you can move out of the free tier for scheduler sign up to higher tiers to suit your needs . But essentially all the scheduler is doing is hitting an https endpoint which is public but required your auth . 3 . Triggered jobs scheduled and on demand are invoked by an https call . These calls are load balanced - much in the same way that a web app with many instances is load balanced . Continuous jobs run concurrently by default but can be set to be a singleton .", "Question : I m in the process of migrating a couple of Jobs that were previously scheduled and run through Quartz.Net to Azure Webjobs . Using Quartz.Net allowed me to have all the very compact Job Classes in the same project as the console program entry-point initializing the scheduler . Now I would like to retain that structure without having to create a discrete console-application project for each and every web job . Is there currently any way to configure a command-line argument for continuous web-job that would allow to branch internally to the correct job depending on the command-line argument .. . Answer : In Azure WebJobs one way to do this is to create a script file for each WebJob with the command-line-arguments : MyApplication.exe arg1 arg2 . Another would be to select the method to run by the current WebJob name which you can get from the environment variable WEBJOBS NAME . For triggered WebJobs there is support for command-line-arguments per run in the API but it is still unsupported by the Azure portal : https : github.com projectkudu kudu wiki WebJobs-API invoke-a-triggered-job . Comment : I ve been experimenting with ps-scripts as intermediate but WEBJOBS NAME sounds good as well . Comment : Can you elaborate a bit more about the first option you mentioned - creating a script with parameters How to tell the web job to run a script instead of executing the console app exe Also I can t see any env variables referring to webjobs in my kudu console . Comment : @andy250 create a run.cmd file with your script it will always be the script selected to run . you won t see the env variables of a webjob on kudu console as it s not running as a webjob you can create a webjob with a script that prints out all env variables and then look at the log .", "Question : Friends .. . .. . I am trying to setup Continuous Integration with Azure WebJobs . I have a Web and a WebJobs project in the solution . I have continuous-integration and deployment already setup for the web app in Visual Studio Online .visualstudio.com . I also connected the WebJobs and the Web app using the Visual Studio ASP.Net extensions - Right click the WebSite project in VS 2013 Add Existing Azure WebJob project . It created webjobs-list.json file in the website project . I was expecting that when the Web app deployment happens to Azure Website after the Visual Studio Online build it will deploy the WebJobs too . But it is not doing so . How do we automate the WebJobs deployment after Visual Studio Online build in visualstudio.com .. . Answer : This looks like the way to do it with VSTS .. . .. . https : blogs.msdn.microsoft.com tfssetup 2016 05 18 deploying-and-schedule-azure-webjobs-from-vsts-to-azure-web-app-with-bonus-cron-scheduling .. . .. . Basically .. . .. . 1 . Use VS to link your web job to a web app . 2 . Create a new Buildtask that uploads the WebJob.zip file . 3 . Profit .", "Question : I have a simple Azure WebJob written in Python that utilizes the azure python package which is located in a venv within my solution . The job executes as expected on my local machine but when I deploy it to the Azure WebJob instance I get the following error : .. . .. . ImportError : No module named azure.storage.table .. . .. . The actual .py is as follows : .. . .. . How do I access the azure package from the WebJob instance why doesn t MS make this package universally accessible to all Python WebJob instances .. . Answer : By default if you leverage venv in your python application on Azure Web apps after you deploying your web app to Azure the venv folder will locate in D : home site wwwroot env . And also the python libraries will lie at D : home site wwwroot env Lib site-packages . You can install the python libs in your web app and leverage this absolute address in your python web job scripts to load the libs in your python web application . Please try the following test script in WebJobs : Comment : The underlying web app is an ASP.NET WebApi . I m assuming that your answer is only applicable to Python based web apps in Azure . Comment : The general idea is the same even if you only use python env in webjob . You can generate a python env with your libs similar to azure.microsoft.com en-us documentation articles https : azure.microsoft.com en-us documentation articles web-sites-python-create-deploy-django-app web-app-development---windows---python-tools-for-visual-studio and package the env with your python webjob script modify the sitepackage to the relative-path as env Lib site-packages deply to Azure WebJobs together .", "Question : I ve tried to come up with something from the example in the WebJobsSDK gitHub .. . .. . But I m afraid that s not far enough for someone of my limited skillset I can find no instance of JobHostConfiguration that has a UseEventHub property using the v1.2.0-alpha-10291 version of the Microsoft.AzureWebJobs package so I can t pass the EventHubConfiguration to the JobHost . I ve used EventHub before not within the WebJob context . I don t see if the EventHostProcessor is still required if using the WebJob triggering...or does the WebJob trigger essentially act as the EventHostProcessor Anyway if anyone has a more complete example for a simpleton like me that would be really sweet Thanks .. . Answer : EventProcessorHost is still required as the WebJob just provides the hosting environment for running it . As far as I know EventProcessorHost is not integrated so deeply into WebJob so its triggering mechanism cannot be used for processing EventHub messages . I use WebJob for running EventProcessorHost continuously : Comment : Thanks Attila I ve done it that way before but I think in the new pre-release of azure-webjobs-sdk it s supposed be more deeply integrated . Using the Trigger mechanism in a similar way to webjobs with ServiceBus...I just can t figure it out from the wiki . github.com Azure azure-webjobs-sdk wiki EventHub-support https : github.com Azure azure-webjobs-sdk wiki EventHub-support Comment : I ve run into this kind of hosting issue recently too but I had just found Azure WebJobs SDK Extensions https : github.com Azure azure-webjobs-sdk-extensions which does not deal with EventHub at all . My main concern with the WebJob SDK EventHub support https : github.com Azure azure-webjobs-sdk wiki EventHub-support is its automatic checkpointing after processing messages : a in high throughput scenarios it might degrade performance b how to retry processing messages after a temporary processing failure eg . : permanent storage is not available . Comment : The new EventHubTrigger attribute in the service bus extension will handle the listening for you . It will create an EventProcessHost . For checking-pointing you can receive a batch of events github.com Azure azure-webjobs-sdk wiki EventHub-support https : github.com Azure azure-webjobs-sdk wiki EventHub-support and the checkpoint is called once for the whole batch .", "Question : I want to do some simple debugging and Console.Writeline no longer seems to be supported by Azure WebJobs . I know using a TextWriter class is the answer and I just inject it into my method . What I don t understand is how I call that method . I cannot invalidate my Main method-signature and inject it there . What am I missing please Comment : you can debug via visual-studio blogs.msdn.com b webdev archive 2014 11 12 http : blogs.msdn.com b webdev archive 2014 11 12 new-developer-and-debugging-features-for-azure-webjobs-in-visual-studio.aspx Comment : I use Console.Writeline and it works fine.Obviously after some time the output window on SCM site will be full and you ll not see more lines . But for small and simple debug it s fine . IMHO Comment : Console.Writeline does work fine thank you . I thought that each time I published it would re-start my Web Job . It wasn t and so the changes I were making using Console.Writeline we not being run . I d still be interest if anyone can tell me how this TextWriter can be used . .. . Answer : While the above are correct you can also create your own custom TraceWriter instance that intercepts Trace calls in your application . Example of a TraceWriter class : .. . .. . Then in your JobHostConfuration setup you register your instance of the TraceWriter class in the main method of the console-application . I.e in Program.cs . This way you can do other things with the trace such as write to an external service or create alerts . Taken from the Azure SKD Samples Gitthub https : github.com Azure azure-webjobs-sdk-samples .. . .. . CustomTraceWriter.cs https : github.com Azure azure-webjobs-sdk-samples blob master BasicSamples MiscOperations CustomTraceWriter.cs .. . .. . Program.cs https : github.com Azure azure-webjobs-sdk-samples blob master BasicSamples MiscOperations Program.cs", "Question : azure-functions are a special type of App Service on Azure . The other main Azure App Services web-api support multiple deployment slots on a sufficient App Service Plan S1 and up . It seems likely that this is also an option for azure-functions but I can not find the configuration area . Am I just not finding it or is this functionally not available for azure-functions .. . Answer : Deployment slots are not supported at this time in Azure Functions . However they will be supported going forward . Slots raise some interesting issues and we want to make sure we tackle them before enabling this . Comment : I guess in the mean time a lot of the same functionality can be emulated by either using the webjobs-script-sdk in a traditional continuous webjob or by setting up multiple azure-function apps to treat a slots .", "Question : I have an Azure website with a production and staging slot with multiple instances . I run several Azure webjobs on the site some of which are triggered others that are continuous . I understand triggered webjobs will only run once on one instance . My current setup is : .. . .. . Production site has no deployment other than swapping from staging .. . .. . Staging website is setup to continuous-deployment from bitbucket .. . .. . Webjobs are deployed from within VS to production slot using publish to Azure since AFAIK there is no support for continuous-deployment of webjobs that are schedule based .. . .. . The VS solution for the website is different from the VS solution containing webjobs .. . .. . I noticed when I swap production and staging webjobs are also swapped I realized this when I had deployed a new webjob to production and subsequently did a website deployment followed by a swap the newly deployed webjob was no longer in the production slot My questions : .. . .. . 1 . is it possible to prevent webjobs from swapping between production and staging webjobs are really entirely different pieces of code than the website .. . .. . 2 . What exactly is swapped for webjobs Binaries Schedule Both 3 . how do i prevent all webjobs from running on the staging slot My webjobs do not need to be highly available and i can test them offline easily . 4 . If i VS deploy webjobs to the staging slot and do a swap then the current staging slot will be missing the deployed webjob and I ll lose it when i do my next website update so where should i be deploying my webjobs There is a related thread http : stackoverflow.com questions 24438789 azure-webjobs-and-deployment-slots but it assumes the webjob is deployed simultaneously with a website which is not what I have currently . I really like websites and webjobs but it seems the story related to continuous independent deployment of webjobs and websites is broken . Would really appreciate advice Thanks .. . Answer : Here s Amit s answer to 3 using PowerShell", "Question : null .. . Answer : I have a very small website that almost do nothing by now and we are implementing webjobs to do sometime-heavy background things like loading and processing information that needs to be filtered and prepared to then be showed at the web . Everything is perfect when running in debug mode from our machine . The same code also run perfect and with high performance if I put the same code in an app and then run from an Azure Virtual Machine . But when playing with Azure Webjobs the Webjob process never uses more than 5 of the CPU available . No matter what I do . I already try to change the job configuration by modifying batch size and NewBatchThreshold but nothing change . The problem is not on the way Azure interacts with the queue but on some processing restrictions after that . My ideal escenario for CPU usage in the future would be : .. . .. . 10 assigned to the website .. . 90 divided into two separate webjobs .. . .. . The problem that scenario now looks impossible as I m being restricted to something like from 3.5 to 5 of CPU usage on the webjob . Any ideas Thanks Comment : are you running multiple cores i could be wrong but i think a webjob is limited to only one core so if you re running on a 4 cores instance a single webjob will not exceed 25 of total CPU utilization you would have to deploy 4 of the same webjob on a 4 cores instance to be able to utilize all 4 cores someone please correct me if i m wrong though Comment : @minwyn Thanks for the comment . Interesting what you are saying but I was running on a single core instance to see if that was the issue but the thing is that never goes up more than 5 . I even define a test rule to scale if CPU goes over 10 and it never scale up in a single core instance . I was thinking on deploying multiple instances of the same task by creating multiple webjobs but didn t sound like a good practice or at least a practice I like as a feature . Comment : @femaramburu i agree that deploying multiple of the same webjob doesn t sounds like good practice there is already a request to improve webjob to be able to run on multiple cores see here feedback.azure.com forums 169385-web-apps-formerly-websites https : feedback.azure.com forums 169385-web-apps-formerly-websites suggestions 7454605-webjobs-better-scalability-support-needed Comment : Are you using Async-Await pattern in you webjob functions my webjobs interact with the storage account quite a bit queues tables blobs and they seemed to spend most of the time reading writing things from to the storage account . Switching my functions to async improved the overall performance significantly and the CPU usage wen significantly up too.. . Comment : @RafalZajac Yes . I m using await pattern . The webjobs interacts a lot with storage but using just 5 of the cpu sounds like too small . Thanks anyway ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
hpx@c++@33
hpx -- hpx is a general purpose @placeholder runtime system for parallel and distributed applications of any scale .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
directdraw@api@42
directdraw -- directdraw is a deprecated @placeholder that used to be a part of microsoft s directx api .
{ "confidence": [ 56.116634368896484, 52.309593200683594, 45.784400939941406, 45.00401306152344, 44.594459533691406, 43.95751190185547, 43.38762664794922, 43.38762664794922, 43.34892654418945, 42.88519287109375, 42.3153076171875, 41.592472076416016, 40.52358627319336, 40.52358627319336, 40.52358627319336, 40.52014923095703, 40.52014923095703, 39.91169357299805, 39.390010833740234, 39.390010833740234, 39.234947204589844, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 39.18156433105469, 37.94026184082031, 37.65774154663086, 37.53224182128906, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.915855407714844, 35.683773040771484, 35.683773040771484, 35.47758483886719, 34.843536376953125, 34.843536376953125, 34.6114501953125, 33.55833053588867, 33.13335418701172, 33.13335418701172, 33.13335418701172, 32.2752571105957, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 31.5169677734375, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.44464683532715, 30.441139221191406, 30.441139221191406, 29.159442901611328, 29.159442901611328, 29.159442901611328, 29.159442901611328, 29.159442901611328, 29.159442901611328, 29.159442901611328, 28.824752807617188, 28.824752807617188, 28.3497314453125, 27.752431869506836, 27.42576026916504, 27.42576026916504, 27.347721099853516, 25.953466415405273, 25.80937385559082, 25.80937385559082, 25.80937385559082, 25.80937385559082, 25.80937385559082, 24.73705291748047, 23.846498489379883 ], "content": [ "DirectDraw is deprecated .", "But I was disappointed to discover that DirectDraw is deprecated .", "Use DirectDraw .", "Is there any DirectDraw replacement", "I think that there is some possible bypass of DirectDraw API .", "Isn t it true that DirectDraw can be used in conjunction with the GDI", "There is no error string provided by DirectDraw .", "I ve created a DirectDraw proxy .", "However I am told DirectDraw is deprecated in newer versions of Windows", "It only does this when the DirectDraw stuff is actually used .", "DirectDraw : overlay methods", "Should I go for Direct3D or DirectDraw", "That said you can just get hold of the DirectDraw headers I believe they are in the Windows SDK and continue using DirectDraw .", "I know DirectDraw works from NT4 and up although DirectDraw is emulated on NT4 with GDI .", "I d just write a DirectDraw wrapper that emulated exclusive mode using DirectDraw windowed mode .", "Have I fundamentally misunderstood DirectDraw", ".. . .. . The note is repeated for the next DirectDraw entry .", "I ve achieved the best results with DirectDraw surfaces and their Flip switching current surface s image to secondary one : .. . .. . But DirectDraw is very outdated and I look for a way to reimplement this functionality based on modern DirectX libraries .", "I have a code which was developed during the DirectX 6 era it uses Direct2D DirectDraw BitBlt .", "When I failed executing a DirectDraw method how to get the failure error string in DirectX 7", "Btw you are talking DirectShow not DirectDraw .", "How do we implement this feature with DirectDraw", "Is there a way to make a directdraw application displaysettings-proof", "You may need to shutdown and reinitialise DirectDraw .", "I couldnt understand why directdraw is outdated .", "I m trying to hook the SetCooperativeLevel function in the DirectDraw object .", "I m modding an old Windows DirectDraw game .", "Or is there a faster approach using a different library - say DirectDraw", "Is there any reason to prefer DirectDraw or Direct3D over SetDIBitsToDevice", "As for the DirectDraw vs Direct3D and not the GDI calls discussion .", "asking about DirectDraw and not about DirectX because I need to support Win2000 and up and I cannot install DirectX on target PC", "I believe DirectDraw has been deprecated since 8.0 or so and 9.0 has been around for quite a long while .", "Using DirectDraw I would use BltFast method on the IDirectDrawSurface7 with logical operation .", "If you use DirectDraw blit functionality then it will be quite a task to port it .", "DirectDraw is able to make use of calls from the Windows GDI using IDirectDrawSurface GetDC .", "OpenGL is equivalent to DirectDraw in Linux BSD and Mac and in Windows too .", "Only someone with deep understanding of DirectDraw and WinApi could know .", "This doesn t work however when I m drawing in the window using DirectDraw .", "Is there something inherent in DirectDraw surface that conflicts with layered window color keying", "If anyone knows a more efficient way to use DirectDraw Direct3D please comment .", "Also you say that in DirectDraw it is possible to get access to the hardware blitters .", "I know almost nothing about DirectDraw and or DirectX but I ve been helping port an old Windows 9x game to Windows 8 .", "If you go to www.trueharmoniccolours.co.uk under Coding- DirectX you can see some code DirectDraw I wrote 13 years ago .", "Is there any recommended approach hopefully with examples to upgrade code from DirectDraw to newer API", "I m working on modernizing a game that uses DirectDraw so that the application is 64 bit .", "you said in your earlier comment that the other application doesn t use DirectDraw .", "Several good points are made in this http : www.gamedev.net page resources technical directx-and-xna directdraw-programming-tutorial-r608 blog post .", "by helping me to develop this filter with my limited DirectDraw knowledge the bounty is yours .", "DirectDraw rectangles are like GDI rectangles in that they cover the area up to but not including the right column and bottom row .", "I ve just rebuilt my old DirectDraw based game and I m very happy with the results", "My question : how to port my DirectDraw based 2D game to the recent DircetX SDK", "Yesterday I found source codes for my Tetris game developed many years ago in C++ Win32 API and DirectDraw 7 .", "We re maintaining an old video game that uses a full-screen 256-color graphics mode with DirectDraw .", "You acquire and release the device context as normal but through DirectDraw and not a GetDC ReleaseDC pair .", "I have a directdraw application in c that becomes black in color once the user rotates the screen using a button on the application .", "I have a bunch of images in jpeg format and i would like to batch convert them to .dds DirectDraw surface .", "The game uses DirectDraw for rendering and on Windows 8 the GUI of the game has major artifacts .", "I have access to the code I can show you how we re loading bitmaps initializing DirectDraw whatever .", "When i m setting an alpha value using SetLayeredWindowAttributes that seem to work fine with the DirectDraw surface and it does indeed appear translucent .", "As I mentioned in the question I have no problem using alpha blending on this window with DirectDraw .", "The game works with a very old directDraw version there is no documentation at all about this version most of my work is based on guesses and tests .", "Since it was using DirectDraw in exclusive mode it was probably setting the palette directly in the video-card and GDI had no notion of what that palette was .", "Interesting - in my tests stackoverflow.com questions 4128441 http : stackoverflow.com questions 4128441 DirectDraw comes out slower than GDI .", "So there is a reason to prefer Direct over GDI on these machines - since DirectDraw and Direct3D use the former method and GDI uses the latter", "DirectDraw suffered from similar issues as well .. . but you also had access to the hardware blitters so it was generally more useful .", "IHVs also tended to put more time in to writing proper drivers for DirectDraw because of its gaming association .", "I am attempting to author a single buffered windowed application using the original DirectDraw interface .", "I ve been attempting to get DirectDraw to function on a CE5.0 framework for the last week and I m running into some very odd issues .", "I am using a Full Screen application that is using DirectDraw functions for display and it is working fine .", "I can access the other application only when I close the directdraw full screen application .", "I looked into this some time ago and found that the way its done is to hook the DirectDraw APIs and insert your own rendering in there .", "Sorry I forgot to mention that the other application doesn t use DirectDraw it uses regular GDI calls .", "As long as the first application using DirectDraw is full screen I cant see the other application window using GDI", "Unfortunately MSDN got it wrong and added the GetProcAddress remark to EVERY DirectDraw function even the COM interfaces methods .", "I have aquired a proxyDLL for DirectDraw but none of the proxied functions get called but the game works with the proxyDLL .", "So maybe either you aren t using Aero anyway or your program doesn t use DirectDraw as described .", "In DirectDraw you can create a surface from the data in memory by setting up certain fields in the DDSURFACEDESC structure and passing it to the CreateSurface method of the IDirectDraw interface .", "Oh and this only works for system-memory surfaces so it s probably needed to add the DDSCAPS SYSTEMMEMORY flag in the ddsCaps.dwCaps field if DirectDraw won t do it by default .", "I ve been having an issue for a while in regards to getting DirectDraw to function on a CE5.0 system .", "So far I can only guess that DirectDraw surfaces are simply not supported on x64 .", "Right now it works correctly by drawing the text in the OnPaint method using GDI and the video on a DirectDraw overlay .", "I can draw the video using DirectDraw with a back buffer and copy it to the primary buffer just fine .", "Is there a way to draw the text directly to a DirectDraw buffer or memory buffer or something and then blt it to the back buffer", "Also people say that as they are already DirectDraw Surfaces they load in much much quicker too .", "This question http : stackoverflow.com questions 1944032 capture-camera-stream-to-screen will help you get some details about DirectDraw .", "DirectDraw is one way of displaying stuff on the screen and forms with regions that are created on the fly as masks from so called transparent key color are done with GDI .", "I found DirectDraw hack which seems to be the fix you mentioned It doesn t work for the game i m working with but i will try to adapt it to my situation .", "I had a full screen Game of Life which was bottle-necked on pixel drawing when I used GDI and after I switched to DirectDraw I started to pump out 60 fps easily .", "Is there any way we can display the other application s window on top of the full screen DirectDraw function and then resume back once the other window is closed", "First you need to tell DirectDraw which fields of the DDSURFACEDESC structure contain the correct information by setting the dwFlags field to the following set of flags : DDSD WIDTH DDSD HEIGHT DDSD PIXELFORMAT DDSD LPSURFACE DDSD PITCH .", "When you create the surface this way keep in mind that DirectDraw will not manage its data buffer himself and won t free this memory once you call Release on your surface .", "UPDATE : DirectX Tool Kit for DirectX 12 https : github.com Microsoft DirectXTK12 is now available .", "From the link you provided it s DX 7 not DX 3 DirectDraw was merged to Direct3D from DirectX 8 so the one who want to use DDraw always choose DX 7 . notice file name on the page .", "I found that setting the GDI palette using Create SelectPalette before setting the DirectDraw palette using IDirectDrawPalette : : SetEntries would restore the palette after it became corrupted WM PALETTECHANGED handler .", "When these windows cover are in front of another form which has a DirectDraw video surface the foreground form flickers partly showing the form and partly showing the video beneath .", "Flickering scenario http : i.stack.imgur.com bSTK4.jpg .. . .. . Does anyone have experience with DirectDraw surfaces flickering when combined with Windows Forms that are in some form or other set up to be transparent", "I m kinda new to DirectDraw so i really have no idea how i would emulate windowed mode based on the fullscreen do you have any reference on that", "DirectDraw 7 is still documented online : msdn.microsoft.com en-us library windows desktop gg426124.aspx https : msdn.microsoft.com en-us library windows desktop gg426124.aspx", ".. . .. . .. . .. . .. . .. . DirectDraw Lock .. . .. . Windows 7 : Applications manifested for Windows 7 cannot .. . .. . Windows Vista default : Applications will be able to .. . Running the application turns off Desktop Window Manager https : en.wikipedia.org wiki Desktop Window Manager .", "Many years ago I used DirectX for other things but everything I ve seen says to get off of DirectX go Direct2D ." ] }
{ "confidence": [ 64.88215637207031, 58.562416076660156, 57.02266311645508, 51.62297821044922, 51.24708938598633, 50.85908508300781, 50.086456298828125, 49.610801696777344, 47.75292205810547, 47.566898345947266, 47.43849182128906, 46.1707878112793, 45.521854400634766, 45.49488830566406, 45.25255584716797, 44.714210510253906, 44.70197677612305, 43.92290496826172, 43.24305725097656, 42.91484832763672 ], "content": [ "Question : I ve just rebuilt my old DirectDraw based game and I m very happy with the results It was one of my first C++ programs in a diectx world . But I was disappointed to discover that DirectDraw is deprecated . After installing DirectX SDK July 2010 there is no ddraw.h and ddraw.lib . My question : how to port my DirectDraw based 2D game to the recent DircetX SDK Is there any DirectDraw replacement What about OpenGL Any idea would be appreciated .. . Answer : Take a look at Direct2D http : msdn.microsoft.com en-us library windows desktop dd370990 28v vs.85 29.aspx . A tutorial can be found here for instance http : www.codeproject.com Articles 95054 Programming-Direct2D-Part-1 .", "Question : Yesterday I found source codes for my Tetris game developed many years ago in C++ Win32 API and DirectDraw 7 . I tryed to build solution without any success because most recent DirectX SDK June 2010 http : blogs.msdn.com b chuckw archive 2010 06 16 wither-directdraw.aspx does not include DDraw.h and DDraw.lib any more . Is there any recommended approach hopefully with examples to upgrade code from DirectDraw to newer API Or should I simply install older DirectX SDK Comment : They were moved to the Windows SDK . .. . Answer : If you use DirectDraw blit functionality then it will be quite a task to port it . In my opinion your best option is to port it to GDI . It may mean writing your own blit functions however . Failing that you could port to D3D though this will be quite a task and is really dependent on how you do your rendering . If all your rendering is performed using blits and no direct frame buffer access then it should be relatively straight forward to port it to D3D . It will also provide you with HUGE speed boosts . That said you can just get hold of the DirectDraw headers I believe they are in the Windows SDK and continue using DirectDraw . Comment : I just downloaded and installed latest Windows SDK ddraw.h is include but ddraw.lib is not there . But I m marking your answer because you pointed me to the right direction . Actually I have to use ddraw.dll directly it is described in the link I posted in my initial question . Comment : That s bad news for me . I have a code which was developed during the DirectX 6 era it uses Direct2D DirectDraw BitBlt . I don t want to port it to D3D since it s not 3D at all . If Windows SDK has the headers then the functionality should be somewhere also .", "Question : Yesterday I found source codes for my Tetris game developed many years ago in C++ Win32 API and DirectDraw 7 . I tryed to build solution without any success because most recent DirectX SDK June 2010 http : blogs.msdn.com b chuckw archive 2010 06 16 wither-directdraw.aspx does not include DDraw.h and DDraw.lib any more . Is there any recommended approach hopefully with examples to upgrade code from DirectDraw to newer API Or should I simply install older DirectX SDK Comment : They were moved to the Windows SDK . .. . Answer : There is no ddraw engine in DirectX SDK June 2010 . You should find ddraw in windows sdk . You can find ddraw.h in windows sdk but there is no ddraw.lib neither . how to use use ddraw.dll .", "Question : null .. . Answer : I m modding an old Windows DirectDraw game . I ve created a DirectDraw proxy . It logs every IDirectDraw and IDirectDrawSurface call . The backbuffer looks like this after one BltFast call : .. . .. . enter image description here http : i.stack.imgur.com fAoZK.png .. . .. . And like this before the next BltFast call : .. . .. . enter image description here http : i.stack.imgur.com WBGks.png .. . .. . These pictures are dumped by Lock ing-copying- Unlock ing the backbuffer before and after any BltFast call . There are no other IDirectDraw Surface calls between these two BltFast calls especially no Lock Unlock calls . How is this possible Comment : Completely wild guess : Is it posslble the second image is somehow the result-of the first BltFast call that hadn t actually made it through the pipeline in time for the first Lock copy Unlock Comment : Well.. . I don t think so.. . This API is direct and synchronous as far as I know . I think that there is some possible bypass of DirectDraw API . Only very dynamic objects are drawn thia way . Only someone with deep understanding of DirectDraw and WinApi could know . Comment : Isn t it true that DirectDraw can be used in conjunction with the GDI In which case you should probably take a look at potential GDI or GDI+ calls that modify the said back buffer", "Question : I m currently writing a simple game . My graphics code runs once per frame approximately 30 times per second and writes RGB data to an array with 640 480 307200 entries . I have created a Win32 window with a client area exactly 640 x 480 pixels in size . What s the fastest way to get my RGB data displayed within the otherwise-empty window The window will need to be updated every frame so I need to avoid flickering . Should I use GDI for this Or is there a faster approach using a different library - say DirectDraw Edit : .. . .. . Thanks for all the replies . Firstly let me rule out Direct2D as an option - I need to support Windows XP . Secondly I have a background in 3D so the method suggested by Yann Ramin and Ben Voigtto - use Direct3D OpenGL and a single textured quad - is how I ve always done this in the past . However I was interested to find out whether a 2D API would be a better solution . Since there has been no definite answer I threw together a test program . The code simply displays a framebuffer on the screen repeatedly as fast as possible . I ve posted my results as part of this follow-up question http : stackoverflow.com questions 4128441 why-not-use-gdi-to-repeatedly-fill-a-window-with-rgb-data-from-an-array . .. . Answer : Use DirectDraw . I had a full screen Game of Life which was bottle-necked on pixel drawing when I used GDI and after I switched to DirectDraw I started to pump out 60 fps easily . Comment : DirectDraw is deprecated . While the API is still there its receiving no love . Comment : it s been a while seems that Direct2d is new cool . Comment : Interesting - in my tests stackoverflow.com questions 4128441 http : stackoverflow.com questions 4128441 DirectDraw comes out slower than GDI . Were you using a different approach to mine with one or both APIs Comment : please note I mentioned not bit bliting but setpixel calls . I m surprised to see 2K fps . you sure that the calls don t set short-circuited somehow Comment : Looking again I think some of the calls may indeed be getting short-circuited.. .", "Question : I am using a Full Screen application that is using DirectDraw functions for display and it is working fine . Now I want to show another application with its own window but the other application is hidden behind the full screen Direct Draw application when launched . I can access the other application only when I close the directdraw full screen application . Is it possible to switch to another application from a direct draw full screen application while running Is there any way we can display the other application s window on top of the full screen DirectDraw function and then resume back once the other window is closed Thanks and regards .. . Answer : I looked into this some time ago and found that the way its done is to hook the DirectDraw APIs and insert your own rendering in there . Basically after the other app is done drawing the scene and is about to present the backbuffer your code jumps in and does its own thing . I never got it working myself but that seems to be the approach . I don t think there s any easy way to do it though . One other option would be to see if the other app can run in fullscreen windowed mode . Basically no borders filling the whole screen but not technically fullscreen exclusive mode . If it supports that then you can make a topmost window which will display over top of it . Comment : Sorry I forgot to mention that the other application doesn t use DirectDraw it uses regular GDI calls . Any idea if the above is possible if the other application creates a normal window or displays a Message box Right now those are hidden behind the first application . Comment : If its just using a fullscreen window with GDI calls then try making your window topmost . See msdn.microsoft.com en-us library windows desktop http : msdn.microsoft.com en-us library windows desktop ms633545 v vs.85 .aspx for the SetWindowPos call . You can provide an argument there to make your window topmost and it ll show on top of the fullscreen window . Comment : @Nerdton I tried the SetWindowPos and other APIs but still I cant see the other window . As long as the first application using DirectDraw is full screen I cant see the other application window using GDI Comment : you said in your earlier comment that the other application doesn t use DirectDraw . now you re saying it does . The SetWindowPos with topmost will work if its a regular GDI window that happens to be fullscreen . If the app is a DirectX exclusive full screen app then SetWindowPos won t work and then you get into what I mentioned earlier and having to do DLL injection and API hooking to get your draw code inserted in that other application .", "Question : This is a follow-up to this question http : stackoverflow.com questions 4120542 whats-the-fastest-way-to-repeatedly-fill-a-window-with-rgb-data-from-an-array . I m currently writing a simple game and am looking for the fastest way to repeatedly display an array of RGB data in a Win32 window without flickering or other artifacts . Several different approaches were recommended in the answers to the previous question but there was no consensus on which would be the fastest . So I threw together a test program . The code simply displays a framebuffer on the screen repeatedly as fast as possible . These are the results I obtained for 32-bit data running in a 32-bit video mode - they may surprise some people : .. . .. . Given these figures : .. . .. . Why are many people adamant that GDI is simply too slow for this operation Is there any reason to prefer DirectDraw or Direct3D over SetDIBitsToDevice .. . .. . Here is a brief summary of the calls made by each of the Direct codepaths . If anyone knows a more efficient way to use DirectDraw Direct3D please comment . Comment : I m not an expert in this field but I would definitely run this experiment on several different types of graphics hardware before I - ahem - draw any conclusions . Comment : How are you composing the RGB data Unless you need hardware-acceleration to compose the image I wouldn t expect DirectX to be faster . It needs to be sent to the video hardware one way or another to be displayed even via GDI . With the directx approaches you are adding the extra work of creating a surface or texture . That GDI would necessarily be slower is a non sequitur . Comment : The one thing that GDI does well and has been optimized for for 20 odd years now - is moving bits around . There seems to be some kind of conventional wisdom nowadays that any API that is 20 years old must be obsolete in some way . Comment : Hi folks Paul in the end what did you end up choosing and why I m displaying and updating in real-time a large array of RGB data representing the raw memory from a process and Direct2D does not seem to be appropriate for that kind of operation since I get a very low frame-rate . .. . Answer : The reason you will hear people trounce on GDI is that it used to just be old windows API calls . The newer versions of it that were called GDI+ when I last looked at em are actually just an API placed on top of DirectX calls . So using GDI may seem fairly simple programming wise at times but adding a layer between things always slows things down . As mentioned in the response from Jerry Coffin your examples are about moving the data and that is the slow time . I am a bit surprised that DirectX is that much slower though but I can not be much more help with out digging through the DirectX documentation which has been pretty awesome for quite some time really. . Might want to check out www.codesampler.com . I have always found good starting places from him and actually while I may be insane for saying this I would swear the improvements to the DirectX SDK in doc and examples were done based on this guys work As for the DirectDraw vs Direct3D and not the GDI calls discussion . I would say go to Direct3D . I believe DirectDraw has been deprecated since 8.0 or so and 9.0 has been around for quite a long while . And at the end of the day all of DirectX is 3D it just varies on the levels of helpful 2D apis that are around but you may find you can do some very interesting things in a 2D environment when you are actually using 3D space . I had a pretty neat randomly generated lightning weapon for a space invaders clone at one time : .. . .. . Anywho hope this helped PS : It should be noted that DirectX is not always the fastest . For keyboard input unless this has changed in 10 or 11 it has pretty much always been recommended to use the windows events. . as DirectInput was actually just a wrapper for that system . . XInput however is -awesome-", "Question : I m building an application that is drawing an anaglyph stereoimage on 200 Hz screen based on two provided pictures NOT 3D model . So speed integity of redrawing is very important . I ve achieved the best results with DirectDraw surfaces and their Flip switching current surface s image to secondary one : .. . .. . But DirectDraw is very outdated and I look for a way to reimplement this functionality based on modern DirectX libraries . But I really don t want to create a quad draw picture as it s texture calculate 3D projection matrices just to output 2D images . I would be really greatful for any snippet of how this can be possibly done with DirectX . Thanks in advance . Comment : I couldnt understand why directdraw is outdated . Use direct3d for this purpose myself just for the features it provides but the principle is almost the same.. . .. . Answer : For your purposes you can use DXGI and avoid D3D completely . You don t say how you get the data into the backbuffer but DXGI allows you to create a swapchain flip it Present and access the surfaces e.g . lock them - it s called Map now . For 3D you need the 1 versions e.g . DXGISwapChain1 . See http : msdn.microsoft.com en-us library windows desktop bb205075 v vs.85 .aspx . Note that DXGISwapChain1 is a subclass of DXGISwapChain and some vital methods such as GetBuffer are in the base interface . Comment : Thanks But what about compatibility Program needs to be run on WinXP end machines . Comment : Then you can t use modern DirectX libraries . Comment : So I see thanks anyway .", "Question : This is a follow-up to this question http : stackoverflow.com questions 4120542 whats-the-fastest-way-to-repeatedly-fill-a-window-with-rgb-data-from-an-array . I m currently writing a simple game and am looking for the fastest way to repeatedly display an array of RGB data in a Win32 window without flickering or other artifacts . Several different approaches were recommended in the answers to the previous question but there was no consensus on which would be the fastest . So I threw together a test program . The code simply displays a framebuffer on the screen repeatedly as fast as possible . These are the results I obtained for 32-bit data running in a 32-bit video mode - they may surprise some people : .. . .. . Given these figures : .. . .. . Why are many people adamant that GDI is simply too slow for this operation Is there any reason to prefer DirectDraw or Direct3D over SetDIBitsToDevice .. . .. . Here is a brief summary of the calls made by each of the Direct codepaths . If anyone knows a more efficient way to use DirectDraw Direct3D please comment . Comment : I m not an expert in this field but I would definitely run this experiment on several different types of graphics hardware before I - ahem - draw any conclusions . Comment : How are you composing the RGB data Unless you need hardware-acceleration to compose the image I wouldn t expect DirectX to be faster . It needs to be sent to the video hardware one way or another to be displayed even via GDI . With the directx approaches you are adding the extra work of creating a surface or texture . That GDI would necessarily be slower is a non sequitur . Comment : The one thing that GDI does well and has been optimized for for 20 odd years now - is moving bits around . There seems to be some kind of conventional wisdom nowadays that any API that is 20 years old must be obsolete in some way . Comment : Hi folks Paul in the end what did you end up choosing and why I m displaying and updating in real-time a large array of RGB data representing the raw memory from a process and Direct2D does not seem to be appropriate for that kind of operation since I get a very low frame-rate . .. . Answer : Jerry Coffin makes some good points . The thing to bear in mind is what the DI stands for in SetDIBitsToDevice . It stands for Device Independent . Which means you were ALWAYS at the mercy of drivers . Some drivers used to be complete rubbish and it affected the performance massively . DirectDraw suffered from similar issues as well .. . but you also had access to the hardware blitters so it was generally more useful . IHVs also tended to put more time in to writing proper drivers for DirectDraw because of its gaming association . Who wants to be the bottom of the performance pile when the hardware is quite capable of doing better These days many graphics cards can accept the bit data directly so no conversion happens . If it does need to be swizzled this is also INCREDIBLY quick in this day and age . The reason your Direct3D performance is so terrible by comparison is that Direct3D by nature of the fact it is meant to be used totally internally to the GPU uses odd and complex formats to improve cache performance and so forth . Couple that with the fact that you aren t testing like for like with DDraw and D3D by creating a texture surface locking it copying unlocking and then drawing over the back buffer via various methods . To get best performance you d be best off directly locking the backbuffer using a DISCARD lock then memcpy ing directly into the returned buffer before unlocking . This will bring your performance much closer to the SetDIBitsToDevice . I still would expect D3D to be slower than DDraw however for the reasons outlined above . Comment : Thanks for your answer . Re locking the backbuffer - I know this can be done with D3D and I ll try adding support for this to my test program . Do you know if it is also possible to lock the backbuffer in windowed DDraw Comment : Also you say that in DirectDraw it is possible to get access to the hardware blitters . Does this require any additional work beyond simply calling IDirectDrawSurface7 : : Blt Comment : Yes it IS possible . If you go to www.trueharmoniccolours.co.uk under Coding- DirectX you can see some code DirectDraw I wrote 13 years ago . In that I directly lock the back buffer and then I write directly to the backbuffer Note : these days I m well ware that I am actually writing to uncached memory in that example so it is much slower than it needs to be . And yes that is exactly how you access the hardware blitters .. . If they aren t available then it is software emulated . CPUs are so fast nowadays though that you ll likely see little difference between software and hardware blitting . Comment : I was unable to get the samples from www.trueharmoniccolours.co.uk to run on my machine but looking at the source aren t they fullscreen-only Comment : @Paul : Well it was written in DX6 . . so it would likely need a fair few modifications . You may be right on the full screen only . . its been a HELL of a long time since I wrote it I don t see why it should matter though as you are always locking an off-screen ie back buffer aren t you", "Question : null .. . Answer : I know almost nothing about DirectDraw and or DirectX but I ve been helping port an old Windows 9x game to Windows 8 . The game uses DirectDraw for rendering and on Windows 8 the GUI of the game has major artifacts . Here is what the GUI should look like : Windows 7 running Underlight http : i.stack.imgur.com icJ4j.jpg .. . .. . And here is the same build running on Windows 8.1 : Windows 8.1 runing Underlight http : i.stack.imgur.com HqYTr.png .. . .. . I realize this isn t much to go on but I don t know what additional information I can provide that will help answer this question . I have access to the code I can show you how we re loading bitmaps initializing DirectDraw whatever . But I don t know what bits are interesting . Note this is an OLD Win32 API app no MFC no WPF nothing but a plain old message pump . Happy to provide any more information I can.g Comment : Does the code implement proper error checking Have you looked to see if any DX calls are failing Comment : I believe it does if any of the DDraw setup calls fail the game will immediately exit . Comment : What about the rendering calls Comment : No but I think I may have found the issue . Windows 8 expects all bitmaps to be 32-bit but ours are not . I expect it s making them all full alpha OR it s just misaligning the bits somehow .", "Question : If one were to code a game for most versions of Windows which API should be used I know DirectDraw works from NT4 and up although DirectDraw is emulated on NT4 with GDI . However I am told DirectDraw is deprecated in newer versions of Windows I could revert to just GDI but then it is hard to completely eliminate flicker and tearing since there is no double buffering with flipping between buffers . Should I go for Direct3D or DirectDraw Or is there some way of completely eliminating flicker in GDI If Direct3D is the answer which version of it is supported on most platforms Comment : Have you considered using a higher level library like SDL for this For example SDL supports pretty much all Windows versions and if you use it s facilities in general your game could also run on other systems like Linux or MacOS . Comment : Do you really need to support NT4 Or even 2000 I can t imagine there s much out there still earlier than XP . Comment : @Rup I don t have to but it would be fun . Lower than XP would of course be dropped first but it would be fun to support NT4 and Win95 up . Comment : I agree with thkala using a Cross-Platform library toolkit will also result in higher compatibility within the Windows-World . And Cross-Platform-Support is just a pretty big bonus you ll get with it which is imho the way to go in the modern world . Comment : @Amigable : I have to say I find your definition of fun intriguing .. . Answer : Unless you are sure you will never want to port your game to any non-Windows platform I would recommend OpenGL . It should work on all versions from 2000 upwards and some lucky NT4 or Win98 users may be able to run it but don t advertise those versions as supported . Hardware acceleration won t always work but the impact on performance won t be noticeable for a simple 2D game . And you will be able to port it reasonably cheaply to other platforms e.g . iPhone if necessary . Comment : I like it . I am considering accepting this answer . Can you double buffer and flip frames in OpenGL even on old versions Comment : @Amigable That is not specific to OpenGL . Most GPUs can do it but a few typically found in netbooks and business PCs cannot . Comment : but OpenGL as an API maybe with a Windows extension has mechanisms for doing a flip on vsync Comment : @Amigable yes and it s covered in this question http : stackoverflow.com questions 589064 how-to-enable-vertical-sync-in-opengl 589232 589232 .", "Question : When I failed executing a DirectDraw method how to get the failure error string in DirectX 7 Here I want to pop-up the error messge of the failure information . How to get the LPCSTR string of the error Comment : You re setting a palette Are you trying to target 8-bit 256 color modes That might not be supported on newer hardware . Comment : Yeah I always SetPalette failed . What should I use while I can t use 8-bit 256 color mode Could you provide some details thanks . Comment : You never said what error-code SetPalette is returning . It s entirely possible you palette object is mis-initialized . I was just commenting that it seems entirely odd to use an 8-bit display mode in 2013 . I don t know of a single graphic card manufactured in the last 10 years that doesn t support 24-bit modes and hence no palette is needed . Comment : @selbie : unless you want to do a palette rotation effect or some palette mappings in an image . .. . Answer : There is no error string provided by DirectDraw . You have to look at the returned HRESULT and format your own string as needed . For example : .. . .. . http : www.gamedev.net topic 8268-ddraw-error-code Comment : Thanks very much .", "Question : null .. . Answer : MS states with regard to the Application Manifest compatibility section https : msdn.microsoft.com en-us library windows desktop dd371711 28v vs.85 29.aspx : .. . .. . Manifestation of Change .. . .. . Applications without a Compatibility section in their manifest will receive Windows Vista behavior by default on Windows 7 and future Windows versions . .. . .. . .. . .. . .. . .. . DirectDraw Lock .. . .. . Windows 7 : Applications manifested for Windows 7 cannot .. . .. . Windows Vista default : Applications will be able to .. . Running the application turns off Desktop Window Manager https : en.wikipedia.org wiki Desktop Window Manager . .. . .. . The note is repeated for the next DirectDraw entry . What the heck does this signify None of or desktop MFC apps defines a compatibility manifest but we ve never noticed anything on turning off on any Desktop . Comment : AFAIK it basically means Windows 7 switches the theme from Aero to Basic . So maybe either you aren t using Aero anyway or your program doesn t use DirectDraw as described . Comment : @cremno - Ah . Doh . It only does this when the DirectDraw stuff is actually used . Now that s something : - Guess it makes sense too . We re using Aero but I don t think we re using DDraw .", "Question : I m creating a window with WS EX LAYERED and setting a color key to it using SetLayeredWindowAttributes . I can verify that this color key indeed creates a transparent patch in the window by drawing a simple rect using FillRect inside the window . This doesn t work however when I m drawing in the window using DirectDraw . I m creating an IDirectDrawSurface7 on the window and I m Blt ing some pixels to it . some of the pixels are colored with the color key but I don t see them as transparent they just appear in the color key . Is there something inherent in DirectDraw surface that conflicts with layered window color keying When i m setting an alpha value using SetLayeredWindowAttributes that seem to work fine with the DirectDraw surface and it does indeed appear translucent . Comment : A bit old but may be worth a look : msdn.microsoft.com en-us magazine ee819134.aspx http : msdn.microsoft.com en-us magazine ee819134.aspx .. . Answer : I don t know if you ve seen this but this paragraph from the article posted below looks kinda like what you are looking for . The hWnd is the window handle of a window with a WS EX LAYERED style flag . The dwFlags parameter can have one or both of LWA COLORKEY and LWA ALPHA . If a LWA COLORKEY flag is used the crKey parameter is the transparent color key . If a LWA ALPHA flag is used the bAlpha parameter is the constat source alpha value . Only top-level windows can be layered windows . .. . .. . I think its that last sentence that is the problem here . The source is a partial of a book on google books . You can read it with some code detail examples found here : .. . .. . http : books.google.com books id -O92IIF1Bj4C pg PA720 lpg PA720 dq WS EX LAYERED+ 2B+DirectDraw+color+key source bl ots SyWKE3aimb sig DXbshrEk2tN17h7CtWdMmAkHlAo hl en sa X ei 7 JcVKSyFMukNrumgMgB ved 0CCkQ6AEwAg v onepage q WS EX LAYERED 20 2B 20DirectDraw 20color 20key f false http : books.google.com books id -O92IIF1Bj4C pg PA720 lpg PA720 dq WS EX LAYERED+ 2B+DirectDraw+color+key source bl ots SyWKE3aimb sig DXbshrEk2tN17h7CtWdMmAkHlAo hl en sa X ei 7 JcVKSyFMukNrumgMgB ved 0CCkQ6AEwAg v onepage q WS EX LAYERED 20 2B 20DirectDraw 20color 20key f false .. . .. . I will also include the following links that talk about a little about it although not in nearly the same amount of detail : .. . .. . http : web.cs.wpi.edu matt courses cs563 talks cbyrd pres3.html .. . .. . http : msdn.microsoft.com en-us library windows hardware ff567254 v vs.85 .aspx .. . .. . I don t know if this will answer your question but I hope it helps a little bit . Cheers . Comment : As I mentioned in the question I have no problem using alpha blending on this window with DirectDraw . so WS EX LAYERED does work on this window just not the color keying .", "Question : I have aquired a proxyDLL for DirectDraw but none of the proxied functions get called but the game works with the proxyDLL . Somehow FRAPS is able to show the frames per second counter so it know how the data is displayed . But none of the functions I suspect which update the display actually get hit . Breakpoints don t seem to be hit . Ever . I tried Flip Begin EndScene etc .. . .. . The code I got it from is this link : .. . .. . http : svn2.assembla.com svn lightningstools trunk D3D DDraw Proxy .. . .. . So my question is : .. . .. . Which functions does DirectX 3 use to update the display Which functions do I need to look for place a breakpoint The problem here is that I am unable to find any documentation for DirectX 3 . I checked with processexplorer to see if D3D9 dll s are loaded but none are . So D3D9 hooking is not an option . Comment : I didn t even know there was a DX3 . My first encounter was with DX5 . And that was in 97 This is what legacy stands for.. . : Comment : Oh my Check abandonware sites like this http : vetusware.com if you can to find SDK with docs . Comment : Are you sure you don t mean Direct-3D rather than Direct-X 3 Comment : the readme of the game really states the game requires Direct X 3.0+ .. . Answer : From the link you provided it s DX 7 not DX 3 DirectDraw was merged to Direct3D from DirectX 8 so the one who want to use DDraw always choose DX 7 . notice file name on the page . myID3D7.cpp myID3D7.h myID3DDevice7.cpp myID3DDevice7.h .. . How did you use the proxy dll Make sure the game really require the DirectX runtime . and which version does it need you can check this by dependency-walker http : www.dependencywalker.com .", "Question : I m trying to convert a 2d array to a DDS and saving it to a file . Array is full of Color structs each having a red green blue and alpha component . Once I get the array to the correct format I m sure the saving it to file part won t be a problem . I m fine with either using a lib for this as long as its license allows me to use it in a closed source project and works on both Linux and Windows or doing it manually if I can find a nice resource explaining how to do it . If anyone can point me in the right direction I d really appreciate it . .. . Answer : In DirectDraw you can create a surface from the data in memory by setting up certain fields in the DDSURFACEDESC structure and passing it to the CreateSurface method of the IDirectDraw interface . First you need to tell DirectDraw which fields of the DDSURFACEDESC structure contain the correct information by setting the dwFlags field to the following set of flags : DDSD WIDTH DDSD HEIGHT DDSD PIXELFORMAT DDSD LPSURFACE DDSD PITCH . Oh and this only works for system-memory surfaces so it s probably needed to add the DDSCAPS SYSTEMMEMORY flag in the ddsCaps.dwCaps field if DirectDraw won t do it by default . Then you specify the address of the beginning of your pixel data array in the lpSurface field . If your buffer is continuous just set the lPitch to 0 . Else you set the correct pitch there the distance in bytes between the beginnings of two subsequent scanlines . Set the correct pixel format in ddpfPixelFormat field with correct bit depth in dwRGBBitCount and RGB masks in dwRBitMask dwGBitMask and dwBBitMask . Then set the lXPitch to the number of bytes your pixel has 3 for RGB . It depends on the pixel format you use . Then pass the filled structure into CreateSurface and see if it works . When you create the surface this way keep in mind that DirectDraw will not manage its data buffer himself and won t free this memory once you call Release on your surface . You need to free this memory yourself when it s no longer used by the surface . If you want this pixel data to be placed in video memory on the other hand you need to create an offscreen surface in a usual way and then lock it copy your pixels to its own buffer in video memory you ll find its address in the lpSurface field and remember to take lPitch in count and then unlock it .", "Question : With GDI we have the function SetTextJustification . How do we implement this feature with DirectDraw We have ID2D1RenderTarget : : DrawGlyphRun which does text drawing . Can we still use ID2D1RenderTarget : : DrawGlyphRun and be able to program D2D so we can fully justify text Maybe only DirectWrite can achieve this Then.....how . Thanks . .. . Answer : DirectDraw is able to make use of calls from the Windows GDI using IDirectDrawSurface GetDC . You acquire and release the device context as normal but through DirectDraw and not a GetDC ReleaseDC pair . In typical MSDN fashion the only page I could find relating to the original DirectDrawSurface interface was for Windows CE 6.0 . Here http : msdn.microsoft.com en-us library windows desktop gg426195 however is a link-to the current version .", "Question : I am attempting to author a single buffered windowed application using the original DirectDraw interface . This is purely for educational purposes and the just because attitude . I m playing around with the IDirectDraw interface I stress this is the original version as in DirectX 1.0 . Now the documentation contains group of tutorials on creating a back-buffer and flipping between the primary surface and the back-buffer surface . However it gives no description about writing a windowed single buffer application . In fact I can find little reference to the idea at all . There s nothing that indicates its not possible . By setting the cooperation level with to DDSCL NORMAL the application behaves within a window . Followed by creating the primary surface after success . This function also succeeds . Note that I do not create a back-buffer . However in my main loop : .. . .. . Nothing is drawn to the window at all . My original code a fullscreen buffered application correctly shows hello world in the top left-hand side of the screen and the only modifications are the tiny edits to stop the back-buffer creation and to write directly to the primary surface . If I call CreateSurface with the options for a back-buffer after calling SetCooperativeLevel with DDSCL NORMAL then it returns and error . This I understand because the documentation states : .. . .. . If you were using IDirectDraw : : SetCooperativeLevel to set the mode to DDSCL NORMAL you could create only surfaces that blit between the surfaces . Have I missed something Have I fundamentally misunderstood DirectDraw I was under the impression that using buffers was for : .. . .. . Performance benefits and .. . To prevent screen tearing . I care about neither of these right not . What can I do .. . Answer : This is perfectly achievable . What is required is a primary surface to write to and a clipper to trim the surface to the window . Create a clipper of type IDirectDrawClipper and use IDirectDrawClipper SetHWnd to match the clipper to the window . Next and then use IDirectDrawSurface SetClipper to attach the clipper to the memory controlled by the primary surface . Make sure you re-call IDirectDraw SetDisplayMode and then restore the surface each time the window changes size if you aren t locking the window size . Also remember that you are required to blit to the surface and not flip as-if you had a backbuffer . Several good points are made in this http : www.gamedev.net page resources technical directx-and-xna directdraw-programming-tutorial-r608 blog post .", "Question : As a c programmer I m used to Microsoft however I m really liking the linux side of things and Mono opens up that world to me a lot better imo . I have an app that may need some direct draw support in order to display active video and I m curious as to what the equivalent and even better what support does Mono provide in linux Comment : What is active video And what specific APIs are you currently using methods etc . Comment : I think the words you re looking for are a hardware abstraction-layer + retained mode graphics . .. . Answer : OpenGL is equivalent to DirectDraw in Linux BSD and Mac and in Windows too .", "Question : I have an application where beyond my control several Windows Forms have a TransparencyKey property set . When these windows cover are in front of another form which has a DirectDraw video surface the foreground form flickers partly showing the form and partly showing the video beneath . The thing is the color of the TransparencyKey doesn t appear anywhere in the application so NOTHING should be transparent.. . in other words the result should be that the foreground form is completely opaque . Flickering scenario http : i.stack.imgur.com bSTK4.jpg .. . .. . Does anyone have experience with DirectDraw surfaces flickering when combined with Windows Forms that are in some form or other set up to be transparent I ve worked on this for weeks with no success . Thanks .. . Answer : I m sorry but I would suggest that you abandon that goal completely and try to do it some other way . DirectDraw is one way of displaying stuff on the screen and forms with regions that are created on the fly as masks from so called transparent key color are done with GDI . As I see it and would like to be proven otherwise - you won t be able to combine that two windows anyway . And you will probably get different results on different Windows depending on the version graphics card used and so on . On the other side can you hack those forms that you don t have the control over and remove TransparencyKey property from them Even with Win32 API Comment : I was afraid of something like that . Do you have an alternative idea that wouldn t clash with the GDI transparency I am able to hack the forms but that causes another problem entirely unrelated to this . Comment : Well why do you need forms over the video in the first place Do you draw something on the video surfaces with that method or it just because your app has windows that can be freely moved around Comment : The latter my application is composed of several forms that can be moved around and so any form can overlap with any other form ." ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
ambari@hadoop@56
ambari -- the apache ambari project is aimed at making @placeholder management simpler by developing software for provisioning managing and monitoring apache hadoop clusters .
{ "confidence": [ 46.631980895996094, 46.46497344970703, 46.35597229003906, 43.6372184753418, 43.52925109863281, 41.36342239379883, 41.320518493652344, 40.777122497558594, 40.777122497558594, 39.791053771972656, 39.791053771972656, 39.561119079589844, 39.561119079589844, 39.48754119873047, 39.48754119873047, 39.48754119873047, 39.48754119873047, 39.48754119873047, 39.30309295654297, 38.27153778076172, 37.26325988769531, 36.81412124633789, 36.81200408935547, 36.81200408935547, 36.34944534301758, 36.34944534301758, 36.34944534301758, 35.603553771972656, 35.408016204833984, 35.13343811035156, 35.13343811035156, 35.13343811035156, 34.46156311035156, 33.95541763305664, 33.95541763305664, 33.676021575927734, 33.676021575927734, 33.64496994018555, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.12244415283203, 32.016082763671875, 31.966405868530273, 31.966405868530273, 31.015100479125977, 30.98108673095703, 30.711336135864258, 29.53542709350586, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.449020385742188, 29.27240753173828, 28.319419860839844, 28.319419860839844, 27.739402770996094, 27.739402770996094, 27.739402770996094, 27.739402770996094, 27.572349548339844, 27.008636474609375, 26.862003326416016, 26.637876510620117, 26.637876510620117, 26.18886947631836, 24.980453491210938, 24.791038513183594, 23.964454650878906, 23.964454650878906, 23.964454650878906, 23.475522994995117, 22.359039306640625, 22.254837036132812, 22.254837036132812, 22.254837036132812, 21.555675506591797, 20.818588256835938, 20.46747589111328, 19.001678466796875, 19.001678466796875, 19.001678466796875, 18.882253646850586, 17.79405403137207, 17.56536102294922, 17.56536102294922, 17.56536102294922 ], "content": [ "Is there any documentation on managing these files and how these files are copied from ambari-server to corresponding ambari-agent", "I was able to publish a sample metric with the help of https : github.com bbende ambari-metric-producer blob master src main java org apache ambari MetricProducer.java Can we see this metric in ambari", "I am fairly new to ambari and am wondering why Nagios and Ganglia in version 1.7 of ambari were replaced with ambari metrics in ambari 2.0+", "Does Ambari provide any option for this", "Ambari by default is installed for root .", "For instance here is the metrics.json https : github.com apache ambari blob trunk ambari-server src main resources common-services HBASE 0.96.0.2.0 metrics.json file for the HBase service .", "how to see capacity scheduler logs in Ambari", "Those users in the ambari group can now execute sudo ambari-server start", "Take a look at the ambari-agent logs in var log ambari-agent to see if there are more details on the failure .", "Following is the complete log given by ambari : .. . .. . UPDATE : Following is my ambari-agent.log from mercury.gc .. . .. . And Following is the etc hosts on both hosts .. . .. . This is my ambari.properties in etc ambari-server conf", "Refer the JIRA https : issues.apache.org jira browse AMBARI-5707 .. . .. . Couple of issues with Ambari-metrics .. . .. . When you are using Ambari Metrics ensure that you make it distributed so that there will not be any bottle-neck .", "To be able to use metrics in Ambari Widgets you must tell ambari about them by adding them to a metrics.json file .", "Once you restart ambari-server these files are copied to each node in the cluster via the ambari-agent .", "For this example we will create a group with the name of ambari .", "Create the group sudo groupadd ambari .. . 2 .", "joe .. . .. . sudo usermod -aG ambari joe .. . .. . 4 .", "We are doing the check from Ambari UI .", "However Ambari-metrics is better than Nagios Ganglia", "Run sudo visudo and add ONE of the following lines to the end of the file : .. . .. . ambari ALL ALL NOPASSWD : usr sbin ambari-server .. . .. . or .. . .. . ambari ALL ALL usr sbin ambari-server .. . .. . Note : The first option will not require the user to type their password to execute the command .", "Another configuration file that Ambari uses is the widgets.json file .", "I ve been doing some work to automate ambari clusters for CI tests and also hit this problem with rhel7 .", "I checked the ambari-metrics-collector status", "See the Ambari documentation on Widget Operations https : cwiki.apache.org confluence display AMBARI Enhanced+Service+Dashboard EnhancedServiceDashboard-WidgetOperations : for more details .", "i see that change comes into effect if i change the metrics.json on ambari-server and the on server hosting the server as well under ambari-agent directory and restart the server .", "How can I grant permissions to specific users to run ambari-server", "I want to Ambari to build a platform for testing some functionalities on spark .", "When you face such issues then you need to restart the HBase Ambari Metrics .", "However when I install Hadoop using Ambari HDP after an application finishes YARN timeline server shows only DAGAppMaster log .", "The second option is use Ambari Rest API calls using curl to disable then delete the component this option is not there in Ambari UI hence you need to use Rest API calls then add it again from Ambari UI .", "Is there a way we can monitor bolt specific metrics in ambari", "Each service managed by ambari has a corresponding metrics.json file .", "You then must restart ambari-server for the changes to be picked up .", "You should only need to modify those files at their source location which is on the ambari-server node at var lib ambari-server resources common-services service-name version or var lib ambari-server resources stacks stack version services service-name .", "So in Ambari how do I see the actual HIVE query that those running HIVE applications are executing", "I have checked many options available in Ambari but could not find scheduler log exactly .", "http : docs.hortonworks.com HDPDocuments Ambari-2.1.2.0 bk ambari troubleshooting content resolving deployment problems.html dataNode fails to install on RHEL-CentOS7", "In this case the issue was on the Ambari Master server which has the most services running on it .", "If we tried to install Ambari server under Amazon Linux with its bundled postgresql db you should get error on ambari-server setup .", "I have already connected to ambari before with the inet address that we get through ifconfig .", "Using the Ambari web interface I can install and run the NFS gateway and mount but I cannot write to the mount .", "Overview : .. . .. . Create a group and gives its users permissions to use the ambari-server command .", "I see I can use the Ambari - Sandbox s HDFS Files tool but that only allows uploading one-by-one .", "In Ambari I deleted the host from the cluster and added the new one with the same hostname .", "Getting following error From Ambari UI : .. . .. . Any help on it would be much appreciated", "Ambari 2.2.2.0 is installed on one VM mercury.gc and try to use it to config these two VMs .", "Ambar-metrics stores the data in HBase and sometimes you may see loging to Ambari UI is very very slow .", "Ambari Metrics uses a light weight process and write the data to HDFS rather then Linux FS .", "Today I ve been doing some testing with Ambari on a cluster of servers so that I can deploy a BigInsights image .", "Ambari Installer error http : i.stack.imgur.com 2xig4.jpg .. . .. . Examining the failures in more detail it shows messages like this :", "Yum cannot find the iop-select package which is listed as a required package for one of the services the Ambari wizard is installing .", "Solution : Check the stack definition in Ambari to make sure the repository information exists and is correct .", "Now in Ambari while it is possible to change the yarn.resourcemanager.scheduler.class property via the UI and add a new custom property yarn.scheduler.fair.allocation.file I cannot for the love of god find a way to have ambari read fair-scheduler.xml instead of capacity-scheduler.xml .", "My Ambari Server is running on other node node 00 .", "The best option is to recreate the structure by uninstalling and installing Ambari again .", "For example in IOP 4.0 you would check file : .. . .. . var lib ambari-server resources stacks BigInsights 4.0 repos repoinfo.xml .. . .. . .. . to make sure it has an entry similar to : .. . .. . repo .. . baseurl http : ibm-open-platform.ibm.com repos IOP RHEL6 x86-64 4.0 baseurl .. . repoid IOP-4.0 repoid .. . reponame IOP reponame .. . repo .. . .. . .. . If it doesn t exist add the correct entry for the BigInsights IOP version you are using save the file and finally restart ambari server by running the following command : .. . .. . sudo ambari-server restart .. . .. . .. . Once ambari-server restarts you can try the installation again .", "Firstly I understand that the Hadoop part of the IBM Big Insights is not a modified version of the corresponding Apache version as HortonWorks do so when Ambari from the IBM repo offers me to use an external Oracle database I suppose it should work .", "Since the message was sent by the Ambari agent running in the HiveServer2 machine some king of weird ping I simply added an iptables rule blocking all the connections to TCP 10000 port on the loopback interface : .. . .. . Of course now Ambari warns the HiveServer2 is not alive the pings are droped .", "i have two master and 1 region server at my cluster ambari service check and status showing that every thing is working fine", "Simply by removing existing snappy package wont work because ambari will install both snappy and snappy-devel .", "It would work if ambari would only install snappy-devel which would pull correct snappy version .", "So my question is How do I go about switching to the fair scheduler via Ambari", "I m experimenting with HDP2.2 cluster with Ambari setup on CentOS 6.5 and I have problems with running Hive GRANT queries .", "ambari-functions rename run-command to run command rename amb-clean to amb clean etc", "I had installed my big data stack using Ambari and was running it successfully for some basic stuff .", "Configuration present in .. . .. . usr hdp 2.4.2.0-258 spark conf is what I see in my Ambari GUI .", "I ll take pictures of the Ambari screen when it blocks and copy the log traces even if there s no error message.. .", "When I boot a plain ami or any other rhel7 based vm I run below commands which seem to be enough for ambari cluster provisioning to succeed later .", "I have set PYSPARK PYTHON python3 in spark-env.sh using ambari and when I try pyspark in commandline it runs with python 3.4.3 .", "I know that HDP ambari forces you to set up the two on the same node along with webhcat I believe but what about other venders such as Cloudera", "I ve initially installed 2 slave nodes node01 node02 cluster using Ambari Cluster Install wizard successfully .", "I think you are may be using postgres for storing Ambari metadata and mysql for Hive Derby fro oozie .", "The procedure for this step will vary depending on how you are bundling the custom Ambari service rpm assembly etc . .", "After installing the rpm you would have to restart ambari-server to make sure the new service definition is picked up .", "So first call of action is to see if maybe Ambari is not making the call correctly : .. . .. . Next I tired a clean start not that I figured it would make much difference but maybe there was a issue with the logs not allowing it to restart :", "when it works with the HortonWorks - same apache version - and Cloudera Distribution .. . .. . Of course log files don t tell me anything.. . .. . .. . UPDATE : .. . .. . I tried to install IOP 4.1 firstly using MySQL as my Ambari Hive and Oozie database everything was fine .", "On my Ambari browser services page it was showing that the Kafka service was not running I tried a restart a number of times but this seemed to continuously fail .", "And the above rule must be removed if I want to restart the server from Ambari there is another alive check in the starting script then after the restart I can enable the rule again .", "On the HDFS Summary screen I see : DataNodes : 8 8 DataNodes Status : 8 live 1 dead 0 decommissioning .. . .. . Thinking that this may be a UI bug I restarted the ambari-server services but the alert persists .", "INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 12 sshKey password File null using tmp dir var run ambari-server bootstrap 12 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap WARNING : root : Bootstrap at host prthutech-l2 timed out and will be interrupted INFO : root : Finished parallel bootstrap .. . .. . 27 Jun 2016 16 : 44 : 55 679 INFO pool-16-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 12 27 Jun 2016 16 : 44 : 55 679 INFO pool-16-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 45 : 13 540 INFO qtp-client-32 BootStrapImpl : 108 - BootStrapping hosts prthutech-l2 : 27 Jun 2016 16 : 45 : 13 552 INFO Thread-192 BSRunner : 160 - Kicking off the scheduler for polling on logs in var run ambari-server bootstrap 13 27 Jun 2016 16 : 45 : 13 552 INFO Thread-192 BSRunner : 220 - Host prthutech-l2 bs usr lib python2.6 site-packages ambari server bootstrap.py requestDir var run ambari-server bootstrap 13 user prthutech keyfile var run ambari-server bootstrap 13 sshKey passwordFile null server prthutech-s.local version 2.1.2 serverPort 8080 userRunAs root .. . .. . 27 Jun 2016 16 : 46 : 13 555 INFO pool-17-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 46 : 14 693 INFO Thread-192 BSRunner : 264 - Bootstrap output log var run ambari-server bootstrap 13 bootstrap.err var run ambari-server bootstrap 13 bootstrap.out at prthutech-s.local 27 Jun 2016 16 : 46 : 14 694 INFO Thread-192 BSRunner : 275 - Script log Mesg .. . .. . INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 13 sshKey password File null using tmp dir var run ambari-server bootstrap 13 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap ERROR : root : ERROR : Bootstrap of host prthutech-l2 fails because previous action finished with non-zero exit code 255 ERROR MESSAGE : ssh : connect to host prthutech-l2 port 22 : Connection timed out .. . .. . STDOUT : ssh : connect to host prthutech-l2 port 22 : Connection timed out .. . .. . INFO : root : Finished parallel bootstrap .. . .. . 27 Jun 2016 16 : 46 : 14 694 INFO pool-17-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 13 27 Jun 2016 16 : 46 : 14 694 INFO pool-17-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 50 : 48 839 INFO qtp-client-32 BootStrapImpl : 108 - BootStrapping hosts prthutech-l2 : 27 Jun 2016 16 : 50 : 48 842 INFO Thread-199 BSRunner : 160 - Kicking off the scheduler for polling on logs in var run ambari-server bootstrap 14 27 Jun 2016 16 : 50 : 48 842 INFO Thread-199 BSRunner : 220 - Host prthutech-l2 bs usr lib python2.6 site-packages ambari server bootstrap.py requestDir var run ambari-server bootstrap 14 user prthutech keyfile var run ambari-server bootstrap 14 sshKey passwordFile null server prthutech-s.local version 2.1.2 serverPort 8080 userRunAs root 27 Jun 2016 16 : 50 : 48 849 INFO pool-18-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 14 27 Jun 2016 16 : 50 : 48 849 INFO pool-18-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 ........................................ . .. . .. . 27 Jun 2016 16 : 55 : 48 862 INFO pool-18-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 55 : 50 217 INFO Thread-199 BSRunner : 264 - Bootstrap output log var run ambari-server bootstrap 14 bootstrap.err var run ambari-server bootstrap 14 bootstrap.out at prthutech-s.local 27 Jun 2016 16 : 55 : 50 218 INFO Thread-199 BSRunner : 275 - Script log Mesg .. . .. . INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 14 sshKey password File null using tmp dir var run ambari-server bootstrap 14 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap WARNING : root : Bootstrap at host prthutech-l2 timed out and will be interrupted INFO : root : Finished parallel bootstrap", "I may be wrong and I can t find any oracle reference in the crappy IBM installation guide to set it up correctly only that it should work with Oracle 11g R2 .. . .. . So as I do with an equivalent HortonWorks distribution but using the binaries from IBM I set up my ambari-server with all the oracle parameters --jdbc-db oracle --jdbc-driver path to ojdbc6.jar I m using a Oracle 11g XE on Centos 6.5 supposed to be supported by IOP and I specified all the stuff I had to specify to use Ambari with Oracle Service Name Host Port .. . I created the ambari user loaded the corresponding Oracle DDL packaged with Ambari and created my Hive Oozie users as specified in the.. . Hortonworks installation guide .", "As the desired components of IOP 4.1 are in the same version in HDP 2.3 Ambari 2.1 Hive 1.2.1 oozie 4.2.0 hadoop 2.7.1 pig 0.15.0 sqoop 1.4.6 and zookeeper 3.4.6 I tried to configure exactly the same cluster with HDP 2.3 Oracle 11 XE .. . and everything worked .", "I get the following error : .. . .. . I tried the solution of HortonWorks http : docs.hortonworks.com HDPDocuments Ambari-2.1.1.0 bk releasenotes ambari 2.1.1.0 content ambari relnotes-2.1.1.0-known-issues.html but it doesn t work .", "Trouble really is that snappy is already in yum repos used by rhel7 itself and when ambari adds its own HDP yum repos those contain older versions for snappy and snappy-devel .", "Before deploying the services to all the nodes Ambari is supposed to resume what it is going to install but it doesn t : sometimes it doesn t show anything sometimes it shows only the IOP repos urls .", "Next I tried to install IOP 4.1 with Oracle 11 XE as external database I configured oracle created ambari hive and oozie oracle users and loaded the Ambari Oracle schema given with IOP 4.1 and I configure the same cluster as the first time specifying the Oracle particularities for Hive Oozie and Sqoop Oracle driver .", "In Hadoop 2.7.1 I get nothing.. .", "https : cwiki.apache.org confluence display AMBARI Using+APIs+to+delete+a+service+or+all+host+components+on+a+host .. . .. . Before doing it ensure you take backup of data and metadata files .", "I m trying to setup the ambari server when I get this error : .. . .. . I ve looked this up and apparently os.rename is just renaming a file and when this error happens it because some file I m trying to rename doesn t exist .", "The file it s looking for is pg hba.conf You chose the default postgres db for ambari and it will likely look for it under var lib pgsql data .. . .. . Looking at the trace it s trying to rename the file but just unsure what that file is exactly .", "We have small Hadoop-Hawq Cluster .", "You can t use yum versionlock snappy-1.0.5-1.el6.x86 64 as is because actual package has to be present from repos which doesn t exist until ambari provisions its own nodes at a time of command invocation .", "Is there a way to batch upload files to Hadoop under a Hortonworks VM running CentOS", "When I install Hadoop 2.7.1 manually after an application finishes YARN timeline server shows logs of all containers .", "I ve wrote working code for Hadoop 0.23.1 : .. . .. . Any idea why it s not working in 2.7.1", "Hadoop is made to process big data but it s absurd having to upload all files one-by-one.. .", "Is that a hdfs system user or some specific hadoop user", "My organization is currently using Hortonworks HDP to manage our Hadoop Cluster .", "i got installed Hortonworks data platform HDP 2.4 on oracle virtual box when i trying to use storm streaming analytics it uses to connect ambari by url .. . .. . sandbox.hortonworks.com : 8080 .. . .. . instead of .. . .. . 127.0.0.1 : 8080 .. . .. . loop back address and i got an error message over browser .. . .. . Error : This site can t be reached .. . .. . so tell me that how could i assign .. . .. . sandbox.hortonworks.com : 8080 .. . .. . domain-name to loop back address from virtual-machine OS terminal .", "Well Ambari seems to work well with Oracle I can set up my cluster until the last step : .. . .. . If I configure Hive and or oozie to work with oracle validating the oracle connection is OK from the service configuration tab the review step step 8 doesn t show anything or sometimes the IOP repos it seems to be arbitrary .", "Trying to deploy starts the tasks preparation and implies a blocking states of the installation : I can t do anything else than dropping the database and reload the entire DDL to try again or I ll obtain lots of unexpected NullPointerException .. . If I configure Hive AND Oozie to work with an embedded MySQL the default choice keeping Ambari against Oracle everything works fine ." ] }
{ "confidence": [ 59.82261657714844, 55.12241744995117, 54.58759307861328, 53.811546325683594, 50.70803451538086, 50.40971755981445, 48.44116973876953, 48.42546081542969, 47.523502349853516, 47.336666107177734, 46.52146911621094, 46.09125518798828, 45.521034240722656, 45.15403747558594, 44.272247314453125, 44.14828109741211, 43.68914794921875, 43.334014892578125, 43.107688903808594, 40.058876037597656 ], "content": [ "Question : Is there a way we can monitor bolt specific metrics in ambari Here is what i have tried . I was able to publish a sample metric with the help of https : github.com bbende ambari-metric-producer blob master src main java org apache ambari MetricProducer.java Can we see this metric in ambari In HDFS metrics we can add widget for HDFS Hbase metrics for DataNode NameNode which contain all the default metrics . Is it possible to have some custom metrics in this list such as a counter in one of the bolt in topology . Comment : What service would the custom metric belong to Comment : it could be a counter like how many tuples executed in the bolt . .. . Answer : To be able to use metrics in Ambari Widgets you must tell ambari about them by adding them to a metrics.json file . Each service managed by ambari has a corresponding metrics.json file . For instance here is the metrics.json https : github.com apache ambari blob trunk ambari-server src main resources common-services HBASE 0.96.0.2.0 metrics.json file for the HBase service . Determine which service is responsible for the metric you wish to add then modify that services metrics.json file to include it . You then must restart ambari-server for the changes to be picked up . You can then use the metric in any widget you desire . Another configuration file that Ambari uses is the widgets.json file . It sits in the same directory as the metrics.json file . Some services do not have a widgets.json file defined and thus will not be able to add widgets using the services dashboard . Storm is one of these services . You can define a widgets.json for Storm and add it to the service . See the Ambari documentation on Widget Operations https : cwiki.apache.org confluence display AMBARI Enhanced+Service+Dashboard EnhancedServiceDashboard-WidgetOperations : for more details . Comment : Thanks @cjackson . I want to monitor a few counters in my storm topologies . Also i see the add Widget option only for HDFS HBASE services and not in STORM service . Comment : I ve amended my answer to explain why the STORM service doesn t have the add Widget button . Comment : Thanks . i see that change comes into effect if i change the metrics.json on ambari-server and the on server hosting the server as well under ambari-agent directory and restart the server . Is there any documentation on managing these files and how these files are copied from ambari-server to corresponding ambari-agent Comment : You should only need to modify those files at their source location which is on the ambari-server node at var lib ambari-server resources common-services service-name version or var lib ambari-server resources stacks stack version services service-name . Once you restart ambari-server these files are copied to each node in the cluster via the ambari-agent . Comment : Thanks.realized it just after my previous comment . earlier i was updating metrics.json under common-services . I see the changes when file under stacks is updated . Is there any documentation available on how to manage these files", "Question : I get the following error : .. . .. . I tried the solution of HortonWorks http : docs.hortonworks.com HDPDocuments Ambari-2.1.1.0 bk releasenotes ambari 2.1.1.0 content ambari relnotes-2.1.1.0-known-issues.html but it doesn t work . I disabled all repositories and leave only one required versions snappy but neither works . Still gives the error you have installed the 1.1.0-3.el7 version but if you look at the information for that package is not . I have installed the 1.0.5-1.el6 .. . .. . My operating-system is RHEL 7 . .. . Answer : I ve been doing some work to automate ambari clusters for CI tests and also hit this problem with rhel7 . Workaround in that HDP doc is not really possible as it needs manual intervention when install fails . Having said that I was able to come up with a workaround of some sort . Trouble really is that snappy is already in yum repos used by rhel7 itself and when ambari adds its own HDP yum repos those contain older versions for snappy and snappy-devel . Simply by removing existing snappy package wont work because ambari will install both snappy and snappy-devel . It would work if ambari would only install snappy-devel which would pull correct snappy version . Workaround seem to be by using yum version locking . You can t use yum versionlock snappy-1.0.5-1.el6.x86 64 as is because actual package has to be present from repos which doesn t exist until ambari provisions its own nodes at a time of command invocation . Thought it looks like you can manually append that package to versionlock config . When I boot a plain ami or any other rhel7 based vm I run below commands which seem to be enough for ambari cluster provisioning to succeed later .", "Question : null .. . Answer : My organization is currently using Hortonworks HDP to manage our Hadoop Cluster . The default YARN scheduler is the Capacity Scheduler . I would like to switch to a Fair Scheduler . I am completely new to HDP . In the absence of a cluster management suite this would be done by editing the yarn-site.xml and changing the yarn.resourcemanager.scheduler.class property to org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler and creating an extra fair-scheduler.xml file to specify the queue configurations as mentioned here https : hadoop.apache.org docs r2.7.1 hadoop-yarn hadoop-yarn-site FairScheduler.html and then referring YARN to that configuration by setting the yarn.scheduler.fair.allocation.file property in yarn-site.xml . Now in Ambari while it is possible to change the yarn.resourcemanager.scheduler.class property via the UI and add a new custom property yarn.scheduler.fair.allocation.file I cannot for the love of god find a way to have ambari read fair-scheduler.xml instead of capacity-scheduler.xml . So my question is How do I go about switching to the fair scheduler via Ambari There s got to be an easy way right Properties in capacity-scheduler.xml http : i.stack.imgur.com Lj6Gv.png", "Question : I m a little confused when I try to install a single node IBM Open Platform cluster using an Oracle database as RDBMS . Firstly I understand that the Hadoop part of the IBM Big Insights is not a modified version of the corresponding Apache version as HortonWorks do so when Ambari from the IBM repo offers me to use an external Oracle database I suppose it should work . I may be wrong and I can t find any oracle reference in the crappy IBM installation guide to set it up correctly only that it should work with Oracle 11g R2 .. . .. . So as I do with an equivalent HortonWorks distribution but using the binaries from IBM I set up my ambari-server with all the oracle parameters --jdbc-db oracle --jdbc-driver path to ojdbc6.jar I m using a Oracle 11g XE on Centos 6.5 supposed to be supported by IOP and I specified all the stuff I had to specify to use Ambari with Oracle Service Name Host Port .. . I created the ambari user loaded the corresponding Oracle DDL packaged with Ambari and created my Hive Oozie users as specified in the.. . Hortonworks installation guide . Well Ambari seems to work well with Oracle I can set up my cluster until the last step : .. . .. . If I configure Hive and or oozie to work with oracle validating the oracle connection is OK from the service configuration tab the review step step 8 doesn t show anything or sometimes the IOP repos it seems to be arbitrary . Trying to deploy starts the tasks preparation and implies a blocking states of the installation : I can t do anything else than dropping the database and reload the entire DDL to try again or I ll obtain lots of unexpected NullPointerException .. . If I configure Hive AND Oozie to work with an embedded MySQL the default choice keeping Ambari against Oracle everything works fine . Am I doing something wrong Or is there any limitation to configure IBM Open Platform Hive and Oozie to use Oracle 11 when it works with the HortonWorks - same apache version - and Cloudera Distribution .. . .. . Of course log files don t tell me anything.. . .. . .. . UPDATE : .. . .. . I tried to install IOP 4.1 firstly using MySQL as my Ambari Hive and Oozie database everything was fine . Next I tried to install IOP 4.1 with Oracle 11 XE as external database I configured oracle created ambari hive and oozie oracle users and loaded the Ambari Oracle schema given with IOP 4.1 and I configure the same cluster as the first time specifying the Oracle particularities for Hive Oozie and Sqoop Oracle driver . Before deploying the services to all the nodes Ambari is supposed to resume what it is going to install but it doesn t : sometimes it doesn t show anything sometimes it shows only the IOP repos urls . Next trying to deploy it starts the preparation tasks but never ends . and that s it . No message no log nothing it just get stucked . As the desired components of IOP 4.1 are in the same version in HDP 2.3 Ambari 2.1 Hive 1.2.1 oozie 4.2.0 hadoop 2.7.1 pig 0.15.0 sqoop 1.4.6 and zookeeper 3.4.6 I tried to configure exactly the same cluster with HDP 2.3 Oracle 11 XE .. . and everything worked . I noticed that HDP 2.3 forces me to use SSL while IOP does not . HDP works with an Oracle JDK 1.8 by default while IOP actually offer to use an OpenJDK 1.8 instead . I don t know if it matters I ll try to be sure.. . I ll take pictures of the Ambari screen when it blocks and copy the log traces even if there s no error message.. . If anyone got an idea please share it Thanks Comment : Please share details of what is failing when it is failing etc . Also including error messages helps people troubleshoot for you . Comment : I tried to add some details . I ll take pictures trying another installation and I ll update my question . Thanks .. . Answer : Trying to operate the same installation using the Oracle JDK 1.8 everything works fine . I don t know if there is any restriccion using the Oracle JDBC driver with OpenJDK 1.8 but using Oracle 11 XE with IOP 4.1 + Oracle JDK 1.8 works .", "Question : How can I grant permissions to specific users to run ambari-server Currently I get .. . Answer : Ambari by default is installed for root . Thus you must run it as root . This can be achieved in several ways . I will explain the best way in my opinion to do this using sudo . Overview : .. . .. . Create a group and gives its users permissions to use the ambari-server command . For this example we will create a group with the name of ambari . Steps : .. . .. . 1 . Create the group sudo groupadd ambari .. . 2 . Grant the group permission to run the command using visudo . Run sudo visudo and add ONE of the following lines to the end of the file : .. . .. . ambari ALL ALL NOPASSWD : usr sbin ambari-server .. . .. . or .. . .. . ambari ALL ALL usr sbin ambari-server .. . .. . Note : The first option will not require the user to type their password to execute the command . The second option will require them to do so . 3 . Add the appropriate users to the group eg . joe .. . .. . sudo usermod -aG ambari joe .. . .. . 4 . Those users in the ambari group can now execute sudo ambari-server start", "Question : I am fairly new to ambari and am wondering why Nagios and Ganglia in version 1.7 of ambari were replaced with ambari metrics in ambari 2.0+ In terms of : 1- performance 2- features 3- and services .. . .. . was there any clear advantage Thanks .. . Answer : It is only for performance . Refer the JIRA https : issues.apache.org jira browse AMBARI-5707 .. . .. . Couple of issues with Ambari-metrics .. . .. . When you are using Ambari Metrics ensure that you make it distributed so that there will not be any bottle-neck . Ambar-metrics stores the data in HBase and sometimes you may see loging to Ambari UI is very very slow . When you face such issues then you need to restart the HBase Ambari Metrics . However Ambari-metrics is better than Nagios Ganglia Comment : Why is it better than Nagios and Ganglia Also is Amabari metrics using Nagios under the hood Comment : Ambari Metrics uses a light weight process and write the data to HDFS rather then Linux FS . Hence it will scale . Please check the Jira first comment that gives some idea of it.We get rid of the writing to FS and then reading back the data in response to the call from GangliaPropertyProvider instead we use a lightweight wire protocol to push metrics to a collector service which writes it to a local key-value store e.g . : LevelDB as well as to a pluggable Storage service-layer .", "Question : null .. . Answer : how to see capacity scheduler logs in Ambari Or is there any path where we can access this log I have checked many options available in Ambari but could not find scheduler log exactly .", "Question : null .. . Answer : When I install Hadoop 2.7.1 manually after an application finishes YARN timeline server shows logs of all containers . However when I install Hadoop using Ambari HDP after an application finishes YARN timeline server shows only DAGAppMaster log . I checked that log aggregation are all configured properly after an application finished a corresponding log directory was created in aggregation log-dir . Does anyone explain to me please", "Question : Is there a way to batch upload files to Hadoop under a Hortonworks VM running CentOS I see I can use the Ambari - Sandbox s HDFS Files tool but that only allows uploading one-by-one . Apparently you could use Redgate s HDFS Explorer http : hortonworks.com hadoop-tutorial use-hdfs-explorer-manage-files-hortonworks-sandbox in the past but it s no longer available . Hadoop is made to process big data but it s absurd having to upload all files one-by-one.. . Thank you .. . Answer : Of course you can use the wildcard in copyFromLocal f.e . :", "Question : Today I ve been doing some testing with Ambari on a cluster of servers so that I can deploy a BigInsights image . Everything seems to be going well with all the components being configured okay that is until it does the final install . I see a image similar to this - Ambari Installer error http : i.stack.imgur.com 2xig4.jpg .. . .. . Examining the failures in more detail it shows messages like this : .. . Answer : Yum cannot find the iop-select package which is listed as a required package for one of the services the Ambari wizard is installing . This can happen for a few reasons : .. . .. . You have a stale yum db . Solution : Refresh by running : .. . .. . sudo yum clean all .. . .. . .. . The repository containing the installation bits for the service you are trying to install is not configured in the repoinfo.xml file . Solution : Check the stack definition in Ambari to make sure the repository information exists and is correct . For example in IOP 4.0 you would check file : .. . .. . var lib ambari-server resources stacks BigInsights 4.0 repos repoinfo.xml .. . .. . .. . to make sure it has an entry similar to : .. . .. . repo .. . baseurl http : ibm-open-platform.ibm.com repos IOP RHEL6 x86-64 4.0 baseurl .. . repoid IOP-4.0 repoid .. . reponame IOP reponame .. . repo .. . .. . .. . If it doesn t exist add the correct entry for the BigInsights IOP version you are using save the file and finally restart ambari server by running the following command : .. . .. . sudo ambari-server restart .. . .. . .. . Once ambari-server restarts you can try the installation again . Comment : Thanks very much cjackson .", "Question : I want to Ambari to build a platform for testing some functionalities on spark . I use Win 10+Hyper-V to create two VMs mercury.gc and venus.gc installed with CentOS 7 . Ambari 2.2.2.0 is installed on one VM mercury.gc and try to use it to config these two VMs . When running confirm hosts the progress of both returns failed . Following are the logs from one machine : .. . .. . I have checked the passwordless ssh login works properly and the firewall and selinux has been turned off . I cannot figure out what happens from the logs . Is there anyone can help me solve this problem Following is the complete log given by ambari : .. . .. . UPDATE : Following is my ambari-agent.log from mercury.gc .. . .. . And Following is the etc hosts on both hosts .. . .. . This is my ambari.properties in etc ambari-server conf Comment : Take a look at the ambari-agent logs in var log ambari-agent to see if there are more details on the failure . What do the etc hosts files look like on each of those machines Comment : I have updated the post with some details . Hope any one can give me a hand .. . Answer : I have found and solved the problem according to the discussion in https : community.hortonworks.com questions 23409 there-is-a-problem-when-install-hdp-on-the-stepcon.html .. . .. . I think this is because I set a non-English language i.e . Trad . Chinese as a default language when I installed CentOs 7 . It would encounter a charset problem UTF-8 - ascii when confirming hosts . After changing the default language to English This problem has been solved .", "Question : null .. . Answer : I have some hive jobs executing in YARN so in Yarn if I list applications I see some HIVE application and corresponding Templeton applications . So in Ambari how do I see the actual HIVE query that those running HIVE applications are executing Does Ambari provide any option for this", "Question : We have small Hadoop-Hawq Cluster . In that once of slave host service fails When I am executing the check of HAWQ services . Getting following error From Ambari UI : .. . .. . Any help on it would be much appreciated Comment : Hi @vickps welcome to SO or sort of .. . Have you tried to run the script in a verbose mode before asking the question here It seems that there is a permission issue .. . Look at that before going further . You know the expression step by step .. . Comment : We are doing the check from Ambari UI . and there is no verbose option . Comment : then you have a real issue .. . What your sysadmin is saying.. . Comment : I am the sysadmin and responsible person for HAWQ related issue Comment : .. . gasp @vickps .. . Answer : HAWQ requires passwordless ssh access to all cluster nodes . Check if the system is configured to allow that and execute the following hawq command to set up passwordless ssh on the nodes defined in your hostfile : .. . .. . gpssh-exkeys -f hostfile in version 1.x .. . .. . hawq ssh-exkeys -f hostfile in version 2.x", "Question : I m trying to setup Hadoop on my EC2 instance using this tutorial . I m trying to setup the ambari server when I get this error : .. . .. . I ve looked this up and apparently os.rename is just renaming a file and when this error happens it because some file I m trying to rename doesn t exist . However I don t know what file it wants to rename and the readline function has self as its parameter so the problem may not start in the function . I know a small amount of python but since program is doing way too much for me to know where to fix it . Comment : Have you disabled SELinux Comment : I m not aware of what SELinux is so I guess not . Comment : is this centOS or RHT access.redhat.com documentation en-US Red Hat Enterprise Linux https : access.redhat.com documentation en-US Red Hat Enterprise Linux 6 html Security-Enhanced Linux sect-Security-Enhanced Linux-Working with SELinux-Enabling and Disabling SELinux.html Comment : Did you ever resolve this issue I am running into it as well . Comment : Sorry but no I eventually scrapped the project . My best advice is to restart the setup . .. . Answer : If we tried to install Ambari server under Amazon Linux with its bundled postgresql db you should get error on ambari-server setup . The first root cause is the startup script postgresql assumes the default data path is at : var lib pgsql92 data .. . .. . However we can see nothing under : var lib pgsql92 data Instead of we should see thing under : var lib pgsql9 .. . .. . Here is workaround : .. . .. . Fix the default data path for Ambari bundled postgresql : .. . .. . sudo ln -s var lib pgsql9 var lib pgsql .. . .. . Edit postgresql script .. . .. . sudo vim etc init.d postgresql .. . .. . -- comment it : .. . .. . PGSUFFIX 92 .. . .. . -- change below : .. . .. . PGDATA var lib pgsql PGSUFFIX data .. . .. . PGLOG var lib pgsql PGSUFFIX pgstartup.log .. . .. . To : .. . .. . PGDATA var lib pgsql data .. . .. . PGLOG var lib pgsql pgstartup.log", "Question : null .. . Answer : I recently lost a data node and had to re-build it . In Ambari I deleted the host from the cluster and added the new one with the same hostname . Everything appears to be working perfectly with the exception that HDFS still shows 1 dead data node . On the HDFS Summary screen I see : DataNodes : 8 8 DataNodes Status : 8 live 1 dead 0 decommissioning .. . .. . Thinking that this may be a UI bug I restarted the ambari-server services but the alert persists .", "Question : null .. . Answer : INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 12 sshKey password File null using tmp dir var run ambari-server bootstrap 12 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap WARNING : root : Bootstrap at host prthutech-l2 timed out and will be interrupted INFO : root : Finished parallel bootstrap .. . .. . 27 Jun 2016 16 : 44 : 55 679 INFO pool-16-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 12 27 Jun 2016 16 : 44 : 55 679 INFO pool-16-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 45 : 13 540 INFO qtp-client-32 BootStrapImpl : 108 - BootStrapping hosts prthutech-l2 : 27 Jun 2016 16 : 45 : 13 552 INFO Thread-192 BSRunner : 160 - Kicking off the scheduler for polling on logs in var run ambari-server bootstrap 13 27 Jun 2016 16 : 45 : 13 552 INFO Thread-192 BSRunner : 220 - Host prthutech-l2 bs usr lib python2.6 site-packages ambari server bootstrap.py requestDir var run ambari-server bootstrap 13 user prthutech keyfile var run ambari-server bootstrap 13 sshKey passwordFile null server prthutech-s.local version 2.1.2 serverPort 8080 userRunAs root .. . .. . 27 Jun 2016 16 : 46 : 13 555 INFO pool-17-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 46 : 14 693 INFO Thread-192 BSRunner : 264 - Bootstrap output log var run ambari-server bootstrap 13 bootstrap.err var run ambari-server bootstrap 13 bootstrap.out at prthutech-s.local 27 Jun 2016 16 : 46 : 14 694 INFO Thread-192 BSRunner : 275 - Script log Mesg .. . .. . INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 13 sshKey password File null using tmp dir var run ambari-server bootstrap 13 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap ERROR : root : ERROR : Bootstrap of host prthutech-l2 fails because previous action finished with non-zero exit code 255 ERROR MESSAGE : ssh : connect to host prthutech-l2 port 22 : Connection timed out .. . .. . STDOUT : ssh : connect to host prthutech-l2 port 22 : Connection timed out .. . .. . INFO : root : Finished parallel bootstrap .. . .. . 27 Jun 2016 16 : 46 : 14 694 INFO pool-17-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 13 27 Jun 2016 16 : 46 : 14 694 INFO pool-17-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 50 : 48 839 INFO qtp-client-32 BootStrapImpl : 108 - BootStrapping hosts prthutech-l2 : 27 Jun 2016 16 : 50 : 48 842 INFO Thread-199 BSRunner : 160 - Kicking off the scheduler for polling on logs in var run ambari-server bootstrap 14 27 Jun 2016 16 : 50 : 48 842 INFO Thread-199 BSRunner : 220 - Host prthutech-l2 bs usr lib python2.6 site-packages ambari server bootstrap.py requestDir var run ambari-server bootstrap 14 user prthutech keyfile var run ambari-server bootstrap 14 sshKey passwordFile null server prthutech-s.local version 2.1.2 serverPort 8080 userRunAs root 27 Jun 2016 16 : 50 : 48 849 INFO pool-18-thread-1 BSHostStatusCollector : 55 - Request directory var run ambari-server bootstrap 14 27 Jun 2016 16 : 50 : 48 849 INFO pool-18-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 ........................................ . .. . .. . 27 Jun 2016 16 : 55 : 48 862 INFO pool-18-thread-1 BSHostStatusCollector : 62 - HostList for polling on prthutech-l2 27 Jun 2016 16 : 55 : 50 217 INFO Thread-199 BSRunner : 264 - Bootstrap output log var run ambari-server bootstrap 14 bootstrap.err var run ambari-server bootstrap 14 bootstrap.out at prthutech-s.local 27 Jun 2016 16 : 55 : 50 218 INFO Thread-199 BSRunner : 275 - Script log Mesg .. . .. . INFO : root : BootStrapping hosts prthutech-l2 using usr lib python2.6 site-packages ambari server cluster primary OS : ubuntu14 with user prthutech sshKey File var run ambari-server bootstrap 14 sshKey password File null using tmp dir var run ambari-server bootstrap 14 ambari : prthutech-s.local server port : 8080 ambari version : 2.1.2 user run as : root INFO : root : Executing parallel bootstrap WARNING : root : Bootstrap at host prthutech-l2 timed out and will be interrupted INFO : root : Finished parallel bootstrap Comment : hey guys plz help me out of this...i been struck from last few weeks....respond quickly....thanks in advance Comment : You probably need to address this error ssh : connect to host prthutech-l2 port 22 : Connection timed out Comment : Did you add the nodes in your cluster to each nodes etc hosts-file Is sshd installed on all the nodes", "Question : I ve initially installed 2 slave nodes node01 node02 cluster using Ambari Cluster Install wizard successfully . My Ambari Server is running on other node node 00 . Problem is at the time of install wizard i gave only 2 slave node because it asked me to enter the target hosts .. . .. . so i assumed and gave node 01 node 02 slaves say .. . .. . Eventually by default node 01 and node 02 behaved as master and slave All the services components were shared by these 2 nodes node 01 and 02 and it went successfully and became 2 node-cluster .. . .. . Now what is my requirement is want to add node 00 Ambari server is running to make whole system as 3 node-cluster and want to make node 00 as master if there are any possibilities and or else simply add and run few of services on it . One thing all the services were shared between node 01 and node 02 so what services need to add for node 00 . .. . .. . shall i make node 00 as data node name node sec . name node if yes how please help me . thanks .. . Answer : The best option is to recreate the structure by uninstalling and installing Ambari again . The second option is use Ambari Rest API calls using curl to disable then delete the component this option is not there in Ambari UI hence you need to use Rest API calls then add it again from Ambari UI . https : cwiki.apache.org confluence display AMBARI Using+APIs+to+delete+a+service+or+all+host+components+on+a+host .. . .. . Before doing it ensure you take backup of data and metadata files . I think you are may be using postgres for storing Ambari metadata and mysql for Hive Derby fro oozie . You may need to do backup of metadata also .", "Question : Well it seems I ve hit my first issue with my BigInsights Image not a massive problem but something to think about . On my Ambari browser services page it was showing that the Kafka service was not running I tried a restart a number of times but this seemed to continuously fail . So I figured that I best look into it a bit further . In this case the issue was on the Ambari Master server which has the most services running on it . So first call of action is to see if maybe Ambari is not making the call correctly : .. . .. . Next I tired a clean start not that I figured it would make much difference but maybe there was a issue with the logs not allowing it to restart : .. . Answer : So lets take a proper look at the logs : .. . .. . Lets look at the error and out files : .. . .. . Ah that s odd as I asked for at least 4GB of memory for my VMs lets check : .. . .. . Best get some more memory allocated Normally the minimum that you should install BigInsights with as recommended by the IBM support pages is 8GB so this gives you rather a insight into why . At least 2GB of it is just to run the installed services on the system even before you start loading the DB and running queries .", "Question : Today I ve been doing some testing with Ambari on a cluster of servers so that I can deploy a BigInsights image . Everything seems to be going well with all the components being configured okay that is until it does the final install . I see a image similar to this - Ambari Installer error http : i.stack.imgur.com 2xig4.jpg .. . .. . Examining the failures in more detail it shows messages like this : .. . Answer : It would seem that all nodes in the cluster fail to install due to a lack of initialisation of the repos for example : .. . .. . But if we clean the systems then is systems I can then discover the required packages : .. . .. . After which you should find that all the installs go though without any error .", "Question : null .. . Answer : I have already connected to ambari before with the inet address that we get through ifconfig . However when i do a nslookup I get a different IP for the Namenode . What s the difference and which one s the correct IP in that case" ] }
[ "yes-answer-long", "yes-answer-short" ]
hadoop
UNK_RELATION
aegis@web@77
aegis -- aegis is one of the data-binding standards supported by apache cxf @placeholder service framework.tag aegis can be used for programming related problems of configuring and development of apache cxf framework .
{ "confidence": [ 82.86746978759766, 78.37165832519531, 76.57359313964844, 70.68128967285156, 69.68103790283203, 68.12448120117188, 65.9781494140625, 65.34489440917969, 64.73086547851562, 64.68721008300781, 63.42416763305664, 63.07601547241211, 60.46371841430664, 60.46371841430664, 60.322418212890625, 60.22898483276367, 60.22898483276367, 58.82750701904297, 58.82750701904297, 58.53377914428711, 58.521324157714844, 57.721519470214844, 57.43611145019531, 56.4053955078125, 56.4053955078125, 56.4053955078125, 56.4053955078125, 56.328304290771484, 54.581939697265625, 53.996517181396484, 53.98256301879883, 51.83484649658203, 51.22612762451172, 50.187782287597656, 50.187782287597656, 49.73121643066406, 48.01740646362305, 47.192771911621094, 46.881996154785156, 45.496971130371094, 45.496971130371094, 45.496971130371094, 44.811607360839844, 44.24968338012695, 44.24968338012695, 43.89851760864258, 42.7547721862793, 42.7547721862793, 42.7547721862793, 42.7547721862793, 40.270633697509766, 39.979949951171875, 38.61126708984375, 38.485042572021484, 38.485042572021484, 38.485042572021484, 38.02507400512695, 37.5465202331543, 35.19769287109375, 34.29095458984375, 34.29095458984375, 33.06507110595703, 30.553977966308594, 29.059066772460938, 28.418834686279297, 27.171546936035156, 27.171546936035156, 25.6766357421875, 24.030105590820312, 23.407047271728516, 21.135652542114258, 20.344148635864258, 19.00396728515625, 18.770599365234375, 18.371028900146484, 18.12916374206543, 17.818477630615234, 17.46894645690918, 17.46894645690918, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 16.754547119140625, 16.754547119140625, 16.434993743896484, 16.434993743896484, 16.323566436767578, 16.155977249145508, 15.9989595413208, 15.550801277160645, 15.328788757324219, 15.232297897338867, 14.875535011291504, 14.147079467773438, 14.138023376464844 ], "content": [ "I use Apache CXF with Aegis data-binding to provide a Java web service to a C client .", "Is there something similar in Java with CXF Aegis with Annotations", "We use CXF framework with aegis mapper for java-server and .NET client .", "There are samples in the CXF distribution of using Aegis independently of web-services .", "Background I am working on web-services using Apache CXF Aegis with Java .", "And the Aegis databinding .", "When trying to expose a Service with Aegis databinding in CXF DOSGi I get this error in Java 8 .", "So the Aegis binding is not schema checked but at least works .", "I m trying to create a web service in ServiceMix based on Spring and CXF with Aegis databinding .", "I have been playing around with Apache CXF in particular the various data bindings it supports : JAXB the default MTOM Aegis and XMLBeans .", "I said aegis nobody knew the answer.. . AEGIS is related to JAXB that s why .", "Shouldn t it say aegis", "It seems wsdl2java can not generate aegis code .", "Is there a similar tool can generate client code for aegis", "For bean- xml convertion in webservices we use Aegis from CXF it is jaxb-compatible as I understand .", "sorry can t help you with aegis", "How to convert a class into XML with Aegis", "How do a serialize an existing Java object using Aegis CXF to a file to examine the output of the XML", "I haven t seen how to use Aegis CXF to output a Java object to a file .", "You should use a mapping file http : cxf.apache.org docs aegis-21.html Aegis 282.1 29-DetailedControlofBeanTypeMapping :", "I found out actually in the nokia sdk docs that what i need is something called aegis-su in aegis-dss-tools or aegis-manifest for the worst case from aegis-manifest-dev .. . .. . problem : i searched all google and i cannot find these packages anywhere. . .. . .. . can someone help me", "How can I turn off Aegis inheritance", "the web service should use Aegis data-binding with JAX-WS as front-end .", "Does Aegis mapping support @XmlJavaTypeAdapter annotation", "Or is it possible to set it is aegis configuration for all arrays", "@bruno sorry never heard of AEGIS until now", "Unfortunately Aegis databinding does not leverage this annotation .", "What I have tried I have examined how to use CXF Aegis and all the examples show how to expose a web service .", "Trying to learn something related to Apache CXF .", "Thats how we do it stackoverflow.com questions 23930728 aegis-mapping-not-working http : stackoverflow.com questions 23930728 aegis-mapping-not-working", "NOTE : I am using Java with CXF Aegis with Annotations . .. . .. . Another variation of the same problem is returning an abstract-class but needing to send a concrete type .", "If one wants to just set the brief description aegis -change attributes brief description DESC has to be used", "Do you know why you want to use aegis instead of JAXB", "I have been using aegis for 1.5 years and never had this strange issue .", "Went through the aegis reference manual and found that aedeu command could be my friend in this case and he is .", "I understand using the DataContractSerializer limits the complexity of the Aegis-generated WSDL .", "Aegis has no wsdl2java tool so it is less suited for contract-first development i.e .", "That can work using JAXB but i wanna do it with AEGIS but can t figure out how to do it .", "Example WSDL fragment : .. . .. . It seems former versions of Aegis did not generate the extension so I am hoping it can be switched off : https : issues.apache.org jira browse CXF-5176", "I tried using aegis -change attributes to change the brief description of my current change set but it didn t work .", "Aegis is designed as a purely java first databinding as it cannot handle a lot of various schema concepts and such .", "I am using AIM Aegis Implicit Mail to send Implicit ssl mails .", "I can imagine thee theoretical possibilities to deal with this issue : .. . .. . Turn off Inheritance support with Aegis .", "At my work we currently use Aegis http : aegis.sourceforge.net version-control SCM .", "We re not currently planning to switch but I would like to know how to do it in the future without using Aegis .", "Can anyone please give me an example along with configuration so that it can run on any application server say Tomcat that uses Aegis data-binding with JAX-WS as front-end", "Aegis has it s strengths here as it s designed to be able to handle a wider range of things than JAXB .", "I have made an aegis manifest file following way but it does not seem to be working .", "Aegis is able to generate a WSDL that contains both the base and the derived type but the DataContractSerializer does not seem to be able to understand this WSDL .", "I would like to know the XML that an existing object would serialize to using Aegis .", "I dont want to create an aegis manifest at this point since im still in early development or in the worst case i would like to create a flying manifest for my script and thats it .", "My Spring beans are : .. . .. . Also i declare in the MANIFEST.MF : .. . .. . I can t find a solution to this problem if a use JAXB there is no problem but i need to use Aegis .", "See CXF-6959 https : issues.apache.org jira browse CXF-6959 .", "It appears that Aegis provides slightly more control over the mapping between Java classes and XML through its declarative syntax in Class .aegis.xml files .", "After reading the Aegis source code I helped myself with the following hack : .. . .. . If I register this AegisType for my inherited beans it works .", "There does not seem to be an example of how to leverage Aegis to output your types to a file and it is not clear from the documentation that I have read how to do this .", "aegis-standalone example is located under apache-cxf-install-dir samples directory .", "I m using the library CXF .", "Then look at the example suggested by @bmargulies or reword the question to to get answers to what you want - Putting JAXB because not as many people know aegis is not going to attract any answers you want", "CXF wsdl2java tool can generate client code which databinding is jaxb .", "the exception can be observed by running the CXF-DOSGi build in Java 8 .", "https : issues.apache.org jira browse CXF-3613", "However the default JAXB databinding in CXF does respect this annotation .", "It s definitely the best tested databinding in CXF and performs quite well .", "For now I have committed a workaround on CXF master to ignore this exception in the static code .", "We use such setting in CXF config to prevent it : .. . .. . But we have another problem with array .", "Presumably you already have CXF it should have come with it or from the same place it was downloaded from .", "I m asking from a CXF point of view but if any other options come to mind e.g .", "Just a thought : .. . .. . In a project I recently experienced that a CXF webservice worked fine when run locally in Jetty whereas all top-level Collection s deserialized as null when run in a Weblogic container .", "Brought the change back to development phase and then I went on to build review and integrate .", "The web service client may use any binding any front-end or it may be a simple standalone application also .", "This service run as war in Tomcat without problems but when i deploy it in ServiceMix i get a NullPointerException .", "I found this question juxtaposing JAXB and XMLBeans but it doesn t give a comprehensive overview : .. . .. . http : stackoverflow.com questions 1362030 jaxb-vs-apache-xmlbeans .. . .. . Besides these naive a priori considerations do you have any blood-and-guts experiences that would support the use of any other binding besides JAXB", "If you have exising applications that are expecting XMLBeans beans or SDO beans if using 2.3-SNAPSHOT of CXF or JiBX beans if following the GSoC project then using the other databindings could help by removing any needed mappings from JAXB to those object models .", "I m writting a client for a SOAP Web Service .", "Unfortunately the first use-case where we return an Object and need to ensure that all types that are valid to return from the web service are represented in the WSDL does not seem possible with code-first development .", "This can be used to decorate your Employee base-class with the descendant types .", "With test-driven development TDD these seem like sensible requirements .", "Unfortunately this just does not seem possible in Java with code-first development .", "I have a change which is in awaiting integration stage .", "When I issue aeib command the output says couple of file are altered .", "I tried reverting the changes and make both w D file and the current file same .", "Still no luck .", "I am also unable to undo these files and begin a new change to push the latest files through that new change as it says the files are locked with another change .", "Leaning on you experts .", "Oh my god I thought this problem will create huge issues to the progress of my devlopment and couldn t find much help from online as well .", "Here are the streams : .. . .. . Request : .. . .. . Response : .. . .. . The service is called it replies and the client receive the correct reply .", "But in the client the line service.sendMedia bu media making the Web Service call returns null .", "I need to return a multiple values from a web service as.. .", "How do I add these known-types to the web service contract", "JAXB can be used starting from Java classes or XML schema .", "Since all of these are supported I suppose each has its merits .", "It can confuse other developers if they see two ways of reading setting one variable c.getT .setT1 1 and c.setT1 .", "Here is the code I use on the client : .. . .. . The service interface is like this : .. . .. . I have enabled XML stream logging so that I see the XML stream that is sent to the server and the stream it returns .", "I used AIM for it. . but for an idiot reason I Think It doesn t work. .", "Keep in mind that I have existing objects that already support other binding methods .", "Where the other databindings come in are usually for one of two cases : .. . .. . 1 Java first use cases where you have something already written in Java that you want to expose as a web service with little to no modifications to the code .", "Object can be several different types .", "Aim is not providing AlternativeView however you can use inline attachments to put your images and directly set HTML code in your message body ." ] }
{ "confidence": [ 119.34949493408203, 110.12397003173828, 106.5611343383789, 101.52486419677734, 100.98099517822266, 99.66207122802734, 99.09086608886719, 98.54283142089844, 98.53230285644531, 98.00601959228516, 97.97406005859375, 91.12592315673828, 79.03659057617188, 76.4311294555664, 76.13771057128906, 70.47906494140625, 69.76002502441406, 62.436668395996094, 60.208251953125, 60.13191223144531 ], "content": [ "Question : null .. . Answer : I m new to the web-services . Trying to learn something related to Apache CXF . Can anyone please give me an example along with configuration so that it can run on any application server say Tomcat that uses Aegis data-binding with JAX-WS as front-end I.e . the web service should use Aegis data-binding with JAX-WS as front-end . The web service client may use any binding any front-end or it may be a simple standalone application also . Comment : Thats how we do it stackoverflow.com questions 23930728 aegis-mapping-not-working http : stackoverflow.com questions 23930728 aegis-mapping-not-working", "Question : null .. . Answer : How do a serialize an existing Java object using Aegis CXF to a file to examine the output of the XML Background I am working on web-services using Apache CXF Aegis with Java . I would like to know the XML that an existing object would serialize to using Aegis . Keep in mind that I have existing objects that already support other binding methods . I believe they support JAXB . What I have tried I have examined how to use CXF Aegis and all the examples show how to expose a web service . There does not seem to be an example of how to leverage Aegis to output your types to a file and it is not clear from the documentation that I have read how to do this . Comment : What have you tried so far Comment : Not really sure as to your question . My experience with Java is limited . I haven t seen how to use Aegis CXF to output a Java object to a file .", "Question : I have been playing around with Apache CXF in particular the various data bindings it supports : JAXB the default MTOM Aegis and XMLBeans . Since all of these are supported I suppose each has its merits . I came up with these : .. . .. . Obviously MTOM is to be preferred where large attachments are involved . JAXB depends on annotations so it is less suited when modification of classes is restricted . Aegis has no wsdl2java tool so it is less suited for contract-first development i.e . start with a WSDL and generate your Java code from that . It appears that Aegis provides slightly more control over the mapping between Java classes and XML through its declarative syntax in Class .aegis.xml files . On the other hand I couldn t devise of any scenarios where JAXB did not do the trick . I found this question juxtaposing JAXB and XMLBeans but it doesn t give a comprehensive overview : .. . .. . http : stackoverflow.com questions 1362030 jaxb-vs-apache-xmlbeans .. . .. . Besides these naive a priori considerations do you have any blood-and-guts experiences that would support the use of any other binding besides JAXB I m asking from a CXF point of view but if any other options come to mind e.g . Castor please don t hesitate to elaborate . .. . Answer : http : java.net jira browse JAXB-516 .. . .. . That s why .", "Question : I have been playing around with Apache CXF in particular the various data bindings it supports : JAXB the default MTOM Aegis and XMLBeans . Since all of these are supported I suppose each has its merits . I came up with these : .. . .. . Obviously MTOM is to be preferred where large attachments are involved . JAXB depends on annotations so it is less suited when modification of classes is restricted . Aegis has no wsdl2java tool so it is less suited for contract-first development i.e . start with a WSDL and generate your Java code from that . It appears that Aegis provides slightly more control over the mapping between Java classes and XML through its declarative syntax in Class .aegis.xml files . On the other hand I couldn t devise of any scenarios where JAXB did not do the trick . I found this question juxtaposing JAXB and XMLBeans but it doesn t give a comprehensive overview : .. . .. . http : stackoverflow.com questions 1362030 jaxb-vs-apache-xmlbeans .. . .. . Besides these naive a priori considerations do you have any blood-and-guts experiences that would support the use of any other binding besides JAXB I m asking from a CXF point of view but if any other options come to mind e.g . Castor please don t hesitate to elaborate . .. . Answer : If starting from scratch to create a WSDL first web service then I definitely would recommend sticking with JAXB 95 of the time maybe even higher . It s definitely the best tested databinding in CXF and performs quite well . Where the other databindings come in are usually for one of two cases : .. . .. . 1 Java first use cases where you have something already written in Java that you want to expose as a web service with little to no modifications to the code . Aegis has it s strengths here as it s designed to be able to handle a wider range of things than JAXB . However if you CAN modify the code adding JAXB annotations usually isn t that hard . If you have mostly normal beans it s not a big deal . 2 Existing applications that use a particular mapping . If you have exising applications that are expecting XMLBeans beans or SDO beans if using 2.3-SNAPSHOT of CXF or JiBX beans if following the GSoC project then using the other databindings could help by removing any needed mappings from JAXB to those object models . Hope that helps a little .", "Question : I use Apache CXF with Aegis data-binding to provide a Java web service to a C client . This works in principle very well . On the C side I would like to use the more limited DataContractSerializer because it allows for collections instead of arrays . I understand using the DataContractSerializer limits the complexity of the Aegis-generated WSDL . Now I have a Java type that uses inheritance . Aegis is able to generate a WSDL that contains both the base and the derived type but the DataContractSerializer does not seem to be able to understand this WSDL . SvcUtil falls back to the XmlSerializer and my collections get ugly arrays . I can imagine thee theoretical possibilities to deal with this issue : .. . .. . Turn off Inheritance support with Aegis . This should cause the WSDL to contain only the derived types containing each all of the base type properties . Somehow make DataContractSerializer understand WSDL inheritance .. . Somehow make XmlSerializer use collections instead of arrays .. . .. . I think the last two options are not possible so I am stuck with the first one . How can I turn off Aegis inheritance Example WSDL fragment : .. . .. . It seems former versions of Aegis did not generate the extension so I am hoping it can be switched off : https : issues.apache.org jira browse CXF-5176 Comment : Try adding the ct : System.Collections.Generic.List 1 switch in your svcutil command to generate List collections instead of arrays Comment : Thank you very much for your tip . Unfortunately this does not work - SvcUtil still falls back to the XmlSerializer which then generates arrays . If I remove the inherited type from the WSDL leaving all my other array collection types unchanged in-place it works . .. . Answer : After reading the Aegis source code I helped myself with the following hack : .. . .. . If I register this AegisType for my inherited beans it works . Mustn t there be a better way", "Question : How to convert a class into XML with Aegis Can t find tutorials on the web only random code . .. . Answer : There are samples in the CXF distribution of using Aegis independently of web-services . Specifically the aegis standalone sample is what you want to look at . Comment : That could be helpfull how do i get it Comment : Presumably you already have CXF it should have come with it or from the same place it was downloaded from . Comment : Great i m gonna take a look at it Comment : +1 . aegis-standalone example is located under apache-cxf-install-dir samples directory .", "Question : I have been playing around with Apache CXF in particular the various data bindings it supports : JAXB the default MTOM Aegis and XMLBeans . Since all of these are supported I suppose each has its merits . I came up with these : .. . .. . Obviously MTOM is to be preferred where large attachments are involved . JAXB depends on annotations so it is less suited when modification of classes is restricted . Aegis has no wsdl2java tool so it is less suited for contract-first development i.e . start with a WSDL and generate your Java code from that . It appears that Aegis provides slightly more control over the mapping between Java classes and XML through its declarative syntax in Class .aegis.xml files . On the other hand I couldn t devise of any scenarios where JAXB did not do the trick . I found this question juxtaposing JAXB and XMLBeans but it doesn t give a comprehensive overview : .. . .. . http : stackoverflow.com questions 1362030 jaxb-vs-apache-xmlbeans .. . .. . Besides these naive a priori considerations do you have any blood-and-guts experiences that would support the use of any other binding besides JAXB I m asking from a CXF point of view but if any other options come to mind e.g . Castor please don t hesitate to elaborate . .. . Answer : Remember that JAXB is a specification http : bdoughan.blogspot.com 2010 07 jaxb-xml-binding-standard.html so there are multiple implementations : Metro http : jaxb.java.net Reference Implementation MOXy http : www.eclipse.org eclipselink moxy.php I m the tech lead etc . JAXB can be used starting from Java classes or XML schema . If you have classes that cannot be modified individual JAXB implmentations offer extensions to handle that . See MOXy s externalizable metadata : .. . .. . http : wiki.eclipse.org EclipseLink Examples MOXy EclipseLink-OXM.XML .. . .. . JAXB was designed to work with MTOM attachments see the attachment marshaller unmarshaller . MOXy has XPath based mappings which offers full control of your object-to-XML binding see : .. . .. . http : bdoughan.blogspot.com 2010 07 xpath-based-mapping.html .. . parse google geocode with xstream http : stackoverflow.com questions 906855 parse-google-geocode-with-xstream 3302823 3302823", "Question : We use CXF framework with aegis mapper for java-server and .NET client . By default we have minOccurs 0 for all variables in classes in WSDL . We use such setting in CXF config to prevent it : .. . .. . But we have another problem with array . For array we have such code in WSDL : .. . .. . So empty arrays are not accepted : .. . .. . Is it possible to add annotation to array which set minOccurs 0 to elements of the array not to the whole array Or is it possible to set it is aegis configuration for all arrays .. . Answer : You should use a mapping file http : cxf.apache.org docs aegis-21.html Aegis 282.1 29-DetailedControlofBeanTypeMapping :", "Question : I m trying to create a web service in ServiceMix based on Spring and CXF with Aegis databinding . This service run as war in Tomcat without problems but when i deploy it in ServiceMix i get a NullPointerException . My Spring beans are : .. . .. . Also i declare in the MANIFEST.MF : .. . .. . I can t find a solution to this problem if a use JAXB there is no problem but i need to use Aegis . Thanks .. . Answer : It looks like this is a known bug and seems to be open right this moment . https : issues.apache.org jira browse CXF-3613", "Question : When trying to expose a Service with Aegis databinding in CXF DOSGi I get this error in Java 8 . In java-7 it works fine . Caused by : java.lang.IllegalArgumentException : No SchemaFactory that implements the schema language specified by : http : www.w3.org 2001 XMLSchema could be loaded at javax.xml.validation.SchemaFactory.newInstance SchemaFactory.java : 215 at org.apache.cxf.aegis.type.XMLTypeCreator . XMLTypeCreator.java : 122 .. . .. . See full stacktrace here http : apaste.info 8TO .. . .. . I think the reason is that the code does not see the impl class com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory . Any ideas how to fix this Btw . the exception can be observed by running the CXF-DOSGi build in Java 8 . .. . Answer : I still do not have found a real solution for this . For now I have committed a workaround on CXF master to ignore this exception in the static code . So the Aegis binding is not schema checked but at least works . See CXF-6959 https : issues.apache.org jira browse CXF-6959 . I would be happy about any hints to get this fully working again .", "Question : I need to return a multiple values from a web service as.. . Object can be several different types . How do I add these known-types to the web service contract Is there an annotation that I can decorate my interface with NOTE : I am using Java with CXF Aegis with Annotations . .. . .. . Another variation of the same problem is returning an abstract-class but needing to send a concrete type . In WCF and .NET there is a feature called KnownTypes that handles these scenarios . Is there something similar in Java with CXF Aegis with Annotations .. . Answer : There is an annotation in JAXB called @XmlSeeAlso . This can be used to decorate your Employee base-class with the descendant types . Unfortunately Aegis databinding does not leverage this annotation . However the default JAXB databinding in CXF does respect this annotation . This solves the SalariedEmployee scenario above . The equivalent to this is .NET is the KnownType attribute . Unfortunately the first use-case where we return an Object and need to ensure that all types that are valid to return from the web service are represented in the WSDL does not seem possible with code-first development . In .NET you can use the ServiceKnownType attribute to expose these types . Unfortunately this just does not seem possible in Java with code-first development .", "Question : CXF wsdl2java tool can generate client code which databinding is jaxb . It seems wsdl2java can not generate aegis code . Is there a similar tool can generate client code for aegis .. . Answer : No . Aegis is designed as a purely java first databinding as it cannot handle a lot of various schema concepts and such . If starting from WSDL JAXB is strongly encouraged .", "Question : For bean- xml convertion in webservices we use Aegis from CXF it is jaxb-compatible as I understand . This is my type : .. . .. . I need t.t1 field to be on the same level in XML as a and b in C bean restored from xml should be like this : .. . .. . client code is interested only in field t1 from structure T . Thanks . .. . Answer : You could add getT1 and setT1 int to C and make getT @XmlTransient Comment : Your solution probably works but I don t want to add additional public methods to my class . It can confuse other developers if they see two ways of reading setting one variable c.getT .setT1 1 and c.setT1 . Of course I can mark c.setT1 as deprecated or add comments but if it is possible I would like to avoid such code . Comment : @dbf you could also make these methods private . This requires explicitly annotating them with @XmlElement though . Comment : @dbf another possibility would be to use @XmlJavaTypeAdapter and replace C with another object could be a class that extends or wraps C that contains the properties you want . Comment : sfussenegger XmlJavaTypeAdapter is good but I have a problem : it is not called during webservice method invocation . Does Aegis mapping support @XmlJavaTypeAdapter annotation Comment : sorry can t help you with aegis", "Question : null .. . Answer : I m trying to write a little python application and to start i simply drop the .py into the device and execute from there . Now I am at the point where i probably need some credentials for accessing the tracker . I dont want to create an aegis manifest at this point since im still in early development or in the worst case i would like to create a flying manifest for my script and thats it . I found out actually in the nokia sdk docs that what i need is something called aegis-su in aegis-dss-tools or aegis-manifest for the worst case from aegis-manifest-dev .. . .. . problem : i searched all google and i cannot find these packages anywhere. . .. . .. . can someone help me", "Question : How to convert a class into XML with Aegis Can t find tutorials on the web only random code . .. . Answer : This will save it to a file : .. . .. . Take a look at http : download.oracle.com javase 6 docs api javax xml bind Marshaller.html for more info what you can use beside serializing it to a file . Comment : That can work using JAXB but i wanna do it with AEGIS but can t figure out how to do it . Comment : @bruno sorry never heard of AEGIS until now Comment : @bruno - your post subject says using JAXB . Shouldn t it say aegis Do you know why you want to use aegis instead of JAXB Comment : I said aegis nobody knew the answer.. . AEGIS is related to JAXB that s why . Comment : Then look at the example suggested by @bmargulies or reword the question to to get answers to what you want - Putting JAXB because not as many people know aegis is not going to attract any answers you want", "Question : I tried using aegis -change attributes to change the brief description of my current change set but it didn t work . What should I do to make this work EDIT : The command I was looking for was Comment : I figured this out a while back . The above command is correct if you want to set the extensive description . If one wants to just set the brief description aegis -change attributes brief description DESC has to be used .. . Answer : Since no answer was given for quite some time I m adding the solution I gave in the comments as the anser : .. . .. . The above command is correct if you want to set the extensive description . If one wants to just set the brief description aegis -change attributes brief description DESC has to be used", "Question : I have a change which is in awaiting integration stage . When I issue aeib command the output says couple of file are altered . I tried reverting the changes and make both w D file and the current file same . Still no luck . I am also unable to undo these files and begin a new change to push the latest files through that new change as it says the files are locked with another change . I have been using aegis for 1.5 years and never had this strange issue . Leaning on you experts . .. . Answer : Oh my god I thought this problem will create huge issues to the progress of my devlopment and couldn t find much help from online as well . Went through the aegis reference manual and found that aedeu command could be my friend in this case and he is . Brought the change back to development phase and then I went on to build review and integrate .", "Question : I m writting a client for a SOAP Web Service . I m using the library CXF . With the Simple frontend . And the Aegis databinding . The server is providing a Java interface named MediaService for the web methods and I import that interface in the client project . I then use a MediaService.aegis.xml file to provide names for the method parameters for them not to be named and when serializing the request . Here is the code I use on the client : .. . .. . The service interface is like this : .. . .. . I have enabled XML stream logging so that I see the XML stream that is sent to the server and the stream it returns . Here are the streams : .. . .. . Request : .. . .. . Response : .. . .. . The service is called it replies and the client receive the correct reply . But in the client the line service.sendMedia bu media making the Web Service call returns null . There is something wrong with deserializing the reply . Do you have any idea of what went wrong and how to fix it Best regards . UPDATE : .. . .. . I forgot to mention that when I call this method : .. . .. . I get this error : .. . .. . Here is my cxf.xml : .. . .. . UPDATE 2 : .. . .. . And here is my MediaService.aegis.xml : Comment : List and not List Reference Hmm It would really help if you added the relevant parts of the service s WSDL . Comment : Well there is no WSDL . The team who made the server part just gave us that Java interface that has a method returning a simple List . The server is using XFire 1.2.6 to expose the method . Comment : Did you try with any soap-client like soapui .. . Answer : Just a thought : .. . .. . In a project I recently experienced that a CXF webservice worked fine when run locally in Jetty whereas all top-level Collection s deserialized as null when run in a Weblogic container . Apparently this was caused by a known bug in JAXB don t have a reference handy sorry and the workaround was to wrap the Collection in this manner : .. . .. . and have the webservice work with this object on the wire instead . I hope this may apply to your issue as well if not good luck anyways : - .. . .. . Anders", "Question : At my work we currently use Aegis http : aegis.sourceforge.net version-control SCM . The way we have it configured we have a bunch of tests and it forces the following things to be true before a change can be integrated : .. . .. . The full set of tests must have been run . All tests must have passed . With test-driven development TDD these seem like sensible requirements . But I haven t heard of any way you can do this with any other version-control systems . We re not currently planning to switch but I would like to know how to do it in the future without using Aegis . I would be interested in any VCS distributed or not that can do this I m also interested in any plugins extensions to existing VCS that allow this . Preferably open-source software . ETA : OK it seems like the usual thing to do is have VCS + continuous-integration software and running the tests is automated as part of the build instead of as a separate step . If I understand correctly that still lets you commit code that doesn t pass the tests just you get notified about it -- is that right Is there anything that would stop you from being able to integrate commit it at all .. . Answer : You can also use pre-commit hooks in Perforce . And if you re a .NET shop Visual Studio can be configured to require gated checkins .", "Question : At my work we currently use Aegis http : aegis.sourceforge.net version-control SCM . The way we have it configured we have a bunch of tests and it forces the following things to be true before a change can be integrated : .. . .. . The full set of tests must have been run . All tests must have passed . With test-driven development TDD these seem like sensible requirements . But I haven t heard of any way you can do this with any other version-control systems . We re not currently planning to switch but I would like to know how to do it in the future without using Aegis . I would be interested in any VCS distributed or not that can do this I m also interested in any plugins extensions to existing VCS that allow this . Preferably open-source software . ETA : OK it seems like the usual thing to do is have VCS + continuous-integration software and running the tests is automated as part of the build instead of as a separate step . If I understand correctly that still lets you commit code that doesn t pass the tests just you get notified about it -- is that right Is there anything that would stop you from being able to integrate commit it at all .. . Answer : VSTS with custom Work Items right I don t see anything wrong with using this . Built in reporting . The choice to automate . Why not" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
scrollto@jquery@84
scrollto -- jquery.scrollto is a plugin for scrolling elements and the window with @placeholder animation by ariel flesler .
{ "confidence": [ 44.398277282714844, 43.14375305175781, 42.71126174926758, 37.090126037597656, 37.06153869628906, 36.87361526489258, 36.13408279418945, 35.29838180541992, 34.39933776855469, 34.3090934753418, 33.689414978027344, 31.474145889282227, 31.474145889282227, 31.394996643066406, 31.083145141601562, 30.911022186279297, 30.589454650878906, 30.2999267578125, 30.255678176879883, 29.460735321044922, 29.12529754638672, 28.91010284423828, 28.797264099121094, 28.5958251953125, 28.4440975189209, 27.55868148803711, 27.555896759033203, 27.395339965820312, 27.377647399902344, 26.689498901367188, 26.54204559326172, 26.445392608642578, 26.361011505126953, 26.361011505126953, 26.361011505126953, 26.361011505126953, 26.361011505126953, 26.295522689819336, 26.21771240234375, 26.047531127929688, 26.016422271728516, 25.899822235107422, 25.83631134033203, 24.92923355102539, 24.92923355102539, 24.92923355102539, 24.69011878967285, 24.553794860839844, 24.540712356567383, 24.367368698120117, 24.367368698120117, 24.367368698120117, 24.185388565063477, 24.114940643310547, 24.114940643310547, 24.114940643310547, 24.057466506958008, 23.91259765625, 23.85318946838379, 23.85318946838379, 23.74298095703125, 23.630088806152344, 23.594322204589844, 23.350730895996094, 23.072452545166016, 23.021343231201172, 23.021343231201172, 23.021343231201172, 23.021343231201172, 23.021343231201172, 23.021343231201172, 23.021343231201172, 23.021343231201172, 22.903627395629883, 22.613452911376953, 22.46517562866211, 22.332368850708008, 22.147979736328125, 22.13226318359375, 22.13226318359375, 22.13226318359375, 22.128904342651367, 22.00470542907715, 21.98007583618164, 21.946857452392578, 21.668724060058594, 21.55335807800293, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 21.540000915527344, 20.756305694580078, 20.52336311340332, 20.52336311340332, 20.52336311340332 ], "content": [ "see github.com flesler jquery.scrollTo issues 101 https : github.com flesler jquery.scrollTo issues 101 - update to 2.0 is recommended", "Yes the popular scrollTo plugin by Ariel Fiesler", "The plugin is now hosted on Github https : github.com flesler jquery.scrollTo .", "I m trying to use Ariel Fiesler s scrollTo plugin in conjunction with Ben Alman s hashchange plugin .", "I am working on a project which requires jquery scrollTo plugins from Ariel Flesler : Plugin-website http : flesler.blogspot.co.nz 2007 10 jqueryscrollto.html .. . .. . I followed the description and also did my research on stackoverflow to be sure .", "You can find the latest version in GitHub https : github.com flesler jquery.scrollTo .", "I m using jquery.scrollTo plugin .", "I m looking for an option to allow for infinite scrolling using the ScrollTo jQuery plugin .", "On the homepage when the site first loads if you click See what I do it uses ScrollTo https : github.com flesler jquery.scrollTo to move smoothly down to anchors in the page .", "I am looking to implement horizontal scrolling using jQuery.SerialScroll http : flesler.blogspot.com 2008 02 jqueryserialscroll.html based on jQuery.ScrollTo http : demos.flesler.com jquery scrollTo .", "Is jQuery.ScrollTo the most standard plugin to do that", "Or a bug in the ScrollTo plugin", "The problem is the ScrollTo plugin .", "I m using jQuery 1.4 and the scrollTo plugin http : plugins.jquery.com project ScrollTo .", "The plugin also defaults to referencing the window as the target for scrolling .", "I ve got a horizontal scrolling website fixed position menus and the jquery plugin .scrollTo handling next and previous buttons .", "I have successfully implemented Ariel Flesler s ScrollTo and serialScroll plug-in http : plugins.jquery.com project ScrollTo for a vertical scroll overflow : hidden div .", "I tried window .scrollTo and window.scrollTo and document .scrollTo and document.scrollTo .", "I m using scrollto plugin .", "as soon as the user starts scrolling I want the top div to scrollto top .", "According to the plugin docs to scroll a window you use .scrollTo .. . .. . .. . Here s the code I have : .. . .. . And if it helps here s the HTML div .", "Using jQuery makes this much easier perhaps with the scrollto plugin .", "I can t even get the SerialScroll example for right-to-left scrolling http : flesler-plugins.googlecode.com files SerialScroll right-to-left.js to work .", "Also I use scrollTo plugin in combination with jQuery .", "For example document .scrollTo is great for smoothly scrolling to a different spot on your document .", "Thanks .. . .. . UPDATE .. . .. . Fixed : jquery.scrollto : 2.0.0", "Does jQuery.ScrollTo support them", "I am trying to develop auto horizontal scrolling for our website using - jQuery.ScrollTo jQuery.SerialScroll .", "I m trying to create a click event using jQuery + scrollTo plugin .", "If you re just scrolling the page vertically you can replace the entire jQuery scrollTo plugin with this simple line : .. . .. . Personally I do something like this .. . .. . I found that if I try to do other js work while it s scrolling it makes the browser crunch and the animation isn t smooth .", "I think jQuery.ScrollTo will solve this problem .", "I ve decided to use the jQuery serialScroll plugin which piggybacks on the scrollTo plugin to achieve this affect .", ".scrollTo and by extension the SerialScroll plugin adjusts the position of the browser s scrollbar .", "I also tried with a jQuery plugin scrollTo but the results are the same .", "I have a page that uses jQuery s scrollTo plugin to manage some functionality .", "Sounds like a bug your should report to the .scrollTo plugin developer .", "this is still necessary and works even with iOS7 and the latest scrollTo plugin", "The native scrollTo function of Javascript has no option for easing as you can see here developer.mozilla.org en-US docs Web API Window scrollTo https : developer.mozilla.org en-US docs Web API Window scrollTo .", "I have a problem with the jQuery extension jScrollPane http : jscrollpane.kelvinluck.com combined with the scrollTo http : archive.plugins.jquery.com project ScrollTo plugin .", "I managed to achieve this but once it s done i want the user to be abble to start scrolling again I just want the scrollto animation to appear once when user scrolls for the first time .", "No scrollTo effect .", "I want to change the background-color of the element that was scrolled to using the ScrollTo plugin for JQuery .", "flesler.com jquery scrollTo http : flesler.com jquery scrollTo", "scrollTo version 1.4.2", "Why require scrollTo", "There s ScrollTo in Javascript .", "I ve try .. . .. . but this dons t work either .. . .. . . . then I ve thougth this can be jQuery version problem scrollTo and rest are from 2009 so I ve move back to jquery 1.2.6 and still nothing so I m thingking this can be a scrollTo plugin problem .. . .. . now i will try to write own scrollTo plugin using only .animate", "Currently only text can be entered in the scrollto function .", "changed .scrollTo axis : xy to .scrollTo axis : y and flicker is gone .", "Here s what I did .. . .. . The scrollTo plugin gives the elem option which can be used to mark the new node as active .", "Also the ScrollTo plugin http : flesler.blogspot.com 2007 10 jqueryscrollto.html for jQuery is way too complicated .", "Jquery itself my be working fine but are you sure you have the scrollTo plugin linked properly", "Its only a little confusing if you dont have a scrolling animation .", "You didn t got the correct scrollTo .", "In chrome opera no working function scrollto .", "which version of scrollTo are you using", "I have a website which is one page and the user navigates to each section using links which uses the scrollto jquery plugin .", "It maybe confusing scrollTo .", "http : stackoverflow.com questions 211111 jquery-scrollto-jquery-serialscroll-horizontal-scrolling .. . .. . And I m not sure tables would be the way to go.. .", "I seem to be having a problem scrolling to an element using the .mCustomScrollbar scrollTo divID function .", "There is a site navigation where window is scrolling to Y position using Greensock s ScrollToPlugin .", "More particularily it s the one used on their demo : demos.flesler.com jquery scrollTo http : demos.flesler.com jquery scrollTo click on easing .", "Also thanks to Ariel and Ben for these great plugins .", "I am using the jquery ScrollTo plugin that is animating the position of the div inside content to create the sliding effect .", "I want to scroll to an element by its ID using appium scrollto .", "I m having a hard time with scrollto actually .", "Your main problem is that the var scrollTo contains 0 .", "However neither of your codes produced the scrollTo effect .", "You cannot scroll an ImageView with the scrollTo function .", "Added clarification about unsuitability of ScrollTo function in the post", "Why not do something like .. . .. . instead of using scrollTo", "Change one of those alerts to alert .scrollTo", "I m having troubles using both onScroll and scrollTo .", "I m using the popular jQuery scrollTo localScroll http : flesler.blogspot.com 2007 10 jquerylocalscroll-10.html plugin to create a single page navigation system that automatically scrolls the window to various anchor tags .", "I m attempting a scrollTo on a webpage and I want a button to trigger the scrollTo it will scroll to the top of the form and highlight the first input field .", "You can use the jQuery scrollTo function that has option for adding easing and duration lions-mark.com jquery scrollTo http : lions-mark.com jquery scrollTo", "What I would like to do is construct a scrollto function when I click on each caret using the left position as the scrollto variable .", "But when I use the webview scrollTo function either my ScrollX and ScrollY variables are getting reset before scrollTo or during scrollTo use and the webview just goes back to 0 0 .", "I m using both scrollTo and the child -plugin serialScroll quite frequently and like them because they .. . .. . 1 .", "I wish to use the scrollTo plugin to allow the table to scroll forwards or backwards depending on which button is clicked .", "I have successfully implemented the scrollTo jQuery plugin which scrolls to the next div with the class new when a link is clicked .", "I don t have a suggestion for anything better even Google is coming up with Flesler s plugin or hand-written from base JavaScript or jQuery but Flesler is still updating the plugin .", "but cant i do like ScrollTo this or something", "Turns out I shouldn t have tried to scroll the table it was the window itself - working jQuery is - forward .click function scrollTo + 560px 800 axis : x back .click function .scrollTo - 560px 800 axis : x", "i tried this..but it does not work . code script type text javascript document .ready function window .delay 3000 .scrollTo 30 0 800 easing : elasout script code", "jQuery Scroll Plugin .. . .. . since this is a question tagged with jquery i have to say that this library has a very nice plugin for smooth scrolling you can find it here : http : plugins.jquery.com scrollTo .. . .. . Excerpts from Documentation : .. . .. . or .. . .. . Custom jQuery function for scrolling .. . .. . you can use a very lightweight approach by defining your custom scroll jquery function .. . .. . and use it like : .. . .. . Scroll to a page coordinates .. . .. . Animate html and body elements with scrollTop or scrollLeft attributes .. . .. . Plain javascript .. . .. . scrolling with window.scroll .. . .. . only to sum up use the window.location.hash to jump to element with ID .. . .. . Directly in HTML accesibility enhancements", "It also integrates with the GSAP animation engine https : greensock.com which is great for parallax scrolling websites", "I was recently working with scrollTo to implement a Coda-like slider wizard .", "Maybe serialscroll or scrollto are the best plugins to use and I d welcome any alternatives .", "In the end I had to learn my way around those scrollTo callbacks .", "thanks for your help I don t know why scrollTo isn t valid .", "it breaks nothing it s one easing type of scrollTo on their homepage .", "If you look at the code that easing function is in init.js and not in scrollTo by default .", "But it keeps blowing up the validation entirely or throwing scrollTo errors .", "But after scrollto finished syncCompareScroll started and it breaks position of left side .", "Now I first tried to fixed it via combination with the scrollTo-function .", "But the problem is while scrolling the second iScroll it starts scrolling from the first item .", "Well maybe it s not ideal but I ended up using scrollTo instead .", "It should be like this : data-ng-click scrollTo div + index json", "Also try scrollTo only to the body not both html and body ." ] }
{ "confidence": [ 62.847442626953125, 53.58631134033203, 53.17816925048828, 49.85369110107422, 49.18724060058594, 47.122406005859375, 45.74856948852539, 45.24597930908203, 44.21632385253906, 43.94496536254883, 42.91053009033203, 41.67652130126953, 40.946388244628906, 38.90214157104492, 38.38908767700195, 37.69930648803711, 37.69930648803711, 37.518943786621094, 36.32328414916992, 35.889041900634766 ], "content": [ "Question : In chrome opera no working function scrollto . In firefox working . I don t know in what a problem . Thanks for help . Comment : which version of scrollTo are you using Comment : scrollTo version 1.4.2 Comment : see github.com flesler jquery.scrollTo issues 101 https : github.com flesler jquery.scrollTo issues 101 - update to 2.0 is recommended Comment : @Jaromanda X thanks fixed . .. . Answer : You have a typo here : .. . .. . should be :", "Question : I have 2 divs on a webpage . First div is pattern and the other div is top . When the user arrives on my webpage the two divs are visibile . as soon as the user starts scrolling I want the top div to scrollto top . I managed to achieve this but once it s done i want the user to be abble to start scrolling again I just want the scrollto animation to appear once when user scrolls for the first time . I m using jquery.scrollTo plugin . I tried using a flag but it s not working.. . Here is my html : .. . .. . My css : .. . .. . and my Jquery : .. . .. . Here is JSfiddle : http : jsfiddle.net w8mgnmfe Comment : Putting var flag 0 outside the scroll handler would probably be the easiest fix . .. . Answer : I managed to find a solution by putting the flag outside my scroll event.. . .. . .. . here is the complete code :", "Question : I am looking to implement horizontal scrolling using jQuery.SerialScroll http : flesler.blogspot.com 2008 02 jqueryserialscroll.html based on jQuery.ScrollTo http : demos.flesler.com jquery scrollTo . I currently have a continuous horizontal scrolling working with liScroll as I discuss in this post http : stackoverflow.com questions 41027 whats-a-good-bit-of-js-or-jquery-for-horizontally-scrolling-news-ticker . However now I need discrete scrolling and I have SerialScroll working perfectly for vertical-scrolling . For some reason if the axis property is specified as x nothing happens . I can t even get the SerialScroll example for right-to-left scrolling http : flesler-plugins.googlecode.com files SerialScroll right-to-left.js to work . I have HTML like this : .. . .. . I have jQuery like this that works when axis is y .. . .. . Any ideas Edit answer accepted .. . .. . For those that come along the accepted answer gets rid of the need for serialScroll just need scrollTo . Heights weren t required . Be sure to change scroller to something like mywrap or target.parent .parent . You can also set up automatic scrolling like this : .. . .. . replacing news ul li to your appropriate selector . .. . Answer : I was recently working with scrollTo to implement a Coda-like slider wizard . Here s the steps I took : .. . .. . 1 . Set a containing div to the dimensions I wanted the slider to appear as . overflow : auto helps for testing but you ll probably want to use overflow : hidden in the end . 2 . Inside that place another div make it big enough to hold all your elements horizontally . 3 . Float the panels . give them explicit dimensions . My CSS : .. . .. . My JS : .. . .. . My HTML : Comment : Great - For those interested please see my edits in the question for some minor modifications .", "Question : I m using both scrollTo and the child -plugin serialScroll quite frequently and like them because they .. . .. . 1 . Actually SCROLL things rather than animating css-properties margin position etc .. . 2 . Are flexible and can be used in many different situations unlike lots of other scroller sliders that adds a bunch of bells and whistles that you don t really need . Thing is the plugins haven t been updated since 2009 and although they still work just fine regardless of jquery version there are things that could need improving like the ability to change settings after initilaisation and overall it doesn t fell optimal to use a 3 year old plugin solid and stable as it is . Does anyone have a suggestion of other plugins that might do the same thing perhaps better http : flesler.blogspot.se 2007 10 jqueryscrollto.html .. . Answer : I don t have a suggestion for anything better even Google is coming up with Flesler s plugin or hand-written from base JavaScript or jQuery but Flesler is still updating the plugin . You can find the latest version in GitHub https : github.com flesler jquery.scrollTo .", "Question : I have put together a simple site here : http : matt.srgunltd.co.uk .. . .. . It is built on Jekyll and uses PJAX to ajax-serve the content . On the homepage when the site first loads if you click See what I do it uses ScrollTo https : github.com flesler jquery.scrollTo to move smoothly down to anchors in the page . Now if you visit the blog then return to the homepage this functionality is broken . There appears to be some conflict between PJAX and ScrollTo but I can t figure out what it might be as there are no errors in the console . .. . Answer : onClick events works on content that is loaded in DOM on page load . When you visit other page i.e Blog The content gets updated dynamically . You need to use deligation for your click events on dynamically generated content .", "Question : I have 2 divs on a webpage . First div is pattern and the other div is top . When the user arrives on my webpage the two divs are visibile . as soon as the user starts scrolling I want the top div to scrollto top . I managed to achieve this but once it s done i want the user to be abble to start scrolling again I just want the scrollto animation to appear once when user scrolls for the first time . I m using jquery.scrollTo plugin . I tried using a flag but it s not working.. . Here is my html : .. . .. . My css : .. . .. . and my Jquery : .. . .. . Here is JSfiddle : http : jsfiddle.net w8mgnmfe Comment : Putting var flag 0 outside the scroll handler would probably be the easiest fix . .. . Answer : Simply turn the event off http : api.jquery.com off when you do the scrolling : .. . .. . Note : I have updated it to use no plugins . Also change mynamespace to something more meaningful like scrollToDiv or whatever makes sense to you . This ensures that you only turn that event off . If you want to reactivate it : .. . .. . Fiddle : http : jsfiddle.net ferahl b5ybs6xg 1 Comment : thanks for your reply but I get an error in my console : TypeError : window.scrollTop is not a function Comment : @mmdwc please try now and check the fiddle - also it uses no plugins Comment : Wrong fiddle link - try now Comment : there s a missing before window .scrollTop 10 Comment : Targeted unbinding like that s pretty neat . Upvoting for something you don t see every day .", "Question : I m using the popular jQuery scrollTo localScroll http : flesler.blogspot.com 2007 10 jquerylocalscroll-10.html plugin to create a single page navigation system that automatically scrolls the window to various anchor tags . I have it working no problem but am having trouble preventing it from queueing animation . I have an unordered list with an id of main nav which I am using to skip to the anchor points : .. . .. . When calling the function there is a parameter called stop which is supposed to clear any currently queued animations via the jquery stop function . The parameter defaults to true in the plugin but I have specified it anyway . The plugin also defaults to referencing the window as the target for scrolling . I am calling the function like so : .. . .. . This works but the stop parameter is ignored.. . if I click all four links in quick succession the page will scroll to each link one after the other taking a total of 8 seconds to do so . Not ideal If I wrap the whole page in a container div give it a height and set it to overflow : scroll and then target this div with the localScroll function then the stop parameter works . eg when called like this there is no more animation queueing : .. . .. . It seems that when the plugin references a div as the target to be scrolled it is able to execute the jquery stop function but when the target is set to window the stop function doesn t work . I ve tried creating a jQuery wrapper for the window object and referencing that as the target like so : .. . .. . .. . but this doesn t work either . In the plugin itself the default values are : .. . .. . Does anyone have any ideas on how to stop the animation from cueueing I m using : jQuery 1.6.1 scrollTo 1.4.2 localScroll 1.2.7 .. . Answer : I ve try .. . .. . but this dons t work either .. . .. . . . then I ve thougth this can be jQuery version problem scrollTo and rest are from 2009 so I ve move back to jquery 1.2.6 and still nothing so I m thingking this can be a scrollTo plugin problem .. . .. . now i will try to write own scrollTo plugin using only .animate", "Question : I m using both scrollTo and the child -plugin serialScroll quite frequently and like them because they .. . .. . 1 . Actually SCROLL things rather than animating css-properties margin position etc .. . 2 . Are flexible and can be used in many different situations unlike lots of other scroller sliders that adds a bunch of bells and whistles that you don t really need . Thing is the plugins haven t been updated since 2009 and although they still work just fine regardless of jquery version there are things that could need improving like the ability to change settings after initilaisation and overall it doesn t fell optimal to use a 3 year old plugin solid and stable as it is . Does anyone have a suggestion of other plugins that might do the same thing perhaps better http : flesler.blogspot.se 2007 10 jqueryscrollto.html .. . Answer : This is an old question but for the record as Shauna said the plugins aren t outdated OP might have been looking at Google code hosting which is indeed out of date . The plugin is now hosted on Github https : github.com flesler jquery.scrollTo . There s no much of a need to update it too often given it s very stable already but I do land some commits every now and then when needed .", "Question : I am working on a project which requires jquery scrollTo plugins from Ariel Flesler : Plugin-website http : flesler.blogspot.co.nz 2007 10 jqueryscrollto.html .. . .. . I followed the description and also did my research on stackoverflow to be sure . The following approach is not working even if it looks right to me . At this point I guess I am making an obvious mistake which I dont see . I guess I need some help . .. . .. . Here is the code : .. . .. . In the head : .. . .. . The jquery : .. . .. . The markup : .. . .. . Note : .. . .. . Container - 100px in height .. . .. . List-Items - 50px in height each .. . .. . Both have a width of 100 . I really can t figure out where I am making a mistake here . What am I missing Comment : Trick question : How many scrolling plugins does it take to move a scrollbar Comment : First of all you have to have the jquery plugin at the top . .. . Answer : no need for a plugin imho . look at this fiddle : http : jsfiddle.net flyingsausage kU2ME Comment : Hi Dirk thank you very much for your explanation Worked great . To make it perfect I would like to achieve the following : After the last item is reached the button scrolles to the top again and the user can go through the list again . Now I dont want you to do my work for me . But can you give me a push in the right direction Comment : you must compare scrollTop and css height of the container . if both values are equal then scroll to top again . here is the fiddle . hope that helps . jsfiddle.net UALpA http : jsfiddle.net UALpA Comment : Hi Dirk wow thanks for taking time to help me Exactely what I was looking for . I stumbled on a problem when I have more than just 4 li . Then the container scrolls to top before reaching the last item . Is there a solution for that", "Question : I am trying to develop auto horizontal scrolling for our website using - jQuery.ScrollTo jQuery.SerialScroll . I am not sure if this is the best jquery library to do that but if there s something better please let me know . Here s the behavior that I want check out foursquare s http : foursquare.com Recent Activity list . The data that will refresh will come from a ajax request that I make every few seconds using window.setInterval . I am not really a CSS java script guy so I havent been able to figure out jQuery.SerialScroll . Here s the website http : hiretwits.com - look at the Live job Feeds list . Currently the list does refresh the data coming from the ajax call but I dont see the effect the animation in fact I dont even think serialScroll is being used . Right now I am doing a - feed-ticker .prepend content to pre-append the newly arrived data . You can do a view-source to look at the current code . Any help would be really appreciated . Thanks . .. . Answer : .scrollTo and by extension the SerialScroll plugin adjusts the position of the browser s scrollbar . For example document .scrollTo is great for smoothly scrolling to a different spot on your document . You can of course also adjust the scroll position of a block element with the style overflow : auto or overflow : scroll . Eyeballing the site you linked to it looks like they re not using scrollTo to achieve the animated new item behavior . Rather the containing block s style is set to overflow : hidden and the new items are created with a height of zero . Once inserted in to the page the new item s height is then animated to 75px or whatever . This might be a better approach for you to take . Assuming content is a jQuery object : .. . .. . Magic Comment : thanks for your response but the problem with this solution is that the height is not fixed it varies based on contents in the breadcrumbs div tag . Comment : okay i got it used hide instead of height . so basically did this.. . feed.hide feed.slideDown Thank you very much .", "Question : null .. . Answer : I m trying to use Ariel Fiesler s scrollTo plugin in conjunction with Ben Alman s hashchange plugin . Basically I m scrolling to different DIVs on my page and trying to use hashchange for back forward button functionality . It sort of works but it s inconsistent . On every other back or forward it scrolls . But on the others it just jumps to the scroll position . So you get something like : 1 . Jump 2 . Scroll 3 . Jump 4 . Scroll and so on . Here s a link-to the live site : http : www.6by7.net .. . .. . And the plugins I m using : .. . http : flesler.blogspot.com 2007 10 jqueryscrollto.html .. . http : benalman.com projects jquery-hashchange-plugin Comment : possible duplicate of jQuery LocalScroll + hashchange event browser compatibility issue http : stackoverflow.com questions 5184876 jquery-localscroll-hashchange-event-browser-compatibility-issue", "Question : I m using the popular jQuery scrollTo localScroll http : flesler.blogspot.com 2007 10 jquerylocalscroll-10.html plugin to create a single page navigation system that automatically scrolls the window to various anchor tags . I have it working no problem but am having trouble preventing it from queueing animation . I have an unordered list with an id of main nav which I am using to skip to the anchor points : .. . .. . When calling the function there is a parameter called stop which is supposed to clear any currently queued animations via the jquery stop function . The parameter defaults to true in the plugin but I have specified it anyway . The plugin also defaults to referencing the window as the target for scrolling . I am calling the function like so : .. . .. . This works but the stop parameter is ignored.. . if I click all four links in quick succession the page will scroll to each link one after the other taking a total of 8 seconds to do so . Not ideal If I wrap the whole page in a container div give it a height and set it to overflow : scroll and then target this div with the localScroll function then the stop parameter works . eg when called like this there is no more animation queueing : .. . .. . It seems that when the plugin references a div as the target to be scrolled it is able to execute the jquery stop function but when the target is set to window the stop function doesn t work . I ve tried creating a jQuery wrapper for the window object and referencing that as the target like so : .. . .. . .. . but this doesn t work either . In the plugin itself the default values are : .. . .. . Does anyone have any ideas on how to stop the animation from cueueing I m using : jQuery 1.6.1 scrollTo 1.4.2 localScroll 1.2.7 .. . Answer : I FOUND IT I don t know why byt object window can t be animated In console : .. . .. . To solve the problem just simply change target to body .. . .. . and this is it : Comment : I ve had no problems in animating the Window object.. . the problem is that the animations are cued when the user clicks on several links in quick succession . Adding the stop parameter does not work when the target is set to window . The problem remains when the target is changed to body .. . Comment : I have this issue when scrolling the window on resize and this does not fix the problem at all .", "Question : I want to use scroll jQuery plugin to scroll to anchor tag because I don t want to browser to add to the end of url when you click links . I don t want anyone to bookmark url of my web site with . Is jQuery.ScrollTo the most standard plugin to do that http : demos.flesler.com jquery scrollTo .. . .. . I want to support IE6 FF4 Chrome Android and iphone . Does jQuery.ScrollTo support them Or shouldn t I use the scroll plugin if I need browser comatibility Comment : Post your code . In general you simply need to add return false to a function to remove the url hash . Comment : Just a sidenote IE6 is dead as Microsoft finally is forcing users to upgrade til IE7 Comment : @Scott thanks . I added code . Comment : @js I mean the jquery functions . Comment : @Scott I don t have jQuery functions . I m using just html . And that s why top is added to url when you click a href top top top . I think jQuery.ScrollTo will solve this problem . .. . Answer : If you are using a newer version of jQuery. . then preventDefault may be better . Comment : Thank you very much Why preventDefault is better than return false Does your code support IE6 and Android", "Question : I m building a site where I am using Ariel Fleslers jQuery LocalScroll plugin http : flesler.blogspot.com 2009 03 jquerylocalscroll-127-released.html which I want to do two things : .. . .. . 1 Animate a scroll to an anchor when a link is clicked .. . 2 Scroll to the previously visited anchor when the browsers back button is pressed . The scrolling takes place inside a container where the content is overflowing . Number one was straight forward enough . To acheive number two I did a fair bit of googling but didn t really find a solution even though I came across a few posts by people who were looking to do something similar . I ended up using Ben Almans jQuery hashchange event plugin http : benalman.com projects jquery-hashchange-plugin together with LocalScroll to acheive the desired result the code looks like this : .. . .. . The above code even though I m somewhat of a hack no pun intended when it comes to coding does what I want in Firefox Explorer and Opera . However I get different issues in Chrome and Safari . In Chrome basically the scroll is animated when a link is clicked but when the browsers back button is pressed it just jumps to the anchor without animating the transition . On a closer inspection though it seems like it does animate the back button once in a while but I can t get my head around why it only does it some of the time . In Safari it jumps to the anchor without animating regardless of whether a link is clicked or the back button is used . The animation worked in Safari before I implemented the hashchange event solution when the code looked like this : .. . .. . Does anyone have any ideas as to what is causing these issues in Chrome and Safari As I said I m a designer not a coder and this is really stretching my abilities so feel free to point out any mistakes I ve made in the code above regardless of whether they have nothing to do with the issue at hand or not . Also thanks to Ariel and Ben for these great plugins . EDIT : Ok so here is another weird thing when I uploaded the site to a test server that I run locally scrolling on link click works in Safari even though the exact same code doesn t work when I run it off-server . In any case neither Safari nor Chrome triggers the animation when the back button is pressed so that problem remains . .. . Answer : I had serious issues with both of those plugins they are hard to use feature lacking and buggy . Try this combination instead : .. . .. . https : github.com browserstate history.js .. . https : github.com balupton jquery-scrollto .. . https : github.com browserstate ajaxify .. . .. . It ll handle your scrolling way smoother support the HTML5 History API and work in all the browsers . Comment : Those look simple enough . What about scrolling to the anchor at the hash when a page loads I don t see an option for that .", "Question : null .. . Answer : My package.json : .. . .. . my backbone view : .. . .. . Command : .. . .. . Error : .. . .. . Anything missing or wrong Thanks .. . .. . UPDATE .. . .. . Fixed : jquery.scrollto : 2.0.0 Comment : Why require scrollTo Isn t it apart of the jquery library Comment : @evolutionxbox You are right . I just found it . Thanks", "Question : I jsut now noticed that some simple jQuery is not working on IE9 and IE10 for mobile . I have some copyright links and simple sliding contact form which uses animate . Also I use scrollTo plugin in combination with jQuery . I tried different versions and still no solution . Maybe I am missing something obvious . Here is the code for one copyright link and for contact form to open and close . You can check it live on http : www.crazysunsets.com Comment : Sounds like a bug your should report to the .scrollTo plugin developer . Comment : IE 9 and IE 10 for mobile Are you using a Windows Phone Comment : Yes the popular scrollTo plugin by Ariel Fiesler Comment : @Michael B Yes Lumia820 Comment : @Blazemonger But why the simple animate when clicked on plus sign doesn t work .. . Answer : Your markup is invalid specifically the script-tag format : .. . .. . Change : .. . .. . To : .. . .. . Remove the space after javascript .. . .. . Cheers Comment : Such a simple thing gone unnoticed Thanks .", "Question : I jsut now noticed that some simple jQuery is not working on IE9 and IE10 for mobile . I have some copyright links and simple sliding contact form which uses animate . Also I use scrollTo plugin in combination with jQuery . I tried different versions and still no solution . Maybe I am missing something obvious . Here is the code for one copyright link and for contact form to open and close . You can check it live on http : www.crazysunsets.com Comment : Sounds like a bug your should report to the .scrollTo plugin developer . Comment : IE 9 and IE 10 for mobile Are you using a Windows Phone Comment : Yes the popular scrollTo plugin by Ariel Fiesler Comment : @Michael B Yes Lumia820 Comment : @Blazemonger But why the simple animate when clicked on plus sign doesn t work .. . Answer : goto bottom path : .. . tools menu internet Option Advanced Tab in setting list in browsing group .. . .. . unchecked the Disable script debbugging ie and Disable script debbugging others options checkboxes . now refresh page . ie send error line and error name for you Comment : saved me a lot of money hiring another developer to do the same thin thanks", "Question : I want to use scroll jQuery plugin to scroll to anchor tag because I don t want to browser to add to the end of url when you click links . I don t want anyone to bookmark url of my web site with . Is jQuery.ScrollTo the most standard plugin to do that http : demos.flesler.com jquery scrollTo .. . .. . I want to support IE6 FF4 Chrome Android and iphone . Does jQuery.ScrollTo support them Or shouldn t I use the scroll plugin if I need browser comatibility Comment : Post your code . In general you simply need to add return false to a function to remove the url hash . Comment : Just a sidenote IE6 is dead as Microsoft finally is forcing users to upgrade til IE7 Comment : @Scott thanks . I added code . Comment : @js I mean the jquery functions . Comment : @Scott I don t have jQuery functions . I m using just html . And that s why top is added to url when you click a href top top top . I think jQuery.ScrollTo will solve this problem . .. . Answer : You don t need a plugin + give your users a nice smooth scroll with scrollTop live example here - http : jsfiddle.net 7qr3y 9 : .. . .. . HTML : .. . .. . jQuery : Comment : Thanks . That s nice . bottom is div id bottom or a name bottom Does your code can support IE6 and Android Comment : 1 any element with id bottom 2 android is good IE6.. . not sure . If you have IE6 pull up the jsfiddle I created above to test it . I don t have IE6 Comment : I ve tested . Your fiddle also worked in IE6 and FF2 . Thank you Comment : Glad it helped . If this solved your answer please consider accepting it .", "Question : I am building a Parallax website using SuperScrollorama http : johnpolacek.github.io superscrollorama which have some animation frame by frame using jquery and css3.. . But after ending up doing so i am stuck in a problem i am trying to navigate the pages using some scroll plugin.. . I have tried Basic jquery using scrollTop event using Jquery ScrollTo http : demos.flesler.com jquery scrollTo and using Tween Lite ScrollTo http : api.greensock.com js com greensock plugins ScrollToPlugin.html plugin to navigate through pages but nothing seems to work.. . The issue i get after goggling it is if pages are pinned together as position : fixed and pages doesnot scroll to that position and stuck between.. . .. . .. . With Jquery ScrollTo my code : - .. . .. . With basic scrollTop jquery my code : - .. . .. . Currently my code works like this : - http : jsfiddle.net tFPp3 6 .. . .. . As you can see in my demo the scroll stuck between before reaching the exact position through hash.. . .. . .. . What is the solution if i have to play through the pinned elements in Superscrollorama Comment : I ve got your same problem with my company website thisisembrace.com http : www.thisisembrace.com . It ended up TweenMax is a great animation platform but when you use it for scrollable stuff it unleashes all it s problems . I suggest you to totally drop scrollorama and tweenlite and stick with the simple scrolltop and maybe animating the elements with callbacks and stuff or much better start using css3 example : tympanus.net Development PageTransitions http : tympanus.net Development PageTransitions Comment : @MacK but how to apply idea of simple scrollTop i am trying to navigate through hash tags its not a success so far as my demo shows Comment : Scrollorama is changing the height of your divs while the scrolltop animation is running . I d go for something like this : jsfiddle.net tFPp3 7 http : jsfiddle.net tFPp3 7 Comment : @MacK that is fine but my template is fully related to Superscrollorama i have some animation in my mind that i have to implement may be disabling Superscrollorama will not be a good solution.. . .. . Answer : You ll have to do 2 animations : one to reach the ancher offset and then after superscrollorama added new element for animation and recalculate the document height do the second animation to reach the correct key frame on that page that you fixed at offset 3000 of that section . Note that each section offset changes constantly so before launching the second animation we have to test that we are not scrolling till the next section again . We also need a little delay here to let superscrollorama make its sauce before testing respective offsets saddly it doesn t seem to provide an event to do so . Comment : hii @svassr thanks for reply.. . i think the logic behind this idea is right but i think their is some issue here.. . check jsfiddle.net tFPp3 8 http : jsfiddle.net tFPp3 8 Comment : You are right I just posted the fully tested solution . Comment : Unfortunately I haven t found a way to avoid using a timeout here . Comment : i think we are close it makes an console error for offset is undefined when you go to the last slide.. . jsfiddle.net tFPp3 9 http : jsfiddle.net tFPp3 9 Comment : give him the bounty", "Question : Can t apply an easing method to Jquery ScrollTo : .. . .. . This doesn t ease anything.. . Im starting to use jquery now been using prototype for long so this is surely my mistake . Do I need an easing plugin to achieve this What are the easing option for this plugin if any The documentation is not clear about this . Thanks . Comment : What plugin are you using That method isn t part of the jQuery API . .. . Answer : linear is the default option of easing : linear animation straight to the point in a sec . try easing : elasout Comment : nope . elasout breaks it . Would be nice but no . Comment : it breaks nothing it s one easing type of scrollTo on their homepage . More particularily it s the one used on their demo : demos.flesler.com jquery scrollTo http : demos.flesler.com jquery scrollTo click on easing . If you wanted a precise easing there are a lot more you should have precise that . Comment : If you look at the code that easing function is in init.js and not in scrollTo by default . It is part of the jQuery easing plugin : gsgd.co.uk sandbox jquery.easing.php http : gsgd.co.uk sandbox jquery.easing.php" ] }
[ "yes-answer-long", "yes-answer-short" ]
jquery
UNK_RELATION
jboss-eap-6@jboss@45
jboss-eap-6 -- redhat supported releases of @placeholder application server based on jboss-as-7 .
{ "confidence": [ 66.08715057373047, 56.02030944824219, 53.99894332885742, 53.905113220214844, 53.33015060424805, 53.17654800415039, 53.01340866088867, 52.357845306396484, 52.357845306396484, 52.176265716552734, 52.07335662841797, 52.07335662841797, 51.389129638671875, 51.319908142089844, 51.02336502075195, 51.01938247680664, 50.42486572265625, 50.42486572265625, 50.42486572265625, 50.220436096191406, 50.16005325317383, 50.12435531616211, 50.08021545410156, 50.06813049316406, 49.617774963378906, 49.617774963378906, 49.60982894897461, 49.5171012878418, 49.270668029785156, 48.823463439941406, 48.73359680175781, 48.05466842651367, 48.00841522216797, 47.89222717285156, 47.82587432861328, 47.68705749511719, 47.68523406982422, 47.5758056640625, 47.0050048828125, 46.73580551147461, 46.636962890625, 46.36954879760742, 46.328948974609375, 46.28545379638672, 45.96512222290039, 45.74275207519531, 45.73699188232422, 45.73699188232422, 45.73699188232422, 45.73699188232422, 45.43687057495117, 45.426856994628906, 45.361846923828125, 45.361846923828125, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.213924407958984, 45.038856506347656, 44.86974334716797, 44.81134033203125, 44.776039123535156, 44.602603912353516, 44.349525451660156, 44.16426086425781, 44.16426086425781, 44.16426086425781, 44.16426086425781, 44.08108901977539, 44.08108901977539, 44.08108901977539, 43.687599182128906, 43.659000396728516, 43.610572814941406, 43.610572814941406, 43.366798400878906, 43.366798400878906, 43.366798400878906, 43.21510314941406, 43.097599029541016, 43.097599029541016, 43.091453552246094, 42.580772399902344, 42.57392120361328, 42.187034606933594, 42.187034606933594, 42.10454559326172, 41.990821838378906, 41.97932815551758, 41.97932815551758, 41.88159942626953, 41.88159942626953, 41.88159942626953, 41.88159942626953 ], "content": [ "This is an issue with JBoss EAP 6 .", "I am trying to install Redhat Jboss BPM suite 6 on EAP 6 .", "I am working on Struts 2 framework with EAP Jboss 6 .", "This issue is fixed in JBoss EAP 6.4.x release .", "I was trying to deploy a component on JBoss EAP 6.2 serever.My application listens to IBM Websphere MQ 6.I would like to know if MQ 6 is compatible with JBoss 6.2", "on JBoss EAP 6.4", "In Jboss-eap-5 I used to do similar debugging by putting my custom.jar inside jboss-eap-5 home server domain lib .", "I am receiving the following error message in the JBOSS EAP 6.3 server .", "I have ejb client to connect jboss 6.4 eap server .", "SUCCESS 0.070s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension FAILURE 17.446s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension Modules SKIPPED .. . .. . INFO GateIn package for JBoss AS-based Wildfly EAP .", "JBoss EAP 6.x is a JEE6 implementation container .", "Is there anything similar to org.jboss.naming.JNDIBindingServiceMgr in JBoss EAP 6", "I m studying for the Redhat JBoss Admiministrator certification .", "We are migrating applications from jboss-5.1.EAP to jboss-eap-6.1 .", "My server is jBoss Server EAP 6.1 and is working on Linux OS .", "I m using JBoss Developer Studio building with Maven for JBoss EAP 6.2 .", "I m using Jboss 6.3 eap and Picketlink v2.7.1.Final", "The reason raised while setting up Jenkins CI environment with JBoss EAP .", "I am using jboss-eap-6.2 on windows with Spring Tool Suite .", ": .. . .. . ENV : Server deployed on Jboss EAP 6.4 .", "i am deploying a web application on Jboss eap 6 . i configured two JBoss nodes over the same machine server 1 - server 2 and configured them to become cluster environment .", "I am migrating project from jBoss-eap-5.1 to jboss-eap-6.0 .", "There are plenty of quickstart https : github.com jboss-developer jboss-eap-quickstarts examples of how to use Arquillian with JBoss EAP .", "Hi Iam running jboss fuse service works application running in jboss eap 6.1.1 .", "I am migrating an application from Weblogic to JBoss EAP 6.4 .", "I am migrating my application from jboss eap 5.1 to 6.4 .", "Link 1 http : www.mastertheboss.com jboss-server jboss-log using-log4j-with-jboss-6 .. . 2 .", "I mainly want to know the configurations guide on the jboss eap server-side .", "If you re on JBoss EAP 6.2 you d need to look at the jboss-as-logging 1 3.xsd schema .", "Answer is here : Spring Java Config vs Jboss 7 http : stackoverflow.com questions 20666513 spring-java-config-vs-jboss-7 21314659 comment32870531 21314659 .. . .. . Apparently does not work on Jboss EAP 6.3 but works .", "The Modeshape 4.x releases sub-system has a number of dependencies on Wildfly 8.x components and can not be run as a sub-system on JBoss EAP 6.3.0 .", "I am using Java 1.8 and JBOSS EAP 6.2", "I ve inherited code for a custom JBoss Module and I m quite new to JBoss EAP 6.x .", "I deploy this war on JBoss EAP 6.4 7 and can see log traces from JBoss startup .", "How do I bind an arbitrary string to JNDI in JBoss EAP 6", "I am using Jboss EAP 6.2 with Jboss 7.1.1", "Using JBoss EAP 6.4 AS 7.x I guess .", "When we deploy an application via the admin console or via the CLI the application content will always be found at the jboss-eap-6.2 standalone data content location .", "I am using jboss eap 6.1 for one of my web application and using krb5.xml for single signon .", "I am migrating an application with Java WS from Jboss 5.1.0 to Jboss 6.3.0 EAP .", "My jboss verson is Jboss EAP 6.3 .. . .. . When any kind of error response is sent back by Jboss it adds up server information to the response .", "I tried this setup with JBOSS AS 7 and it was successful .", "I have verified this answer given by Redhat support - .. . .. . You can exclude the JBoss provided javax.validation api classes from the JBoss EAP 6 by excluding the jaxrs subsystem .", "I am trying to run JSF2.1 Web Application with JBoss EAP 6.2 .", "Based on my experience Spring Boot Autoconfigure and JBoss 6 specifically is a no-go .", "I am using Hibernate4 Seam 2.2 JPA 2.0 and Jboss eap 6 in my application .", "I am setting up a Jenkins CI environment to build and deploy WAR s to the Jboss EAP 6.2 .", "We are deploying war files using Jboss EAP 6.2 administration Console and successfully deploy all war files .", "I m using a JBoss EAP 6.3.x and in my case the problem was in reference to the META-INF ra.xml file .", "We want to use ModeShape 4.1.0.Final as a subsystem on Jboss EAP 6.3.0.GA .", "stackoverflow.com questions 31612928 http : stackoverflow.com questions 31612928 how-to-configure-caching-in-jboss-eap-6-3-ga", "i am able to do in Tomcat like the below example but not able to do in jboss-EAP Enterprise Application Server 6.0 server .", "It already was in the code base working with JBoss EAP 6.1 .", "Running JBoss EAP 6.3 with provided implementations .", "I m runing JBoss EAP 6.2 standalone and Seam 2.3.1 .", "I am using Seam 2.2 Hibernate 4 and JBOSS EAP 6.3 .", "Or is is not possible to use Tomahawk on the JSF RI in JBoss EAP 6.2", "Is it possible to run Spring 3.X on Jboss EAP 6.4", "Working with : .. . .. . JBoss EAP 6.4 .. . Hibernate 4.2.18 .. . JPA 2", "I m using JBOSS EAP 6.2 for deploying the restful web service .", "The restful web service is using apache cxf it is taking from jboss eap .", "Process : .. . .. . What do I need to do to get it to run on JBoss EAP", "Configure JBoss EAP 6.2 in standalone.xml to use the new classes .. . .. . snippet :", "I just want to enable atmoshpere websocket support in jboss 6.2 eap .", "If that s not the issue this is probably a problem with your application configuration and not JBoss probably you just have to exclude some logging libraries in your jboss-deployment-structure.xml to use the provided and not the jboss instance libs .", "How can I obtain the jboss eap 6.x wildfly server group name programmatically from within a java enterprise application deployed to a domain", "For this i have followed the instructions given in https : github.com gatein gatein-portal .. . .. . As per the instructions given in the above website the EAP version supported is EAP-6.3.0.Alpha1 .. . .. . Now the downloads page of Jboss EAP does not show EAP 6.3.0.Alpha1 but shows EAP 6.3.0.Alpha .", "My problem is that I can t get any logging out of a .war I m deploying on JBoss 6 EAP there are no errors logged also however .", "Thanks to Chris answer i managed to run jboss-eap-6 and EclipseLink by integrating eclipse link module inside jboss eap .. . .. . I needed to create a new folder : JBOSS HOME modules org eclipse persistence main and copy eclipselink.jar inside .", "I have a jboss domain server with 10-20 profiles .", "I have a very simple spring-boot application that I want to deploy to Jboss EAP .", "I wanted to know how to create cluster in the application with different instance of jboss eap in standalone mode in different machines .", "I m trying to run an application using a Datasource on JBOSS EAP 6.4 In the standalone.xml file my data source is well defined .", "It s init method gets called when this web application starts up in JBoss EAP 6.0 to be specific .", "And can anyone provide a proper way to configure session replication in Jboss EAP 6.2 server", "I have a problem running my arquillian tests started by a jenkins job on a JBoss eap 6.1 server .", "I m am using JBoss EAP 6.2 as Webapplication server and Apace Modcluster for load-balancing .", "You mentioned JBoss 6 in you tags .", "We re migrating our web app from GF 2.1.1 Java 6 to JBoss EAP 6.3.0 Java 7 and need to use one EJB from GF for some time until it will migrate to JBoss too .", "http : stackoverflow.com questions 30881589 how-to-use-bean-validation-1-1-in-jboss-eap-6-4-0 .. . .. . How to change bean-validation version on jboss EAP 6.3", "http : stackoverflow.com questions 32702989 how-to-change-bean-validation-version-on-jboss-eap-6-3 .. . .. . Can you use bean-validation 1.1 JSR 349 in JBoss EAP 6.4.4", "I have a Web service model with CRUD deployed on JBoss EAP 6.1 which I can access using SOAPUI .", "I am trying to deploy my EAR in JBOSS-EAP-6.4 and if I deploy it normally i.e .", "But in EAP Jboss 6.0 domain mode I don t know where is deploy directory and how to configure that mod-cluster", "I am using Jboss EAP 6.4 as my server Switchyard as my BPEL runtime and Jboss Developer Studio for my IDE .", "I have an webapp built with Jboss Seam which runs on cluster Jboss EAP .", "It works fine with Jboss 5.1.0 but I am getting error while deploying the same in Jboss 6.3.0 EAP .", "I have Jboss eap version 6.4.0 GA and while running jexboss exploit it says web-console is vulnerable but I don t see any web-console in this eap version .", "When I deploy a helloWorld app to JBoss EAP 6.4.0.GA it deploys with warnings and no errors shows deployed in JBoss web admin console but the application context returns 404 .", "Is this possible within JBoss EAP6", "My jboss-deployment-structure.xml content is like this---", "But the war files are not in jboss standalone deployments directory .", "We are migration EJB from 2.1 to 3.1 on JBoss EAP 6.4.5 with Java EE 6 .", "JBoss Application Console - DataSources - JNDI Pool Entry - Pool Tab Section - Flush Button click brings JBoss back operational.... .", "When I start jboss server using . standalone.sh it is working fine .", "In that it is mentioned to put the folder to deploy directory of a JBoss server profile .", "Alright but then the same code would fail for JBoss EAP 6.1 right", "I m using Jboss eap 6.2 Wso2 BPS 3.2.0", "For this issue you need to configure custom error pages at JBoss EAP level .", "How should i migrate configure this in jBoss EAP 6.2" ] }
{ "confidence": [ 73.89472961425781, 73.55690002441406, 67.13845825195312, 66.88870239257812, 65.0086898803711, 64.93067932128906, 64.62592315673828, 63.93425750732422, 63.73691177368164, 63.601097106933594, 63.10240936279297, 62.890106201171875, 62.35150909423828, 62.33851623535156, 61.9080810546875, 61.647125244140625, 61.608985900878906, 61.48503875732422, 61.32575988769531, 59.32304382324219 ], "content": [ "Question : I need to deploy Gatein in EAP 6 . For this i have followed the instructions given in https : github.com gatein gatein-portal .. . .. . As per the instructions given in the above website the EAP version supported is EAP-6.3.0.Alpha1 .. . .. . Now the downloads page of Jboss EAP does not show EAP 6.3.0.Alpha1 but shows EAP 6.3.0.Alpha . I downloaded EAP 6.3.0.Beta and tried deploying gatein in EAP 6.3.0.Beta . I also unzipped the repository folder to .m2 repository . Now when I try to run with the following command .. . .. . mvn install -DskipTests -Dservers.dir D : Softwares SERVERS DIR -Dgatein.dev eap630 .. . .. . I get the following error ..... . .. . .. . INFO GateIn JBoss AS-based packaging Wildfly EAP .. . SUCCESS 0.070s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension FAILURE 17.446s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension Modules SKIPPED .. . .. . INFO GateIn package for JBoss AS-based Wildfly EAP . SKIPPED .. . .. . INFO TestSuite for GateIn ............................. . SKIPPED .. . .. . INFO Selenium Sniff Test for GateIn ................... . SKIPPED .. . .. . INFO GateIn Portal Examples - WebUI based samples ..... . SKIPPED .. . .. . INFO HTMLUnit Tests for GateIn ........................ . SKIPPED .. . .. . INFO Selenium UI Tests for GateIn ..................... . SKIPPED .. . .. . INFO ------------------------------------------------------------------------ .. . .. . INFO BUILD FAILURE .. . .. . INFO ------------------------------------------------------------------------ .. . .. . INFO Total time : 4 : 27.144s .. . .. . INFO Finished at : Thu Jun 26 14 : 32 : 55 IST 2014 .. . .. . INFO Final Memory : 121M 247M .. . .. . INFO ------------------------------------------------------------------------ .. . .. . ERROR Failed to execute goal on project jboss-integration-extension : Could not resolve dependencies for project org.gatein.portal : jboss-integration- .. . .. . extension : jar : 3.9.0.Alpha01-SNAPSHOT : Failed to collect dependencies for org.jboss.as : jboss-as-controller : jar : 7.4.0.Final-redhat-4 compile org.jbo .. . .. . ss.as : jboss-as-server : jar : 7.4.0.Final-redhat-4 compile org.jboss.as : jboss-as-ee : jar : 7.4.0.Final-redhat-4 compile org.jboss.as : jboss-as-web : jar : 7 .. . .. . .4.0.Final-redhat-4 compile org.jboss.as : jboss-as-weld : jar : 7.4.0.Final-redhat-4 compile org.jboss : jboss-vfs : jar : 3.1.0.Final compile org.exopl .. . .. . atform.kernel : exo.kernel.container : jar : 2.5.0-GA compile org.gatein.portal : exo.portal.webui.portal : jar : 3.9.0.Alpha01-SNAPSHOT compile org.gatein . wci : wci-jboss7 : jar : 2.4.2.Final compile org.gatein.integration : extension-component : jar : 3.9.0.Alpha01-SNAPSHOT compile org.gatein.wsrp : wsrp-integr .. . .. . ation-api : jar : 2.3.2.Final provided org.gatein.cdi : gatein-cdi-contexts : jar : 3.9.0.Alpha01-SNAPSHOT compile org.jboss.portletbridge : portletbridge-i .. . .. . mpl : jar : 3.3.2.Final compile junit : junit : jar : 4.10 test org.jboss.as : jboss-as-subsystem-test-framework : jar : 7.4.0.Final-redhat-4 compile org.slf .. . .. . 4j : slf4j-log4j12 : jar : 1.7.5 test org.slf4j : jul-to-slf4j : jar : 1.7.5 test commons-logging : commons-logging : jar : 1.1.1 test org.hsqldb : hsqldb : jar : 2 . 3.0 test org.javassist : javassist : jar : 3.18.0-GA test : Failed to read artifact descriptor for org.jboss.sasl : jboss-sasl : jar : 1.0.3.Final-redhat-1 : .. . .. . Could not transfer artifact org.jboss : jboss-parent : pom : 9-redhat-1 from to jboss-product-repository http : download.lab.bos.redhat.com brewroot repos .. . .. . jb-eap-6-rhel-6-build latest maven : download.lab.bos.redhat.com : Unknown host download.lab.bos.redhat.com - Help 1 .. . .. . ERROR .. . .. . ERROR To see the full stack-trace of the errors re-run Maven with the -e switch . ERROR Re-run Maven using the -X switch to enable full debug logging . ERROR .. . .. . ERROR For more information about the errors and possible solutions please read the following articles : .. . .. . ERROR After correcting the problems you can resume the build with the command .. . .. . ERROR mvn -rf : jboss-integration-extension .. . .. . Let me know how to resolve the same . Also I would like to make this work in a GA version of EAP EAP-6.2.0.GA Let me know ho to make this work . Thanks Comment : Have you update your settings file to use some specific repository Mentionning this url download.lab.bos.redhat.com brewroot repos http : download.lab.bos.redhat.com brewroot repos .. . Answer : You should provide the JBoss central Nexus repository url if mvn complains about some missing artifacts . This can be done by declaring two profiles for JBoss and eXo public repositories either into your Home .me settings.xml file or under your pom.xml file . I suggest the former : .. . .. . Then while executing the build you should activate those profiles as follows :", "Question : I need to deploy Gatein in EAP 6 . For this i have followed the instructions given in https : github.com gatein gatein-portal .. . .. . As per the instructions given in the above website the EAP version supported is EAP-6.3.0.Alpha1 .. . .. . Now the downloads page of Jboss EAP does not show EAP 6.3.0.Alpha1 but shows EAP 6.3.0.Alpha . I downloaded EAP 6.3.0.Beta and tried deploying gatein in EAP 6.3.0.Beta . I also unzipped the repository folder to .m2 repository . Now when I try to run with the following command .. . .. . mvn install -DskipTests -Dservers.dir D : Softwares SERVERS DIR -Dgatein.dev eap630 .. . .. . I get the following error ..... . .. . .. . INFO GateIn JBoss AS-based packaging Wildfly EAP .. . SUCCESS 0.070s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension FAILURE 17.446s .. . .. . INFO GateIn - Portlet Container JBoss AS-based Extension Modules SKIPPED .. . .. . INFO GateIn package for JBoss AS-based Wildfly EAP . SKIPPED .. . .. . INFO TestSuite for GateIn ............................. . SKIPPED .. . .. . INFO Selenium Sniff Test for GateIn ................... . SKIPPED .. . .. . INFO GateIn Portal Examples - WebUI based samples ..... . SKIPPED .. . .. . INFO HTMLUnit Tests for GateIn ........................ . SKIPPED .. . .. . INFO Selenium UI Tests for GateIn ..................... . SKIPPED .. . .. . INFO ------------------------------------------------------------------------ .. . .. . INFO BUILD FAILURE .. . .. . INFO ------------------------------------------------------------------------ .. . .. . INFO Total time : 4 : 27.144s .. . .. . INFO Finished at : Thu Jun 26 14 : 32 : 55 IST 2014 .. . .. . INFO Final Memory : 121M 247M .. . .. . INFO ------------------------------------------------------------------------ .. . .. . ERROR Failed to execute goal on project jboss-integration-extension : Could not resolve dependencies for project org.gatein.portal : jboss-integration- .. . .. . extension : jar : 3.9.0.Alpha01-SNAPSHOT : Failed to collect dependencies for org.jboss.as : jboss-as-controller : jar : 7.4.0.Final-redhat-4 compile org.jbo .. . .. . ss.as : jboss-as-server : jar : 7.4.0.Final-redhat-4 compile org.jboss.as : jboss-as-ee : jar : 7.4.0.Final-redhat-4 compile org.jboss.as : jboss-as-web : jar : 7 .. . .. . .4.0.Final-redhat-4 compile org.jboss.as : jboss-as-weld : jar : 7.4.0.Final-redhat-4 compile org.jboss : jboss-vfs : jar : 3.1.0.Final compile org.exopl .. . .. . atform.kernel : exo.kernel.container : jar : 2.5.0-GA compile org.gatein.portal : exo.portal.webui.portal : jar : 3.9.0.Alpha01-SNAPSHOT compile org.gatein . wci : wci-jboss7 : jar : 2.4.2.Final compile org.gatein.integration : extension-component : jar : 3.9.0.Alpha01-SNAPSHOT compile org.gatein.wsrp : wsrp-integr .. . .. . ation-api : jar : 2.3.2.Final provided org.gatein.cdi : gatein-cdi-contexts : jar : 3.9.0.Alpha01-SNAPSHOT compile org.jboss.portletbridge : portletbridge-i .. . .. . mpl : jar : 3.3.2.Final compile junit : junit : jar : 4.10 test org.jboss.as : jboss-as-subsystem-test-framework : jar : 7.4.0.Final-redhat-4 compile org.slf .. . .. . 4j : slf4j-log4j12 : jar : 1.7.5 test org.slf4j : jul-to-slf4j : jar : 1.7.5 test commons-logging : commons-logging : jar : 1.1.1 test org.hsqldb : hsqldb : jar : 2 . 3.0 test org.javassist : javassist : jar : 3.18.0-GA test : Failed to read artifact descriptor for org.jboss.sasl : jboss-sasl : jar : 1.0.3.Final-redhat-1 : .. . .. . Could not transfer artifact org.jboss : jboss-parent : pom : 9-redhat-1 from to jboss-product-repository http : download.lab.bos.redhat.com brewroot repos .. . .. . jb-eap-6-rhel-6-build latest maven : download.lab.bos.redhat.com : Unknown host download.lab.bos.redhat.com - Help 1 .. . .. . ERROR .. . .. . ERROR To see the full stack-trace of the errors re-run Maven with the -e switch . ERROR Re-run Maven using the -X switch to enable full debug logging . ERROR .. . .. . ERROR For more information about the errors and possible solutions please read the following articles : .. . .. . ERROR After correcting the problems you can resume the build with the command .. . .. . ERROR mvn -rf : jboss-integration-extension .. . .. . Let me know how to resolve the same . Also I would like to make this work in a GA version of EAP EAP-6.2.0.GA Let me know ho to make this work . Thanks Comment : Have you update your settings file to use some specific repository Mentionning this url download.lab.bos.redhat.com brewroot repos http : download.lab.bos.redhat.com brewroot repos .. . Answer : I can build gatein 3.8.9.Alpha03-SNAPSHOT with JBoss EAP 6.3.0 after downloading its maven-repository unzip it to the local repository and update as follows .", "Question : null .. . Answer : I have ejb client to connect jboss 6.4 eap server . I close ejb context every time I make ejb call . Everything works but when there are big amount of requests I got org.jboss.remoting3.ProtocolException : Too many channels open .. . .. . 15 : 41 : 21 621 ERROR org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver Remoting config-based-ejb-client-endpoint task-10 Failed to open channel for context EJBReceiverContext clientContext org.jboss.ejb.client.EJBClientContext@591adafe receiver Remoting connection EJB receiver connection org.jboss.ejb.client.remoting.ConnectionPool PooledConnection@30a6a839 channel jboss.ejb nodename jbeap-int : org.jboss.remoting3.ProtocolException : Too many channels open at org.jboss.remoting3.remote.RemoteConnectionHandler.handleOutboundChannelOpen RemoteConnectionHandler.java : 185 at org.jboss.remoting3.remote.RemoteConnectionHandler.open RemoteConnectionHandler.java : 326 at org.jboss.remoting3.ConnectionImpl.openChannel ConnectionImpl.java : 82 at org.jboss.ejb.client.remoting.ConnectionPool PooledConnection.openChannel ConnectionPool.java : 229 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.associate RemotingConnectionEJBReceiver.java : 130 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.EJBClientContext.registerEJBReceiver EJBClientContext.java : 383 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.EJBClientContext.registerEJBReceiver EJBClientContext.java : 335 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers ConfigBasedEJBClientContextSelector.java : 150 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent ConfigBasedEJBClientContextSelector.java : 115 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createIdentifiableEjbClientContext EjbNamingContext.java : 258 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.naming.ejb.EjbNamingContext.setupScopedEjbClientContextIfNeeded EjbNamingContext.java : 123 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.naming.ejb.EjbNamingContext . EjbNamingContext.java : 98 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.ejb.client.naming.ejb.ejbURLContextFactory.getObjectInstance ejbURLContextFactory.java : 38 jboss-ejb-client-1.0.30.Final-redhat-1.jar : 1.0.30.Final-redhat-1 at org.jboss.as.naming.InitialContext.getURLOrDefaultInitCtx InitialContext.java : 141 at javax.naming.InitialContext.lookup InitialContext.java : 417 rt.jar : 1.8.0 45 at javax.naming.InitialContext.lookup InitialContext.java : 417 rt.jar : 1.8.0 45 .. . .. . How can I increase this channels How I know it is limited to 40 channel same time .. . .. . Thank you . Comment : Looking the code for remoting3 https : github.com jboss-remoting jboss-remoting blob 2d7273392a571560e77b9eee25565fb46d3dbadd src main java org jboss remoting3 RemotingOptions.java MAX OUTBOUND CHANNEL and DEFAULT MAX INBOUND CHANNELS is 40 as you said . Also there seems to be an option to configure the MAX OUTBOUND CHANNELS however I m not sure if that can be done in 6.4 . There is an issue with scoped context https : issues.jboss.org browse EJBCLIENT-84 and workaround is provided as well just in case if you can work with 40 channels it self with the work around Comment : I need to increase it : too small amount .", "Question : I saw several questions on the topic but since they are rather related to errors I don t think this is a duplicate . My problem is that I can t get any logging out of a .war I m deploying on JBoss 6 EAP there are no errors logged also however . There is also a file named as my .war created under the log folder in JBoss but it is also empty . The .war deploys fine and works . Since I m using Spring I can t even see it initializing it s contexts . Logging works perfectly under Tomcat 7 with the same .war . I have created a log4j.xml and placed it in my WEB-INF classes dir I also tried in WEB-INF : .. . .. . I m using log4j 1.2.17 Spring 3.1 and JBoss 6 EAP . Any help greatly appreciated Thanks Comment : Related : stackoverflow.com questions 8814498 http : stackoverflow.com questions 8814498 log4j-logger-messages-are-not-displayed-on-jboss-webapp and stackoverflow.com questions 12039763 use-my-log4j-under-jboss-6 http : stackoverflow.com questions 12039763 use-my-log4j-under-jboss-6 .. . Answer : In my case EAP 6.0 in domain mode I had to set org.jboss.as.logging.per-deployment false as an environment property for the specific server . Setting it as a System Property as stated in the EAP 6.3 docs did not work .", "Question : null .. . Answer : I was trying to deploy a component on JBoss EAP 6.2 serever.My application listens to IBM Websphere MQ 6.I would like to know if MQ 6 is compatible with JBoss 6.2", "Question : I have the activeMQ server running in the jvm at tcp : localhost : 61616 .. . .. . then i place the activemq-rar-5.9.0.redhat-610379 unzipped .. . .. . adaptor .. . .. . in the .. . .. . runtimes jboss-eap modules system layers base org apache activemq main .. . .. . in the adaptor i have the Meta-INF .. . .. . in the jboss EAP6 standalone.xml i have specified the .. . .. . But when i start the server .. . i get the below error .. . .. . .. . .. . 12 : 05 : 39 910 ERROR org.jboss.as.controller.management-operation ServerService Thread Pool -- 40 JBAS014612 : Operation add failed - address : subsystem resource-adapters resource-adapter activemq-rar.rar - failure description : JBAS010473 : Failed to load module for RA org.apache.activemq .. . .. . .. . Answer : I had the same problem when I followed the tutorial http : www.mastertheboss.com jboss-frameworks ironjacamar configuring-a-resource-adapter-for-activemq-on-jbosswildfly . I m using a JBoss EAP 6.3.x and in my case the problem was in reference to the META-INF ra.xml file . If I comment out the config-property below the note .. . .. . I got the same error like you . If I removed the config-property the problem was solved and it s working as expected .", "Question : I have the activeMQ server running in the jvm at tcp : localhost : 61616 .. . .. . then i place the activemq-rar-5.9.0.redhat-610379 unzipped .. . .. . adaptor .. . .. . in the .. . .. . runtimes jboss-eap modules system layers base org apache activemq main .. . .. . in the adaptor i have the Meta-INF .. . .. . in the jboss EAP6 standalone.xml i have specified the .. . .. . But when i start the server .. . i get the below error .. . .. . .. . .. . 12 : 05 : 39 910 ERROR org.jboss.as.controller.management-operation ServerService Thread Pool -- 40 JBAS014612 : Operation add failed - address : subsystem resource-adapters resource-adapter activemq-rar.rar - failure description : JBAS010473 : Failed to load module for RA org.apache.activemq .. . .. . .. . Answer : Your question is missing some information but in reviewing what you have typed it sounds like you are missing the module.xml that needs to go in your module directory runtimes jboss-eap modules system layers base org apache activemq main .. . .. . For ActiveMQ RAR version 5.9 a module.xml would look like the following .. . .. . Also you should really not create custom modules under modules system layers base as this is used by JBoss and could be modified during patches and new releases . You are best to either create your own layer or simply create you module directly under the modules folder . As previous answer has noted especially in a standalone setup it might be easier to just directly deploy the RAR instead .", "Question : I am using jboss-eap-6.2 on windows with Spring Tool Suite . After few server start - stop cycles the size of tmp folder increases in GBs . Is there any way to deal with this problem Like tmp folder can be auto deleted I have tried below option by providing argument but is not working : .. . .. . -Djboss.vfs.cache org.jboss.virtual.plugins.cache.IterableTimedVFSCache -Djboss.vfs.cache.TimedPolicyCaching.lifetime 1440 .. . .. . What can be done to get rid of tmp folder automatically .. . Answer : This is an issue with JBoss EAP 6 . This issue is fixed in JBoss EAP 6.4.x release . You can delete tmp folder manually or through script after shutting down server instance . Dont delete tmp directory when server is up .", "Question : I saw several questions on the topic but since they are rather related to errors I don t think this is a duplicate . My problem is that I can t get any logging out of a .war I m deploying on JBoss 6 EAP there are no errors logged also however . There is also a file named as my .war created under the log folder in JBoss but it is also empty . The .war deploys fine and works . Since I m using Spring I can t even see it initializing it s contexts . Logging works perfectly under Tomcat 7 with the same .war . I have created a log4j.xml and placed it in my WEB-INF classes dir I also tried in WEB-INF : .. . .. . I m using log4j 1.2.17 Spring 3.1 and JBoss 6 EAP . Any help greatly appreciated Thanks Comment : Related : stackoverflow.com questions 8814498 http : stackoverflow.com questions 8814498 log4j-logger-messages-are-not-displayed-on-jboss-webapp and stackoverflow.com questions 12039763 use-my-log4j-under-jboss-6 http : stackoverflow.com questions 12039763 use-my-log4j-under-jboss-6 .. . Answer : Unlike JBoss AS 7.1.1 JBoss EAP 6 activates per-deployment logging configuration if it finds a logging config file https : community.jboss.org message 736873 736873 : https : community.jboss.org message 776182 776182 .. . .. . I suggest removing log4j.xml . If that doesn t help modify your jboss configuration to set the system property org.jboss.as.logging.per-deployment to false . In my case I had to add this line to standalone.conf : Comment : It switches off configuration which is defined in application so it s a workaround but not a solution right Comment : worked for me JAVA OPTS JAVA OPTS -Dorg.jboss.as.logging.per-deployment false Comment : removing log4j.xml worked for me. .", "Question : null .. . Answer : 07 : 33 : 07 785 INFO org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor pool-5-thread-1 JSR-330 javax.inject.Inject annotation found and supported for autowiring 07 : 33 : 07 790 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory pool-6-thread-2 Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@75b6f75e : defining beans cxf org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor org.apache.cxf.bus.spring.Jsr250BeanPostProcessor org.apache.cxf.bus.spring.BusExtensionPostProcessor servletContextReaderComponent org.springframework.context.annotation.internalConfigurationAnnotationProcessor org.springframework.context.annotation.internalAutowiredAnnotationProcessor org.springframework.context.annotation.internalRequiredAnnotationProcessor org.springframework.context.annotation.internalCommonAnnotationProcessor org.springframework.context.annotation.internalPersistenceAnnotationProcessor signatureAlgorithm serviceAuthManager authServiceProvider soaErrorBundle soaErrorMapper soaExceptionHandler soaClientPolicyEvaluator com.walmart.platform.soa.client.listener.SOAClientLifeCycleListener 0 clientHeaderOutInterceptor clientLoggingOutInterceptor clientHeaderInInterceptor clientLoggingInInterceptor serviceAuthOutInterceptor clientPolicyOutInterceptor clientPolicyInInterceptor cxf.config2 org.springframework.context.annotation.ConfigurationClassPostProcessor ImportAwareBeanPostProcessor 0 root of factory hierarchy @ .. . .. . 07 : 33 : 08 015 ERROR stderr Thread-147 2016-06-20 07 : 33 : 08.014 WARN net.spy.memcached.auth.AuthThread : Authentication failed to 172.16.113.154 : 11210 Status : OperationStatus success false : Invalid arguments 07 : 33 : 08 026 WARN org.jboss.modules pool-6-thread-2 Failed to define class org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder in Module deployment.smcfs.ear : main from Service Module Loader : java.lang.LinkageError : Failed to link org apache cxf transport http policy HTTPServerAssertionBuilder Module deployment.smcfs.ear : main from Service Module Loader at org.jboss.modules.ModuleClassLoader.defineClass ModuleClassLoader.java : 487 jboss-modules.jar : 1.3.6.Final-redhat-1 at org.jboss.modules.ModuleClassLoader.loadClassLocal ModuleClassLoader.java : 277 jboss-modules.jar : 1.3.6.Final-redhat-1 at org.jboss.modules.ModuleClassLoader 1.loadClassLocal ModuleClassLoader.java : 92 jboss-modules.jar : 1.3.6.Final-redhat-1 at org.jboss.modules.Module.loadModuleClass Module.java : 568 jboss-modules.jar : 1.3.6.Final-redhat-1 .. . .. . Caused by : java.lang.NoClassDefFoundError : org apache cxf ws policy builder jaxb JaxbAssertionBuilder at java.lang.ClassLoader.defineClass1 Native Method rt.jar : 1.8.0 51 at java.lang.ClassLoader.defineClass ClassLoader.java : 760 rt.jar : 1.8.0 51 at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass ModuleClassLoader.java : 361 jboss-modules.jar : 1.3.6.Final-redhat-1 at org.jboss.modules.ModuleClassLoader.defineClass ModuleClassLoader.java : 482 jboss-modules.jar : 1.3.6.Final-redhat-1 .. . 148 more Caused by : java.lang.ClassNotFoundException : org.apache.cxf.ws.policy.builder.jaxb.JaxbAssertionBuilder from Module deployment.smcfs.ear : main from Service Module Loader at org.jboss.modules.ModuleClassLoader.findClass ModuleClassLoader.java : 213 jboss-modules.jar : 1.3.6 . Caused by : java.lang.NoClassDefFoundError : org apache cxf ws policy AbstractPolicyInterceptorProvider at java.lang.ClassLoader.defineClass1 Native Method rt.jar : 1.8.0 51 at java.lang.ClassLoader.defineClass ClassLoader.java : 760 rt.jar : 1.8.0 51 at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass ModuleClassLoader.java : 361 jboss-modules.jar : 1.3.6.Final-redhat-1 at org.jboss.modules.ModuleClassLoader.defineClass ModuleClassLoader.java : 482 jboss-modules.jar : 1.3.6.Final-redhat-1 .. . 148 more Caused by : java.lang.ClassNotFoundException : org.apache.cxf.ws.policy.AbstractPolicyInterceptorProvider from Module deployment.smcfs.ear : main from Service Module Loader at org.jboss.modules.ModuleClassLoader.findClass ModuleClassLoader.java : 213 jboss-modules.jar : 1.3.6.Final-redhat-1 a .. . .. . Any suggestion how to overcome this problem Comment : NoClassDefFoundError means that a class cannot be found on the classpath . In your case it probably means that you are trying to run code with a different version of a library than that you compiled it with . Make sure you have the same versions of libraries when compiling and running . Comment : Thanks for reply Jesper . I have put maven scope as compile for spring related dependecy so my ear is having same jars . Comment : I guess it s classloader issues. . did you check if there are cxf classes loaded twice Once by your App and once by AS Comment : i can find that org apache cxf ws policy builder jaxb JaxbAssertionBuilder.class is present in cxf-rt-ws-policy-2.7.14.redhat-1.jar which is provided by jboss and if application is not able to find it then it must be only app jars which is loading it . app jboss-eap-6.4 modules system layers base org apache cxf impl main cxf-rt-ws -policy-2.7.14.redhat-1.jar", "Question : Similar questions : .. . .. . How to use bean-validation 1.1 in JBoss EAP 6.4.0 http : stackoverflow.com questions 30881589 how-to-use-bean-validation-1-1-in-jboss-eap-6-4-0 .. . .. . How to change bean-validation version on jboss EAP 6.3 http : stackoverflow.com questions 32702989 how-to-change-bean-validation-version-on-jboss-eap-6-3 .. . .. . Can you use bean-validation 1.1 JSR 349 in JBoss EAP 6.4.4 http : stackoverflow.com questions 34125755 can-you-use-bean-validation-1-1-jsr-349-in-jboss-eap-6-4-4 .. . .. . There seems to be some uncertainty if we can use Bean Validation 1.1 in JBoss 6.x . My current jboss-deployment-structure.xml : .. . .. . I bundle the following dependencies in the .ear : .. . .. . But I get the following stacktrace : .. . .. . As you can see the validation API is validation-api-1.0.0.GA-redhat-3.jar : 1.0.0.GA-redhat-3 which means that the JBoss bundled module is not actually removed from the classpath . Am I doing something wrong or is it a bug which doesn t let me remove javax.validation.api Do I need to replace more modules with manual dependencies e.g . resteasy Comment : FWIW there is no need to list all those dependencies . Any required Java EE 6 dependencies will be added automatically . Comment : AFAIK when you exclude javaee.api you need to re-include all its individual dependencies Comment : That s possible but I d advise on excluding the javaee.api : Comment : Is that not excluding Comment : Oops yes sorry . I d advise NOT excluding the javaee.api . .. . Answer : I have verified this answer given by Redhat support - .. . .. . You can exclude the JBoss provided javax.validation api classes from the JBoss EAP 6 by excluding the jaxrs subsystem . In addition to excluding validation classes themselves modules that depend on them should be excluded as well . Thus the exclusion part of jboss-deployment-structure.xml should look like this : .. . .. . note - excluding the javaee module limits the available support by RedHat Comment : The REST endpoint doesn t seem to trigger . I ve added the following dependencies to my war : javax.validation : validation-api : 1.1.0.Final org.hibernate : hibernate-validator : 5.2.2.Final org.jboss.resteasy : resteasy-jaxrs : 3.0.14.Final Do you have any idea if I need to add any more dependencies in order to replace the excluded jaxrs module Comment : Also added org.jboss.resteasy : resteasy-client org.jboss.resteasy : resteasy-jaxb-provider according to this guide docs.jboss.org resteasy docs 3.0.2.Final userguide html https : docs.jboss.org resteasy docs 3.0.2.Final userguide html Maven and RESTEasy.html Comment : You may want to open a new question for that problem . Are you using the @Valid annotation on your method parameter in the controller stackoverflow.com questions 3595160 http : stackoverflow.com questions 3595160 what-does-the-valid-annotation-indicate-in-spring", "Question : I am trying to install Redhat Jboss BPM suite 6 on EAP 6 . For this i referring the official installation guide . Click here https : access.redhat.com site documentation en-US Red Hat JBoss BPM Suite 6 pdf Installation Guide Red Hat JBoss BPM Suite-6-Installation Guide-en-US.pdf .. . .. . Can anyone let me know the possible reasons . During this i am getting following exception .. . Answer : Are you installing the eap artefact and thus not the generic deployable on a clean installation of eap 6.1.1 note that this exact version is required Maybe try a second time as well to avoid corruption during download unzip . If thr issue persists could you specify which OS and JRE you are using Comment : I am tried with fresh copy but its giving same exception.I am working on window 7 wiht jre7", "Question : I have a very simple spring-boot application that I want to deploy to Jboss EAP . Here is my simple application class : .. . .. . and my pom.xml is also very basic . when I run this application on tomcat using the embeded tomcat what ships with spring-boot . evything works like charm in just one click . I can access http : localhost : 8080 demo hello World and it works too . Now I tried to make it Jboss EAP compatible war I disabled the tomcat by excluding from spring-boot-starter-web and convert it into a war project . as suggested by article http : spring.io blog 2014 03 07 deploying-spring-boot-applications . I also added .. . .. . as it was complaining . now after all this it compiles fine and creates a war too . when i copied this war to jboss deployment i can see it successfully deployed on console . But the rest api http : localhost : 8080 demo hello World just does not work and constantly throws error on browser : .. . .. . JBWEB000068 : message demo hello World JBWEB000069 : description JBWEB000124 : The requested resource is not available . Can somebody please tell me what am I doing wrong . .. . Answer : You mentioned JBoss 6 in you tags . Based on my experience Spring Boot Autoconfigure and JBoss 6 specifically is a no-go . If Hot Deploy is turned on or perhaps some other condition JBoss VFS performs some aggressive scanning of all jars in the war file . Once it starts to scan the classes in the autoconfigure module it will abort due to an error akin to ClassNotFoundException . If you are using Autoconfigure one solution might be to place the spring modules in the Container s lib . But this would make deployment unwieldy . I did not see this behavior on JBoss 7 nor Wildfly 8 . Comment : Actually - I am now able to successfully deploy multiple Spring Boot Applications with JBoss 6 . The key to this accomplishment was using the jboss-scanning.xml deployed in the jar to tell JBoss not to try and load every class in Autoconfigure lib . There are some other tweaks as well that I have been meaning to write up but the jboss-scanning.xml was key .", "Question : null .. . Answer : I m using JBOSS EAP 6.2 for deploying the restful web service . The restful web service is using apache cxf it is taking from jboss eap . Currently its using the jar cxf-api-2.7.7.redhat-1.jar . Is there any way that can I update this jar in the jboss modules also modules.xml .", "Question : 1 . How do I bind an arbitrary string to JNDI in JBoss EAP 6 I used to do it through org.jboss.naming.JNDIBindingServiceMgr MBean in previous EAP version . 2 . Is there anything similar to org.jboss.naming.JNDIBindingServiceMgr in JBoss EAP 6 3 . We are migrating applications from jboss-5.1.EAP to jboss-eap-6.1 . We need to bind some things into JNDI so applications can look up values of environment-variables . Many thanks . Comment : Any help is appreciated. . .. . Answer : In your app configuration you can have things in ejb-jar.xml deployment-descriptor like .. . .. . or if you prefer to have it in the server standalone.xml do .. . .. . the latter standalone.xml is a JBoss 7.1 feature so available in EAP 6.0 . In JBoss AS 7.0 a dummy application needs to be used according to this thread https : community.jboss.org message 615368 .", "Question : We want to use ModeShape 4.1.0.Final as a subsystem on Jboss EAP 6.3.0.GA . What are the steps and configurations for this ModeShape subsystem is available for WildFly 8.x but we do not want to use Wildfly on our production systems . .. . Answer : The Modeshape 4.x releases sub-system has a number of dependencies on Wildfly 8.x components and can not be run as a sub-system on JBoss EAP 6.3.0 . The alternative to running Modeshape 4.x as a sub-system is to embed the it into your applications ear war . For more information on how to do this see .. . .. . https : docs.jboss.org author display MODE40 ModeShape+in+web+applications", "Question : null .. . Answer : We are deploying war files using Jboss EAP 6.2 administration Console and successfully deploy all war files . But the war files are not in jboss standalone deployments directory . Is there any option to deploy war files using Jboss administration console while keeping deployed war files in the deployments directory Comment : The WAR files are kept in the container . What is the reason you d like them in the deployment directory Comment : Thanks for your comment . The reason raised while setting up Jenkins CI environment with JBoss EAP . I already find the solution . When we deploy an application via the admin console or via the CLI the application content will always be found at the jboss-eap-6.2 standalone data content location .", "Question : Similar questions : .. . .. . How to use bean-validation 1.1 in JBoss EAP 6.4.0 http : stackoverflow.com questions 30881589 how-to-use-bean-validation-1-1-in-jboss-eap-6-4-0 .. . .. . How to change bean-validation version on jboss EAP 6.3 http : stackoverflow.com questions 32702989 how-to-change-bean-validation-version-on-jboss-eap-6-3 .. . .. . Can you use bean-validation 1.1 JSR 349 in JBoss EAP 6.4.4 http : stackoverflow.com questions 34125755 can-you-use-bean-validation-1-1-jsr-349-in-jboss-eap-6-4-4 .. . .. . There seems to be some uncertainty if we can use Bean Validation 1.1 in JBoss 6.x . My current jboss-deployment-structure.xml : .. . .. . I bundle the following dependencies in the .ear : .. . .. . But I get the following stacktrace : .. . .. . As you can see the validation API is validation-api-1.0.0.GA-redhat-3.jar : 1.0.0.GA-redhat-3 which means that the JBoss bundled module is not actually removed from the classpath . Am I doing something wrong or is it a bug which doesn t let me remove javax.validation.api Do I need to replace more modules with manual dependencies e.g . resteasy Comment : FWIW there is no need to list all those dependencies . Any required Java EE 6 dependencies will be added automatically . Comment : AFAIK when you exclude javaee.api you need to re-include all its individual dependencies Comment : That s possible but I d advise on excluding the javaee.api : Comment : Is that not excluding Comment : Oops yes sorry . I d advise NOT excluding the javaee.api . .. . Answer : JBoss EAP 6.x is a JEE6 implementation container . Also keep in mind that changing the bean-validation modules that are shipped with JBoss EAP6 breaks the supported bits . Bean Validation is part of JEE7 specification . You will need to upgrade to JBoss EAP7 http : www.jboss.org products eap download or use WildFly 9 or 10 http : wildfly.org downloads from the community . Both of them implement JEE7 spec which includes Bean Validation 1.1 . Comment : I know that s why I m trying to update the API version of bean-validation to 1.1 . The real problem we are having is that in bean-validation 1.0 method validation is not supported . That means that resteasy-hibernatevalidator is not blocking invalid incoming requests . Comment : I understand that s why I recommended upgrading to EAP7 or WildFly10 or 9 where you can use the features of BV 1.1 . Think of it this way when a new major JDK build is released 6 7 8 etc do you go back and add new APIs and features from JDK8 to JDK7 This is similar when you compare JEE6 to JEE7 . This has nothing to do with JBoss directly . JBoss EAP6 is certified for JEE6 which mandates Bean Validation 1.0 spec . Comment : The problem is that I cannot update to Jboss7 since it s still in beta and we have clients using jboss6 so no wildfly either . I do get your point on mixing different versions of JavaEE but in theory javax.validation is nothing more than an API . Changing the API version and the implementation behind it should work . Now the big problem is that there are possibly a number of dependant libraries which rely on bean-validation 1.0 being in-place . That s of course a problem but getting rid of bean-validation 1.0 is a first step to check if this is a feasible solution . Comment : I decided not to update the libraries . Even though it might be possible the build complexity and problems caused are far greater . Thanks . Comment : @Jeremy if you are excluding resteasy and all javaee apis then what would you get support for in terms of eap6 What if you run into a rest sevice bug and by excluding the rest apis you are not using the modules that is supported with eap . So I would recommend you put that word of caution in your answer .", "Question : My jboss verson is Jboss EAP 6.3 .. . .. . When any kind of error response is sent back by Jboss it adds up server information to the response . Following is a sample row response : .. . .. . HTTP 1.1 400 Bad Request Server : Apache-Coyote 1.1 Content-Type : text html charset utf-8 Content-Length : 2391 Date : Tue 19 Jul 2016 09 : 30 : 46 GMT Connection : close .. . .. . JBoss Web 7.4.8.Final-redhat-4 - JBWEB000064 : Error report .. . .. . JBWEB000065 : HTTP Status 400 - org.codehaus.jackson.map.JsonMappingException : Can not construct instance of mybean.type from String value XYZ : value not one of declared Enum instance names at Source : org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl InputStreamWrapper@5e421c2b line : 14 column : 26 through reference chain : RequestArgs request .. . .. . JBWEB000309 : type JBWEB000067 : Status report .. . .. . JBWEB000068 : message org.codehaus.jackson.map.JsonMappingException : Can not construct instance of mybean.type from String value XYZ : value not one of declared Enum instance names at Source : org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl InputStreamWrapper@5e421c2b line : 14 column : 26 through reference chain : RequestArgs request .. . .. . JBWEB000069 : description JBWEB000120 : The request sent by the client was syntactically incorrect . JBoss Web 7.4.8.Final-redhat-4 .. . .. . .. . .. . Here the server version can be replaced to any costume name using -Dorg.apache.coyote.http11.Http11Protocol.SERVER MyServer parameter while starting up the server . But how to replace JBoss Web 7.4.8.Final-redhat-4 specified in title footer By creating custom error pages for each error like error 400.html error 500.html etc this can be resolved but then the actual error message that needs to be included dynamically has a challenge . Is there any easy way to just suppress any jboss version related information from all responses sent using Jboss .. . Answer : For this issue you need to configure custom error pages at JBoss EAP level . 1 . Create a custom ROOT App to provide the custom error page as follows : .. . .. . set enable-welcome-root false in standalone- .xml or domain.xml in then web subsystem . Deploy a basic ROOT.war archive with a web.xml that includes the error page for all http errors . When enable-welcome-root true the pages are served for welcome-content folder present in EAP 6 and when you hit for example localhost : 8080 what you can see is the index.html page which is present in welcome-folder . Now if you deploy custom ROOT.war you will see the custom error page you supplied .", "Question : I am working on Struts 2 framework with EAP Jboss 6 . My project session variables were stored and retrieved using HTTP Session Map . When I moved on to the Domain mode of Jboss with Clustering my session values were lost while switching between different nodes of the server . Then I configured Sticky session and stored the session values in Cookies . Even though I could able to retrieve value from cookie on the first request the HTTP session was lost . Currently I m using Apache Mod Cluster for clustering the configuration is as follows . Now searched and found something about mod-cluster https : github.com modcluster mod-cluster . In that it is mentioned to put the folder to deploy directory of a JBoss server profile . But in EAP Jboss 6.0 domain mode I don t know where is deploy directory and how to configure that mod-cluster .. . Answer : I solved session replication by configuring jboss-web.xml under WEB-INF folder as follows.. . In this case no need to use cookies to store values.. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jboss
UNK_RELATION
nme@flash-player@124
nme -- nme is a free open-source framework that enables development for ios android webos blackberry windows mac linux and @placeholder from a single codebase .
{ "confidence": [ 46.071964263916016, 44.4090576171875, 43.27912139892578, 42.33824920654297, 42.15558624267578, 41.84833908081055, 41.50559616088867, 41.50559616088867, 41.459259033203125, 40.30854797363281, 40.145103454589844, 40.145103454589844, 40.145103454589844, 40.145103454589844, 40.10499572753906, 40.10499572753906, 40.10499572753906, 39.021400451660156, 39.015167236328125, 39.015167236328125, 38.60531234741211, 38.537681579589844, 37.828857421875, 37.47537612915039, 37.29344940185547, 36.834442138671875, 36.834442138671875, 36.834442138671875, 36.834442138671875, 36.711692810058594, 35.92558670043945, 35.704505920410156, 35.704505920410156, 35.704505920410156, 35.32020568847656, 35.07596969604492, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.35024642944336, 34.22749328613281, 34.07823944091797, 34.019073486328125, 33.953285217285156, 33.67656707763672, 33.52077102661133, 32.375003814697266, 32.375003814697266, 32.375003814697266, 32.375003814697266, 32.375003814697266, 31.245065689086914, 31.245065689086914, 31.245065689086914, 30.886302947998047, 30.886302947998047, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.890806198120117, 29.645729064941406, 29.645729064941406, 29.645729064941406, 28.960681915283203, 28.515792846679688, 28.4021053314209, 28.292083740234375, 28.292083740234375, 27.257186889648438, 27.16153335571289, 27.16153335571289, 27.16153335571289, 27.16153335571289, 27.16153335571289, 27.16153335571289, 26.58884620666504, 26.58884620666504, 25.61632537841797, 24.916332244873047, 24.895063400268555, 24.10464859008789, 24.10464859008789, 24.10464859008789, 24.10464859008789, 23.82802963256836 ], "content": [ "I ve already used the nme setup android command .", "Is this a NME OpenFL bug", "Tested under NME 3.5.5 .", "All my imported library s are from NME .", "I m only getting something like this atm .. . .. . Error : Null Object Reference .. . .. . I m compiling with the NME command-line nme test windows -debug", "I ve tried reinstalling NME however the problem remains .", "It is not only happening with nme-runnermark but in general with almost any nme project that I try to build an html5 version out of .", "OpenFl is great but the latest version of NME http : gamehaxe.com 2014 03 06 nme-5-0-rereleased supports StageVideo .", "I m using rtti in haxe nme .", "IE C : Program Files x86 HaxeFoundation haxe lib nme.dev was C : some path NME edit to C : some path NME", "This might be an issue with the latest haxe3 release and interpolarity with nme .", "NME 3.5.5 requires Haxe 2.10 or latest .", "I m using NME to create a small game .", "What are your haxe hxcpp and nme openfl versions", "or did you use haxe NME", "You are not limited to NME with Haxe JS .", "Draws components using NME API .", "Try and run command nme create piratepig and then cd into cd . piratepig and run nme test html5", "Also what version of NME you use", "I m still using NME 3.5.5 hxcpp 2.10 .", "I have tried to build an html5-canvas version of the nme-runnermark https : github.com elsassph nme-runnermark but without any significant success .", "I m using Flash Develop NME 3.5.5 and Haxe 2.10 .", "I ve been working on a NME application and when I compile it I receive the following error : .. . .. . C : Program Files Haxe haxe lib nme 3 5 5 nme errors EOFError.hx : 25 : characters 0-18 : Class not found : browser.errors.EOFError Build halted with errors haxelib.exe .", "stackoverflow.com questions 16273440 haxe-nme-resizing-a-bitmap http : stackoverflow.com questions 16273440 haxe-nme-resizing-a-bitmap 16274055 16274055", "I m just trying to convert my code from C to Haxe NME .", "I was planning to use Haxe NME to develop a simple bluetooth chat application .", "I am trying to learn NME with haxe to create a small game .", "I have setup NME 3.5.5 with Haxe 2.10 in FlashDevelop .", "Im using nme 3.5.5 haxe 2.10 and flashdevelop 4.4.1 .", "I m trying to compile my nme project for android but until this moment it has been impossible for me .", "nme test build.nmml android .. . .. . Error : Could not find Library Android extras android support v4 android-support-v4.jar .. . .. . This is my error .", "So maybe this is a problem of losing alpha channel values during embedding in nme .", "Refer : http : haxeflixel.com forum help nme-355-preloader-flash-error", "Turns out I had openfl NME downloaded but not successfully installed .", "So what can i do to embed images on a haxe nme project when deploying to Windows", "So far I have tried to include all hxcpp generated code in my project in the same way that NME sets up the XCode project when you do nme build ios and I m calling hxRunLibrary from my code when I want the game to run .", "Is it really possible to convert a complex huge flex project to NME", "Is it really possible to convert a complex huge flex project to NME", "I know nothing about NME to judge the viability of this though .", "Nice thing of NME is that you can also create an flash demo of it .", "Also the code produced by NME HaXe contains errors suspicious code .", "I m playing with the interesting tool NME which is a combination of HaXe and Neko .", "Or do I missing something in the whole HaXe NME story", "with nme . for example : .. . .. . nme.display.sprite .. . .. . This compiles the code but does not run via FlashDevelop .", "And use it .. . .. . I had no idea on how to do this in Haxe NME .", "Stablex UI https : github.com RealyUniqueName StablexUI .. . NME OpenFL Cross Platform .", "HaxeUI https : github.com ianharrigan haxeui .. . NME Cross Platform .", "That project is using wxWidgets which you asked about and is compatible with NME .", ".. . and by the way I HAVE installed Actuate and NME libraries via cmd", "I created an NME project in FlashDevelop in the Main.hx I loaded a Bitmap then clicked on the build button with android as target .", "I have created the simple NyanCat example project that comes with NME purely as an example", "First I tried to run the Actuate Example provided here : http : www.joshuagranick.com blog 2011 07 05 getting-set-with-haxe-nme-and-webos-even-easie .. . .. . And in the command-prompt it told me it could not find the first import ie Actuate .. . .. . Then I tried using FlashDevelop and created an NME project .", "Nice find apparently there is also a performance cost when using them if you can avoid them in the comments they talk about a fix being done haxenme.atlassian.net browse NME-256 https : haxenme.atlassian.net browse NME-256", "I migrated from NME to OpenFL to do this and i couldn t be more happy with the result .", "If NME can easily port ActionScript then it may be possible to work something up with the generated ActionScript from the Flex Compiler and a converted version of the Flex Framework .", "My next attempt would be to get rid of the current version of nme and try with an older one .", "I am using this simple code snipet in nme to use the StablexUI for haxe but all I get is a blank white screen .", "I am making a game using Haxe OpenFL Formerly NME and HaxeFlixel with FlashDevelop .", "So is it possible to build a project with OpenFl and include some NME libraries to be able use StageVideo", "Additional info : .. . - The imported Timer.hx file is this one : haxe lib nme 5 1 8 haxe .", "I am using Haxe nme with Flash Develope to port a flash game to multiple platforms .", "I want to show image with alpha channel over preloader s background for flash target with haxe nme .", "I m trying to integrate InApp purchase a native SDK provided by our publisher into a game made with Haxe NME .", "so I decided to answer my question as I have already started porting my createJS project to haxe nme here is what I got : .. . .. . haxe nme is now openFL .. . targeting flash with openFL is very easy", "And this is the build command : .. . .. . If I am not adding -lib nme the code does not compile based on API doc it s OK as Timer is not supported for cpp so only static functions are available .. . .. . If I am adding this however the code is compiled -as nme supports cpp Timers- and the exe is created win but timer OnTick is never called .", "What must I do after conversion of a flex project with as3hx to get it operational as project to be able to compile it in NME .", "As a former Flash Developer I have been using NME with HaXe for the past year .", "Was playing around a bit with NME but it doesn t seem that it is possible to port flash objects to another language target other than flash .", "The nme.display.Sprite and all the nme classes that mimic the Flash API have compiler conditionals for compiling to the platform you have chosen .", "http : www.aswing.org originally based on the java swing ui has both as3 and Haxe NME versions .", "Besides using NME to produce HTML JS the code is huge approx 500kb for a very simple app that plays a sound .", "NME html5 target is almost the entire flash runtime api inside a js file so yes it will be 500kb or so .", "yesterday I stumbled across the Haxe NME project which is a very promising idea .", "I am a newbie to haxe and nme and I thought I d make a sample project and see how it all works .", "If you only need a container you should extend DisplayObjectContainer http : www.openfl.org api types nme display DisplayObjectContainer.html .", "I get the following stack of errors : .. . .. . I noted that ever since I upgraded nme to version 3.5.5 have these kinds of problems started to appear .", "I have a project written in createJS using haxe js project what would it involve to re-write the project to be NME based targeting AS3", "- Using haxe 3.1.3 nme 5.1.8 hxcpp 3.1.39 and haxelib 3.1.0-rc.4 if matters .. . .. . Any help would be much appreciated .", "I try to use haxe openfl for blackberry development .", ".. . .. . references : NME forum topic : Embed Transparent Png Image http : www.nme.io community forums programming-with-haxe embed-transparent-png-image", "When I try to compile to any platform it tells me : .. . .. . haxelib run nme build C : Users Zeeshan Documents Newnme application.nmml flash .. . .. . Library nme is not installed Build halted with errors haxelib.exe .. . .. . Done 1 .. . .. . Could I have any suggestions for help please", "I also got the suggestion on web to use Timer class for the same but I am not sure how can this be used to enable drag drop on multiple objects for html5 in nme .", "If you haven t gotten too far along in your project I would recommend switching to the latest Haxe 3 and NME or OpenFL which is still very new .", "MainActivity exists http : i.stack.imgur.com LGFC9.jpg .. . .. . The contents of the AndroidManifest.xml : .. . .. . NME should run on Android out of the box and I did not do anything crucial that could break it .", "Then I found NME didn t know this exists either and this seems to be based upon HaXe and Neko to create mobile apps for different platforms including Javascript and HTML5 .", "Haxe NME is not designed as an answer for an alternative to a flex mxml ui project so if you choose a flex ui you are confined to the limitations it has .", "https : github.com RealyUniqueName StablexUI and https : github.com ianharrigan haxeui are also both great options for Haxe OpenFL NME cross-platform uis .", "@Erwinus code produced by NME HaXe contains errors suspicious code this sweeping statement is rather superfluous unless you can demonstrate these errors .", "sample project but for OpenFL and Haxe 3 instead of NME and Haxe 2 is available here : .. . .. . https : github.com openfl openfl-samples .. . .. . Give those samples a shot.. .", "Going back to real basic tutorials and such this is my code : .. . .. . I m not sure whether to compile this as a Flash Player project or an NME project I m really new to this .", "In the console can you type haxe and report the output I m guessing version 2 and it would be helpful to go directly to the nme mailing list as it s more likely they re already know about this issue .", "According to this thread http : www.nme.io community forums programming-with-haxe change-window-title-c-and-neko-targets 11198 NME currently has no way of changing the title at runtime .", "Try reconfiguring the android framework .", "So I inherited a game project with the following setup : .. . .. . A core SWF of the game itself written in Haxe 3.0 NME 4.0.2 utilizing the Starling framework compiled to a Flash target using FlashDevelop .. . An AS3 wrapper which deals with assorted device communication needs e.g .", "Works fine for iOS and Android etc .", "This gave me the idea to port flex projects to NME to get rid of the Adobe AIR requirement and maybe get the execution faster and to get more possibilities with the same code .", "NME has seen many complex as3 libraries ported so its not impossible but flex mxml requires a huge investment and some might argue that Flex isn t worth the effort myself included .", "Update : Doing it directly in prompt gives : .. . .. . C : Users Zeeshan haxelib run nme build C : Users Zeeshan Documents Newnme applica tion.nmml flash .. . .. . Error : : Invalid DCE mode expected std full no .", "If I try to compile it as a Flash Player project I get this error at runtime : .. . .. . If I try to compile it as an NME project I get this error at compile-time : .. . .. . I m not finding a whole lot of information about this .", "Would this work once I put on iOS and Android" ] }
{ "confidence": [ 54.358455657958984, 53.725982666015625, 53.08598709106445, 51.82032775878906, 51.4550895690918, 49.48269271850586, 49.42781448364258, 48.70610809326172, 48.10639190673828, 47.98363494873047, 47.75891876220703, 47.548954010009766, 47.48117446899414, 47.472938537597656, 47.45587158203125, 47.277313232421875, 47.256317138671875, 45.985008239746094, 45.752235412597656, 45.37335205078125 ], "content": [ "Question : I am a newbie to haxe and nme and I thought I d make a sample project and see how it all works . I normally use FlashDevelop for the IDE . First I tried to run the Actuate Example provided here : http : www.joshuagranick.com blog 2011 07 05 getting-set-with-haxe-nme-and-webos-even-easie .. . .. . And in the command-prompt it told me it could not find the first import ie Actuate .. . .. . Then I tried using FlashDevelop and created an NME project . When I try to compile to any platform it tells me : .. . .. . haxelib run nme build C : Users Zeeshan Documents Newnme application.nmml flash .. . .. . Library nme is not installed Build halted with errors haxelib.exe .. . .. . Done 1 .. . .. . Could I have any suggestions for help please Update : Doing it directly in prompt gives : .. . .. . C : Users Zeeshan haxelib run nme build C : Users Zeeshan Documents Newnme applica tion.nmml flash .. . .. . Error : : Invalid DCE mode expected std full no . .. . Haxe Compiler 3.0.0 - C 2005-2013 Haxe Foundation Comment : .. . and by the way I HAVE installed Actuate and NME libraries via cmd .. . Answer : I d say that sample project was designed for Haxe 2 and some of the command-line parameters have changed with Haxe 3 . Also OpenFL seems to be the future . The same or similar sample project but for OpenFL and Haxe 3 instead of NME and Haxe 2 is available here : .. . .. . https : github.com openfl openfl-samples .. . .. . Give those samples a shot.. . Comment : Tried the bitmap one and it works Thank you .", "Question : I ve been working on a NME application and when I compile it I receive the following error : .. . .. . C : Program Files Haxe haxe lib nme 3 5 5 nme errors EOFError.hx : 25 : characters 0-18 : Class not found : browser.errors.EOFError Build halted with errors haxelib.exe . I check and the corresponding class does not appear to exist . I ve tried reinstalling NME however the problem remains . I m using Flash Develop NME 3.5.5 and Haxe 2.10 . I verified that a hello world program would compile properly in both flash and html 5 before starting this project and it still does . .. . Answer : If you haven t gotten too far along in your project I would recommend switching to the latest Haxe 3 and NME or OpenFL which is still very new . I know that s not a specific solution to that issue but the issue may go away and it s worth upgrading . There is a Windows binary available : .. . .. . http : haxe.org download Comment : Sorry for taking so long to respond I did just that and my program compiled properly . Thanks . Comment : Glad it worked for you Good luck with Haxe OpenFL", "Question : I m building a game using Haxe w HaxeFlixel in FlashDevelop currently targeting windows platform . While I get error messages in the console I would like to know if I can get the error line too like flash does . I m only getting something like this atm .. . .. . Error : Null Object Reference .. . .. . I m compiling with the NME command-line nme test windows -debug .. . Answer : Did you try to add to the project file following lines I have same issue but under linux - http : www.nme.io community forums general-discussion how-get-stack-trace-if-segmentation-fault-ocured-cpp-target", "Question : I am using Haxe nme with Flash Develope to port a flash game to multiple platforms . All my imported library s are from NME . The program compiles and runs fine with Flash as the target . But when I target Windows the program compiles and runs even the music starts playing but all I see is a blank window . All objects on the stage are missing . There are no errors and everything seems to compile run perfectly except for no objects showing up Is there something special I need to do to make objects show up with a windows target Comment : Try to build simple application with one sprite object on stage and test it . If sprite will not shown again put this example on the web and we will try to investigate . Comment : Also what version of NME you use And what is an objects you add to stage .. . Answer : I solved it . Interlaced PNG s work s just fine when deploying to flash but will show absolutely nothing on windows with no errors at all . This is clearly something that should be put in big bold letters somewhere to warn newcomers but now that I know everything is running great . Comment : Nice find apparently there is also a performance cost when using them if you can avoid them in the comments they talk about a fix being done haxenme.atlassian.net browse NME-256 https : haxenme.atlassian.net browse NME-256", "Question : I have tried to build an html5-canvas version of the nme-runnermark https : github.com elsassph nme-runnermark but without any significant success . The flash version builds without any problems . I get the following stack of errors : .. . .. . I noted that ever since I upgraded nme to version 3.5.5 have these kinds of problems started to appear . It is not only happening with nme-runnermark but in general with almost any nme project that I try to build an html5 version out of . My next attempt would be to get rid of the current version of nme and try with an older one . Anyway I wanted to know if anyone else is experiencing similar problems Comment : This might be an issue with the latest haxe3 release and interpolarity with nme . In the console can you type haxe and report the output I m guessing version 2 and it would be helpful to go directly to the nme mailing list as it s more likely they re already know about this issue . nme.io community mailing-list http : www.nme.io community mailing-list Comment : yes it is haxe 2.09 .. . Answer : NME 3.5.5 requires Haxe 2.10 or latest . Download and install it and it should be fine .", "Question : I m building a game using Haxe w HaxeFlixel in FlashDevelop currently targeting windows platform . While I get error messages in the console I would like to know if I can get the error line too like flash does . I m only getting something like this atm .. . .. . Error : Null Object Reference .. . .. . I m compiling with the NME command-line nme test windows -debug .. . Answer : Try running from cmd . I m sure exception information wil be printed there . And don t forget to set -debug mode .", "Question : yesterday I stumbled across the Haxe NME project which is a very promising idea . However it is still not possible to build sophisticated UIs with this framework . In my opinion it seems to be a intimidating task to build a UI framework that targets so many different platforms hence I think that this isn t a viable approach because even old and mature UI frameworks like Qt and wxWidgets don t support so many platforms . However it could make sense to build a platform specific UI with help of some pretty UI designer tool and then connect the UI code to the UI agnostic code that has been written in Haxe . I don t know if this could work because I couldn t find any example but maybe someone who has already written some MVC Haxe code that could be successfully connected to different platform specific UIs would like to share his experiences . Thanks . .. . Answer : You say : .. . .. . However it is still not possible to build sophisticated UIs .. . .. . Just because you haven t yet figured out how to do it doesn t mean it s not possible .. . .. . The reason it is possible is that in the Haxe ecosystem the language and compiler is extremely consistent cross-platform NME OpenFL provides a fairly strong cross-platform rendering environment HTML 5 has some quirks but the others seem fairly strong and so anything you build on top of these is going to cover a lot of platforms out-of-the-box . It s about being fairly high level - letting the compiler and the libraries take care of the platform quirks . In MVC the UI stuff is usually the V iew . For View UI frameworks check out these libraries : .. . .. . 1 . Stablex UI https : github.com RealyUniqueName StablexUI .. . NME OpenFL Cross Platform . Draws components using NME API . This is the only one I ve played with but the demo works consistently on android flash html5 native linux . Pretty impressive . 2 . HaxeUI https : github.com ianharrigan haxeui .. . NME Cross Platform . Again draws components on the stage . 3 . Prime https : github.com touch Prime .. . Drawn using Flash API . Not sure if it has been ported cross-platform yet . See also Talk Video from WWX conference http : www.youtube.com watch v UAT9RBb7wcU and Slides http : wwx-2013.prime.vc .. . .. . 4 . Guise http : www.tbyrne.org guise-unified-ui-for-haxe .. . A really innovative way of being able to either draw the UI or use native if available . Check out the blog post . 5 . Basis https : github.com Randonee Basis .. . Another attempt at wrapping native components - has iOS and Android libraries so far . Pretty cool but I haven t played with it yet . For MVC there are lots of options : .. . .. . 1 . PrimeVC mentioned above . 2 . MMVC https : github.com massiveinteractive mmvc based on the RobotLegs framework but tailored for Haxe . 3 . Lots of small options BBMVC http : bbmvc.org PureMVC http : haxe.org com libs puremvc etc .. . .. . The advantage of the MVC frameworks is that they separate your views from your application data model and logic controller . Try to spend some time familiarising yourself with one of the MVC frameworks and you ll see how you can write your apps in a way where you could use one of these and then any of the various view engines - either native or NME-rendered . It can be a fairly steep learning curve but this is how you build apps that are easily portable between different UI frameworks and easily testable so you know they will scale as the app grows in complexity . Comment : Thanks . I know those Haxe UI frameworks but they don t contain a lot of components . I would be very glad if I could use an arbitrary UI framework like wxWidgets Qt or Flex mxml and then glue the external UI on top of the model and controller classes that are written in Haxe . Would that be possible Comment : Have you come across Waxe then github.com misterpah waxe https : github.com misterpah waxe Comment : Yes but that s also a very small project that might vanish sooner or later . If it should be somehow possible I would like to use Haxe in conjunction with a large UI framework . Comment : That project is using wxWidgets which you asked about and is compatible with NME . I think someone did GTK bindings but I haven t heard in a while so they might be outdated . If you re looking for a UI framework with a lot of momentum already Haxe might not be the right choice for you . It s a great language but the community is still small so you have to be willing to live with the uncertainty for now at least", "Question : OpenFl is great but the latest version of NME http : gamehaxe.com 2014 03 06 nme-5-0-rereleased supports StageVideo . So is it possible to build a project with OpenFl and include some NME libraries to be able use StageVideo .. . Answer : Really all you would need to do is in your Project.XML file include : .. . .. . Assuming of course that you have both installed via haxelib . Then you could call either both libraries .", "Question : I am using Haxe nme with Flash Develope to port a flash game to multiple platforms . All my imported library s are from NME . The program compiles and runs fine with Flash as the target . But when I target Windows the program compiles and runs even the music starts playing but all I see is a blank window . All objects on the stage are missing . There are no errors and everything seems to compile run perfectly except for no objects showing up Is there something special I need to do to make objects show up with a windows target Comment : Try to build simple application with one sprite object on stage and test it . If sprite will not shown again put this example on the web and we will try to investigate . Comment : Also what version of NME you use And what is an objects you add to stage .. . Answer : There is no make objects show up on windows target setting . Its very hard to tell you if there is something wrong with your code without seeing it . Please try to compile the example project to windows to see a working project . http : www.nme.io developer documentation getting-started", "Question : For a client I ve developed an iOS + Android app using Cordova PhoneGap for the user-interface . Now as an update to this app I m am attempting to add a game that was written in Haxe . Originally the game was written for the Flash target but I ve updated it to work with the C++ targets for Android and iOS . On Android it was easy to integrate this with the Cordova app using activities the Haxe part runs as a separate activity but I am having some trouble achieving a similar result on iOS . So far I have tried to include all hxcpp generated code in my project in the same way that NME sets up the XCode project when you do nme build ios and I m calling hxRunLibrary from my code when I want the game to run . The problem is that hxRunLibrary seems to want to create its own UIApplication instance which fails with the following error since my main app is already running an instance : .. . .. . I think it might have something to do with SDL which Haxe uses for graphics . From what I understand SDL needs to run from the main function of the app which created a conflict with Cocoa that also needs to run from the main function . Is there any easy way around this I ve looked in the hxcpp sources but been unable to find the UIApplication related code or any entry code for SDL . Perhaps someone could point me in the right direction . Thanks .. . Answer : cordova has the ability to be integrated as part of a bigger application .. . .. . ran into the same issue . http : devgirl.org 2012 11 15 embed-cordovaphonegap-in-your-native-ios-app this article will help .. . .. . you dont actually create a new project instead you embed it in a webview via the ios webview and cordova acts a subview .", "Question : Have used Flash Builder 4.6 in the past to create some mobile applications . The apps created runs fine only on high-end phone models but also runs slower than native apps . Especially when the app is booting it takes a while when the app is fully loaded . I know why this is slower because AIR is an extra application layer that translate it to native . Let me tell you about my perspective . I know that developing software that is not native being slower than native . In some situations you need native for speed graphics etc . but most of the time it is not really important does not need that all parts of the software using the hardware directly . The thing I want to achieve is to reduce developing costs by developing it once and to be able to port it to many platforms if required . I understand why there are so many languages around this is in my opinion only because they like the language want to bring something new because it is new or to bind developers to a specific platform a commercial reason . In fact there are not many differences in type of hardware or the way it is operating so why investing in new things when it brings nothing new . I want to develop code that is long lasting not bind to a platform hype or trend . For example when you have invested to write code for a specific platform let s say Window Mobile your code is useless these days . Especially in the mobile world things can change rapidly . Anyway lately I discover the existence of HaXe didn t know this exists . Sounds very promising using one language AS-like and port it to another language . A very interesting thing is that it is possible to port it to Javascript and use it for example in combination with phonegap to create mobile apps or to be able to use it on a website without it requires flash or embed it into an executable with the VM called Neko . They claim that the code it produce is faster than the original Adobe framework . I can imagine that it is faster because all elements of HaXe are blazing fast . Then I found NME didn t know this exists either and this seems to be based upon HaXe and Neko to create mobile apps for different platforms including Javascript and HTML5 . This gave me the idea to port flex projects to NME to get rid of the Adobe AIR requirement and maybe get the execution faster and to get more possibilities with the same code . Then I found as3hx and some info on Apache FlexJS formally known as Adobe FalconJS . as3hx translates the ActionScript code to HaXe code and FlexJS convert AS+XML to uneditable HTML5+Javascript code . I prefer as3hx because of the extended possibilities but don t how to implement the project after conversion end up with some hx files only . Haven t try FlexJS because it seems experimental not official and requires to update the Adobe Flex framework with the newer Apache Flex Framework 4.9 . I hesitate to update the framework in Flash Builder because I realize that I can screw up the original setup . I have a few questions before I proceed with this process : .. . .. . 1 . Is it really possible to convert a complex huge flex project to NME 2 . What must I do after conversion of a flex project with as3hx to get it operational as project to be able to compile it in NME . 3 . Have somebody tried the FlexJS approach and was is worth it For your information some resources that leads to these questions : .. . .. . HaXe : http : haxe.org .. . as3hx : http : caffeine-hx.googlecode.com svn-trunk projects as3hx .. . NME : http : www.nme.io .. . FalconJS : http : blogs.adobe.com bparadie 2011 11 19 what-is-falconjs .. . FlexJS : https : cwiki.apache.org FLEX flexjs-status.html .. . .. . Many thanks for any input and if you want some extra information drop me a line . Comment : As a former Flash Developer I have been using NME with HaXe for the past year . I think it is great and have used it for a mobile game . Not so sure how easy it would be to port an existing flex project that relies on various components etc though . Comment : Hi Allen thanks for your reply . Was playing around a bit with NME but it doesn t seem that it is possible to port flash objects to another language target other than flash . Downloaded some demo s and try to compile it to Javascript for example . Get the error : You can t access the flash package with current compilation flags for flash.display.Sprite . If it is not possible to do this what is the point of these targets or do I miss something How is it possible that they claim to be multilingual if you cannot use it . Sounds to me a little pointless or not Comment : You need to ensure that you are using nme.display.Sprite instead of flash.display.Sprite . The nme.display.Sprite and all the nme classes that mimic the Flash API have compiler conditionals for compiling to the platform you have chosen . Comment : Allen thank you that does the trick Comment : Hello Erwinus 7 months passed on your question I am very interested to know what choice have you chosen did you wait Adobe to polish AIR performance or did you use haxe NME I already started my android app using openFL I like some one to tell me that I took the right decision as I prefered openFL over Adobe AIR . . .. . Answer : I m sorry to dash your hopes but I m dealing with the same issue of getting away from Flex and going towards HTML5 JS . You can bang your head against trying to convert your large flex application to HTML5 JS for months if you want but in the end it will be easier to just rewrite the entire thing in a library like ExtJS . Comment : I think you are right rewriting is the best and fastest way . I will do it with my own library jquery and phonegap . Also found this : StablexUI stablex.ru http : stablex.ru looks promising but i do not know if you can rely on it . And this one : ivank.net http : ivank.net based on canvas and looks incredibly good . Only one sad thing is that it is not working on my Galaxy S . Problem with the HTML JS solution and phonegap is that most of the time sound is not working on Android 2.3 . That is not a problem of phonegap but Android . Nice thing of NME is that you can also create an flash demo of it . Comment : Besides using NME to produce HTML JS the code is huge approx 500kb for a very simple app that plays a sound . Also the code produced by NME HaXe contains errors suspicious code . I don t know if i will give it a try . Comment : yea you will get much better performance if you rewrite from scratch Comment : @Erwinus code produced by NME HaXe contains errors suspicious code this sweeping statement is rather superfluous unless you can demonstrate these errors . NME html5 target is almost the entire flash runtime api inside a js file so yes it will be 500kb or so . You can also use the -minify compiler flag and make sure --dead-code-elimination is on . Haxe is actually a brilliant Type Safe OOP language to write js see a most minimal example on try.haxe.org http : try.haxe.org . You are not limited to NME with Haxe JS . Comment : I can demonstrate it and google enclosure compiler detects it for example : if .. . else null I take a look again and will try your suggested option .", "Question : Have used Flash Builder 4.6 in the past to create some mobile applications . The apps created runs fine only on high-end phone models but also runs slower than native apps . Especially when the app is booting it takes a while when the app is fully loaded . I know why this is slower because AIR is an extra application layer that translate it to native . Let me tell you about my perspective . I know that developing software that is not native being slower than native . In some situations you need native for speed graphics etc . but most of the time it is not really important does not need that all parts of the software using the hardware directly . The thing I want to achieve is to reduce developing costs by developing it once and to be able to port it to many platforms if required . I understand why there are so many languages around this is in my opinion only because they like the language want to bring something new because it is new or to bind developers to a specific platform a commercial reason . In fact there are not many differences in type of hardware or the way it is operating so why investing in new things when it brings nothing new . I want to develop code that is long lasting not bind to a platform hype or trend . For example when you have invested to write code for a specific platform let s say Window Mobile your code is useless these days . Especially in the mobile world things can change rapidly . Anyway lately I discover the existence of HaXe didn t know this exists . Sounds very promising using one language AS-like and port it to another language . A very interesting thing is that it is possible to port it to Javascript and use it for example in combination with phonegap to create mobile apps or to be able to use it on a website without it requires flash or embed it into an executable with the VM called Neko . They claim that the code it produce is faster than the original Adobe framework . I can imagine that it is faster because all elements of HaXe are blazing fast . Then I found NME didn t know this exists either and this seems to be based upon HaXe and Neko to create mobile apps for different platforms including Javascript and HTML5 . This gave me the idea to port flex projects to NME to get rid of the Adobe AIR requirement and maybe get the execution faster and to get more possibilities with the same code . Then I found as3hx and some info on Apache FlexJS formally known as Adobe FalconJS . as3hx translates the ActionScript code to HaXe code and FlexJS convert AS+XML to uneditable HTML5+Javascript code . I prefer as3hx because of the extended possibilities but don t how to implement the project after conversion end up with some hx files only . Haven t try FlexJS because it seems experimental not official and requires to update the Adobe Flex framework with the newer Apache Flex Framework 4.9 . I hesitate to update the framework in Flash Builder because I realize that I can screw up the original setup . I have a few questions before I proceed with this process : .. . .. . 1 . Is it really possible to convert a complex huge flex project to NME 2 . What must I do after conversion of a flex project with as3hx to get it operational as project to be able to compile it in NME . 3 . Have somebody tried the FlexJS approach and was is worth it For your information some resources that leads to these questions : .. . .. . HaXe : http : haxe.org .. . as3hx : http : caffeine-hx.googlecode.com svn-trunk projects as3hx .. . NME : http : www.nme.io .. . FalconJS : http : blogs.adobe.com bparadie 2011 11 19 what-is-falconjs .. . FlexJS : https : cwiki.apache.org FLEX flexjs-status.html .. . .. . Many thanks for any input and if you want some extra information drop me a line . Comment : As a former Flash Developer I have been using NME with HaXe for the past year . I think it is great and have used it for a mobile game . Not so sure how easy it would be to port an existing flex project that relies on various components etc though . Comment : Hi Allen thanks for your reply . Was playing around a bit with NME but it doesn t seem that it is possible to port flash objects to another language target other than flash . Downloaded some demo s and try to compile it to Javascript for example . Get the error : You can t access the flash package with current compilation flags for flash.display.Sprite . If it is not possible to do this what is the point of these targets or do I miss something How is it possible that they claim to be multilingual if you cannot use it . Sounds to me a little pointless or not Comment : You need to ensure that you are using nme.display.Sprite instead of flash.display.Sprite . The nme.display.Sprite and all the nme classes that mimic the Flash API have compiler conditionals for compiling to the platform you have chosen . Comment : Allen thank you that does the trick Comment : Hello Erwinus 7 months passed on your question I am very interested to know what choice have you chosen did you wait Adobe to polish AIR performance or did you use haxe NME I already started my android app using openFL I like some one to tell me that I took the right decision as I prefered openFL over Adobe AIR . . .. . Answer : Is it really possible to convert a complex huge flex project to NME Haxe NME is not designed as an answer for an alternative to a flex mxml ui project so if you choose a flex ui you are confined to the limitations it has . NME has seen many complex as3 libraries ported so its not impossible but flex mxml requires a huge investment and some might argue that Flex isn t worth the effort myself included . http : www.aswing.org originally based on the java swing ui has both as3 and Haxe NME versions . https : github.com RealyUniqueName StablexUI and https : github.com ianharrigan haxeui are also both great options for Haxe OpenFL NME cross-platform uis . Tools like as3hx make the process of converting the most basic differences in as3 Haxe easier . It does not claim to be an absolute conversion and I have yet to see anything that can automatically convert highly complex as3 to Haxe . It is only a tool and wouldn t make use of optimizing as3 code to the more advanced and best language features of the Haxe language . Comment : As an additional tidbit to add the bulk of the Flex Framework is written in AS3 . The only MXML parts are some of the Spark Skins . The Flex Compiler will take MXML and turn it into ActionScript . All the Flex apps I have seen make extensive use of MXML . If NME can easily port ActionScript then it may be possible to work something up with the generated ActionScript from the Flex Compiler and a converted version of the Flex Framework . I know nothing about NME to judge the viability of this though . It sounds potentially like a massive undertaking . Comment : Thanks i think i skip the whole idea . Comment : I accept this as an answer that it is NOT possible .", "Question : Anyone run into this Everything is up to-date . .. . Answer : https : code.google.com p haxe issues detail id 1853 .. . .. . Editing the file manually and removing the trailing-slash resolves the problem .. . .. . Edit the .dev file inside the lib that s giving you the problem . IE C : Program Files x86 HaxeFoundation haxe lib nme.dev was C : some path NME edit to C : some path NME", "Question : For a client I ve developed an iOS + Android app using Cordova PhoneGap for the user-interface . Now as an update to this app I m am attempting to add a game that was written in Haxe . Originally the game was written for the Flash target but I ve updated it to work with the C++ targets for Android and iOS . On Android it was easy to integrate this with the Cordova app using activities the Haxe part runs as a separate activity but I am having some trouble achieving a similar result on iOS . So far I have tried to include all hxcpp generated code in my project in the same way that NME sets up the XCode project when you do nme build ios and I m calling hxRunLibrary from my code when I want the game to run . The problem is that hxRunLibrary seems to want to create its own UIApplication instance which fails with the following error since my main app is already running an instance : .. . .. . I think it might have something to do with SDL which Haxe uses for graphics . From what I understand SDL needs to run from the main function of the app which created a conflict with Cocoa that also needs to run from the main function . Is there any easy way around this I ve looked in the hxcpp sources but been unable to find the UIApplication related code or any entry code for SDL . Perhaps someone could point me in the right direction . Thanks .. . Answer : Well I have googled some information about Haxe . what i understood is that The Haxe will prouduce a completed application for you .that mean it include the main Function . That s why the error is happend . And you can simulate the problem by invoke UIApplicationMain Function twice . In my opinion you have to remove the code about UIApplicationMain from the souce code file produced by Haxe .", "Question : I m building a game using Haxe w HaxeFlixel in FlashDevelop currently targeting windows platform . While I get error messages in the console I would like to know if I can get the error line too like flash does . I m only getting something like this atm .. . .. . Error : Null Object Reference .. . .. . I m compiling with the NME command-line nme test windows -debug .. . Answer : I posted this issue on the Haxe Google Group https : groups.google.com forum fromgroups topic haxelang N I8PJmDRNM and here s the official answer from Hugh the creator of hxcpp : .. . .. . Hi There is a bug in the 3.0 HXCPP version that prevents the correct stack dump in debug mode in this case . This is fixed in the SVN version . You can also attach visual-studio and put a function break point in hx : : CriticalError and examine the stack there . .. . Hugh .. . .. . The next version of hxcpp will have this issue fixed .", "Question : Trying to create a simple command-line application in Haxe which has a ticking Timer but it does not seem to work out the Timer never actually starts ticking . And this is the build command : .. . .. . If I am not adding -lib nme the code does not compile based on API doc it s OK as Timer is not supported for cpp so only static functions are available .. . .. . If I am adding this however the code is compiled -as nme supports cpp Timers- and the exe is created win but timer OnTick is never called . So exe starts nothing happens one press SPACE and app . quits . Additional info : .. . - The imported Timer.hx file is this one : haxe lib nme 5 1 8 haxe . And if I am right this should be OK working . - Using haxe 3.1.3 nme 5.1.8 hxcpp 3.1.39 and haxelib 3.1.0-rc.4 if matters .. . .. . Any help would be much appreciated . .. . Answer : Okay I ve got help from the Haxe Community mailing list . Here are the solutions if anyone happen to need them : .. . .. . PSEUDO CODE not tested", "Question : I m trying to compile my nme project for android but until this moment it has been impossible for me . The error message that I m getting is .. . .. . Running process : C : Program Files x86 FlashDevelop Tools fdbuild fdbuild.exe C : Users Andr s Documents myOP project.hxproj -ipc cf7bbe3a-8e0c-47e5-aac3-4d442ae964f2 -version 2.10 -compiler C : Motion-Twin Haxe -notrace -library C : Program Files x86 FlashDevelop Library -target android Building project haxelib run nme build C : Users Andr s Documents myOP project.nmml android haxelib run hxcpp Build.xml haxe -Dactuate -Dandroid -Dcpp -Dfullscreen -Dhaxe 208 -Dhaxe 209 -Dhaxe 210 -Dmobile -Dnme -Dnme install tool -Dsys -Dtrue Creating obj android pch haxe hxcpp.h.gch.. . arm-linux-androideabi-g++ -Iinclude --sysroot C : Users Andr s Documents AndroidNDK platforms android-5 arch-arm -IC : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ 4.4.3 include -IC : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ 4.4.3 libs armeabi include -DHXCPP VISIT ALLOCS -Dhaxe 210 -IC : Motion-Twin Haxe lib hxcpp 3 0 1 include -Iinclude -fpic -fvisibility hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D ARM ARCH 5 -D ARM ARCH 5T -D ARM ARCH 5E -D ARM ARCH 5TE -D LINUX STDDEF H -Wno-psabi -march armv5te -mtune xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit 10000 -DANDROID -Wa --noexecstack -O2 -DNDEBUG -c -frtti -o obj android pch haxe hxcpp.h.gch C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 14 : 20 : error : typeinfo : No such file or directory In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 193 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : 205 : 21 : error : algorithm : No such file or directory In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 185 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include hx Object.h : In member function void hx : : ObjectPtr : : CastPtr hx : : Object : C : Motion-Twin Haxe lib hxcpp 3 0 1 include hx Object.h : 143 : error : must include before using typeid In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 193 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : In member function void Array obj : : sort Dynamic : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : 401 : error : stable-sort is not a member of std In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 194 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Class.h : In function bool hx : : TCanCast hx : : Object : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Class.h : 154 : error : must .. . .. . include before using typeid Called from line 1 Called from BuildTool.hx line 1529 Called from BuildTool.hx line 673 Called .. . .. . from BuildTool.hx line 708 Called from BuildTool.hx line 842 Called from BuildTool.hx line 885 Called from BuildTool.hx line 194 Uncaught exception - Error creating pch : 1 - build cancelled Error : Build failed Build halted with errors haxelib.exe . Done 1 .. . .. . okay . I ve already used the nme setup android command . My .hxcpp config.xml file : .. . .. . ANDROID SDK : C : Users Andr s Documents eclipse+android sdk .. . .. . ANDROID SETUP value true .. . .. . ANDROID NDK ROOT : C : Users Andr s Documents AndroidNDK .. . .. . ANT HOME : C : Development Apache Ant .. . .. . JAVA HOME value : C : Program Files Java jdk1.7.0 11 .. . .. . And finally I verified my environmental variables . Here they are . User variables .. . .. . HAXEPATH : C : Motion-Twin haxe .. . .. . NEKO INSTPATH : C : Motion-Twin neko .. . .. . PATH : HAXEPATH NEKO INSTPATH .. . .. . system variables .. . .. . Path : WINDOWS system32 JAVA HOME bin .. . .. . I added C : Motion-Twin haxe C : Motion-Twin neko to the system path variable without succes . Im using nme 3.5.5 haxe 2.10 and flashdevelop 4.4.1 . I ve already used the haxelib upgrade command so I m updated . Can you tell me what I m missing .. . Answer : Try reconfiguring the android framework . Delete the hxcpp config file . Now run the command .. . .. . Then select Android from the target listbox and it should work . Comment : I m sorry but what should I do in order to do that", "Question : I created an NME project in FlashDevelop in the Main.hx I loaded a Bitmap then clicked on the build button with android as target . The build successfully finishes but then I get the following error : .. . .. . However the Activity does exists : MainActivity exists http : i.stack.imgur.com LGFC9.jpg .. . .. . The contents of the AndroidManifest.xml : .. . .. . NME should run on Android out of the box and I did not do anything crucial that could break it . Comment : Can you post your haxe code and .nmml file .. . Answer : Note this message in your logs : Failure INSTALL FAILED CONTAINER ERROR .. . .. . That means APK file built by Android SDK contained error and was discarded not installed on your device emulator hence the activity doesn t exist . Look into the way your android SDK works . This line : android adb server is out of date . killing.. . is suspicious too . If I were in your shoes the first thing I d try would be to update and maybe reinstall if it doesn t help Android SDK .", "Question : I m using NME to create a small game . I like to display the objective in the title bar in the Neko and C++ targets . Is that possible Thanks . .. . Answer : According to this thread http : www.nme.io community forums programming-with-haxe change-window-title-c-and-neko-targets 11198 NME currently has no way of changing the title at runtime . Hope we get it soon .", "Question : I m trying to compile my nme project for android but until this moment it has been impossible for me . The error message that I m getting is .. . .. . Running process : C : Program Files x86 FlashDevelop Tools fdbuild fdbuild.exe C : Users Andr s Documents myOP project.hxproj -ipc cf7bbe3a-8e0c-47e5-aac3-4d442ae964f2 -version 2.10 -compiler C : Motion-Twin Haxe -notrace -library C : Program Files x86 FlashDevelop Library -target android Building project haxelib run nme build C : Users Andr s Documents myOP project.nmml android haxelib run hxcpp Build.xml haxe -Dactuate -Dandroid -Dcpp -Dfullscreen -Dhaxe 208 -Dhaxe 209 -Dhaxe 210 -Dmobile -Dnme -Dnme install tool -Dsys -Dtrue Creating obj android pch haxe hxcpp.h.gch.. . arm-linux-androideabi-g++ -Iinclude --sysroot C : Users Andr s Documents AndroidNDK platforms android-5 arch-arm -IC : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ 4.4.3 include -IC : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ 4.4.3 libs armeabi include -DHXCPP VISIT ALLOCS -Dhaxe 210 -IC : Motion-Twin Haxe lib hxcpp 3 0 1 include -Iinclude -fpic -fvisibility hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D ARM ARCH 5 -D ARM ARCH 5T -D ARM ARCH 5E -D ARM ARCH 5TE -D LINUX STDDEF H -Wno-psabi -march armv5te -mtune xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit 10000 -DANDROID -Wa --noexecstack -O2 -DNDEBUG -c -frtti -o obj android pch haxe hxcpp.h.gch C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 14 : 20 : error : typeinfo : No such file or directory In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 193 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : 205 : 21 : error : algorithm : No such file or directory In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 185 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include hx Object.h : In member function void hx : : ObjectPtr : : CastPtr hx : : Object : C : Motion-Twin Haxe lib hxcpp 3 0 1 include hx Object.h : 143 : error : must include before using typeid In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 193 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : In member function void Array obj : : sort Dynamic : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Array.h : 401 : error : stable-sort is not a member of std In file included from C : Motion-Twin Haxe lib hxcpp 3 0 1 include hxcpp.h : 194 : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Class.h : In function bool hx : : TCanCast hx : : Object : C : Motion-Twin Haxe lib hxcpp 3 0 1 include Class.h : 154 : error : must .. . .. . include before using typeid Called from line 1 Called from BuildTool.hx line 1529 Called from BuildTool.hx line 673 Called .. . .. . from BuildTool.hx line 708 Called from BuildTool.hx line 842 Called from BuildTool.hx line 885 Called from BuildTool.hx line 194 Uncaught exception - Error creating pch : 1 - build cancelled Error : Build failed Build halted with errors haxelib.exe . Done 1 .. . .. . okay . I ve already used the nme setup android command . My .hxcpp config.xml file : .. . .. . ANDROID SDK : C : Users Andr s Documents eclipse+android sdk .. . .. . ANDROID SETUP value true .. . .. . ANDROID NDK ROOT : C : Users Andr s Documents AndroidNDK .. . .. . ANT HOME : C : Development Apache Ant .. . .. . JAVA HOME value : C : Program Files Java jdk1.7.0 11 .. . .. . And finally I verified my environmental variables . Here they are . User variables .. . .. . HAXEPATH : C : Motion-Twin haxe .. . .. . NEKO INSTPATH : C : Motion-Twin neko .. . .. . PATH : HAXEPATH NEKO INSTPATH .. . .. . system variables .. . .. . Path : WINDOWS system32 JAVA HOME bin .. . .. . I added C : Motion-Twin haxe C : Motion-Twin neko to the system path variable without succes . Im using nme 3.5.5 haxe 2.10 and flashdevelop 4.4.1 . I ve already used the haxelib upgrade command so I m updated . Can you tell me what I m missing .. . Answer : Hey just to let you know . I found the problem You ll see flashdevelop was looking for the haxe files in C : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ 4.4.3 include so I went to that direction and surprise the 4.4.3 folder was missing so i created it and put all the files form C : Users Andr s Documents AndroidNDK sources cxx-stl gnu-libstdc++ into the 4.4.3 folder and done . Hope this can help somebody" ] }
[ "yes-answer-long", "yes-answer-short" ]
flash-player
UNK_RELATION
javarosa@mobile-devices@72
javarosa -- javarosa is an open-source platform for data collection on @placeholder .
{ "confidence": [ 57.97050476074219, 54.58549499511719, 52.94149398803711, 42.716522216796875, 42.716522216796875, 18.363811492919922, 16.62447738647461, 14.786447525024414, 14.403141021728516, 14.294377326965332, 13.631561279296875, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.474888801574707, 13.22590446472168, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 12.113561630249023, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289, 10.481973648071289 ], "content": [ "What is the way to go to validate a JavaRosa https : bitbucket.org javarosa javarosa wiki Home xml file", "For JavaRosa form submissions you can use their OpenRosaMetaDataSchema https : bitbucket.org javarosa javarosa wiki OpenRosaMetaDataSchema : .. . .. . There are two types of metadata in a form submission .", "Will there be conflicts with JavaRosa additions and the XForms XSD", "UPDATE : We re currently implementing for ODK which uses JavaRosa .", "We re currently using ODK Collect as client which uses JavaRosa .", "There is more about this here : groups.google.com forum msg open-web-discuss Bu0HeJxzQ-Q https : groups.google.com forum msg open-web-discuss Bu0HeJxzQ-Q ESUwyrJujeMJ", "The first provides metadata about the identity and version of the XForm used to create the data being submitted .", "I need the id of a node not the data between the nodes .", "I have an xform document .. . .. . I would like to select the data element from the xform using xpath and jdom .. . .. . seems to work fine and selects the title element but .. . .. . does not select the model element .", "Try adding an empty namespace xmlns to your instance data.. .", "However here is the solution you can run the movies in a foreach and set if condition for id and can get data .", "Since odk collect uses utf-8 the language that i would like the questions of the form to be in would be displayed one character at a time vs . conjoined .", "instead of displaying text for the question i want the question to display an image which will be on the question text formatted properly .", "Is there anyway this can be done are there any good tutorials or information out there that can help me accomplish this", "the bolded code did not work .", "I am trying to retrieve the innerTexts of a repeated group but I am unable to retrieve the appearance attribute or the hint .", "The other two hint tags i can retrieve .", "Any pointers", "Not sure what you mean with retrieve the innerTexts but maybe the following clarifies the issue you re experiencing .", "The appearance is only supported as an attribute on form-control elements and group elements .", "See also http : opendatakit.github.io odk-xform-spec though admittedly appearance attributes are not well covered there .", "I don t think the hint element is supported as a child of the group element .", "It is only supported as a child of form-control elements .", "Not the answer I wanted but it was the one that I had begun to expect .", "Is there an official XSD or DTD", "For XForms itself you can use W3C s XForms-11-Schema.xsd http : www.w3.org MarkUp Forms 2007 XForms-11-Schema.xsd .", "The second captures useful information about the submission itself .", "This looks like a proposal I have not seen xml files using such a structure so far no http : openrosa.org xforms is it used by some project", "The default namespace is http : www.w3.org 2002 xforms so every unprefixed element descendant of html is in that namespace including your instance data .", "I guess it has something to do with the namespace .", "It looks like the default namespace problem .", "Does this answer help : stackoverflow.com a 6390494 10098 http : stackoverflow.com a 6390494 10098", "BTW your default namespace is probably wrong it should be w3.org 2002 xforms http : www.w3.org 2002 xforms if I m not mistaken", "this seems to do the tick .", "XPath xpath XPath.newInstance h : model tanx @wds for the link .", "A few things .", "You really should be using JDOM 2.0.x .. . 2.0.5 is latest release .", "The XPath API in the 2.0.x versions is far better than the one in JDOM 1.x : see https : github.com hunterhacker jdom wiki JDOM2-Feature-XPath-Upgrade .. . .. . @wds is right about not having the correct namespace for the xforms elements too... . and that is why you XPath is working because it has the same namespace as the xhtml elements with the h prefix .", "Your code is likely to be broken still .", "Namespaces in XPaths often confuse people because every namespace in an XPath has to have a prefix .", "Even if something is the default namespace in the XML no prefix like your model element it has to have one in the XPath .", "queries with no prefix in the XPath always reference the no namespace namespace... . XPath specification : http : www.w3.org TR xpath node-tests .. . .. . A QName in the node test is expanded into an expanded-name using the namespace declarations from the expression context .", "This is the same way expansion is done for element type names in start and end-tags except that the default namespace declared with xmlns is not used : if the QName does not have a prefix then the namespace URI is null this is the same way attribute names are expanded .", "It is an error if the QName has a prefix for which there is no namespace declaration in the expression context .. . .. . Assuming @wds is correct and the namespace for the model element is supposed to be http : www.w3.org 2002 xforms then your namespace delcaration in your document should be xmlns http : www.w3.org 2002 xforms .", "But this namespace is the default namespace and the URI for the no-prefix namespace in your XPath query is .", "To access the http : www.w3.org 2002 xforms namespace in your XPath you have to give it a prefix fo the context of the XPath let s say xpns for xpath namespace .", "In JDOM 1.x you add that namespace with : .. . .. . Note how that adds the xpns to the query .", "Also note that I have anchored the h : html reference to the root of the document which will improve the performance of the query evaluation .", "IN JDOM 2.x the XPath API is significanty better even though in some cases it may seem overkill .", "See more about the new XPath API in the JDOM 2.x javadoc : XPathFactory.compile .. . javadoc http : www.jdom.org docs apidocs org jdom2 xpath XPathFactory.html compile 28java.lang.String 20org.jdom2.filter.Filter 20java.util.Map 20org.jdom2.Namespace.. . 29", "We are developing an XForms-based survey system .", "The client wants to add rich-formatting to labels and hints .", "Is this possible", "If so how do you define formatting on the XForm xml", "Is there a reference page that I can go to", "We re planning to launch our own mobile-application later keeping compatibility with the current ODK Collect application .", "UPDATE 2 : Our client would actually like to have a label in the form of : .. . .. . The quick brown fox jumped over the lazy dog .", "Which XForms engine are you planning to use", "I suppose that your question aims at an implementation-specific issue .", "If you re using a server-side solution it s likely that you can use standard CSS to style the labels and hints .", "@tohuwawohu right I forgot .", "We plan to develop our own compatible HTML5 client on the future .", "This seems to be an ODK limitation because other XForms implementations such as mine XSLTForms allow html elements with styling for labels or hints .", "@PabloVenturino : sorry i don t have any experience with ODK Collect so i can t help you with this .", "As Alain states it seems to be a limitation of that software .", "Most server-side frameworks allow for displaying arbitrary HTML content in labels and hints .", "@PabloVenturino As Alain said it definitely depends on the implementation .", "XForms itself allows rich inline formatting within labels help hint and alert elements .", "ODK Collect doesn t have rich formatting but you can use images http : opendatakit.org help image-based-forms .", "I put together a text renderer http : bit.ly Nx17yR that allows you to format your text with pango markup if that s any help .", "In the xform xml i want to parse xml and access the id of node .", "It s the xform xml and i want to access the id of node test geopoint id test geopoint .", "But the node name will-change for each xform xml .", "i tried the code like this but not access the id of node after the instance . .. . .. . How can retrieve id of node next to instance in php", "Please post a working code to get an answer here .", "You need How can retrieve id of node next to instance in php", "but there are other issues with this code .", "No there is a false understanding .", "Working code is different finding a solution to develop a code is different .", "You are wrapping up one or more questions and bugs by asking one question .", "You need answer for number 5 on scale of 10 but u didn t solve 1 2 3 and 4 this is wat i try to mean .", "Hope you didn t try the foreach with if condition .", "Don t know xform xml-parsing .", "I tried sample xml and get the id of node like that method .", "But in this its not working .", "What you mean by one or more questions and bugs", "The below example is the same as you expecting use it the same way I have accessed the name in a array .", "You are suppose to mention as instanceId", "so the key is your id.. .", "You can also use next to avoid nested foreach .. .", "I added this in xml and parsed but id not accessed ." ] }
{ "confidence": [ 69.81041717529297, 43.54290008544922, 13.42834758758545, 13.42834758758545, 13.069106101989746, 12.783472061157227, 12.434815406799316 ], "content": [ "Question : What is the way to go to validate a JavaRosa https : bitbucket.org javarosa javarosa wiki Home xml file Is there an official XSD or DTD .. . Answer : For XForms itself you can use W3C s XForms-11-Schema.xsd http : www.w3.org MarkUp Forms 2007 XForms-11-Schema.xsd . For JavaRosa form submissions you can use their OpenRosaMetaDataSchema https : bitbucket.org javarosa javarosa wiki OpenRosaMetaDataSchema : .. . .. . There are two types of metadata in a form submission . The first provides metadata about the identity and version of the XForm used to create the data being submitted . The second captures useful information about the submission itself . Comment : This looks like a proposal I have not seen xml files using such a structure so far no http : openrosa.org xforms is it used by some project Will there be conflicts with JavaRosa additions and the XForms XSD Comment : There is more about this here : groups.google.com forum msg open-web-discuss Bu0HeJxzQ-Q https : groups.google.com forum msg open-web-discuss Bu0HeJxzQ-Q ESUwyrJujeMJ", "Question : We are developing an XForms-based survey system . The client wants to add rich-formatting to labels and hints . Is this possible If so how do you define formatting on the XForm xml Is there a reference page that I can go to UPDATE : We re currently implementing for ODK which uses JavaRosa . We re planning to launch our own mobile-application later keeping compatibility with the current ODK Collect application . UPDATE 2 : Our client would actually like to have a label in the form of : .. . .. . The quick brown fox jumped over the lazy dog . Comment : Which XForms engine are you planning to use I suppose that your question aims at an implementation-specific issue . If you re using a server-side solution it s likely that you can use standard CSS to style the labels and hints . Comment : @tohuwawohu right I forgot . We re currently using ODK Collect as client which uses JavaRosa . We plan to develop our own compatible HTML5 client on the future . Comment : This seems to be an ODK limitation because other XForms implementations such as mine XSLTForms allow html elements with styling for labels or hints . Comment : @PabloVenturino : sorry i don t have any experience with ODK Collect so i can t help you with this . As Alain states it seems to be a limitation of that software . Most server-side frameworks allow for displaying arbitrary HTML content in labels and hints . Comment : @PabloVenturino As Alain said it definitely depends on the implementation . XForms itself allows rich inline formatting within labels help hint and alert elements . .. . Answer : ODK Collect doesn t have rich formatting but you can use images http : opendatakit.org help image-based-forms . I put together a text renderer http : bit.ly Nx17yR that allows you to format your text with pango markup if that s any help .", "Question : null .. . Answer : Since odk collect uses utf-8 the language that i would like the questions of the form to be in would be displayed one character at a time vs . conjoined . instead of displaying text for the question i want the question to display an image which will be on the question text formatted properly . Is there anyway this can be done are there any good tutorials or information out there that can help me accomplish this the bolded code did not work .", "Question : I am trying to retrieve the innerTexts of a repeated group but I am unable to retrieve the appearance attribute or the hint . The other two hint tags i can retrieve . Any pointers .. . Answer : Not sure what you mean with retrieve the innerTexts but maybe the following clarifies the issue you re experiencing . The appearance is only supported as an attribute on form-control elements and group elements . See also http : opendatakit.github.io odk-xform-spec though admittedly appearance attributes are not well covered there . I don t think the hint element is supported as a child of the group element . It is only supported as a child of form-control elements . Comment : Not the answer I wanted but it was the one that I had begun to expect .", "Question : I have an xform document .. . .. . I would like to select the data element from the xform using xpath and jdom .. . .. . seems to work fine and selects the title element but .. . .. . does not select the model element . I guess it has something to do with the namespace . Comment : It looks like the default namespace problem . Does this answer help : stackoverflow.com a 6390494 10098 http : stackoverflow.com a 6390494 10098 BTW your default namespace is probably wrong it should be w3.org 2002 xforms http : www.w3.org 2002 xforms if I m not mistaken Comment : this seems to do the tick . XPath xpath XPath.newInstance h : model tanx @wds for the link . .. . Answer : A few things . You really should be using JDOM 2.0.x .. . 2.0.5 is latest release . The XPath API in the 2.0.x versions is far better than the one in JDOM 1.x : see https : github.com hunterhacker jdom wiki JDOM2-Feature-XPath-Upgrade .. . .. . @wds is right about not having the correct namespace for the xforms elements too... . and that is why you XPath is working because it has the same namespace as the xhtml elements with the h prefix . Your code is likely to be broken still . Namespaces in XPaths often confuse people because every namespace in an XPath has to have a prefix . Even if something is the default namespace in the XML no prefix like your model element it has to have one in the XPath . queries with no prefix in the XPath always reference the no namespace namespace... . XPath specification : http : www.w3.org TR xpath node-tests .. . .. . A QName in the node test is expanded into an expanded-name using the namespace declarations from the expression context . This is the same way expansion is done for element type names in start and end-tags except that the default namespace declared with xmlns is not used : if the QName does not have a prefix then the namespace URI is null this is the same way attribute names are expanded . It is an error if the QName has a prefix for which there is no namespace declaration in the expression context .. . .. . Assuming @wds is correct and the namespace for the model element is supposed to be http : www.w3.org 2002 xforms then your namespace delcaration in your document should be xmlns http : www.w3.org 2002 xforms . But this namespace is the default namespace and the URI for the no-prefix namespace in your XPath query is . To access the http : www.w3.org 2002 xforms namespace in your XPath you have to give it a prefix fo the context of the XPath let s say xpns for xpath namespace . In JDOM 1.x you add that namespace with : .. . .. . Note how that adds the xpns to the query . Also note that I have anchored the h : html reference to the root of the document which will improve the performance of the query evaluation . IN JDOM 2.x the XPath API is significanty better even though in some cases it may seem overkill . See more about the new XPath API in the JDOM 2.x javadoc : XPathFactory.compile .. . javadoc http : www.jdom.org docs apidocs org jdom2 xpath XPathFactory.html compile 28java.lang.String 20org.jdom2.filter.Filter 20java.util.Map 20org.jdom2.Namespace.. . 29", "Question : In the xform xml i want to parse xml and access the id of node . It s the xform xml and i want to access the id of node test geopoint id test geopoint . But the node name will-change for each xform xml . i tried the code like this but not access the id of node after the instance . .. . .. . How can retrieve id of node next to instance in php Comment : Please post a working code to get an answer here . You need How can retrieve id of node next to instance in php but there are other issues with this code . However here is the solution you can run the movies in a foreach and set if condition for id and can get data . Comment : No there is a false understanding . Working code is different finding a solution to develop a code is different . You are wrapping up one or more questions and bugs by asking one question . You need answer for number 5 on scale of 10 but u didn t solve 1 2 3 and 4 this is wat i try to mean . Hope you didn t try the foreach with if condition . Comment : Don t know xform xml-parsing . I tried sample xml and get the id of node like that method . But in this its not working . Comment : What you mean by one or more questions and bugs .. . Answer : The default namespace is http : www.w3.org 2002 xforms so every unprefixed element descendant of html is in that namespace including your instance data . Try adding an empty namespace xmlns to your instance data.. . Comment : I added this in xml and parsed but id not accessed .", "Question : In the xform xml i want to parse xml and access the id of node . It s the xform xml and i want to access the id of node test geopoint id test geopoint . But the node name will-change for each xform xml . i tried the code like this but not access the id of node after the instance . .. . .. . How can retrieve id of node next to instance in php Comment : Please post a working code to get an answer here . You need How can retrieve id of node next to instance in php but there are other issues with this code . However here is the solution you can run the movies in a foreach and set if condition for id and can get data . Comment : No there is a false understanding . Working code is different finding a solution to develop a code is different . You are wrapping up one or more questions and bugs by asking one question . You need answer for number 5 on scale of 10 but u didn t solve 1 2 3 and 4 this is wat i try to mean . Hope you didn t try the foreach with if condition . Comment : Don t know xform xml-parsing . I tried sample xml and get the id of node like that method . But in this its not working . Comment : What you mean by one or more questions and bugs .. . Answer : The below example is the same as you expecting use it the same way I have accessed the name in a array . You are suppose to mention as instanceId Comment : I need the id of a node not the data between the nodes . Comment : so the key is your id.. . Comment : You can also use next to avoid nested foreach .. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mobile-devices
UNK_RELATION
android-emulator@android@120
android-emulator -- an android-emulator is software which simulates the functionality of an android device running the @placeholder os .
{ "confidence": [ 57.252410888671875, 57.08938217163086, 55.802799224853516, 54.043983459472656, 52.85086441040039, 52.339046478271484, 52.264400482177734, 52.254520416259766, 50.58906936645508, 50.15471649169922, 50.0186767578125, 49.67912292480469, 49.67912292480469, 48.805641174316406, 48.5287971496582, 48.491580963134766, 48.491580963134766, 48.491580963134766, 48.443359375, 48.443359375, 48.443359375, 48.443359375, 47.46051025390625, 47.46051025390625, 47.46051025390625, 47.46051025390625, 47.35602951049805, 47.26392364501953, 47.17055892944336, 47.06618118286133, 47.06618118286133, 46.98827362060547, 46.98827362060547, 46.90919876098633, 46.90919876098633, 46.90919876098633, 46.614200592041016, 46.4007682800293, 46.232852935791016, 46.22474670410156, 46.22474670410156, 46.22474670410156, 46.139488220214844, 46.139488220214844, 45.95720291137695, 45.87812805175781, 45.72737503051758, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.5119743347168, 45.36969757080078, 45.2201042175293, 45.216976165771484, 45.216976165771484, 45.0903434753418, 44.91828918457031, 44.903724670410156, 44.903724670410156, 44.903724670410156, 44.87126159667969, 44.7751350402832, 44.7751350402832, 44.7751350402832, 44.721439361572266, 44.721439361572266, 44.721439361572266, 44.69175338745117, 44.68273162841797, 44.642364501953125, 44.602317810058594, 44.593563079833984, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.48090362548828, 44.133934020996094, 44.133934020996094, 44.133934020996094, 44.133934020996094, 44.02168273925781, 43.895416259765625, 43.81529235839844, 43.682525634765625, 43.635498046875, 43.4541130065918, 43.38511276245117, 43.38511276245117, 43.366554260253906, 43.36101531982422 ], "content": [ "I have Firefox OS on android-emulator .", "Running emulator for Android 2.1 .", "The emulator uses an Android OS image to boot .", "Is there any similar functionality in the Android emulator", "Somehow android-emulator doesn t like 32-bit OS .", "android-gps-emulator http : dpdearing.github.io android-gps-emulator img android-gps-emulator-cropped.png", "Restart the Android Emulator .", "The emulator is running Android 6.0 API23 .", "I am running Android CTS Android Test Plan on an emulator running on Android 2.2 .", "Ubuntu Android Emulator Problem Solved .. . .. . The issue with android-emulator is not the hardware drivers .", "for android-studio users : .. . .. . run the emulator .. . .. . Then go to Tools - Android - Android device monitor .. . .. . open the Emulator Control Tab and use the location controls group .", "Android emulator is dead slow .", "The Android Market is not available for the emulator .", "I am running this in an Android 4.1 emulator .", "When Device Power On reboot the Android OS .", "Tested on Android Emulator 3.0 and higher .", "Having the AVD android-emulator : .. . .. . 1 .", "Android Emulator http : i.stack.imgur.com FIw9A.jpg", "The Android emulator is a bit sluggish .", "is not working for Android wear emulator. .", "Enjoy the ANDROID PROGRAMMING WITH THE EMULATOR .", "This is a bug in android-emulator .", "Android emulator with save snapshot feature .", "Install Android x86 on the emulator run it .", "That is not applicable to Visual Studio Emulator for Android .", "What s android version of your emulator", "This is a bug with the Android emulator running 2.3.x .", "I don t use any Android device and test everything on emulator AVD .", "Enable Snapshots : stackoverflow.com questions 1554099 slow-android-emulator http : stackoverflow.com questions 1554099 slow-android-emulator", "After this I started Android Emulator and bang.. .", "How to set Internet options for Android emulator", "Then run the emulator as C : prg Android android-sdk tools emulator.exe .", "I am trying to install busybox on android-emulator android 2.3.3 .", "It doesn t work on Android emulator 2.3.3 but works on emulator 4.1.2 for me .", "Whenever I call this method in the Android emulator : .. . .. . The emulator hangs .", "Genymotion is an free emulator that blows the stock android-emulator out of the water .", "The Android Emulator Plugin automatically starts an emulator with the following configuration : .. . .. .", "What is the best way to detect when an Android application is running in the emulator", "Using an emulated Android 4.3 device connected to a Wear emulator is not supported at this time .", "These appear to be bugs in the Android 4.4 emulator .", "Not be able to launch emulator in Android Studio .", "It seems that there are no problems with android-studio or emulator .", "Visual Studio Emulator for Android https : www.visualstudio.com en-us msft-android-emulator-vs.aspx", "It s proving quite difficult Android emulator laggy on Mac http : stackoverflow.com questions 7946345 android-emulator-laggy-on-mac .", "How can I install android market and other apk s on the android-emulator .", "Is there a way to connect the JB 4.3 emulator and Android Wear emulator for app development", "Building Android from source - emulator and AVDs http : stackoverflow.com questions 6871389 building-android-from-source-emulator-and-avds Running emulator after building Android from source http : stackoverflow.com questions 9022750 running-emulator-after-building-android-from-source How to compile android goldfish 3.4 kernel and run on emulator http : stackoverflow.com questions 21274910 how-to-compile-android-goldfish-3-4-kernel-and-run-on-emulator .", "I have a program working in the Android Emulator .", "That s my test on Eclipse Android API17 emulator .", "Is there a way to simulate install an android update within the emulator", "The android-emulator can even use the host gpu .", "It was much faster than the standard Android emulator though", "It s way faster than the android-studio emulator .", "Android emulator not working after HAXM upgrade .. . .. . Log :", "The Emulator is installed from Eclipse or Android Studio", "Yes the problem still exists in Android 4.4.2 emulator .", "Android L emulator also has this problem .", "I want to call the service from an app running in the Android emulator .", "I m reading this article here about running traceview on your android app : https : developer.android.com studio profile traceview.html I assume the emulator they are talking about is the android-emulator not the Genymotion emulator which is the one I m using .", "As in your case this happened to me with an Android 2.2 emulator .", "I am using android-emulator-plugin .", "If you re using Android Studio 1.3 : .. . .. . Click on Menu Tools .. . Android .. . Android device monitor .. . click on your current Emulator .. . Tab Emulator Control .. . go to Location Controls and enter Lat and Lon", "It worked for both my phone and Android Studio but it doesn t do any for Droidbox emulator which uses emulator from android-sdk-linux tools folder .", "Now I would like to run some JUnit tests in the android-emulator and added the Android emulator plugin .", "Possible duplicate of Slow Android emulator http : stackoverflow.com questions 1554099 slow-android-emulator .", "android-emulator forever launching http : stackoverflow.com questions 19822853 android-emulator-forever-launching", "Here are some tips to speed up the Android emulator : How to speed up the Android Emulator by up to 400 http : www.nuxeo.com blog speeding-up-the-android-emulator .", "What version of android is your emulator", "This isn t emulator specific but for Android in general .", "There s one Intel emulator for Android", "Note the paramater Files Android android-sdk tools emulator-arm.exe .", "We re testing our android applications using TestComplete and an android-emulator .", "Are you using Android Emulator or Android Virtual Machine hosted on VirtualBox", "and is there any version of android-emulator which runs fast mine is very slow", "I am using Android studio 2.1.2 on windows-10 x64bit machine and android-studio emulator is not running at all .", "My emulator is at android out host linux-x86 bin emulator .", "I was unable to get a GPS fix on the emulator when emulator was running Android image without Google APIs .", "Which android OS version are you trying to use", "1.Get a market enabled rooted android-emulator .", "For the moment I m testing the app using android-emulator .", "For android-studio emulator the AMD processor is supported or not", "It s much faster than the Google Android emulator .", "Windows Android Emulator http : windowsandroid.en.softonic.com download .. . .. . 6 .", "On my macbook the Android emulator is so slow that it is unusable .", "Steps to disable Internet in the Android emulator : .. . .. . 1 .", "I m trying to launch Android 4.0.3 emulator - useless .", "I ran into the same issue when using the emulator running Android 5.0.1 .", "I need to take screenshots of an android application running on an emulator in Eclipse Galileo .", "This is the scenario : .. . I am running an app on a android-emulator instance on Ubuntu 14.04 .", "I had this problem in the Genymotion emulator running android 4.3 .", "I am using IBM Worklight Studio 6.2.0.01-20141027-1531 and Android emulator os level 4.4.2 .", "questions 13581548 android-how-to-create-android-emulator-for-nexus10 6 answers .. . .. . I know this question is a duplicate to the following .. . .. . Android : How to Create Android Emulator for Nexus10", "You can save the state of the emulator http : good-android-dev.blogspot.com 2011 02 slow-android-emulator-speed-up-it.html make an image of the emulator and avoid booting when you start the emulator .", "I am not using android-studio emulator its visual-studio emulator for android which is 1000 times faster even faster than genymotion .", "I referred these links .. . .. . Android Galaxy S4 Emulator Not Opening http : stackoverflow.com questions 16978179 android-galaxy-s4-emulator-not-opening .. . .. . How to test android app in Galaxy S4 configuration using emulator", "http : stackoverflow.com questions 1554099 why-is-the-android-emulator-so-slow-how-can-we-speed-up-the-android-emulator", "If you absolutely cannot use a physical Android device what you can do is run the Android OS on Virtualbox and then get the IP address of the emulated Android .", "Download Android 5.1.1 API 22 in your Android SDK Manager and when you create a new Android Virtual Device select that as your OS .", "I have tried the Android 2.2 emulator 1.5 emulator and my phone an HTC Incredible running Froyo .", "When I run my Trigger.IO app in the Android emulator Trigger.IO automatically creates an Android virtual device using the Android 2.2 target ." ] }
{ "confidence": [ 62.26875686645508, 61.900146484375, 61.38945388793945, 60.71297836303711, 59.934810638427734, 59.90861892700195, 59.90861892700195, 59.741397857666016, 59.47969436645508, 59.46906280517578, 59.443241119384766, 59.26506423950195, 58.955936431884766, 58.91083908081055, 58.7408447265625, 58.730281829833984, 58.49357223510742, 58.26823806762695, 58.26823806762695, 58.23486328125 ], "content": [ "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : One common one sems to be Build.FINGERPRINT.startsWith generic Comment : contains rather than startsWith works on x86 too Comment : Please state whether a fingerprint containing generic is either an emulator or the device . That information is key but not provided . Comment : Emulator - judging by the comments before yours : Comment : This returns true on my devices running CyanogenMod so beware . Comment : The Android documentation https : developer.android.com reference android os Build.html FINGERPRINT says you shouldn t try to interpret the FINGERPRINT value .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : This code works for me .. . .. . In case that device does not have sim-card It retuns empty string : .. . .. . Since Android emulator always retuns Android as network operator I use above code . Comment : What does a device without a SIM card such as a tablet return Comment : Running emulator for Android 2.1 . This code was working for me but since upgrading Cordova to 2.7.0 the Context variable appears to be undefined or something . Here s the error I m getting in ADT : Context cannot be resolved to a variable . Also according to comment above this is NOT a reliable method though I haven t actually had it fail myself . Comment : @rds Devices which does not have a SIM card returns empty string", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : I believe my answer is the most complete here and should be the selected one . Most reliable solution to me looks like is this : https : github.com gingo android-emulator-detector .. . .. . I took his code and improved it . upd : added droid 4x detetion . This method successfully detects droid4x genymotion and the default android-studio emulator . Heres the method that detects :", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : I ve collected all the answers on this question and came up with function to detect if Android is running on a vm emulator : .. . .. . .. . .. . Tested on Emulator Genymotion and Bluestacks 1 October 2015 .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : How about something like the code below to tell if your app was signed with the debug key it s not detecting the emulator but it might work for your purpose Comment : Thank you for this code . I have checked and it is working aldo coping the long debug key can be painful but it is done only once . This is the only reliable solution as all other answers compare some part of the OS build info string with a static string and this can and was changed over Android SDK versions and also can be forged by custom Android builds . Comment : I think it is the only reliable solution . However the debug key can change more quickly than we want .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : use this function : Comment : What s the purpose of boolean is false Comment : @Pedro Lobito nothig removed it .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : You may check if deviceId IMEI is 000000000000000 15 zeroes", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : The above suggested solution to check for the ANDROID ID worked for me until I updated today to the latest SDK tools released with Android 2.2 . Therefore I currently switched to the following solution which works so far with the disadvantage however that you need to put the PHONE STATE read permission uses-permission android : name android.permission.READ PHONE STATE", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : Put a file in the file system of the emulator since the file won t exist on the real device this should be stable reliable and easy to fix when it breaks .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : This should return true if the app is running on an emulator . What we should be careful about is not detecting all the emulators because there are only several different emulators . It is easy to check . We have to make sure that actual devices are not detected as an emulator . I used the app called Android Device Info Share https : play.google.com store apps details id com.itog lab.android.adis to check this . On this app you can see various kinds of information of many devices probably most devices in the world if the device you are using is missing from the list it will be added automatically . Comment : On my Genymotion running on a mac Build.DEVICE vbox86p", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : Don t know if there are better ways to detect the emu but the emulator will have the file init.goldfish.rc in the root-directory . It s the emulator specific startup-script and it shouldn t be there on a non-emulator build . Comment : This file is on my HTC One so it doesn t work -", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : All BUILD references are build.prop values so you have to consider that if you are going to put this into release code you may have some users with root that have modified theirs for whatever reason . There are virtually no modifications that require using generic as the brand unless specifically trying to emulate the emulator . Fingerprint is the build compile and kernel compile signature . There are builds that use generic usually directly sourced from Google . On a device that has been modified the IMEI has a possibility of being zeroed out as well so that is unreliable unless you are blocking modified devices altogether . Goldfish is the base android build that all other devices are extended from . EVERY Android device has an init.goldfish.rc unless hacked and removed for unknown reasons .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : From Battery the emulator : Power source is always AC Charger . Temperature is always 0 . And you can use Build.HOST to record host value different emulator has different host value .", "Question : I am using the android-emulator to run my programs . But its really slow . It takes around 90 seconds to startup and show the home screen . Can I tweak it so that I can reduce this time considerably Thanks Comment : Enable Snapshots : stackoverflow.com questions 1554099 slow-android-emulator http : stackoverflow.com questions 1554099 slow-android-emulator .. . Answer : If you absolutely cannot use a physical Android device what you can do is run the Android OS on Virtualbox and then get the IP address of the emulated Android . Then you d connect ADB to the emulator using that IP address . That s the jist of it . I ve written a more detailed guide to this approach on my blog . http : www.bobbychanblog.com 2011 07 faster-android-emulator-alternative-using-virtualbox", "Question : When I switch to landscape mode NUMPAD 7 or CTRL+F11 the emulator rotates the screen to landscape orientation but the Android OS and none of the apps rotate . So everything is sitting sideways . Is there something in the AVD configuration that needs to be set in order for the device to rotate properly enter image description here http : i.stack.imgur.com owgJF.jpg Comment : Wow i ve never seen that before...is your program still running in the background Comment : I believe it s a bug with 2.3 + emulator . Try 2.2 . Comment : As that s on the home screen that s exactly what I d expect to see . I don t use the emulator but my HTC Desire doesn t switch orientation on any of the home screens when I rotate . Comment : It doesn t rotate for the home screen or any app or menu etc . It appears to only do this for the Google APIs Google Inc . 2.3.3 API Level-10 AVD . The normal Android 2.3.3 seems to rotate as expected . Not sure if this is a bug or what . Comment : I have the same problem with Android 4.1 Google emulator . Switching keyboard off does not help . .. . Answer : It is a bug with the 2.3 and 4.4 emulators . http : code.google.com p android issues detail id 13189 v2.3 https : code.google.com p android issues detail id 61671 v4.4 Comment : The problem still happens w the Android 4.4 emulator for me as well . Someone else reported it in that thread too : -P Comment : Yes the problem still exists in Android 4.4.2 emulator . It simply rotates the screen and does not display the corresponding layout file under the corresponding res layout folder . I have verified this by running in a nexus device where it works as expected . Comment : Android L emulator also has this problem . Comment : As a workaround disable the Hardware keyboard present checkbox in the Edit Android Virtual Device AVD window as @cprcrack sais in stackoverflow.com a 16121394 327786 http : stackoverflow.com a 16121394 327786", "Question : Obviously there will be minor differences between the emulator and hardware but I m running across major issues and wondering if others have found any solutions . I have an .apk of my application which loads and starts fine on the 2 pieces of hardware I have on hand both OS 4.1.2 . It then freezes up on a screen switch inside the application . This has happened before and it was due to that exact version of the OS having a particular bug which should be worked around . Anyways those details are not terribly important that s simply how I got to thinking I d test other versions via the emulator . However here s what I hit : .. . .. . Newer versions 5+ of the OS have an Intel option and my .apk crashes immediately on start on those versions . Newer versions 5+ the Google version and 4.x generic including the very same 4.1.2 I have on 2 hardware devices starts my .apk fine except that all the graphics are missing No difference between architectures on any given OS class 32 64 bit mips arm .. . .. . What s the difference between Intel and Google versions of Android that would cause such a huge difference Also why does my app have graphics on hardware but graphics vanish on the very same OS on the emulator Are there options I need to change somewhere .. . Answer : 1 . First update your SDK . 2 . Then install emulator system image you need . In SDK Manager you can find that Intel ARM Android images start from 4.0.3 . Google Intel ARM start from 4.4.2 instead . 3 . Make sure you have hardware virtualization enabled in PC BIOS because Intel images need that and they are much faster for that . 4 . Try to reinstall Intel HAXM . You can find setup in Android SDK Path extras intel Hardware Accelerated Execution Manager .. . .. . Intel ARM images use different CPU architecture . Instead Google Android images have only a different software configuration . Google images include Google services like Play Maps ecc . Android images haven t them", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : Both the following are set to google sdk : .. . .. . So it should be enough to use either one of the following lines . or Comment : It s egal to sdk not google sdk on my version Comment : When running the x86 emulator on Windows Build.Product is sdk x86 .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : I never found a good way to tell if you re in the emulator . but if you just need to detecet if you re in a development-environment you can do this : .. . .. . Hope this help... .", "Question : I would like to have my code run slightly differently when running on the emulator than when running on a device . For example using 10.0.2.2 instead of a public URL to run against a development server automatically . What is the best way to detect when an Android application is running in the emulator Comment : Might have a look at android.os.Build http : developer.android.com reference android os Build.html . Comment : Amaze me.. . Google should have a standard way of doing this Comment : @yanchenko a followed your link ctrl+f emulator zero hits . .. . Answer : Whichever code you use to do emulator detection I d highly recommend writing unit tests to cover all the Build.FINGERPRINT Build.HARDWARE and Build.MANUFACTURER values that you are depending on . Here are some example tests : .. . .. . ...and here s our code debug logs and comments removed for conciseness :", "Question : I recently discovered that the Android 2.0 SDK supports multitouch through new functions in the MotionEvent class . You can specify a pointer index when retrieving touch properties and in cases where multiple fingers are on the screen there should be multiple pointers provided . Unfortunately I only have a G1 to test on and it s running Android 1.5 and not 2.0 . Is there any way to test multitouch without a 2.0 device In the iPhone simulator you can hold down option and shift option to perform two fingered pinch and two fingered drag respectively . Is there any similar functionality in the Android emulator Is it something I should expect to see in the future or should I just suck it up and buy a new test phone Comment : Just to add : I got my hands on a Nexus One and it looks like you can only track two fingers using the current implementation . I only get 2 pointers even if more fingers are on the screen . .. . Answer : Yeah I don t believe the emulator has that same shortcut that the iphone one . In order to have true multi-touch support for the emulator your Hardware must support it HP TouchSmart . . etc . your OS must support it Windows 7 etc.. . and Java must support it and finally the emulator that Google provides in the SDK must support it . So you would need to have specific hardware the OS support is there but I don t believe java and emulator support is there . I think you just need to get a 2.0 device . It seems like the most appropriate and cheapest solution is . Also the emulator really is not that great to slow compared to an actually device especially on user input . All touch stuff should be developed and tested on an actual device . Use the emulator for automatic testing and layouts that are not supported by your physical test device ." ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
unordered-map@key-value@93
unordered-map -- is a c++ class that is an associative container storing a combination of a @placeholder and a mapped value allowing for quick retrieval of elements based on their keys .
{ "confidence": [ 47.49166488647461, 45.20036697387695, 41.95698928833008, 38.44816970825195, 38.182071685791016, 37.98635482788086, 37.920188903808594, 37.920188903808594, 33.99374771118164, 33.747108459472656, 33.637943267822266, 33.60552215576172, 33.36583709716797, 32.25225830078125, 32.22050857543945, 32.1932258605957, 31.874963760375977, 31.761489868164062, 31.761489868164062, 31.753826141357422, 31.667903900146484, 31.660446166992188, 31.309354782104492, 31.013835906982422, 30.795570373535156, 30.723068237304688, 30.558013916015625, 30.31313705444336, 30.31313705444336, 30.16550064086914, 30.049856185913086, 29.91452407836914, 29.7927303314209, 29.701171875, 29.590839385986328, 29.512195587158203, 29.416954040527344, 29.2408447265625, 29.194252014160156, 29.194252014160156, 28.753677368164062, 28.715591430664062, 28.34069061279297, 28.293502807617188, 28.252666473388672, 28.252666473388672, 28.252666473388672, 28.069293975830078, 28.04401397705078, 28.032182693481445, 27.88124656677246, 27.844804763793945, 27.773820877075195, 27.77370834350586, 27.497055053710938, 27.404407501220703, 27.394451141357422, 27.39006233215332, 27.39006233215332, 27.372379302978516, 27.33570098876953, 27.33570098876953, 27.294523239135742, 26.97598648071289, 26.930492401123047, 26.925891876220703, 26.778614044189453, 26.714021682739258, 26.704750061035156, 26.704750061035156, 26.596691131591797, 26.579727172851562, 26.548620223999023, 26.51468276977539, 26.46784210205078, 26.44802474975586, 26.285259246826172, 26.273258209228516, 26.239055633544922, 26.225208282470703, 26.10248565673828, 26.047821044921875, 26.045757293701172, 26.01671600341797, 25.856441497802734, 25.8550968170166, 25.8303165435791, 25.804664611816406, 25.7999267578125, 25.7999267578125, 25.7999267578125, 25.7999267578125, 25.69143295288086, 25.58422088623047, 25.560089111328125, 25.53438949584961, 25.525897979736328, 25.525897979736328, 25.525897979736328 ], "content": [ "Cppreference claims .. . .. . Unordered map is an associative container that contains key-value pairs with unique keys .", "Cppreference http : en.cppreference.com w cpp container unordered-map claims .. . .. . Unordered map is an associative container that contains key-value pairs with unique keys .", "Specifically the standard requires 23.2.5 9 : .. . .. . The elements of an unordered associative container are organized into buckets .", "The 2011 standard says 23.2.5 para 8 The elements of an unordered associative container are organized into buckets .", "I was writing wrapper methods for Boost unordered-map container .", "All the associative containers ordered or unordered either require unique keys or group equivalent keys together .", "Consider the ordered and unordered associative containers in C++ keyed on double .", "Consider the ordered and unordered associative containers in C++ keyed on double .", "If you need to preserve those elements then std : : map is not the right container .", "Note the component name Unordered map .", "Looking at the http : www.cplusplus.com reference unordered-map unordered-map it says Unique keys No two elements in the container can have equivalent keys .", "That doesn t work with any associative container .", "See this answer : stackoverflow.com questions 17016175 http : stackoverflow.com questions 17016175 c-unordered-map-using-a-custom-class-type-as-the-key", "Cant a bad hash-function makes unordered-map slower than map", "The problem is that unordered-set is not built for being used as a key in an unordered container .", "The chosen alternate name is unordered-map which really is more descriptive as it hints at the class s map interface and the unordered nature of its elements .", "In a C++ program with Boost I am trying to build an unordered-map whose keys are tuples of doubles : .. . .. . Initializing the map completes OK however when I try to populate it with keys and values .. . .. . I encounter the following error message : .. . .. . I presume this is because I need to specify a hash-function for the tuple keys .", "You can t assume anything about the ordering in an unordered-map .", "why on earth you would like to ordering an unordered-map", "You could use the following code : .. . .. . It will move the unordered-set into the unordered-map .", "An unordered-map is a hash container that is the keys are hashed .", "From the documentation of emplace : .. . .. . The insertion only takes place if no other element in the container has a key equivalent to the one being emplaced keys in a map container are unique .", "No two elements in the container can have equivalent keys is a condition on Pred parameter of unordered-map .", "Building an unordered-map with tuples as keys http : stackoverflow.com questions 3611951 building-an-unordered-map-with-tuples-as-keys Matthieu M . shows how to automate this for boost : : tuple .", "If you know that the key is in the map you can utilize operator which returns a reference to the mapped value .", ".. . as the map is well unordered .", "I d be very grateful for comments on how other languages handle floating-point keys in associative containers .. . .. . A few quick experiments in Python where set and dict are unordered associative containers which hold keys and values by reference suggest that NaNs are treated as objects that are unequal in value even if they re the same NaN but the same nan object can be found again by identity .", "I don t know if this will be faster than unordered-map .", "The solution here is to have an unordered-map to a pointer :", "unordered-map doesnt compile if I dont provide one .", "Conclusion : .. . .. . Realizing your search requirements in an algorithm operating on an associative container is impossible .", "Because map excludes duplicate keys I suppose.. .", "The 2 associative container are the same I can see rehash function and the same constructor for controlling the number of buckets but not a function about a number of elements .", "Are they really unordered", "The associative containers set map and their undorderd and or multi variants do not preserve the order .", "Sparse hash is 2 times slower than unordered-map for a map to int to int .", "However avoid this for hashing unordered containers as different orders will produce different hashes and the order in unordered container is not guaranteed .", "My unordered-map definition : .. . .. . I ve looked at the unordered-map : : emplace documentation http : en.cppreference.com w cpp container unordered-map emplace according to this the first element in the pair should be the shared-ptr Component but the compiler is just not happy .", "If k does not match the key of any element in the container the function inserts a new element with that key and returns a reference to its mapped value .", "Notice that this always increases the container size by one even if no mapped value is assigned to the element the element is constructed using its default constructor .", "But they don t because the entries are unordered .", "So the operarion you are timing is storing a key-value pair in a map where the key is many mb in size", "This is also why unordered containers only support forward iterators instead of the bidirectional iterators supported by the ordered associative containers .", "@R . Martinho Fernandes : If you re still watching the docs in that page say : hash range is sensitive to the order of the elements so it wouldn t be appropriate to use this with an unordered container .", "Boost.Intrusive doesn t seem to provide any map interface ordered or unordered .", "I wanted to create a custom hash-function for an unordered-map .", "The involvement of unordered-map is almost incidental to the problem you re encountering .", "I want to achieve perfect hashing with unordered-map .", "The purpose is that the key values can be unordered .", "This is especially relevant for algorithms that insert or remove elements while iterating through a container .", "In boost Unordered Map there is a method begin which returns an iterator to the first element.Actually in my wrapper class i want to return a std : : Unordered map : : iterator instead of boost : : unordered-map : : iterator from my Begin method .", "I found this question : C++ unordered-map fail when used with a vector as key http : stackoverflow.com questions 10405030 c-unordered-map-fail-when-used-with-a-vector-as-key and found that if you use a vector as a key in an unordered-map you need to create your own hash-function .", "Hence the question - is there any real reason to use std : : map over unordered-map in case of simple types like int and std : : string", "You can try creating an ordered map using the combination of map and the vector .", "Don t forget the map s keep their elements ordered .", "I m calling unordered-map : : emplace and I am storing the returned value a pair .", "I d be very grateful for comments on how other languages handle floating-point keys in associative containers .", "The boost-serialization unordered map.hpp seems to declare and define the serialize function for the unordered-map but I guess that s not enough", "For the unordered-map however I can never retrieve an element again and all NaNs are different .", "@jonas toth From the std : : remove-if page you linked : These algorithms cannot be used with associative containers such as std : : set and std : : map because ForwardIt does not dereference to a MoveAssignable type the keys in these containers are not modifiable .", "The iterator returned points to the inserted or existing value in the map .", "it depends on how the key-value was passed to the map .", "So if you already have an element outside the associative container and want to copy it insert might be more efficient .", "This would be equivalent to unordered-map : : operator http : www.cplusplus.com reference unordered-map unordered-map operator 5B 5D : .. . .. . If k matches the key of an element in the container the function returns a reference to its mapped value .", "And here is C++ standard-library concept of Container http : en.cppreference.com w cpp concept Container .", "See en.cppreference.com w cpp container map find http : en.cppreference.com w cpp container map find .", "we know std : : unordered-map : : bucket return A bucket is a slot in the container s internal hash table to which elements are assigned based on the hash value of their key .", "This code from Generic hash for tuples in unordered-map unordered-set http : stackoverflow.com questions 7110301 generic-hash-for-tuples-in-unordered-map-unordered-set provides magical support for all c++11 tuples of standard hashable types strings ints etc .", "If not is there any way to filter my map according to two keys", "So we have a hash map with as many keys as size of the input string .", "Of course if the hash value is the same for different keys the order is undefined .", "On the GCC trunk unordered containers support C++11 allocators .", "I want to store a floating-point value for an unordered pair of an integers .", ".. . For any two keys k1 and k2 in the same container calling pred k1 k2 shall always return the same value .", "It is sometimes possible to orchestrate an unordered container with ordering by key e.g .", "With unordered containers I have no idea .", "I ve got a simple class with an unordered-map and a serialize function : .. . .. . Now I try to create a ts object and serialize it : .. . .. . This fails to compile with : .. . .. . I don t understand what I m missing here", "To be able to use std : : unordered-map or one of the other unordered associative containers with a user-defined key-type you need to define two things : .. . .. . 1 .", "And you can t modify the keys of elements in unordered-map .", "Your code allows that the following will return true : .. . .. . However your hash is based on the combination of connectId and clientId .", "It can mean either number of buckets or elements in container .", "Try using map.emplace 0 c instead to add an item in your map .", "This is because .. . .. . Like you said the weak total ordering required for std : : map is ok the equality or equivalence extra requirement for any hash-based container isn t ok to satisfy the key requirements for the hash unordered-map .. . .. . Seeing that for std : : map equivalence is when less a b less b a I d say all constraints are met .", "If the map previously contained a mapping for the key the old value is replaced .", "In order to have an unordered container with a pair you will have to provide a hash functor yourself .", "However since you are mapping from string keys to integers it might be very well that you have multiple keys with the same value .", "A container class for the standard-library ought to be able to grow as necessary when new elements are inserted up to the limit of available memory .", "I have an unordered-map string to int which uses a custom equal to function defined as : .. . .. . Basically what it does is if two keys have a hamming-distance equal or less than 8 then is the same key .", "Unordered doesn t mean that there isn t a linear sequence somewhere in the implementation .", "In an unordered data structure you can t assume anything about the order of the entries .", "Because it s unordered you need a function that s commutative .", "Of course unless there s other reasons for choosing the unordered containers .", "I have an unordered-map of Foo objects and I would like to efficiently test if the key set contains of Foo objects with a given id .", "map can be used access the elements faster .", "In C I would implement a doubly-linked list and then have a hash map pointing to elements of this doubly-linked-list .", "The elements of maps both map and unordered-map are of type using value-type std : : pair key t mapped type .", "As an hash should be unpredictable by definition you can t take any assumption about the order of the elements in the map .", "Like all the dynamic sized containers the map containers keep their elements on the dynamic memory storage the heap .", "For the same unordered-map using tr.second returns the correct number of rows but using get second returns a new map element with no elements ." ] }
{ "confidence": [ 54.81218338012695, 51.939735412597656, 51.56748962402344, 49.13266372680664, 48.633750915527344, 46.61963653564453, 46.54235076904297, 44.61552429199219, 43.92536926269531, 42.97476577758789, 42.90654754638672, 42.52925491333008, 42.507102966308594, 42.50409698486328, 42.232154846191406, 42.18781661987305, 42.096405029296875, 41.59086608886719, 41.34651565551758, 41.19908142089844 ], "content": [ "Question : I have a unordered-map that contains an enum and a string as a second . The first value may appear many times in different orders . Here s an example : .. . .. . I d like to iterate through the map as follows : For example first I d like to find the pair for TYPE1 which would net me the first TYPE1 value . After that searching for a TYPE1 value again wouldn t net me the first one but rather the next one that can be found after it . Searching for a TYPE2 value after that would only net the last value . Basically I want to find only the next matching value but none ever preceding the last found value . I tried multiple times to implement something that does this but I m not quite sure how to implement such an algorithm . How would one implement such an algorithm Full code sample that tries to demonstrate what I want : https : godbolt.org g CgNZnj Comment : FYI the key for a map has to be unique . You cannot have multiple elements with the same key . Comment : Note the component name Unordered map . The order of insertion has nothing to do with the order of traversal . Comment : You need a vector deque list forward list array of pairs . All the associative containers ordered or unordered either require unique keys or group equivalent keys together . Comment : I have a unordered-map that contains an enum and a string as a second . The first value may appear many times in different orders . No . .. . Answer : You might want a std : : unordered multimap multimap and use equal range : .. . .. . However : .. . .. . The result range is not sorted stays unordered . If you want to keep the relative order of equal keys used in initialization replace unordered multimap by multimap . If you want to keep the initialization order entirely use a sequence container std : : vector of key-value pairs . The associative containers set map and their undorderd and or multi variants do not preserve the order . Conclusion : .. . .. . Realizing your search requirements in an algorithm operating on an associative container is impossible . Comment : C++ is so wonderfully expressive . Comment : Is value-type needed here Comment : @DieterL cking In you main if you delete using value-type line and instead of std : : for each statement write for auto i range.first i range.second ++i std : : cout i- second n will output will be equivalent to what you have now Comment : It s possible to advance the iterator to the desired position using std : : advance ie . the last used value and then search using a for each loop in the desired range last used iterator pos end of the map for the desired value . This would accomplish what I aimed to achieve . Thank you for the leads .", "Question : Consider the ordered and unordered associative containers in C++ keyed on double . Is NaN a valid key type With ordered containers I should say no because it does not respect the strict weak ordering . With unordered containers I have no idea . Here s what happens in GCC 4.6.2 : .. . .. . For the ordered map I get : .. . .. . For the unordered-map I get : .. . .. . So in the ordered map all NaNs are treated the same which is what I expect although it seemed like NaN would violate the requirements . For the unordered-map however I can never retrieve an element again and all NaNs are different . This is also not what I would expect . Does the standard have to say anything on this matter Update : Thanks to the great answers below note that the std : : map will break if you insert anything else into it once a NaN is in it . I d be very grateful for comments on how other languages handle floating-point keys in associative containers . Comment : The Standard can t really have anything to say about NaNs specifically because a NaN is an IEEE concept . In other words its platform-dependant . Comment : @JohnDibling : That s a good point although the standard recognizes that numerical types may have a nan value as in limits . Comment : Consider the ordered and unordered associative containers in C++ keyed on double . Is NaN a valid key type Wrong question . The correct question is : which possible domain of the builtin less-than contains NaN .. . Answer : They are both forbidden by the standard . For the ordered associative containers the definition of strict weak order 25.4 4 says : .. . .. . If we define equiv a b as comp a b comp b a then the requirements are that comp and equiv both be transitive relations .. . equiv a b equiv b c implies equiv a c .. . .. . This fails for a 0.0 b NaN c 1.0 comp std : : less double .. . .. . For the unordered containers 23.2.5 3 says that the equality predicate Pred induces an equivalence relation on values of type Key . Equivalence relations are reflexive and std : : equal to double NaN NaN is false so equal to double is not an equivalence relation . By the way keying containers on a double is slightly scary in the same way that comparing doubles for equality is always slightly scary . You never know what you re going to get in the least significant bit . Something I ve always considered a little odd is that the standard expresses the requirements in terms of the key type not in terms of the actual key values added to the container . I believe you could choose to read this as not guaranteeing that map double int has defined behaviour at all if the implementation supports NaNs regardless of whether you actually add a NaN to an instance or not . In practice though an implementation of std : : map cannot somehow conjure a NaN out of its back pocket and try to compare it it only ever compares key values passed to the instance . So it should be OK if slightly scary provided you avoid adding NaNs . I d be very grateful for comments on how other languages handle floating-point keys in associative containers .. . .. . A few quick experiments in Python where set and dict are unordered associative containers which hold keys and values by reference suggest that NaNs are treated as objects that are unequal in value even if they re the same NaN but the same nan object can be found again by identity . As far as I ve seen the containers don t seem to be disturbed by containing multiple nans or a mixture of nans and other values : Comment : +1 for that second to last paragraph . Comment : The authoritarian tone of the answer evokes a certain accept reflex but I shall wait a bit longer : - Comment : One thing I ve left out is that if NaN is the only value that you ever add to your map then less double is a strict weak order on that value alone . It s not hard to write a function that works as a SWO on a domain of size 1 the only requirement is to return false . In fact I think it takes a NaN and two distinct normal values before it fails : with NaN and one value it should just behave as though NaN is equivalent to that value . But such maps probably aren t very interesting.. . Comment : @Steve : I think your two-element example behaves as-if NaN is equal to the other value . Neither is less than the other they are eqivalent . Which means you will never actually see the other element in the map : - Comment : @Nemo : agreed in fact I corrected the comment but I guess we crossed in the mail .", "Question : std : : unordered-map guarantees O 1 time search but how does it manage collision Cppreference http : en.cppreference.com w cpp container unordered-map claims .. . .. . Unordered map is an associative container that contains key-value pairs with unique keys . Search insertion and removal of elements have average constant-time complexity . Assuming a situation where all the Hash codes are same how is the collision handled internally My assumption would be totally wrong if the hash code is unique to every key . In that case how is the unique hash code created where there are no collisions at all What approach does std : : unordered-map s hash-function take to guarantee O 1 search Comment : The word average is important here . The unordered-map is amortized constant not constant . .. . Answer : std : : unordered-map guarantees O 1 time search but how does it manage collision It uses open addressing separate chaining see here http : stackoverflow.com a 31113618 410767 . Cppreference claims .. . .. . Unordered map is an associative container that contains key-value pairs with unique keys . Search insertion and removal of elements have average constant-time complexity . .. . Assuming a situation where all the Hash codes are same how is the collision handled internally The colliding elements are added into another container holding all values that hashed to that bucket . That container is usually a linked-list but there s nothing stopping an implementation using e.g . a binary-tree . My assumption would be totally wrong if the hash code is unique to every key . In that case how is the unique hash code created where there are no collisions at all unordered-map isn t required or expected to do anything special to avoid collisions . Hash codes being unique to every key doesn t suffice anyway as collisions can be created when hash codes are masked or mod-ed into the number of buckets . What approach does std : : unordered-map s hash-function take to guarantee O 1 search This is the crux of your misunderstanding . unordered-map has O 1 performance when the hash-function does an adequate job of hashing the keys across the buckets . It may degrade to O n if the hash-function is poor or has been deliberately targeted by a malicious input of keys known to hash to the same bucket . The Standard does not require implementations to prevent that but users can supply a cryptographic hash pick a hash-function from a family at runtime or otherwise make it impractical for a malicious user - or similar inputs generally - to create many more collisions . Comment : if it uses a binary-tree it would nOt be any different than std : : map ordered as this uses binary-tree which guarantees o log n and i this is the major difference between ordered map and unordered-map Link List with amortized constant-time and O Log n . correct me if iam wrong Comment : @user2256825 : correction coming up - - unordered-map may use a list or binary-tree for values hashing to the same bucket - that shouldn t be confused with a map that only has a binary-tree and not the hash table buckets step . You might find my answer here http : stackoverflow.com a 30567466 410767 useful as it illustrates the division between the hash table and the logical container it illustrates a linked-list storing possible multiple colliding elements at each bucket . Comment : Can you elaborate please : Comment : @user2256825 : was that request from before or after I mentioned my linked answer Comment : @user2256825 it doesn t need to use both and in practice all C++ implementations I ve looked at use linked lists but there s nothing in the Standard requiring that . FWIW some Java implementations use trees . Re as per my comment above - what did I say that caused this confusion I ve reread what I ve written above and couldn t spot anything... .", "Question : For both std : : map and std : : tr1 : : unordered-map I see from the standard that : .. . .. . References to elements in the unordered-map container remain valid in all cases even after a rehash . How are they doing that implementation-wise Are they maintaining all the entries as a kind of linked-list and then the hash-table just stores pointers to the elements .. . Answer : Yes linked lists are involved although not quite in the way you suggest . The 2011 standard says 23.2.5 para 8 The elements of an unordered associative container are organized into buckets . Keys with the same hash code appear in the same bucket . Within each bucket the elements are in a linked-list a separate list for each bucket not one big list for the whole container . When the container is rehashed the elements will be assigned to new buckets but the pointers to each element remain valid . The linked-list in each new bucket is assembled from pointers to the existing elements that end up in that bucket . Iterators are invalidated by a rehash since an iterator needs to hold pointers to both the element and its bucket so it can be stepped from the last element of one bucket to the first element of the next . The element pointer remains valid so existing pointers and references to an element are still valid but the bucket pointer is invalidated by a rehash so the iterator isn t usable . This is also why unordered containers only support forward iterators instead of the bidirectional iterators supported by the ordered associative containers . The elements of each bucket are in a singly linked-list so you can t step backwards through them . Comment : Just found this after asking a related question feel free to weigh in but I think your answer suggests that there is no risk I speak of here : stackoverflow.com questions 38314154 http : stackoverflow.com questions 38314154 risk-of-invalidation-of-stdarray-data-in-associative-container", "Question : Consider the ordered and unordered associative containers in C++ keyed on double . Is NaN a valid key type With ordered containers I should say no because it does not respect the strict weak ordering . With unordered containers I have no idea . Here s what happens in GCC 4.6.2 : .. . .. . For the ordered map I get : .. . .. . For the unordered-map I get : .. . .. . So in the ordered map all NaNs are treated the same which is what I expect although it seemed like NaN would violate the requirements . For the unordered-map however I can never retrieve an element again and all NaNs are different . This is also not what I would expect . Does the standard have to say anything on this matter Update : Thanks to the great answers below note that the std : : map will break if you insert anything else into it once a NaN is in it . I d be very grateful for comments on how other languages handle floating-point keys in associative containers . Comment : The Standard can t really have anything to say about NaNs specifically because a NaN is an IEEE concept . In other words its platform-dependant . Comment : @JohnDibling : That s a good point although the standard recognizes that numerical types may have a nan value as in limits . Comment : Consider the ordered and unordered associative containers in C++ keyed on double . Is NaN a valid key type Wrong question . The correct question is : which possible domain of the builtin less-than contains NaN .. . Answer : This is because .. . .. . Like you said the weak total ordering required for std : : map is ok the equality or equivalence extra requirement for any hash-based container isn t ok to satisfy the key requirements for the hash unordered-map .. . .. . Seeing that for std : : map equivalence is when less a b less b a I d say all constraints are met . Comment : Yes I appreciate that but is this behaviour documented or commented on somehow in the standard Also I wouldn t say that the ordering is OK since NaN does not obey a SWO : it is not one of less greater equal when compared to anything . Comment : @KerrekSB see SGI std : : map http : www.sgi.com tech stl Map.html and click through to SGI Strict Weak Ordering http : www.sgi.com tech stl StrictWeakOrdering.html 1 page Comment : The part of SWO that NaN values fail is the transitivity of equivalence . 0 NaN and NaN 0 are both false . 1 NaN and NaN 1 are both false . Therefore 0 1 and 1 0 should both be false but they aren t . Hence the map has undefined-behavior as soon as you put a NaN in it . Arguably it even has UB earlier since the standard says that the order must be a SWO on the key type not just on the key values actually added to the map but that s quite a fine point . Comment : Hmm.. . I see : Given that NaN is never less than anything those conditions are vacuously satisfied . OK that s fine . So for map double is a perfectly legitimate key type . Comment : @Steve : Yes I screwed that one up . Kerrek : Your test will fail if you try to insert anything other than a NaN into the map at this point -- it ll be treated as equivalent to the NaN and therefore won t be inserted .", "Question : There are several answers on StackOverflow that suggest that the following loop is a fine way to erase elements from a std : : unordered-map that satisfy some predicate pred : .. . .. . I m specifically interested in C++11 as opposed to C++14 and the following ominous note on cppreference.com http : en.cppreference.com w cpp container unordered-map erase suggests that the above loop depends on undefined-behavior and may not work in C++11 after all : .. . .. . The order of the elements that are not erased is preserved this makes it possible to erase individual elements while iterating through the container since C++14 .. . .. . See also Title 2356 . Stability of erasure in unordered associative containers http : wg21.cmeerw.net lwg issue2356 which contains a requested wording change to Working Draft N3797 http : www.open-std.org jtc1 sc22 wg21 docs papers 2013 n3797.pdf item 14 on page 754 the additional phrase beginning and preserve the relative order .. . . This wording is relative to N3797 . .. . Modify unord.req p14 as indicated : .. . .. . -14- The insert and emplace members shall not affect the validity of references to container elements but may invalidate all iterators to the container . The erase members shall invalidate only iterators and references to the erased elements and preserve the relative order of the elements that are not erased . If my interpretation of the note from cppreference.com is correct and the above loop depends on undefined-behavior in C++11 what s the most efficient way to solve this problem in C++11 Comment : Usually when a constraint is strengthened like that it s because all the compilers represented by committee members are already conforming . You re right to be nervous though . Comment : @MarkRansom Is there a way to be safe I.e . what s the correct way to do this under the C++11 standard Comment : I suspect there wasn t a way to be guaranteed safe thus the change to the standard . Comment : Found another SO Q A http : stackoverflow.com questions 25047241 c11-is-it-safe-to-remove-individual-elements-from-stdunordered-map-while-it rq 1 that links to Issue 2356 http : wg21.cmeerw.net lwg issue2356 which clarifies the bit about all the compilers being conforming . .. . Answer : Always consult the stl-algorithms first .. . .. . This one seems to be the wanted : http : www.cplusplus.com reference algorithm remove-if .. . .. . For an overview : http : www.cplusplus.com reference algorithm .. . .. . EDIT cppreference has an similar example at the bottom of the site . It works with a c++11 compiler . Comment : That doesn t work with any associative container . en.cppreference.com w cpp algorithm remove http : en.cppreference.com w cpp algorithm remove Comment : Similar to what What example works with C++11 compiler Comment : Or rather how do you know that it works with C++11 compiler And not that the compiler is implicitly using C++14 mode Comment : you can choose the compiler version and in parantheses is the standard . i assume this information is correct there . it works with gcc-4.8 that one has only c++11 Comment : @jonas toth From the std : : remove-if page you linked : These algorithms cannot be used with associative containers such as std : : set and std : : map because ForwardIt does not dereference to a MoveAssignable type the keys in these containers are not modifiable . ideone.com 5cWOF9 http : ideone.com 5cWOF9 vs ideone.com B7AmNf http : ideone.com B7AmNf .", "Question : I have a unordered-map string int freq and I order it transforming it into a map int string freq2 . I use the next function in order to do that : .. . .. . the size of the unordered-map is 2355831 and the returned map is 505 so as you see the loss of data is quite big and i have no idea why... . Any idea why this happens Thanks . EDIT : .. . .. . Thanks to all you are all right I have a lot of int with same value that s why i loose the data really stupid from my part to not see it before Comment : Besides ordering you re inverting the map . Now think for a moment what the implications are . And post an Minimal Complete and Verifiable example http : stackoverflow.com help mcve . Comment : Because map excludes duplicate keys I suppose.. . Comment : So you are effectively swapping keys and values . Are your values integers all unique If not you need a multimap . Comment : Because you have 505 unique integers among 2355831 . Comment : why on earth you would like to ordering an unordered-map Why no use a ordered map like std : : map .. . Answer : The code itself looks fine . However since you are mapping from string keys to integers it might be very well that you have multiple keys with the same value . From the documentation of emplace : .. . .. . The insertion only takes place if no other element in the container has a key equivalent to the one being emplaced keys in a map container are unique . So if a lot of your entries in the first map have the same value which is the key in the second map then your dataset will decrease by a lot . If you need to preserve those elements then std : : map is not the right container .", "Question : I have a unordered-map that contains an enum and a string as a second . The first value may appear many times in different orders . Here s an example : .. . .. . I d like to iterate through the map as follows : For example first I d like to find the pair for TYPE1 which would net me the first TYPE1 value . After that searching for a TYPE1 value again wouldn t net me the first one but rather the next one that can be found after it . Searching for a TYPE2 value after that would only net the last value . Basically I want to find only the next matching value but none ever preceding the last found value . I tried multiple times to implement something that does this but I m not quite sure how to implement such an algorithm . How would one implement such an algorithm Full code sample that tries to demonstrate what I want : https : godbolt.org g CgNZnj Comment : FYI the key for a map has to be unique . You cannot have multiple elements with the same key . Comment : Note the component name Unordered map . The order of insertion has nothing to do with the order of traversal . Comment : You need a vector deque list forward list array of pairs . All the associative containers ordered or unordered either require unique keys or group equivalent keys together . Comment : I have a unordered-map that contains an enum and a string as a second . The first value may appear many times in different orders . No . .. . Answer : produces Comment : Thank you This is exactly what I was looking for .", "Question : I m calling unordered-map : : emplace and I am storing the returned value a pair . I just want to access the inserted value from the pair but for the life of me I cannot figure out the correct configuration of this confusing pair . My unordered-map definition : .. . .. . I ve looked at the unordered-map : : emplace documentation http : en.cppreference.com w cpp container unordered-map emplace according to this the first element in the pair should be the shared-ptr Component but the compiler is just not happy . In the below code I get the error : Error 2 error C2227 : left of - gUid must point to class struct union generic type .. . .. . Any idea how to correctly access the pairs second value .. . Answer : The first of the pair returned from emplace is an iterator -- which for unordered-map acts like a pointer to a pair key-value . So to get the value from that pair you need second :", "Question : I ll start by illustrating a simple use-case example : .. . .. . Consider the problem of a social security ID database where-in C++ code is modelled as a std : : unordered-map where its key is the social security ID of a person and its value is a std : : string with the full-name of that person e.g . std : : unordered-map int std : : string DB . Consider also that there s a request for printing this database sorted in ascending order based on the person s ID i.e . std : : unordered-map s key . Naively one would think to use std : : sort in order to sort the std : : unordered-map according to the requested criteria and then print it like the example code below : .. . .. . .. . .. . .. . .. . However this is not the case because use of std : : sort with a range of either a std : : unordered-map or a std : : unordered-set will raise a compiler error . Questions : .. . .. . 1 . Why STL s unordered containers cannot be sorted by std : : sort 2 . Is there a legitimate and efficient way to sort either a std : : unordered-map or a std : : unordered-set Comment : If it doesn t make sense to add two togeather do not store things as integers . Adding two SSIDs togeather makes no sense store them as strings or something . Comment : It only makes sense to use mutating algorithms like that on sequential containers of which unordered are not . Comment : 1 sort has no clue what container the iterators are from the error is because sort requires RandomAccessIterator s while unordered-map set iterators are BiDirectionalIterator s . 2 There s a reason those containers are named unordered-map set . If you want ordering use a map set .. . Answer : 1.Why STL s unordered containers cannot be sorted by std : : sort Because unordered containers are already sorted albeit not directly by their keys but by typically hash-function http : en.cppreference.com w cpp container unordered-map hash-function key bucket count http : en.cppreference.com w cpp container unordered-map bucket count also accessible as bucket http : en.cppreference.com w cpp container unordered-map bucket key . This sort order isn t cosmetic - it s the whole basis on which hash tables are able to find elements quickly . If std : : sort were allowed to re-order the elements by key instead then the container would no longer be able to function as a hash table : elements couldn t be reliably found or erased insertions might put duplicates in the container etc. . .. . .. . 2.Is there a legitimate and efficient way to sort either a std : : unordered-map or a std : : unordered-set In the general case only by first copying the elements to a sortable or sorted container such as std : : vector or std : : set the former will usually be faster but benchmark both if you really care : .. . .. . In your case with std : : unordered-map int std : : string DB I d suggest copying only the int keys to a vector for sorting then during iteration look up each key in the unordered-map : that will avoid a lot of string copying . It is sometimes possible to orchestrate an unordered container with ordering by key e.g . hash-function returns key container presized so max bucket index max key-value but anyone considering such abuse would be better off using a vector .", "Question : I am very confused by the name unordered-map . The name suggests that the keys are not ordered at all . But I always thought they are ordered by their hash value . Or is that wrong because the name implies that they are not ordered Or to put it different : Is this .. . .. . with .. . .. . the same as .. . .. . Edit : Well ok not exactly STL will complain here because there may be keys k1 k2 and neither k1 k2 nor k2 k1 . You would need to use multimap and overwrite the equal-check . Or again differently : When I iterate through them can I assume that the key-list is ordered by their hash value Comment : Possible duplicate of stackoverflow.com questions 3039823 http : stackoverflow.com questions 3039823 boostunordered-map-is-ordered .. . Answer : Unordered doesn t mean that there isn t a linear sequence somewhere in the implementation . It means you can t assume anything about the order of these elements . For example people often assume that entries will come out of a hash map in the same order they were put in . But they don t because the entries are unordered . As for ordered by their hash value : hash values are generally taken from the full range of integers but hash maps don t have 2 32 slots in them . The hash value s range will be reduced to the number of slots by taking it modulo the number of slots . Further as you add entries to a hash map it might change size to accommodate the new values . This can cause all the previous entries to be re-placed changing their order . In an unordered data structure you can t assume anything about the order of the entries . Comment : I thought I can assume that they come out ordered by their hash value . Comment : I ve added more.. . Comment : Yes sure but still they would be ordered by their hash value . Of course if the hash value is the same for different keys the order is undefined . Comment : They aren t ordered by their hash value . All that depends entirely on the implementation . If it is open hashing they are ordered by their hash value modulo a prime if they didn t cause a collision and by their hash value modulo a prime modulo another prime if there was . If it is a chaining bucket implementation like most are the buckets are ordered on hash value modulo the number of buckets and the items in the list are ordered probably on insertion time . You can t call any of that ordered on hash value or indeed ordered in any useful sense at all . Comment : @Albert : If the hash map has 1009 slots a prime number and your two values hash to 13116 and 13118 they will end up in slots 1008 13116 1009 and 1 13118 1009 . When iterating the entries the second one will come out first . You can t assume anything about the ordering in an unordered-map .", "Question : I am very confused by the name unordered-map . The name suggests that the keys are not ordered at all . But I always thought they are ordered by their hash value . Or is that wrong because the name implies that they are not ordered Or to put it different : Is this .. . .. . with .. . .. . the same as .. . .. . Edit : Well ok not exactly STL will complain here because there may be keys k1 k2 and neither k1 k2 nor k2 k1 . You would need to use multimap and overwrite the equal-check . Or again differently : When I iterate through them can I assume that the key-list is ordered by their hash value Comment : Possible duplicate of stackoverflow.com questions 3039823 http : stackoverflow.com questions 3039823 boostunordered-map-is-ordered .. . Answer : You are right unordered-map is actually hash ordered . Note that most current implementations pre TR1 call it hash map . The IBM C C++ compiler documentation http : publib.boulder.ibm.com infocenter comphelp v9v111 index.jsp topic com.ibm.xlcpp9.aix.doc standlib stl unordered map.htm remarks that if you have an optimal hash-function the number of operations performed during lookup insertion and removal of an arbitrary element does not depend on the number of elements in the sequence so this mean that the order is not so unordered.. . .. . .. . Now what does it mean that it is hash ordered As an hash should be unpredictable by definition you can t take any assumption about the order of the elements in the map . This is the reason why it has been renamed in TR1 : the old name suggested an order . Now we know that an order is actually used but you can disregard it as it is unpredictable . Comment : Eh why was this downvoted That seemed to me so far the most correct answer . Isn t it Please those who don t think it is add some comments . Comment : See the other answers . A very common implementation orders the keys by hash Key NumberOfBuckets which is definitely not the same as ordering by hash Key . One of the important consequences is that the order can change if more elements are inserted and the number of buckets grows . If you d incorrectly assume it was hash-ordered the order would not change if you add more elements . Comment : @MSalters : that s why I wrote you have not to rely on any hash order as it is unpredictable . Comment : It may be unpredictable but - if things were as you describe them - at least the order would be stable . That means that if a precedes b now it will always do so . Reality and the standard disagree . This is especially relevant for algorithms that insert or remove elements while iterating through a container .", "Question : In a C++ program with Boost I am trying to build an unordered-map whose keys are tuples of doubles : .. . .. . Initializing the map completes OK however when I try to populate it with keys and values .. . .. . I encounter the following error message : .. . .. . I presume this is because I need to specify a hash-function for the tuple keys . How can I do that EDIT : .. . .. . Following the suggestions below I wrote the following implementation : .. . .. . Is it possible to shorten it .. . Answer : This code from Generic hash for tuples in unordered-map unordered-set http : stackoverflow.com questions 7110301 generic-hash-for-tuples-in-unordered-map-unordered-set provides magical support for all c++11 tuples of standard hashable types strings ints etc . Unsurprisingly it looks very much like Matthieu M . s solution above but with no boost dependencies . Put the code in a header file and include it and unordered sets of tuples will work out of the box :", "Question : I have a std : : unordered-map with a value-type that does not have a default constructor so I cannot do the following .. . .. . I ended up writing a helper function .. . .. . but the performance was markedly worse i.e . the value-type s constructor showed up in perf than the following version . I read from std : : unordered-map : : emplace object creation https : stackoverflow.com questions 23704706 stdunordered-mapemplace-object-creation that emplace needs to construct the object in order to see if exists . But emplace is checking to see if this key-value pair exists in the map before it returns . Am I using emplace the wrong way Is there a better pattern I should follow that : .. . .. . 1 . Won t construct my value-type every lookup as in my first method .. . 2 . Won t do the check for to see if value-type exists in my map twice as in my second method .. . .. . Thanks Comment : Why don t you use the second approach with emplace hint http : en.cppreference.com w cpp container unordered-map emplace hint Comment : @nosid : Because that requires you to have a hint which he does not have . All he has is an end iterator Comment : Actually come to think of it I haven t the foggiest idea where one could reliably get a hint for an unordered-map . I know you can use lower-bound for a map but I m not sure if that works for unordered or not . Comment : @MooingDuck : Apparently both libc++ and stdlibc++ ignore the hint for std : : unordered-map . Apparently it is useless for this container . Comment : This answer http : stackoverflow.com questions 22800405 when-do-you-use-stdunordered-mapemplace-hint affirms that emplace hint really cannot be used if the keys does not already exist and is merely there for API compatability . Unrelated boost also ignores the hint : boost.org doc libs 1 55 0 boost-unordered unordered map.hpp http : www.boost.org doc libs 1 55 0 boost-unordered unordered map.hpp .. . Answer : Your code is unfortunately optimal for the standard-library as it currently is . The problem is that the emplace operation is designed to avoid copying not to avoid unnecessary construction of the mapped type . In practical terms what happens is that the implementation allocates and constructs a node containing the map value-type i.e . pair const Key T and then hashes the key to determine whether the constructed node can be linked into the container if this collides then the node is deleted . As long as hash and equal to are not too expensive your code shouldn t do too much extra work . An alternative is to use a custom allocator that intercepts 0-argument construction of your mapped type the problem is that detecting such construction is pretty fiddly :", "Question : I have a std : : unordered-map with a value-type that does not have a default constructor so I cannot do the following .. . .. . I ended up writing a helper function .. . .. . but the performance was markedly worse i.e . the value-type s constructor showed up in perf than the following version . I read from std : : unordered-map : : emplace object creation https : stackoverflow.com questions 23704706 stdunordered-mapemplace-object-creation that emplace needs to construct the object in order to see if exists . But emplace is checking to see if this key-value pair exists in the map before it returns . Am I using emplace the wrong way Is there a better pattern I should follow that : .. . .. . 1 . Won t construct my value-type every lookup as in my first method .. . 2 . Won t do the check for to see if value-type exists in my map twice as in my second method .. . .. . Thanks Comment : Why don t you use the second approach with emplace hint http : en.cppreference.com w cpp container unordered-map emplace hint Comment : @nosid : Because that requires you to have a hint which he does not have . All he has is an end iterator Comment : Actually come to think of it I haven t the foggiest idea where one could reliably get a hint for an unordered-map . I know you can use lower-bound for a map but I m not sure if that works for unordered or not . Comment : @MooingDuck : Apparently both libc++ and stdlibc++ ignore the hint for std : : unordered-map . Apparently it is useless for this container . Comment : This answer http : stackoverflow.com questions 22800405 when-do-you-use-stdunordered-mapemplace-hint affirms that emplace hint really cannot be used if the keys does not already exist and is merely there for API compatability . Unrelated boost also ignores the hint : boost.org doc libs 1 55 0 boost-unordered unordered map.hpp http : www.boost.org doc libs 1 55 0 boost-unordered unordered map.hpp .. . Answer : You could use boost : : optional T in order to be able to default construct the mapped type and then assign an initialized T to it later .", "Question : In Java s hashmap : .. . .. . will update the entry of key key with new value if it exists in the hashmap . What s the correct way to do the similar thing in unordered-map of C++11 I haven t found an API like updateXXX and the documentation says the unordered-map : : insert function will succeed only when there isn t any such pair with a key . .. . Answer : I thought that Java s map.put inserted the element if it wasn t already in the map and updated it if it was in the map see put http : docs.oracle.com javase 6 docs api java util HashMap.html put 28K 20V 29 : .. . .. . put .. . .. . public V put K key V value .. . .. . Associates the specified value with the specified key in this map . If the map previously contained a mapping for the key the old value is replaced . This would be equivalent to unordered-map : : operator http : www.cplusplus.com reference unordered-map unordered-map operator 5B 5D : .. . .. . If k matches the key of an element in the container the function returns a reference to its mapped value . If k does not match the key of any element in the container the function inserts a new element with that key and returns a reference to its mapped value . Notice that this always increases the container size by one even if no mapped value is assigned to the element the element is constructed using its default constructor .", "Question : std : : unordered-map guarantees O 1 time search but how does it manage collision Cppreference http : en.cppreference.com w cpp container unordered-map claims .. . .. . Unordered map is an associative container that contains key-value pairs with unique keys . Search insertion and removal of elements have average constant-time complexity . Assuming a situation where all the Hash codes are same how is the collision handled internally My assumption would be totally wrong if the hash code is unique to every key . In that case how is the unique hash code created where there are no collisions at all What approach does std : : unordered-map s hash-function take to guarantee O 1 search Comment : The word average is important here . The unordered-map is amortized constant not constant . .. . Answer : There was an omission from your post that is crucial to understand : std : : unordered-map has average-case O 1 search . It can take up to O n in the number of elements in the map to retrieve the element . As for which hash-function it uses - this is up to the user . By default it uses std : : hash http : en.cppreference.com w cpp utility hash . The only requirement on the hashing function with respect to collision handling is .. . .. . Hash functions are only required to produce the same result for the same input within a single execution of a program this allows salted hashes that prevent collision DoS attacks . cppreference Comment : Please explain the downvote . I can t learn anything if there s no feedback . Comment : Not my downvote It s not amortized it s average . Amortized implies a guarantee . Comment : @T.C . I guess I d been operating under the wrong assumption for awhile . : Edited . Thanks for the note", "Question : There are several answers on StackOverflow that suggest that the following loop is a fine way to erase elements from a std : : unordered-map that satisfy some predicate pred : .. . .. . I m specifically interested in C++11 as opposed to C++14 and the following ominous note on cppreference.com http : en.cppreference.com w cpp container unordered-map erase suggests that the above loop depends on undefined-behavior and may not work in C++11 after all : .. . .. . The order of the elements that are not erased is preserved this makes it possible to erase individual elements while iterating through the container since C++14 .. . .. . See also Title 2356 . Stability of erasure in unordered associative containers http : wg21.cmeerw.net lwg issue2356 which contains a requested wording change to Working Draft N3797 http : www.open-std.org jtc1 sc22 wg21 docs papers 2013 n3797.pdf item 14 on page 754 the additional phrase beginning and preserve the relative order .. . . This wording is relative to N3797 . .. . Modify unord.req p14 as indicated : .. . .. . -14- The insert and emplace members shall not affect the validity of references to container elements but may invalidate all iterators to the container . The erase members shall invalidate only iterators and references to the erased elements and preserve the relative order of the elements that are not erased . If my interpretation of the note from cppreference.com is correct and the above loop depends on undefined-behavior in C++11 what s the most efficient way to solve this problem in C++11 Comment : Usually when a constraint is strengthened like that it s because all the compilers represented by committee members are already conforming . You re right to be nervous though . Comment : @MarkRansom Is there a way to be safe I.e . what s the correct way to do this under the C++11 standard Comment : I suspect there wasn t a way to be guaranteed safe thus the change to the standard . Comment : Found another SO Q A http : stackoverflow.com questions 25047241 c11-is-it-safe-to-remove-individual-elements-from-stdunordered-map-while-it rq 1 that links to Issue 2356 http : wg21.cmeerw.net lwg issue2356 which clarifies the bit about all the compilers being conforming . .. . Answer : Well you can always do this : .. . .. . It s slower but the complexity is the same . Comment : Sure . I guess I m trying to see if there is a more efficient solution .", "Question : null .. . Answer : I have a map of uint64 t to vector . The map takes an unusually long time 70s to build compared to unordered-map 4s for a string input of 4MB in size . Similarly 120s vs 2400s for a string input of size 150MB . Unordered map is generally faster than google sparse hash but the difference in time is huge . Sparse hash is 2 times slower than unordered-map for a map to int to int . I fail to understand the reason behind this time difference . Code snippet : .. . .. . This is the result-of usr bin time on the program Comment : So the operarion you are timing is storing a key-value pair in a map where the key is many mb in size I ask because I find your question unclear : your code has a loop and I do not see why a minimal example woukd have a loop if I am right . Comment : @yakk So the input is a string . I iterate through the string and push every position into the hash . So we have a hash map with as many keys as size of the input string . The value corresponding to each key is a vector . Comment : So your data is neither sparse nor is it hashable . You are using offsets 64 bit as keys . You should be using a vector indexed by offsets instead of either container . Comment : You are building a map from i to i for all i from 0 to 4641651 . Are you sure that your code is correct Comment : Well yeah . The point is the sparse hash is slow in building a map of int to vector . I dont understand why simple and useless map construction is slow . Of course in my application I am doing something more non trivial with the map", "Question : There are several answers on StackOverflow that suggest that the following loop is a fine way to erase elements from a std : : unordered-map that satisfy some predicate pred : .. . .. . I m specifically interested in C++11 as opposed to C++14 and the following ominous note on cppreference.com http : en.cppreference.com w cpp container unordered-map erase suggests that the above loop depends on undefined-behavior and may not work in C++11 after all : .. . .. . The order of the elements that are not erased is preserved this makes it possible to erase individual elements while iterating through the container since C++14 .. . .. . See also Title 2356 . Stability of erasure in unordered associative containers http : wg21.cmeerw.net lwg issue2356 which contains a requested wording change to Working Draft N3797 http : www.open-std.org jtc1 sc22 wg21 docs papers 2013 n3797.pdf item 14 on page 754 the additional phrase beginning and preserve the relative order .. . . This wording is relative to N3797 . .. . Modify unord.req p14 as indicated : .. . .. . -14- The insert and emplace members shall not affect the validity of references to container elements but may invalidate all iterators to the container . The erase members shall invalidate only iterators and references to the erased elements and preserve the relative order of the elements that are not erased . If my interpretation of the note from cppreference.com is correct and the above loop depends on undefined-behavior in C++11 what s the most efficient way to solve this problem in C++11 Comment : Usually when a constraint is strengthened like that it s because all the compilers represented by committee members are already conforming . You re right to be nervous though . Comment : @MarkRansom Is there a way to be safe I.e . what s the correct way to do this under the C++11 standard Comment : I suspect there wasn t a way to be guaranteed safe thus the change to the standard . Comment : Found another SO Q A http : stackoverflow.com questions 25047241 c11-is-it-safe-to-remove-individual-elements-from-stdunordered-map-while-it rq 1 that links to Issue 2356 http : wg21.cmeerw.net lwg issue2356 which clarifies the bit about all the compilers being conforming . .. . Answer : To comply with C++11 you re unfortunately a bit limited in how you can tackle this . Your options basically boil down to : .. . .. . 1 . Iterate over the unordered-map and build a list of keys to delete like so : .. . .. . std : : unordered-map .. . mymap .. . std : : vector decltype mymap : : key type vec .. . for auto i : mymap .. . if compare i .. . vec.emplace back i.first .. . for auto key : vec .. . mymap.erase key .. . .. . .. . 2 . Iterate over the object and reset if we find something to remove - I d really only recommend this for small datasets . those of you who feel goto is unconditionally bad well this option is arguably bad . std : : unordered-map .. . mymap .. . reset : .. . for auto i : mymap .. . if compare i .. . mymap.erase i.first .. . goto reset .. . .. . .. . .. . 3 . As a somewhat out there option you could also just create a new unordered-map and move the elements that you want to keep . This is arguably a good option when you have more to delete than to keep . std : : unordered-map .. . mymap .. . decltype mymap newmap .. . for auto i : mymap .. . if i is an element we want .. . newmap.emplace std : : move i .. . mymap.swap newmap Comment : Yeah 1 and 3 are the two options I ve thought of . I obviously don t like either one of them but I can t think of anything better . Comment : require C++14 to compile Comment : Maybe in three years . -" ] }
[ "yes-answer-long", "yes-answer-short" ]
key-value
UNK_RELATION
time-complexity@algorithm@46
time-complexity -- the time-complexity of an @placeholder quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem .
{ "confidence": [ 73.9627456665039, 58.73331069946289, 57.52765655517578, 56.192073822021484, 54.66935729980469, 53.977622985839844, 53.92658996582031, 53.79473114013672, 52.94586181640625, 52.94586181640625, 52.879512786865234, 52.86362075805664, 52.60430145263672, 51.792327880859375, 51.39417266845703, 51.01655960083008, 50.44145584106445, 49.941978454589844, 49.721893310546875, 49.517642974853516, 48.65660095214844, 48.6010627746582, 48.48991012573242, 48.249019622802734, 48.170204162597656, 48.170204162597656, 48.170204162597656, 48.06715393066406, 47.74479675292969, 47.71188735961914, 47.39220428466797, 47.35951614379883, 47.32386016845703, 47.25319290161133, 47.19737243652344, 47.19524383544922, 47.19524383544922, 47.19524383544922, 47.19524383544922, 47.19524383544922, 47.19524383544922, 46.82151794433594, 46.64951705932617, 46.64951705932617, 46.64951705932617, 46.53582763671875, 46.53582763671875, 46.53582763671875, 46.53582763671875, 46.34709167480469, 46.2469482421875, 46.03988265991211, 45.87755584716797, 45.73322677612305, 45.6435546875, 45.6435546875, 45.6435546875, 45.6435546875, 45.6435546875, 45.6435546875, 45.6435546875, 45.617977142333984, 45.35485076904297, 45.35485076904297, 45.35485076904297, 45.18833923339844, 44.99040222167969, 44.73038864135742, 44.72079849243164, 44.632259368896484, 44.40519714355469, 44.38719940185547, 44.37289810180664, 44.08069610595703, 44.07765197753906, 44.00377655029297, 43.91148376464844, 43.91148376464844, 43.91148376464844, 43.91148376464844, 43.91148376464844, 43.91148376464844, 43.80316162109375, 43.80316162109375, 43.80316162109375, 43.80316162109375, 43.704185485839844, 43.704185485839844, 43.68947219848633, 43.47676086425781, 43.425437927246094, 43.373592376708984, 43.118927001953125, 42.987586975097656, 42.98040008544922, 42.6168212890625, 42.6168212890625, 42.6168212890625, 42.6168212890625, 42.6168212890625 ], "content": [ "Introduction .. . .. . In computer-science the time-complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input .", "Taken from here - Introduction to Time Complexity of an Algorithm http : careerbaba.in 2014 01 introduction-to-time-complexity-of-an-algorithm .. . .. . 1 .", "Loosely speaking time-complexity is a way of summarising how the number of operations or run-time of an algorithm grows as the input size increases .", "What is the time-complexity of your algorithm", "Regarding the time-complexity : .. . .. . Start with input size e.g .", "Both the time-complexity and the process complexity of that algorithm are O braindead .", "Problem : How to reduce the time-complexity of my algorithm", "Is there an algorithm with better time-complexity", "Is there an algorithm that has lower time-complexity", "What will be time-complexity of the following algorithm", "Based on the random number chosen it would produce an algorithm with that time-complexity then quiz the user on the algorithm and see if their input matches the complexity .", "O 1 Constant Time : .. . .. . An algorithm is said to run in constant-time if it requires the same amount of time regardless of the input size .", "Also is computational complexity another way of saying time-complexity or does this have to do with the amount of space the algorithm takes to run", "Remember the formal definition of time-complexity talks about the complexity of the algorithm as a function of the number of bits of input . Our algorithm runs in time O n4 but what is that as a function of the number of input bits", "What s the time asymptotic complexity of an algorithm", "The Question .. . .. . How to find time-complexity of an algorithm", "Time complexity is irrelevant in this case .", "The complexity is linear but the run time is a step function because the actual number of bits or chunks processed is a step function of the input size .", "@fbrereto : What would be the time-complexity of your algorithm", "For example if the time required by an algorithm on all inputs of size n is at most 5n3 + 3n the asymptotic time-complexity is O n3 .", "What is the time-complexity for the following function", "Given this sort algorithm how do you express its time-complexity", "Time Complexity O n", "Determine the time-complexity of the problem e.g .", "what is the algorithm and what its time-complexity .", "Algorithm is in-place time-complexity is O N .", "If not what is the time-complexity of the below algorithm for the worst case", "I m having a really hard time figuring out an algorithm with such a time-complexity .", "I asked for asymptotic complexity but not worst time-complexity", "Based on the Wikipedia page for Time complexity http : en.wikipedia.org wiki Time complexity I d say the answer is that you can t determine the runtime complexity because if it is defined as : .. . .. . Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm where an elementary operation takes a fixed amount of time to perform .", "The time-complexity is O max input and the operational complexity number of operations is O n .", "This won t increase the time-complexity of the algorithm but obviously the code-complexity .", "Remember when calculating worst-case time-complexity that it is worst-case time-complexity .", "O n2 Quadratic Time .. . .. . An algorithm is said to run in quadratic time if its time execution is proportional to the square of the input size .", "How to calculate the time-complexity for the given function above", "And determine the Time Complexity .", "What would the time-complexity be", "time-complexity is not everything .", "In terms of time-complexity it is optimal .", "time-complexity is O 2n .", "Is above time-complexity correct", "Is the time-complexity of this problem lower than that of sorting", "How can I calculate the time-complexity of a recursive algorithm", "O n is big O notation used for writing time-complexity of an algorithm .", "How do I calculate What is the time-complexity for this algorithm", "What is the time-complexity of the following method", "The time-complexity of the remove method is documented .", "I am looking for the time-complexity .", "BUT the time-complexity bound is still the same .", "The algorithm has run-time complexity of O n as you suggest .", "However I am having a hard time with analyzing the time-complexity of this algorithm .", "The algorithm should be effective in terms of worst and average time-complexity as function of n .", "The easiest way to compute the time-complexity is to model the time-complexity of each function with a separate recurrence-relation .", "Complexity - O n .. . .. . Total time-complexity - O n .", "Is it lengthy time-complexity or not", "This time-complexity is rough for me .", "Time complexity n :", "Time complexity n 2 .", "Time complexity O nlgn .", "what is lookup time-complexity", "What is the time-complexity of this operation", "It s fairly common to have each step require linear time on the input instead this will amount to a total time-complexity of O n log n .", "If it is the case time-complexity of each algorithm must be expressed in all three notations .", "I need to justify the correctness of Kruskal-clustering algorithm and the time-complexity .", "So the algorithm has a O n 2 time-complexity .", "Although the TM s space-complexity is restricted to O n the time-complexity of any particular LBA can be exponential in the size of the input .", "Pseudo-polynomial time-complexity means polynomial in the value magnitude of input but exponential in the size of input .", "Is there a widely-used algorithm that has time-complexity worse than that of another known algorithm but it is a better choice in all practical situations worse complexity but better otherwise", "How do I find the run-time complexity of library functions", "I am interested in the time-complexity at both compile and run time but more so run time .", "while fetching object at index considering time size complexity", "When expressed this way the time-complexity is said to be described asymptotically i.e . as the input size goes to infinity .", "The time-complexity of a TM is connected to its space-complexity .", "The time-complexity of Knapsack Problem is a really weird one and is an exception .", "Are there are any cases where you would prefer O log n time-complexity to O 1 time-complexity", "When we talk about asymptotic time-complexity it means how much time is taken when n grows infinitely large .", "How is it a non-deterministic polynomial time-complexity", "++ is not linear in time-complexity due to lazy-evaluation .", "Each number would represent a specific time-complexity .", "And yes the time-complexity for get is O 1 .", "So the time-complexity of the above code is O nLogn .", "This would mean that the time-complexity would be O n .", "EDIT .. . I interpret the result as the time-complexity of two algorithm are the same .", "Here is my code : .. . .. . My question is : What is the time-complexity of this algorithm", "I have written the following algorithm : .. . .. . I thought that its time-complexity is .. . .. .", "I would like to know the time-complexity of this algorithm and how it is calculated .", "O n Linear Time .. . .. . An algorithm is said to run in linear time if its time execution is directly proportional to the input size i.e .", "O log n Logarithmic Time : .. . .. . An algorithm is said to run in logarithmic time if its time execution is proportional to the logarithm of the input size .", "Required time-complexity is O N .", "We ignore the constants while computing time-complexity so the time-complexity will be O n .. . .. . this will print hello n 2 time why", "Then we can t talk about the runtime complexity of this algorithm because time which the elementary operations take is so vastly different that the time taken would differ by more than a constant factor .", "A modified algorithm taking into account set-up time would likely have wall-clock-time complexity O 2 m + n .", "Could you please help me analyze the time-complexity of the following function", "So wall-clock-time complexity O 2 m operation-count complexity O n .", "To be precise this is the worst case time-complexity time taken to explore all the possibilities if none is found or if it is the last one .", "I m not looking for worst case time-complexity .", "That sum results in worst case time-complexity .", "Is javap representative of time-complexity and to what degree .", "I am asking if there is a way to reduce the time-complexity .", "I m trying to understand the worst time-complexity of this method ." ] }
{ "confidence": [ 70.56436157226562, 56.60390090942383, 56.507991790771484, 56.46255874633789, 56.38196563720703, 53.37623977661133, 52.84197235107422, 52.44945526123047, 52.4339485168457, 52.31675720214844, 51.60601043701172, 51.595054626464844, 51.39729690551758, 50.61753845214844, 50.44622039794922, 49.96949005126953, 49.588226318359375, 49.51756286621094, 49.505027770996094, 49.48016357421875 ], "content": [ "Question : The Question .. . .. . How to find time-complexity of an algorithm What have I done before posting a question on SO .. . .. . I have gone through this https : www.google.co.in search aq f sugexp chrome mod 19 sourceid chrome ie UTF-8 q How 20to 20find 20time 20complexity 20of 20an 20algorithm this http : stackoverflow.com search q how 20to 20calculate 20time 20complexity 20of 20an 20algorithm this http : stackoverflow.com questions 8125915 how-to-find-the-time-complexity-of-an-algorithm and many other links .. . .. . But no where I was able to find a clear and straight forward explanation for how to calculate time-complexity . What do I know .. . .. . Say for a code as simple as the one below : .. . .. . Say for a loop like the one below : .. . .. . int i 0 This will be executed only once . The time is actually calculated to i 0 and not the declaration . i N This will be executed N+1 times .. . .. . i++ This will be executed N times .. . .. . So the number of operations required by this loop are .. . .. . 1+ N+1 +N 2N+2 .. . .. . Note : This still may be wrong as I am not confident about my understanding on calculating time-complexity .. . .. . What I want to know .. . .. . Ok so these small basic calculations I think I know but in most cases I have seen the time-complexity as .. . .. . O N O n2 O log n O n ... . and many other http : en.wikipedia.org wiki Time complexity .. . .. . Can anyone help me understand how does one calculate time-complexity of an algorithm I am sure there are plenty of newbies like me wanting to know this . Comment : Bonus for those interested : The Big O Cheat Sheet bigocheatsheet.com http : bigocheatsheet.com Comment : A beautiful question Comment : Check this blog out : mohalgorithmsorbit.blogspot.com http : mohalgorithmsorbit.blogspot.com . It covers both recursive and especially iterative algorithms . Comment : isn t i ++ equivalent to i i+ 1 if yes then it should be executed 2N times right Comment : Thank you Really nicely asked .. . Answer : Taken from here - Introduction to Time Complexity of an Algorithm http : careerbaba.in 2014 01 introduction-to-time-complexity-of-an-algorithm .. . .. . 1 . Introduction .. . .. . In computer-science the time-complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input . 2 . Big O notation .. . .. . The time-complexity of an algorithm is commonly expressed using big O notation which excludes coefficients and lower order terms . When expressed this way the time-complexity is said to be described asymptotically i.e . as the input size goes to infinity . For example if the time required by an algorithm on all inputs of size n is at most 5n3 + 3n the asymptotic time-complexity is O n3 . More on that later . Few more Examples : .. . .. . 1 O n .. . n O n2 .. . log n O n .. . 2 n + 1 O n .. . .. . 3 . O 1 Constant Time : .. . .. . An algorithm is said to run in constant-time if it requires the same amount of time regardless of the input size . Examples : .. . .. . array : accessing any element .. . fixed-size stack : push and pop methods .. . fixed-size queue : enqueue and dequeue methods .. . .. . 4 . O n Linear Time .. . .. . An algorithm is said to run in linear time if its time execution is directly proportional to the input size i.e . time grows linearly as input size increases . Consider the following examples below I am linearly searching for an element this has a time-complexity of O n . More Examples : .. . .. . Array : Linear Search Traversing Find minimum etc .. . ArrayList : contains method .. . Queue : contains method .. . .. . 5 . O log n Logarithmic Time : .. . .. . An algorithm is said to run in logarithmic time if its time execution is proportional to the logarithm of the input size . Example : Binary Search http : en.wikipedia.org wiki Binary search .. . .. . Recall the twenty questions game - the task is to guess the value of a hidden number in an interval . Each time you make a guess you are told whether your guess is too high or too low . Twenty questions game implies a strategy that uses your guess number to halve the interval size . This is an example of the general problem-solving method known as binary-search .. . .. . 6 . O n2 Quadratic Time .. . .. . An algorithm is said to run in quadratic time if its time execution is proportional to the square of the input size . Examples : .. . .. . Bubble Sort http : en.wikipedia.org wiki Bubble sort .. . Selection Sort http : en.wikipedia.org wiki Selection sort .. . Insertion Sort http : en.wikipedia.org wiki Insertion Sort .. . .. . 7 . Some Useful links .. . .. . Big-O Misconceptions http : ssp.impulsetrain.com big-o.html .. . Determining The Complexity Of Algorithm http : philipstel.wordpress.com 2011 03 07 determining-the-complexity-of-an-algorithm-the-basic-part .. . Big O Cheat Sheet http : bigocheatsheet.com", "Question : I was implementing Longest Common Subsequence problem in C . I wish to compare the time taken for execution of recursive version of the solution and dynamic-programming version . How can I find the time taken for running the LCS function in both versions for various inputs Also can I use SciPy to plot these values on a graph and infer the time-complexity Thanks in advance .. . .. . Razor Comment : Measuring elapsed time to determine time-complexity of an algorithm is dangerous as it requires a comprehensive set of input values ranging not only in size but also including pathalogical cases in order to yield good results . Even measuring relative complexity of two algorithms you have to remove constant scaling and determine whether they have similar pathological cases . .. . Answer : The simplest way to account processor time is to use the clock function from time.h : .. . .. . Since you are simply comparing different implementations you don t need to convert the clocks into real-time units . Comment : I tried this . Each time I execute the function I get Elapsed clock cycles as 0 . Is there way for increase the precision of the time elapsed Comment : @razor35 : The most accurate way to do so is to iterate over the function to be tested N times then divide the result by N where N could be say 1000000 .", "Question : Given this sort algorithm how do you express its time-complexity strike Originally presented here http : dis.4chan.org read prog 1295544154 strike partial archive https : bl0ckeduser.github.io sleepsort sleep sort trimmed.html . Comment : I think it s an question regardless of the real world practicality Comment : Absolutely it s a good academic question . If it provokes thought as it has done for me then it must have value . Comment : I wish I could edit my comment to read an interesting question which is what I meant oops Comment : As you ve provided and accepted your own answer I ve removed the bounty and closed this . .. . Answer : I think paxdiablo is nearest but not for the right reason . Time complexity ignores issues on real hardware such as cache sizes memory limits and in this case the limited number of processes and the operation of the scheduler . Based on the Wikipedia page for Time complexity http : en.wikipedia.org wiki Time complexity I d say the answer is that you can t determine the runtime complexity because if it is defined as : .. . .. . Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm where an elementary operation takes a fixed amount of time to perform . Thus the amount of time taken and the number of elementary operations performed by the algorithm differ by at most a constant factor . Then we can t talk about the runtime complexity of this algorithm because time which the elementary operations take is so vastly different that the time taken would differ by more than a constant factor .", "Question : How can I properly and quite accurately evaluate program runtime and memory complexity just running program I can run program several times using different input sizes . Can measure how long it works . But what should I do with this time further How to say just seeing at N - time results that this is linear or this is quadratic function I think I understand how to measure memory complexity . Just get how many memory use process . And base on that decide what memory complexity is . Comment : There is little chance without some theoretical results and reasoning . Remember for example that the average and worst-case run times of some algorithms are not the same . Comment : Possible duplicate of Empirically estimating big-oh time efficiency http : stackoverflow.com questions 8836393 empirically-estimating-big-oh-time-efficiency .. . Answer : Although I agree with the comments on the question that time and memory complexity should be reasoned and not just only measured because of : .. . .. . Runtime not only depends on the size of the input but on the whole input and the program itself indeed look at quicksort .. . Some O complexity behaviour will only be visible after really large specific input sizes .. . .. . I still think it can be a good idea in case of doubt to do a quick measurement to validate your reasoning . Regarding the time-complexity : .. . .. . Start with input size e.g . 10 . This will take for example a total amount of T0 . Then give your program input with size 20 . This will take for example a total amount of T1 . Then give your program input with size 40 . This will take for example a total amount of T2 . Then give your program input with size 80 . This will take for example a total amount of T3 . Keep on doubling until it takes too much time to do this . Each time you double your input size the time of your execution changes . After a while you will see a trend in your program : .. . .. . If it looks like the execution-time doubles each time you double the input then your execution-time is Lineair .. . .. . If it looks like the execution-time quadruples each time you double the input then your execution-time is Quadratic .. . .. . If it looks like the execution-time is eight times as high each time you double the input then your execution-time is Cubic .. . .. . Of course the execution-time will almost never be exactly the double or quadruple but the thing about these N-time is that you give an estimation of the behaviour when you are going towards an infinitely big input", "Question : I was implementing Longest Common Subsequence problem in C . I wish to compare the time taken for execution of recursive version of the solution and dynamic-programming version . How can I find the time taken for running the LCS function in both versions for various inputs Also can I use SciPy to plot these values on a graph and infer the time-complexity Thanks in advance .. . .. . Razor Comment : Measuring elapsed time to determine time-complexity of an algorithm is dangerous as it requires a comprehensive set of input values ranging not only in size but also including pathalogical cases in order to yield good results . Even measuring relative complexity of two algorithms you have to remove constant scaling and determine whether they have similar pathological cases . .. . Answer : For the second part of your question : the short answer is yes you can . You need to get the two data sets one for each solution in a format that is convenient to parse with from Python . Something like : .. . .. . x y z .. . .. . on each line where x is the sequence length y is the time taken by the dynamic solution z is the time taken by the recursive solution .. . .. . Then in Python :", "Question : I was implementing Longest Common Subsequence problem in C . I wish to compare the time taken for execution of recursive version of the solution and dynamic-programming version . How can I find the time taken for running the LCS function in both versions for various inputs Also can I use SciPy to plot these values on a graph and infer the time-complexity Thanks in advance .. . .. . Razor Comment : Measuring elapsed time to determine time-complexity of an algorithm is dangerous as it requires a comprehensive set of input values ranging not only in size but also including pathalogical cases in order to yield good results . Even measuring relative complexity of two algorithms you have to remove constant scaling and determine whether they have similar pathological cases . .. . Answer : There are various ways to do it . One of the simpler is to find some code that does high resolution microsecond or smaller timing of intervals . Wrap calls to the start-timer and stop-timer functions around the call to the LCS function then print the resulting elapsed time : .. . .. . Similarly for the lcs dynamic function . If the time for a single iteration is too small then wrap a loop around the function . I usually put the timing code into a function and then call that a few times to get consistent results . I can point you to the package illustrated . Yes you could feed the results with care into a graphing package such as SciPy . Clearly you d have to parameterize the test size and time the code several times at each size . Comment : +1 : I basically would say the same thing except I usually prefer using cycle register instead of timer like I do in this question : stackoverflow.com questions 2786899 http : stackoverflow.com questions 2786899 fastest-sort-of-fixed-length-6-int-array", "Question : The Question .. . .. . How to find time-complexity of an algorithm What have I done before posting a question on SO .. . .. . I have gone through this https : www.google.co.in search aq f sugexp chrome mod 19 sourceid chrome ie UTF-8 q How 20to 20find 20time 20complexity 20of 20an 20algorithm this http : stackoverflow.com search q how 20to 20calculate 20time 20complexity 20of 20an 20algorithm this http : stackoverflow.com questions 8125915 how-to-find-the-time-complexity-of-an-algorithm and many other links .. . .. . But no where I was able to find a clear and straight forward explanation for how to calculate time-complexity . What do I know .. . .. . Say for a code as simple as the one below : .. . .. . Say for a loop like the one below : .. . .. . int i 0 This will be executed only once . The time is actually calculated to i 0 and not the declaration . i N This will be executed N+1 times .. . .. . i++ This will be executed N times .. . .. . So the number of operations required by this loop are .. . .. . 1+ N+1 +N 2N+2 .. . .. . Note : This still may be wrong as I am not confident about my understanding on calculating time-complexity .. . .. . What I want to know .. . .. . Ok so these small basic calculations I think I know but in most cases I have seen the time-complexity as .. . .. . O N O n2 O log n O n ... . and many other http : en.wikipedia.org wiki Time complexity .. . .. . Can anyone help me understand how does one calculate time-complexity of an algorithm I am sure there are plenty of newbies like me wanting to know this . Comment : Bonus for those interested : The Big O Cheat Sheet bigocheatsheet.com http : bigocheatsheet.com Comment : A beautiful question Comment : Check this blog out : mohalgorithmsorbit.blogspot.com http : mohalgorithmsorbit.blogspot.com . It covers both recursive and especially iterative algorithms . Comment : isn t i ++ equivalent to i i+ 1 if yes then it should be executed 2N times right Comment : Thank you Really nicely asked .. . Answer : Time complexity with examples .. . .. . 1 - Basic Operations arithmetic comparisons accessing array s elements assignment : The running time is always constant O 1 .. . .. . Example : .. . .. . 2 - If then else statement : Only taking the maximum running time from two or more possible statements . Example : .. . .. . So the complexity of the above pseudo code is T n 2 + 1 + max 1 1+2 6 . Thus its big oh is still constant T n O 1 . 3 - Looping for while repeat : Running time for this statement is the number of looping multiplied by the number of operations inside that looping . Example : .. . .. . So its complexity is T n 1+4n+1 4n + 2 . Thus T n O n . 4 - Nested Loop looping inside looping : Since there is at least one looping inside the main looping running time of this statement used O n 2 or O n 3 . Example : .. . .. . Common Running Time .. . .. . There are some common running times when analyzing an algorithm : .. . .. . 1 . O 1 Constant Time Constant time means the running time is constant it s not affected by the input size . 2 . O n Linear Time When an algorithm accepts n input size it would perform n operations as well . 3 . O log n Logarithmic Time Algorithm that has running time O log n is slight faster than O n . Commonly algorithm divides the problem into sub problems with the same size . Example : binary-search algorithm binary conversion algorithm . 4 . O n log n Linearithmic Time This running time is often found in divide conquer algorithms which divide the problem into sub problems recursively and then merge them in n time . Example : Merge Sort algorithm . 5 . O n2 Quadratic Time Look Bubble Sort algorithm 6 . O n3 Cubic Time It has the same principle with O n2 . 7 . O 2n Exponential Time It is very slow as input get larger if n 1000.000 T n would be 21000.000 . Brute Force algorithm has this running time . 8 . O n Factorial Time THE SLOWEST Example : Travel Salesman Problem TSP .. . .. . Taken from this article http : philipstel.wordpress.com 2011 03 07 determining-the-complexity-of-an-algorithm-the-basic-part . Very well explained should give a read . Comment : In your 2nd example you wrote visitors visitors + 1 is 1 + 1 2 . Could you please explain to me why you did that Comment : @Sajib Acharya Look it from right-to-left . First step : calculate visitors + 1 Second step : assign value from first step to visitors So above expression is formed of two statements first step + second step 1+1 2 Comment : @BozidarS now I get that . Thanks for the help . : Comment : thanks awesome explanation : D", "Question : Below is an algorithm I picked up somewhere forgot where exactly possibly from this answer http : stackoverflow.com a 109025 3972493 to calculate the amount of bits set in an integer i.e . its Hamming weight . I happened to have it handy in PHP but this could really be any language . If I m not terribly mistaken this runs in O 1 - there s no branches after all . Now here s a bit-counting function I wrote myself which apart from readability I deem inferior : .. . .. . However in what way is it inferior At first I thought well there s a loop so this should run in linear time but then I realized the loop doesn t depend on the size of the input at all . No matter the size of i the number of iterations stays the same . What I m thus wondering is this : .. . .. . Can these two alogrithms really be said to both run in O 1 If so is there a measure that distinguishes the two It seems the first one ought to be better in some way . Comment : Of course for actual implementations you d measure their real-life runtime . Implementation algorithm . .. . Answer : Can these two algorithms really be said to both run in O 1 Absolutely yes . Any algorithm that runs in under a fixed amount of time independently of the size of its input can be said to be O 1 . If so is there a measure that distinguishes the two It seems the first one ought to be better in some way What distinguishes algorithms with identical asymptotic complexity is a constant factor . This applies to algorithms of any asymptotic complexity not only O 1 algorithms . You can figure out the constant by adding up the elementary operations required to perform the computations according to these algorithms . Count operations performed outside a loop and add the count of operations inside the loop multiplied by the number of times that loop will be executed in the worst case i.e . 32 . While the two algorithms have identical asymptotic complexity the first algorithm is said to have a much smaller constant factor and is therefore faster than the second one .", "Question : What is pseudopolynomial time http : en.wikipedia.org wiki Pseudo-polynomial time How does it differ from polynomial time Some algorithms that run in pseudopolynomial time have runtimes like O nW for the 0 1 Knapsack Problem http : en.wikipedia.org wiki Knapsack problem Dynamic programming or O n for trial division http : en.wikipedia.org wiki Trial division why doesn t that count as polynomial time Comment : the link for trial division is broken now and the wikipedia entry has been removed . It would be nice if you remove that link . Comment : @NikunjBanka Oh whoops I linked to trial divisiont sic by mistake . Fixed .. . Answer : To understand the difference between polynomial time and pseudopolynomial time we need to start off by formalizing what polynomial time means . The common intuition for polynomial time is time O nk for some k . For example selection-sort http : en.wikipedia.org wiki Selection sort runs in time O n2 which is polynomial time while brute-force solving TSP http : en.wikipedia.org wiki Travelling salesman problem takes time O n n which isn t polynomial time . These runtimes all refer to some variable n that tracks the size of the input . For example in selection-sort n refers to the number of elements in the array while in TSP n refers to the number of nodes in the graph . In order to standardize the definition of what n actually means in this context the formal definition of time-complexity defines the size of a problem as follows : .. . .. . The size of the input to a problem is the number of bits required to write out that input . For example if the input to a sorting algorithm is an array of 32-bit integers then the size of the input would be 32n where n is the number of entries in the array . In a graph with n nodes and m edges the input might be specified as a list of all the nodes followed by a list of all the edges which would require n + m bits . Given this definition the formal definition of polynomial time is the following : .. . .. . An algorithm runs in polynomial time if its runtime is O xk for some constant k where x denotes the number of bits of input given to the algorithm . When working with algorithms that process graphs lists trees etc . this definition more or less agrees with the conventional definition . For example suppose you have a sorting algorithm that sorts arrays of 32-bit integers . If you use something like selection-sort to do this the runtime as a function of the number of input elements in the array will be O n2 . But how does n the number of elements in the input array correspond to the the number of bits of input As mentioned earlier the number of bits of input will be x 32n . Therefore if we express the runtime of the algorithm in terms of x rather than n we get that the runtime is O x2 and so the algorithm runs in polynomial time . Similarly suppose that you do depth-first search http : en.wikipedia.org wiki Depth-first search on a graph which takes time O m + n where m is the number of edges in the graph and n is the number of nodes . How does this relate to the number of bits of input given Well if we assume that the input is specified as an adjacency-list a list of all the nodes and edges then as mentioned earlier the number of input bits will be x m + n . Therefore the runtime will be O x so the algorithm runs in polynomial time . Things break down however when we start talking about algorithms that operate on numbers . Let s consider the problem of testing whether a number is prime or not . Given a number n you can test if n is prime using the following algorithm : .. . .. . So what s the time-complexity of this code Well that inner loop runs O n times and each time does some amount of work to compute n mod i as a really conservative upper bound this can certainly be done in time O n3 . Therefore this overall algorithm runs in time O n4 and possibly a lot faster . In 2004 three computer scientists published a paper called PRIMES is in P http : annals.math.princeton.edu 2004 160-2 p12 giving a polynomial-time algorithm for testing whether a number is prime . It was considered a landmark result . So what s the big deal Don t we already have a polynomial-time algorithm for this namely the one above Unfortunately we don t . Remember the formal definition of time-complexity talks about the complexity of the algorithm as a function of the number of bits of input . Our algorithm runs in time O n4 but what is that as a function of the number of input bits Well writing out the number n takes O log n bits . Therefore if we let x be the number of bits required to write out the input n the runtime of this algorithm is actually O 24x which is not a polynomial in x . This is the heart of the distinction between polynomial time and pseudopolynomial time . On the one hand our algorithm is O n4 which looks like a polynomial but on the other hand under the formal definition of polynomial time it s not polynomial-time . To get an intuition for why the algorithm isn t a polynomial-time algorithm think about the following . Suppose I want the algorithm to have to do a lot of work . If I write out an input like this : .. . .. . 10001010101011 .. . .. . then it will take some worst-case amount of time say T to complete . If I now add a single bit to the end of the number like this : .. . .. . 100010101010111 .. . .. . The runtime will now in the worst case be 2T . I can double the amount of work the algorithm does just by adding one more bit An algorithm runs in pseudopolynomial time if the runtime is some polynomial in the numeric value of the input rather than in the number of bits required to represent it . Our prime testing algorithm is a pseudopolynomial time algorithm since it runs in time O n4 but it s not a polynomial-time algorithm because as a function of the number of bits x required to write out the input the runtime is O 24x . The reason that the PRIMES is in P paper was so significant was that its runtime was roughly O log12 n which as a function of the number of bits is O x12 . So why does this matter Well we have many pseudopolynomial time algorithms for factoring integers . However these algorithms are technically speaking exponential-time algorithms . This is very useful for cryptography : if you want to use RSA encryption you need to be able to trust that we can t factor numbers easily . By increasing the number of bits in the numbers to a huge value say 1024 bits you can make the amount of time that the pseudopolynomial-time factoring algorithm must take get so large that it would be completely and utterly infeasible to factor the numbers . If on the other hand we can find a polynomial -time factoring algorithm this isn t necessarily the case . Adding in more bits may cause the work to grow by a lot but the growth will only be polynomial growth not exponential growth . That said in many cases pseudopolynomial time algorithms are perfectly fine because the size of the numbers won t be too large . For example counting sort http : en.wikipedia.org wiki Counting sort has runtime O n + U where U is the largest number in the array . This is pseudopolynomial time because the numeric value of U requires O log U bits to write out so the runtime is exponential in the input size . If we artificially constrain U so that U isn t too large say if we let U be 2 then the runtime is O n which actually is polynomial time . This is how radix sort http : en.wikipedia.org wiki Radix sort works : by processing the numbers one bit at a time the runtime of each round is O n so the overall runtime is O n log U . This actually is polynomial time because writing out n numbers to sort uses n bits and the value of log U is directly proportional to the number of bits required to write out the maximum value in the array . Hope this helps Comment : Awesome explanation Comment : This should be the Wikipedia explanation http : en.wikipedia.org wiki Pseudo-polynomial time .. . Comment : This should be promoted to Wikipedia . What an explanation Hats off Comment : Your hope has not been in vain . Comment : n mod i is not O 1", "Question : Determine the time-complexity of the problem e.g . lower or upper bound Input : Graph Output : yes if the graph contains a Clique of size 100 . Output no otherwise . Determine a lower time-complexity bound on this problem .. . .. . I think the time-complexity is O 1 constant because the clique has fixed size .. . .. . Also if anyone could help direct me to a good resource on determining time-complexity for decision problems it would be much appreciated Comment : But the graph might be big . Comment : would it then be proportional to the size of the graph would i denote this O n if the input of graph changes constantly or if the graph is always say of size 10000000 would it still be constant size O 1 Comment : I m no expert . Personally I felt that to discuss the running time of an algorithm one usually parameterize the problem s input . In this case the problem could be to test if there is a clique of size larger than K in a graph with N nodes and M edges . Comment : @Als the naive algorithm s---check all 100-subsets of vertices---time would be proportional to n choose 100 100 choose 2 which is about O n 100 . Not exactly constant . : - I have no idea about nontrivial lowers bounds for the problem . .. . Answer : There are a few issues in your question that need to be addressed . My answer here is necessarily brief and informal . To really understand and appreciate computational complexity you ll have to study the material . Papadimitriou s book on Computational Complexity http : www.amazon.de Computational-Complexity-Christos-H-Papadimitriou dp 0201530821 ref sr 1 2 ie UTF8 qid 1463040639 sr 8-2 keywords computational+complexity is the standard book : Computational Complexity : A Modern Approach by Sanjeev Arora http : www.amazon.de Computational-Complexity-Approach-Sanjeev-Arora dp 0521424267 ref sr 1 1 ie UTF8 qid 1463040639 sr 8-1 keywords computational 20complexity might be a lighter read for getting started . Computitional complexity is usually measured with respect to the size of the input . For the K-Clique problem Does the input graph contain a clique of size K in the worst case you ll have to look at the whole graph or at least most of the graph to determine that there is no such clique . This means that the runtime of your algorithm will probably depend on the size of the graph usually measured as the number of nodes n in your graph . Informally this implies that the computational complexity cannot be constant since it dependes on the size of the input . A lower complexity bound is an asymptotic lower-bound i.e . any algorithm solving the problem has to have at least that computational complexity . So O 1 is actually a formally correct answer though it doesn t provide much value . A tight lower-bound is the highest asymptotic bound that is still a lower-bound . The K-clique desicion problem is NP-hard and thus it is very unlikely that a polynomial-time algorithm for the problem exists . You can find more about good upper-bounds in this post on cs.stackexchange http : cs.stackexchange.com questions 7420 why-is-the-clique-problem-np-complete .", "Question : Given this sort algorithm how do you express its time-complexity strike Originally presented here http : dis.4chan.org read prog 1295544154 strike partial archive https : bl0ckeduser.github.io sleepsort sleep sort trimmed.html . Comment : I think it s an question regardless of the real world practicality Comment : Absolutely it s a good academic question . If it provokes thought as it has done for me then it must have value . Comment : I wish I could edit my comment to read an interesting question which is what I meant oops Comment : As you ve provided and accepted your own answer I ve removed the bounty and closed this . .. . Answer : O max input +n .. . .. . The complexity just appears awkward to express because most sorting algorithms are data agnostic . Their time scales with the amount of data not the data itself . FWIW as pointed out here http : www.reddit.com r programming comments i0dcx 4chan sleep sort c1zulkl this is not a reliable algorithm for sorting data . Comment : I think it needs to be O max input +n where is the amount of inputs . If it takes longer to iterate through all inputs than the time it takes to process the largest one then O max input would be incorrect no", "Question : I implemented this function power which takes two arguments a and b and computes ab . Given : ab falls in the range of long-long int . Problem : How to reduce the time-complexity of my algorithm Comment : Given an arbitrary degree of precision it s possible to compute exponentation in constant-time . Comment : @Crashworks only if the exponent is bounded by a constant right Comment : @vidstige Yes I assume both base and exponent are stored in a finite-length register . Comment : @Crashworks : this homework assignment is after an algorithm with better complexity though not a semantic argument about whether it s ever appropriate to apply complexity analysis to programs with a finite upper bound on the size of the input . Comment : @Steve Jessop : Hush you re spoiling a perfectly good snipe hunt .. . Answer : Use Exponentiation by squaring http : en.wikipedia.org wiki Exponentiation by squaring", "Question : Given this sort algorithm how do you express its time-complexity strike Originally presented here http : dis.4chan.org read prog 1295544154 strike partial archive https : bl0ckeduser.github.io sleepsort sleep sort trimmed.html . Comment : I think it s an question regardless of the real world practicality Comment : Absolutely it s a good academic question . If it provokes thought as it has done for me then it must have value . Comment : I wish I could edit my comment to read an interesting question which is what I meant oops Comment : As you ve provided and accepted your own answer I ve removed the bounty and closed this . .. . Answer : I m with Jordan except that I think the wall-clock-time complexity is better expressed as O 2 m where m is the size of each item rather than O max input . If each item has size m the largest item will have the integer value 2 m minus one but nobody cares about that . By construction the algorithm requires the set-up time to be smaller than 1 a constant . So wall-clock-time complexity O 2 m operation-count complexity O n . A modified algorithm taking into account set-up time would likely have wall-clock-time complexity O 2 m + n . For instance it could note the current time at the beginning calculate base time start time + k len list for some appropriate constant k then have the threads sleep until time base time+i . Then k len list is clearly O n and i is O 2 m as before for a total of O 2 m+n .", "Question : Given this sort algorithm how do you express its time-complexity strike Originally presented here http : dis.4chan.org read prog 1295544154 strike partial archive https : bl0ckeduser.github.io sleepsort sleep sort trimmed.html . Comment : I think it s an question regardless of the real world practicality Comment : Absolutely it s a good academic question . If it provokes thought as it has done for me then it must have value . Comment : I wish I could edit my comment to read an interesting question which is what I meant oops Comment : As you ve provided and accepted your own answer I ve removed the bounty and closed this . .. . Answer : Update : I ve come back to the conclusion that O m+n where n is the length of the list and m is the largest element in it is actually sound . Original answer follows . .. . .. . justinhj s answer is quite good but I don t believe he s right in saying that you can t determine the runtime complexity . Remember when calculating worst-case time-complexity that it is worst-case time-complexity . You may not make any assumptions about the size of the input you must consider it to be infinitely large . Infinite in what way depending upon the type of the input and how it is used you want to consider what will take the longest so in some cases where the inverse is taken this infinite may be instead something approaching zero rather than infinity . For something taking a list that will generally be a list with infinitely many items . For something taking a number that will generally be hereafter inf . By this correct reasoning those answers that suggest O max input + n are faulty . But still it is possible to calculate the complexity whether it is useful or meaningful or not . When considering this algorithm clearly the item which is causing problems is sleep . The rest is easy to calculate it ends up at O n+sleep with the knowledge that it doesn t matter how many times you re running sleep their times will be independent time-complexity careth not for a dodgy task scheduler or a maximum number of processes which can be run or running out-of-memory or else you could easily call everything O 1 . But what is sleep s time-complexity Remember you must consider the input which will take the longest . That is for sleep an infinitely large number . Thus sleep is with constants still in O inf . Then the important question : is inf a constant If it is then sleep is O 1 if it is not sleep is still O inf . Whichever it is there can be no simplification of the complexity of sleep as it appears in the main algorithm as the inputs must be assumed to be infinitely large . So which is it Is inf a constant or not I present you then with two possible answers for the time-complexity of sleepsort.bash : .. . .. . O n if inf is a constant .. . O inf+n if inf is not a constant .. . .. . Which will you go with For myself I think I prefer the former . Comment : I don t understand the reasoning behind rejecting the max input term . Where did the inf come from Why would one want to sort infinite numbers They are not even comparable . : Comment : @Rotsor : b inf comes from the fact that for sleep Big O notation describes the limiting behavior of the function when the argument tends towards .. . infinity http : en.wikipedia.org wiki Big O notation . Are you happy that sleep is O inf O 1 if inf is constant a I reject max input on the same grounds : you must consider infinite data . It is invalid in Big O notation to consider non-infinite data in this way . You must use the greatest max input . c I couldn t care less that you won t be dealing with infinite numbers but that s what Big O notation requires . Comment : If you follow the same reasoning you d have to reject n too You must use the greatest n which is infinity . Working with infinity values brings us nowhere . We may only work with limits . And the claim of O n + max input as n - inf input i - inf is sound although questionably correct . Comment : And no I m not happy that sleep is O inf O 1 because sleep m takes O m time . If you consider m constant or bounded then fine sleep m is O 1 . If not then sleep m is O m . Why bring inf s here Comment : @Rostor : in thinking it over before reading your last comment actually I ve come to the conclusion that sleep is indeed O n . Not sure quite why I was going for inf it is illogical .", "Question : As the size of my substring grows how can I find the complexity of this section of code I became curious when I noticed my program running as-if the hash-function executed in constant-time . For my program if the size is 165 worst case the above code will execute 165x . A test I ve just done shows sha1 executing with an unstable relationship with length . Test code : .. . Answer : The SHA-1 http : en.wikipedia.org wiki SHA-1 algorithm pads input messages to a multiple of 512 bits after appending a 1 bit and the size of the input . From the description of the algorithm in the wikipedia : .. . .. . That is why the run time is a step function of the input remaining constant for a while then jumping . However this effect diminishes as message sizes get larger in relation to the block size step of 64 bytes . Other noticable changes occur as message sizes approach and exceed the various memory cache sizes : typically 32 KB for the level-1 cache L1 256 KB for the L2 and 4 8 or even 20 MB for the L3 cache in order from fastest to slowest . Un-cached memory accesses are even slower . In mattkeo s case the hashing would have found the caches warm that is a lot of the data would still have been in the cache as long as the data didn t exceed the cache size significantly . The difference between a warm cache and un-cached memory tends to be more noticeable than for a lukewarm or cold cache with a poor hit rate . Comment : I think complexity can be considered as linear not step function . More explanations in my answer below Comment : The complexity is linear but the run time is a step function because the actual number of bits or chunks processed is a step function of the input size . But I agree with your assessment that this effect should be negligible for the huge block sizes in the later test . I d overlooked the size factor completely . Thanks for pointing it out .", "Question : I implemented this function power which takes two arguments a and b and computes ab . Given : ab falls in the range of long-long int . Problem : How to reduce the time-complexity of my algorithm Comment : Given an arbitrary degree of precision it s possible to compute exponentation in constant-time . Comment : @Crashworks only if the exponent is bounded by a constant right Comment : @vidstige Yes I assume both base and exponent are stored in a finite-length register . Comment : @Crashworks : this homework assignment is after an algorithm with better complexity though not a semantic argument about whether it s ever appropriate to apply complexity analysis to programs with a finite upper bound on the size of the input . Comment : @Steve Jessop : Hush you re spoiling a perfectly good snipe hunt .. . Answer : Exponentiation by Squaring . enter image description here http : i.stack.imgur.com rcaOC.png .. . .. . A non-recursive implementation .. . .. . This algorithm requires log2b squarings and at most log2b multiplications . The running time is O log b .. . .. . Comment : thanks a lot for your answer", "Question : I have an interesting algorithm for 3SAT in mind that I wanted to implement but was not able to code for the same so unable to see if it really works . The algorithm is defined in a Microsoft Word file here : DropBox Link for 3SAT algorithm https : www.dropbox.com s 7j1mvt7jubf2vb1 3SAT 20algorithm.docx dl 0 I do not know if this algorithm really works and if it does what is its complexity . I would really like to know about its complexity though . Please help me regarding this as-if it is in polynomial time then I would have proved P NP Comment : I think you should describe your algorithm here not just point to external site . Comment : No offense but you should probably learn more CS if you re trying to take on P vs NP . Whatever the answer is it s not going to be this easy . .. . Answer : As the description of your algorithm states .. . .. . this method may take considerable amount of time as every time the number of rows might get multiplied by 2 This comes out to be 2m where m is number of clauses .. . .. . Hence the worst-case running time of the algorithm is exponential not polynomial . You are hoping that in many cases the running time will be shorter due to happy coincidences in the input but worst-case running time is how the P vs NP question is assessed .", "Question : I am currently learning about Big O Notation running times and amortized times . I understand the notion of O n linear time meaning that the size of the input affects the growth of the algorithm proportionally...and the same goes for for example quadratic time O n2 etc..even algorithms such as permutation generators with O n times that grow by factorials . For example the following function is O n because the algorithm grows in proportion to its input n : .. . .. . Similarly if there was a nested loop the time would be O n2 . But what exactly is O log n For example what does it mean to say that the height of a complete binary-tree is O log n I do know maybe not in great detail what Logarithm is in the sense that : log10 100 2 but I cannot understand how to identify a function with a logarithmic time . Comment : A 1-node binary-tree has height log2 1 +1 1 a 2-node tree has height log2 2 +1 2 a 4-node tree has height log2 4 +1 3 and so on . An n-node tree has height log2 n +1 so adding nodes to the tree causes its average height to grow logarithmically . Comment : One thing I m seeing in most answers is that they essentially describe O something means the running time of the algorithm grows in proportion to something . Given that you asked for exact meaning of O log n it s not true . That s the intuitive description of Big-Theta notation not Big-O . O log n intuitively means the running time grows at most proportional to log n : stackoverflow.com questions 471199 http : stackoverflow.com questions 471199 what-is-the-difference-between-n-and-on 471206 471206 Comment : Related stackoverflow.com questions 487258 http : stackoverflow.com questions 487258 plain-english-explanation-of-big-o 487278 487278 Comment : I always remember divide-and-conquer as the example for O log n Comment : @Ethan : It doesn t matter which base you are in since base-conversion is just a constant multiplication The formula is log b x log d x log d b . Log d b will just be a constant . .. . Answer : O log n refers to a function or algorithm or step in an algorithm working in an amount of time proportional to the logarithm usually base 2 in most cases but not always and in any event this is insignificant by big-O notation of the size of the input . The logarithmic function is the inverse of the exponential function . Put another way if your input grows exponentially rather than linearly as you would normally consider it your function grows linearly . O log n running times are very common in any sort of divide-and-conquer application because you are ideally cutting the work in half every time . If in each of the division or conquer steps you are doing constant-time work or work that is not constant-time but with time growing more slowly than O log n then your entire function is O log n . It s fairly common to have each step require linear time on the input instead this will amount to a total time-complexity of O n log n . The running time-complexity of binary-search is an example of O log n . This is because in binary-search you are always ignoring half of your input in each later step by dividing the array in half and only focusing on one half with each step . Each step is constant-time because in binary-search you only need to compare one element with your key in order to figure out what to do next irregardless of how big the array you are considering is at any point . So you do approximately log n log 2 steps . The running time-complexity of merge sort is an example of O n log n . This is because you are dividing the array in half with each step resulting in a total of approximately log n log 2 steps . However in each step you need to perform merge operations on all elements whether it s one merge operation on two sublists of n 2 elements or two merge operations on four sublists of n 4 elements is irrelevant because it adds to having to do this for n elements in each step . Thus the total complexity is O n log n . Remember that big-O notation by definition http : en.wikipedia.org wiki Big O notation Formal definition constants don t matter . Also by the change of base rule http : en.wikipedia.org wiki Change of base formula for logs Changing the base for logarithms the only difference between logarithms of different bases is a constant factor . Comment : The final note solved my confusion about logarithms being based on 2 or 10 : Thanks a lot .", "Question : I implemented this function power which takes two arguments a and b and computes ab . Given : ab falls in the range of long-long int . Problem : How to reduce the time-complexity of my algorithm Comment : Given an arbitrary degree of precision it s possible to compute exponentation in constant-time . Comment : @Crashworks only if the exponent is bounded by a constant right Comment : @vidstige Yes I assume both base and exponent are stored in a finite-length register . Comment : @Crashworks : this homework assignment is after an algorithm with better complexity though not a semantic argument about whether it s ever appropriate to apply complexity analysis to programs with a finite upper bound on the size of the input . Comment : @Steve Jessop : Hush you re spoiling a perfectly good snipe hunt .. . Answer : Use exponentiation by squares . That is if we need a b we check if b is even if b is even we find a 2 b 2 else we find a a 2 b 2 . This may not be the best algorithm but it is better than the linear algorithm .", "Question : I implemented this function power which takes two arguments a and b and computes ab . Given : ab falls in the range of long-long int . Problem : How to reduce the time-complexity of my algorithm Comment : Given an arbitrary degree of precision it s possible to compute exponentation in constant-time . Comment : @Crashworks only if the exponent is bounded by a constant right Comment : @vidstige Yes I assume both base and exponent are stored in a finite-length register . Comment : @Crashworks : this homework assignment is after an algorithm with better complexity though not a semantic argument about whether it s ever appropriate to apply complexity analysis to programs with a finite upper bound on the size of the input . Comment : @Steve Jessop : Hush you re spoiling a perfectly good snipe hunt .. . Answer : Here is the recursive implementation of Java code for 2 to the power of n with O log n complexity using Exponentiation by squaring http : en.wikipedia.org wiki Exponentiation by squaring .. . .. . enter image description here http : i.stack.imgur.com SVhov.gif" ] }
[ "yes-answer-long", "yes-answer-short" ]
algorithm
UNK_RELATION
core-location@s@118
core-location -- this proprietary apple framework for ios and mac os x allows apps to obtain information on a device @placeholder current location latitude-longitude and on some devices altitude direction and speed .
{ "confidence": [ 53.01625442504883, 49.85568618774414, 43.452537536621094, 43.38235855102539, 42.78466796875, 42.147705078125, 41.62315368652344, 40.653934478759766, 40.58700180053711, 40.227195739746094, 39.102203369140625, 38.980709075927734, 38.94556427001953, 37.72795486450195, 37.302303314208984, 37.275550842285156, 36.43679428100586, 36.365596771240234, 36.35497283935547, 36.35007095336914, 36.15806198120117, 36.150146484375, 36.0240364074707, 35.769981384277344, 35.602760314941406, 34.837242126464844, 34.4434928894043, 34.19660568237305, 33.92332077026367, 33.86085510253906, 33.70751953125, 33.5379638671875, 33.05923843383789, 32.94047546386719, 32.89311599731445, 32.82487487792969, 32.76774597167969, 32.73954391479492, 32.68009948730469, 32.64930725097656, 32.629825592041016, 32.573753356933594, 32.560367584228516, 32.558284759521484, 32.43406677246094, 32.286773681640625, 32.26755905151367, 32.065185546875, 32.05333709716797, 32.001338958740234, 31.941516876220703, 31.901500701904297, 31.89752197265625, 31.869537353515625, 31.869537353515625, 31.869537353515625, 31.869537353515625, 31.789913177490234, 31.789913177490234, 31.744583129882812, 31.709789276123047, 31.703754425048828, 31.6712646484375, 31.63576889038086, 31.622413635253906, 31.622413635253906, 31.622413635253906, 31.562278747558594, 31.505794525146484, 31.476276397705078, 31.476276397705078, 31.456634521484375, 31.390689849853516, 31.35688018798828, 31.355545043945312, 31.299575805664062, 31.190670013427734, 31.160709381103516, 31.011287689208984, 30.65280532836914, 30.642528533935547, 30.6357421875, 30.561695098876953, 30.51174545288086, 30.51174545288086, 30.510162353515625, 30.413665771484375, 30.410858154296875, 30.410858154296875, 30.399417877197266, 30.330142974853516, 30.328548431396484, 30.326709747314453, 30.31609344482422, 30.31609344482422, 30.31609344482422, 30.31609344482422, 30.28335189819336, 30.266151428222656 ], "content": [ "Get the current location and destination location s latitude and longitude .", "will location manager return the latitude and longitude of current location in iran", "Core Location does not always report altitude immediately .", "The GPS and other devices that obtain location information might not be initialized .", "I ve been working on a app that displays the current location of the user in a UILabel using the core-location framework in Xcode When a button is clicked the app calls the CLLocationManager that gets the users latitude and longitude .", "How do I get the current location of my iOS device", "It s iOS Core Location geocoding .", "If it is on then try to check whether your current location manager holds the region you ve specified by checking NSLog @ Monitored Regions @ self.locationManager.monitoredRegions .. . .. . Then if the user device is at current location Latitude and longitude the didEnterRegion : and didExitRegion : delegates will not be triggering .", "I am using the Apple maps in my application it will return the latitude and longitude when my current location is different than Iran country .", "To get a real latitude and longitude you ll have to simulate a location .", "Here is a great example in Swift nshipster.com core-location-in-ios-8 http : nshipster.com core-location-in-ios-8 that I found really helpful .", "I have been working on a simple app to get the users current location using the Core Location framework from Apple in Xcode and when i run the app i get an error .", "Consider latitude as x and longitude as y for now .", "I m using Core Location with ios 6 .", "I am trying to get the user s current location using the Core Location Framework in Xcode 6.3.1 I did following things : .. . .. . 1 .", "If this method returns NO and you start location updates anyway the Core Location framework prompts the user to confirm whether location services should be reenabled .", "So now I could manage to start from web server background location update on ios device then send user location to server and stop updating location on ios device from server on my own .", "The current location of the device is not even close to any of the regions .", "Some iOS devices have a real GPS chip allowing you to get location data even with no Internet connection .", ".. . .. . While retrieving data after getting user s latitude and longitude from core-location I am trying to : .. . .. . First problem arises here with observeEventType .", "That said if you look at this article from NSHipster http : nshipster.com core-location-in-ios-8 it references some current issues with CLVists for iOS 8.1 .", "Then I set the location of the iOS simulator to a custom location .", "The latitude and longitude coordinates seem to be correct as each time the locations are updated the new location from the last time is being stored as the old location .", "There are two ways to simulate location updates : .. . .. . In the iOS Simulator under Debug Location you re able to specify a constant latitude-longitude or select several predefined profiles like City Run or Freeway Drive .", "Current location must be known .", "In iOS 5.x simulator there is a debug menu that has a location submenu .", "I m developing an iPhone application that uses Core Location to determine the device s location .", "The whole flow : - Implemented with startMonitoringSignificantLocationChanges and an API call to my server to update the location latitude and longitude - Set the location updates background mode capability to true - Run the app so the location manager is initiated and the app is listening for location changes - Force closed the app - Set the debug- location on simulator to freeway drive - Opened maps to see if the location is changing - Waited on the server to see for location updates and was getting new results every about 3 minutes .. . .. . However I m still not sure if this is fine enough on a real device .", ".. . You should check the return-value of this method before starting location updates to determine whether the user has location services enabled for the current device .", "Core Location doesn t give you history .", "Core Location framework .. . CLHeading .. . .. . From Location Awareness Programming Guide http : developer.apple.com library ios documentation UserExperience Conceptual LocationAwarenessPG GettingHeadings GettingHeadings.html apple ref doc uid TP40009497-CH5-SW1 .. . .. . Getting Heading-Related Events .. . .. . Heading events are available to apps running on a device that contains a magnetometer .", "How are we intended to get the user s location in an OS X Today Extension", "But these method is no longer returning current the location .", "Use one of these calls : .. . .. . For more information have a look at : http : nevan.net 2014 09 core-location-manager-changes-in-ios-8", "Is there some way to use current location to determine proximity to any of n defined and non-monitored regions and then populate your monitored regions based on the current location", "How do I pass the latitude and longitude data back to my ViewControllers as soon as the user s latitude and longitude is calculated", "From the Apple docs : With this service location updates are generated only when the user s location changes significantly thus it is ideal for social applications or applications that provide the user with noncritical location-relevant information .", "It turns out I mixed up the longitute and latitude when creating the location .", "Tap Current Location button in lower left corner .", "To answer your question from comments I am afraid Apple does not provide deep insights into their core-location technology .", "Here is the solution : - .. . .. . If your app is a location based mobile-application that needs to monitor the location of the device when it has significant changes the iOS will return you some location coordinates when the device has moved more than 500 meters from the last known location .", "Does Core Location support that and falls back to GPS-only no cell triangulation or WiFi location mapping", "I have a Core Data database with latitude and longitude properties .", "According to In iOS what is the difference between the Magnetic Field values from the Core Location and Core Motion frameworks", "It usually takes a few seconds to obtain the current location and it will most likely be nil until then resulting in geocode error 8 or kCLErrorGeocodeFoundNoResult .", "If the device is not capable of location updates it will never prompt the user for location .", "One of the apps that we re developing uses background location services to track device location and all of our testers have reported that the app no longer appears to track in the background under iOS 7 .", "iOS 8 has changed location authorization strategy .", "Only GPS can deliver the location attributes : course and speed .", "I have the background location on and imported the coreLocation framework .", "It goes into the challenges to indoor location the different types of sources you can obtain location and some math for indoor positioning .", "After months of trials and errors by experimenting the Core Location Framework I have found the solution to get location update even when the app is killed suspended .", "According to Apple docs .. . .. . After returning a current location fix the receiver generates update events only when a significant change in the user s location is detected .", "I am trying to get the users latitude and longitude .", "But actual process is that it store Longitude and latitude of particular region .", "Make the delegate methods update the latitude and longitude properties .", "In other ViewControllers read this singleton s latitude and longitude properties .", "Added Core Location Framework under Target - General - Linked Frameworks Libraries .. . 2 .", "Added Core Location Framework under Target- General- Linked Frameworks Libraries .. . .. . Added in .plist file .. . .. . See Screenshot : .. . .. .", "For the true heading other Core Location services are required geolocation to obtain the deviation of magnetic from true north .", "I am wondering. . is it save to ask location manager for a current location when didExitRegion or didEnterRegion is called", "When I am trying to install this in a device the core-location never asks the user permission .", "On the Simulator you need to simulate the location and then using a VPN on your Mac .", "Satellite Direction Navigation services of Apple are not present in Iran thats why you are not getting the location coordinates .", "I think apple map is not allowed for Iran location .", "I have a strange issue with the apple location service .", "Issues like this can be resolved by setting location as Apple .", "Getting accurate location information requires power and the more often you get the location the more power you use .", "Register current location in region monitoring .", "possible duplicate of Periodic iOS background location updates http : stackoverflow.com questions 19042894 periodic-ios-background-location-updates", "Background Location Update Programming for iOS 7 and 8 http : mobileoop.com background-location-update-programming-for-ios-7 .. . .. . 2 .", "But Core Location makes use of many different technologies to increase accuracy .", "Im using this : NSString stringWithFormat : @ maps.google.com maps http : maps.google.com maps geo q f f output xml ll f f spn f f quot latitude-longitude latitude-longitude location horizontalAccuracy location horizontalAccuracy", "From the Core Location Data Types Reference http : developer.apple.com library ios documentation CoreLocation Reference CoreLocationDataTypesRef Reference reference.html : .. . .. . The CLLocationDistance data type the data type for altitude is a double .", "i try to get the longitude latitude of the user current location my code is simply this : .. . .. . i got always this error from the didFailWithError method : .. . .. . can you please tell me what i miss", "I m implementing the new core-location permissions for iOS 8 but I would like to compile and ship using Xcode 5.1.1 and the iOS 7.1 SDK .", "I can t seem to find any information on how Core Location handles overlapping geofences .", "override init .. . super.init .. . .. . func processLocation current : CLLocation .. . guard last nil else .. . last current .. . return .. . .. . var speed current.speed .. . if speed 0 .. . print speed or whatever .. . else .. . speed last .distance from : current current.timestamp.timeIntervalSince last .timestamp .. . print speed .. . .. . last current .. . .. . func locationManager manager : CLLocationManager .. . didUpdateLocations locations : CLLocation .. . for location in locations .. . processLocation location .. . .. . .. . .. . .. . var del locationDelegate .. . var lm CLLocationManager .. . lm.delegate del .. . lm.startUpdatingLocation", "Trying to fetch before getting the core-location .", "Putting it another way if device is at location X then load region 1 through 20 .", "That is 180 to x latitude and 360 to y longitude .. . .. . .. . Something like this should do the trick .", "But you can get much lower power requirements at the expense of less-frequent location updates by using other means-- for example the significant location update option in Core Location .", "Here is the solution that I used to get continuous location from iOS 7 devices no matter it is in foreground or background .", "The iOS Simulator has full location simulation built-in .", "This is needed for background location tracking since iOS 9 .", "Still I couldn t tell 100 if the location property is set at the time didEnterRegion is called because there is a cloud of mystery around core-location .", "The app is a location based one and should gather current location and send the coordinates to server every 5 or other value minutes .", "Tap Current Location button in lower left corner again .", "This assumes the use-case where the current location is suddenly desired by the user .", "In addition utilize this function in your CLLocationManagerDelegate .. . .. . This allows the app to respond properly if they change the location permissions in the middle of using your location services after the viewDidLoad .", "This all assumes that the device has the correct location abilities .", "Having said that there may be situations where the user s current location is now being shown but i still want to get the user s current location .", "As discussed on other communities you can have mapView.showUserLocation YES and still use CLLocationManager to retrieve the most current location information .", "They are all placed at latitude 0 and longitude 0 .", "My initial reaction was convert latitude-longitude to radians", "Why do you normalize180 the longitude and not the latitude", "How to calculate the latitude and longitude of these locations on the radius", "One exception is location apps which in iOS 8 and later are relaunched after being force quit by the user .", "How bad is it to use Location Manager to retrieve the location information when MapView.showUserLocation is also TRUE" ] }
{ "confidence": [ 64.32837677001953, 55.92361068725586, 52.382816314697266, 51.810142517089844, 51.028839111328125, 50.67303466796875, 50.251808166503906, 50.02864074707031, 49.28757095336914, 48.703086853027344, 48.57117462158203, 48.441226959228516, 48.12788391113281, 48.054290771484375, 47.965545654296875, 47.866302490234375, 47.81041717529297, 47.65972900390625, 47.57554626464844, 47.50228500366211 ], "content": [ "Question : I am creating an app like Uber in Iran but my location manager will not give me the current location of the user it will give me only null values . How can I fetch the current location of the user in Iran As my whole app is based on current location . I am using the Apple maps in my application it will return the latitude and longitude when my current location is different than Iran country . Comment : Please share the code What you have tried... . Comment : I think apple map is not allowed for Iran location . you have to use google map to fetch current location of Iraq . Comment : If you want to get current location of Iran then you must use Google map . Comment : will location manager return the latitude and longitude of current location in iran Comment : I expect that Apple as an American firm must obey US export regulations even under sufferance and the regulations say that Iran is a country worth placing under a financial and services embargo . I suspect you will need to use a third-party service that is not hosted within the US . .. . Answer : Satellite Direction Navigation services of Apple are not present in Iran thats why you are not getting the location coordinates . Please check this link from Apple : http : www.apple.com in ios feature-availability .. . .. . Is better you use Google maps in your app to get your location coordinates for Iran . https : developers.google.com maps documentation ios-sdk intro this link will be helpful to you Comment : will location manager return the latitude and longitude of current location in iran Comment : yes but on real device not on simulator Comment : thanks and thanks everyone", "Question : I have a UIImageView representing a simple knob : it has nothing to do with stereo hi-fi it represents a sort of compass : .. . .. . enter image description here http : i.stack.imgur.com ITcQS.png .. . .. . My goal is the following : I want the compass to point a precise direction starting from the current position of the device and it must update too : if the user turns the device elsewhere the knob should rotate accordingly . What I tried until now : .. . .. . I have this function : .. . .. . and I call it this way using the CoreLocation framework : .. . .. . and : .. . .. . Problem is for some reason the knob turns once into one wrong direction then stops working . Can you help me Any tip is appreciated : - .. . .. . P.S . : I red many related-posts none solves this issue Comment : I d take out the animation first and see if it works if not then put some print statements in the didUpdateHeading and make sure thats called and check the value of geoAngle to see if its being updated . See if that gets you anywhere Comment : @daven11 : it s exactly what I did before posting : - They get updated maybe the problem is in the animation Comment : sorry to state the obvious - difficult to tell how experienced developers are on here . I haven t used the CoreLocation framework so good luck .. . Answer : Consider latitude as x and longitude as y for now . Pre-requisites : .. . .. . 1 . Destination location must be known . 2 . Current location must be known . I would show you how to calculate the angle towards the direction now . It is as follows 1 . Get the current location and destination location s latitude and longitude . Pseudo Code : .. . .. . Let currentLocation lat long .. . Let destinationLocation lat long .. . angleTowardsDestination 2 . Calculate the base and hypotenuse for Pythagorus theorem . Now base currentLocation.lat - destinationLocation.lat 2 - currentLocation.long - currentLocation.long 2 .. . hypotenuse currentLocation.lat - destinationLocation.lat 2 - currentLocation.long - destinationLocation.long 2 .. . .. . .. . 3 . Calculate the angle now angleTowardsDestination Cos-1 base hypotenuse .. . .. . And that s the angle you need in degrees . Feel free to convert it to radian if needed . Kind Regards .. . Suman Adhikari Comment : maybe I found what s wrong in the code : in the last function body direction must be cast to CGFloat and there s no need to convert it to radians . Thanks anyway for your comment : - Comment : Your Welcome . And good luck with your project . Do write an update on what worked for you It can help someone in the future . Comment : of course my friend", "Question : I am trying to build and run the WhereamI.app example of the Big Nerd Ranch book : iOS Programming chapter4 . Compiling works just fine and it runs but the output to console is : server did not accept client registration 68 instead of providing the current GPS position and altitude . I am runing Xcode 4.1 on OS X Lion with the 4.3 SDK . There is nothing fancy at all in the code . JUst and instance of Corelocation manager and a simple delegation to WhereAmI.app .. . .. . Any clues .. . Answer : Like Brian Liang I don t think the code offered in the big nerd ranch forums is a fix per se because if you use that code you eliminate not only the application crash server did not accept client registration 68 you also render the application useless because the workaround overrides the method that a delegate for CLLocationManager would use to be aware of location updates overrides it in a way that basically says always update the location to lat : 42 long : -50 . So the forum code snippet mentioned here does eliminate the application crash but it makes all location updates amount to the same coordinates so you really can t use the application anymore . Not a fix in any grander sense of the word . Kind of let down really . Maybe this is just a simulator problem and not an issue on an actual phone Comment : Also if you use the forum hack update the lat and long to match the front door of apple headquarters so when you place your first annotation it shows up on the screen so you see it is working . I used initWithLatitude : 37.33165 longitude : -122.03075 and when I hit return for the first annotation a red pin pops up right next to the blue blinking apple headquarters location . Then also if you scroll away from apple headquarters and place another pin the map will center you back near apple headquarters so you can see the relocation feature in action too .", "Question : Prior to iOS 4.0 CoreLocation was reporting altitude correctly now it always reports as 0 ft . .. . .. . Not working on Device nor Simulator does anyone else experience this issue Comment : Are you testing this on a device or on the Simulator Comment : Device and Simulator . .. . Answer : Core Location does not always report altitude immediately . I usually check for a zero altitude in my success delegate method . If the altitude is still 0 I keep checking otherwise I turn of CoreLocation .", "Question : I have two ways of getting the magnetic fields strength x y and z using the iOS device s magnetometer . 1 Core Location .. . Used the CLHeading from CLLocationManagerDelegate method locationManager : didUpdateHeading : . This is similar to Apple s Teslameter sample app . 2 Core Motion .. . Used CMMagneticField from CMMotionManager s magnetometerData.magneticField . Questions : .. . a What is the difference between the two I am getting different values from both . I was expecting that they will return the same values . The difference is most notable when I start the app from a resting position face up in a table and then lift the device up in to the air . b If there is a difference when should I use the magnetic field from Core Location heading and when should I use the magnetic field from Core Motion Note : I also am not sure if the magnetic field of Core Location and Core Motion refer to different magnetic field concepts . Note : I computed strength as the square-root of x 2 + y 2 + z 2 for both approaches . Comment : +1 hmmm interesting question . Comment : Are you using the magneticHeading property of the CLHeading Comment : @ThomasW No sir I m using CLHeading s x y and z . .. . Answer : To unravel this I ve spent a bit too much time digging through the Apple docs . There are three ways of obtaining magnetometer data .. . .. . 1 Core Motion framework http : developer.apple.com library ios documentation CoreMotion Reference CoreMotion Reference index.html .. . CMMotionManagers s CMMagnetometer http : developer.apple.com library ios documentation CoreMotion Reference CMMagnetometerData Class Reference Reference.html apple ref doc c ref CMMagnetometerData class .. . .. . 2 Core Motion framework .. . CMDeviceMotion http : developer.apple.com library ios documentation CoreMotion Reference CMDeviceMotion Class Reference Reference.html apple ref doc c ref CMDeviceMotion CMCalibratedMagneticField property .. . .. . 3 Core Location framework https : developer.apple.com library IOs documentation CoreLocation Reference CLLocation Class CLLocation CLLocation.html .. . CLLocationManager s CLHeading .. . .. . 1 supplies raw data from the magnetometer . 2 and 3 return derived data . The numbers in both cases are similar though not exactly the same . Difference between Core Motion s CMMagnetometer and CMCalibratedMagneticField .. . .. . 1 and 2 - both from the Core Motion framework - differ as follows : .. . .. . CMDeviceMotion Class Reference .. . .. . Discussion .. . The CMCalibratedMagneticField returned by this property gives you the total magnetic field in the device s vicinity without device bias . Unlike the magneticField property of the CMMagnetometer class these values reflect the earth s magnetic field plus surrounding fields minus device bias . CMMagnetometer gives us raw data CMCalibratedMagneticField is adjusted data . Difference between Core Motion s CMCalibratedMagneticField and Core Location s CLHeading .. . .. . The docs are not immediately clear on the difference between 2 and 3 but they do generate different numbers so let s do some digging . Core Location framework .. . CLHeading .. . .. . From Location Awareness Programming Guide http : developer.apple.com library ios documentation UserExperience Conceptual LocationAwarenessPG GettingHeadings GettingHeadings.html apple ref doc uid TP40009497-CH5-SW1 .. . .. . Getting Heading-Related Events .. . .. . Heading events are available to apps running on a device that contains a magnetometer . A magnetometer measures nearby magnetic fields emanating from the Earth and uses them to determine the precise orientation of the device . Although a magnetometer can be affected by local magnetic fields such as those emanating from fixed magnets found in audio speakers motors and many other types of electronic devices Core Location is smart enough to filter out fields that move with the device . Here are the relevant CLHeading raw properties .. . .. . The geomagnetic data measured in microteslas for the x y z -axis . read-only .. . This value represents the x y z -axis deviation from the magnetic field lines being tracked by the device . older versions of the docs add : The value reported by this property is normalized to the range -128 to +128 . I am not clear how a microtesla measurement can be normalized compressed clipped to a range of + -128 and still represent the unit it claims to measure . Perhaps that s why the sentence was removed from the docs . The units on an iPad mini do seem to conform to this kind of range but the iPhone4S gives CMMagnetometer readings in higher ranges eg 200-500 . The API clearly expects you to use the derived properties : .. . .. . which give stable N S E W compass readings in degrees 0 North 180 South etc . For the true heading other Core Location services are required geolocation to obtain the deviation of magnetic from true north . Here is a snippet from the CLHeading header file .. . .. . Core Motion framework .. . CMDeviceMotion CMCalibratedMagneticField .. . .. . CMMagnetometer .. . .. . CMMagneticField .. . This is the struct that holds the vector . It s the same for CMDeviceMotion s calibrated magnetic field and CMMagnetometer s uncalibrated version : .. . .. . .. . .. . The difference between 2 and 3 are hinted at here : .. . .. . Core Location CLHeading .. . .. . Represents a vector pointing to magnetic North constructed from axis component values x y and z .. . .. . Core Location is smart enough to filter out fields that move with the device .. . .. . Core Motion CMCalibratedMagneticField .. . .. . represents Earth s magnetic field plus surrounding fields without device bias .. . .. . So - according to the docs - we have : .. . .. . 1 CMMagnetometer .. . Raw readings from the magnetometer .. . .. . 2 CMDeviceMotion CMCalibratedMagneticField magneticField .. . Magnetometer readings corrected for device bias onboard magnetic fields .. . .. . 3 CLHeading x y z .. . Magnetometer readings corrected for device bias and filtered to eliminate local external magnetic fields as detected by device movement - if the field moves with the device ignore it otherwise measure it .. . .. . Testing the theory .. . .. . enter image description here http : i.stack.imgur.com 32Tgu.png .. . .. . I have put a Magnet-O-Meter demo app on gitHub https : github.com foundry MagnetoMeter which displays some of these differences . It s quite revealing to wave a magnet around your device when the app is running and watching how the various APIs react : .. . .. . CMMagnetometer doesn t react much to anything unless you pull a rare earth magnet up close . The onboard magnetic fields seem far more significant than local external fields or the earth s magnetic field . On my iPhone 4S it consistently points to the bottom left of the device on the iPad mini it points usually to the top right . CLHeading . x y z is the most vulnerable responsive to local external fields whether moving or static relative to the device . CMDevice CMCalibratedMagneticField is the most steady in the face of varying external fields but otherwise tracks it s Core Location counterpart CLHeading . x y z pretty closely . CLHeading.magneticHeading - Apple s recommendation for magnetic compass reading - is far more stable than any of these . It is using data from the other sensors to stabilise the magnetometer data . But you don t get a raw breakdown of x y z .. . .. . yellow CMMagnetometer .. . green CLHeading . x y z .. . blue CMCalibratedMagneticField .. . red CLHeading.magneticHeading .. . .. . This does seem to contradict the docs which suggest that CLHeading . x y z should be less influenced by local external fields than CMCalibratedMagneticField . What approach should you take Based on my limited testing I would suggest .. . If you want a compass reading .. . CLHeading s magneticHeading and trueHeading will give you the most accurate and most stable compass reading . If you need to avoid Core Location .. . CMDeviceMotion s CMCalibratedMagneticField seems to be the next most desirable although considerably less stable and accurate than magneticHeading . If you are interested in local magnetic fields .. . CLHeading s raw x y and z properties seem to be more sensitive to local magnetic fields . If you want all of the data including onboard magnetic fields .. . Raw magnetometer data from CMMagnetometer . There is really not much point using this unless you are prepared to do tons of filtering as it is hugely influenced by magnetic fields generated on the device itself . Comment : Will there be a difference in values if CMAttitudeReferenceFrameXMagneticNorthZVertical is changed say to CMAttitudeReferenceFrameXTrueNorthZVertical If yes why did you choose CMAttitudeReferenceFrameXMagneticNorthZVertical Comment : @MiuMiu it won t make any difference as the reference frame only affects CMAttitude roll pitch yaw etc - which I am not using in this demo . Comment : Thank you for your answer . Since I am interested in local magnetic fields I will proceed with using CLHeading s raw x y and z values . Comment : This answer doesn t have nearly enough upvotes for its thoroughness . Comment : @nhgrif - thanks for the voluntary bounty award - your kind gesture is truly amazing", "Question : This question already has an answer here : .. . .. . iOS - MKMapView place annotation by using address instead of lat long questions 9606031 ios-mkmapview-place-annotation-by-using-address-instead-of-lat-long 5 answers .. . .. . I have a list of addresses with postcodes which I need to display on a map pin point . So far I know to use co-ordinates to show pin points on map with core-location framework . Is there any other way of doing it Like getting co-ordinates from address or use address to show pin points on map The main purpose is to calculate distances between locations . Please guide me here . Thanks Comment : Please try to search before asking . How can I plot addresses in Swift converting address to longitude and latitude coordinates http : stackoverflow.com questions 24706885 how-can-i-plot-addresses-in-swift-converting-address-to-longitude-and-latitude Comment : Thank you some times you don t have right search string when looking for any answers..Appreciate your time and guidance .. . Answer : To create an annotation from an address you need to use CLGeocoder s method geocodeAddressString : .. . .. . If you only want to get the coordinates for the location : Comment : Thank you..will try this now .", "Question : i try to get the longitude latitude of the user current location my code is simply this : .. . .. . i got always this error from the didFailWithError method : .. . .. . can you please tell me what i miss thx in advance : .. . Answer : Simply ignore this error and wait for more updates or a different error . The docs for the location manager say that this error is temporary . It s letting you know that it failed to immediately retrieve a location but it continues to try . In such a situation you can simply ignore the error and wait for a new event . Which is a really boneheaded way to use a method named locationManager : didFailWithError : - Thanks Apple Apple Documentation https : developer.apple.com library ios documentation corelocation reference cllocationmanagerdelegate protocol CLLocationManagerDelegate CLLocationManagerDelegate.html apple ref occ intfm CLLocationManagerDelegate locationManager : didFailWithError :", "Question : Is it possible to search for all iBeacons which are nearby I know it s possible to search iBeacons by UUID . But i want to find all iBeacons nearby . Comment : The API does not allow for such a call for security reasons but I can see how this would be very interesting . One idea would be to reverse engineer the iBeacon specification scan for all nearby peripherals then see if the broadcasted advertisements are iBeacons . Unfortunately Apple has not released the iBeacon specification . But it seems that they use encoded information in the advertisement to create an iBeacon . Because UUIDs of iBeacons will be random its doubtful that you can determine if a peripheral is an iBeacon from the advertisement alone unless you are Apple . Comment : I have a mac application that is useful for debugging but it can t run on iOS devices.. . You can find it here if you was interested : github.com liamnichols iBeaconScanner https : github.com liamnichols iBeaconScanner Comment : I made an app that does run on iOS devices requires jailbreak : malcolmhall.com products ibeaconscanner http : www.malcolmhall.com products ibeaconscanner .. . Answer : each APP would use it s own specific UUID using the major and minor integer values to differentiate between beacons . for example the UUID would be associated with a chain of shops major would identify the shop and minor the aisle or even a group of products . scanning for unknown UUID s would not be very useful as your app would not know what to do with the information . the UUID is generated once and for all using the uuidgen command in the terminal . sadly there is no protocol to actually communicate with beacons hence there is no standard to get the location of a beacon or any other useful info . it would have been so much better if we could open a connection to a beacon usually the closest one and obtain additional data from it without having to be on the same WIFI network . you either have to use bonjour to communicate with the device over WIFI or use the major and minor id to obtain data from a webservice of some kind . Comment : scanning for unknown UUID s would not be very useful as your app would not know what to do with the information . That is horribly false as sometimes one needs to see all beacons without any context", "Question : I have multiple view controllers that need to get the user s location so I wanted to create a separate class that the ViewControllers can call to get the user s latest location . locationManager : didUpdateToLocation : fromLocation returns void . How do I pass the latitude and longitude data back to my ViewControllers as soon as the user s latitude and longitude is calculated I could try writing getters and setters in my locationManaging class but if I do that how do I know when to call the latitude getter and longitude getter methods from my ViewController class How do I hold the ViewController s main thread to wait for the latitude and longitude values from the locationManaging class Thanks Comment : locationManager : didUpdateToLocation : fromLocation is a delegate method . The location manager uses this method to inform your object that the location was updated with a new value - it s up to you to implement this method to do something with the value . .. . Answer : Here s what I did when implementing a location manger singleton in swift . It s based on user1071136 s strategy as well as this swift pattern http : stackoverflow.com a 24073016 3330743 . Comment : Wear oven mitts when using a device running this code . Comment : I m currently trying to use your class but the app never asks for authorization nor i get a location . What do i need to do to use the class Comment : never forget the info.plst : stackoverflow.com questions 24050633 http : stackoverflow.com questions 24050633 implement-cllocationmanagerdelegate-methods-in-swift 24056771 24056771 Comment : @quellish can you explain your comment. . are you saying that this is a bad solution - for battery I am thinking of a pattern to implement CLLocation for multiple views as well . Comment : @SamYoungNY this class is setting the location accuracy and distance filter to reject any location data with a precision of less than 50 meters . That and constantly turning location updates on off like some other answers is not healthy for the device and does not help the application .", "Question : i try to get the longitude latitude of the user current location my code is simply this : .. . .. . i got always this error from the didFailWithError method : .. . .. . can you please tell me what i miss thx in advance : .. . Answer : 1 check that you actually have a valid WiFi and 3G connection .. . .. . if you do then .. . .. . 2 go to settings and reset your location services .. . 3 reset your network settings .. . .. . this should take care of that issue it is device network related not app related . Its annoying especially if your app is dependent on location services and the device is WiFi only and people give negative ratings on the Appstore... . pardon me I m getting a bit emotional there Comment : MeM don t get emotional this is the sign of good developer Comment : As far as I know GPS doesn t need either internet or wifi connection.It s just a receiver if it is in accessible location with 2 or 3 of GPS satellites we can get the geo location coordinates.Then why does the error come if there is no internet or wifi connection Comment : You shouldn t have to go through these steps . Simply ignore this error and wait for more updates . See my answer below or view the docs at developer.apple.com library ios documentation corelocation https : developer.apple.com library ios documentation corelocation reference cllocationmanagerdelegate protocol CLLocationManagerDelegate CLLocationManagerDelegate.html apple ref occ intfm CLLocationManagerDelegate locationManager : didFailWithError : Comment : I had exactly the same problem while playing with MapKit CoreLocation on my device iPhone 5S iOS 8.1.3 . I was unable to get a location and got the same error again again in spite of a good mobile network signal . Until I switched the WiFi On and everything was fixed Weird.. . Thanks Comment : @DuraiAmuthan.H iPads don t have actual GPS hardware . They use a database of wifi MAC addresses to determine your location .", "Question : null .. . Answer : I ve been working on a app that displays the current location of the user in a UILabel using the core-location framework in Xcode When a button is clicked the app calls the CLLocationManager that gets the users latitude and longitude . I also included reverse-geocoding to present the coordinates in a human-readable form . I have this code here . Header file .. . .. . Implementation file .. . .. . I got this output Comment : A line is causing the issue Because this message should be the equivalent of kill -15 so user killed the app . Comment : yea i misunderstood that line . There is no output actually when i run the app . when i click the Button that was supposed to get the location nothing happens . I think it is because i didn t request for authorization for the app to use the location services .", "Question : Is it possible to search for all iBeacons which are nearby I know it s possible to search iBeacons by UUID . But i want to find all iBeacons nearby . Comment : The API does not allow for such a call for security reasons but I can see how this would be very interesting . One idea would be to reverse engineer the iBeacon specification scan for all nearby peripherals then see if the broadcasted advertisements are iBeacons . Unfortunately Apple has not released the iBeacon specification . But it seems that they use encoded information in the advertisement to create an iBeacon . Because UUIDs of iBeacons will be random its doubtful that you can determine if a peripheral is an iBeacon from the advertisement alone unless you are Apple . Comment : I have a mac application that is useful for debugging but it can t run on iOS devices.. . You can find it here if you was interested : github.com liamnichols iBeaconScanner https : github.com liamnichols iBeaconScanner Comment : I made an app that does run on iOS devices requires jailbreak : malcolmhall.com products ibeaconscanner http : www.malcolmhall.com products ibeaconscanner .. . Answer : Unfortunately you cannot at this time search for an arbitrary iBeacon without first knowing the proximityUUID value . I ve tried writing directly to COREBluetooth and although you can discover and connect to transmitting beacons in your area what you get back is jibberish with no relation to the BLE UUID . So you can t even confirm that the peripheral you have connected to is in fact an iBeacon . This does not appear to be a limitation of the BLE spec rather it is a limitation that has been imposed by Apple . It also appears that this limitation does not exist for the Android platform . Until this gap is closed Android will have a significant advantage over iOS in this area . I disagree with previous comments that scanning for UUIDs would be useless . On the contrary if you knew the beacon UUID you could create a map of beacon location subject in the cloud and use it to navigate assuming the beacon was fixed using a web service . You could crowd-source the data so that eventually a very rich database of beacon UUID location pairs would be available to all who wanted to write location apps . Perhaps this is why Apple is hiding the info they may be holding this back for their own purposes .", "Question : I am working on a app that relies heavily on monitoring user visits in possibly multiple regions areas . I am currently experimenting with region monitoring which works pretty well however the location callback is not as accurate as I want it to be . I have seen CLVisit but the documentation out there doesnt explain it very well especially its use . Comment : Voodoo . It was covered in the core-location session of WWDC in 2014 - asciiwwdc.com 2014 sessions 706 http : asciiwwdc.com 2014 sessions 706 .. . Answer : I think you are misunderstanding the concept of CLVisits . There is actually no Visit object that you need to create . The CLLocationManager delegate method is triggered by the algorithm that apple has determined see wwdc lecture http : asciiwwdc.com 2014 sessions 706 for more info . This is explained in the CLLocationManager documentation https : developer.apple.com library prerelease ios documentation CoreLocation Reference CLLocationManager Class index.html apple ref occ cl CLLocationManager .. . .. . .. . Getting the Visited Locations .. . .. . In iOS the visits service provides an alternative to the significant location change service for apps that need location information about interesting places that the user visited . For example if the user is in one location for an extended period of time the service might generate an event when the user arrives at that location and another when the user leaves that location . The service is intended for apps that might already be using the significant location change service and want an even lower power way to do so . You would not use this service to create navigation apps or apps that rely on regular location updates . .. . To begin the delivery of visit-related events assign a delegate to the location manager object and call its startMonitoringVisits method . As the location manager generates visit events it delivers that information to its delegate s locationManager : didVisit : method . The event data delivered to your delegate includes only the information that occurred after you started the delivery of events . In other words if you start the delivery of events after the user arrived at an interesting location the event delivered by the system when the user departed that location would not reflect the actual arrival time . If the system terminates your app this service relaunches it when new visit events are ready to be delivered . That said if you look at this article from NSHipster http : nshipster.com core-location-in-ios-8 it references some current issues with CLVists for iOS 8.1 . It essentially goes on to say that if you want infrastructure that extremely precise don t use CLVisit . Seems like you re doing it right for now at least . CLVisit is as of iOS 8.1 not all that precise . While start and end times are generally accurate within a minute or two lines get blurred at the edges of what is and what is not a visit . Ducking into a corner coffee shop for a minute might not trigger a visit but waiting at a particularly long traffic light might . It s likely that Apple will improve the quality of visit detection in future OS upgrades but for now you might want to hold off on relying on CLVisit in favor of your own visit detection for use cases where it s vital your data is as accurate as it can be .", "Question : This question already has an answer here : .. . .. . iOS - MKMapView place annotation by using address instead of lat long questions 9606031 ios-mkmapview-place-annotation-by-using-address-instead-of-lat-long 5 answers .. . .. . I have a list of addresses with postcodes which I need to display on a map pin point . So far I know to use co-ordinates to show pin points on map with core-location framework . Is there any other way of doing it Like getting co-ordinates from address or use address to show pin points on map The main purpose is to calculate distances between locations . Please guide me here . Thanks Comment : Please try to search before asking . How can I plot addresses in Swift converting address to longitude and latitude coordinates http : stackoverflow.com questions 24706885 how-can-i-plot-addresses-in-swift-converting-address-to-longitude-and-latitude Comment : Thank you some times you don t have right search string when looking for any answers..Appreciate your time and guidance .. . Answer : Here is the simple code snippet that shows how to show the pin on the map for the given array of address . Comment : Thank you for your answer", "Question : On early 2014 Apple has updated the iOS 7.0 to 7.1 in order to allow location updates even when the app is not active on foreground and not in the background . How do we do that I have read some articles like Apple s iOS 7.1 will fix a geolocation bug http : venturebeat.com 2014 02 11 apples-ios-7-1-will-fix-a-geolocation-bug-after-developer-sends-letter-to-tim-cook . But Apple didn t provide much communication related to that nor any sample code on how to get the location update even when the app is killed terminated suspended . I have read the Release Notes for iOS 7.1 https : developer.apple.com library ios releasenotes General RN-iOSSDK-7.1 index.html apple ref doc uid TP40013935 . I couldn t find anything related to that as well . So how do we actually get the location update for iOS 7 and 8 even when the app is suspended .. . Answer : After months of trials and errors by experimenting the Core Location Framework I have found the solution to get location update even when the app is killed suspended . It works well for both iOS 7 and 8 . Here is the solution : - .. . .. . If your app is a location based mobile-application that needs to monitor the location of the device when it has significant changes the iOS will return you some location coordinates when the device has moved more than 500 meters from the last known location . Yes even when the app is killed suspended either by the user or iOS itself you still can get the location updates . So in order for a locationManager to get location update even when the app is killed suspended you must use the method startMonitoringSignificantLocationChanges you can not use startUpdatingLocation . When iOS wants to return the location update to the app it will help you to relaunch the app and return a key UIApplicationLaunchOptionsLocationKey to the app delegate method didFinishLaunchingWithOptions . The key UIApplicationLaunchOptionsLocationKey is very important and you must know how to handle it . You must create a new locationManager instance when you receive the key and you will get the location update on the locationManager delegate method didUpdateLocations . Here is the sample code : - .. . .. . In addition to the didFinishLaunchingWithOptions method I have created the locationManager instance when the app is active . Here are some code examples : .. . .. . I have written an article explaining on the details on how to get the location update for iOS 7 and 8 even when the app is killed suspended . I have also uploaded the complete source code on GitHub with the steps on how to test this solution . Please visit the following URLs for more information : - .. . .. . 1 . Getting Location Updates for iOS 7 and 8 when the App is Killed Terminated Suspended http : mobileoop.com getting-location-updates-for-ios-7-and-8-when-the-app-is-killedterminatedsuspended .. . 2 . Source Code on GitHub - Get the Location Updates Even when the iOS mobile apps is Suspended Terminated Killed https : github.com voyage11 GettingLocationWhenSuspended Comment : Great post Thanks again Comment : No problem . Remember to vote and favourite if it is useful . Comment : You must create a new locationManager instance when you receive the key - sounds a bit confusing do you mean exactly NEW locationManager instance I have a shared instance of locationManager in my project - can I just reuse it Comment : Good question . When the app is suspended the shared locationManager that you have created earlier will be flushed out from the memory as well . How do you reuse an instance that does not exist in the memory So creating a new instance is the only way . Comment : Is it possible to save locations and logs with core-data when app is terminated or only in .plist file", "Question : i try to get the longitude latitude of the user current location my code is simply this : .. . .. . i got always this error from the didFailWithError method : .. . .. . can you please tell me what i miss thx in advance : .. . Answer : Issues like this can be resolved by setting location as Apple . At least it works for testing purpose .", "Question : Prior to iOS 4.0 CoreLocation was reporting altitude correctly now it always reports as 0 ft . .. . .. . Not working on Device nor Simulator does anyone else experience this issue Comment : Are you testing this on a device or on the Simulator Comment : Device and Simulator . .. . Answer : If you re using startMonitoringSignificantLocationChanges which was a feature new to iOS 4.0 then you will not get altitude updates . This low-power mode only uses cell towers to figure out a user s location and this method not report altitude . More generally the iPhone has three ways of figuring out your location -- cell towers wi-fi and GPS . You will only get altitude when the GPS is being used . So even if you set your desiredAccuracy setting to be really precise to force the device to use GPS if a user is indoors the iPhone probably won t be able to get a GPS signal and will fallback to cell or wi-fi . In that case you won t get an altitude . Also consider users who are on an iPod Touch -- it only has the ability to get a location via wi-fi and thus also won t report an altitude .", "Question : I know Core Location isnt always accurate on the iPhone . Is there a way to use the location lat long along with the accuracy to then grab all of the possible suburbs streets in that area So instead of using the reverse-geocoding and having it guess the best possible suburb street is there a way to make it give an array or in some other format of all the possible suburbs streets that it could consider Thanks Comment : Hey Zac Take a look ate the comment that I have posted under yours on my answer . .. . Answer : So the best approach to do this is using the Google maps API . For example take a look ate the following url : http : maps.google.com maps geo q 38.4417077 -90.7122047 output xml http : maps.google.com maps geo q 38.4417077 -90.7122047 output xml .. . .. . As you can see for this pair latitude-longitude you have 10 possible placemarks for this coordinates . The documentation for this you can find at : http : code.google.com apis maps documentation geocoding index.html .. . .. . You can see that you get the info in XML JSON CSV . Take a look at the status code it is important to verify if the request was successful usually 200 or 200 and something . So how to use it VFN It is simple . on locationString is the response from Google Geocoder now you can use the info as you want . Remember to first check the status code and than parse the info . If you want only the first placemark that is selected by Google Geocoder I would suggest you to use the output in CSV that is easy to work with . If you have any queries let me know Cheers .. . VFN Comment : I have no trouble getting the street suburb city postal-code . What I want to do it use the coordinate and the radius that Core Location gives me to then get all of the streets suburbs within the radius from the coordinate . So lets say I have the coordinate -33.888068 151.205521 and an accuracy of 3km . I want to find all of the suburbs within 3km of that coordinate . Those being Chippendale Surry Hills Redfern Alexandria Eveleigh etc . Thanks for the help but it gives me the same info that I already have . Comment : Hey Zac Because of that I put the link of for the documentation on my answer . Take a look at : code.google.com apis maps documentation geocoding Viewports http : code.google.com apis maps documentation geocoding Viewports You can define the center of the region and the span for the bounding-box . The code posted above is only to illustrate in the case that you didn t know how to use the API . Let me know if it is enough . Cheers Comment : So how do I use that information to then get the suburbs Preferably in an array . Sorry i havent used XML before . Im using this : NSString stringWithFormat : @ maps.google.com maps http : maps.google.com maps geo q f f output xml ll f f spn f f quot latitude-longitude latitude-longitude location horizontalAccuracy location horizontalAccuracy Comment : Here it is how to work with XML developer.apple.com mac library documentation Cocoa Reference http : developer.apple.com mac library documentation Cocoa Reference Foundation Classes NSXMLParser Class Reference Reference.html and you can check the Apple examples at : developer.apple.com mac library samplecode ImageMap index.html http : developer.apple.com mac library samplecode ImageMap index.html apple ref doc uid DTS40009015 Comment : ok so i have been able to get it to save an array of the locations . so that is all good but while it is parsing the xml the whole UITableView is unusable . So I either need to do some sort of threading or something so that the user can still use the app while the location is being found . Is there a shorthand way with XML or do I have to get in to threading", "Question : Prior to iOS 4.0 CoreLocation was reporting altitude correctly now it always reports as 0 ft . .. . .. . Not working on Device nor Simulator does anyone else experience this issue Comment : Are you testing this on a device or on the Simulator Comment : Device and Simulator . .. . Answer : From the Core Location Data Types Reference http : developer.apple.com library ios documentation CoreLocation Reference CoreLocationDataTypesRef Reference reference.html : .. . .. . The CLLocationDistance data type the data type for altitude is a double . The formatter you are using for your stringWithFormat is an integer . You need to cast your altitude to an integer first or use a double f formatter . Comment : I am converting altitude to an integer . As I stated this worked perfectly ie . no code changed prior to iOS 4.0 . Comment : Also the way I have it gave me perfect altitude used to show for example 5280 ft . Comment : @WrightsCS have you tried the double formatter as suggested to see if that makes a difference Comment : Yes produces all 0 s .", "Question : Is there a way to manually tell the device to dispatch a significant location change-notification that will wake up any applications registered for this notification This is for testing only and I realize this private API call would get rejected upon submission to the app-store . Comment : I dug through the private framework headers and could not find anything that resembled a trigger for this . It s not convenient to only be able to test this by getting in the car and driving around with a laptop . Comment : If you use the CLLocationManager didUpdateToLocation : fromLocation : delegate then you can use startUpdatingLocation instead of startMonitoringSignificantLocationChanges for test-purpose . With no filter set inside the CLLocationManager it calls didUpdateToLocation nearly every second if you have medium-good gps-reception . For test-purpose this could help . Comment : It s not really a matter of testing the output of CLLocationManager as much as the lifecycle of the app when woken up by a significant location change . Comment : If you have an Apple Dev account you may want to take a look at the iOS5 UIAutomation . It may eventually provide you with a solution . The only road-block is I don t know if you can put a program into background mode via UIAutomation . .. . Answer : In iOS 4 you can register for significant location changes . From the Apple docs : With this service location updates are generated only when the user s location changes significantly thus it is ideal for social applications or applications that provide the user with noncritical location-relevant information . If the application is suspended when an update occurs the system wakes it up in the background to handle the update . If the application starts this service and is then terminated the system relaunches the application automatically when a new location becomes available . This service is available in iOS 4 and later only on devices that contain a cellular radio . See the Apple docs here http : developer.apple.com library ios documentation iPhone Conceptual iPhoneOSProgrammingGuide BackgroundExecution BackgroundExecution.html and here http : developer.apple.com library ios documentation UserExperience Conceptual LocationAwarenessPG CoreLocation CoreLocation.html . Here is some example code to register for signification location updates : .. . .. . .. . .. . The docs say : if you leave this service running and your application is subsequently suspended or terminated the service automatically wakes up your application when new location data arrives . At wake-up time your application is put into the background and given a small amount of time to process the location data . Because your application is in the background it should do minimal work and avoid any tasks such as querying the network that might prevent it from returning before the allocated time expires . If it does not your application may be terminated . Comment : Thanks.. . I get how it works and have been using it for some time . The question is how to test it without driving around in a car getting the device to trigger it . Comment : Ah sorry . Can I delete my answer" ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
abcpdf@.net@162
abcpdf -- abcpdf is websupergoo s software component for generating and manipulating pdf documents dynamically on windows based systems supporting the microsoft @placeholder framework and asp com .
{ "confidence": [ 56.763946533203125, 47.27900695800781, 46.0694580078125, 45.85316467285156, 45.29681396484375, 44.97418975830078, 44.868492126464844, 44.868492126464844, 44.868492126464844, 42.50614929199219, 42.50614929199219, 42.50614929199219, 42.50614929199219, 42.50614929199219, 42.12633514404297, 42.12633514404297, 41.44443893432617, 41.44443893432617, 41.400596618652344, 41.400596618652344, 41.3232421875, 41.3232421875, 41.3232421875, 41.18013000488281, 41.077857971191406, 41.077857971191406, 40.92570114135742, 40.92570114135742, 40.92570114135742, 40.92570114135742, 40.92570114135742, 40.92570114135742, 40.92570114135742, 40.707664489746094, 40.39596176147461, 40.03965759277344, 39.87722396850586, 39.87722396850586, 39.87722396850586, 39.87722396850586, 39.87722396850586, 39.61772155761719, 39.037925720214844, 39.037925720214844, 39.037925720214844, 39.037925720214844, 39.037925720214844, 38.729591369628906, 38.729591369628906, 38.69432067871094, 38.69432067871094, 38.6205940246582, 38.6205940246582, 37.97336959838867, 37.95130157470703, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 37.45747375488281, 36.40899658203125, 36.40899658203125, 36.23759078979492, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.94232940673828, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.61478042602539, 35.4517707824707, 35.15237045288086, 35.15237045288086, 34.96923828125, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.56630325317383, 34.476036071777344, 34.361881256103516 ], "content": [ "I use ABCpdf to output pdf documents .", "I have used ABCPdf component to generate pdf files .", "For what it s worth the staff at WebSuperGoo the vendor of AbcPdf is great with replying to support questions such as this .", "I try it from documentation Can ABCpdf convert my Microsoft Office documents to PDF", "This is not possible with abcPDF .", "I m dynamically generating a PDF using ABCpdf which contains a table of contents that would link-to other pages within the same PDF .", "Am printing an image in a pdf using abcPdf .", "I m currently using ABCPDF to transform HTML into PDF .", "Hi I m trying to create a report in PDF with abcPdf .", "I am trying to render a PDF from html using ABCPdf .", "I am using Abcpdf 8.1 to convert html page to pdf .", "I am using AbcPdf to convert pdf files into html pages .", "I m trying to apply css to my PDF when using ABCPDF .", "I am using AbcPDF http : www.websupergoo.com for converting HTML to PDF .", "I coded my version of the WebSuperGoo ABCpdf Xaml table example in an ASP.NET VB web app .", "I received the following response from WebSupergoo tech support : This is a problem with Gecko 21 which ABCpdf 9 currently uses .", "Is this possible with ABCpdf 8.1", "AbcPDF is not free too .", "Using the lastest ABCpdf 9.1.2.5 will fix the issue .", "I encounter same issue using ABCpdf 9.1.1.3", "What ABCPdf version you have", "The question above was referring to ABCpdf 8.0 .", "I ve found abcPDF to be strange and unpredictable .", "To get past the error here s what I did : .. . .. . Uninstalled all versions of abcPDF from the server .. . Confirmed that the GAC c : windows assembly did not contain any copies of abcPDF assemblies .. . Reinstalled the latest version of abcPDF 8.1.1.2 at time of writing .. . Confirmed that all web.config files referenced the 8.1.1.2 version of the abcPDF assembly .", "Jos Vernon at websupergoo came up with a splendidly simple answer that uses ABCpdf capabilities .", "WebSuperGoo responded : .. . .. . ABCpdf does not currently support fonts added using @font-face .", "Is there a function in abcpdf that will allow me to export the current page to pdf", "I would like to convert Svg stream to Pdf using ABCPdf in C .", "ABCpdf uses the version of Internet Explorer installed on the server to generate a pdf .", "We ve got a web system that generates dynamic pdf files with ABCpdf .", "I have a web app that creates a pdf using Websupergoo s ABCPDF .", "Is it possible to add document JavaScripts to a generated PDF using ABCPdf", "I am using abcPdf to convert an HTML report into a pdf file .", "For the ABCPDF v6 software I have discovered through Mihai s suggestion that it is possible .", "I don t concentrate on AbcPdf .", "This doesn t make a lot of sense because AbcPdf uses service side logic to create the PDF based on what methods you are using to create the document ex .", "We are using abcpdf license version for converting html to pdf .", "The only problem is that the Javascript isn t quite completing by the time that ABCpdf renders the pdf .", "My Library dealing with PDF files is abcpdf in Version 8.1 .", "When I was using abcPdf v7 the resulted pdf was fine .", "I am using ABCPDF 8 for .NET to generate PDF .", "So I talked to the support at WebSuperGoo The creators of ABCpdf and they gave me the following : .. . .. . This solution is equal to my first solution but it incorporates the page rotation and is very fast .", "This webservice has code to use Abcpdf API .", "Does AbcPdf let you create HTML pages", "The pieces were assembled using ABCpdf 9.1 .", "Error : ABCpdf error 80070000 Unable to render HTML .", "Have you got the new version of ABCpdf 8", "Found this while googling not sure if it works with your solution websupergoo.com abcpdf-9.htm http : www.websupergoo.com abcpdf-9.htm", "ABCpdf seems to sometimes ignore style-classes http : stackoverflow.com questions 2104635 abcpdf-document-not-applying-css .", "So ABCpdf on its own : Not possible .", "So as of the 9.0 release of ABCpdf that s that .", "Website B call url on B for HTML to PDF abcpdf method .", "Everything I listed as a Con for the HTML - PDF solution was easily doable in ABCpdf .", "I am trying to use ABCpdf .NET with Azure App Service and getting the following error when generating a PDF .", "When I call ABCpdf Doc.Save HttpResponseStream the browser opens a PDF viewer and the PDF page is blank .", "I have started to use abcpdf for a c application .", "I am using Doc.AddImageHtml method provided by ABCPdf .", "However there doesn t appear to be a xxx.Form.Fields.Field option with this version of ABCPDF .", "We are trying to use WebSupergoo s ABCpdf .NET v10 .", "but We already have licensed for ABCpdf 7 .", "Have you tried the latest version of ABCpdf", "ABCpdf appears to have many options for embedding images .", "I ve had a similar issue with fonts on ABCPdf .", "ABCpdf includes two HTML rendering engines .", "I d like it too is there a UserVoice or something for ABCPDF", "This is how you use ABCPdf to accomplish that goal .", "I am using ABCpdf tool and I am trying to split 1TB of PDF files so efficiency is a concern into single page PDF files .", "Has anyone tried to implement tags using the ABCPDF Gecko engine", "I have followed the instructions Using @font-face with ABCPDF", "But I wanted to know if there was a setting for ABCPDF in order to ensure that the header is not generated .", "There is an updated solution for this latest version of ABCpdf 9.0 this is an efficient and faster way of doing .", "Just FYI I think the ABCPdf 8.1 release addressed this issue .", "I uninstalled all abcpdf stuff re-installed the latest and all was well", "Not just ABCpdf but also the printed will spit out an extra page .", "Not just ABCpdf but also the printed will spit out an extra page .", "abcpdf uses IE8s rendering engine and as such makes a blank page .", "It sounds like you re not sure if ABCPDF is even capable of altering the PDF form field common properties to not hidden .", "I need your help to show charts while rendering pdf using ABCpdf .", "i am looking for a method to convert a pdf document into corresponding html document using abcpdf .", "You can definitely convert HTML to PDF but I am not sure the inverse is possible to do with abcpdf .", "Have any of you tried to convert .docx file into .pdf using ABCPdf library in parallel loop", "See : stackoverflow.com questions 15572165 http : stackoverflow.com questions 15572165 detect-orientation-of-every-page-in-a-pdf-using-abcpdf", "I am considering getting rid of ABCPDF altogether and replace it with SSRS which can render PDF formats .", "It sounds like ABCpdf may be repeating the images rather than inserting each of them once into the PDF and referencing them .", "I m trying to render a web page that contains images into a pdf document using ABCpdf .", "Do you know if there is any way to tell abcPdf to scale the HTML page to fit on a single page in the pdf", "According to ABCPdf site Fonts are cached so newly added fonts will not be available to ABCpdf until the application is restarted . http : www.websupergoo.com helppdfnet source 5-abcpdf doc 1-methods embedfont.htm .", "EDIT : I completed this project using ABCpdf .", "Wondering if ABCPdf to could replace PRINCE in this example .", "ABCpdf : SetConfigSection http : www.websupergoo.com helppdfnet source 5-abcpdf xsettings 1-methods setconfigsection.htm .. . .. . Here is my configuration or at least part of it .", "The server application uses AbcPdf to wait until the page is completely loaded render and save the requested page to a PDF .", "I have a problem with ABCPdf when I try to convert a pdf files into seperate image files as fallbacks for old browsers .", "I want to extract this XML file from the PDF A 3 using abcpdf 8.1 with C .", "My question is how to extract read the xml which is inside the pdf with this library abcpdf .", "I don t know abcpdf but I guess that the pdf libs offer similar access to the pdfs content .", "A clarification on this - ABCpdf WILL render fonts if they are installed on the machine rendering the pdf no face-face css .", "How can I download an HTML file as a PDF using abcpdf in ASP.Net C", "I have a html document and to create PDF out of it I am using abcPdf .", "My replies may feature concepts based around ABCpdf .NET because it s something I work on .", "ABCpdf render an HTML within a template : How to add margin" ] }
{ "confidence": [ 78.26258850097656, 69.61959075927734, 68.09037780761719, 67.5179443359375, 64.48677825927734, 63.871673583984375, 63.6200065612793, 62.106231689453125, 61.991336822509766, 60.44355773925781, 58.90346908569336, 57.81232833862305, 56.731136322021484, 56.713462829589844, 56.68751525878906, 56.48312759399414, 55.07538604736328, 54.62027359008789, 54.1768684387207, 54.07319259643555 ], "content": [ "Question : I m dynamically generating a PDF using ABCpdf which contains a table of contents that would link-to other pages within the same PDF . The problem is that the path of the anchor tags in the HTML get changed to an absolute path to a temporary file . For example ABCpdf would render the link s href : .. . .. . in the PDF as : file : C : Users Aaron AppData Local Temp ABCpdf pdfCMMYPSF.htm elementId .. . .. . This is how I generate the PDF : .. . .. . Any ideas how I can get the anchor links to render properly so clicking it will jump to another page Comment : Just FYI I have had pretty good luck getting support directly from the makers of ABCpdf . Tried that Comment : Just sent them an email thanks for the suggestion . Comment : WebSuperGoo support is excellent and one of the best around Bryan is spot on with this suggestion . .. . Answer : Another method which has worked for me in the latest ABCpdf version 9 is to add a bookmark to each page in your document : .. . .. . Then where you want to insert a link you can reference the bookmark - in this case we create a table of contents by looping through each bookmark we ve created : .. . .. . The Websupergoo team supplied me with some example code and that s what this is based off of - so thanks to them", "Question : I m dynamically generating a PDF using ABCpdf which contains a table of contents that would link-to other pages within the same PDF . The problem is that the path of the anchor tags in the HTML get changed to an absolute path to a temporary file . For example ABCpdf would render the link s href : .. . .. . in the PDF as : file : C : Users Aaron AppData Local Temp ABCpdf pdfCMMYPSF.htm elementId .. . .. . This is how I generate the PDF : .. . .. . Any ideas how I can get the anchor links to render properly so clicking it will jump to another page Comment : Just FYI I have had pretty good luck getting support directly from the makers of ABCpdf . Tried that Comment : Just sent them an email thanks for the suggestion . Comment : WebSuperGoo support is excellent and one of the best around Bryan is spot on with this suggestion . .. . Answer : Websupergoo got back to me and I was able to debug my problem from a sample project they provided . The solution to my problem was pretty simple I ll post the answer here in case anyone else is having the same issue : .. . .. . My HTML was set up like this : .. . .. . I simply needed to change it to : .. . .. . You need to use an anchor tag with the name specified in order for ABCpdf to make the link jump to another page within the same PDF . Comment : This works Also a note for others if you are using base href in your head tag-it will screw up your anchors so you will need reference everything with a absolute url Comment : It works for me as well . I also had to set document.HtmlOptions.AddLinks true and run document.HtmlOptions.LinkPages after flattening the document .", "Question : I have had some long standing code which has worked fine for quite some time . Recently it began generating the following error . 1st on a asp site and later on a .Net MVC site . Neither of which have changed . I really curious as to why the this error now is rising . I am hoping this post will be of use to someone in the future since the solution was difficult to find searching the error itself . Error : ABCpdf error 80070000 Unable to render HTML . Unable to get printer device-mode size . Microsoft XPS Document Writer Windows error 5 . Access is denied . Some research suggest that it is because the xps writer is not installed but this was not the case or that permissions were set up incorrectly . Comment : I moved the answer out of the comment and put it below . .. . Answer : Have you got the new version of ABCpdf 8 As with older versions they use the IE rendering engine if you upgrade the server machine which is running ABCpdf to IE8 or higher abc pdf no longer have access to the rendering engine and will produce some very very odd results . With 8 and above I have found the most consistence rendering is gained by changing the rendering engine used .. . .. . this means youi are also not using IE which can only be a good thing . Comment : The question above was referring to ABCpdf 8.0 . Websupergoo recently put out a new version 8.1 . Though I was able to fix the problem using their recommendations listed above I think they may have addressed the issues in this release .", "Question : This may be more of a tech support issue but I m wondering if any other developers have come across this : .. . .. . I m using Abcpdf in my ASP.NET code to generate a PDF from HTML . It works fine but one user is generating PDFs that don t have the CSS applied IE8 Adobe Acrobat latest version - same as everyone else . Since this is the only user complaining I m sure it s a local setting but I can t figure out what would prevent the css from loading - a browser setting An Acrobat setting Does anyone have any suggestions Comment : I am having a similar issue - my styles are in the html page style tag and are rendered fine in HTML but not respected during PDF creation . If I put a style directly on an element it shows in the PDF but having it above in style doesn t register . Comment : Is the code running on a website or code running on the local users machine .. . Answer : Perhaps an issue with different versions of Acrobat reader I d look into this . This doesn t make a lot of sense because AbcPdf uses service side logic to create the PDF based on what methods you are using to create the document ex . AddImageUrl vs drawing out the document manually etc . . For what it s worth the staff at WebSuperGoo the vendor of AbcPdf is great with replying to support questions such as this . I ve run across a few edge cases with their product that they ve always followed up with workarounds or alternatives to address in a timely manner . Comment : +1 for WebSuperGoo support . Excellent", "Question : I am using ABCpdf tool and I am trying to split 1TB of PDF files so efficiency is a concern into single page PDF files . I have tried the following : .. . .. . This one is very fast BUT it does not keep the rotated pages and they NEED to be . I tried to rotate them manually but this very quickly got a bit messy and they did not come out the precise way as they were in the original document . I have also tried : .. . .. . This one is about 6 times slower on large documents than the first one BUT it keeps the formatting of the rotated pages and that is important . The problem with this one is that I have to append the whole document and remove all the unwanted pages again . This is done for all pages in the file which is very inefficient . Can anybody help me on this matter Comment : Ideally the support staff of the component ABC.. . can help you with this - try their support first.. . Comment : Ok I will try that as well . I will keep this thread posted . Thank you . .. . Answer : So I talked to the support at WebSuperGoo The creators of ABCpdf and they gave me the following : .. . .. . This solution is equal to my first solution but it incorporates the page rotation and is very fast . I hope this can help others as well .", "Question : how to convert the WPS Office Word document to pdf excel to pdf ppt to pdf using ABC PDFin dot net . I try it from documentation Can ABCpdf convert my Microsoft Office documents to PDF http : www.websupergoo.com support.htm .. . .. . please any one can help me . .. . Answer : From section 6.1 of the link in the question : .. . .. . To convert Office documents ABCpdf .NET requires either WordGlue .NET http : www.websupergoo.com wordglue-1.htm or the use of MS Office or OpenOffice.org as helper applications . We would recommend you use the current versions which must be installed on the same system as ABCpdf . So ABCpdf on its own : Not possible .", "Question : I m dynamically generating a PDF using ABCpdf which contains a table of contents that would link-to other pages within the same PDF . The problem is that the path of the anchor tags in the HTML get changed to an absolute path to a temporary file . For example ABCpdf would render the link s href : .. . .. . in the PDF as : file : C : Users Aaron AppData Local Temp ABCpdf pdfCMMYPSF.htm elementId .. . .. . This is how I generate the PDF : .. . .. . Any ideas how I can get the anchor links to render properly so clicking it will jump to another page Comment : Just FYI I have had pretty good luck getting support directly from the makers of ABCpdf . Tried that Comment : Just sent them an email thanks for the suggestion . Comment : WebSuperGoo support is excellent and one of the best around Bryan is spot on with this suggestion . .. . Answer : For what it s worth I ve had inconsistant results via the AddImageHtml regarding anchored bookmarks . The most reliable way to accomplish this is via the AddBookMark method but this would involve significantly more work as you d be working to manually reconstruct the PDF contents and HTML support in that fashion is limited . More information regarding this method can be found at : .. . .. . http : www.websupergoo.com helppdf7net source 5-abcpdf6 doc 1-methods addbookmark.htm .. . .. . Perhaps their latest version 8 addresses this issue . The bookmarks always seem to resolve to an absolute location rather than relative as you see in your browser via conventional HTML .", "Question : I am moving my application from IIS 6.0 Windows Server 2003 to IIS 7.5 Windows Server 2008 R2 and it use the WebSuperGoo ABCpdf control to convert web pages into printable PDFs . When I browse to the page that converts the webpage to a PDF it generates a PDF of a Navigation to the web was cancelled error page . I am using the 8.1.0.9 version of the ABCpdf and changed the namespace in the page from WebSupergoo.ABCpdf7 to WebSupergoo.ABCpdf . Has anyone expected this issue and know how to solve it .. . Answer : This could also be that the server cant see the website URL . this is normal on production servers running a NAT . Just change the hostfile on the server to allow the domain to resolve .", "Question : I am moving my application from IIS 6.0 Windows Server 2003 to IIS 7.5 Windows Server 2008 R2 and it use the WebSuperGoo ABCpdf control to convert web pages into printable PDFs . When I browse to the page that converts the webpage to a PDF it generates a PDF of a Navigation to the web was cancelled error page . I am using the 8.1.0.9 version of the ABCpdf and changed the namespace in the page from WebSupergoo.ABCpdf7 to WebSupergoo.ABCpdf . Has anyone expected this issue and know how to solve it .. . Answer : I just encountered the same error and my co-worker had an immediate answer . In my case it was that the website was protected with a password by IIS . ABCpdf does not know how to enter credential information so it won t work if the page is asking for username password .", "Question : I am moving my application from IIS 6.0 Windows Server 2003 to IIS 7.5 Windows Server 2008 R2 and it use the WebSuperGoo ABCpdf control to convert web pages into printable PDFs . When I browse to the page that converts the webpage to a PDF it generates a PDF of a Navigation to the web was cancelled error page . I am using the 8.1.0.9 version of the ABCpdf and changed the namespace in the page from WebSupergoo.ABCpdf7 to WebSupergoo.ABCpdf . Has anyone expected this issue and know how to solve it .. . Answer : I have abandoned ABC PDF all together and replaced it with Winnovative HTML to PDF Convertor for .NET http : www.winnovative-software.com Html-To-Pdf-Converter.aspx .. . .. . We renewed our redistributable license because another developer within our company was using an older version and mentioned it would be a good replacement for ABC PDF .", "Question : I recently upgraded abcPDF from v8.1.0.7 to v8.1.1.1 and then later from v8.1.1.1 to v8.1.1.2 . After the upgrades I got errors similar to the following whenever I tried to generate a PDF : .. . .. . Gecko engine failed to render the page : Gecko engine crashed . Gecko engine crashed.. . .. . Failed to add HTML : Gecko engine crashed . Gecko engine crashed . Gecko engine crashed.. . .. . .. . We re using the Gecko engine instead of the default MSHTML engine to render PDFs . We didn t get the error message until immediately after we upgraded abcPDF . This is in a .Net Framework 4.0 C ASP.Net web application hosted on 64-bit Windows Server 2008 R2 . How do I get past this error .. . Answer : Here s how I solved the problem in case anyone out there has the same issue : I had originally installed the newer version of abcPDF without uninstalling the old version first . To get past the error here s what I did : .. . .. . Uninstalled all versions of abcPDF from the server .. . Confirmed that the GAC c : windows assembly did not contain any copies of abcPDF assemblies .. . Reinstalled the latest version of abcPDF 8.1.1.2 at time of writing .. . Confirmed that all web.config files referenced the 8.1.1.2 version of the abcPDF assembly . Once I did all of the above I was able to render PDFs without errors once again . Comment : Thank you so much for posting this fix Comment : Sure enough what I thought was an upgrade was actually a concurrent install which broke the component Your solution worked . I uninstalled all abcpdf stuff re-installed the latest and all was well", "Question : I have an HTML report with each print page contained by a div class page . The page class is defined as .. . .. . After making a few changes to my report content when I call abcPDF to convert the report to PDF suddenly I m getting a blank page inserted after every real report page . I don t want to roll back the changes I ve just made to remove this problem so I m hoping someone may know why the extra pages are being inserted . .. . Answer : I have experienced the same exact problem . the empty page is due to the page-break-after : always in the CSS . Not just ABCpdf but also the printed will spit out an extra page . So I used the following code to eliminate the last page : MyDoc.Delete MyDoc.Page .. . .. . This however lead to a different kind of a problem . On development server which has IE 8 I get an extra blank page and on production where I have IE6 I get no extra blank page . So I have emailed the support team at websupergoo to show me a way to look for a blank page . The idea is to iterate through a pdf and identify all blank pages and delete them using above logic . And I second Jakkwylde s opinion . Websupergoo folks are extremely helpful and prompt in responding . I had another problem getting ABCpdf to work under 64 bit and had spent almost a day trying to figure it out . They provided me multiple scenarios which I could try out . Their support was right on the money and I got my app up and running in minutes . Comment : Had the same problem with different IE versions on different environments . I follow the same approach and it has worked well for me so far . Comment : Look for the code I posted down below to remove blank pages .", "Question : I have ABCPDF version 9 converting an HTML page to a 3 page PDF correctly with MSIE but the same code truncates after the first page with Gecko . The relevant code is : .. . .. . In debug mode theDoc.Chainable pageRef returns true when the rendering engine is MSIE but false when the rendering engine is Gecko . Suggestions for correcting this Comment : I received the following response from WebSupergoo tech support : This is a problem with Gecko 21 which ABCpdf 9 currently uses . You can reproduce the problem to see that there is only one page by using Print Preview in Firefox 21 . Since the Firefox 26 does not cause the problem this should be resolved when ABCpdf is eventually updated to use a newer version of Gecko . I ve asked them if there a Gecko-based workaround or an estimated date to the update of ABCpdf to use a newer version of Gecko will post a response when I get one . Comment : This issue is specific to the particular HTML which Eric is using . Changing the HTML is a simpler solution than updating the engine . Comment : Concur this is a problem with Firefox 21 + Bootstrap 2.3.2 + very specific HTML . I have not yet determined the pattern that is the problem . Since the bug exists in FireFox 21 Print Preview mode I ll let this lie until the next ABCpdf release comes out : - .. . Answer : We had the same problem and went looking for the specific HTML that was causing the issue . In our case it was the fact that the content that spanned several pages was in a fieldset tag http : www.w3schools.com tags tag fieldset.asp We just swapped the fieldset tag for a div tag . Comment : Awesome thanks for the feedback", "Question : This may be more of a tech support issue but I m wondering if any other developers have come across this : .. . .. . I m using Abcpdf in my ASP.NET code to generate a PDF from HTML . It works fine but one user is generating PDFs that don t have the CSS applied IE8 Adobe Acrobat latest version - same as everyone else . Since this is the only user complaining I m sure it s a local setting but I can t figure out what would prevent the css from loading - a browser setting An Acrobat setting Does anyone have any suggestions Comment : I am having a similar issue - my styles are in the html page style tag and are rendered fine in HTML but not respected during PDF creation . If I put a style directly on an element it shows in the PDF but having it above in style doesn t register . Comment : Is the code running on a website or code running on the local users machine .. . Answer : make sure you have media print for the CSS style sheet Just spent ages looking at this pulling my hair out and was about to email WebSuperGoo then that thought came to me . just about to back out all the changes I ve made to my code and test again but it looks like with EngineType.Gecko it needs to be media print where as with EngineType.MSHtml it can be media screen .... . .. . .. . very odd but hope that helps someone", "Question : This may be more of a tech support issue but I m wondering if any other developers have come across this : .. . .. . I m using Abcpdf in my ASP.NET code to generate a PDF from HTML . It works fine but one user is generating PDFs that don t have the CSS applied IE8 Adobe Acrobat latest version - same as everyone else . Since this is the only user complaining I m sure it s a local setting but I can t figure out what would prevent the css from loading - a browser setting An Acrobat setting Does anyone have any suggestions Comment : I am having a similar issue - my styles are in the html page style tag and are rendered fine in HTML but not respected during PDF creation . If I put a style directly on an element it shows in the PDF but having it above in style doesn t register . Comment : Is the code running on a website or code running on the local users machine .. . Answer : I am using Version 10 of ABCpdf and I found that the style sheet path should be absolute instead of relative . I changed the stylesheet path from C : MyProject Resources Styles.css to http : www.MyDomain.com Resources Styles.css and it worked . Although version 6 seems to be working with relative paths . I didnot check it with other versions .. . .. . As per WebSuperGoo support http : www.websupergoo.com support.htm : .. . .. . Query : 6.17 .. . .. . HTML does not exist within a file and so it does not have a location . .. . External stylesheets and images are often referenced via relative URLs . Because the HTML has no location it is impossible to resolve these relative references . .. . So you need to provide your stylesheet and image links as absolute references . Or you may be able to use the HTML BASE element to specify an appropriate base location . Or you can save your HTML to file in an appropriate location and then use AddImageUrl .", "Question : null .. . Answer : I coded my version of the WebSuperGoo ABCpdf Xaml table example in an ASP.NET VB web app . Initially when calling XamlReader.Load I encountered the inner-exception : .. . .. . The calling thread must be STA because many UI components require this . I updated the code to create a thread task and then call SetApartmentState to ApartmentState.STA . The XamlReader.Load succeeded . When I call ABCpdf Doc.Save HttpResponseStream the browser opens a PDF viewer and the PDF page is blank . When I call ABCdoc.Save FilePath the PDF file contains the table as described in the Xaml file . When I update the task code to call AddText instead of getting the Xaml from a file and not doing all the Xps to PDF transforms the PDF viewer shows a blank page . Bottom line : .. . .. . STA state appears to cause PDF output page to be blank when displayed in PDF viewer . How can I get XamLReader.Load to work in web app and ABCpdf.Save to open PDF viewer and display the table contents . Thanks Ed", "Question : Has anyone tried to implement tags using the ABCPDF Gecko engine I have it working fine on the MSHTML engine Internet Explorer as soon as I use Gecko which is rendering my HTML better it can t find the tags specified in the HTML . I m using style abcpdf-tag-visible : true to specify a tag which works using the default engine . The following code produces a blank document . Almost identical code for the default engine produces it correctly . Comment : I m having exactly the same issue . Sent an email to WebSuperGoo for support . Will update here if I get it solved.. . It was working on one server failing on another with Gecko . .. . Answer : I ve been talking to WebSuperGoo support . Found out the documentation isn t consistent complete . http : www.websupergoo.com helppdfnet source 5-abcpdf xhtmloptions 2-properties addtags.htm .. . .. . In Gecko your tag has to have a visible impact on the page for it to be picked up . In my case I had a tag that displayed a non-breaking space and thus it wasn t found . From their example changing the style to the following got it to be findable : style abcpdf-tag-visible : true border : 1px solid transparent .. . .. . Note the Border settings is what makes this work apparently . Again this fixes their demo and thus should fix Dillorscroft s example . I have to futz a bit more to fix my problem as I am trying to allocate blank spaces on the page for a table of contents so they can be updated after the html is rendered and I know where the first content page will start .", "Question : I have had some long standing code which has worked fine for quite some time . Recently it began generating the following error . 1st on a asp site and later on a .Net MVC site . Neither of which have changed . I really curious as to why the this error now is rising . I am hoping this post will be of use to someone in the future since the solution was difficult to find searching the error itself . Error : ABCpdf error 80070000 Unable to render HTML . Unable to get printer device-mode size . Microsoft XPS Document Writer Windows error 5 . Access is denied . Some research suggest that it is because the xps writer is not installed but this was not the case or that permissions were set up incorrectly . Comment : I moved the answer out of the comment and put it below . .. . Answer : http : www.websupergoo.com support.htm Support issue 6.7 number 4 . Add the line below to the object and it worked . This did the trick in both cases . Just FYI I think the ABCPdf 8.1 release addressed this issue .", "Question : null .. . Answer : I am trying to load pdf file in classic asp site for that using ABCpdf.dll I am getting error This site can t be reached .. . .. . The connection was reset . Try : Reloading the page Checking the connection Checking the proxy and the firewall ERR CONNECTION RESET .. . .. . It does not showing any console error . enter image description here http : i.stack.imgur.com V02SP.png .. . .. . Thanks version 8 Comment : ABCpdf uses the version of Internet Explorer installed on the server to generate a pdf . Basically it s the printing an IE screen to a pdf file . This is why you need to specify absolute urls with the component If possible you need to open a remote desktop session with your server and look at the security settings on IE . Comment : It s an awful component only one I ll use and swear by is Persists.Pdf http : www.asppdf.com it s not free but you get what you pay for . Best bit about it no dependencies Comment : Completely agree with @Lankymart use Persists AspPdf . I ve used it for years and it s never let me down . Their support is second to none . Comment : thanks friends for valuable suggestions . but We already have licensed for ABCpdf 7 .", "Question : We have a large application successfully using ABCPDF.NET with HTML Styled text . We re accustomed to adding text using fonts not installed in Windows but stored in files elsewhere in the filesystem -- we do this so each user can upload their own fonts and use them with the output . We use the AddFont call to embed the font in the Doc then reference the font in a tag for HTML Styled text with the AddText call . We re starting to look at using AddImageUrl AddImageHTML to get more HTML power . Fonts are therefore a sticking point . It seems that both the MSHTML and Gecko engines will only see the same font list that Windows will . I tried this code to see if @font-face will work with Gecko : .. . .. . But it won t . Is there anything else I can do This is with ABCpdf.NET 8.1.0.7 . Would upgrading to 9 or a later release of 8 help at all .. . Answer : WebSuperGoo responded : .. . .. . ABCpdf does not currently support fonts added using @font-face . So as of the 9.0 release of ABCpdf that s that . Comment : A clarification on this - ABCpdf WILL render fonts if they are installed on the machine rendering the pdf no face-face css . However if you do include font-face css it may actually break this behavior - causing it to not even embed installed fonts anymore . There I just saved you 3 days of hair pulling . Comment : Installed on the machine is the situation I want to avoid .. . I believe I covered that in my initial question . It s easy to get non-installed fonts useable by HTML Styled Text doc.AddHtml . The goal was to get them available to the Gecko engine doc.AddImageHtml . Comment : A note for those trying to use Glyphicons will probably also work with bootstrap s Glyphicon-halflings : I was able to get glyphs working with doc.AddImageHtml by adding the following css only when building a pdf : .glyphicons font-family : GLYPHICONS important the font will need to be installed on the server and the server rebooted" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
jira-agile@jira@118
jira-agile -- jira-agile formerly known as jira greenhopper is the agile taskboard planning and reporting add-on for @placeholder .
{ "confidence": [ 88.06175994873047, 83.82988739013672, 79.88034057617188, 78.56401062011719, 76.08247375488281, 74.97306823730469, 71.43107604980469, 71.43107604980469, 71.1375503540039, 71.1375503540039, 70.71560668945312, 69.7977294921875, 66.46165466308594, 63.45637893676758, 63.0533561706543, 61.82304763793945, 61.82304763793945, 61.82304763793945, 61.40870666503906, 61.06896209716797, 60.369503021240234, 60.21324157714844, 60.21324157714844, 60.1897087097168, 60.1897087097168, 59.22563552856445, 59.19548416137695, 58.404781341552734, 58.23210906982422, 58.23210906982422, 58.01915740966797, 57.151405334472656, 55.94272994995117, 55.935752868652344, 55.935752868652344, 55.14326477050781, 54.34796905517578, 54.309391021728516, 53.58405685424805, 52.52317810058594, 51.43299102783203, 51.43299102783203, 51.43299102783203, 51.43299102783203, 51.132720947265625, 50.74594497680664, 50.38700866699219, 50.27564239501953, 50.061126708984375, 49.76299285888672, 49.38330841064453, 48.55810546875, 48.42778778076172, 48.42778778076172, 48.42778778076172, 48.20460891723633, 48.20460891723633, 48.17333984375, 47.726531982421875, 47.38673400878906, 47.38673400878906, 47.38673400878906, 47.09918212890625, 46.611881256103516, 46.57126998901367, 46.24706268310547, 46.2366943359375, 45.765625, 45.765625, 45.71128845214844, 45.71128845214844, 45.465843200683594, 45.26448059082031, 45.13018035888672, 44.79599380493164, 44.61823272705078, 44.608272552490234, 44.530540466308594, 44.410369873046875, 44.410369873046875, 44.410369873046875, 44.282405853271484, 44.173831939697266, 44.173831939697266, 44.140480041503906, 44.140480041503906, 44.07794952392578, 44.07794952392578, 44.07794952392578, 43.68240737915039, 43.631141662597656, 43.534820556640625, 43.508243560791016, 43.3701286315918, 43.13277816772461, 42.66777038574219, 42.623878479003906, 42.50714111328125, 42.33394241333008, 42.33394241333008 ], "content": [ "Now we re planning to use JIRA Agile .", "We work with Jira Agile and sprints .", "JIRA Agile is an add-on for JIRA that gives you backlog planning work board burndown reports etc", "We ve taken Jira software for agile-project-management .", ".. . .. . Initial Answer .. . .. . The version vs . sprint impedance mismatch in many areas of JIRA http : www.atlassian.com software jira overview and GreenHopper http : www.atlassian.com software greenhopper overview is a well known problem for agile teams using this toolchain .", "I m on GitLab CE 7.8.2 Jira+Agile 6.4", "Recently my company took Jira for Agile project-management .", "Question is : Is it possible to use Custom Issue Type as Epic in JIRA Agile", "The Epic issue type and a few others are added to a base JIRA installation when you install the JIRA Agile extension plugin .", "We aren t using Jira-Agile aka Jira Software at present but that s an option .", "My company is using the greenhopper v5.10 plugin of jira version to do agile-project-management .", "I m working on an app which includes the Jira API and agile API .", "I think this functionality is provided by the JIRA Agile Greenhopper plugin but I can t find any documentation for it .", "This isn t Anti-agile or pro-agile .", "I m using the JIRA Agile REST API to get a listing of issues for a sprint see documentation and example here https : docs.atlassian.com greenhopper REST cloud agile 1.0 board 7BboardId 7D sprint-getIssuesForSprint .", "to enable parallel sprints you can login as admin and go to JIRA Agile Labs and enable the feature .", "I created a task on jira-agile by using kanban board but I couldn t move it to in progress column .", "How do I create a JQL query for a JIRA Agile swimlane that displays all tasks due on the closest Wednesday in the future .", "I am using the JIRA Rest API Calls to fetch in JIRA Agile related metrics such as RapidViews Sprints Velocity Charts etc .", "In JIRA Agile 6.x you do this by going to Agile - Manage Boards clicking Configure for your board selecting the General tab and then clicking edit on the Saved Filter option .", "If you re on JIRA 7 using JIRA Software you can use : GET rest agile 1.0 board boardId sprint https : docs.atlassian.com jira-software REST cloud agile 1.0 board 7BboardId 7D sprint-getAllSprints .. . .. . This will return results that include startDate and endDate e.g .", "We use Jira with GreenHopper with no problems .", "We use jira with the Greenhopper plugin .", "We re moving our Operations 3rd line over to Jira Agile for what s that s worth .", "For reasons I won t go into I can t use the built-in Jira Agile charts .", "EDIT : Greenhopper got renamed to JIRA Agile .. . .. . The method definition is : .. . .. . Search for issues that are assigned to a Sprint which has not yet been completed .", "Does anyone know about how to access JIRA Agile sprints with JIRA java REST Client api or in some other way with java .", "This means you can define what shows up on boards using JQL https : confluence.atlassian.com agile063 jira-agile-user-s-guide creating-a-board .", "Sprints part of the scrum agile project type in JIRA are run against date ranges .", "Is there anything something like http : www.example.com jira rest agile 1.0 sprint project XYZ to retrieve all the sprints in a project .", "Another disclaimer - I m an employee too .. . .. . Jira is a fantastic Agile toolset and to be fair can offer a better point solution for SDLC than ServiceNow .", "However there is also a push by me for using JIRA+Greenhopper+Fisheye+Crucible .", "In JIRA Agile I know I can look at the sprint report to see all the issues completed in that sprint and manually count them .", "I have never worked with jira-agile but maybe you could use this as a starting point", "The method you are looking for is .. . .. . openSprints .. . .. . Its only working with JIRA Agile Version 6.5 or higher .", "And remember Agile software development is supposed to be agile .", "You can learn more about this topic over Here https : docs.atlassian.com jira REST latest .. . .. . For Agile API you can use this resource https : docs.atlassian.com jira-software REST cloud", "In JIRA Agile I am looking for the proper way to mirror the grooming process and still have a manageable list of backlog items and an accurate tracking of estimation of the stories .", "you can find more information with this link https : confluence.atlassian.com agile jira-agile-administrator-s-guide jira-agile-labs .. . .. . UPDATE .. . .. . And also story points will be displays when sprint is started.as you can see your screenshot only open sprints shows the Story points values.try to start other sprints and see .", "Is it possible to have such a task in Jira", "If you are after the best of breed experience for your Agile teams and I haven t mentioned integrations which is another option go for Jira - it s a great tool and I long for some of their features in my day-to-day tooling : -", "https : confluence.atlassian.com display AGILE Ending+a+Sprint .. . .. . Here s Atlassian s documentation on JQL if you re interested in going deeper into filters https : confluence.atlassian.com display JIRA Advanced+Searching", "We re using Jira Agile in combination with Confluence and I m seeing that some users do not have the Link page and Create Page option in the Linked Pages section of the sprint .", "Asked the same question over on : answers.atlassian.com questions 318525 https : answers.atlassian.com questions 318525 which-permission-governs-the-create-linked-page-option-on-a-sprint-in-jira-agile", "We are building it to take advantage of the latest in web technology and provide you the customer with an awesome experience for planning tracking and reporting on the progress of your agile projects and teams .", "In Jira how do we incorporate the checklist in Sprint Planning", "Finally GreenHopper 5.9 requires JIRA 5.0 which may or may not be a showstopper right now .", "We use Jira 4.4.3 and Greenhopper for our project-management and bug tracking but the Jira Roadmap feature simply shows you a list of the versions you have defined .", "We are using JIRA software .", "Forgot to mention I m using Jira cloud .", "Refer this URL https : confluence.atlassian.com display AGILE Using+the+Agile+Classic+Statistics+Burndown+Chart+Gadget .. . .. . You need to configure the statistics field https : confluence.atlassian.com display AGILE Configuring+Statistics", "Watch for the Service Desk add-on for JIRA that Atlassian have just announced .", "I m new to JIRA programming .", "The burndown chart as it appears in Jira .", "How about JIRA", "The id is not easy to use outside Jira .", "Unfortunately this functionality is not currently available in JIRA .", "What is the data model for an issue in JIRA for software projects", "Do not use Jira s Agile page and just create these as normal tickets bugs .", "Nowadays I am learning about agile process .", "I am learning all the agile stuff .", "The information on Agile operation teams is lean pun intended .", "Assuming you re running JIRA Software as you stated not plain JIRA is the dashboard loading all of the widgets", "JIRA Software provides a REST API resource to retrieve all issues of a board : GET rest agile 1.0 board boardId issue https : docs.atlassian.com jira-software REST cloud agile 1.0 board-getIssuesForBoard .. . .. . Once you have that list you still have to run over all the issues and retrieve the details of each issue e.g .", "I created a Jira Report Plugin .", "Some features that I m wondering about in ServiceNow that I can accomplish with JIRA+Greenhopper : .. . .. . Sprints across multiple-projects Scrum Products in ServiceNow", "Creating Linking pages to an sprint sprint report : Requires Project Admin permissions .. . .. . Confluence permissions Your users need to have the following permissions : .. . .. . Add Page permission for the appropriate space if you want them to create Confluence pages via JIRA Agile .", "I m currently using Jira Agile for managing my projects.Currently I have 3 projects : A B and C . Is there any way to create a Sprint with task from different projects .", "We decided to use Jira Agile instead of TFS for task management but we have to keep code base in TFS until all project teams have some maturity in Git knowledge .", "https : developer.atlassian.com jiradev jira-apis webhooks", "It is mentioned in JIRA Documentation that EPIC is an issue of Type Epic .", "Possible duplicate of Rename Create Issue to Create.. . in Jira http : stackoverflow.com questions 23474931 rename-create-issue-to-create-in-jira", "We already have set of IssueTypes and are following Agile Scrum .", "Update .. . .. . The mentioned story GHS-945 https : jira.atlassian.com browse GHS-945 had been resolved in GreenHopper 5.10 http : www.atlassian.com en software greenhopper whats-new greenhopper-510 already - meanwhile GreenHopper 6.0 http : www.atlassian.com en software greenhopper whats-new greenhopper-60 officially delivers all mentioned major improvements regarding Kanban Scrum and especially custom agile board planning and process-management plus many others not mentioned or available before .", "The nice thing about JIRA boards is that they are simply views on issues .", "Have you tried using rest api 2 issue https : docs.atlassian.com greenhopper REST cloud agile 1.0 issue-getIssue with changelog expansion : .. . .. . JIRA URL rest api 2 issue ISSUE KEY expand changelog .. . .. . It provides you with the change log of an issue including both status changes and sprint reassignment .", "We user JIRA for bug tracking and release management and we have started using greenhopper for project-management inside of JIRA but one thing that it lacks is the idea of user stories versus tasks in those users stories .", "JIRA API will not load all results .", "For an apples-to-apples comparison I d look at JIRA versus TFS for instance .", "Some of the plugins to bridge between servicenow and jira might work for us .", "Is anyone using JIRA Service Desk with ITIL and asset management integrations", "I opened a ticket at Atlassian and they replied with the following : .. . .. . According to our article on Getting Agile Ready with Atlassian OnDemand : .. . .. . JIRA permissions Your users need to have the following permissions : .. . .. . Creating Linking pages to an epic : Requires Edit Issues permission .", "WHat version of jira are you on", "We are on JIRA On Demand .", "To handle checklists in JIRA Issues you can have a look at this plugin Checklist for JIRA https : marketplace.atlassian.com plugins com.okapya.jira.checklist server overview .", "If not your JIRA Software license is not fully active or working OR your install isn t working properly and you ll need to ping JIRA support .", "Remember that in JIRA epics are just another issue type .", "I want to merge 2 databases in JIRA Software .", "Lastly upload the edited workflow back to Jira .", "For Agile project-management I have used extensive Thoughtworks - Mingle http : www.thoughtworks.com products mingle-agile-project-management It s free for 5 users .", "This is agile so the best answer is that you handle it the way works for your team .", "At the moment I think the GitLab Listener add-on for JIRA https : marketplace.atlassian.com plugins com.allenta.jira.plugins.gitlab.gitlab-listener is the only way to integrate GitLab CE and JIRA .", "JIRA platform api can retrieve projects info and JIRA software API can retrieve sprints for a given board .", "http : www.infoq.com news 2010 05 what-color-backlog is now fully migrated to the new GreenHopper gaining a huge amount of significant new features and improvements on the fly and a respectively more agile and productive team .", "i guess JRJC cannot get agile data .", "This might be anti-Agile but I want to define a permanent task with sub-tasks in a sprint .", "I think Jeremy is right on track - ServiceNow and JIRA are tools that should live side-by-side with ServiceNow managing the ITIL service desk workflows integrated into the JIRA SCCM workflows where necessary .", "If i first export tickets of Trac to Jira and then Bugzila to Jira Bugzila tickets will be added below Trac tickets as new ones they are not being mapped .", "I am trying to configure atlassian JIRA eclipse-plugin .", "There it lets me select Load All and then it loads under the JIRA Category ." ] }
{ "confidence": [ 90.49070739746094, 88.15296936035156, 87.41194152832031, 86.75926208496094, 84.89845275878906, 84.81145477294922, 84.46142578125, 83.47062683105469, 82.9267807006836, 80.83828735351562, 80.75975799560547, 79.97256469726562, 79.52497863769531, 79.04622650146484, 78.72542572021484, 78.59771728515625, 78.16059875488281, 76.94206237792969, 76.41803741455078, 76.17803955078125 ], "content": [ "Question : We want to implement a solid road map for our product development road map . We use Jira 4.4.3 and Greenhopper for our project-management and bug tracking but the Jira Roadmap feature simply shows you a list of the versions you have defined . However we currently use our Versions for each sprint e.g . Week 16 Week 17 etc . which contain all of the tasks issues for that week s sprint . Versions Screenshot http : i.stack.imgur.com mSkiw.png .. . .. . We currently use Components to keep track of major feature sets and to categorize e.g . Integrate with xyz API Migrate emails to SendGrid Bugs : Code or Technical Debt . Components Screenshot http : i.stack.imgur.com Ar3yQ.png .. . .. . The Jira Roadmap feature shows the list of versions and the progress towards each . However we re already using Versions for tracking our weekly sprints and some of these roadmap features will span many releases versions sprints . Roadmap Screenshot http : i.stack.imgur.com z6m1t.png .. . .. . How can we keep track of our complete roadmap within Jira We would really like to see a list of our major initiatives in this roadmap instead of a list of all of our weekly sprints e.g . Enable Selenium on CI server Extranet MVC3 conversion Upgrade production to R2 . .. . Answer : Update .. . .. . The mentioned story GHS-945 https : jira.atlassian.com browse GHS-945 had been resolved in GreenHopper 5.10 http : www.atlassian.com en software greenhopper whats-new greenhopper-510 already - meanwhile GreenHopper 6.0 http : www.atlassian.com en software greenhopper whats-new greenhopper-60 officially delivers all mentioned major improvements regarding Kanban Scrum and especially custom agile board planning and process-management plus many others not mentioned or available before . Accordingly the interim term Rapid Board has been dropped as well see No longer Rapid by name but still rapid by nature https : confluence.atlassian.com display GH GreenHopper+6.0+Release+Notes GreenHopper6.0ReleaseNotes-NolongerRapidbyname E2 80 93butstillrapidbynature : .. . .. . In GreenHopper 6.0 the new board is no longer known as the Rapid Board we figure everyone knows by now that it is vastly faster than the Classic boards . The new board has been built from the ground up on newer technology that enables us to provide optimum performance making the most of your valuable time . Finally the GreenHopper team continues to deliver significant improvements in almost biweekly point releases with the last one addressing one of the few losses caused by the transition from the classic boards : release 6.0.2 https : confluence.atlassian.com display GH GreenHopper+6.0.2+Release+Notes features customizable card colors https : confluence.atlassian.com display GH GreenHopper+6.0.2+Release+Notes GreenHopper6.0.2ReleaseNotes-Customisablecardcolours again even more versatile than the classical variant insofar you can now base the coloring on issue type priority assignee or a custom JQL query even . Conclusion .. . .. . Our former workflow including backlog coloring see What Color is your Backlog http : www.infoq.com news 2010 05 what-color-backlog is now fully migrated to the new GreenHopper gaining a huge amount of significant new features and improvements on the fly and a respectively more agile and productive team . .. . .. . Initial Answer .. . .. . The version vs . sprint impedance mismatch in many areas of JIRA http : www.atlassian.com software jira overview and GreenHopper http : www.atlassian.com software greenhopper overview is a well known problem for agile teams using this toolchain . We implemented various attempts to remedy it one way or another mostly via version hierarchies of sorts i.e . product versions and sprint versions with parent-child relationships none of which turned out to be really productive . Accordingly the relatively dated story Add a separate field to allow tracking sprint and release information independent of one another GHS-945 https : jira.atlassian.com browse GHS-945 captures this topic . While it is unresolved as of today GreenHopper is currently undergoing a major restructuring to address this and related problems and while not quite finished yet the respective functionality available today addresses your use-case already eventually see the Atlassian Status as at February 28 2012 : .. . .. . Sprint as a separate custom field is now available in GreenHopper 5.9 however it is only used by the Scrum Rapid Board which can be enabled as a lab feature from the GreenHopper admin screens . .. . The Rapid Board use of this field frees up fixVersion field for normal use . The mentioned Rapid Board and the restructuring in general is further detailed in The Future of GreenHopper http : confluence.atlassian.com display GH The+Future+of+GreenHopper : .. . .. . The Rapid Board is a fresh start for GreenHopper . We are building it to take advantage of the latest in web technology and provide you the customer with an awesome experience for planning tracking and reporting on the progress of your agile projects and teams . The Rapid Board http : confluence.atlassian.com display GH Using+the+Rapid+Board and related functionality currently improves quickly indeed i.e . the GreenHopper team iterates fast and implements major improvements in currently monthly to biweekly point releases even . I m totally sold on this approach which basically builds the board on top of the versatile JQL functionality see Advanced Searching http : confluence.atlassian.com display JIRA Advanced+Searching enabling almost complete freedom to assemble the perfect board for your needs . On top of that it solved the version vs . sprint impedance mismatch for us insofar sprints are decoupled entities now and versions can be used as desired again yielding a useful version and release date based customer facing JIRA Roadmap http : confluence.atlassian.com display JIRA Browsing+a+Project 27s+Road+Map in turn . The transition to this new approach is a dedicated effort of course requiring some planning and time eventually also there are still some relevant shortcoming concerning the previously available functionality for example the currently unresolved story As a user I would like to configure the cards displayed in the rapid board GHS-3922 https : jira.atlassian.com browse GHS-3922 is important for us because we have been using Philippe Kruchten s innovative approach to backlog coloring see What Color is your Backlog http : www.infoq.com news 2010 05 what-color-backlog with great success and this is not possible for the Rapid Board yet . Finally GreenHopper 5.9 requires JIRA 5.0 which may or may not be a showstopper right now . Comment : Wow incredibly insightful answer . We upgraded to Jira 5.0.2 re-indexed created a number of new projects to track things in those respective projects deleted all of our sprint versions entered all of the real versions started using the rapid board way better as you said and now we have our roadmap .", "Question : I m getting started working with the JIRA REST API . I ve learned how to get all the issues assigned to the current user : .. . .. . ...now I am trying to filter those by the current sprint . I think this functionality is provided by the JIRA Agile Greenhopper plugin but I can t find any documentation for it . I came across some interesting data which appears to be the identifier for the sprint that the issue is assigned to : .. . .. . ...but it just looks like a serialized mess . How can I query for the issues assigned to the current sprint Comment : I have never worked with jira-agile but maybe you could use this as a starting point confluence.atlassian.com display JIRA https : confluence.atlassian.com display JIRA Advanced+Searching+Functions AdvancedSearchingFunctions-openSprints .. . Answer : The method you are looking for is .. . .. . openSprints .. . .. . Its only working with JIRA Agile Version 6.5 or higher . EDIT : Greenhopper got renamed to JIRA Agile .. . .. . The method definition is : .. . .. . Search for issues that are assigned to a Sprint which has not yet been completed . Note that it is possible for an issue to belong to both a completed Sprint s and an incomplete Sprint s . So this should work for you then .. . .. . Regards Comment : So use the REST API resource that lets you run a search and use the openSprints as part of the JQL passed to the search Comment : yes that is correct Comment : so adjust your answer like This is a two-way process : first define a filter .. . then second make a rest call that uses that filter .. . or Use the rest API call search https : bunjil.jira-dev.com plugins servlet restbrowser resource api-2-search and inside the parameter jql use .. . Comment : @mliebelt Use the rest API call search and inside the parameter jql use .. . the OP already has that part in his Question or am I totally fuzzy right now Comment : The devil is in the details . We have made some experiences with the JIRA REST API the past 6 months and sometimes there are some subtleties that have to be made explicit . So what is the syntax to use your query assignee in .. . inside the REST API call", "Question : Does anyone know about how to access JIRA Agile sprints with JIRA java REST Client api or in some other way with java . 1 I am trying to retrieve JIRA data projects sprints issues etc . i need a way to query the projects sprints with different filters as well . i guess JRJC cannot get agile data . Is there any one stop solution for entire JIRA data 2 JIRA gave 2 types api in their docs : REST Api and Java Api . when to use each of those Comment : Are you using greenhopper Comment : Can you please provide a link-to some documentation .. . Answer : Try this one. . I used below code .. . .. . Create a IssueData class with below attribute . and create getter setter also overeride toString method .", "Question : I am using the JIRA Rest API Calls to fetch in JIRA Agile related metrics such as RapidViews Sprints Velocity Charts etc . I am able to execute the API s using the REST Client but I do not get all the results and get only limited results . For ex : this call lists all the sprints for a particular rapidview but only the limited results .. . .. . https : puma.companyname.com jira rest greenhopper 1.0 sprintquery 359 maxResults 10000 .. . .. . Could you help me tweak this call to show all sprints for a particular rapidview .. . .. . Thanks in advance Adithya .. . Answer : JIRA API will not load all results . It will give it to you in chunks of small results . If there are lots of records then JIRA will send you it in chunk of 50 with one flag named isLast which carries value either true or false . True means : There are no more records to be fetched .. . .. . False means : Yes there are more records to be fetched but that will be provided to you only if you want via more REST requests . So on the basis of this you have to run a loop with more API calls to fetch all the results from JIRA database . You can learn more about this topic over Here https : docs.atlassian.com jira REST latest .. . .. . For Agile API you can use this resource https : docs.atlassian.com jira-software REST cloud", "Question : Is there is a way to determine what the status of an issue for the sprint requested or at minimum if it was resolved during that sprint I m using the JIRA Agile REST API to get a listing of issues for a sprint see documentation and example here https : docs.atlassian.com greenhopper REST cloud agile 1.0 board 7BboardId 7D sprint-getIssuesForSprint . It does provide a listing of issues for that sprint but for sprints that have completed it provides the issues current status it might have been In Progress at the end of sprint 2 but now in sprint 4 it is Resolved so it will show resolved even when requesting data from sprint 2 . .. . Answer : Have you tried using rest api 2 issue https : docs.atlassian.com greenhopper REST cloud agile 1.0 issue-getIssue with changelog expansion : .. . .. . JIRA URL rest api 2 issue ISSUE KEY expand changelog .. . .. . It provides you with the change log of an issue including both status changes and sprint reassignment . I think that by exploring this information you might be able to get the data you want .", "Question : We already have set of IssueTypes and are following Agile Scrum . Now we re planning to use JIRA Agile . It is mentioned in JIRA Documentation that EPIC is an issue of Type Epic . But since we re a considerably sized BU with few projects - we would like to use the New Feature Issue Type as Epic - so the Spec Dev and Test can be added to the Feature Epic . Question is : Is it possible to use Custom Issue Type as Epic in JIRA Agile If so How Comment : Not sure if I understand the use-case correctly but I m just curious why you don t want to use Epic issue type and convert issues with type New Feature from existing projects to Epics .. . Answer : Short answer is no . The Epic issue type and a few others are added to a base JIRA installation when you install the JIRA Agile extension plugin . None of the features Epic Links Epics filtering on backlogs Epic burndown charts etc will work with any other issue type . I d suggest you begin adapting your process to use the new issue type . Now there s nothing stopping you associating custom-fields if that s what you use for Spec Dev and Test information with the Epic issue type so you get the same functionality you have with New Feature . Comment : Thank you . This is what we tried with a small internal project . But I thought why not JIRA support other issue types .", "Question : We user JIRA for bug tracking and release management and we have started using greenhopper for project-management inside of JIRA but one thing that it lacks is the idea of user stories versus tasks in those users stories . Does anyone recommend other task board like agile-project-management tools that fully support users stories and tasks as well as being fast and simple to user . I started looking at targetprocess so if anyone has feedback on that specifically it would be great as well . Comment : SO is dead set against recommendation questions . You may try asking again in SoftwareRecs http : softwarerecs.stackexchange.com . .. . Answer : We use Jira with GreenHopper with no problems . If you have control over the configuration of your Jira instance you can easily create a story issue type that allows having sub-tasks . During the planning phase we drop the stories onto the next version and split them into sub-tasks estimated in more precise time and assigned to team members . If those tasks are separate you can also convert them into sub-tasks of a specific story .", "Question : We user JIRA for bug tracking and release management and we have started using greenhopper for project-management inside of JIRA but one thing that it lacks is the idea of user stories versus tasks in those users stories . Does anyone recommend other task board like agile-project-management tools that fully support users stories and tasks as well as being fast and simple to user . I started looking at targetprocess so if anyone has feedback on that specifically it would be great as well . Comment : SO is dead set against recommendation questions . You may try asking again in SoftwareRecs http : softwarerecs.stackexchange.com . .. . Answer : Thoughtworks would be happy to sell you Mingle http : studios.thoughtworks.com mingle-agile-project-management", "Question : Recently my company took Jira for Agile project-management . As part of our process definition we have a list of items that need to be covered in Sprint Planning we used to use a checklist in trello for managing them . In Jira how do we incorporate the checklist in Sprint Planning Comment : Could you explain what kind of things are on your checklist Are you talking about product backlog items Or something else Comment : Example checklist items : Product Owner was Present Only Done Items demoed Backlog updated etc . .. . Answer : A couple of options spring to mind . You could create a custom issue type called Sprint Planning and add to it custom field checkboxes for each item on your checklist . Alternatively you could just add-in an issue and put the checklist in the Summary field . There may also be checklist plugins for JIRA although I don t have any personal experience of them .", "Question : We user JIRA for bug tracking and release management and we have started using greenhopper for project-management inside of JIRA but one thing that it lacks is the idea of user stories versus tasks in those users stories . Does anyone recommend other task board like agile-project-management tools that fully support users stories and tasks as well as being fast and simple to user . I started looking at targetprocess so if anyone has feedback on that specifically it would be great as well . Comment : SO is dead set against recommendation questions . You may try asking again in SoftwareRecs http : softwarerecs.stackexchange.com . .. . Answer : Take a look at http : AgileZen.com", "Question : We re using Jira Agile in combination with Confluence and I m seeing that some users do not have the Link page and Create Page option in the Linked Pages section of the sprint . The funny thing is that any confluence page created from confluence itself which is linked to any item in the sprint is added to the section so for me it doesn t make much sense to hide the option . Do I really need to make people a project administrator to use this feature The two buttons Link page and Create Page only seem to show for project admins . How do I make them available to all people in the Developers group Image highlighting the missing buttons for some users http : i.stack.imgur.com NIqVN.png Comment : Asked the same question over on : answers.atlassian.com questions 318525 https : answers.atlassian.com questions 318525 which-permission-governs-the-create-linked-page-option-on-a-sprint-in-jira-agile Comment : did you open a feature request Ticket already Comment : Yeah . Was told that project admin is what you need to be . .. . Answer : I opened a ticket at Atlassian and they replied with the following : .. . .. . According to our article on Getting Agile Ready with Atlassian OnDemand : .. . .. . JIRA permissions Your users need to have the following permissions : .. . .. . Creating Linking pages to an epic : Requires Edit Issues permission . Creating Linking pages to an sprint sprint report : Requires Project Admin permissions .. . .. . Confluence permissions Your users need to have the following permissions : .. . .. . Add Page permission for the appropriate space if you want them to create Confluence pages via JIRA Agile . I feel that Project Admin permissions don t make sense for this feature especially since a link-to the sprint is established by mentioning an issue in a page on Confluence . They re automatically added to the sprint-pages as well .", "Question : This might be anti-Agile but I want to define a permanent task with sub-tasks in a sprint . This task will automatically roll over to the next sprint . The content of these sub-tasks are configuration items that need to be done spinning new VMs whitelisting IPs etc discovered during the current sprint and not lost . I don t want to keep creating new tasks and adding to the sprint or at the end of the sprint rolling them over or forgetting to do so . The task and its sub-tasks are zero points . Is it possible to have such a task in Jira .. . Answer : Sounds like you re asking for a Task that exists outside of sprints so therefore the simple answer is to create a place that can hold these . Do not use Jira s Agile page and just create these as normal tickets bugs . That or these should be just added to the backlog if they re to be prioritized for later sprints . It s pretty common for product development that you ll have a separate section for issues bugs . When planning a sprint you may decide to add tasks or user stories that relate to these issues . This isn t Anti-agile or pro-agile .", "Question : Recently my company took Jira for Agile project-management . As part of our process definition we have a list of items that need to be covered in Sprint Planning we used to use a checklist in trello for managing them . In Jira how do we incorporate the checklist in Sprint Planning Comment : Could you explain what kind of things are on your checklist Are you talking about product backlog items Or something else Comment : Example checklist items : Product Owner was Present Only Done Items demoed Backlog updated etc . .. . Answer : We also use Confluence page as a meeting agenda or checklist and the nice thing about Confluence page is that it is easy to reference issues from Jira and comes with a built-in checklist .", "Question : In JIRA v7.0.10 .. . .. . When Im on the backlog screen I can see the estimated story points of the started sprint even if I toggle them . Green Circles But we have some planned sprints also where the story points are not visible when the given sprint is toggled . Red Circles .. . .. . How can Jira be configured to show the story points on not started sprints also enter image description here http : i.stack.imgur.com u8wJU.png .. . .. . This is still not solved properly .. . Answer : one solution came to my mind is you can enable parallel sprint feature which enables starting more than one sprint at a time.with this feature you will able to see the story points in all sprints . to enable parallel sprints you can login as admin and go to JIRA Agile Labs and enable the feature . you can find more information with this link https : confluence.atlassian.com agile jira-agile-administrator-s-guide jira-agile-labs .. . .. . UPDATE .. . .. . And also story points will be displays when sprint is started.as you can see your screenshot only open sprints shows the Story points values.try to start other sprints and see . Comment : We are already using this but only the two open sprints have the story points when its toggled . As you can see on the a picture as well . Comment : On update : That is my problem . I want two sprint only per week . That is working . But the rest are planned and we adding stoires into those sprints during the week . And we would like to see how many points are there for the next sprints . without untoggle any of them", "Question : Recently my company took Jira for Agile project-management . As part of our process definition we have a list of items that need to be covered in Sprint Planning we used to use a checklist in trello for managing them . In Jira how do we incorporate the checklist in Sprint Planning Comment : Could you explain what kind of things are on your checklist Are you talking about product backlog items Or something else Comment : Example checklist items : Product Owner was Present Only Done Items demoed Backlog updated etc . .. . Answer : To handle checklists in JIRA Issues you can have a look at this plugin Checklist for JIRA https : marketplace.atlassian.com plugins com.okapya.jira.checklist server overview . For your use-case I would prefer to handle Sprint Planning or any meetings in Confluence if you can have it . You can nicely link Confluence https : www.atlassian.com software confluence with JIRA Issues in both direction . Comment : I d suggest using a Confluence Meeting-Template as well .", "Question : The company that I m working for is going to start using ServiceNow for its IT operations and call-center management and they are looking at its SDLC module for software project-management . However there is also a push by me for using JIRA+Greenhopper+Fisheye+Crucible . Has anyone out there done a feature by feature comparison of these two tools Using the ServiceNow demo it sounds like it s quite versatile but I believe it s being customized pretty heavily for our call-center by Service-Now themselves . One of the biggest things that I ve liked about JIRA is the extreme level of customization that we can do on our own and morph our processes as a result-of our retrospectives . I m not entirely confident that ServiceNow can provide that and I would definitely like to hear more . Some features that I m wondering about in ServiceNow that I can accomplish with JIRA+Greenhopper : .. . .. . Sprints across multiple-projects Scrum Products in ServiceNow Source Code Review integration like with Fisheye and Crucible .. . .. . Epics management spanning multiple-projects .. . .. . Release Management - JIRA Versions vs . ServiceNow Releases - some teams plan out future releases and others simply cut a build-tag based on what looks good on their release branch . JIRA lets me have different operational processes to help Leads accomplish this to match what they do in real life . Any other points in differentiation between these two products would be great . Thanks Comment : You may get more people who know about ServiceNow at community.servicenow.com http : community.servicenow.com Comment : SN seems to be more IT oriented e.g . ITIL Comment : My organization brought in ServiceNow for IT ticket management a couple of years ago and caused a full scale revolt among users especially engineers who were used to JIRA and found ServiceNow s UI cluttered confusing and non-intuitive . I would advise seriously looking at JIRA for your IT Ops and call center management and definitely don t try using ServiceNow for anything related to software projects . Comment : @gareth bowles What were your end users and what range of ticket management did you guys do This is a stupidly broad questions.. . Comment : We brought in SN as an IT help desk system to handle access requests general IT requests like server problems or new machine allocation and equipment ordering . The end users were anyone in the company . I may have been a bit down on SN above - things have improved after customizing the UI - but as @JeremySmith says below SN isn t necessarily a good fit for the software development tasks that you listed in your question . .. . Answer : Another disclaimer - I m an employee too .. . .. . Jira is a fantastic Agile toolset and to be fair can offer a better point solution for SDLC than ServiceNow . To balance that out - what you can gain from using ServiceNow SDLC is access to the single system of record for IT . Because you are using the same system as your IT Operations teams you have a chance to model a process that tightly integrates Dev and Ops We could throw in the DevOps buzzword here If you want a process where you can take a new incident from a customer and easily track it to the release to the software version to the requirement to the test case you need ServiceNow . Equally if you want to drive operational responsibility for the success of software features to the developers that write the code you want that seamless interaction between processes . If you are after the best of breed experience for your Agile teams and I haven t mentioned integrations which is another option go for Jira - it s a great tool and I long for some of their features in my day-to-day tooling : -", "Question : I am looking for a rest API to get all the sprints with their respective start and end dates . I can get the list of sprints using the API .. . .. . and the sprint information using .. . .. . However it will require me to get call the 2nd API for each sprint . Is there an API that provide the list of sprints along with their information such as start and end date . .. . Answer : If you re on JIRA 7 using JIRA Software you can use : GET rest agile 1.0 board boardId sprint https : docs.atlassian.com jira-software REST cloud agile 1.0 board 7BboardId 7D sprint-getAllSprints .. . .. . This will return results that include startDate and endDate e.g . : Comment : thanks . That worked .", "Question : Is there is a way to determine what the status of an issue for the sprint requested or at minimum if it was resolved during that sprint I m using the JIRA Agile REST API to get a listing of issues for a sprint see documentation and example here https : docs.atlassian.com greenhopper REST cloud agile 1.0 board 7BboardId 7D sprint-getIssuesForSprint . It does provide a listing of issues for that sprint but for sprints that have completed it provides the issues current status it might have been In Progress at the end of sprint 2 but now in sprint 4 it is Resolved so it will show resolved even when requesting data from sprint 2 . .. . Answer : It looks like once an item is resolved there is a resolvedate that you can use to determine which sprint the resolution occurred in . It still doesn t provide a mechanism to determine what state the issue was in when the sprint ended i.e . what items were not started when the sprint finished but the resovledate looks to solve most of those issues .", "Question : null .. . Answer : I m working on an app which includes the Jira API and agile API . I need a list of projects this is no problem I use : .. . .. . https : example.com rest api latest project projectKey TA .. . .. . and then I need to be able to click on a project and give me a list of sprints + issues for each sprint . Here I am stuck . I have found another related question JQL : Get list of sprints http : stackoverflow.com questions 24380919 jql-get-list-of-sprints which gives me a list of sprints based on a projectkey by using : .. . .. . https : example.com rest greenhopper 1.0 integration teamcalendars sprint list jql project+ 3D+TA .. . .. . However I don t know how to get the issues for said sprint . I also know how to get the issues for a sprint directly from the agile API : https : example.com rest agile latest board 5 sprint 4 issue .. . .. . but I can t seem to link the board to the projectkey . I have found a similar topics on the atlassian site itself but they usually mention there is no REST endpoint to do what I want . Although I m sure it should be possible . The answers I find elsewhere I don t really understand filter on rapidId s or something similar so I really need a noob-explanation of what to do .", "Question : We user JIRA for bug tracking and release management and we have started using greenhopper for project-management inside of JIRA but one thing that it lacks is the idea of user stories versus tasks in those users stories . Does anyone recommend other task board like agile-project-management tools that fully support users stories and tasks as well as being fast and simple to user . I started looking at targetprocess so if anyone has feedback on that specifically it would be great as well . Comment : SO is dead set against recommendation questions . You may try asking again in SoftwareRecs http : softwarerecs.stackexchange.com . .. . Answer : My company have been using TargetProcess for a while and we are very pleased with the product . Whenever we have experienced problems or bugs we have reported it to them and the problem or bug is solved really fast . It s a great tool that worked well with SCRUM . I really recommend it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jira
UNK_RELATION
vaadin@java@94
vaadin -- vaadin is a client-server framework that builds on gwt google web toolkit and uses @placeholder to code all of the server and clientside code .
{ "confidence": [ 52.710506439208984, 50.73521041870117, 49.70793914794922, 49.514163970947266, 49.141963958740234, 48.99311828613281, 47.3260383605957, 47.243507385253906, 46.64314651489258, 46.262969970703125, 46.00127410888672, 45.3887825012207, 45.312156677246094, 45.19961166381836, 44.730125427246094, 44.2286491394043, 44.17853546142578, 44.13616180419922, 44.00490188598633, 43.373043060302734, 43.179931640625, 42.94672775268555, 42.92715072631836, 42.294124603271484, 42.10938262939453, 42.03388214111328, 41.49483871459961, 41.47964859008789, 41.29907989501953, 40.784523010253906, 40.6715202331543, 40.58561706542969, 40.461734771728516, 39.99435043334961, 39.904930114746094, 39.85543441772461, 39.78565979003906, 39.78062438964844, 39.52553176879883, 39.33521270751953, 39.249908447265625, 39.249908447265625, 39.164852142333984, 39.02918243408203, 38.945335388183594, 38.576602935791016, 38.555782318115234, 38.518516540527344, 38.468326568603516, 38.3377685546875, 38.33174133300781, 38.33174133300781, 38.30057907104492, 38.271820068359375, 38.03955078125, 37.84642028808594, 37.72458267211914, 37.71843719482422, 37.68281173706055, 37.651432037353516, 37.60795593261719, 37.477046966552734, 37.376434326171875, 37.34364318847656, 37.27333068847656, 37.269813537597656, 37.25093078613281, 37.24799728393555, 37.24799728393555, 37.03485870361328, 36.98182678222656, 36.963111877441406, 36.850765228271484, 36.81684875488281, 36.791072845458984, 36.78603744506836, 36.78603744506836, 36.695430755615234, 36.695430755615234, 36.4430046081543, 36.4430046081543, 36.4371337890625, 36.38465881347656, 36.195037841796875, 36.18016815185547, 36.17449951171875, 36.06229782104492, 36.00258255004883, 36.00258255004883, 35.9975700378418, 35.9975700378418, 35.9092903137207, 35.90195083618164, 35.83521270751953, 35.8121223449707, 35.729698181152344, 35.68930435180664, 35.60565948486328, 35.60565948486328, 35.60565948486328 ], "content": [ "Vaadin is based on the GWT framework .", "Vaadin code executes in the server-side", "vaadin is only for Vaadin 6 and vaadin-server for Vaadin 7 .", "A few more points : .. . .. . A fundamental difference is that in GWT you have to separate your application into Client and Server code no such distinction in Vaadin .", "Copy all vaadin- files except vaadin-client and vaadin-client-compiler to WEB-INF lib in your project .. . 2 .", "Vaadin is based on GWT so you get a lot of the advantages of GWT though Vaadin is completely Server-centric .", "Since Vaadin has to be understood as a server-centric framework eliminating your flexibility on writing Code that is executed on Clientside and moving everything to the server which sounds worse than it actually is the GWT Compiler only runs once a time .", "All the code in the page is generated by Vaadin .", "So : .. . .. . For projects with no or not much server-side code Business layer go for GWT For all else go Vaadin", "vaadin is another web-app framework .", "As Vaadin is a Java web application framework so is it possible to insert the jQuery javascript snippet in the Vaadin Java code", "In Vaadin you can code in any JVM language since everything runs in the server I m using Vaadin with Scala .", "And Vaadin uses that sort of communication it s built on top of GWT but uses the validation on the server .", "Is is possible to implement the client-side of a Play Framework 2.x web application using GWT or Vaadin", "In Vaadin application logic is on server-side .", "I m experimenting with the Vaadin Java framework at the moment and I ve noticed that the client engine does not retry sending requests to the server .", "Vaadin uses GWT in a way that it has a set of components precompiled in GWT .", "Is there any difference between a normal GWT App and a Client-Side Vaadin App", "vaadin is not listed as dependency of vaadin-server and vice-versa in the maven POM .", "After playing around with Vaadin for about a week I m curious about how Vaadin uses GWT .", "Vaadin vs GWT https : www.quora.com What-are-the-benefits-of-using-Vaadin-over-plain-GWT", "If you look at the differences between GWT Vaadin https : vaadin.com comparison you ll notice that besides the cliend-side API Vaadin also has a server-side API and the code you posted falls into that category .", "Vaadin is a server-side UI framework that stores the UI state in the session .", "The question how to communicate from the Vaadin Server side with the Client side .", "Differences between Vaadin and GWT : .. . .. . A Vaadin includes a server-side development model that : .. . .. . Cuts number of code lines to half by reducing layers one has to implement for user-interface .", "browserDetailsUrl : VAADIN code erefdvdfgftf .", "With Vaadin this is as simple as a few lines-of-code .", "Why use a chart in vaadin and gwt is hard", ".. . Use Window.executeJavaScript .. . Vaadin 6 or Root.executeJavaScript .. . Vaadin 7 if you need to execute JavaScript from your server-side application .", "Our application uses Vaadin 6 and we are planning to migrate it to Vaadin 7 .", "I created a Vaadin pie-chart with following code .", "The question is how to capture a screen of Vaadin not a Vaadin Chart .", "References : Page Vaadin 7.2.1 API https : vaadin.com api com vaadin server Page.html setLocation 28java.lang.String 29 .", "I m using the JPAContainer implementation in my Vaadin GWT based Java web application framework application .", "Due to the rather monolithic nature of the GWT compiled JavaScript regardless of new code splitting features of GWT the namespace is global Vaadin uses the concept of widget set .", "Each and every action in Vaadin makes a call to the server .", "did you hear about responsive framework in Vaadin", "https : github.com vaadin vaadin blob 731fec8cc81c4ff6ca53d404b68a2c1538fd3885 LICENSE", "There are several examples on how to manipulate the canvas with Vaadin and GWT .", "Vaadin is working with javascript on the client-side .", "I am not expert of Vaadin Framework.. .", "I m working with the Vaadin Framework at the moment .", "I have tried the same test for different versions of vaadin and vaadin-server always with the same result as above .", "This code snippet should be part of the Book of Vaadin", "https : dev.vaadin.com svn versions 6.8 src com vaadin terminal gwt server AbstractApplicationServlet.java", "Vaadin", "Is it possible to use the Vaadin Touchkit Addon in a Client-Side Application which does not need a permanent server connection", "The whole source can be found on GitHub github.com vaadin vaadin https : github.com vaadin vaadin .", "In the client-side extension implementation you can write your custom GWT code like following pseudo code : .. . .. . Passing events between server and client : https : vaadin.com docs - part framework gwt gwt-rpc.html", "I m pulling a Date from a database into the vaadin-grid vaadin-table with angular2 .", "Vaadin advantage : .. . App logic is run on the server so it can not be inspected by the user .", "There is no server-side way to handle this up to including Vaadin 7.4 .", "I have tried this code with BrowserWindowOpener https : vaadin.com api 7.6.4 com vaadin server BrowserWindowOpener.html .", "Copy vaadin-client and vaadin-client-compiler to a lib folder which is on your classpath but will not be deployed .", "Can anyone suggest whether GWT or Vaadin are a better choice to design an application", "The time-updater serves two other purposes : .. . .. . Its simple code checks that Push is configured properly in your Vaadin app web server and web browser .", "All the communication in Vaadin happens by using AJAX requests .", "Another Vaadin advantage : you don t have to design or implement the client-server communication that s built-in .", "There is a long webinar about vaadin security : https : vaadin.com de blog - blogs vaadin-application-security-webinar .. . .. . Vaadin does some validation of the client - server traffic to prevent XSS and other attacks .", "I am building an application using the VAADIN framework .", "Before Vaadin 7 it was clear to me that for every event in the browser that had a listener in the server a simple HTTP Request will be made and it will go through my Filter thus initiating a transaction before vaadin code gets executed and properly finishing that entitymanager transaction after vaadin code executed .", "With Vaadin you can also use built-in GWT when you want to do something on the client-side .", "The Gradle plugins for Spring Boot and Vaadin configured as follows : .. . .. . The Vaadin version is specified as follows : .. . .. . Vaadin dependencies are specified as follows : .. . .. . This works fine but as soon as I change the Spring Boot version to .. . .. . then I get the error : .. . .. . Illegal character in path at index 89 : https : oss.sonatype.org content repositories vaadin-snapshots com vaadin vaadin-server vaadin.version vaadin-server- vaadin.version .pom .. . .. . Update .. . .. . Groovy which Gradle uses supports String interpolation only when using double quotes so changing the Vaadin dependencies to .. . .. . fixes it .", "Without looking deeply into the Vaadin source code I can t tell you exactly whether it is a Vaadin bug or a bug in the way that you are using Vaadin .", "You can either use the brandnew server-push with vaadin 7.1 or one of the poll-methods in previous vaadin versions .", "I ve followed all the steps in the Book of Vaadin on enabling server-push including adding the vaadin-push.jar file to WEB-INF lib adding the asyncSupported true parameter to the @WebServlet annotation and adding the @Push annotation to the UI class .", "I could solve the issue by re-compiling my Client-side modules Vaadin Client Widgetsets and Vaadin Addons Widgetsets with the Vaadin Client Compiler Version 7.5.3 .", "I am new to vaadin .", "Is it possible to to the same with a vaadin-grid", "Here is the answer How to get the Vaadin 7 application server IP and port", "I m using pieces of code from the Vaadin Dashboard demo https : github.com vaadin dashboard-demo .", "Example code using Vaadin https : vaadin.com home 7.3.7 with the fresh new as of 2014-12 https : vaadin.com blog - blogs vaadin-charts-2-0-released Vaadin Charts 2 in Java 8 .", "See the Hiding Columns https : vaadin.com docs - part elements vaadin-grid vaadin-grid-columns.html vaadin-grid.columns.hiding section in the grid documentation for an example .", "I ve gived a look at Vaadin but i don t like so much that philosophy : the Gwt idea to spare the elaboration load from server and client is winning in my opinion while in Vaadin if i don t understand wrong the elaboration is almost only server-side .", "I m looking for how to close a tab in vaadin framework .", "Are you using Vaadin 6 or Vaadin 7", "Vaadin 7 .. . .. . This Answer applies to Vaadin 7 .", "As of Vaadin 6.7.3 this is currently not possible using the stock Vaadin table component .", "If do not feel comfortable with the Vaadin way go with the JS otherwise stick with vaadin .", "it is when Vaadin UI is detached .", "I ve made a ticket with Vaadin .", "I wanted to implement Vaadin Server push so that changes on the server DB are pushed to users .", "you can control the behaviour by setting the windowName parameter in Page.open see : vaadin.com api 7.4.7 com vaadin server https : vaadin.com api 7.4.7 com vaadin server Page.html open 28java.lang.String 20java.lang.String 29", "But Vaadin is not slow", "the only thing gwt vaadin needs from the servlet architecture is a way to communicate with the client .", "1 Each and every action in Vaadin makes a call to the server .", "The Vaadin framework may do so under-the-covers in its internal implementation but that is none of my concern as a Vaadin app developer .", "The Vaadin Designer is exclusively available inside the Vaadin Eclipse Plugin https : marketplace.eclipse.org content vaadin-plugin-eclipse .", "Vaadin seems to have resolved this in vaadin 7 but have provided no workaround for vaadin 6", "For a project I am working on which depends on vaadin-6.8.12 I would like to use the Page JavaScript classes included in the vaadin-server-7.0.6 JAR .", "There don t seem to be any common versions of vaadin and vaadin-server available on the maven-central repository thats why I mixed versions .", "When using the vaadin-archetype-clean archetype you first need to uncomment the relevant sections in your pom.xml gwt-maven-plugin and vaadin-maven-plugin configuration sections as well as the dependency on GWT and the snapshot plugin repositories .", "You can do this with the HTML5 canvas and wrapping it in a Vaadin component is easy but it ll require that you code the component with GWT .", "Thanks for citing that mention in The Book Of Vaadin .", "Vaadin applicaction lives as long as web session .", ".. . .. . Looking at the Netbeans Vaadin plugin page http : plugins.netbeans.org plugin 50531 vaadin-plug-in-for-netbeans it seems that it only helps with a few development processes without providing a GUI designer : .. . .. . Vaadin Plug-in for NetBeans provides help with developing Vaadin projects : .. . .. . Wizards for project generation .. . Preferences page for updating Vaadin version setting widget set compilation parameters and more Vaadin .. . Add-on Directory integration and code-completion .. . Code completion and various Vaadin related templates : .. . Use client package for widget source code .. . Generate client-server state object .. . Generate client-server .. . AccepCriterion DnD class .. . Generate Connector implementation .. . Create GWT module file More information about the plugin in the Wiki http : wiki.netbeans.org VaadinPlugin1.1.0 .. . .. . Similar information is available on the Vaadin site https : vaadin.com docs - part framework getting-started getting-started-netbeans.html getting-started.netbeans .. . .. . Without the plugin you can most easily create a Vaadin project as a Maven project using a Vaadin archetype .", "I have the following piece of code that I wrote using Vaadin .", "I haven t tried Vaadin .", "Valo is the latest theming for Vaadin .", "I m using Vaadin 6.8.9 ." ] }
{ "confidence": [ 76.6138916015625, 68.50218200683594, 68.08494567871094, 67.61531829833984, 67.23368072509766, 65.48983764648438, 64.68653869628906, 64.60221862792969, 64.59744262695312, 64.43854522705078, 63.572601318359375, 62.967559814453125, 62.841453552246094, 62.402122497558594, 62.0344123840332, 61.415714263916016, 59.62926483154297, 59.54948425292969, 58.75578308105469, 58.71376037597656 ], "content": [ "Question : After playing around with Vaadin for about a week I m curious about how Vaadin uses GWT . GWT compiles Javacode to Javascript . This has to be done everytime when you are redeploying . Since Vaadin has to be understood as a server-centric framework eliminating your flexibility on writing Code that is executed on Clientside and moving everything to the server which sounds worse than it actually is the GWT Compiler only runs once a time . For example this happens when you are importing a plugin from the vaadin website . But it can t be that easy right If it only would compile the code of the plugins to javascript this could have done before . So my question is : .. . .. . When does VAADIN use the GWT Compiler and what does it do at that point other than compiling to js .. . Answer : Basically you have it right and mostly answered the question yourself . In Vaadin the user-interface components consist of two parts : .. . .. . 1 . Server-side component compiled using JDK .. . 2 . Client-side widget compiled using GWT .. . .. . These parts communicate with each other over HTTP and automatically synchronize their state as needed . Server-side part maintains the state of the user-interface component and the client-side widget renders that state . Application developers typically only use the server-side components to build the application and they don t really have to care about how the client-side works . In general new components to Vaadin can be developed in two ways : .. . .. . 1 . Composing existing components .. . 2 . Creating a new widgets with GWT JavaScript + other client-side tech .. . .. . The first method here uses the existing classes and don t need recompilation of the widgets with GWT . Only the application code is compiled with JDK compiler . However in the second scenario the client-side classes change and need recompilation . This is when the GWT compiler is needed . Due to the rather monolithic nature of the GWT compiled JavaScript regardless of new code splitting features of GWT the namespace is global Vaadin uses the concept of widget set . That is a GWT module that contains all the widgets needed in the application . That means that adding new client-side widgets to an application a GWT recompilation is needed . It is also a good practice to recompile widget set when removing widgets to optimize the widget set size . GWT compilation step itself is nothing special . However Vaadin itself contains lot of additions helpers and workaround to GWT classes that are applied and used by the widgets . All this is quite visible when using Vaadin add-ons see http : vaadin.com directory . Even add-on are simply jar-files if they contain a new client-side widget code widget set compilation using GWT is needed when they are added to a project .", "Question : Has anyone tried implementing a web application with Clojure using Compojure and Vaadin I had seen an article on using Clojure with JWT for creating web apps . Vaadin is based on GWT so you get a lot of the advantages of GWT though Vaadin is completely Server-centric . And Clojure gives the advantage that you can use any Java Based Framework so what thoughts on the Clojure + Vaadin based web application Comment : I used JWT as well as Vaadin . very nice but much more community support and documentation for Vaadin .. . Answer : GWT uses a custom compiler for Java source code . If Vaadin depends on that aspect it will not work with Clojure which compiles directly to Java byte code .", "Question : Has anyone tried implementing a web application with Clojure using Compojure and Vaadin I had seen an article on using Clojure with JWT for creating web apps . Vaadin is based on GWT so you get a lot of the advantages of GWT though Vaadin is completely Server-centric . And Clojure gives the advantage that you can use any Java Based Framework so what thoughts on the Clojure + Vaadin based web application Comment : I used JWT as well as Vaadin . very nice but much more community support and documentation for Vaadin .. . Answer : Yes created youcaneatat.com entirely in Clojure and vaadin . The advantages of Clojure using Clojure are that it is a Lisp and the advantages of using Vaadin are that you get to code everything using only serverside programming techniques so you do not need to think about Javascript callbacks or anything like that . However Vaadin is very client heavy so I would only recommend this for intranet applications", "Question : Is is possible to implement the client-side of a Play Framework 2.x web application using GWT or Vaadin .. . .. . Play 1.x has a special module that provides GWT integration but I can not find examples of the use of these technologies together in Play 2.x version . Can these technologies be integrated Is there a module or must some other approach be used Comment : Why is this question closed I too would like to know the answer to how gwt and play2 can be used together . Has anyone used them to any degree Outcomes pros cons Thanks Comment : It would be better if you attach the Play Framework 2 links you are using . I almost got it confused with PlayN framework .. . Answer : You can t use Vaadin with play2 . Vaadin is basically a Java EE servlet that must live in a Java EE container such as Tomcat . Play is not based on Java EE it uses its own server . As for GWT all server-side code needs a Java EE container . But if you just want the client-side then it s totally possible as it is with any web framework . Just create json web-services and remove server dependancies . For an example in php : http : gwtquickstart.blogspot.fr 2009 11 call-php-script-from-gwt.html Comment : this stuff is simply not true . there have been plugins for running gwt with play for 1.x and there are some for 2.x as well . the only thing gwt vaadin needs from the servlet architecture is a way to communicate with the client . Comment : then please provide us with an example Comment : youtube.com watch v IwuqAh0VSek http : www.youtube.com watch v IwuqAh0VSek", "Question : I have created a Vaadin project and I used JSNI for scripting . But when execution reaches at JSNI script it shows an error . The following is my sample code . Any help is greatly appreciated . .. . Answer : If you look at the differences between GWT Vaadin https : vaadin.com comparison you ll notice that besides the cliend-side API Vaadin also has a server-side API and the code you posted falls into that category . Searching the Vadin forum I found this question https : vaadin.com forum thread 1425254 1488747 with your exact problem . Adding below the reply of Henry Sara from the Vaadin dev team : .. . .. . JSNI is only usable in the client-side widgets whereas you are working on the server-side . .. . Use Window.executeJavaScript .. . Vaadin 6 or Root.executeJavaScript .. . Vaadin 7 if you need to execute JavaScript from your server-side application . While things may have changed since the answer and Root.executeJavaScript .. . is now probably JavaScript.getCurrent .execute .. . the Vaadin docs offer information on javascript interactions to and from the serverside https : vaadin.com docs - part framework advanced advanced-javascript.html as well as on js components and extensions https : vaadin.com docs - part framework gwt gwt-javascript.html and also you can check the wiki https : vaadin.com wiki - wiki Main Integrating 20a 20JavaScript 20library 20as 20an 20extension for more examples .", "Question : I just tried to play with Vaadin Framework http : vaadin.com home and it seems to me very easy to use . Plus what I like about his framework is that it is built on top of GWT . What do you think should I continue using this framework or it s better to stick with GWT . .. . Answer : I have used Vaadin to develop a giftadvisor at the company I work for not Vaadin . Vaadin allows you to build real componentized Swinglike web-applications . If you are concerned about client-server roundtrip for every click I have this to say : I created a mouseover button which changes the look of the button on yes mouseover . For this the framework has to go to the server and back . And it works fast enough imo . See http : www.cadeau.nl sophie to check out what I mean . I like Vaadin it suites my needs and makes webdevelopment a breeze . Regards Rob .", "Question : I was asked by the company I work to create a web user-interface for a fleet managment system they have developed . This system is written in java so I thought that the library I should compatible with java or language neutral . Additionally it should be free open-source as well as full-featured .. . .. . After a small search I found the following libraries : .. . .. . 1 http : dhtmlx.com index.shtml .. . .. . 2 https : vaadin.com home .. . .. . Currently I face the following critical question : should I rely on a server-side library for the creation of the User Interface or should I prefer a client-side one What is more are there any other important web user-interface libraries that I should be aware of Since I do not have any experience in the topic every advice will be very useful : Comment : Although I am not fluent in javascript etc.. . Is there any reason I should prefer dhtmlx over vaadin Comment : What is more does this library worth the effort echo.nextapp.com site http : echo.nextapp.com site Comment : The future of Web programming is a statefull programming model transparent to the programmer . Wicket could be an alternative - wicket.apache.org http : wicket.apache.org . Comment : I came across another library : jquerytools.org http : jquerytools.org Do you think it worths the effort of trying it out it seems to be simple Comment : Tried it . Although I am not fluent in javascript etc .. . You ll get lost very quickly . If you really insist on using Javascript as a UI then go for the cutting edge - jqueryui.com http : jqueryui.com and documentcloud.github.com backbone http : documentcloud.github.com backbone for the MVC on the client-side . As I said it s complicated to develop the web application alone if you have to learn Javascript and browser compatibility at the same time.. . JQuery is fully portable that should save you some time . Good luck . .. . Answer : I d say go for Vaadin . It s Swing like development without the HTML JavaScript CSS and any other helpfull libraries . Even though this is a polyglot development time pick simplicity and productivity over flexibility . You ll thank yourself in the long run . Comment : Yes it performs validation on the server-side . It causes some performance issues but I wouldn t be worried about that . Java is one of the fastest languages out there . You should concern yourself about productivity not about performance . There is a link can t find it right now on the Vaadin home page or blog about their performance . Needless to say it s fast . Comment : Vaadin code executes in the server-side If yes would it cause performance issues Btw what do you mean by polyglot development time question answered above Comment : Here is the link about the performance - vaadin.com blog - blogs vaadin-scalability-study-quicktickets https : vaadin.com blog - blogs vaadin-scalability-study-quicktickets . Vaadin is based on the GWT framework . It s sort of a server-client communication without the need to code in 15 languages Java compiles to Javascript . That s what I meant by polyglot - programming polyglotism en.wikipedia.org wiki Polyglotism http : en.wikipedia.org wiki Polyglotism . And Vaadin uses that sort of communication it s built on top of GWT but uses the validation on the server . Comment : what are the cons in using vaardin can i use it to include google-maps or similar widgets in my apps Comment : The cons are well the cons of any component based UI . And as you mentioned performance . To use google-maps as a part of Vaadin no you should create your own component . You can create it using GWT vaadin.com book - page gwt.html https : vaadin.com book - page gwt.html . That s the drawback - you have a limited number of components . The components are rich simple to use but if you want something custom - you have to create it . There are user components as well - you can check it out . To sum up - the cons are performance and flexibility .", "Question : Can anyone suggest whether GWT or Vaadin are a better choice to design an application Also : what are the differences in coding-style .. . Answer : Differences between Vaadin and GWT : .. . .. . A Vaadin includes a server-side development model that : .. . .. . Cuts number of code lines to half by reducing layers one has to implement for user-interface . Allows you to use any JVM based language for user-interface - Scala Groovy .. . Increases security by keeping user-interface logic in the server .. . Allows synchronous calls to any backend API from the web server .. . Allows use of any standard Java libraries and tools for UI layer- in server-side architecture applications .. . Does not need Java to JavaScript compilation step that often takes time or makes tooling complicated in GWT projects - instead you have the Vaadin client engine .. . Provides server-push out of the box with no extra code needed .. . .. . B Vaadin provides a large set of high level user-interface components . For GWT one would need to use commercial Sencha GXT for comparable component set . C Vaadin includes SASS based Valo theme engine that makes it easy to build good looking custom themes from your application . Valo is the latest theming for Vaadin . D Data binding : Vaadin has incorporated the ability to associate any widget directly to a data source such as database file or anything else in the server-side . This enables to define default behavior of the widgets to act on data sources . Vaadin vs GWT https : www.quora.com What-are-the-benefits-of-using-Vaadin-over-plain-GWT", "Question : I just tried to play with Vaadin Framework http : vaadin.com home and it seems to me very easy to use . Plus what I like about his framework is that it is built on top of GWT . What do you think should I continue using this framework or it s better to stick with GWT . .. . Answer : The usual talk about Vaadin concerns the widget set and worries about round trip communication between client and server . But in my opinion this overlooks the most significant perhaps revolutionary aspect of Vaadin : it completely eliminates the task of designing and implementing the client-server communication that is usually required for AJAX applications the A and X in AJAX . With Vaadin you can completely forget DTO s data-transfer objects protocol-based security problems Hibernate lazy-loading exceptions etc . You are in some sense just writing a regular old Java Swing desktop application only you are using a different UI toolkit from Swing . Comment : Hibernate lazy-loading exceptions are common with Vaadin if you don t handle them correctly . Usually you will use a session-per-request pattern which means that your entities will be deattached from the hbn session at the end of the http-request . If you try to lazy load anything outside the same http-request a lazy-loading exception will be thrown - unless you re-attach the entity to the active session . Comment : You re right about that i.e . the case of lazy-loading problems when an object is used across multiple requests . With Vaadin you do need to understand where your objects are going to go between requests including the possibility of serialization . Comment : @Archie : I think that you re slightly oversimplifying the issues encountered when using ORM sessions with Vaadin or any stateful web framework actually . We found that struck the right balance when binding the life cycle of our entity managers in JPA alright to that of the layouts themselves .", "Question : I am evaluating possibilities to create mobile hybrid Apps with GWT and Apache Cordova PhoneGap . I already build a small prototype with mgwt and liked it but I would like to research a few other possibilities before starting the project . Therefore I took a look at Vaadin and its AddOn Touchkit . I have the following questions : .. . .. . 1 . Is it possible to use the Vaadin Touchkit Addon in a Client-Side Application which does not need a permanent server connection In the mobile chapter https : vaadin.com book vaadin7 - page mobile.html of the documentation an example is shown that is a Server-Side Application as far as I understand it and therefore would need a server connection for each UI event . Please correct me if I m wrong I have no experience with Vaadin . 2 . Is there any difference between a normal GWT App and a Client-Side Vaadin App 3 . Does it has any advantages to use Vaadin Touchkit instead of mgwt 4 . In general is Vaadin Touchkit comparable to mgwt and if yes which are the main differences .. . Answer : 1 . You can build a Vaadin TouchKit applications that work offline . The Parking Demo shows this : http : demo.vaadin.com parking Source code here : https : github.com vaadin parking-demo By default default the application is online but for the data-entry the app uses offline client-side-only approach . 2 . If you are building a client-side Vaadin app you would still use the TouchKit widgets . Until version 3 TouchKit widgets have followed the iOS native widgets but v4 introduces new styles that are more device agnostic and better suitable also for Android devices . 3 . The most prominent difference and advantage if you wish of Vaadin TouchKit is however the default server-side programming approach . It is very quick to build mobile optimized web-applications - especially if you already have an existing Java web application and business logic in-place . For client-side apps the visible difference is the look-and-feel of the Touchkit and mgwt widgets . 4 . Generally this is also where it boils down to : If you are quite ok to have parts of the application running online data on server and need the offline-mode is only needed for some parts of application Vaadin TouchKit is very quick and efficient way to build decent looking apps . On the other hand mgwt gives you direct start on the client-side-only applications and is maybe better optimized for that . You had already found out that both suffer from the sandboxing of HTML5 applications . While camera and location APIs are available a solution like phonegap is still needed to really integrate with the device and match native applications .", "Question : I just tried to play with Vaadin Framework http : vaadin.com home and it seems to me very easy to use . Plus what I like about his framework is that it is built on top of GWT . What do you think should I continue using this framework or it s better to stick with GWT . .. . Answer : Hey . As a disclaimer I work for the company developing Vaadin . Vaadin uses GWT in a way that it has a set of components precompiled in GWT . You can of course additionally make your own components if you so want to . However the set of components is quite complete and can often be customized for your own need . This means that you don t have to recompile your code from Java to JavaScript every time you change your application . You just combine the already available components together . The framework is server driven so all logic is handled on the server-side . The components has two parts client and server file . The client-side is just a dummy view for the component . Once you interact with it it sends a message to the server that this or that was pressed written etc . The server then decides what should be done . This is for increased security because you can t hack the logic as only a small API meant for sending requests is available in the javascript . This may be in some cases a little trade-off with speed of the application but I don t think it is a so bad . Worst speed bumps are usually db query round-trips and such which doesn t have anything to do with the choice of the UI framework . Sluggishness of the demos as suggested can be because you re far from the server or there is a high user hit at the moment . Try it in an own environment close the the final application of your application to see how well it performs . There are some ready application that you can just deploy to test it out . I guess the choice boils down to what you are trying to do . Vaadin is good for web-applications as you can build a normal Java application and do the dynamic web UI for it easily . If your doing something more of a traditional web site where users only views the page - more than actively interacts with it then Vaadin is not the best way to go . Go with some other free frameworks like rails or a php framework etc . I think that you re more doing an application as you re suggesting that you are using GWT now so Vaadin should be good . Ask more questions here on the Vaadin forums or at the irc channel vaadin @freenode and maybe someone can give you more reason to why or why not use Vaadin . Comment : Hi Jens I was beginner to vaadin and we are planning integrate with our app with vaadin . we planned to control all UI and components based on the xml-configuration . Can you suggest better way to implement vaadin flexibly.Your answer would help me a lot.Thanks in advance Comment : I don t work for Vaadin and will concur . Vaadin is beautiful . By far the best framework I ve used in the last few years . I am infinitely more productive . Please tell your coworkers that they have produced an awe inspiring product and I am highly appreciative . Comment : I m a fan of Vaadin but developers should know they have a rather expensive add-on scheme . We have a few desktop browser applications that are pretty nice but for our mobile we couldn t justify the 490 price tag per developer . But that s still cheaper than the almost 5K Sencha charges . Comment : Vaadin is somewhat sluggish and the low price is as @cbmeeks mentioned misleading since many of the features that you might want to have are paid and at a very steep price so you either have to write your own stuff look for alternatives usually there are such though since they are not supported by the company behind Vaadin as a company you might be put in a tight position or cough up the money . Things get worse if you go mobile . I would probably stick to HTML5+JS in such scenarios . So yeah it s a nice framework but as all out there it has its drawbacks . Comment : hello jens : I have a vaadin based web application its making 5000 network requets in single page loading. . what could be reason for that any idea", "Question : I m working to learn some good frameworks o set of frameworks languages for to build some RIA java based not exclusively business-oriented ones . I m at my start so excuse me for so general question . Actually I ve spent some time on GWT and i like that philosophy . Problem is Java 8 I m working with Java 8 and there is an incompatibility with GWT I know is only matter of time to be resolved but in the meantime i m working around . Now I ve understood that GWT is the best for to build client-side RIAs but lack somewhere in the server-side aspect and it probably need to be reinforced in some way . But what s means reinforcing what can be the good partner server-side for GWT I ve gived a look at Vaadin but i don t like so much that philosophy : the Gwt idea to spare the elaboration load from server and client is winning in my opinion while in Vaadin if i don t understand wrong the elaboration is almost only server-side . Now the question is : what is the best 2014 practice road Only GWT GWT + server-side add-on s and what addons Vaadin Or something different Comment : I am using GWT for many years and I see no limitations either on the client-side or on the server-side . In my opinion all this talk about limitations is an attempt by some vendors to differentiate their products . That being said SO is not a discussion forum - so this question does not really fit in here . .. . Answer : I think you must consider what you wish to do . If you wish to stay with java then a GWT based solution is great . GWT gives you many features and not much hassle with javascript . If you need only client-side application with not much server interaction this is a good choice . Of course you then need a server-part of your project . Vaadin commes in when you anyway have a server-side solution with much businesslogic datalayers background jobs etc . etc . Or when you don t wish to write GWT stuff yourself . You still can if needed .. . .. . Your business logic is running on server-side the communication with the webbrowser is secured agains usual web exploits attacks . You would have to implement them yourself when using a own or xml json based protocol .. . .. . Vaadin integrates client+serverside without the need to hassle with GTW or Javascript . So : .. . .. . For projects with no or not much server-side code Business layer go for GWT For all else go Vaadin", "Question : Can anyone suggest whether GWT or Vaadin are a better choice to design an application Also : what are the differences in coding-style .. . Answer : A few more points : .. . .. . A fundamental difference is that in GWT you have to separate your application into Client and Server code no such distinction in Vaadin . This will affect the architecture of your application . In GWT client code you must code in Java and have a limited subset of language features available that the GWT compiler can translate into Javascript . In Vaadin you can code in any JVM language since everything runs in the server I m using Vaadin with Scala . This may or may not be relevant to you . GWT compilation is VERY slow although in development mode you have the emulator . This makes production environment updates painful a GWT application I developed has grown pretty big and currently takes around 15 minutes to compile . It s very simple to extend GWT with 3rd party widgets or roll your own . Creating new Vaadin widgets is more complex .", "Question : How to check in Vaadin 7 if scrollbar is visible or not for a certain component for example for Panel Comment : I don t think it is possible out-of-the-box with Vaadin but you could do some JavaScript see here https : vaadin.com docs - part framework advanced advanced-javascript.html and here http : stackoverflow.com a 4814526 1063673 . But why do you need to know whether scrollbars are visible Comment : I m using github.com alump GridStack https : github.com alump GridStack component and would like to resize each component attached to GridStack according to its content . Right now I have no any solutions other than test scrollbar visibility .. . Answer : Any implementation of AbstractClientConnector can be extended with AbstractExtension : https : vaadin.com api com vaadin server AbstractExtension.html .. . .. . An extension is a possible way to extend the functionality of your component : https : vaadin.com docs - part framework gwt gwt-extension.html .. . .. . Adding features to existing components by extending them by inheritance creates a problem when you want to combine such features . For example one add-on could add spell-check to a TextField while another could add client-side validation . Combining such add-on features would be difficult if not impossible . You might also want to add a feature to several or even to all components but extending all of them by inheritance is not really an option . Vaadin includes a component plug-in mechanism for these purposes . Such plug-ins are simply called extensions . In the client-side extension implementation you can write your custom GWT code like following pseudo code : .. . .. . Passing events between server and client : https : vaadin.com docs - part framework gwt gwt-rpc.html", "Question : Has anyone tried implementing a web application with Clojure using Compojure and Vaadin I had seen an article on using Clojure with JWT for creating web apps . Vaadin is based on GWT so you get a lot of the advantages of GWT though Vaadin is completely Server-centric . And Clojure gives the advantage that you can use any Java Based Framework so what thoughts on the Clojure + Vaadin based web application Comment : I used JWT as well as Vaadin . very nice but much more community support and documentation for Vaadin .. . Answer : I ve created an article in Vaadin Trac wiki describing such integration : .. . .. . http : dev.vaadin.com wiki Articles ClojureScripting Comment : Thanks for this . Will check it out", "Question : I just tried to play with Vaadin Framework http : vaadin.com home and it seems to me very easy to use . Plus what I like about his framework is that it is built on top of GWT . What do you think should I continue using this framework or it s better to stick with GWT . .. . Answer : Well I d like to comment something . After almost 1.5 year developing a not so huge GWT application using all the best-practices I learned from the last Google I O like MVP EventBus CommandPattern etc . I say this from the bottom of my heart : after spending days trying to get things work out the way my team and client wanted both technically and visually even after the release of UiBinder Vaadin came to me like a light in the end of the tunnel . After writing almost a thousand boilerplate actions for command-pattern another thousand presenters and views and another thousand event handlers etc. . Not having to deal with almost 75 of these classes and still maintaining a good pattern approach appfoundation add-on a little network overhead is acceptable . With Vaadin out-of-the-box you get good widgets paging data-binding flawless layouting . All of this for what Some more memory consumption in the server-side . I think I can say this is acceptable because I m not building the next Facebook or something . I still can handle thousands of simultaneous users per medium server and yet maintaining low-latency round-trips . With Vaadin I can build a nice app with almost a half of lines-of-code and still the application seems more complete . : - .. . .. . UPDATE February 23 2011 : I can t stress out how one should be aware of each framework s limitations . Vaadin is no different . One should be aware that Vaadin abstracts away any form of html or javascript . Also the resulting HTML is veeeery heavy and you should take care of history state changes yourself . So be aware of those overheads when you build your project . Marcos Alcantara Comment : I can answer that for you since I work for Vaadin Ltd : no he doesn t . Comment : Good point about Framework limitations Very similar to GWT if you buy-in then you lose a control of HTML . Sometimes I think it s simpler to learn JavaScript and Ember.js than Vaadin GWT .", "Question : Can anyone suggest whether GWT or Vaadin are a better choice to design an application Also : what are the differences in coding-style .. . Answer : In GWT application logic is normally run on client-side . It only calls server when it needs to read save some data . In Vaadin application logic is on server-side . Client side must normally call server after every user interaction . GWT advantage : .. . App logic replies to user interaction is faster as it is run locally in the browser . It s also relatively insensitive to bad network conditions . Network is used only when needed to read save new data which saves net traffic important for high traffic sites . In this regard Vaadin is slower and introduces a lag in UI interaction which is annoying to user . If network is bad this will show in UI responsiveness . Vaadin advantage : .. . App logic is run on the server so it can not be inspected by the user . Arguably Vaadin claims that makes it more secure .", "Question : Can anyone suggest whether GWT or Vaadin are a better choice to design an application Also : what are the differences in coding-style .. . Answer : I belive Vaadin is a much more advanced framework than GWT BUT When it comes to optimise performance on the client-side there is nothing much you can do unless you build your own components and that s where the beauty of Vaadin stops In a project i m working right now 90 of the staff I ve done worked as a charm And then I had to use an event timeline next to a couple of tables . When I loaded more than 400events on the timeline my web page was almost unusable not to mention terrible slow on initialisation . I ve been trying to optimise the code the last two months . At the end I used a GWT component .", "Question : I am planning to make an application that has views with complex forms and logical validation on the client-side . I plan to use AJAX for submits and have some visual appeal . I want a recommendation from those who have experience developing with Bootstrap and or CoffeeScript and Vaadin . I have two options : .. . .. . Using Bootstrap CoffeeScript and some framework for the server site such as Play Framework Rails or Django .. . Vaadin .. . .. . The criterion that concerns me is related to the complications that may arise in the client-side JavaScript and or HTML5 validation as well as in CSS and HTML code to be written using Bootstrap . Is it worth using CoffeeScript over Vaadin in a practically ria app I see that there are many who have chosen Bootstrap and I m sure they have their reasons . Help me with the decision . Some relevant documentation could be helpful too . Comment : My two cents : Vaadin uses a lot of memory on the server-side like JSF so if you have a lot of clients it may be hard to scale.. . .. . Answer : Vaadin .. . .. . Vaadin in an amazingly good tool for building interactive desktop-style web apps developed in pure Java and delivered via regular web browsers . Benefits .. . .. . Vaadin http : www.vaadin.com 6 7 apps run entirely on the server-side . The JavaScript library automatically installed by Vaadin into the user s browser window simply : .. . .. . Draws on-screen whatever the server-side app tells it to . Feeds user actions clicking typing and so on back to the server for the app to consider and respond . So there is no logical validation on the client-side or html5-validation at least not from the Vaadin app developer s point of view . The Vaadin framework may do so under-the-covers in its internal implementation but that is none of my concern as a Vaadin app developer . That s the core benefit of Vaadin : I don t care how Vaadin gets my forms onto the user s screen . As a Vaadin app developer I am not writing any JavaScript HTML DOM CSS or AJAX . Just pure Java . The style is similar to Swing http : en.wikipedia.org wiki Swing 28Java 29 : Instantiate a layout https : vaadin.com book - page layout.html a form add labels https : vaadin.com book - page components.label.html add buttons https : vaadin.com book - page components.button.html add fields https : vaadin.com book - page components.textfield.html add other widgets https : vaadin.com demo . Attach validators https : vaadin.com book - page components.form.html components.form.validation as needed . Nest additional layouts for complicated forms . All of that executes in memory on the server-side all in pure Java . Finally tell the layout to show itself . Poof like magic Vaadin tells the browser to display a likeness of that form . If you want to develop desktop-style business-style apps that happen to be deployed through a web browser Vaadin is a wonderful tool . Trade-Offs .. . .. . Trade-offs include : .. . .. . Lots of memory and CPU usage on the server-side . Giving up control over the HTML CSS JavaScript . Scaling .. . .. . Your web app lives on the server not the client . All your business logic the users entered data the internal representation of all the users s forms such as row items in a table all this lives on the server . Multiply that by number of users . This means a Vaadin app can demand much memory and CPU usage . That may limit scaling up . But given 64-bit Java multiple gigs of memory and multiple cores on even the lowliest of machines such as a Mac mini http : www.apple.com macmini server scaling-up is likely an issue only for the largest busiest of apps . And even in those rarer of large busy app there may be ways to handle scaling in Vaadin . All of the app lives in a Servlet Session . Some web infrastructure allows such session-state to be moved between servers or even persisted out to storage to be picked up by other servers . Or your app may scale well . Simulations with 11 000 simultaneous clients have been done . See : .. . .. . Vaadin Scalability Study - QuickTickets https : vaadin.com blog - blogs vaadin-scalability-study-quicktickets company blog post .. . Scaling with Vaadin and WildFly Webinar https : youtu.be kCOd9l4WGNY with Arun Gupta video presentation YouTube .. . .. . Control Over HTML CSS JavaScript .. . .. . If your team is more comfortable or experienced with conventional web app architectures then Vaadin may not be for you . In Vaadin you write your app entirely in pure Java and Vaadin translates that to HTML CSS and JavaScript automagically . You can tweak the CSS a bit . And even without touching CSS Vaadin s themes Valo https : vaadin.com valo Reindeer http : demo.vaadin.com ReindeerTheme give you much control over colors sizes and fonts if you wish to override the defaults . But know that Vaadin is in the driver s seat in generating the HTML CSS you are just passenger who is allowed a small bit of backseat-driving . If your goal is something other than developing desktop-style apps if you want to take full control of the HTML CSS then Vaadin may not be for you . .. . .. . Update .. . .. . Vaadin 7 has been released . While largely the same architecture as Vaadin 6 7 is better than ever . See : What s New https : vaadin.com vaadin7 .", "Question : We have a vaadin application and custom gwt widget included as external jar . Widget has its own translations polish and english . The problem is when running custom widget in external app it does translate properly but when it is inside a vaadin application regardless the application and even browser locale - it is only in english all the time . Question is how gwt custom widgets obtain information about language to use and is there any option to override this force widget language locale Comment : Can you provide link-to this widget Is it public Have you tried setLocale method on a component Comment : Unfortunately I can t publish this widget . I tried to setLocale method on vaadin component surrounding this widget but it didn t help . Problem is that where vaadin locale is server-side method it can change the data sent to client . GWT widgets we re talking about is like a full gwt application put inside a vaadin component . When published as stand-alone web-site it takes translations from locale default or GET param . When in vaadin widget it does no care at all about browser locale request language tag or GET parameter . .. . Answer : One of the problem was locale name mismatch . Where vaadin application was able to be translated ony for language-tag locale . e.g . pl polish gwt widget needed locale with country code e.g . pl PL polish Poland . The actual solution was to force gwt to search for locale in meta tag only and create this tag .. . .. . on server-side respecting application language and before any gwt javascripts are attached . Unfortunately this leads to refreshing page after language change but I guess it cannot be done any other way due to gwt internationalization methods ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
kylin@olap@121
kylin -- an open-source distributed analytical engine from ebay to provide sql interface and multi-dimensional analysis @placeholder on hadoop to support tb to pb size analysis .
{ "confidence": [ 42.790679931640625, 38.5869026184082, 35.7994270324707, 34.522789001464844, 34.31547546386719, 33.92237091064453, 33.92237091064453, 32.6771240234375, 32.04471206665039, 31.87375831604004, 31.60675048828125, 31.423742294311523, 31.256258010864258, 30.51370620727539, 30.322168350219727, 30.17687225341797, 30.174480438232422, 30.16765785217285, 29.437252044677734, 29.37920379638672, 29.37920379638672, 29.37920379638672, 29.067678451538086, 28.922409057617188, 28.922409057617188, 28.67904281616211, 28.445114135742188, 28.445114135742188, 27.88556480407715, 27.86968994140625, 27.510986328125, 27.36840057373047, 27.36840057373047, 27.36840057373047, 27.199867248535156, 27.190624237060547, 27.190624237060547, 27.190624237060547, 26.6436824798584, 26.40028953552246, 25.945377349853516, 25.945377349853516, 25.945377349853516, 25.945377349853516, 25.945377349853516, 25.945377349853516, 25.945377349853516, 25.64385414123535, 25.598064422607422, 25.491348266601562, 25.491348266601562, 25.491348266601562, 25.491348266601562, 25.444473266601562, 25.123714447021484, 25.079484939575195, 24.915679931640625, 24.59894561767578, 24.477962493896484, 24.37856674194336, 24.2460994720459, 24.2460994720459, 24.2460994720459, 24.2460994720459, 24.16935920715332, 24.019140243530273, 23.481964111328125, 23.405067443847656, 23.383785247802734, 23.336444854736328, 23.202430725097656, 23.202430725097656, 23.202430725097656, 23.202430725097656, 23.202430725097656, 23.202430725097656, 22.896223068237305, 22.67464828491211, 22.640026092529297, 22.63397216796875, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.957183837890625, 21.845115661621094, 21.845115661621094, 21.801565170288086, 21.801565170288086, 21.168170928955078, 21.15625762939453, 21.13818359375, 20.556316375732422, 20.556316375732422, 20.4647216796875, 20.4647216796875 ], "content": [ "Kylin is a MOLAP https : www.youtube.com watch v IhFkNmVmwn4 multidimensional online analytical processing engine .", "somehow enable the kylin setup to submit job to hadoop .", "Possible configuration of kylin in pure hadoop setup no sandbox 2 .", "Apache Kylin s use-case is interactive big data-analysis on Hadoop .", "Sorry I just start to lean kylin .. . .. . When I execute the sql select from kylin sales where price 2 in default sample cube of kylin it failed with the message .. . .. . anybody knows the reason", "The issue here is Kylin assumes the same Hive jars on all Hadoop nodes .", "For testing or dev I recommend run Kylin in a Hadoop sandbox .", "I am using kylin which uses hadoop hive and hbase .", "Just make sure the machine where Kylin runs has hadoop setup correctly and you should be fine .", "Kylin v1.0 only works with HBase 0.98 0.99 .", "Few days ago kylin developers commited bypass for this kind of issue .. . .. . https : github.com apache incubator-kylin commit a4692dba681bc2f136e02c64565639eb0080fcc9 .. . .. . Becasue sometimes hadoop may fail to get counter even if the job succeed from now Kylin gives warning instead of error when failed to get cube source .", "How to make integration between Apache Kylin and Facebook Presto and so Apache Kylin can read from Facebook Presto instead of reading from Hive", "Where is Kylin metadata stored", "Why could not Kylin load this table from Hive", "There is no such sandbox or non-sandbox configuration in Kylin .", "See https : issues.apache.org jira browse KYLIN-1021 .. . .. . Finally there s also a open JIRA suggests that Kylin should submit Hive jars by default .", "HDP 2.3 ships HBase 1.x and there is a special version of Kylin for it .", "I have installed Hadoop version 2.6.0 HBase version 0.99.0 Hive version 1.2 Kylin version 1.5.0 .", "I was wondering if there are any resources regarding Apache Kylin installation without any sandbox like cloudera hortonworks support .", "I m a newbie for kylin .", "Following is the log of Apache Kylin .", "Kylin was not tested on Mac Windows .", "What kind of permission do I need for Kylin", "System fault tolerance : Kylin relies on Hadoop and HBase for most system redundancy and fault tolerance .", "I installed apache kylin which requires Hadoop hove hbase and java to work .", "Kylin provides ANSI SQL interface so you can query the Hive tables pretty much the same way you used to .", "I m using kylin http : kylin.apache.org .", "Hive and Kylin are deployed on Master Node .", "Has anyone come across and solved this type of error while setting up Kylin", "I have setup all of the above in Standalone mode while in running Kylin it checks in early stage about Hadoop HBase and Hive .", "Install HBase .. . .. . Then I used the binary from kylin site and so far been able to run it .", "If Kylin has problem submitting MR jobs check two places .", "Post the log to kylin dev mailing list and someone will be able to help .", "I am trying to run apache Kylin on a Dev cluster .", "Kylin stores the created cube on Hbase .", "See https : issues.apache.org jira browse KYLIN-1082", "Kylin uses HCatalog to read Hive table .", "Sorry Kylin only runs on Linux as of version 1.5", "I am using Kylin apache-kylin-1.5.2.1-HBase1.x-bin.tar.gz and hbase 1.1.2.2.4.Kindly help to resolve this issue .", "Look at this JIRA to see if it applies to your issue : issues.apache.org jira browse KYLIN-1021 https : issues.apache.org jira browse KYLIN-1021", "In addition to that every build step in Kylin is idempotent .", "I m also Apache Kylin co-creator and committer .", "Notes : I m Apache Kylin co-creator and committer .", "All I had to do was rebuild Kylin .", "Apache Kylin provides JDBC and Rest API .", "We cannot write MDX using kylin JDBC .", "I was able to start kylin and execute sample.sh .", "From kylin s dev mailing list I got the answer .. . .. . The seller id was missed in data model s measure columns Please edit the data model and add it there and then when edit the cube you will be able to select it the measure . .. . .. . http : apache-kylin.74782.x6.nabble.com No-seller-id-in-dimensions-but-can-create-a-count-distinct-measure-on-it-in-kylin-sample-cube-td4813.html", "Btw the root cause of your problem is the cut command on Mac does not support --output-delimiter option which is used in a Kylin shell script .", "This job succeeds if I restarts kylin server and resume cube building job .", "Kylin ships a jar file specified by kylin.job.jar property in kylin.properties .", "I encountered the same error while installing kylin-1.5.1 .", "What type of HBase configuration do I need to check on Kylin", "Look at : ebaytechblog.com 2014 10 20 http : www.ebaytechblog.com 2014 10 20 announcing-kylin-extreme-olap-engine-for-big-data", "Install Hadoop 2.6 .. . 2 .", "Double check these commands work as expect if you are not sure what cluster Kylin connects to .", "Installed Kylin v1.0 on HDP 2.3 Sandbox everything is alright but then this error is recorded in the log .. . .. . Using Java version 1.7.0 85 .. . .. . The server starts successfully on port 7070 but displays no page due to the above error .", "A simple MOLAP query is like select week beg dt sum price from kylin sales where meta categ name Collectibles group-by week beg dt .. . .. . Kylin also supports a special type of RAW measure that allows filter such as price 2 but that s not demonstrated by the sample cube .", "One limitation however is Kylin provides only aggregated results or in other word SQL should contain a group-by clause to yield correct result .", "You can install hadoop-2.6 hive-0.14 hbase-0.98.8-hadoop2 with Zookeeper inbuilt or external zookeeper-3.5 Now you can run kylin-v1.1-release on it If you still face Issues paste the log here", "It depends what s kind of case you will leverage Kylin to serve business needs .", "Is there a way to do this without using any BI tool or kylin UI .", "If you prefer MDX google Kylin Mondrian Saiku together .", "Tried to install Kylin using the documentation http : kylin.apache.org docs15 install .", "I am thinking if it is still assuming to be in sandbox mode and not submitting job to hadoop at all there is no entry in hadoop jobtracker .", "Correct output from cube building tutorial : github.com KylinOLAP Kylin wiki Kylin-Cube-Build-and-Job-Monitoring-Tutorial : .. . .. . http : i.imgur.com 71tEeIy.png .. . .. . My output in Kylin looks corrupted : .. . .. . http : i.imgur.com GCbrN03.png .. . .. . However when I check Hive log it looks ok : .. . .. . I m using Hortonworks Sandbox 2.2 : .. . .. . Can someone tell me why my kylin logs preview looks like that and first of all could it be a reason of last step error", "This is usually fine because big data-analysis focus more on the aggregated results rather than individual records .", "a Design a-star schema using HiveQL b Load data into Hadoop using a Hive connector c Kylin would handle mapping the Hive schema to a cube schema and executing the Map Reduce through HiveQL d Output the results of the query to HBase e Use Kylin for executing SQL statements via Calcite to HBase and returning the results as JSON .", "add the following lines to this file .. . .. . After this open a new terminal window and do .. . .. . The result should have the path that we set in the previous step in the front prepended Now start kylin should work smoothly .", "CDH : 5.7 Kylin : 1.5.2 CDH 5.7 .. . .. . In kylin sample cube kylin sales cube there is a measure named SELLER CNT HLL which is COUNT DISTINCT and uses the column seller ID but when I edit it I can t select the seller id because there is no column named seller id in the dropdown list and the seller id is not a dimension in the cube .. . .. . I am little confused about this I don t know whether this is a mistake but this is what I want the cardinality of seller id is huge at actual situation I don t want seller id be a dimension but I want the COUNT DISTINCT of seller id and filter by a single seller id .. . .. . Please help me out with the confusion thanks", "Or another cleaner workaround is manually configure Kylin to submit Hive jars as additional job dependencies .", "I think kylin-job-1.1.1-incubating.jar should be created to include all its dependencies .", "Each and everything has been installed but when I start Kylin it give an error of HBase common lib not found .", "This bug might be fixed but running Kylin on Mac is still a bad idea because no one does that .", "I am running the sample cube of Kylin on cluster and getting error on step5 : Create HTable .", "kylin-1.5.2.1 .. . Hive 1.2.1.2.3.2.0-2950 .. . HBase 1.1.2.2.3.2.0-2950 .. . .. . Any help would be appreciated .", "Alternatively Can we query from multiple cubes simultaneously in a single job on Apache Kylin", "Just note step c is manual the mapping from Hive schema to cube schema is manual Kylin provides a GUI for you to do it .", "That doesn t really give generic use cases rather explains how Ebay used it as ebay developed the tool in the first place and architecture of the product .", "First is hadoop resource manager see if the job has really been submitted or not .", "I ve installed Kylin with MapR distribution and things seem to work fine up to a point .", "Apache Kylin looks like a great tool that will fill in the needs of a lot data scientists .", "Data fault tolerance : Kylin partitions cube into segments and allows rebuild an individual segment without impacting the whole cube .", "Kylin provides RESTful API an external scheduling system can invoke the API to trigger segment build and merge .", "Will put this idea into our backlog and will update to Kylin dev mailing list if we have more clear clue for this later .", "I recently came across Apache Kylin http : kylin.apache.org docs index.html and was curious what it s use cases are .", "Check out Kylin terminologies http : kylin.apache.org docs gettingstarted terminology.html if you are not sure what is star-schema and what is cube .", "I have installed apache kylin on virtual-machine and created a cube with sample-data .", "So I have installed HDP 2.4 and I know want to install Kylin .", "It is a data-warehouse tool and it uses hadoop hive and hbase .", "This job is failing without writing anything in hadoop logs .", "If these the job has dependencies on jar available in hive then either It should be a part of kylin installation document or the job must submit these jars as pointed by jira ticket .", "Thanks @Li Yang I am running it on Mac OSX.. . so should I downgrade the version of Kylin to run on Mac osX EI Capitan", "Under the scene kylin.sh uses hbase classpath and hive -e set grep env : CLASSPATH to detect hadoop settings .", "Going thru this tutorial : http : kylin.apache.org docs15 tutorial create cube.html .. . .. . But the Data Source tab under Model is disabled .", "I am trying to build my first cube using Apache Kylin everything goes fine until last step where I m getting error : .. . .. . According to this issue https : github.com KylinOLAP Kylin issues 101 above error occurs because Kylin attempt to find this pattern in hive s output : HDFS Read : d+ HDFS Write : d+ SUCCESS .", "Not sure if that has anything to do with the weirdness I m seeing or not but can anyone tell me how Kylin determines what value to put there", "For transaction data I believe the exactly number is more important but for behavior data it should be fine for example the distinct count value is approximate result in Kylin now .", "I am aware that Apache Kylin only allows one Fact Table per OLAP cube .", "I created multiple cubes each containing a single fact table in Apache Kylin ." ] }
{ "confidence": [ 69.52251434326172, 56.33496856689453, 49.07338333129883, 48.96149444580078, 46.85122299194336, 45.79203414916992, 45.69673156738281, 44.21907043457031, 43.541473388671875, 38.93520736694336, 37.667449951171875, 37.006324768066406, 36.74011993408203, 36.1110954284668, 35.32121658325195, 34.47935104370117, 33.84615707397461, 32.4857292175293, 32.152374267578125, 30.786605834960938 ], "content": [ "Question : I recently came across Apache Kylin http : kylin.apache.org docs index.html and was curious what it s use cases are . From what I can tell it seems to be a tool designed to solve very specific problems related to upwards of 10+ billion rows aggregating caching and querying data from other sources HBase Hadoop Hive . Am I correct in this assumption Comment : Look at : ebaytechblog.com 2014 10 20 http : www.ebaytechblog.com 2014 10 20 announcing-kylin-extreme-olap-engine-for-big-data Comment : That doesn t really give generic use cases rather explains how Ebay used it as ebay developed the tool in the first place and architecture of the product . .. . Answer : Apache Kylin s use-case is interactive big data-analysis on Hadoop . It lets you query big Hive tables at sub-second latency in 3 simple steps . 1 . Identify a set of Hive tables in star-schema . 2 . Build a cube from the Hive tables in an offline batch process . 3 . Query the Hive tables using SQL and get results in sub-seconds via Rest API ODBC or JDBC . The use-case is pretty general that it can fast query any Hive tables as long as you can define star-schema and model cubes from the tables . Check out Kylin terminologies http : kylin.apache.org docs gettingstarted terminology.html if you are not sure what is star-schema and what is cube . Kylin provides ANSI SQL interface so you can query the Hive tables pretty much the same way you used to . One limitation however is Kylin provides only aggregated results or in other word SQL should contain a group-by clause to yield correct result . This is usually fine because big data-analysis focus more on the aggregated results rather than individual records . Comment : Would the following use-case be valid a Design a-star schema using HiveQL b Load data into Hadoop using a Hive connector c Kylin would handle mapping the Hive schema to a cube schema and executing the Map Reduce through HiveQL d Output the results of the query to HBase e Use Kylin for executing SQL statements via Calcite to HBase and returning the results as JSON . Comment : Very close Just note step c is manual the mapping from Hive schema to cube schema is manual Kylin provides a GUI for you to do it . Also step d the output is not specific to any query but a general index of the Hive data we call the index cube .", "Question : Sorry I just start to lean kylin .. . .. . When I execute the sql select from kylin sales where price 2 in default sample cube of kylin it failed with the message .. . .. . anybody knows the reason Thanks .. . Answer : Kylin is a MOLAP https : www.youtube.com watch v IhFkNmVmwn4 multidimensional online analytical processing engine . It divides columns into dimensions and measures expects queries to filter by dimensions and return aggregated measures . Your query select from kylin sales where price 2 does not work because price is not a dimension thus is not suitable for filtering . Also the query does not select any aggregated measures . A simple MOLAP query is like select week beg dt sum price from kylin sales where meta categ name Collectibles group-by week beg dt .. . .. . Kylin also supports a special type of RAW measure that allows filter such as price 2 but that s not demonstrated by the sample cube . Comment : thanks for your help :", "Question : I was wondering if there are any resources regarding Apache Kylin installation without any sandbox like cloudera hortonworks support . I have managed to do the following : .. . .. . 1 . Install Hadoop 2.6 .. . 2 . Install Hive .. . 3 . Install HBase .. . .. . Then I used the binary from kylin site and so far been able to run it . The problem start when I try to build a cube the map reduce job gets stuck in step 2 . I am thinking if it is still assuming to be in sandbox mode and not submitting job to hadoop at all there is no entry in hadoop jobtracker . So I need solution regarding the two : 1 . Possible configuration of kylin in pure hadoop setup no sandbox 2 . somehow enable the kylin setup to submit job to hadoop . .. . Answer : There is no such sandbox or non-sandbox configuration in Kylin . Just make sure the machine where Kylin runs has hadoop setup correctly and you should be fine . Under the scene kylin.sh uses hbase classpath and hive -e set grep env : CLASSPATH to detect hadoop settings . Double check these commands work as expect if you are not sure what cluster Kylin connects to . If Kylin has problem submitting MR jobs check two places . First is hadoop resource manager see if the job has really been submitted or not . Sometimes it s just running slow . Second check kylin.log see if any exception there . Post the log to kylin dev mailing list and someone will be able to help . Comment : yes the jobs was not being submitted actually .", "Question : I was wondering if there are any resources regarding Apache Kylin installation without any sandbox like cloudera hortonworks support . I have managed to do the following : .. . .. . 1 . Install Hadoop 2.6 .. . 2 . Install Hive .. . 3 . Install HBase .. . .. . Then I used the binary from kylin site and so far been able to run it . The problem start when I try to build a cube the map reduce job gets stuck in step 2 . I am thinking if it is still assuming to be in sandbox mode and not submitting job to hadoop at all there is no entry in hadoop jobtracker . So I need solution regarding the two : 1 . Possible configuration of kylin in pure hadoop setup no sandbox 2 . somehow enable the kylin setup to submit job to hadoop . .. . Answer : You can install hadoop-2.6 hive-0.14 hbase-0.98.8-hadoop2 with Zookeeper inbuilt or external zookeeper-3.5 Now you can run kylin-v1.1-release on it If you still face Issues paste the log here", "Question : I have installed Hadoop version 2.6.0 HBase version 0.99.0 Hive version 1.2 Kylin version 1.5.0 . I have setup all of the above in Standalone mode while in running Kylin it checks in early stage about Hadoop HBase and Hive . Each and everything has been installed but when I start Kylin it give an error of HBase common lib not found . Following is the log of Apache Kylin . Please somebody help me out . .. . Answer : You are running on Windows Sorry Kylin only runs on Linux as of version 1.5 Comment : Thanks @Li Yang I am running it on Mac OSX.. . so should I downgrade the version of Kylin to run on Mac osX EI Capitan Comment : Kylin was not tested on Mac Windows . For testing or dev I recommend run Kylin in a Hadoop sandbox . Comment : Btw the root cause of your problem is the cut command on Mac does not support --output-delimiter option which is used in a Kylin shell script . This bug might be fixed but running Kylin on Mac is still a bad idea because no one does that .", "Question : I am trying to build my first cube using Apache Kylin everything goes fine until last step where I m getting error : .. . .. . According to this issue https : github.com KylinOLAP Kylin issues 101 above error occurs because Kylin attempt to find this pattern in hive s output : HDFS Read : d+ HDFS Write : d+ SUCCESS . Correct output from cube building tutorial : github.com KylinOLAP Kylin wiki Kylin-Cube-Build-and-Job-Monitoring-Tutorial : .. . .. . http : i.imgur.com 71tEeIy.png .. . .. . My output in Kylin looks corrupted : .. . .. . http : i.imgur.com GCbrN03.png .. . .. . However when I check Hive log it looks ok : .. . .. . I m using Hortonworks Sandbox 2.2 : .. . .. . Can someone tell me why my kylin logs preview looks like that and first of all could it be a reason of last step error .. . Answer : Few days ago kylin developers commited bypass for this kind of issue .. . .. . https : github.com apache incubator-kylin commit a4692dba681bc2f136e02c64565639eb0080fcc9 .. . .. . Becasue sometimes hadoop may fail to get counter even if the job succeed from now Kylin gives warning instead of error when failed to get cube source . All I had to do was rebuild Kylin . Comment : Please raise such issue to mailing list for support in time : kylin.apache.org community http : kylin.apache.org community", "Question : I m using kylin http : kylin.apache.org . It is a data-warehouse tool and it uses hadoop hive and hbase . It is shipped with sample-data so that we can test the system . I was building this sample . It is a multi-step process many of the steps are map-reduce jobs . Second step is Extract Fact Table Distinct Columns which is a MR job . This job is failing without writing anything in hadoop logs . After digging deeper I find one Exception in logs userlogs application 1450941430146 0002 container 1450941430146 0002 01 000004 syslog .. . .. . My question is should I copy all dependencies jar of mapper class to all hadoop node This job succeeds if I restarts kylin server and resume cube building job . This behavior is observed again when restart it after cleaning up everything . I am using 5 node-cluster each node is 8 core and 30GB . NameNode is running on one node . DataNode is running on all 5 nodes . For Hbase HMaster and HQuorumPeer is running on same node as NameNode and HRegionServer is running on all nodes . Hive and Kylin are deployed on Master Node . Version information : Comment : without writing anything in hadoop logs -- you mean that the command yarn logs -applicationId application 1450941430146 0002 gives no result see hortonworks.com blog http : hortonworks.com blog simplifying-user-logs-management-and-access-in-yarn section Log-aggregation in YARN Comment : @SamsonScharfrichter Output of the command is -- tmp logs hduser logs application 1450941430146 0002 does not exist . Log aggregation has not completed or is not enabled . Comment : 5 node-cluster .. . resume job .. . succeeds .. . fails again -- did you track on which nodes the job throws ClassNotFoundException In other words do you have a specific node with specific configuration issues Comment : Look at this JIRA to see if it applies to your issue : issues.apache.org jira browse KYLIN-1021 https : issues.apache.org jira browse KYLIN-1021 Comment : When the job fails I see Exception on every node but Master node . I have same configurations on all nodes . .. . Answer : The issue here is Kylin assumes the same Hive jars on all Hadoop nodes . And when certain node missing the Hive jars or even in different location you get the ClassNotFoundException on HCatInputFormat . Btw you should be able to get a clear error message from Yarn job console . This is a met issue . Deploying Hive to all cluster nodes can surely fix the problem like you have tried . Or another cleaner workaround is manually configure Kylin to submit Hive jars as additional job dependencies . See https : issues.apache.org jira browse KYLIN-1021 .. . .. . Finally there s also a open JIRA suggests that Kylin should submit Hive jars by default . See https : issues.apache.org jira browse KYLIN-1082 Comment : hive is a client . It is deployed on single node . If these the job has dependencies on jar available in hive then either It should be a part of kylin installation document or the job must submit these jars as pointed by jira ticket .", "Question : I have installed Hadoop version 2.6.0 HBase version 0.99.0 Hive version 1.2 Kylin version 1.5.0 . I have setup all of the above in Standalone mode while in running Kylin it checks in early stage about Hadoop HBase and Hive . Each and everything has been installed but when I start Kylin it give an error of HBase common lib not found . Following is the log of Apache Kylin . Please somebody help me out . .. . Answer : The issue you encountered is that cut command on mac-osx does not support --output-delimiter option . I encountered the same error while installing kylin-1.5.1 . The easy to solve it is to use the gnu binaries in your shell instead of osx binaries . Use brew http : brew.sh for installing coreutils I changed all the commonly used shell utils to their gnu versions .. . Use the below command for that . Now to make the shell use these instead of mac binaries add the path to these utils in your shell profile file . add the following lines to this file .. . .. . After this open a new terminal window and do .. . .. . The result should have the path that we set in the previous step in the front prepended Now start kylin should work smoothly . Some references links that helped me : .. . Mac forum link http : forums.macrumors.com threads updating-bash.1128506 .. . Installation guide from apple.se http : apple.stackexchange.com questions 69223 how-to-replace-mac-os-x-utilities-with-gnu-core-utilities", "Question : I m using kylin http : kylin.apache.org . It is a data-warehouse tool and it uses hadoop hive and hbase . It is shipped with sample-data so that we can test the system . I was building this sample . It is a multi-step process many of the steps are map-reduce jobs . Second step is Extract Fact Table Distinct Columns which is a MR job . This job is failing without writing anything in hadoop logs . After digging deeper I find one Exception in logs userlogs application 1450941430146 0002 container 1450941430146 0002 01 000004 syslog .. . .. . My question is should I copy all dependencies jar of mapper class to all hadoop node This job succeeds if I restarts kylin server and resume cube building job . This behavior is observed again when restart it after cleaning up everything . I am using 5 node-cluster each node is 8 core and 30GB . NameNode is running on one node . DataNode is running on all 5 nodes . For Hbase HMaster and HQuorumPeer is running on same node as NameNode and HRegionServer is running on all nodes . Hive and Kylin are deployed on Master Node . Version information : Comment : without writing anything in hadoop logs -- you mean that the command yarn logs -applicationId application 1450941430146 0002 gives no result see hortonworks.com blog http : hortonworks.com blog simplifying-user-logs-management-and-access-in-yarn section Log-aggregation in YARN Comment : @SamsonScharfrichter Output of the command is -- tmp logs hduser logs application 1450941430146 0002 does not exist . Log aggregation has not completed or is not enabled . Comment : 5 node-cluster .. . resume job .. . succeeds .. . fails again -- did you track on which nodes the job throws ClassNotFoundException In other words do you have a specific node with specific configuration issues Comment : Look at this JIRA to see if it applies to your issue : issues.apache.org jira browse KYLIN-1021 https : issues.apache.org jira browse KYLIN-1021 Comment : When the job fails I see Exception on every node but Master node . I have same configurations on all nodes . .. . Answer : What Li Yang suggested is correct . Here is my sequence of experiments . Kylin ships a jar file specified by kylin.job.jar property in kylin.properties . So first I made a fat jar file with missing dependency set path of this file in kylin.job.jar and ran the job again . The missing class was now shipped with MR job . The newly added dependencies had some dependencies which were not available on all nodes hence the job failed again . In next iteration I added those missing dependencies and tried again . Same result : newly added dependencies had some more dependencies which were not available on all nodes . Finally I extracted all classes available in HIVE HOME lib hive- .jar and created a new jar . This time it worked . Size of the jar file was over 20MB . Since these jar files are used every time I run a cube job I coppied all these jar files to all the nodes under HADOOP HOME share hadoop common hive-metastore-0.14.0.jar . I think kylin-job-1.1.1-incubating.jar should be created to include all its dependencies .", "Question : I installed apache kylin which requires Hadoop hove hbase and java to work . All things are installed correctly . Now when I try to run this http : kylin.apache.org docs15 tutorial kylin sample.html example . I get error after the first command ie KYLIN HOME bin sample.sh .. . .. . and below is the error I am getting .. . .. . Loading data to table default.kylin sales Failed with exception Unable to move source file : usr lib kylin sample cube data DEFAULT.KYLIN SALES.csv to destination hdfs : localhost : 54310 user hive warehouse kylin sales DEFAULT.KYLIN SALES.csv FAILED : Execution Error return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask .. . .. . I have set 777 permissions for both the above path and I am operating as root .. . Answer : Check the hdfs directory permission . If it is not like below change permission like below .. . .. . hdfs dfs -chmod g+w user hive warehouse Comment : Did still getting the same error.. .", "Question : Installed Kylin v1.0 on HDP 2.3 Sandbox everything is alright but then this error is recorded in the log .. . .. . Using Java version 1.7.0 85 .. . .. . The server starts successfully on port 7070 but displays no page due to the above error . Has anyone come across and solved this type of error while setting up Kylin If so please help me out here . Thanks in advance . .. . Answer : Kylin v1.0 only works with HBase 0.98 0.99 . HDP 2.3 ships HBase 1.x and there is a special version of Kylin for it . Please checkout http : kylin.incubator.apache.org download .. . .. . Look for Binary Package for running on HBase 1.1.3 or above", "Question : I have installed apache kylin on virtual-machine and created a cube with sample-data . Kylin stores the created cube on Hbase . Now I want to query the created olap-cube Perform : drill down roll up slice and dice which is present on Hbase . Is there a way to do this without using any BI tool or kylin UI . I need to basically perform OLAP operations using Java or Python or any programming-languages . .. . Answer : Apache Kylin provides JDBC and Rest API . Check out the below documents . http : kylin.apache.org docs15 howto howto jdbc.html .. . http : kylin.apache.org docs15 howto howto use restapi.html Comment : Thanks for the info @Li Yang . Have been thru this . To perform OLAP operations drilldown slice and dice do we need to write MDX queries or normal SQL would do this We cannot write MDX using kylin JDBC . So can we perform these operations using SQL Comment : MDX and SQL all translates to relational-algebra for execution . You should be able to express drilldown slice and dice in SQL . If you prefer MDX google Kylin Mondrian Saiku together .", "Question : CDH : 5.7 Kylin : 1.5.2 CDH 5.7 .. . .. . In kylin sample cube kylin sales cube there is a measure named SELLER CNT HLL which is COUNT DISTINCT and uses the column seller ID but when I edit it I can t select the seller id because there is no column named seller id in the dropdown list and the seller id is not a dimension in the cube .. . .. . I am little confused about this I don t know whether this is a mistake but this is what I want the cardinality of seller id is huge at actual situation I don t want seller id be a dimension but I want the COUNT DISTINCT of seller id and filter by a single seller id .. . .. . Please help me out with the confusion thanks .. . Answer : From kylin s dev mailing list I got the answer .. . .. . The seller id was missed in data model s measure columns Please edit the data model and add it there and then when edit the cube you will be able to select it the measure . .. . .. . http : apache-kylin.74782.x6.nabble.com No-seller-id-in-dimensions-but-can-create-a-count-distinct-measure-on-it-in-kylin-sample-cube-td4813.html", "Question : null .. . Answer : I am trying to run apache Kylin on a Dev cluster . I ve encountered many issues and so far and I ve got a couple of questions regarding that . It would be really appreciated if you could help me out with any of them . 1 . What kind of permission do I need for Kylin I have write permission to HBase and port 7070 is open for me . What else do I need 2 . Rather than changing parameters on Kylin.properties do I need to configure anything else 3 . Where is Kylin metadata stored Is it on HBase or Hive 4 . For changing the default port 7070 Is that enough if I change kylin.properties and server.xml of tomcat Thanks .", "Question : null .. . Answer : How to make integration between Apache Kylin and Facebook Presto and so Apache Kylin can read from Facebook Presto instead of reading from Hive", "Question : Apache Kylin looks like a great tool that will fill in the needs of a lot data scientists . It s also a very complex system . We are developing an in-house solution with exactly the same goal in mind multidimensional OLAP cube with low query latency . Among the many issues the one I m concerned of the most right now is about fault tolerance . With large volumes of incoming transactional data the cube must be incrementally updated and some of the cuboids are updated over long period of time such as those with time dimension value at the scale of year . Over such long period some piece of the complex system is guaranteed to fail and how does the system ensure all the raw transactional records are aggregated into the cuboids exactly once no more no less Even each of the pieces has its own fault tolerance mechanism it doesn t mean they will play together automatically . For simplicity we can assume all the input data are saved in HDFS by another process and can be played back in any way you want to recover from any interruption voluntary or forced . What are Kylin s fault tolerance considerations or is it not really an issue .. . Answer : There are data faults and system faults . Data fault tolerance : Kylin partitions cube into segments and allows rebuild an individual segment without impacting the whole cube . For example assume a new daily segment is built on daily basis and get merged into weekly segment on weekend weekly segments merge into monthly segment and so on . When there is data error or whatever change within a week you need to rebuild only one day s segment . Data changes further back will require rebuild a weekly or monthly segment . The segment strategy is fully customizable so you can balance the data error tolerance and query-performance . More segments means more tolerable to data changes but also more scans to execute for each query . Kylin provides RESTful API an external scheduling system can invoke the API to trigger segment build and merge . A cube is still online and can serve queries when some of its segments is under rebuild . System fault tolerance : Kylin relies on Hadoop and HBase for most system redundancy and fault tolerance . In addition to that every build step in Kylin is idempotent . Meaning you can safely retry a failed step without any side effect . This ensures the final correctness no matter how many fails and retries the build-process has been through . I m also Apache Kylin co-creator and committer . : -", "Question : I m a newbie for kylin . After installing I run sample.sh and then build the cube but get the wrong message : .. . .. . .. . .. . Issue 975 https : issues.apache.org jira browse KYLIN-975 suggests kylin.job.hive.database.for.intermediatetable default . After that but I also get this error message . When I run desc formatted kylin intermediate kylin sales cube desc 1970.. . command in hive shell I can get its formatted info . It demonstrates that this table exists in Hive . Why could not Kylin load this table from Hive .. . Answer : I have solved this problem . The reason is that hive.metastore.uris property is not set in hive-site.xml . Kylin uses HCatalog to read Hive table . HCatalog will use hive.metastore.uris property to create HiveMetaStoreClient and get table meta . This page http : mail-archives.apache.org mod mbox kylin-dev 201601.mbox 3CCAPprPdTuLk1fV-ee 2BV54Gs 2Bh0f-6aV-Os5 3DBgBBNKRumxwS21A 40mail.gmail.com 3E has detailed explanation . To start metastore using command :", "Question : null .. . Answer : I am running the sample cube of Kylin on cluster and getting error on step5 : Create HTable . The result code is 2 and there is no any other logs or info regarding that . How should I debug this error What type of HBase configuration do I need to check on Kylin kylin-1.5.2.1 .. . Hive 1.2.1.2.3.2.0-2950 .. . HBase 1.1.2.2.3.2.0-2950 .. . .. . Any help would be appreciated .", "Question : null .. . Answer : Tried to install Kylin using the documentation http : kylin.apache.org docs15 install . I was able to start kylin and execute sample.sh . But I was not able to use web UI . Please find below the error message . I am using Kylin apache-kylin-1.5.2.1-HBase1.x-bin.tar.gz and hbase 1.1.2.2.4.Kindly help to resolve this issue .", "Question : I ve installed Kylin with MapR distribution and things seem to work fine up to a point . I ran the sample.sh script and I now have the learning kylin project and I can run build on the cube and the job reports success at 100 complete . But. . after doing this the display always shows my cube as being 0.0 bytes and if I run the sample query from the documentation I get a timeout visiting cube error . The other weird thing I ve noticed is that the build dialog is showing a start date of today s date and I can t edit it . Not sure if that has anything to do with the weirdness I m seeing or not but can anyone tell me how Kylin determines what value to put there Anyway any thoughts on how to debug this are greatly appreciated . I ve examined the logs but don t see anything that jumps out to me as terribly useful . Here s what I find : .. . .. . Edit : Looking at HBase with hbase shell I can see that Kylin is definitely connecting to HBase at least enough to create tables and what-not . But the table that appears to be the backing store for the cube is empty . .. . Answer : please post in kylin s dev mail list for help : dev@kylin.apache.org here s an archive for your issue : http : apache-kylin.74782.x6.nabble.com Timeout-visiting-cube-td4618.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
olap
UNK_RELATION
xms@websphere-mq@43
xms -- xms is a c c++ and .net api to ibm @placeholder .
{ "confidence": [ 47.63898468017578, 46.64973831176758, 46.06612777709961, 42.89656448364258, 42.89656448364258, 41.543636322021484, 41.230587005615234, 40.2698974609375, 40.2698974609375, 39.79695129394531, 38.043060302734375, 37.51941680908203, 37.49557113647461, 37.235225677490234, 37.235225677490234, 36.447818756103516, 36.36674118041992, 36.36674118041992, 36.36674118041992, 36.325050354003906, 36.2503547668457, 35.21126937866211, 35.21126937866211, 35.01381301879883, 35.01381301879883, 34.48653793334961, 34.48653793334961, 34.08244323730469, 34.08244323730469, 34.08244323730469, 34.08244323730469, 34.08244323730469, 34.08244323730469, 34.08244323730469, 33.35771179199219, 33.35771179199219, 33.35771179199219, 32.72951126098633, 32.72951126098633, 32.11528015136719, 32.11528015136719, 32.00477981567383, 30.9864501953125, 30.9864501953125, 30.433391571044922, 30.433391571044922, 30.433391571044922, 30.433391571044922, 30.057918548583984, 29.3045654296875, 29.3045654296875, 29.3045654296875, 29.3045654296875, 29.3045654296875, 27.952777862548828, 27.51883316040039, 26.924728393554688, 26.91626739501953, 26.823951721191406, 26.823951721191406, 25.330387115478516, 24.045574188232422, 24.045574188232422, 24.045574188232422, 23.287940979003906, 22.692644119262695, 22.692644119262695, 22.692644119262695, 22.692644119262695, 22.692644119262695, 21.843063354492188, 21.843063354492188, 21.5093936920166, 21.05211067199707, 21.05211067199707, 21.029098510742188, 20.76827621459961, 20.342945098876953, 20.323469161987305, 20.137775421142578, 19.699180603027344, 19.67144203186035, 19.67144203186035, 19.639446258544922, 19.639446258544922, 19.639446258544922, 19.436607360839844, 19.422792434692383, 19.091257095336914, 18.78319549560547, 18.78319549560547, 18.542613983154297, 18.542613983154297, 18.542613983154297, 18.542613983154297, 18.542613983154297, 18.259552001953125, 18.254425048828125, 18.194013595581055 ], "content": [ "I am trying to send Text messages using IBM XMS for .NET .", "I m using the IBM websphere XMS API to connect and send messages to the mainframe .", "XMS C C++ internally loads WebSphere MQ client libraries .", "What version of XMS .NET are you using", "By default XMS .NET will attempt to reconnect for 30 minutes .", "This will install XMS and also MQ .NET assemblies to GAC .", "For your use-case I would go for MQ Base .NET API instead of XMS .NET .", "From version v7.1 XMS .NET comes bundled with MQ Client .", "Hence there is no need for separately installing IA9H XMS .NET client again .", "Update .. . .. . After un-installing XMS .NET support pack do the following : .. . .. . 1 Check the GAC to confirm if it has XMS .NET assembly version 2.5 .", "We have .NET application which reads from various queues using the XMS API .", "I also checked C : Windows assembly and the XMS files are there with a 8.0.0.3 version which should be the newest one correct", "I ve written a distributed application using XMS .", "This feature was implemented in XMS version 2.0.1.0 .", "XMS comes bundled with MQ client .", "I m using XMS C++ API and please assume that context object is an abstraction which creates session destination consumer producer and so on .", "What version of XMS and MQ are you using", "XMS trace would be needed to diagnose the problem .", "As doc says XMS will ack all messages received .", "I m using XMS 7.5 client to access the IBM MQ and wanted to know one thing about MessageListener .", "So you need to uninstall XMS supportpac and instead use the XMS that comes with MQ Client .", "So when you install MQ Client XMS .NET also gets installed .", "For example .. . .. . UPDATE .. . .. . XMS .NET is JMS specification implementation while RFH is MQ specific .", "yes. . v 7.5 of MQ and xms library 2.5.0.2 .", "XMS 2.0.0.12 does not support automatic client reconnection .", "The problem here is that XMS is unable to find WebSphere MQ client library libmqm r.so .", "Ensure there are no traces of XMS in Windows Global Assembly Cache GAC .", "XMS .NET reads persistent messages under a local a transaction as the Session is created as non-transacted and auto acknowledge .", "Hence XMS .NET internally calls a Commit to tell the queue manager to remove a message from a queue .", "The .NET application using XMS client ver 7.5 will read off messages from the multiple Queues .", "We want to read and write XML formatted text from the queues using XMS for .net client application .", "I suggest to do two things : 1 Try using latest XMS .NET client and see if that helps .", "I am using XMS .NET client 7.5 version to connect to WebSphere s multi-instance queue manager .", "How .NET XMS client in specific and JMS client in general come to know connection is still valid", "I have installed mqc7 7.0.1.12 win the MQ client and ia9h 2.0.0.12 the XMS", "Is the sender application a JMS or XMS application or they hand crafting JMS headers", "I am using XMS v1.1.2.0 Build : nn200-L140304 .", "MQ Client v7504 ships Message Service Client for .NET XMS v2.5 and automatic client reconnection feature is available in that version .", "So it is bit surprising how you are got XMS .NET 2.0.0.12 with MQ client v7504 .", "This is a follow up on XMS.NET hanging indefinitely on factory.CreateConnection username null http : stackoverflow.com questions 31044783 xms-net-hanging-indefinitely-on-factory-createconnection .", "But I would like to check the status of this before I use the IMessageProducer.Send .. . .. . .. . Is there a way to check the MQ connection status for issues using the XMS .NET library", "Or the XMS handles it automatically which means my reasoning is wrong", "Using RFHUtil .. . .. . I sent a message containing the JMS folder data your provided above and I see that XMS .NET V8.0 works fine .", "XMS .NET has a connection factory property XMSC WMQ LOCAL ADDRESS that lets you specify a local port to be used while connecting to a queue manager .", "What is puzzling me is that the code has set XMSC WMQ CONNECTION MODE as XMSC WMQ CM CLIENT but XMS is attempting to load libmqm r.so .", "My tiny program does NOT use anything or call any function from XMS .", "The only information provided is the output I got when I turned full XMS logging .", "Although XMS internally uses RFH2 headers it does not provide a way for applications to add RFH properties .", "I referenced the C : Program Files IBM WebSphere MQ bin IBM.XMS.dll library from my .NET application .", "I would suggest you to do : .. . .. . 1 XMS can run in unmanaged mode also .", "The partner says all the Java WAS clients have no problem with accepting the new messages the issue exists only at XMS clients .", "During this course of action the connected XMS client gets the attached Exception Listener invoked .", "My thinking is that XMS client may have timed out after reconnection attempts .", "Even after 3 hours later was well XMS client didn t get any exceptions .", "I have posted snippet here same code is available in Tools dotnet samples cs xms simple wmq SimpleQueueBrowser SimpleQueueBrowser.cs also .", "Read more here : http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.ref.con.doc q081860 .htm .. . .. . Here is a sample snippet for using CCDT in XMS .NET application .", "Unmanaged Security-Exit http : publib.boulder.ibm.com infocenter wmbhelp v7r0m0 index.jsp topic com.ibm.etools.mft.doc ap12500 .htm assembly .. . .. . My question is how to utilize these resources and interact with a Secure Channel using the XMS API", "Eventually I came up with replacing the usage of the XMS API with the MQ Classes for .NET https : publib.boulder.ibm.com infocenter wmqv7 v7r0 index.jsp topic com.ibm.mq.csqzav.doc un10210 .htm Native .NET API of IBM for WMQ which does support using an unmanaged Security Exit by setting its MQC.SECURITY EXIT PROPERTY property should be served in the form of a Hashtable entry .", "Messages having headers that XMS does not understand would be backed out to backout BOQUEUE queue after the backout threshold BOTHRESH is reached .", "It is an JMS application our partner uses something called webMethods and they added a JMS User-Defined property - at this moment our XMS app started to fail .", "This is usually at C : Program Files x86 IBM WebSphere MQ tools c Samples Bin amqssslc.exe and is one of the utilities supplied when installing the full client .", "From the XMS docs : .. . .. . XMSC.WMQ SECURITY EXIT http : publib.boulder.ibm.com infocenter wmqv7 v7r0 index.jsp topic com.ibm.mq.xms.doc props prx wmq send exit.html .. . .. . This property is relevant only when an application connects to a queue manager in managed client mode .", "With this setup I am facing two issues : .. . .. . Often I get the two XMS exceptions while opening the connections.One is MQRC HOST NOT AVAILABLE 2538 X 9EA The attempt to allocate a conversation to the remote system failed .", "I have created client with client acknowledge mode : .. . .. . In the XMS documentation there is information for CLIENT ACKNOWLEDGE : .. . .. . The application can acknowledge the receipt of each message individually or it can receive a batch of messages and call the Acknowledge method only for the last message it receives .", "But the XMS API http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.msc.doc prop defns.html 23prop defns does not have a property that corresponds to MQCD.HeartBeatInterval http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.ref.dev.doc q108450 .htm lang en property .. . .. . Any insight in accomplishing this task of lowering the message ack timeout", "It appears that you have downloaded XMS from supportpac website http : www-01.ibm.com support docview.wss rs 171 uid swg24011756 loc en US cs utf-8 lang en .", "I have one problem after this when i uninstalled XMS Support Pac I am getting an expection when trying to get an instance of XMSFactory Fatal error .", "I m trying to implement an MQ Listener in a windows service and I have used the xms mq consumer sample provided in the dotnet folder from the MQ Explorer installation .", "The MQ XMS client is propagating the logged on user to the queue manager then the QM checks its authority records to determine whether that user can connect and what objects it may access .", "It seems I ve lots of questions so it d be great if anyone could provide me with links to the parts or sections of the documentation which explains XMS objects with such minute details .", "I am going to use IBM.XMS in a .NET application to send receive messages to from IBM MQ .", "Thanks Rob the links that you have given are related to IBM MQ Classes for .NET .", "I think you are asking about .net apps so my answer expands on that but for things like C applications they also should just work .", "I m new in IBM MQ .", "3 Open a PMR with IBM .", "I am trying to connect to dialogic xms server using autobahn WebSockets : As read I need to add a protocol rtcweb .. . .. . This is my code : .. . .. . But when i add the protocol rtcweb I get this onClose and the connection still didn t open : .. . .. . Code : CONNECTION LOST .", "I have created an application using IBM XMS.NET .", "Basically the main product install spawns a 32 and a 64 bit C runtime installer to lay down the Microsoft C runtimes it needs and one of those is failing .", "If for some reason IBM MQ goes down I believe these settings will allow the .NET application to attempt re-connection and thereby avoid any crash in the application .", "MSI s 2C : A0 17 : 36 : 55 : 139 : Note : 1 : 2203 2 : C : PATH IBM MQ 9.0.0.0-IBM-MQC-Win64 Windows msi IBM MQ 32bitSupport.msi 3 : -2147287038 .. . .. . CustomAction iwiInstall32bitRuntime returned actual error-code 2 note this may not be 100 accurate if translation happened inside sandbox .. . .. . MSI s 2C : 1C 17 : 36 : 55 : 139 : Note : 1 : 1713 2 : IBM MQ Installation1 3 : 1631 .. . .. . Info 2835.The control ErrorIcon was not found on dialog SetupError .", "Is that a IBM hot fix or Windows .", "I think a same question was asked on IBM developerWorks forum also .", "IBM MQ Installation1 cannot install one of its required products .", "I am using IBM MQ v8.0", "We have IBM WebSphere MQ 7.5 .", "Otherwise 2 Open a ticket with IBM to get this resolved .", "Downloaded installer from here https : www-945.ibm.com support fixcentral swg downloadFixes parent ibm WebSphere product ibm WebSphere WebSphere 20MQ release 9.0 platform All function fixId fixids 9.0.0.0-IBM-MQC-Win64 includeRequisites 1 includeSupersedes 0 downloadMethod http .", "I am using IBM.XMS.dll with version 2.0.0.13 using this following proerties and not available .. . .. . cf.SetIntProperty XMSC.WMQ CLIENT RECONNECT OPTIONS XMSC.WMQ CLIENT RECONNECT Q MGR cf.SetStringProperty XMSC.WMQ CONNECTION NAME LIST String.Format 0 1 Settings.Default.Host Settings.Default.Port cf.SetIntProperty XMSC.WMQ CLIENT RECONNECT TIMEOUT 44 .. . .. . I am trying to upgrade the version of IBM message service client but I am not able to find the latest version anywhere .", ".. . MSI s 2C : 1C 17 : 37 : 54 : 336 : Product : IBM MQ Installation1 -- Error 1713.IBM MQ Installation1 cannot install one of its required products .", "Background : I have client applications in .NET using XMS.NET API to read messages from WebSphere MQ .", "I m wrapping the whole thing in a .NET WEB API MVC5 project to abstract from the rest of the organization all the MQ specifics .", "Finally I would suggest to raise a PMR with IBM to resolve the issue .", "I am new to IBM MQ How do I authorize the user", "I was simply stopping the IBM MQ Service from Administration Tools Services .", "We are using IBM MQ as a messaging layer with multi instance setup .", "I meant raise support ticket with IBM to analyse delay", "Chances are the C runtime is badly incorrectly installed but without seeing a log its hard to tell", "7.5.0.5 works with .NET framework 4.0 .", "I searched IBM Site but I didn t get pages explaining the above compatibility info ." ] }
{ "confidence": [ 55.13331985473633, 51.9034423828125, 51.58367156982422, 48.59280776977539, 47.40727996826172, 46.951148986816406, 45.2851448059082, 44.630287170410156, 43.602455139160156, 43.557830810546875, 39.62547302246094, 39.328224182128906, 39.089759826660156, 37.913902282714844, 37.88917541503906, 37.885162353515625, 36.48778533935547, 36.2872314453125, 35.993431091308594, 35.397743225097656 ], "content": [ "Question : This is a follow up on XMS.NET hanging indefinitely on factory.CreateConnection username null http : stackoverflow.com questions 31044783 xms-net-hanging-indefinitely-on-factory-createconnection . As recommended in the comments I installed the newest versions of MQ client and XMS.NET . The application stopped hanging now it just terminates the process after a few seconds . There is no exception beingh thrown . The only information provided is the output I got when I turned full XMS logging . This happens on the call to factory.CreateConnection .. . .. . This is the tail of the output : .. . Answer : OK . What version of MQ client you installed v7.1 or 7.5 or 8.0 MQ I am assuming you installed MQ v8 Client . From version v7.1 XMS .NET comes bundled with MQ Client . So when you install MQ Client XMS .NET also gets installed . Hence there is no need for separately installing IA9H XMS .NET client again . So please uninstall IA9H and try again . I would have expected a warning while installing IA9H when MQ Client was already installed . Apologies I should have mentioned about this in your another question . Comment : I uninstalled the software and after that installed just the v8 MQ Client alone . I referenced the C : Program Files IBM WebSphere MQ bin IBM.XMS.dll library from my .NET application . Now I am getting an Could not load file or assembly IBM.XMS.Client.Impl Version 8.0.0.3 Culture neutral PublicKeyToken d2666ab12fca862b or one of its dependencies . The system cannot find the file specified . : IBM.XMS.Client.Impl Version 8.0.0.3 Culture neutral PublicKeyToken d2666ab12fca862b . Comment : I reinstalled the software again manually adjusted the PATH variabe . First the app just terminated itself on the .Connect call . Then I switched the client from UNMANAGED back to regular CLIENT and now I am at least getting something : CWSMQ0006E : An exception was received during the call to the method ConnectionFactory.CreateConnection : CompCode : 2 Reason : 2009 . During execution of the specified method an exception was thrown by another component . See the linked exception for more information . Comment : When switching to UNMANAGED the automatic process exit occurs again.. . : Comment : I think your MQ client installation has got messed up . Suggest you to uninstall all . Ensure there are no traces of XMS in Windows Global Assembly Cache GAC . GAC will be under Windows Assebly directory . If problem still persists raise a PMR . Comment : I ran the ResetMQ.cmd file after the uninstall and before the new install . The issue still exists . I also checked C : Windows assembly and the XMS files are there with a 8.0.0.3 version which should be the newest one correct", "Question : Our partner started using custom properties for messages being sent over IBM WebSphere MQ and our application developed using XMS.NET started to fail because of that . It turned out that the error is being thrown inside parsing the JMS envelope and inside the ParseJmsFolder method . This is the exception we get : .. . .. . And these are the details from tracing the issue down : .. . .. . Our partner suggests to try some settings in XMS.NET regarding the JMS behaviour but all the options we have tried end up with the same error . This is our configuration code : .. . .. . .. . .. . .. . EDIT : .. . .. . This is an example message causing the issue .. . Answer : Is the sender application a JMS or XMS application or they hand crafting JMS headers What version of XMS .NET are you using Using RFHUtil .. . .. . I sent a message containing the JMS folder data your provided above and I see that XMS .NET V8.0 works fine . I also had to set the message type as jms bytes . So I am wondering if the sender application is setting the message type correctly . Without the message type application will get type casting error while receiving message . Comment : Thanks for your help . It is an JMS application our partner uses something called webMethods and they added a JMS User-Defined property - at this moment our XMS app started to fail . I am using XMS v1.1.2.0 Build : nn200-L140304 . The partner says all the Java WAS clients have no problem with accepting the new messages the issue exists only at XMS clients . Comment : I checked the detailed trace and the type is jms text . I will add the full payload as an edit to my question . Comment : Thanks . I suggest to do two things : 1 Try using latest XMS .NET client and see if that helps . Otherwise 2 Open a ticket with IBM to get this resolved . XMS trace would be needed to diagnose the problem . I don t see user defined property in the message you posted . Comment : 1 I am using the MQ client version 8.0.0.3 . Should I reinstall my MQ client installation completely and replace the XMS.NET libraries I am referencing Comment : I can see the messages in MQ explorer . Is there any relevant attribute for troubleshooting the issue I can see that format is MQSTR application type is Java and the Put application name is WebSphere MQ Client for Java .", "Question : I own the following findings in order to work againts WMQ Secure-Channel : .. . .. . 1 . Defined Secure-Channel http : www-01.ibm.com software integration wmq ssl.html in the WMQ farm .. . 2 . Public Private keys .. . 3 . Unmanaged Security-Exit http : publib.boulder.ibm.com infocenter wmbhelp v7r0m0 index.jsp topic com.ibm.etools.mft.doc ap12500 .htm assembly .. . .. . My question is how to utilize these resources and interact with a Secure Channel using the XMS API Using C .. . .. . This is what I ve tried so far but without success : .. . .. . I get the following error when calling it : .. . .. . CWSMQ0006E : An exception was received during the call to the method ConnectionFactory.CreateConnection : CompCode : 2 Reason : 2195 . During execution of the specified method an exception was thrown by another component . See the linked exception for more information . UPDATE : .. . .. . I found the following Technote which describes my problem and its possible not tested solution : .. . .. . https : www-304.ibm.com support docview.wss uid swg1IC82112 .. . Answer : I figured-out that you can t use an unmanaged Security Exit assembly with IBM.XMS API http : www-01.ibm.com support docview.wss uid swg27024064 IBM.XMS.dll and this is what I currently have . From the XMS docs : .. . .. . XMSC.WMQ SECURITY EXIT http : publib.boulder.ibm.com infocenter wmqv7 v7r0 index.jsp topic com.ibm.mq.xms.doc props prx wmq send exit.html .. . .. . This property is relevant only when an application connects to a queue manager in managed client mode . Also only managed exits are supported . Eventually I came up with replacing the usage of the XMS API with the MQ Classes for .NET https : publib.boulder.ibm.com infocenter wmqv7 v7r0 index.jsp topic com.ibm.mq.csqzav.doc un10210 .htm Native .NET API of IBM for WMQ which does support using an unmanaged Security Exit by setting its MQC.SECURITY EXIT PROPERTY property should be served in the form of a Hashtable entry . To be more specific this is the assembly : amqmdnet.dll", "Question : I have create a .Net Windows Service to connect to MQ Queue using XMSFactory am trying to implement reconnect functionality but i cannot find the properties in XMS.dll .. . .. . IBM.XMS.XMSC does not contain a definition for WMQ CLIENT RECONNECT Q MGR .. . .. . I Am using the following Verions MQ Server 7.5.0.2 MQ Client 7.5.0.4 Message Service Client for .Net 2.0.0.12 .. . .. . Please Help .. . Answer : MQ Client v7504 ships Message Service Client for .NET XMS v2.5 and automatic client reconnection feature is available in that version . So it is bit surprising how you are got XMS .NET 2.0.0.12 with MQ client v7504 . XMS 2.0.0.12 does not support automatic client reconnection . This feature was implemented in XMS version 2.0.1.0 . It appears that you have downloaded XMS from supportpac website http : www-01.ibm.com support docview.wss rs 171 uid swg24011756 loc en US cs utf-8 lang en . Since you have installed MQ client v7504 you don t need to install supportpac . XMS comes bundled with MQ client . So you need to uninstall XMS supportpac and instead use the XMS that comes with MQ Client . Update .. . .. . After un-installing XMS .NET support pack do the following : .. . .. . 1 Check the GAC to confirm if it has XMS .NET assembly version 2.5 . If assemblies are not there then open a command-prompt and move to WebSphere MQ bin directory and run amqiregisterdotnet.cmd command . This will install XMS and also MQ .NET assemblies to GAC . 2 Your application might still be referencing IBM.XMS v2.0.1.0 assembly . Since this version of assembly will no longer be available remove that reference and add IBM.XMS v2.5 reference from WebSphere MQ bin directory . Recompile your application . Comment : Thank you that helped a lot and saved so much time Comment : I have one problem after this when i uninstalled XMS Support Pac I am getting an expection when trying to get an instance of XMSFactory Fatal error . Failed to initialize XMSFactoryFactory Comment : See my update to answer .", "Question : We have .NET application which reads from various queues using the XMS API . For this particular application we read from 3 queues and every so often receive the error with reason code 2003 on 2 of the 3 queues . All 3 of the queues are setup to have persistent messages . From everything I have researched it appears that a long running transaction being rolled back causing this error . The reason for the long running transaction being rolled back appears to be from exhausted log space . When the transaction gets rolled back it puts the messages we have previously read onto the queue so we end up reading duplicates . In the API when we create our Session to read from the queues we specify false for the transacted parameter . Therefore we never call Commit on the session . We also use the auto-acknowledge mode on the session . This leads me to believe that we don t have any sort of unit of work sepcified explicitly but could there be an implicit transaction of some sort The tricky part is that we are able to read fine on 1 of the 3 queues without ever receiving the error . Any ideas on where I could look next to troubleshoot such an issue Creating the connection : .. . .. . Creating the session : .. . .. . Creating the destination : .. . .. . Creating the consumer : .. . .. . Reading from the queue : Comment : Can you please post sample code that shows the problem Comment : I edited the question with some code on how we connect and receive from the queue . .. . Answer : XMS .NET reads persistent messages under a local a transaction as the Session is created as non-transacted and auto acknowledge . This is to avoid any message loss during delivery of a messages to an application . Hence XMS .NET internally calls a Commit to tell the queue manager to remove a message from a queue . Your code is very simple I don t see a problem . Are there any malformed messages in any of the queues Messages having headers that XMS does not understand would be backed out to backout BOQUEUE queue after the backout threshold BOTHRESH is reached . Have you defined a backout queue or dead letter queue for the queues from which your reading messages Are messages piling up in backout queue Finally I would suggest to raise a PMR with IBM to resolve the issue .", "Question : I m using the IBM websphere XMS API to connect and send messages to the mainframe . However every message sent is sent through a new local port . Is there a way to set this to a fixed port A new port is created locally when the following line is hit : .. . .. . The code I m using is .. . .. . We ve tried .. . .. . We ve also tried .. . .. . We ve also tried .. . .. . End of tests and the rest below is as it was . Any help would be appreciated . Thanks . .. . Answer : XMS .NET has a connection factory property XMSC WMQ LOCAL ADDRESS that lets you specify a local port to be used while connecting to a queue manager . More details here https : www.ibm.com support knowledgecenter mobile SSFKSJ 7.0.1 com.ibm.mq.xms.doc props prx wmq local address.html Comment : I ll give this a try when I m back in on Monday . Thank you . Comment : Thank you for that but unfortunately that affects the mainframe settings and not the windows one . Comment : I am surprised . Could you please post the code where you are setting the property Comment : I ve updated the code with the 3 approaches we tried . Thanks . Comment : I have been checking around . Will come back with some update soon .", "Question : This code reproduces the issue : .. . .. . It throws exception dumping the following message : .. . .. . Any idea what is wrong with the code Note that devpmmq is just an alias to the actual IP address host . If I put any random nonsense value for it I get the same error which is bad because the API should have given a better error message such as host not found or something alone that line . Is there any way to enable more verbose diagnostics .. . Answer : XMS C C++ internally loads WebSphere MQ client libraries . The problem here is that XMS is unable to find WebSphere MQ client library libmqm r.so . What is puzzling me is that the code has set XMSC WMQ CONNECTION MODE as XMSC WMQ CM CLIENT but XMS is attempting to load libmqm r.so . It should have attempted to load libmqic r.so . Have you installed WebSphere MQ client Also what is the version of XMSClients can be downloaded from here http : www-01.ibm.com software integration wmq clients . Comment : Thanks a lot . Now its working all I had to set the LD LIBRARY PATH pointing to the directory which contains libmqic r.so . And you re right it should have been libmqic r.so . It was a typo I was experimenting with different values and in that process I posted mismatched error . Comment : Could you please provide me with a link-to online doc which explains which .so are for what purpose . I mean how would I know whether I need libmqm.so or libmqm r.so or any other .so for that matter . What is the difference between them and so on . Comment : Have a look at this link : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.dev.doc q028460 .htm Comment : I ve written a distributed application using XMS . When I run this using valgrind it reports Invalid free delete delete . So I wrote tiny producer-consumer program to reproduce this error and I found that when this tiny program is linked against libmqic r.so only then it reports Invalid free delete delete . My tiny program does NOT use anything or call any function from XMS . Just linking against libmqic r.so is enough to produce the error . Could you please give me some pointers guesses what might have gone wrong Comment : .. . the stacktrace reported by valgrind contains these two interesting functions : exit from libc and vgnU freeres from vg preloaded.so . It seems when the program exits and the library unloads it tries to deallocate some memory this Invalid free.. . error appears .", "Question : I am trying to send Text messages using IBM XMS for .NET . I am getting following error at the time of calling CreateConnection method of IConnectionFactory .. . .. . Additional information : CWSMQ0006E : An exception was received during the call to the method ConnectionFactory.CreateConnection : CompCode : 2 Reason : 2035 . As per http : www-01.ibm.com support knowledgecenter SSFKSJ 8.0.0 com.ibm.mq.tro.doc q041060 .htm lang en user is not authorized . I am new to IBM MQ How do I authorize the user Comment : What version of MQ are you using Comment : I am using IBM MQ v8.0 .. . Answer : Whenever a MQRC of 2035 is encountered the correct thing to do is to look in the AMQERR01.LOG on the queue manager machine to see the exact reason why you were not authorized . If you don t then know what to do upon reading the error message you see there please include the full error message in your question .", "Question : I am trying to connect to an existing JMS queue with a .NET client . I know the queue is working I already browsed it using IBM MQ Explorer . In the following code the call to factory.CreateConnection keeps hanging - it does not jump to the next line in does not show any error message . It even doesnt consume any CPU . Are there any options that I should try to get it working or at least make it show me an error message of any kind The main method has the following : Comment : What version of XMS and MQ are you using Have you installed full MQ client Comment : I have installed mqc7 7.0.1.12 win the MQ client and ia9h 2.0.0.12 the XMS Comment : And the queue itself - the MQ Explorer shows 07010003 in the Version property . Platform Unix Command level 710 . Does this info help you Comment : Even better get a newer MQ client and Queue Manager version . The one you have will be out of support in 3 months . If it is in Production you will want to be able to open a PMR yes Also the .Net classes get better as the product gets newer . Also FYI : a queue manager is a container for queues . A queue doesn t have a version number but a queue manager does . I only mention this because an accurate understanding of the component structure tends to yield better code built to use it . Comment : Thanks . I installed the mqc8 8.0.0.3 win64 mq client which should be the newest one . No the application does not hang and does not throw any exception in just kills the process by itself - again on the factory.CreateConnection call . There is no breakpoint in my catch clause being hit the entire process is shut down . It even writes an event into Windows event log will append it .. . Answer : I don t see any problem with your code tested it with MQ v8 and works fine . I would suggest you to do : .. . .. . 1 XMS can run in unmanaged mode also . So change .. . .. . to .. . .. . and see if that helps . 2 When the call hangs break into debug and see the call stack to determine the point of hang . It could be waiting on some system event if no CPU is being consumed . 3 Open a PMR with IBM . Comment : Wow changing to unmanaged really helped thank you . I am now getting a MQRC HOST NOT AVAILABLE exception which means failure on the server-side right Comment : Or can this also be an error in the client Comment : Check if you specified correct host and port numbers in your application . If they are correct check if queue manager is running and is listening on that port .", "Question : I am using XMS .NET client 7.5 version to connect to WebSphere s multi-instance queue manager . And receiving message asynchronously and also subscribed to Exception Listener to receive any exception happening on WMQ connection . To test the Queue Manager fail over scenario we killed the existing connection and bringing the active queue manger instance down and standby instance up . During this course of action the connected XMS client gets the attached Exception Listener invoked . The logic inside the Exception Listener method restart the connection . Then we are good and we start receiving the message on the queue again . However when all the 2 instances in our case 2 present in the multi-instance queue manager restarted together we didn t see the Exception Listener method invoked . Because of this though there messages were present on the queue we didn t any messages . Later we closed client application ans started again then we started receiving the messages . With this my questions are : .. . .. . 1 . Is this what excepted to happen in the scenario I described 2 . If YES how can get the Exception Listener method invoked even in this scenario . Do I need to set any settings on the connection factory from XMSC class . 3 . And my last question . How .NET XMS client in specific and JMS client in general come to know connection is still valid Comment : My thinking is that XMS client may have timed out after reconnection attempts . After how long was the queue managers were restarted 30 minutes Comment : Even after 3 hours later was well XMS client didn t get any exceptions . Any way to detect the scenario and later I can restart the connections . Comment : Please do not use signatures or taglines in your posts http : meta.stackexchange.com a 52486 142838 . .. . Answer : By default XMS .NET will attempt to reconnect for 30 minutes . If no connection is established within 30 minutes an exception with MQRC RECONNECT FAILED will be thrown and no more attempts will be made . Please see here http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.msc.doc prx rtt client reconect timeout.htm lang en . In such cases applications needs to issue connect call again . Regarding your question 3 : It s always best to issue a call like send or receive . If there is no connection to queue manager then an exception will be thrown . Application handle that exception and issue a connect call again .", "Question : null .. . Answer : When I try to send a message and the queue has a connection issue I get the expected MQ reason 2018 Thats not a problem . But I would like to check the status of this before I use the IMessageProducer.Send .. . .. . .. . Is there a way to check the MQ connection status for issues using the XMS .NET library Comment : What if a connection issue appears right after you do the connection check", "Question : I am trying to set the MQCD structure properties - specifically HeartBeatInterval using XMS.NET API . Background : I have client applications in .NET using XMS.NET API to read messages from WebSphere MQ . I use the ClientAcknowledge mode . If the client reads the message and does not ack it WebSphere MQ waits for 300 seconds before timing out and makes backout the message available in the original queue for other clients to read the message . Task : I want to lower the timeout from 300 seconds . Our MQ Admin suggested to change the HearBeatInterval property on the channel . But changing it is making no difference . Apparently somehow setting the Channel s HeartBeatInterval property on client-side along with the server-side channel setting will make it work . I am attempting to set this value in the client application . But the XMS API http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.msc.doc prop defns.html 23prop defns does not have a property that corresponds to MQCD.HeartBeatInterval http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.ref.dev.doc q108450 .htm lang en property .. . .. . Any insight in accomplishing this task of lowering the message ack timeout or even setting the HeartBeatInterval on the client-side - if that s the way to do it . Comment : Why do you want to lower the timeout why not ack the message Comment : We do Ack the message in a normal flow . But we want to handle the scenario when the client hangs up abnormally without ack ing . We want other client instances to be able to process the message sooner than wait 300 seconds before message is available back in the queue . We run multiple client application instances in a load balanced setup . Any idea of how to lower this timeout .. . Answer : I think you can use the Disconnect interval DISCINT attribute of the server connection channel to terminate connections from applications that are hanging . By default DISCINT is set to 0 which means it s disabled . You can set a value that suits your requirement . Read more here : http : www-01.ibm.com support knowledgecenter SSFKSJ 7.5.0 com.ibm.mq.ref.con.doc q081860 .htm .. . .. . Here is a sample snippet for using CCDT in XMS .NET application .", "Question : I am developing an application which sends message to MQ Queuemanager using XMS.Net . One of the requirement is to set custom RFH2 value . I am unable to figure this out . How do we set RFH2 for IMessage using XMS.net I can see this can be easily done using MQ native api .. . Answer : Are you trying to set a custom user property If so you can do that using SetXXXXProperty where XXX denotes data type method of Message class . For example .. . .. . UPDATE .. . .. . XMS .NET is JMS specification implementation while RFH is MQ specific . Although XMS internally uses RFH2 headers it does not provide a way for applications to add RFH properties . You may want to look at Base .NET classes amqmdnet.dll and code the required RFH folders to message . Comment : I have a legacy queuemanager which accepts a bunch of data . When I see it using rfhutil its marked as other and a set of values are defined their Comment : Custom properties are sent as part of RFH2 header of a MQ message . Wouldn t that help BTW what version of queue manager are you running with Comment : I am using XMS.net IMessage to send message to queue . My queue manager is 7.5 . Also the custom set property method is setting the value in usr folder whereas the old legacy message it is mapped to other folder Comment : Please see my update . Comment : How would you attach those RFH to the IMessage Do you have any sample code", "Question : We have IBM WebSphere MQ 7.5 . We have setup Queue Manager and Queues . We want to read and write XML formatted text from the queues using XMS for .net client application . I tried below code but I don t know how to read that data . Code : .. . .. . recvMsg is returning data in JMS . Any working code to read data for string XML The response is coming like this : .. . Answer : Your application is getting the message as jms bytes type message . As XML is basically text you can use ITextMessage message type for sending and receiving XML payload . Change your producer application to send messages of type ITextMessage and change your application to receive the same message type . Sample snippet is here . Producer : .. . .. . Consumer : Comment : Hi Shashi I m not sure if you have seen this question http : stackoverflow.com questions 35223841 messageproducer-send-is-too-slow-for-a-particular-topic but since you re the only reachable person with authentic information I d request you to see the question .", "Question : I m using XMS 7.5 client to access the IBM MQ and wanted to know one thing about MessageListener . When there are multiple messages are present on the queue .. . .. . will the associated MessageListener method i.e ProcessNewMessage in the below code called concurrently OR .. . The messages will be dispatched to the MessageListener i.e ProcessNewMessage in the below code method only at a time The code is something like below : .. . Answer : Messages are delivered one at a time to consumer it does not matter whether the consumer is calling receive or has setup a message listener to receive messages . In case of a message listener MQ will wait for the OnMessage in your case ProcessNewMessage method to return before delivering the next suitable message . Comment : Is there any timeouts are set internally within which OnMessage handling method has to return Comment : No no timeout set .", "Question : I ve narrowed down the area of the problem I m facing and it turned out that MessageProducer.send is too slow when it is created for a particular topic replyfeserver : .. . .. . Here the call to send blocks for up to 55-65 seconds occasionally almost every after 4-5 calls and up to 5-15 seconds in general . However if I use some other topic say feserver.action.status . Now the call to send returns immediately within a fraction of second . I ve tried send with several other topics and all of them work fast enough . What could be the possible issues with this particular topic replyfeserver What are the things I should look at in order to diagnose the issue with it I was using this topic for last 2 months . I m using XMS C++ API and please assume that context object is an abstraction which creates session destination consumer producer and so on . I d also like to know if there is any difference between these two approaches : .. . .. . vs .. . .. . I tried with both it doesn t make any difference at least I didn t notice it . Comment : I agree with Rogers comment Comment : Best way farward is to open a PMR . Comment : @Shashi : I didn t understand that . What is PMR How to open it Comment : I meant raise support ticket with IBM to analyse delay Comment : @Shashi : Where should I do that Is it something online .. . Answer : There shouldn t be any difference . Personally I like to have my topics in a hierarchy . i.e . A.B.C .. . .. . I would run an MQ trace then open a PMR with IBM and give them the trace and say please explain the delay .", "Question : We are using IBM MQ as a messaging layer with multi instance setup . The .NET application using XMS client ver 7.5 will read off messages from the multiple Queues . Since the volume of the message is high I have created around 5 connection per queue to read the messages . And there are 4 such queues . So in the application at any point of time there are 20 connections and 20 session opened . With this setup I am facing two issues : .. . .. . Often I get the two XMS exceptions while opening the connections.One is MQRC HOST NOT AVAILABLE 2538 X 9EA The attempt to allocate a conversation to the remote system failed . and the other is MQRC CONNECTION BROKEN Connection to queue manager lost . While closing the application it is taking lot more time to close of all the sessions and connections because they are too many of them . So I was thinking to reduce the number of connection . By just creating one connection per queue and open 5 session per queue . In this way the number of connections will be reduced to 4 from 20 . So both the above said issues will be solved I think yet to try .. . .. . So wanted someone in the know to share their experience on what is the best practice of handing the above scenario . Will there be any delay in delivering the messages if we open multiple sessions per connection compared to single session per connection The code I m using is below : Comment : You ve accepted Shashi s answer so does that mean you ve solved the problem If so could you leave a comment or update your question to indicate what the solution was for the benefit of future Stack Overflow users whose search turns up this Q A Thanks .. . Answer : Not much of action happens on Connection . It s used for creating temporary destinations . Session is where all the actions happens . So just one connection is sufficient . MQRC HOST NOT AVAILABLE and MQRC CONNECTION BROKEN may not be due to the number of connections sessions you are creating because a queue manager can support a large number connections . Your application is using a transacted session and message listener . How are you committing transaction . Can you show us the code for that Are you calling commit for every message received Comment : Yes Shashi . I m committing on each message . If not how can we commit the session if queueSettings.UseTransactedSession disposed true sessionWMQ.Commit", "Question : I am trying to send Text messages using IBM XMS for .NET . After sending around 254 messages I get following error : .. . .. . There isn t much on google about it . I found one related post at WSMQ Queue Limit http : stackoverflow.com questions 1539826 wsmq-queue-limit .. . .. . The post suggest that there is some sort of limit in max queues . The links in the post don t seem to work . How do I overcome this error .. . Answer : MQ has a command mqrc which returns the text for any reason code or message code . The 2017 means MQRC HANDLE NOT AVAILABLE . A better explanation can be had by going to the Knowledge Center http : www-01.ibm.com support knowledgecenter SSFKSJ 8.0.0 and searching on 2017 . This returns several pages of API calls which can return 2017 along with the page for the reason code itself : .. . .. . 2017 07E1 RC2017 : MQRC HANDLE NOT AVAILABLE http : www-01.ibm.com support knowledgecenter SSFKSJ 8.0.0 com.ibm.mq.tro.doc q040900 .htm lang en . That page provides the following description of the problem : .. . .. . Explanation .. . An MQOPEN MQPUT1 or MQSUB call was issued but the maximum number of open handles allowed for the current task has already been reached . Be aware that when a distribution list is specified on the MQOPEN or MQPUT1 call each queue in the distribution list uses one handle . We know from the documentation and can confirm from MQ Explorer s QMgr Extended Properties panel that by default the maximum handles any process will be allowed to have is 256 . Screen shot of MQ Explorer QMgr Extended Properties panel http : i.stack.imgur.com Icpwd.jpg .. . .. . Based on all this and that your program is dying after 254 messages the conclusion is that it is grabbing a fresh handle for every message being PUT and not ever releasing them . Generally this occurs when there is a loop that should contain only the PUT and COMMIT but instead also contains the OPEN . I would suggest carefully reviewing your code possibly also updating your question to post the code here . I would also suggest studying the MQ .Net sample programs or using one of them as the basis for your own code .", "Question : null .. . Answer : I am trying to connect to dialogic xms server using autobahn WebSockets : As read I need to add a protocol rtcweb .. . .. . This is my code : .. . .. . But when i add the protocol rtcweb I get this onClose and the connection still didn t open : .. . .. . Code : CONNECTION LOST . Reason : WebSockets connection lost", "Question : I am getting following exception only in windows-8 . XMSAO0121E : An error was returned from the LDAP naming service . A call has been made to the LDAP naming service which did not complete successfully . Review the linked exception details for further information on the cause of the problem . I have same library on windows XP and it works without any problem for same configuration . Please help . REgards Pawan Comment : And the linked exception says...what Did you print it Comment : Sorry About this. . I found out there is hot fix for Windows 8 . I installed it and everything is fine now : .. . Answer : There is a hot fix available for this issue. . you can download from IBM or can ask your IT team to install it . - hotfix download https : support.microsoft.com en-us kb 2802148 Comment : Please provide the link-to hot fix . Is that a IBM hot fix or Windows . You mention problem is not seen on Windowx XP Comment : My IT support installed the fix . yes. . v 7.5 of MQ and xms library 2.5.0.2 . The installation did work in xp but not in win8. . they installed the hot fix and it started working. . no code change . Comment : support.microsoft.com en-us kb 2802148 https : support.microsoft.com en-us kb 2802148 . . the link-to the hotfix. . It is late. . but if anyone interested ." ] }
[ "yes-answer-long", "yes-answer-short" ]
websphere-mq
UNK_RELATION
django-dev-server@server@66
django-dev-server -- django-dev-server refers to lightweight web @placeholder provided by django for development purposes .
{ "confidence": [ 60.419952392578125, 58.663047790527344, 58.638214111328125, 56.502750396728516, 56.429962158203125, 56.12605285644531, 53.304115295410156, 51.84941482543945, 51.485591888427734, 51.19993591308594, 50.55513000488281, 49.38691329956055, 49.064476013183594, 49.064476013183594, 49.064476013183594, 49.064476013183594, 49.064476013183594, 48.352230072021484, 48.04202651977539, 47.33735275268555, 46.88191604614258, 46.44725036621094, 46.30228042602539, 45.32124328613281, 45.32124328613281, 44.51209259033203, 44.43793487548828, 44.21017837524414, 43.84917449951172, 43.744380950927734, 43.1857795715332, 43.1857795715332, 43.1857795715332, 43.01677703857422, 42.5800666809082, 42.07471466064453, 41.768409729003906, 40.99827575683594, 40.680782318115234, 40.52073287963867, 40.52073287963867, 40.31402587890625, 40.29670333862305, 40.02505111694336, 39.72859191894531, 39.43567657470703, 39.05268096923828, 39.05268096923828, 38.722930908203125, 38.662864685058594, 38.662864685058594, 38.662864685058594, 38.3276252746582, 38.3276252746582, 38.31777572631836, 38.17856216430664, 38.17856216430664, 38.17856216430664, 38.01573944091797, 37.92314147949219, 37.92314147949219, 37.92314147949219, 37.23310470581055, 37.08107376098633, 37.08107376098633, 37.08107376098633, 37.08107376098633, 36.914947509765625, 36.82339859008789, 36.5458869934082, 36.075706481933594, 35.887672424316406, 35.887672424316406, 35.83895492553711, 35.139766693115234, 35.139766693115234, 35.03406524658203, 34.805728912353516, 34.73027038574219, 34.73027038574219, 34.729698181152344, 34.410423278808594, 34.410423278808594, 34.410423278808594, 34.410423278808594, 34.410423278808594, 34.105934143066406, 33.888328552246094, 33.754173278808594, 33.53694152832031, 33.19623947143555, 32.997745513916016, 32.997745513916016, 32.997745513916016, 32.94853210449219, 32.94853210449219, 32.94853210449219, 32.94853210449219, 32.94853210449219 ], "content": [ "If it really bothers you proxy your django-dev-server using nginx .", "I usualy work with the django concurent dev server https : github.com ashchristopher django-concurrent-server which is multi-threaded and works much better .", "Stage of models validation is most longest in Django dev-server startup .", "So seeing the Django dev server style logs on Apache will be really helpful .", "I ve recently deployed my Django app on Apache and looking for logs analogous to that of Django Dev Server on Apache .", "I am running django on django s development server .", "Alternative caches are empty and they are repopulated on the startup of the Django development server .", "Complete answer here Django development server broken-pipe error http : stackoverflow.com questions 10253288 django-development-server-broken-pipe-error", "Is there anyway of setting MIME types in the django development server", "The Django dev server automatically reloads itself if it detects any change in your code .", "The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading .", "I m testing a simple django project using its own development server .", "Example of logs from Django dev server : .. . .. . It s very useful for debugging figuring out the sources of 500 errors etc .", "Is it possible that for some reason the Django dev server is setting the MIME types of responses incorrectly", "My question is : is it possible to achieve the change run right away without waiting for dev server to reload workflow with django project", "I also realize that django-dev-server has a great automatic reload feature .", "as I wrote : I also realize that django-dev-server has a great automatic reload feature .", "Possible duplicate of making django server accessible in LAN http : stackoverflow.com questions 22144189 making-django-server-accessible-in-lan", "A Django app is one part of what runs on a given web server .", "On this machine I run a Django development web server : .. . .. . The codebase is big so for faster code reload I installed pyinotify .", "I need a way to distinguish development server in Django run eg .", "Try Django Debug Toolbar github.com django-debug-toolbar django-debug-toolbar https : github.com django-debug-toolbar django-debug-toolbar as the first shot", "I have a django hosting service from provider and they provide me django installation on server so that i can run my django wegpage .", "In this case the most likely cause is the browser closing the connection before the Django development server has sent the entire response .", "Django development server have multiple threads so when closing main process there might be some running threads in background .", "My site has a simple link submission functionality which works locally on Django dev server but is not working on the actual site running Apache .", "Django runserver is not for that kind of use .", "However I seem to have to restart the built-in Django web server to see the updated data .", "I have a rudimentary web server running next to a dev server .", "On Django development server with SpatiaLite I am trying to do a basic geographic query : .. . .. . This causes a Segmentation error and the server dies .", "Django development server is really nice it shows the log of all POST GET requests as well as other events in real-time .", "I have a Django development server running on a remote centos VM on another lan .", "Does this question http : stackoverflow.com questions 16303098 django-development-server-and-mime-types help", "I m developing application on Django and ready to move to deployment server .", "Solution was to activate it only on production server and not in dev", "Thus a Django project which has one or more apps runs as a part of one web server .", "I have a production and local DJANGO development-environment .", "I have not updated Django on the project.. . strange .", "I am basically asking this question : How can I tell whether my Django application is running on development server or not", "Django supports it since 1.7 .", "I m using Django 1.8 .", "I m using Django version 1.3 alpha 1 SVN-14750 to build a Django site .", "I resorted to using my production server which uses Gunicorn and NginX for development instead of django s dev server .", "There are two I use : .. . .. . django-compressor : http : django-compressor.readthedocs.org en latest django-pipeline : https : django-pipeline.readthedocs.org en latest .. . .. . I started on django-pipeline but have moved to using compressor as of late .", "It s normal to serve static files from the dev server .", "Now following the tutorial in Django Official Website to build a web app .", "Which version of django are you using", "The solution is to run multiple instances of Django .", "When running the django test server on a local project can you make 400 500 errors stand out in a different color in output text", "How do I restart a dev server in the VM", "With it you can launch and kill the dev server .", "You have to wait for the dev server to reload .", "@Joe : Have you 404 in your django runserver console log", "to do with the Django code rather than the configuration of the file serving .", "I ve gone through https : docs.djangoproject.com en dev howto static-files related Q A on stackoverflow regarding placement of static files on Django .", "I finally got around to trying out django-devserver https : github.com dcramer django-devserver .", "every django project comes with a settings.py file and django will refuse to run or load models until that settings.py file is loaded .", "A Django project normally looks something like this as of Django 1.4 and above I think .", "As usual there s a Django package for that", "Selling django is hard when I am in and out of the shell command-line to start restart the server syncdb migrate etc .", "The problem is that the Django Debug server is just one process which runs in a specific port .", "The problem is that I have no way to tell Django how to distinguish the url mappings based on a particular server instance .", "what i want to know is how to set thet dev server and get my development proj running", "Django Debug Toolbar generates tons of these errors .", "Django uses python to guess mime-types .", "I m sure the problem is with Django but I m not sure where .", "I am quite new to Django and Python .", "See the docs on syntax coloring : https : docs.djangoproject.com en 1.3 ref django-admin syntax-coloring .. . .. . This requires Django 1.2 and a platform which supports colors disabled on Windows .", "To make the job of selling django to my co-workers and hopefully make development easier at least for the django developers who likes to work in an IDE I have started the work on a plugin for Editra .", "This is not possible without modifying the source code of Django which is not recommended .", "I m trying to develop a simple plugin https : bitbucket.org weholt editra.djangomanagement for the Editra http : editra.org editor for django development .", "It s not used by dev server just so we can change the URL for the next version .", "The dev server is single-threaded so if something keeps waiting it blocks every request .", "There is a pull request open to add this functionality : github.com dcramer django-devserver pull 50 https : github.com dcramer django-devserver pull 50", "Is there any way I can listen to see them in real-time all the events happening at Apache the same way I can do using Django development server", "I am trying to pick up an old Django project and my immediate goal is to see what I can get running on my computer on the development server .", "For instance on my apache server .pngs are transferred as image png while on the dev server it s image x-png", "What I want to do is make each App listen to its own port on the same server and if possible under the same Django project .", "The current version of the doc on syntax coloring is here : .. . .. . https : docs.djangoproject.com en 1.9 ref django-admin syntax-coloring", "Does this happen to empty Django project freshly generated or just for your specific site", "from here https : docs.djangoproject.com en dev howto static-files serving-static-files-in-development .. . .. . can t you just supply the static files in another server", "Right now it can create django projects and apps from within the editor .", "It s installed and working but static files refuse to load Django 1.3 .", "Also http : senko.net en django-nginx-gunicorn is useful .", "I m learning Django so I just started using template inheritance .", "Or did you originally target an older version of Django that uses a different layout", "Seems a bit messy but don t know of another way to stop the dev server and free the port resources", "try this http : stackoverflow.com questions 12809416 django-static-files-404 in case .. . .. . however about serving static files in development : .. . .. . Warning This will only work if DEBUG is True .", "It would be better if my dev server buffered the incoming HTTP request while the project reloaded if I reload at the wrong time the server simply holds the request until the project is operational again and then processes it .", "But I find that I often beat the dev server to the punch - I hit reload in my browser while the project is still reloading .", "The development of my django applications involves something very annoying : whenever I perform any change in my codebase I need to restart the application .", "You can see me code @ bitbucket.org weholt django-lime src 38fb5f27c0f7 lime https : bitbucket.org weholt django-lime src 38fb5f27c0f7 lime django tools.py .", "When I m goofing around with Django learning Django Python at the moment and I run python manage.py runserver with a variety of IP address I can t get my browser to access that box .", "You can look https : github.com kirpit django-sample-app around http : www.revsys.com blog 2014 nov 21 recommended-django-project-layout online http : stackoverflow.com a 23469321 25507 for examples and variations on this .", "I m using Firefox with the cache disabled about : config network.http.use-cache False so I m reasonably sure the issue is with Django .", "The next time a request comes through for that same URL Django will check to see if that response lives in the cache and if it does will return that string .", "As is probably evident from the question and this answer I don t understand caching Django or otherwise very well .", "The only validation Django does on start-up is to check if the syntax of your model code is okay or not .", "In any case one can just uncomment the line self.validate display num errors True in django core management commands runserver.py" ] }
{ "confidence": [ 67.00909423828125, 64.28373718261719, 63.237030029296875, 62.546241760253906, 61.71435546875, 61.11438751220703, 60.878936767578125, 60.496849060058594, 60.17321014404297, 59.716426849365234, 58.010597229003906, 57.57341003417969, 57.37786865234375, 56.1998291015625, 54.42374038696289, 53.63908386230469, 52.8170166015625, 52.583412170410156, 51.50174331665039, 51.480655670166016 ], "content": [ "Question : Django development server is really nice it shows the log of all POST GET requests as well as other events in real-time . Example of logs from Django dev server : .. . .. . It s very useful for debugging figuring out the sources of 500 errors etc . I ve recently deployed my Django app on Apache and looking for logs analogous to that of Django Dev Server on Apache . There is obviously Apache error logs snippet is below : .. . .. . But that s not what I want . My site has a simple link submission functionality which works locally on Django dev server but is not working on the actual site running Apache . So seeing the Django dev server style logs on Apache will be really helpful . Any idea where can I look at Thank in advance and happy 4th .. . Answer : Check access.log for the apache where you will see each request processed and response sent . Also if you have not tried yet set DEBUG True in your settings file so django will show you detail error trace and other useful information . Comment : Thanks Rohan access.log is helpful . Is there any way I can listen to see them in real-time all the events happening at Apache the same way I can do using Django development server Comment : @Arman If you on linux tail -f access.log", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : add refresh before quit see here http : stackoverflow.com questions 13243267 django-and-selenium-web-testing-error-errno-10054", "Question : Whenever I run python manage.py runserver and accesses my website with localhost : 8000 in the browser the first request is VERY slow around 10 seconds . Following requests are really fast . Is there any way to improve the performance of this It s very unconvenient because while in development it s always reloading due to updates to the code . Thanks a lot . Comment : What if you open 127.0.0.1 : 8000 instead Any difference Comment : No still very slow. . .. . Answer : Does this happen to empty Django project freshly generated or just for your specific site Without having more specific information it is hard to tell why . The first request most likely lazily initializes some data . It could e.g . call external websites to get data and is slow due to bad DNS or slow Internet connection . Alternative caches are empty and they are repopulated on the startup of the Django development server . Comment : Specific project only thanks a lot for your answer . Do you know how could I debug Comment : Try Django Debug Toolbar github.com django-debug-toolbar django-debug-toolbar https : github.com django-debug-toolbar django-debug-toolbar as the first shot Comment : Found it Middleware that sends data to a remote monitoring service . Solution was to activate it only on production server and not in dev", "Question : We all love that Django s development server manage.py runserver notices file changes and reloads . But I find that I often beat the dev server to the punch - I hit reload in my browser while the project is still reloading . This results in an Unable to connect error in my browser because there is nothing listening on localhost : 8000 . It would be better if my dev server buffered the incoming HTTP request while the project reloaded if I reload at the wrong time the server simply holds the request until the project is operational again and then processes it . Perhaps Django s reloading system isn t conducive to this design . Maybe I d need to run a separate buffering proxy to make this work Obviously simple approaches are preferred but something that optimizes this would be a nice frequently-felt improvement to my dev process . .. . Answer : There is no simple way to do that without proxy server and I m pretty sure that it won t happen in near future . Django runserver is not for that kind of use . If it really bothers you proxy your django-dev-server using nginx . Comment : I m fine in theory with running a proxy server can you point me at a configuration that works", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : Django Debug Toolbar generates tons of these errors . If you have it installed please try again without it", "Question : In my development-environment I m getting intermittent failures for serving static files js scripts and css . In the error console in Chrome I get 404s . But if I refresh on those items or visit the URLs directly they re served up fine . This is annoying . Example : .. . .. . but if I visit that URL directly fine . And if I refresh the page a few times it will work again . Any ideas Chrome 14.0.835.202 Comment : I m having the same issue . Did you manage figuring out the reason Comment : Not yet Running with --forked seems to work but makes using pdb impossible Comment : why does your url have v 1 Comment : That s just a future-proofing cache-busting thing . It s not used by dev server just so we can change the URL for the next version . Comment : please post your settings.py .. . Answer : The dev server is single-threaded so if something keeps waiting it blocks every request . I usualy work with the django concurent dev server https : github.com ashchristopher django-concurrent-server which is multi-threaded and works much better . Also it is very fast and easy to setup Comment : A server that is blocked cannot serve up 404s.. . Comment : absolutely true : Comment : This has stopped happening for me it is frustrating . I have not updated Django on the project.. . strange . Comment : @Thomas : maybe chrome do something special It probably should be confirmed with other browsers . Comment : @Joe : Have you 404 in your django runserver console log You may also increase debugging level and then check if a problems appears again .", "Question : I am stuck on this step : .. . .. . i have a page which i am developing in django . the page is ready to test . i deployed it . running well and it is online . but now i want to setup a new project in server as the testing version of what is online now . I went to control panel of my hosting provider and saw that once i created the django project first it also created a new dev.mypage.com . But i cannot find this in my server . i dont know how to setup a new dev project in server so that i can develop locally push to test project and test online and then go live . please help Comment : So you basically want to host multiple django servers on the same virtual-machine Comment : @karthikr honestly i dont have experience with virtual machines . I have a django hosting service from provider and they provide me django installation on server so that i can run my django wegpage . they set production one in lighttpd and development one in development server . what i want to know is how to set thet dev server and get my development proj running Comment : You can install nginx and have that point to 2 different servers . There is lots of information available online .. . Answer : You may like to use nginx + gunicorn http : docs.gunicorn.org en latest run.html . Also http : senko.net en django-nginx-gunicorn is useful . Comment : thanks but i found different solution otherwise your suggestion would be the solution", "Question : null .. . Answer : The development of my django applications involves something very annoying : whenever I perform any change in my codebase I need to restart the application . Django does it for me cool but it takes some time even more for bigger apps which I want to avoid . I am a big fan of how it works in PHP : No restarts involved I may test my changes as soon as I perform them . My question is : is it possible to achieve the change run right away without waiting for dev server to reload workflow with django project .. . .. . I know the title may sound confusing : My question is about the final effect . I realize this is apples vs oranges and under the hood it works completely differently I know that python dev servers are long running processes with global state and the code is loaded compiled on startup while PHP requests are completely separate from each other and in most dev setups the code is loaded compiled on each request . I also realize that django-dev-server has a great automatic reload feature . Comment : What How are you running it now manage.py runserver does reload changes automatically unless they alter the models and migration is required or you make a change that breaks syntax etc . Comment : as I wrote : I also realize that django-dev-server has a great automatic reload feature . It simply takes some time and I wonder if I can avoid it somehow Comment : I updated the question I hope it s less confusing now Comment : Oh I see then : no for the reasons you outline . You have to wait for the dev server to reload .", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : This happens when the client closes the connection before the server finished sending the data . If it only happens sometimes and is not a persistent problem ignore it . Complete answer here Django development server broken-pipe error http : stackoverflow.com questions 10253288 django-development-server-broken-pipe-error", "Question : I have a VirtualBox machine managed by Vagrant . On this machine I run a Django development web server : .. . .. . The codebase is big so for faster code reload I installed pyinotify . Django supports it since 1.7 . I m using 1.7 . The codebase sits in a synced folder NFS and I m using Sublime 3 to edit files on my host machine OS X . However inotify doesn t go well with NFS http : stackoverflow.com questions 4231243 inotify-with-nfs and the code autoreload do not work . How do I restart a dev server in the VM .. . Answer : I have a rudimentary web server running next to a dev server . This simple web server listens for a request on a different port and touches the project s manage.py . This in turn triggers a restart : .. . .. . reloader.py .. . .. . On the host machine I use a simple shell command to watch for file changes and hit the reloader s endpoint : .. . .. . watcher.sh .. . .. . Where watchmedo is a utility from watchdog https : github.com gorakhargosh watchdog .", "Question : Stage of models validation is most longest in Django dev-server startup . And in my case it mostly waste of time since my models hanging infrequently . Is there way to turn off this .. . Answer : This is not possible without modifying the source code of Django which is not recommended . The only validation Django does on start-up is to check if the syntax of your model code is okay or not . It should not take more than 2-3 seconds . So there are few other initialization are being done during startup which are also taking time . During development you do not need to restart the server every time you modify the code- especially if you are not touching the definition of the models at all . The Django dev server automatically reloads itself if it detects any change in your code . So leave it running while you develop and hopefully your experience will improve . Comment : Actually if one follows your advice it is even MORE annoying with the model-validation In any case one can just uncomment the line self.validate display num errors True in django core management commands runserver.py Comment : Your comment actually doesn t seem to turn off the delay with validation only the message . Is that right or am I mistaken Comment : Okay I am mistaken . However the printout of validating models is misleading in terms of the delay . The validation is not the source of the delay as commenting it out does not speed the servers responsiveness . It must be elsewhere . Comment : Mistaken again It is the validation . However commenting it out did nothing for me oddly . I realize that makes no sense Comment : I never timed it but on my mac there must be at least two delays one from self.validate the other elsewhere .", "Question : I m developing on Mac OSX 10.8 . Lately I ve been noticing that when I ve been running the dev server for a while and then -C to exit the process continues to run in the background . I have to do a ps to find the process and kill it or it won t let me use the same address : port again . I didn t have to do that in earlier versions of Django I m currently running 1.7.3 on this project . Seems a bit messy but don t know of another way to stop the dev server and free the port resources Rgds Ross . .. . Answer : Django development server have multiple threads so when closing main process there might be some running threads in background . It happens when there is some request being processed some long-term request can hang or if you re using websockets or something connection might prevent closing thread . Check if all of your requests are properly closed before closing your server and it should shut down properly . Comment : Good point I am having some probs with Error 54 Connection reset by peer where HTTP sessions are prematurely ended by client site hardware .", "Question : I have a Django development server running on a remote centos VM on another lan . I have set up port forwarding using Secure CRT to access the web page through my browser from my desk pc . I am currently not using apache with the development server and is shutdown . I start the server by running python manage.py runserver 0.0.0.0 : 80 . When I type either the ip or www.localhost.com into the web browser my URL is read as-if it has been doubled with the host being read as-if it was also the path . When I try to access the development server from within the same LAN the page loads up fine . I have been searching through the django documentation and stack-overflow but I have yet to find a similar problem to this . Does anyone have any thoughts on why this may be happening and what could be a possible solution Thank you very much in advance .. . Answer : It looks like the request URL is incorrect : http : www.localhost.com http : www.localhost.com should probably be http : actual machine IP .com .. . .. . I d start searching there . You won t be able to access the VM s port 80 from a different lan using localhost as the hostname since localhost is probably already set in your hosts-file . If you want to test your dev environ remotely can I suggest either setting up Apache properly with port 80 as opposed to using django s dev server--privilege restrictions and all that can be circumvented with sudo and other bad practice or use a pre-built shared dev service like vagrant share .", "Question : I m trying to develop a simple plugin https : bitbucket.org weholt editra.djangomanagement for the Editra http : editra.org editor for django development . Right now it can create django projects and apps from within the editor . The editor is based on wxPython and I want to start the devserver from within the editor show a simple-form with the option to stop or kill restart the server . The goal is to minimize the need to do repetetive tasks in the console shell . My reason for doing this is that I am working in a Microsoft only company where you seldom do stuff using the command-line . Selling django is hard when I am in and out of the shell command-line to start restart the server syncdb migrate etc . To make the job of selling django to my co-workers and hopefully make development easier at least for the django developers who likes to work in an IDE I have started the work on a plugin for Editra . Right now the plugin adds a menu item called Django with two subitems create project and create app . A context menu is in the works which will give different options depending on the content of the file being edited right-click in a window holding settings.py will give you the option to start the devserver call syncdb migrate if south is installed create superuser etc . A right-click in views.py will give you options to help you generate views or templates in models.py scaffolding or generation of admin.py etc . The only thing I cannot get my head around is how to start kill restart the devserver from inside the app . What I really like is to have a small window floating around with two buttons stop or restart which will -- stop or restart the devserver . Or a play and stop button inside the editor doing the same thing . The problem is controlling the devserver process from within the app . If anybody has any information about this I would be very grateful . Any help input comments or ideas are appreciated . Regards Thomas Weholt .. . Answer : You ll want to use Python s subprocess module to launch and kill the dev server process I imagine : http : docs.python.org library subprocess.html .. . .. . You re probably most interested in the Popen object . With it you can launch and kill the dev server . Comment : Hmmm .. . I ve tried to use subprocess and starting the server works fine but stopping it does not . The process is still there after the kill or terminate call has been sent . Comment : You can see me code @ bitbucket.org weholt django-lime src 38fb5f27c0f7 lime https : bitbucket.org weholt django-lime src 38fb5f27c0f7 lime django tools.py . Down at the bottom there is a class called DevServerControl which is my attempt at doing this . As I mentioned calling start works fine calling stop does nothing . Comment : I suppose you are running Windows as it seems to have difficulties when killing subprocesses . Try using the Windows solution to kill processes in this question : stackoverflow.com questions 1064335 http : stackoverflow.com questions 1064335 in-python-2-5-how-do-i-kill-a-subprocess . If there is a message you can pass to the dev server to stop it that would be an easy way to kill it too .", "Question : Is there anyway of setting MIME types in the django development server Specifically I would love to remove this message from the warnings in Chrome dev tools . .. . Answer : Turns out it was as simple as adding .. . .. . to settings.py Comment : thank you so much", "Question : I m using Django version 1.3 alpha 1 SVN-14750 to build a Django site . I ve got a couple of pages which display data and allow me to edit that data . However I seem to have to restart the built-in Django web server to see the updated data . I don t remember having this problem before : usually a CTRL + F5 refresh in the browser would do it . Obviously it s quite annoying behaviour during development seeing up-to-date data load slower is preferable to seeing out-of-date data load instantly . I m using Firefox with the cache disabled about : config network.http.use-cache False so I m reasonably sure the issue is with Django . .. . Answer : Web servers themselves don t do caching . It is up to the application itself to decide how server-side caching works . In Django s case there are a number of options for enabling caching . The high level though is that Django sees a request for an URL generates the html string in response and stores that string in memory or a database - depending on the cache backend you set . The next time a request comes through for that same URL Django will check to see if that response lives in the cache and if it does will return that string . If it doesn t the process repeats . The idea behind providing @vary on decorators is that you change the lookup keys for finding a response in the cache . If you vary on user url . the algorithm goes something like this : .. . .. . The web server has no input into this type of caching . The other type of caching is client-side . This is where the web server is configured to return certain headers for specific types of resources like static content javascript images etc . The browser can then analyze those headers and decide to request the content or to use the content stored client-side . This generally doesn t apply to dynamic-content however .", "Question : In my development-environment I m getting intermittent failures for serving static files js scripts and css . In the error console in Chrome I get 404s . But if I refresh on those items or visit the URLs directly they re served up fine . This is annoying . Example : .. . .. . but if I visit that URL directly fine . And if I refresh the page a few times it will work again . Any ideas Chrome 14.0.835.202 Comment : I m having the same issue . Did you manage figuring out the reason Comment : Not yet Running with --forked seems to work but makes using pdb impossible Comment : why does your url have v 1 Comment : That s just a future-proofing cache-busting thing . It s not used by dev server just so we can change the URL for the next version . Comment : please post your settings.py .. . Answer : it might depends on your setup . what did you do for the static what s the settings did you do the collect static try this http : stackoverflow.com questions 12809416 django-static-files-404 in case .. . .. . however about serving static files in development : .. . .. . Warning This will only work if DEBUG is True . .. . That s because this view is grossly inefficient and probably insecure . This is only intended for local development and should never be used in production . from here https : docs.djangoproject.com en dev howto static-files serving-static-files-in-development .. . .. . can t you just supply the static files in another server Comment : I m sorry this was so long ago I can t remember . I think it stopped happening so I stopped worrying about it . Comment : It s normal to serve static files from the dev server . It s typical for development . I didn t say this happens in production .", "Question : null .. . Answer : Or rather it s returning them as text which is really odd . So I have this line of code in my javascript to test this that s .. . .. . I can verify that the actual location of the resource exists because the status code is 200 and I see responseText with the contents in the Chrome console window . Now the issue is that.. . When I run it from the dev server locally there s only responseText .. . .. . When I run it on the actual site in the console it returns responseJSON and responseText . Does anyone know why this is the case Essentially it s not returning a javascript object .. . .. . So the actual server runs apache . Is it possible that for some reason the Django dev server is setting the MIME types of responses incorrectly .. . .. . Apparent fix .. . .. . Well it seems like this was the same problem encountered in this http : stackoverflow.com questions 18271257 resource-interpreted-as-font-but-transferred-with-mime-type-font-woff-django question . It was fixed by adding .. . .. . In settings.py but that doesn t answer the bigger question of WHY the development server can t correctly set the MIME type for some types of content .. . .. . Edit .. . .. . In fact a lot of the mimetypes seem off . For instance on my apache server .pngs are transferred as image png while on the dev server it s image x-png Comment : Does switching DEBUG flag make any difference Comment : It s current set to True . Setting it to False doesn t seem to fix the problem it doesn t seem to allow me to run it without Debug True Comment : Could you check what is the Content-Type of the response locally and on the actual site Comment : On the local site it s an application octet-stream while on the site it s a application json . Weird.. . Comment : Could you show your urls.py part that configures serving static files", "Question : I m using Django version 1.3 alpha 1 SVN-14750 to build a Django site . I ve got a couple of pages which display data and allow me to edit that data . However I seem to have to restart the built-in Django web server to see the updated data . I don t remember having this problem before : usually a CTRL + F5 refresh in the browser would do it . Obviously it s quite annoying behaviour during development seeing up-to-date data load slower is preferable to seeing out-of-date data load instantly . I m using Firefox with the cache disabled about : config network.http.use-cache False so I m reasonably sure the issue is with Django . .. . Answer : Ah I still had some cache middleware enabled . Removing the following from my MIDDLEWARE CLASSES setting in settings.py fixed it . As is probably evident from the question and this answer I don t understand caching Django or otherwise very well .", "Question : I am running django on django s development server . It was working fine before but from yesterday i keep getting this error on the linux command-line where server was running . can anyone guide me that why it started happening now .. . .. . This happen only 1 out of 10 times .. . Answer : Broken pipe means that there was still outgoing data on a file-descriptor a socket in this case-when the destination closed down . In this case the most likely cause is the browser closing the connection before the Django development server has sent the entire response ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
cassini@web@65
cassini -- the cassini web server is an open-source lightweight @placeholder server distributed with asp.net as an example of an asp.net web server written in c .
{ "confidence": [ 75.39752197265625, 67.5350341796875, 65.0472412109375, 64.04051208496094, 63.23214340209961, 58.302799224853516, 55.61066818237305, 55.56019592285156, 53.929412841796875, 53.929412841796875, 53.5941047668457, 53.32098388671875, 52.7486686706543, 52.42914581298828, 52.04953384399414, 51.06437301635742, 50.767616271972656, 49.99965286254883, 49.883628845214844, 49.68442153930664, 49.02239227294922, 48.54762268066406, 48.49856185913086, 48.48164367675781, 48.474388122558594, 47.94427490234375, 47.83374786376953, 47.65314865112305, 47.23017883300781, 47.21696090698242, 46.72046661376953, 46.63105010986328, 46.44868087768555, 45.76771926879883, 45.56016159057617, 45.56016159057617, 45.47178649902344, 45.0722541809082, 45.04564666748047, 44.89671325683594, 44.864070892333984, 44.8158073425293, 44.57500076293945, 43.878910064697266, 43.64521026611328, 43.51164627075195, 43.51164627075195, 43.394256591796875, 43.36426544189453, 42.84780502319336, 42.69816589355469, 42.31231689453125, 42.25705337524414, 42.25705337524414, 42.25705337524414, 42.06163787841797, 41.97325134277344, 41.68803405761719, 41.3130989074707, 41.27189254760742, 41.264835357666016, 41.264835357666016, 41.10416030883789, 40.90534973144531, 40.091148376464844, 40.091148376464844, 39.95989990234375, 39.95989990234375, 39.839141845703125, 39.68894958496094, 39.62936019897461, 39.33454513549805, 38.889915466308594, 38.75947189331055, 38.75947189331055, 38.70608139038086, 38.70608139038086, 38.60965347290039, 38.511268615722656, 38.4486198425293, 38.35965347290039, 38.34938430786133, 38.19160842895508, 37.77431106567383, 37.52610778808594, 37.52610778808594, 37.52610778808594, 37.52610778808594, 37.52610778808594, 37.37955093383789, 37.325862884521484, 37.250396728515625, 37.14902877807617, 37.14902877807617, 36.593570709228516, 36.593570709228516, 36.345367431640625, 36.345367431640625, 36.345367431640625, 36.345367431640625 ], "content": [ "For Cassini did you mean the ASP.NET standalone dev server or the open-source Cassini web server sample or the server that someone developed off of Cassini", "I have an ASP.NET website running on Cassini web server .", "Cassini is the .net web development server .", "This answer is specific for ASP.NET Development web server Cassini -- your question mentions IIS7 and Cassini .", "Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX", "During development I usually test ASP.Net applications using the Web Development Server sometimes called Cassini .", "We have a ASP.NET web application and I am debugging on Cassini .", "Several years ago I created an ASP.NET web application which runs by using a WinForms based browser IE and Cassini as a web-server .", "Is there anyways to launch Cassini web server from a command-line", "What are your experiences using Cassini as a production web-server", "Cassini only renders ASP.net pages .", "Searching the web for cassini Source shows interesting hits .", "But I m talking about UltiDev s Cassini not Microsoft development web server a.k.a .", "I was studying about the differences between ASP.NET Development server named Cassini and IIS server .", "I am working on an ASP.NET web site that for some reason does not use the Visual Studio Cassini mini-server but requires that IIS be installed and set up .", "The built-in web server for Visual Studio is called Cassini and here are a few of its limitations.. . .. . .. . It can host only one ASP.NET application per port .", "Does any one know which IE version Cassini personal web server v3.5 is using", "When I view the webpage by running ASP.NET Development Server Cassini it takes about 200ms .", "Hi all I seem to have found a discrepancy when testing ASP.NET applications locally on the built-in web server with Visual Studio 2008 Cassini .", "There is Abyss http : www.aprelium.com abyssws UltiDev Cassini http : ultidev.com products Cassini and I think a few other open-source servers with ASP.NET support .", "The default server are the APO.NET Development server Cassini but you can change that to either an IIS server or some other custom web server .", "Additional Information : This problme only seems to effect the root of the visual studion web server i ll call it cassini from here on in .", "If I configure the web application to run under ASP.NET Dev Server Cassini instead of IIS Express the Android application is able to post with no problems .", "Hit 1 : cassini - Microsoft s open-source portable and redistributable web server on .NET 4.0 - Google Project Hosting https : code.google.com p cassini hit 2 : CassiniDev - Cassini 3.5 4.0 Developers Edition - Home http : cassinidev.codeplex.com .", "MS Cassini Development Web Server is a nice product that executes web requests in a similar way that IIS7 does .", "I suspect the cassini VS development server doesn t have a default page feature-- the source code for the cassini server the ancestor of the VS development server is on the web and you can check that http : weblogs.asp.net scottgu archive 2005 10 16 427648.aspx and add a default page by building a custom version .", "I run my project via VS IDE - which launches my app in the ASP.NET Development Server aka Cassini .", "UltiDev Web Server Pro http : ultidev.com Forums yaf postst633 Welcome-to-UltiDev-Web-Server-Pro.aspx is a free redistributable light-weight web server with lots of enterprise-level feature for ASP.NET applications from ASP.NET 1.1 to 4 .", "Develop against IIS Express not the cassini development server .", "Why is the local testing server Cassini different from the live server", "Does UltiDev s Cassini http : www.ultidev.com products Cassini index.htm a separate payable product upgraded from MS Cassini web server read these settings and execute as the web.config tells it to", "And the jury finds both Cassini and ASP.NET to be not guilty .", "Either it s my imagination or the ASP.NET Dev Server Cassini cannot handle multiple threads e.g .", "When you debug your web app with Cassini as your debug server you ll get The Web application at url could not be found .", "Cassini pipes every request to the ASP.NET runtime IIS doesn t .", "If you have a solution that contains both ASP.NET and ASP it will continue to run on Cassini .", "Like Cassini the Neokernel runs any ASP.NET web application that works under IIS and it addresses the above problems .", "MS Cassini and UltiDev Cassini both use the IIS6 pipeline only difference being that all requests go to ASP.NET .", "The root issue is that we have an ASP.Net application with a deep folder structure that we run within the Cassini web server and install on customer machines using a ClickOnce deployment .", "However I can t get it to run using the built-in VS web server Cassini .", "What about if using the built-in Visual Studio server Cassini", "Is there a way to automatically stop the ASP.NET Development Server Cassini whenever I do a build rebuild in VS2008 and then obviously have it start again when required", "Is it possible to run ASP.NET MVC application on UltiDev Cassini webserver", "I m running in Cassini the development server that ships with Visual Studio .", "Here s a reason for a third way : although UWS Pro http : ultidev.com Forums yaf postst633 Welcome-to-UltiDev-Web-Server-Pro.aspx is probably closer to IIS than Cassini although inspired by Cassini and is from the vendor of the UltiDev Cassini fork its main purpose is to be redistributable http : ultidev.com Forums yaf postst660 Creating-Installer-project-bundling-UltiDev-Web-Server-Pro-using-Visual-Studio.aspx along with ASP.NET applications .", "Is there a way to access the Cassini local web server from Windows 7 s XP mode", "The goal is to set the start URL on run debug using VS s built-in Cassini web server .", "Cassini is simply a toy which is never suitable for low-level ASP.NET project .", "I want to write a few web tests over WatiN Selenium + CassiniDev web server for my asp.net web application .", "It is not based on the Cassini source code .", "Membership.ValidateUser methods works on development server both iis-express and cassini .", "I m trying to use the Cassini webserver to create a deployment test host- a sort of embedded web server to isolate web server config issues from app deployment issues .", "I notice that my other web site projects that DO use Cassini also have Default Server checked so that s not it .", "@ta.speot.is Not really I m actually going to point the Cassini web server at this folder so it s not my app-code that is accessing the file directly .", "It seem that is not possible using Cassini but you could enable SSL if you would use IIS 7 and above for development instead of the integrated web server .", "If you are running on IIS 7 put the module in : .. . .. . If you are running on Cassini Visual Studio s integrated miniature web-server put the module in : .. . .. . IIS will crash if you give it the Cassini location .", "How to Download Cassini Webserver Source code", "However if you are asking how to set the default page for the VS development server based on the Cassini code you re expected to do that in the project properties right-click on web project Web Start Action Specific Page foo.aspx .", "I use cassini server when I develop my project .", "I would like to switch to the development web server Cassini for debugging so that I can use features like edit-and-continue .", "While the apps I write are 64-bit capable as is IIS7 the built-in ASP.NET Development Server aka Cassini aka WebDev.Webserver.exe runs as 32-bit .", "Opting for Visual Studio ASP.NET Development Server hereinafter Cassini in Visual Studio 2012 got no problem so my IIS settings or something like that is a suspect .", "cassini .", "The company I work for Comet Way has a product called Neokernel Web Server http : www.neokernel.com which is a commercial product for C that lets you embed an SSL secured scalable ASP.NET web server in your application .", "Cassini Visual Studio development web server by default enables directory browsing how can I enable directory browsing on IIS Express by default", "See stackoverflow.com questions 4549559 http : stackoverflow.com questions 4549559 how-can-i-launch-cassini-web-server-from-a-command-line-or-batch-file", "So what are the differences between the way that production IIS servers and the ASP.Net Web Development Server behave", "For a Web Site the Development Server subjects static files images and style sheets etc to ASP.NET authorization .", "With cassini I could set the virtual-directory of the web app I m working on .", "What are the pros cons of using the ASP.NET dev Server", "That s Cassini then .", "To Do that Cassini and ASP.NET would need to be able to the ZIP archive as a virtual file system .", "Cassini runs ASP.NET off some temp folder so the assembly I am using is really a different instance in the address space of the same process .", "The XP version of IIS has limitation that are not present in the Server version that Cassini side-steps .", "I ve been implementing areas but have found that it instantiates a development server for each area when it launches Cassini .", "I m using Nancy Framework but given that this problem appears to be at the web server level I suspect Cassini would act the same way for MCV applications .", "I can t seem to find a way to read the headers when executing code like the following on Cassini Visual Studio 2008 Dev Web Server .. .", "I m not exactly sure how you can keep using the pre-built Cassini implementation Microsoft.VisualStudio.WebHost.Server as you need to get the System.Web.HttpRuntime.Close call to occur within the application domain created by Cassini to host ASP.Net .", "In Cassini it takes about 200ms .", "Or is it just with cassini", "When I am running our web application on Cassini Dev Server I get following error : .. . .. . Running IIS Express and other alternatives in automatic tests is PITA .", "I am asking about the account of the user which run the ASP.NET IIS or Cassini or IIS Express application .", "It is mentioned : .. . .. . This sample some sample using HTTPS only works when hosted on IIS and cannot work on Cassini Visual Studio Development Server because Cassini does not support HTTPS .", "When you move to the server IIS something that you would have had access to in Cassini doesn t work the same .", "Cassini is not ment to be a replacement .", "Cassini makes no difference here .", "Cassini does not support HTTPS .", "This is definitely a bug in Cassini Dev .", "ulti cassini or the microsoft one", "My company makes a product called the Neokernel Web Server http : www.neokernel.com that runs ASP.NET web-applications but static content is served without using the ASP.NET pipeline .", "Is this a feature of the IIS web server", "Background : I m trying to run UltiDev Cassini because VS Cassini is 32bit only .", "Comet Way the company I work for makes a product called the Neokernel Web Server http : www.neokernel.com that is a secure professional ASP.NET enabled web server designed for embedding in .NET applications .", "Web server starts working asp.net development server and or IIS Express but no browser is opened automatically when I click the link localhost : myport from web server s context menu .", "I have to close the cassini with End Process or Restart the IIS server so that the process to work again .", "The exact choices between Cassini and IIS server appears under WebApplication project s properties NOT under WebSites .", "UltiDev Cassini is not actually dormant .", "Simple - it s Cassini .", "So it is time to dump Cassini .", "Stop cassini-dev .. . 2 ." ] }
{ "confidence": [ 75.00728607177734, 73.73252868652344, 73.34661865234375, 72.32440185546875, 72.32440185546875, 72.00559997558594, 71.95654296875, 71.8370361328125, 71.62716674804688, 71.03264617919922, 71.01692199707031, 70.69998931884766, 70.69998931884766, 70.08409881591797, 69.8019027709961, 69.52425384521484, 69.37384033203125, 69.26165008544922, 67.71978759765625, 67.07791137695312 ], "content": [ "Question : I have an ASP.NET website which is running currently on IIS . Now I want to move that site to run on Cassini . What are the advantages of Cassini over IIS What are its disadvantages What are your experiences using Cassini as a production web-server Comment : ulti cassini or the microsoft one Comment : microsoft one.. . .. . Answer : UltiDev Web Server Pro http : ultidev.com Forums yaf postst633 Welcome-to-UltiDev-Web-Server-Pro.aspx is a free redistributable light-weight web server with lots of enterprise-level feature for ASP.NET applications from ASP.NET 1.1 to 4 . Unlike Cassini its design has nothing precluding it from serving Internet-facing applications . Created by UltiDev the vendor of UltiDev Cassini fork new UWS Pro is functionally closer to IIS than to Cassini . More screenshots http : ultidev.com Forums yaf postsm2801 Welcome-to-UltiDev-Web-Server-Pro.aspx post2801 . UWS Pro management console http : i.stack.imgur.com Hk3US.png .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : I know at one point I had an issue with Authentication not working as expected on Cassini built-in development server .. . .. . Also if you need to test things like ISAPI plugins a re-writer for example I m not sure how that s done on Cassini . The constantly changing port is also rather disconcerting to me . Also for each web project in your solution it fires up another instance of a Casini server and each one takes anywhere from 20 to 50 MB of memory . I use IIS all the time it s pretty easy to setup and you guys are already doing that.. . Comment : Agree re . port numbers . We currently generate an RSS feed for links to our dev websites don t think I ll be able to make it work with Cassini Comment : On the Web tab of your web projects properties screen you can specify a static port . For Web Site projects this is in the standard property window .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : I had to switch back to IIS for one project because I needed to set some virtual directories which is not possible on the ASP.NET Development Web Server .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : I ve used both methods and I prefer having IIS locally vs . using the built-in server . At very least you re more consistent with the final deployment setup .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : The main issue I ve run into with the dev server is SerializationExceptions with custom security principals stored on the thread context . Details here http : connect.microsoft.com VisualStudio feedback ViewFeedback.aspx FeedbackID 274696 .", "Question : I found several versions of an IIS-free Cassini webserver built by Microsoft . I d use it but I m unsure of which one is best since there are many forks builds : .. . .. . the original http : msdn.microsoft.com en-us magazine cc188791.aspx .. . dmitryr s v3 http : blogs.msdn.com b dmitryr archive 2005 09 27 474534.aspx with corresponding bug http : blogs.msdn.com b dgorti archive 2005 09 18 470766.aspx v3.5 http : blogs.msdn.com b dmitryr archive 2008 10 03 cassini-for-framework-3-5.aspx and v3.5.1 http : blogs.msdn.com b dmitryr archive 2009 04 23 cassini-support-for-friendly-urls-routing.aspx .. . A VB-based fork http : archive.msdn.microsoft.com Cassiniv40VB by MPosseth .. . Cassini++ http : cassinipp.codeplex.com Based on one of dmitryr s builds .. . Cassini Dev http : cassinidev.codeplex.com by Sky .. . Another version by zippy1981 https : github.com zippy1981 cassini .. . UtiDev Cassini http : ultidev.com products cassini not a direct Cassini port fork but close enough .. . .. . Hostable Web Core http : archive.msdn.microsoft.com hwc .. . .. . What web server do you recommend of the forks above is Hostable Web Core the new Cassini or do I still have a dependency on IIS with HWC I d appreciate it if you would elaborate : .. . .. . The project s security .. . If the fork is suitable for serving a lightweight Admin interface .. . Website features .. . Any dependency on IIS such as HWC . .. . Answer : UltiDev Cassini is not actually dormant . Its successor UltiDev Web Server Pro http : ultidev.com Forums yaf topics21 Web-Server--PRO--Questions-and-Bug-Reports.aspx UWS has been under development for more than a year and has become closer to IIS in functionality not in size or complexity . UltiDev Web Server Pro test builds are being released once every few weeks and are fairly stable already . To comment on some of Sky s points : .. . .. . New UWS bypasses ASP.NET runtime when serving static content . UltiDev Cassini is not limited to loopback IPs host names . New UWS uses http.sys kernel driver as listener - same as IIS . UltiDev Cassini and UWS do queue requests but handle in parallel by pooled threads . Inability to serve WCF with WsHttpBinding is not a limitation of SimpleWorkerRequests but rather of WCF s assumption that whenever it s hosted in an ASP.NET AppDomain then it s hosted either IIS or original Cassini and nothing else . Attempts to convince MS to change that spanned more than two years and failed . In the end WCF hosted in ASP.NET appdomain concludes that it s only safe when it s under IIS while not making such assumption when it s hosted by a random .net process appdomain w o ASP.NET . Still WCF with BasicHttpBinding works alright . Cheers Vlad .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : Another distinction I noticed is that Cassini runs as a 32-bit process and you have no control over it whereas you can control the application-pool of your IIS app to disallow 32-bit assuming your IIS is running on a 64-bit server . This becomes especially important if your web application is going to call APIs in 64-bit processes such as SharePoint Foundation Server 2010 . When you debug your web app with Cassini as your debug server you ll get The Web application at url could not be found . Verify that you have typed the URL correctly type errors when instantiating objects . If you debug using IIS with the app running in an app pool that runs as 64-bit with an identity that allows access to sharepoint database then you ll be able to debug properly .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : Also when using IIS 5.1 be sure to get JetStat IIS Admin http : www.jetstat.com iisadmin download.asp it adds functionality that is disabled out of the box on IIS 5 such as being able to setup multiple sites . Comment : Thanks will take a look it ll save having to add code to deal with the VDirs .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : As I stated here : http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis 104264 your developers need to be aware that Cassini runs as the local user which is typically an admin account for developers . The development will be able to access any file or resource that their account can which is quite different from what they will see on an IIS 6 server . The other thing that s a pretty big gotcha is debugging web-services is much easier using IIS and vdirs rather than separate Cassini instances .", "Question : Consider an ASP.NET MVC 2 project with VS 2010 . The goal is to set the start URL on run debug using VS s built-in Cassini web server . Entering the URL as I want to be loaded in the typical valid format controller action VS 2010 gives this exception . alt text http : i.imgur.com zq7gC.png .. . .. . Tried Remedies : .. . .. . starting the URL with and without a slash .. . ending the URL with and without a slash .. . .. . Question : How can you specify the start URL for an MVC 2 project Technologies : .. . .. . Visual Studio 2010 .. . ASP.NET MVC 2 .. . .. . Resolution : I was using the wrong field in the startup options . What was needed was the Specific Page field with the relative URL and not Start URL . Comment : +1 good question.. . Comment : For Cassini did you mean the ASP.NET standalone dev server or the open-source Cassini web server sample or the server that someone developed off of Cassini .. . Answer : I was looking for a similar solution for VS2015 . If anyone is reading this and you just want to run debug via Visual Studio 2015 without having to attach to process and you re happy to run through Local IIS instead of Cassini or IIS Express you can set a config like this : .. . .. . enter image description here http : i.stack.imgur.com NvFug.png", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : It s a very good idea . Here are some reasons for : .. . .. . You no longer need admin access to your machine for web development it can still be helpful . It s much easier to test a quick change and continue work and faster iteration cycles are good http : www.codinghorror.com blog archives 000788.html . It can simplify setup and deployment of your development environments . The XP version of IIS has limitation that are not present in the Server version that Cassini side-steps . The only argument I know against is that there are a couple very rare edge cases where the Cassini built-in server doesn t exactly mimic IIS because you re using odd port numbers . I doubt you ll ever run into them and using Cassini as the primary dev environment does not preclude developers from also having access to IIS on the machine . In fact my preferred setup is Cassini first for most small work then deploy to my local IIS for more in-depth testing before moving code back to the shared source repository . Edit .. . Forgot about url re-writing . You do need IIS for that . And an example of a limitation of the built-in XP IIS is that you are limited to one site in XP can have multiple applications but that s a different thing . Comment : Cassini pipes every request to the ASP.NET runtime IIS doesn t . Cassini cannot use ISAPI...IIS does . You can configure Visual Studio to launch your localhost on IIS when launching the app and it will startup faster than loading cassini . Comment : I m with Joel on this one . Unless I bump into something that Cassini flat can t do URL rewriting I don t have any trouble with Cassini and find it very handy . Comment : It s interesting that an answer like this gets voted down . I think the opinion presented has merit--but even if I did disagree with it voting it down isn t the way do that . Comment : do you need admin to run iis Comment : @Quandary note that when I first wrote this neither Windows 7 or IIS 7 were out yet . Cassini solved some real problems for developers with the Windows XP version of IIS .", "Question : Consider an ASP.NET MVC 2 project with VS 2010 . The goal is to set the start URL on run debug using VS s built-in Cassini web server . Entering the URL as I want to be loaded in the typical valid format controller action VS 2010 gives this exception . alt text http : i.imgur.com zq7gC.png .. . .. . Tried Remedies : .. . .. . starting the URL with and without a slash .. . ending the URL with and without a slash .. . .. . Question : How can you specify the start URL for an MVC 2 project Technologies : .. . .. . Visual Studio 2010 .. . ASP.NET MVC 2 .. . .. . Resolution : I was using the wrong field in the startup options . What was needed was the Specific Page field with the relative URL and not Start URL . Comment : +1 good question.. . Comment : For Cassini did you mean the ASP.NET standalone dev server or the open-source Cassini web server sample or the server that someone developed off of Cassini .. . Answer : Start URL has to be a fully qualified URL and is not really used that often . It s meant for testing web-services by opening a page that will call into the service but isn t part of the application itself . If you re just looking to start on a certain page of your application which it sounds like you want then use the Specific Page field and enter your relative URL . Here s the doc page on project start options . http : msdn.microsoft.com en-us library aa983445.aspx", "Question : Consider an ASP.NET MVC 2 project with VS 2010 . The goal is to set the start URL on run debug using VS s built-in Cassini web server . Entering the URL as I want to be loaded in the typical valid format controller action VS 2010 gives this exception . alt text http : i.imgur.com zq7gC.png .. . .. . Tried Remedies : .. . .. . starting the URL with and without a slash .. . ending the URL with and without a slash .. . .. . Question : How can you specify the start URL for an MVC 2 project Technologies : .. . .. . Visual Studio 2010 .. . ASP.NET MVC 2 .. . .. . Resolution : I was using the wrong field in the startup options . What was needed was the Specific Page field with the relative URL and not Start URL . Comment : +1 good question.. . Comment : For Cassini did you mean the ASP.NET standalone dev server or the open-source Cassini web server sample or the server that someone developed off of Cassini .. . Answer : I have just removed the files with .user extension in my web project and the solution map and the problem is solved now . Try to close your solution in Visual Studio and take a backup of files you remove first .", "Question : MS Cassini Development Web Server is a nice product that executes web requests in a similar way that IIS7 does . Every request event for static content goes through the same .Net pipeline without exception . All custom HttpModule can handle any request . But sometimes you don t want these modules to execute for certain content most often static content . In this regard MS Cassini doesn t read obey system.webServer web.config settings like IIS7 does . I m particularly interested in these settings . Does UltiDev s Cassini http : www.ultidev.com products Cassini index.htm a separate payable product upgraded from MS Cassini web server read these settings and execute as the web.config tells it to .. . Answer : My company makes a product called the Neokernel Web Server http : www.neokernel.com that runs ASP.NET web-applications but static content is served without using the ASP.NET pipeline . It s a commercial product but a free evaluation license is available .", "Question : I have an ASP.NET website which is running currently on IIS . Now I want to move that site to run on Cassini . What are the advantages of Cassini over IIS What are its disadvantages What are your experiences using Cassini as a production web-server Comment : ulti cassini or the microsoft one Comment : microsoft one.. . .. . Answer : As far as I know you cannot use Cassini in production because it listens for localhost requests only . You will have to modify source code and recompile the webserver by yourself . Another thing is that IIS is built on top of http.sys kernel-level library for maximum performance . I m not familiar with the latest Cassini versions but last time I checked it used slower managed TCP sockets . If your website is not very popular and Cassini has all the features you need why not.. . there is nothing wrong with Cassini . It s simple webserver but it s not the only alternative to IIS . There is Abyss http : www.aprelium.com abyssws UltiDev Cassini http : ultidev.com products Cassini and I think a few other open-source servers with ASP.NET support .", "Question : I made a website in asp.net with .NET 4.5 framework . I was studying about the differences between ASP.NET Development server named Cassini and IIS server . From this question http : stackoverflow.com questions 281667 asp-net-development-server-or-localhost-iis I found out that IIS server is better than Cassini for my purpose but I don t know how to check the default server of my website . In the property page of the solution under Start Options there are only two options under server . First is Use default server and second one is grayed out Use custom server . This question http : stackoverflow.com questions 8392268 how-do-you-change-an-asp-net-website-to-use-cassini-server is very close to my doubt but not properly answered . The exact choices between Cassini and IIS server appears under WebApplication project s properties NOT under WebSites . I opened my IIS manager and when I tried to expand Default Web Site error came Could not find a part of the path C : inetpub wwwroot . .. . .. . How to know my default server and change it Comment : Open project settings and switch to Web tab . Comment : Project settings You meant to say Project Properties .. . Answer : The default server are the APO.NET Development server Cassini but you can change that to either an IIS server or some other custom web server . You make these changes in your web project . You can also set the option Use IIS Express for new file-based web sites and projects in : Tools - Options - Projects Solutions - Web Projects . Comment : that option you mentioned was already checked in the Tools- .. . - Web Projects . Does that mean my website is running on a IIS server Because I am able to see a static port-number after localhost in the URL", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : I have run into the following limitations with the asp.net dev server : .. . .. . 1 . does not support virtual dirs . If you need them in your app IIS seems to be your only choice .. . .. . 2 . Classic asp pages dont run in dev server . So if you have a mixed web app like I have at my client right now IIS seems to be the solution .. . .. . 3 . If you need an admin UI to configure settings IIS works better .. . .. . Of course IIS requires that you be a local admin .", "Question : The server needs to be installed on Windows XP and has to host an ASP .NET 2.0 + ASP .NET AJAX 1.0 based web application . What is the simultaneous connection limit as opposed to 40 in IIS on XP .. . .. . Are there any other limitations short-comings that I need to be aware of .. . Answer : There are several problems with Cassini most common listed problems are a limit on the maximum concurrent connections and a lack of SSL support . There are also security problems stemming from how Cassini runs in a priveleged account so if an application served by Cassini is compromised the attacker gains control of the entire system . If you need to host an intranet application these issues probably aren t a big deal . However another feature lacking in Cassini is logging which I think is important even for intranet applications . This devx article http : www.devx.com dotnet Article 11711 1954 discusses how to implement your own logging by extending the Cassini source code yourself but doing so introduces other problems if it s not done properly . Comet Way the company I work for makes a product called the Neokernel Web Server http : www.neokernel.com that is a secure professional ASP.NET enabled web server designed for embedding in .NET applications . Like Cassini the Neokernel runs any ASP.NET web application that works under IIS and it addresses the above problems . It has features for handling other issues with embedding a web server in your application for instance starting stopping the server programmatically and APIs for extending the server with your own request processing code . It is not based on the Cassini source code . Maximum concurrent connections and a variety of other parameters can be specified via XML configuration-files . The Neokernel Web Server is a commercial product but a free evaluation license is available .", "Question : Currently our dev team set up all the websites they re working on in IIS on their local machine . We re thinking of switching to using the built-in ASP.NET development server instead . Is this a good idea What are the pros cons of using the ASP.NET dev Server Are there any gotchas we should be aware of Thanks . NB : Running on Win XP IIS 5 VS2005 .. . .. . Edit : .. . .. . Didn t realise it was called Cassini. . More answers for Cassini v IIS here http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis . Comment : Cassini was the old name when it was still in development . Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX Comment : I am leaving this link over here so that it may be helpful for anybody in future as it outlines the differences - asp.net web-forms tutorials deployment http : www.asp.net web-forms tutorials deployment deploying-web-site-projects core-differences-between-iis-and-the-asp-net-development-server-cs .. . Answer : In VS12 the development server is way slow takes a few seconds to download a 2kbyte file . This did not happen in vs10 . When you have a bunch of jquery files and css this is a real problem . Also every page requeries all the css js files . Very very slow regression-testing . Comment : I ve never noticed any such delays . There must be something wrong with your installation or your browser settings . I remember something strange happening with Firefox and using either localhost or 127.0.0.1 but I don t remember what it was and what fixed it", "Question : I have an ASP.NET website which is running currently on IIS . Now I want to move that site to run on Cassini . What are the advantages of Cassini over IIS What are its disadvantages What are your experiences using Cassini as a production web-server Comment : ulti cassini or the microsoft one Comment : microsoft one.. . .. . Answer : There is a good comparison of Cassini and IIS here at StackOverflow http : stackoverflow.com questions 103785 what-are-the-disadvantages-of-using-cassini-instead-of-iis" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
avrdude@eeprom@108
avrdude -- avrdude is used in development for atmel avr microcontrollers to access the contents of the rom @placeholder memories on the target platforms .
{ "confidence": [ 50.70896530151367, 46.29212188720703, 46.29212188720703, 46.05756378173828, 44.422508239746094, 42.80226516723633, 40.68318557739258, 39.21088409423828, 39.21088409423828, 39.10130310058594, 38.51044845581055, 38.51044845581055, 37.41972732543945, 37.28202438354492, 37.28202438354492, 37.28202438354492, 36.711360931396484, 36.711360931396484, 34.65681457519531, 34.048255920410156, 33.929107666015625, 32.70068359375, 31.22838592529297, 31.125232696533203, 31.125232696533203, 31.125232696533203, 29.896808624267578, 29.595226287841797, 27.984786987304688, 27.984786987304688, 27.984786987304688, 27.984786987304688, 27.984786987304688, 27.454870223999023, 26.756362915039062, 26.10378646850586, 25.54084014892578, 25.2840633392334, 24.575212478637695, 24.188875198364258, 23.34678840637207, 23.34678840637207, 23.318336486816406, 22.960451126098633, 22.960451126098633, 22.813709259033203, 22.503368377685547, 22.239696502685547, 21.049274444580078, 20.961368560791016, 20.961368560791016, 20.961368560791016, 20.857872009277344, 19.73294448852539, 19.73294448852539, 19.73294448852539, 19.187393188476562, 18.599273681640625, 18.26064682006836, 18.26064682006836, 17.60605239868164, 17.30177879333496, 17.15966796875, 16.935306549072266, 16.389339447021484, 16.073354721069336, 15.653924942016602, 15.411027908325195, 14.792276382446289, 14.699719429016113, 14.007055282592773, 12.460057258605957, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434, 12.159361839294434 ], "content": [ "I m having a problem with AVRDUDE http : www.nongnu.org avrdude .", "where your AVRDUDE is located .", "Step 5 : Open AVRDUDE .", "avrdude : erasing chip avrdude : reading input file led.hex avrdude : input file led.hex auto detected as Intel Hex avrdude : writing flash 214 bytes : Writing 100 0.04s", "Start - cmd - go to AVRDUDE location .", "I am uploading the file from my mac and I get : avrdude : AVR device initialized and ready to accept instructions Reading 100 0.00s avrdude : Device signature 0x1e950f avrdude : NOTE : FLASH memory has been specified an erase cycle will be performed To disable this feature specify the -D option .", "Look up avrdude in Google to learn about the options .", "avrdude is not in the current directory nor in the search path .", "So how can I add path of avrdude", "Download the Windows-Avrdude version : http : www.mikrocontroller.net attachment 69851 avrdude-5.10.zip Extract the avrdude.exe files avrdude.conf and avrdude.exe anywhere in your directories .", "I am using AVRDUDE 6.1 on Windows 7 64-bit .", "Is there some way to enable lock bits by compiling the sketch into Hex and then uploading it with avrdude", "From this point no command gives any output except .. . .. . This gives me the impression that something happens after avrdude connects which is resetting the connection and taking the device out of the avrdude : AVR device initialized and ready to accept instructions state .", "Why aren t you just using avrdude from the Linux side", "So am exploring the ideal -c parameters in avrdude now .", "The page you refer to has the instructions for connecting to an Arduino board with avrdude .", "You should find something like this : .. . .. . avrdude -p attiny2313 -P com1 -c sajat U flash : w : 2313.hex .. . .. . .. . Copy it and paste it into AVRDUDE with right-click and insert .", "My previous question Android cannot talk to Arduino using AVRDUDE http : stackoverflow.com questions 15596376 android-cannot-talk-to-arduino-using-avrdude 15596858 noredirect 1 15596858 has been resolved .", "After you upload and test your Sketch using the Arduino IDE you should be able to lock out access to the code with the following Avrdude command .", "As a side note you could use this toolchain file for making CMake use the avr-gcc cross-compiler : .. . .. . Since arduino uses avr-gcc and avrdude behind the scenes to compile and program the target AVR microcontrollers I found some interesting directions such as AVR Tutorial http : www.micahcarrick.com tutorials avr-microcontroller-tutorial getting-started.html Programming Arduino Uno in pure C http : balau82.wordpress.com 2011 03 29 programming-arduino-uno-in-pure-c and Program Arduino with AVR-GCC http : www.javiervalcarce.eu wiki Program Arduino with AVR-GCC but I still don t know how to add a button on Kdevelop s interface to call avrdude in order to upload the compiled binary to the microcontrollers flash-memory .", "I have been able to flash using avrdude and the dev ttyACM file that is created using the CDC-ACM driver .", "I use WinAVR which uses avrdude the relevant fields in makefile are given as Atmega32 for processor port as usb and programmer as stk200 .", "So can any one tell me why my avrdude is not working in this code .", "It is possible to write the firmware onto the chip but avrdude doesn t get any response from it when he wants to program my actual controller. .", "The Makefile I m using : .. . .. . The source compiles fine but during the upload-phase avrdude is complaining : .. . .. . I think this is a simple matter of having the flags set-up wrongly .", "avrdude -c usbtiny -p m328p -U lock : w : 0x00 : m -u .. . .. . You might need to change the -c or -p options .", "You can build the hardware using another Arduino http : arduino.cc en Tutorial ArduinoISP .UxOpLkt9TWw use avrisp as the ISP interface device ID in avrdude .", "The following lines saved my day : .. . .. . It sets the Atmega8 to 8MHz and gives it 64ms to spin up that frequency . .. . .. . Here is an excerpt of the avrdude manpage : .. . .. . Additionally I want to recommend AVR Fuse Calculator for Android - it seems to be a very useful tool for microcontroller-programmers .", "I can t upload to the device for a similar looking reason the output from attempting to upload is : .. . .. . As you can see - the issue is not that the driver isn t installed or that avrdude can t see the device but simply that the connection seems to die as soon as it is established .", "I went into the same problem avrdude -p atmega1284p -P usb -c avrisp2 -U lfuse : w : 0x62 : m -U hfuse : w : 0xd9 : m -B 12 this awnswer did not resolve the issue any pointers", "This is my command : C : avrdude-5.11-Patch7610-win32 avrdude.exe .. . .. . and my argument is : -c usbasp -p atmega168 -U flash : w : ProjectDir Debug ItemFileName .hex .. . .. . I get the same error with command-line mode .", "I am looking for either a way to restore the dev ttyACM file or allow avrdude to use the dev bus usb file in order to flash a new hex file onto the board .", "I do however get the following error : .. . .. . avrdude : ser open : can t set attributes for device dev bus usb 002 002 : Inappropriate ioctl for device ioctl TIOCMGET : Bad file desriptor", "I d like to mention that the device I m talking about in this question works fine using avrdude on a linux machine the issue appears to be with the OSX driver for the CH340g .. . .. . I ve installed the latest CH34xx driver from www.wch.cn .. . .. . The device appears to be recognised as dev tty.wchusbserial1420 .. . .. . I can connect to the device using avrdude and enter terminal mode or try to upload however working with the device seems very erratic .", "It worked with avrdude -p atmega32 -P avrdoper -c stk500 -U flash : w : main.hex There was no mention on how to use this with our own makefile actually I did not install their packages and go through the master makefile provided .", "Step 6 : Prepare your target AVR for programing connect it to the ISP programmer power etc .", "The problem isn t that I can t reach the Atmel I actually want to program. . the problem is the Atmel on the ISP .", "I am trying to run avrdude in C application in visual-studio-2010 and taking its output in a RichTextox . Here is my code : - .. . .. . This code doesn t show any thing in RichTextBox .", "- I initially thought the same but I think the device must be working as on a few different linux machines it works fine i can connect to it using avrdude or the Arduino IDE and upload sketches or use terminal mode without the L light coming back on", "It does not even attempt to write the hex file to the AVR .", "Your error results from the mistaken -P usb in your command : .. . .. . avrdude -p atmega32 -P usb -c stk500v2 -U flash : w : main.hex .. . .. . Do not specity usb as a port when using a USB-serial connected programmer or bootloader because downstream of the operating-system driver these are not treated as USB devices but rather as serial ports .", ".. . .. . The alternate solution you propose in comments of using -P avrdoper leverages the fact that your specific programmer offers an alternate interface which is not a USB-serial device in the eyes of the host operating-system but instead a custom USB protocol which at least some versions of avrdude know how to talk .", "and with atprogram or atmel studio it is working fine .", "What AVR programmer do you use", "I use the avr mkll or the isp programmer", "I have a problem trying to integrate USBasp with avr studio .", "It comes as part of the AVR Studio installation .", "yes drivers are already installed with atmel studio .", "When i enter terminal mode using avrdude -t the tx and rx lights flash indicating the device is connected and working I get feedback from the UI .. . .. . and if I type dump flash or some command during the connection stage while tx and rx are flashing and hit enter as soon as the prompt appears the command will execute giving output like this : .. . .. . however very shortly after the prompt appears the L light comes back on .", "Step 4 : Rename the hex file you want to burn to your AVR to 2313.hex myhex to burn.hex - 2313.hex .", "If you are sure that your ISP and your AVR are communicating at the correct speed then the error might be somewhere else .", "Thanks to http : steve.kargs.net bacnet avr-isp-mkii-on-ubuntu-hardy which provided files that only needed a little updating .", "You can read-out flash from an AVR via the ISP http : www.atmel.com images doc0943.pdf if it has not been disabled if you have suitable hardware software http : www.ladyada.net learn avr avrdude.html .", "I went to the webt site of avr-doper and found this relevant info which worked for me .", "I was wondering how to upload a program I wrote using AVR Studio 4 to an ATtiny85 .", "I have compiled successfully in AVR Studio 4 and am now wondering how to upload to an Attiny85 .", "Step 3 : Burn this into the target device with WinAVR .", "Now in AVR Studio create a new tool under external tools don t know exactly if it is called external tools and call it ATtiny85 .", "I am using win-avr with eclipse to build and debug my project with ATxmega256a3bu devie .", "I use avr-g++ to compile and the code is spread out between several files .", "Notice that once you have done this your JTAGICE3 won t be visible to Atmel Studio anymore unless you uninstall the libusb filter using the same utility .", "The target is ATtiny2313 http : www.atmel.com devices ATTINY2313.aspx with an external 12 MHz clock .", "I used dev bus usb 002 002 while I should have used ttyACM0 .", "What pins of ch340 are used for driving reset", "Last time I used my AVRISP2 it worked fine .", "I just figured out that I have compiled and programmed my AT32UC3B0512 project using the AT32UC3B0256 as target device .", "That is exactly what is happening I used ubuntu 14.04 and it detected it and worked fine using Arduino ide .", "You use lower target then you have .. . so it just limits the size of your program more then you can use in real .", "If you need to go back and forth between avArICE and Atmel Studio you ll have to repeat this cycle over and over sorry.. . .. . .. . Another problem is that JTAGICE3 is not supported at least until avarice 2.13 which is the latest at the time I m writing this .", "I used the following udev rules file to get it working on Fedora 19 https : en.wikipedia.org wiki List of Fedora releases Fedora 19 : .. . .. . As you can see some minor things are different from what is suggested above .", "The only thing you have to be careful with UC3 chips are the pin incompatibility between package and series .. . .. . for example TQFP is much different then BGA .. . .. . also the same package with different pin count is incompatible .. . also you can not change UC3A0 for UC3A3 .. . .. . the last 2 3 digits are only the EEPROM size .. . and mostly does not affect SW HW compatibility .. . .. . Note .. . .. . @SergioFormiggini is right the AT32UC3B0256 does not have DAC .. . .. . it is the first time I see a difference in HW config of a chip with different memory size only on Atmel chips .. . Unless they also changed the memory map and or GPIO mappings you should be fine", "The goal is to enable software development in pure C C++ or regular C++ using arduino libraries as well this answer http : stackoverflow.com a 16365360 1007502 helps a lot in making this possible bypassing arduino s artificial limitations imposed to make it easy for begginers .", "I ve been unable to find any reference to a similar error using google and i ve tried all the obvious stuff re-installing drivers different version of the driver etc", "It could be caused be a damaged Arduino .", "I ve had a similar issue once where I could program the Arduino if I linked it to another one but not through its own serial interface .", "But I don t remember the details .", "Given the specificity of your question you might get better answers on arduino.stackexchange.com http : arduino.stackexchange.com .", "It might even be off-topic for Stack Overflow .", "Thanks for the reply", "does it use an FTDI chip for USB Serial communication", "If so is it a legit FTDI chip", "I m having a similar problem with my custom PCB .", "The CH340G driver loads fine I can see the serial-port but it conks out on me after sending several bytes of data at any baud-rate .", "I wonder if it needs to have other pins connected on my PCB .", "Under windows I can use it just fine without any of the flow-control pins routed .", "Have you tried it under Windows yet", "It seems to be an issue with the ch340g driver", "You may have a hardware issue .", "On OSX it may not be resetting in a proper way so bootloader not started and you receive programmer is not-responding error .", "To fix you need improve your hardware by changing reset circuit .", "With CH340 reset is driven by RTS and DTR pins .", "This also mean that you may try to look at your serial-port settings and enable flow-control .", "Do you know if it s a problem for the RTS and DTR pins to be floating", "All of the schematics I have seen so far online don t use them .", "But I wonder if that s what s causing my problem where the driver stops receiving transmitting data after several characters .", "And what MCU", "I m using a PICAXE processor .", "The only pins I have connected to the CH340G are TX and RX .", "Everything else is either floating or connected to components only needed by the CH340G like the crystal and caps .", "There isn t a reset ." ] }
{ "confidence": [ 66.48714447021484, 64.83697509765625, 59.88597106933594, 58.79164123535156, 56.52116394042969, 52.84311294555664, 50.80854797363281, 47.73159408569336, 47.213687896728516, 47.17738723754883, 47.09795379638672, 45.65180969238281, 36.35392379760742, 34.94980239868164, 32.41828536987305, 22.52922821044922, 20.297077178955078, 16.114606857299805, 14.256096839904785, 12.090912818908691 ], "content": [ "Question : I m having a problem with AVRDUDE http : www.nongnu.org avrdude . It does not even attempt to write the hex file to the AVR . In WinAVR http : winavr.sourceforge.net there is no problem . I can t use WinAVR because I ve got only the hex file . avrdude.exe avrdude.conf and the main.hex files are located in the same folder . SAJAT is my version of the DASA programmer different pin assignment and this works fine . The target is ATtiny2313 http : www.atmel.com devices ATTINY2313.aspx with an external 12 MHz clock . I am using AVRDUDE 6.1 on Windows 7 64-bit . Writing fuse bits works . What is the problem here .. . Answer : I ve only uploaded a hex file but I don t know if this will work with EEPROM files as well or not . Step 1 : Create a simple program in WinAVR like an LED toggle . Name it as you like . I named it 2313.c .. . Step 2 : Compile it in WinAVR . Now you have not only the 2313.c file also the 2313.hex and other files as well . Step 3 : Burn this into the target device with WinAVR . This is important for future steps . Don t close the program after burning is completed . Step 4 : Rename the hex file you want to burn to your AVR to 2313.hex myhex to burn.hex - 2313.hex . Copy the renamed hex and overwrite the complied one with it . Now copy all these files makefile .hex .c .. . etc . where your AVRDUDE is located . Step 5 : Open AVRDUDE . Start - cmd - go to AVRDUDE location . Open WinAVR and select the first line at its Output window . You should find something like this : .. . .. . avrdude -p attiny2313 -P com1 -c sajat U flash : w : 2313.hex .. . .. . .. . Copy it and paste it into AVRDUDE with right-click and insert . Step 6 : Prepare your target AVR for programing connect it to the ISP programmer power etc . Press Enter .", "Question : null .. . Answer : I find KDevelop a very good IDE overall and I already have a good experience using it for cross-compiling and debugging software for ARM9 CPUs running embedded Linux . Now that I got some Arduino http : arduino.cc boards for smaller projects I found them a very nice and easy platform but its IDE is far behind Kdevelop in functionality code introspection and so on so I d like to adapt Kdevelop to compile and program arduino boards instead . The goal is to enable software development in pure C C++ or regular C++ using arduino libraries as well this answer http : stackoverflow.com a 16365360 1007502 helps a lot in making this possible bypassing arduino s artificial limitations imposed to make it easy for begginers . I intend to use CMake as the build-system for it integrates well with Kdevelop and allows for easy cross-compilation . As a side note you could use this toolchain file for making CMake use the avr-gcc cross-compiler : .. . .. . Since arduino uses avr-gcc and avrdude behind the scenes to compile and program the target AVR microcontrollers I found some interesting directions such as AVR Tutorial http : www.micahcarrick.com tutorials avr-microcontroller-tutorial getting-started.html Programming Arduino Uno in pure C http : balau82.wordpress.com 2011 03 29 programming-arduino-uno-in-pure-c and Program Arduino with AVR-GCC http : www.javiervalcarce.eu wiki Program Arduino with AVR-GCC but I still don t know how to add a button on Kdevelop s interface to call avrdude in order to upload the compiled binary to the microcontrollers flash-memory . Anyone can help me out doing that Comment : Hmm Although my CMakeLists.txt file is ready and working for my project this might be a good alternative to putting an upload button on KDevelop : github.com queezythegreat arduino-cmake https : github.com queezythegreat arduino-cmake", "Question : My previous question Android cannot talk to Arduino using AVRDUDE http : stackoverflow.com questions 15596376 android-cannot-talk-to-arduino-using-avrdude 15596858 noredirect 1 15596858 has been resolved . I can now connect my Nexus 7 http : en.wikipedia.org wiki Nexus 7 to my Arduino Uno . The full command I am running is this : .. . .. . Here I am trying to put the hex file on the Arduino . I do however get the following error : .. . .. . avrdude : ser open : can t set attributes for device dev bus usb 002 002 : Inappropriate ioctl for device ioctl TIOCMGET : Bad file desriptor Comment : I am uploading the file from my mac and I get : avrdude : AVR device initialized and ready to accept instructions Reading 100 0.00s avrdude : Device signature 0x1e950f avrdude : NOTE : FLASH memory has been specified an erase cycle will be performed To disable this feature specify the -D option . avrdude : erasing chip avrdude : reading input file led.hex avrdude : input file led.hex auto detected as Intel Hex avrdude : writing flash 214 bytes : Writing 100 0.04s Comment : On Android I upload exactly the same file so the led.hex file itself is 100 correct . .. . Answer : It turns out I was using the wrong port . I used dev bus usb 002 002 while I should have used ttyACM0 . Comment : How to know tty -like name for dev bus usb XXX YYY device name Comment : You saved my day .. .", "Question : SOLUTION : See answer below .. . .. . Well. . I ve been searching on the web in many corners. . but I could not find a solution to my problem . Last time I used my AVRISP2 it worked fine . Now I get the following message when I try to write my program on the uC : .. . .. . I found many posts on the internet but there weren t any solutions . Does anyone know what the problem might could be I already checked the pins I updated the firmware of the ISP blinkdemo works . Thank you for any hints. . Comment : Are you sure the baudrate is correct Comment : The problem isn t that I can t reach the Atmel I actually want to program. . the problem is the Atmel on the ISP . It is possible to write the firmware onto the chip but avrdude doesn t get any response from it when he wants to program my actual controller. . .. . Answer : It took some friends of mine and me a lot of time but after hours of searching trying and debugging we were able to fix the problem . I hope this helps other people who got the same problem to solve it . The problem was that the ISP in my case the USB-Prog 3.3 was talking too fast to my Atmega8 which was only running at 1MHz speed . So there are two possible solutions : .. . .. . slow down the speed of the ISP .. . speed up the speed of the Atmega8 .. . .. . I red somewhere that the ISP must not be faster than 1 4 of the speed of the underlaying microcontroller . The following lines saved my day : .. . .. . It sets the Atmega8 to 8MHz and gives it 64ms to spin up that frequency . .. . .. . Here is an excerpt of the avrdude manpage : .. . .. . Additionally I want to recommend AVR Fuse Calculator for Android - it seems to be a very useful tool for microcontroller-programmers . Comment : Maybe mark the answer as accepted so that everyone knows that the issue is resolved Comment : I am going to do that but I have to wait for 2 days until I can mark my own answer as resolved. . Comment : I went into the same problem avrdude -p atmega1284p -P usb -c avrisp2 -U lfuse : w : 0x62 : m -U hfuse : w : 0xd9 : m -B 12 this awnswer did not resolve the issue any pointers Comment : I m afraid that I am not able to help you since I didn t find the time to get deeper into this . If you are sure that your ISP and your AVR are communicating at the correct speed then the error might be somewhere else .", "Question : I was wondering how to upload a program I wrote using AVR Studio 4 to an ATtiny85 . I was basically using this tutorial http : blog.smileymicros.com smileys-workshop-10-moving-beyond-arduino except doing everything with an attiny85 instead of an atmega328 . I got the pins arduino.h from HighLow tech s ATtiny library . I have compiled successfully in AVR Studio 4 and am now wondering how to upload to an Attiny85 . Thanks Comment : The page you refer to has the instructions for connecting to an Arduino board with avrdude . I am assuming you are using an Arduino board The command-line options will be slightly different e.g . the -p option for the processor . Look up avrdude in Google to learn about the options . Comment : I recommend using arduino-tiny https : code.google.com p arduino-tiny over ATtiny since it is more feature-complete . Comment : What AVR programmer do you use Comment : I use the avr mkll or the isp programmer .. . Answer : Download the Windows-Avrdude version : http : www.mikrocontroller.net attachment 69851 avrdude-5.10.zip Extract the avrdude.exe files avrdude.conf and avrdude.exe anywhere in your directories . Now in AVR Studio create a new tool under external tools don t know exactly if it is called external tools and call it ATtiny85 . Paste this line in the command field : C : Path To Your avrdude.exe . Paste this in Arguments : -F -v -pt85 -cstk500v1 -P com7 -b19200 -Uflash : w : ProjectDir Debug ItemFileName .hex : i -C Make sure you replace com7 with your com port you ve attached your avrisp mkii to . Now finish the dialog and your ready to upload . Just click your tool in the Menu", "Question : I am interested in locking my sketch of arduino of atmega328 to make it undownloadable . Is there some way to enable lock bits by compiling the sketch into Hex and then uploading it with avrdude Thank you .. . Answer : After you upload and test your Sketch using the Arduino IDE you should be able to lock out access to the code with the following Avrdude command . avrdude -c usbtiny -p m328p -U lock : w : 0x00 : m -u .. . .. . You might need to change the -c or -p options .", "Question : I use winxp inside a virtualbox with host as ubuntu . The usb programmer connected to host is routed to the guest . I use WinAVR which uses avrdude the relevant fields in makefile are given as Atmega32 for processor port as usb and programmer as stk200 . Still it says cannot find device usb . Please help . Comment : Why aren t you just using avrdude from the Linux side Comment : Yes I tried . Actually I could not get the type of programmer that I got from the vendor . It seems to be created by him . Its a usb to serial converter with vid pid : 0x16C0 0x05DF . Comment : That s sort of a catch-all USB ID don t depend on it to find out what it actually is . Comment : Ok thanks . So am exploring the ideal -c parameters in avrdude now . If you have some pointers pls share . Comment : Do you have a link-to the programmer .. . Answer : Your error results from the mistaken -P usb in your command : .. . .. . avrdude -p atmega32 -P usb -c stk500v2 -U flash : w : main.hex .. . .. . Do not specity usb as a port when using a USB-serial connected programmer or bootloader because downstream of the operating-system driver these are not treated as USB devices but rather as serial ports . When you use such a device determine the com port or device node it is connected to perhaps by seeing which one appears disappears when you connect and disconnect it find out the baud-rate required by your programmer and issue a command such as .. . .. . COM1 or whatever on Windows .. . .. . Linux or OSX .. . .. . The device file on Linux would be something like dev ttyUSB0 or dev ttyACM0 while on OSX it tends to be dev tty.usbmodem or similar . .. . .. . The alternate solution you propose in comments of using -P avrdoper leverages the fact that your specific programmer offers an alternate interface which is not a USB-serial device in the eyes of the host operating-system but instead a custom USB protocol which at least some versions of avrdude know how to talk . Comment : It worked with avrdude -p atmega32 -P avrdoper -c stk500 -U flash : w : main.hex There was no mention on how to use this with our own makefile actually I did not install their packages and go through the master makefile provided . I went to the webt site of avr-doper and found this relevant info which worked for me . Thanks all for the info . Comment : Am giving Chris my vote for hinting that the problem could be around -P arg .", "Question : null .. . Answer : I am trying to run avrdude in C application in visual-studio-2010 and taking its output in a RichTextox . Here is my code : - .. . .. . This code doesn t show any thing in RichTextBox . Now I decide to use pin command . So I replace this line .. . .. . by this .. . .. . This time my code woks great . So can any one tell me why my avrdude is not working in this code . Comment : avrdude is not in the current directory nor in the search path . Comment : So how can I add path of avrdude", "Question : I have a code burned on Arduino uno and I want to get the hex file of this code back How can I make that Comment : Get the datasheet for the part it explains how to read and or write the prom s .. . .. . Answer : You can read-out flash from an AVR via the ISP http : www.atmel.com images doc0943.pdf if it has not been disabled if you have suitable hardware software http : www.ladyada.net learn avr avrdude.html . You can build the hardware using another Arduino http : arduino.cc en Tutorial ArduinoISP .UxOpLkt9TWw use avrisp as the ISP interface device ID in avrdude . Do not disable the power to the AVR s SPI port - this will also disable the ISP interface same pins and lock you out permanently if you don t have a working bootloader to load code to re-enable again", "Question : I d like to mention that the device I m talking about in this question works fine using avrdude on a linux machine the issue appears to be with the OSX driver for the CH340g .. . .. . I ve installed the latest CH34xx driver from www.wch.cn .. . .. . The device appears to be recognised as dev tty.wchusbserial1420 .. . .. . I can connect to the device using avrdude and enter terminal mode or try to upload however working with the device seems very erratic . When i enter terminal mode using avrdude -t the tx and rx lights flash indicating the device is connected and working I get feedback from the UI .. . .. . and if I type dump flash or some command during the connection stage while tx and rx are flashing and hit enter as soon as the prompt appears the command will execute giving output like this : .. . .. . however very shortly after the prompt appears the L light comes back on . From this point no command gives any output except .. . .. . This gives me the impression that something happens after avrdude connects which is resetting the connection and taking the device out of the avrdude : AVR device initialized and ready to accept instructions state . I can t upload to the device for a similar looking reason the output from attempting to upload is : .. . .. . As you can see - the issue is not that the driver isn t installed or that avrdude can t see the device but simply that the connection seems to die as soon as it is established . I ve been unable to find any reference to a similar error using google and i ve tried all the obvious stuff re-installing drivers different version of the driver etc Comment : It could be caused be a damaged Arduino . I ve had a similar issue once where I could program the Arduino if I linked it to another one but not through its own serial interface . But I don t remember the details . Given the specificity of your question you might get better answers on arduino.stackexchange.com http : arduino.stackexchange.com . It might even be off-topic for Stack Overflow . Comment : Thanks for the reply - I initially thought the same but I think the device must be working as on a few different linux machines it works fine i can connect to it using avrdude or the Arduino IDE and upload sketches or use terminal mode without the L light coming back on Comment : does it use an FTDI chip for USB Serial communication If so is it a legit FTDI chip Comment : I m having a similar problem with my custom PCB . The CH340G driver loads fine I can see the serial-port but it conks out on me after sending several bytes of data at any baud-rate . I wonder if it needs to have other pins connected on my PCB . Under windows I can use it just fine without any of the flow-control pins routed . Have you tried it under Windows yet Comment : That is exactly what is happening I used ubuntu 14.04 and it detected it and worked fine using Arduino ide . It seems to be an issue with the ch340g driver .. . Answer : You may have a hardware issue . On OSX it may not be resetting in a proper way so bootloader not started and you receive programmer is not-responding error . To fix you need improve your hardware by changing reset circuit . With CH340 reset is driven by RTS and DTR pins . This also mean that you may try to look at your serial-port settings and enable flow-control . Comment : Do you know if it s a problem for the RTS and DTR pins to be floating All of the schematics I have seen so far online don t use them . But I wonder if that s what s causing my problem where the driver stops receiving transmitting data after several characters . Comment : What pins of ch340 are used for driving reset And what MCU Comment : I m using a PICAXE processor . The only pins I have connected to the CH340G are TX and RX . Everything else is either floating or connected to components only needed by the CH340G like the crystal and caps . There isn t a reset . They have a special protocol where they handshake on the TX RX lines to get the chip programmed . Comment : I have no experience with your processor . This topic marked as Arduino so i suppose you have a bootloader already burnt . This is how it works on standard boards suc as Mega Uno etc . You need attach RTS and CTS through capacitor of 0.1uF to reset pin of the MCU . Look at this page as a starting point jarick.com.ua http : jarick.com.ua D0 B2 D1 81 D0 B5- D0 BE D1 81 D1 82 D0 B0 D0 BB D1 8C D0 BD D0 BE D0 B5 25- D1 81 D1 85 D0 B5 D0 BC D0 B0- D0 BA D0 BB D0 BE D0 BD D0 B0-arduino-uno-r3- D0 BD D0 B0-atmega328- D0 B8-ch340g.html Comment : Thanks yeah I know I m really in the wrong place but due to the absence of any information related to my problem online I am really grasping at straws here . Thanks for the link", "Question : SOLUTION : See answer below .. . .. . Well. . I ve been searching on the web in many corners. . but I could not find a solution to my problem . Last time I used my AVRISP2 it worked fine . Now I get the following message when I try to write my program on the uC : .. . .. . I found many posts on the internet but there weren t any solutions . Does anyone know what the problem might could be I already checked the pins I updated the firmware of the ISP blinkdemo works . Thank you for any hints. . Comment : Are you sure the baudrate is correct Comment : The problem isn t that I can t reach the Atmel I actually want to program. . the problem is the Atmel on the ISP . It is possible to write the firmware onto the chip but avrdude doesn t get any response from it when he wants to program my actual controller. . .. . Answer : First of all I would recommend you to check the microcontroller itself . I ve got the same error message and I found that my Atmega has been damaged . Swapping for the new one fixed the problem .", "Question : I have a problem trying to integrate USBasp with avr studio . I have not been able to solve it yet still get this error : avrdude.exe : invalid file-format in update specifier avrdude.exe : error parsing update operation .. . .. . Could someone help me This is my command : C : avrdude-5.11-Patch7610-win32 avrdude.exe .. . .. . and my argument is : -c usbasp -p atmega168 -U flash : w : ProjectDir Debug ItemFileName .hex .. . .. . I get the same error with command-line mode . Thanks in advance Andrew .. . Answer : For mega168 : .. . .. . USBasp mega168 write .. . .. . -c usbasp -p m168 -U flash : w : ProjectDir Debug TargetName .hex : i .. . .. . USBasp mega168 read .. . .. . -c usbasp -p m168 .. . .. . USBasp mega168 erase .. . .. . -c usbasp -p m168 -B 0.5 -e .. . .. . Your mistake is this : .. . .. . -c usbasp -p atmega168 -U flash : w : ProjectDir Debug ItemFileName .hex", "Question : I m having problems uploading a simple hello world program to my Arduino Mega 2560 . I checked whether it would work when using the IDE and it does . I do not however want to use the IDE . I had to chmod a+rw dev ttyACM0 to make it work by the way . The error is well-known and much discussed on the net . None of the solutions I found so far apply to me though because I m using the makefile rather than the IDE and I m on Linux . The Makefile I m using : .. . .. . The source compiles fine but during the upload-phase avrdude is complaining : .. . .. . I think this is a simple matter of having the flags set-up wrongly . Any ideas .. . Answer : AVRDUDE ARD PROGRAMMER arduino .. . .. . the Arduino MEGA atmega2560 uses a different bootloader than the Uno and needs a different programmer type . Change arduino to wiring or stk500v2", "Question : I have a custom build of AOSP based on kitkat 4.4 . I am controlling an arduino board via Android s USB Host API . I also am running a kernel that supports the CDC-ACM module . I want to be able to flash new hex files onto the board . I have seen ArduinoDroid do this in his app . I have been able to flash using avrdude and the dev ttyACM file that is created using the CDC-ACM driver . However when I grant permission for my app to communicate with the arduino board the dev ttyACM file disappears . Which makes sense because I am now controlling it via Android s USB host api . I am looking for either a way to restore the dev ttyACM file or allow avrdude to use the dev bus usb file in order to flash a new hex file onto the board . It doesn t appear that there is a revokePermission method in the USBManager . The dev ttyACM device file does not appear even after closing the device . I am running the following code to close the device . connection.releaseInterface device.getInterface 1 .. . .. . connection.close .. . .. . I guess my real question is that there a way to get the kernel driver back after releasing the USB connection . Because I am using a custom build of AOSP I do not have google-play and I cannot install ArduinoDroid on the tablet . However I can run my app as a system level app if needed . Comment : I ve tried to call connection.claimInterface device.getInterface 1 false to keep the dev ttyACM0 file around but for some reason the tablet reboots when I try to claim it this way . Comment : The reason for the reboot is because the claimInterface call failed when I passed in false for force . .. . Answer : Ultimately I solved this but it does seem like a bit of a hack . Before taking control of the device on a reboot of the tablet I checked to see if any dev ttyACM files existed . If they did I then checked the sys file system to check to see they were the correct device . I essentially checked the vendor of the usb device and matched it against the known device . Once that was confirmed I knew it was safe to try and upload a new hex file to the device .", "Question : I am using win-avr with eclipse to build and debug my project with ATxmega256a3bu devie . when I tried to debug the code using avarice using following command : .. . .. . it shows the following error .. . .. . how to detect jtagice3 using avarice in windows Comment : Well is the driver installed It comes as part of the AVR Studio installation . Comment : yes drivers are already installed with atmel studio . I can see the Jtagice3 in device manager as a JUNGO device . and with atprogram or atmel studio it is working fine . .. . Answer : If you don t have the libusb filter installed for that device avarice won t be able to find it . You probably already have the Windows libusb port installed if not you can get it at http : libusb-win32.sourceforge.net go to its bin platform path and run install-filter.exe then select your JTAGICE3 device . Notice that once you have done this your JTAGICE3 won t be visible to Atmel Studio anymore unless you uninstall the libusb filter using the same utility . If you need to go back and forth between avArICE and Atmel Studio you ll have to repeat this cycle over and over sorry.. . .. . .. . Another problem is that JTAGICE3 is not supported at least until avarice 2.13 which is the latest at the time I m writing this . I had to download the head sources and build them in cygwin to be able to use it . the flag you re using -mkII is for another model and won t work because their USB IDs are different . Comment : I should also mention that even though there is JTAGICE3 support code in the head sources it is still currently a work in progress and not suitable for production use . You can do some basic things run pause place breakpoints but in my tests I found at least two showstoppers : it frequently quits due to protocol mismatches with GDB and addresses are not matched correctly to source files line numbers .", "Question : I just figured out that I have compiled and programmed my AT32UC3B0512 project using the AT32UC3B0256 as target device . My application seams to work without problems . Is that possible What are the differences between AT32UC3B0512 and AT32UC3B0256 beside flash and ram size Comment : Looking quickly at the datasheet http : www.atmel.com Images doc32059.pdf they seem hw compatible but not in memory dimension as you say and the B0512 has a DAC but the B0256 doesn t have it .. . I think the code may run good .. . Answer : in most cases the program EEPROM is the only difference . You use lower target then you have .. . so it just limits the size of your program more then you can use in real . The functionality is not affected at all tested for quite some time on L0 A0 and A3 series . The only thing you have to be careful with UC3 chips are the pin incompatibility between package and series .. . .. . for example TQFP is much different then BGA .. . .. . also the same package with different pin count is incompatible .. . also you can not change UC3A0 for UC3A3 .. . .. . the last 2 3 digits are only the EEPROM size .. . and mostly does not affect SW HW compatibility .. . .. . Note .. . .. . @SergioFormiggini is right the AT32UC3B0256 does not have DAC .. . .. . it is the first time I see a difference in HW config of a chip with different memory size only on Atmel chips .. . Unless they also changed the memory map and or GPIO mappings you should be fine", "Question : The system sees something is plugged in when I plug and unplug it : .. . .. . AVRISP MKII should rely on cdc-acm : .. . .. . So it should be able to see it just fine and yet I am unable to write to it . Returns .. . Answer : It turns out that Ubuntu will acknowledge that the object is there but not play nicely with it until you fix up some of your udev rules . Thanks to http : steve.kargs.net bacnet avr-isp-mkii-on-ubuntu-hardy which provided files that only needed a little updating . Create new file etc udev avrisp.rules .. . .. . Now create a virtual link-to the file and give it a rule priority .. . .. . Check you re in the dialout group .. . .. . Restart udev .. . .. . Hooray Comment : Thanks This saved me a few hours of messing about today . Comment : Minor error : Restart udev with sudo service udev restart Comment : Thanks . I had the issue on linux mint maybe it can help . In linux mint replace SYSFS with ATTRS Comment : This worked for me on Ubuntu 13.04 Ardiono 1.0.3 together with the SYSFS and ATTR replacement as suggested by @antler Comment : For Lubuntu 13.10 probably Ubuntu 13.10 as well replace SYSFS with ATTRS not ATTR . GROUP can be any groups you are in . In my case i set GROUP plugdev because there is no dialout group .", "Question : I tried to create a CTC timer interrupt on my ATmega32U4 leonardo board . When I continuously check the value of OCF1A I have no problem detecting when the output reaches the desired value however once I move the code into an interrupt the interrupt never triggers . Timer setup : .. . .. . The loop that works : .. . .. . The interrupt that does not work : .. . .. . I must be missing something as from what I have seen in the tutorials the above code should work . One interesting observation here is that if I have both the loop and the interrupt in my code at once if I call sei the LED does not blink as-if the OCF1A register was cleared prematurely . I m pretty sure it is irrelevant in this case but the fuses are as follows : E : CB H : D8 L : FF . I use avr-g++ to compile and the code is spread out between several files . Comment : I find code much easier to read if it uses the BV macro for bitmasks instead of manually shifting 1 . .. . Answer : You have two problems : .. . .. . 1 . You need to make sure main doesn t return even when it s not doing anything except waiting for the interrupt .. . .. . 2 . You need to enable interrupts via sei after setting everything up . Here s a working example I changed the LED port to PB5 because I ve tested this on an Arduino Uno and that already has an LED built-in Comment : Yes I know and I do both of the things You mentioned I simply included only the most relevant part of the code in my question . The problem of the interrupt not triggering still exists and I can see 3 possible sources of it : code makefile or fuses . At this point unless I m missing some weird registry setting the problem is probably not the code and I m not sure if it is even possible to cause such a problem through makefile or fuse settings .", "Question : The system sees something is plugged in when I plug and unplug it : .. . .. . AVRISP MKII should rely on cdc-acm : .. . .. . So it should be able to see it just fine and yet I am unable to write to it . Returns .. . Answer : I used the following udev rules file to get it working on Fedora 19 https : en.wikipedia.org wiki List of Fedora releases Fedora 19 : .. . .. . As you can see some minor things are different from what is suggested above . Also I had to restart the computer . Using udevadm control --reload was not enough .", "Question : The system sees something is plugged in when I plug and unplug it : .. . .. . AVRISP MKII should rely on cdc-acm : .. . .. . So it should be able to see it just fine and yet I am unable to write to it . Returns .. . Answer : For Ubuntu 12.04 there s a minor change that must be carried out to the configuration that Katy posted : .. . .. . All occurrences of SYSFS should be replaced with ATTR .. . .. . Additionally if you re still having problems make sure you have installed all the required dependent libraries . I found that I had to install the uisp package as well . If restarting udev doesn t make a difference unplugging the programmer and plugging it in back in does ." ] }
[ "yes-answer-long", "yes-answer-short" ]
eeprom
UNK_RELATION
kendo-menu@kendo-ui@37
kendo-menu -- the menu ui widget of @placeholder .
{ "confidence": [ 45.47343444824219, 43.3712158203125, 42.73334503173828, 41.66596984863281, 41.30815887451172, 41.26739501953125, 40.991546630859375, 40.904991149902344, 40.701168060302734, 39.54581832885742, 38.511192321777344, 38.04127502441406, 38.009544372558594, 37.99231719970703, 37.99231719970703, 36.750762939453125, 36.39385223388672, 36.22663116455078, 36.012413024902344, 35.97821807861328, 35.97821807861328, 35.97821807861328, 35.88894271850586, 35.857566833496094, 35.283363342285156, 35.12089538574219, 35.098541259765625, 34.766197204589844, 34.766197204589844, 34.766197204589844, 34.72481918334961, 34.33030700683594, 33.52464294433594, 33.44322204589844, 32.73359680175781, 32.579647064208984, 32.19063186645508, 31.802722930908203, 31.743656158447266, 31.643882751464844, 31.461584091186523, 31.461584091186523, 31.43337631225586, 31.41921615600586, 31.305557250976562, 31.305557250976562, 31.2386417388916, 31.00619125366211, 30.477418899536133, 30.32314682006836, 30.32314682006836, 30.117021560668945, 30.08477783203125, 29.778038024902344, 29.771240234375, 29.73966407775879, 29.73966407775879, 29.66049575805664, 29.564306259155273, 29.165985107421875, 29.09363555908203, 29.09363555908203, 29.05427360534668, 28.919879913330078, 28.82846450805664, 28.337522506713867, 28.310636520385742, 27.626232147216797, 27.626232147216797, 27.597436904907227, 27.42818832397461, 27.42818832397461, 27.39676284790039, 27.295555114746094, 27.208959579467773, 26.85681915283203, 26.85681915283203, 26.851633071899414, 26.851633071899414, 26.6556396484375, 26.600444793701172, 26.54722785949707, 26.54722785949707, 25.960786819458008, 25.960786819458008, 25.960786819458008, 25.949460983276367, 25.864917755126953, 25.45509910583496, 25.18484115600586, 25.18484115600586, 25.18484115600586, 25.18484115600586, 25.18484115600586, 25.092914581298828, 25.07982635498047, 25.05069351196289, 25.033966064453125, 25.033966064453125, 24.48885726928711 ], "content": [ "http : docs.telerik.com kendo-ui tutorials asp.net kendo-music-store music-store-web kendo-music-store-web-cart-menu-widget", "Is it possible to have custom XmlSiteMapProvider for Kendo UI Menu", "Kendo Link http : www.kendoui.com forums kendo-ui-web menu menu-select-event-not-firing-in-ie-11-non-compat-mode.aspx", "The example for Kendo Menu documentation here http : docs.telerik.com kendo-ui api javascript ui menu configuration-popupCollision sets the popupCollision property in Javascript .", "No the Kendo UI Menu doesn t support automatic scrolling .", "1 Can the kendo-menu support the use of a combobox for a menu item", "I posted regarding this issue How to use a restricted to list combobox in a kendo-ui menu http : stackoverflow.com questions 25254251 how-to-use-a-restricted-to-list-combobox-in-a-kendo-ui-menu but neglected to post code and was slammed for it .", "We are making use of Kendo UI Grid Kendo Menu in our application .", "bootstrap menu structure : .. . .. . kendo calling its menu", "You guys do the same thing on the kendo site click on products : telerik.com kendo-ui http : www.telerik.com kendo-ui but it looks like your not using the kendo-menu on the kendo site.. .", "here is the code for the kendo-menu control :", "Kendo UI s default menu is great but Bootstrap s menu is awesome .", "After much testing I have found that my menu no longer works due to what appears to be a bug in the kendo-ui menu component .", "Kendo UI Menu doesn t work in IE on Tablets running Windows 8 IE 10 IE 11 .", "I have following html : - .. . .. . DEMO : http : demos.telerik.com kendo-ui menu index", "How can we display the kendo-menu items at the top .", "I m working with the Kendo UI menu widget and would like to only trigger the onSelect event when the last child menu item has been selected : .. . .. . For example let s say I select Business Group menu item below .", "There isn t really a great way with just a Menu widget because for some reason the Menu widget isn t designed to actually track the underlying data items .", "Kendo Menu http : i.stack.imgur.com lugQK.jpg .. . .. . In the above menu after Events it is displaying extra blank .", "This is my menu bar .. . .. . below this menu an using kendo splitter .. . .. .", "I have a horizontal Kendo menu as my main navigation menu .", "Similarly we are not able to select a menu item in the Kendo Menu also .", ".. . .. . An alternative would be to try to put an actual DropDown widget next to the menu maybe float it left next to the menu", "i think you missed some Css or JS .. . .. . above CSS Js are needed for display the menu .. . .. . for more information please find this link .. . .. . http : demos.telerik.com kendo-ui menu right-to-left-support", "Hi how to remove extra space of Kendo menu item displaying at end .", "Here s the HTML code with kendo-menu widget : .. . .. . In my javascript controller code I wire up the event : .. . .. . However it fires every time I click any of the menu items .", "Basically with the kendo-menu item I m shooting to have links which function exactly like what this does .", "The Kendo UI Menu doesn t support binding to a remote data source for the time being .", "According to Menu Builder ASP.NET MVC documentation http : docs.telerik.com kendo-ui api aspnet-mvc kendo.mvc.ui.fluent menubuilder there is not such property .", "http : docs.telerik.com KENDO-UI controls navigation menu how-to using-fontawesome-icons", "I ve a kendo-menu to dynamically enable or disable the kendo-grid columns .", "How are you going to make the kendo-menu responsive", "How can this property be set using Asp.Net MVC HtmlHelpers for Kendo Menu", "http : demos.telerik.com kendo-ui musicstore .. . .. . Documentation for the implementation of that custom shopping cart widget .", "The kendo-menu was extremely simple to bind to a our self referencing model I just have to figure out how to get it to make an Ajax.ActionLink call .", "You can use the openOnClick http : docs.telerik.com kendo-ui api javascript ui menu configuration-openOnClick method .", "Adding the checkbox to the menu item seems to lead to kendo firing the event for the menu click and the checkbox check .", "I have been trying to solve this myself and have come to the conclusion that you need to either use the Kendo menu or Bootstrap menu .", "I am trying to customize XMLSiteMap for Kendo UI Menu to include more properties other than title controller action area .", "I ve created a jsfiddle here : Kendo menu with combobox menu item http : jsfiddle.net pjtallman rg501upb 7 .. . .. . If I define my kendo-menu as follows : .. . .. . HTML .. . .. . JS .. . .. . .. . .. . I would like to have the first item Fruits which will be rendered as a standard menu item drop down in the above code to be rendered as a combobox restricted to its list of data items and to display the text from whatever list item is selected by the user .", "Users will be able to select a row in the Grid and will be able to select an item in the Kendo Menu .", "Kendo must wire-up the event to both the menu and the checkbox .", "I have kendo-menu @ Html.Kendo .Menu in my web page.When the user reduce the size of web browser user cannot see all the menu items.Can i add scrolling for this menu", "I m binding a mouse click listener to serveral SVG elements and - on a click- trigger the open method of a kendo context menu .", "Here is code I have and the menu displays .", "Our dynamic menu is hiearchical with no limits on levels .", "The requirement is for the menu to function as follows .", "I have been using a template for kendo-menu i need to push the menu items dynamically so i have used a array like called dt .. . .. . now i am having problem in assigning this array dt to the menu item .. . .. . so please suggest me how to assign a array for the kendo menuitem", "Use the following definition : .. . .. . Where menu is the id of the top menu .", "The menu drop down doesn t work .", "The width of the menu was set as 800px in the CSS .", "So when you set openOnClick to true in opposition to default that is mouse over what Kendo UI has to do is intercept the click event on any HTML element on that menu .", "UserMenuItemModel contains a List .. . .. . Adding keywords because I really never found anything like this Kendo Menu Ajax ActionLink hierarchical self-referencing .. . .. . Hope this helps others .", "document .ready function .. . menu .kendoMenu .. . This is using the black theme so the look-and-feel of the menu is derived from there .", "Here is my menu .. . .. .", "How can I add styling htmlattribute to each item while menu bind to web.sitemap .. . .. . web.sitemap .. . .. . Kendo Menu Binding to web.sitemap .. . .. . Thanks", "http : stackoverflow.com questions 17311120 how-do-i-make-a-kendo-menu-open-on-hover-not-on-click to make menu items with children automatically drop down .", "I guess the problems is open and close function are not working if the parent of the kendo-menu is with style display : none .", "I have kendo-menu @ Html.Kendo .Menu in my web page.When the user reduce the size of web browser user cannot see all the menu items.How to solve this problem.Pleases reply", ".. . .. . Another alternative would be to make a completely custom widget which could then output elements with the same element structure and css classes as the Menu widget but have it actually bound to a DataSource .", "The menu works in Google chrome on the same Windows tablet .", "Unfortunately that just shifted the whole menu to the left .", "Not sure if Kendo API supports triggering select item but I was able to achieve click the menu items with keyboard-shortcuts using JQuery .", "The kendo-menu cannot do it directly but you can use the change method of a data source and create the menu from this function try this : .. . .. . Note : It is a draft create another function to iterate over sub sub sub items .", "That is a pretty general explanation I know but I m thinking of something similar to what was done for the custom shopping cart menu in the old no-longer-supported Music Store sample which you can find here : .. . .. . Kendo Music Store Sample see the shopping cart item on the right of the menu .", "If you just have a dropdown of 3 items you might want to use a Kendo DropDown widget instead .", "Define the following CSS style : .. . .. . Where menu is the id of the HTML element containing the menu .", "The problem is : the context menu closes by default on mouse down .", "an SVG element and if the context menu is already open .", "I am trying to center-align the text of kendo-menu as per the div it contains .", "and go through the pain of making the CSS look the same as the menu .", "The reasons why your menu dint work were .. . .. . 1 .", "For anybody else this is a fully dynamic menu built using a hierarchical self-referencing model .", "I found some workaround : .. . Before call .close on kendo-menu the following line should be added : .. . .. . http : dojo.telerik.com IyAFA 6", "i have a kendo-menu that is bound to my form by the onclick event like this .. . .. . and in my form i have a hiden field called FormmMode .. . .. . i want to set my field form FormMode with the selected menuitem text New or Edit .", "I have a Kendo menu as my main menu with config starting like .. . .. . Finding no other config option I thought making OpenOnClick false would make some magical OpenonHover true .", "It then looks to see if the url has properties as per the location.search http : www.w3schools.com jsref prop loc search.asp and if it does then it removes the kendo class from the menu first menu item which is not the one passing anything .", "I have a menu similar to the following : .. . .. . And i just want to change the color of just the top level menu items Sport and Showbiz .", "If the menu is already open I listening to the activate deactivate events to check if the menu is open and the user clicks on the same element it shall close .", "My menu is not showing items when I click on the setup menu item .", "Upgrade to a newer version of Kendo .", "If Apple is selected the menu would appear as : .. . .. . Apple v Site Location .. . .. . If the user clicks the dropdown and selects Banana the menu would appear as : .. . .. . Banana v Items Inventory .. . .. . --Pat", "Menu items don t get a uid back to their data item they were created from since it doesn t use a DataSource .. . There is no way to provide a template to render a menu item from .", "Menus expect that what you have inside is a menu option not a full HTML .", "I want to display my menu at center of the page horizontal align center .", "May be this will not happen if you define the button element as a arget of the menu .", "Here is a pic of the menu : .. . .. .", "That was a bug - and here is the fix https : github.com telerik kendo-ui-core issues 79 .", "@user2109254 just about You guys do the same thing on the kendo site just to let you know that I have nothing to do neither with Telerik nor with Kendo UI .", "the fiddle link : http : jsfiddle.net Naidu526 gX2tM .. . .. . How can i display the menu on top .", "The menu datasource is dynamic so I don t think I can specify this in the html .", "The parent pf menuUL must be center aligned using text-align : center so that the menu is in the middle .", "I did make an edit to my original post to display the parent of divMenuContentHolder just in case that it may be affecting the menu .", "just to add more info adding width : 800px to menuContainer put the menu in the center but added the extra unnecessary width .", "If you remove class hidden from div wrapper see how the menu is opened - looks OK . Then remove li from .open the menu is not opened .", "Not sure I understand what you re trying to do but you can influence whether the menu closes when you click outside of the menu like this : .. . .. . demo http : dojo.telerik.com @lhoeppner uVUkE", "I have defined the kendo-window in the following fiddle .", "You can open menu on hover .", "However the menu text is not center aligned .", "Now the menu doesn t pop-up even after setting a higher z-index on the menu element ." ] }
{ "confidence": [ 55.75537872314453, 50.10462188720703, 50.10462188720703, 48.337120056152344, 47.54106140136719, 45.4432373046875, 44.208744049072266, 44.165428161621094, 44.121864318847656, 43.960174560546875, 42.42411804199219, 42.25096893310547, 42.151336669921875, 41.862998962402344, 41.862998962402344, 40.45852279663086, 39.6180419921875, 39.198394775390625, 39.049503326416016, 38.963619232177734 ], "content": [ "Question : I posted regarding this issue How to use a restricted to list combobox in a kendo-ui menu http : stackoverflow.com questions 25254251 how-to-use-a-restricted-to-list-combobox-in-a-kendo-ui-menu but neglected to post code and was slammed for it . So I am going to try to explain my questions clearly here . 1 Can the kendo-menu support the use of a combobox for a menu item 2 If the answer is yes to 1 then I have a question as to how to do it . I ve created a jsfiddle here : Kendo menu with combobox menu item http : jsfiddle.net pjtallman rg501upb 7 .. . .. . If I define my kendo-menu as follows : .. . .. . HTML .. . .. . JS .. . .. . .. . .. . I would like to have the first item Fruits which will be rendered as a standard menu item drop down in the above code to be rendered as a combobox restricted to its list of data items and to display the text from whatever list item is selected by the user . The menu datasource is dynamic so I don t think I can specify this in the html . But I have searched the kendo forums and demos and stackoverflow and can t find any relevant examples . The requirement is for the menu to function as follows . If Apple is selected the menu would appear as : .. . .. . Apple v Site Location .. . .. . If the user clicks the dropdown and selects Banana the menu would appear as : .. . .. . Banana v Items Inventory .. . .. . --Pat .. . Answer : There isn t really a great way with just a Menu widget because for some reason the Menu widget isn t designed to actually track the underlying data items . The passed in dataSource isn t converted to a real kendo.data.DataSource like every other widget . Menu items don t get a uid back to their data item they were created from since it doesn t use a DataSource .. . There is no way to provide a template to render a menu item from . However you can sort of brute-force the change of the element text with jQuery like this updated jsFiddle http : jsfiddle.net rg501upb 8 . .. . .. . An alternative would be to try to put an actual DropDown widget next to the menu maybe float it left next to the menu and go through the pain of making the CSS look the same as the menu . .. . .. . Another alternative would be to make a completely custom widget which could then output elements with the same element structure and css classes as the Menu widget but have it actually bound to a DataSource . You could then update the name of the parent item in the datasource to the selected item s text and have the UI element update to match with MVVM . That is a pretty general explanation I know but I m thinking of something similar to what was done for the custom shopping cart menu in the old no-longer-supported Music Store sample which you can find here : .. . .. . Kendo Music Store Sample see the shopping cart item on the right of the menu . http : demos.telerik.com kendo-ui musicstore .. . .. . Documentation for the implementation of that custom shopping cart widget . http : docs.telerik.com kendo-ui tutorials asp.net kendo-music-store music-store-web kendo-music-store-web-cart-menu-widget", "Question : I m working with the Kendo UI menu widget and would like to only trigger the onSelect event when the last child menu item has been selected : .. . .. . For example let s say I select Business Group menu item below . I then want to trigger additional functions . However if I click on Report I don t want to do anything . It s probably something easy like checking for last child but I m still trying to figure that out . Here s the HTML code with kendo-menu widget : .. . .. . In my javascript controller code I wire up the event : .. . .. . However it fires every time I click any of the menu items . I d like to react on the bottom most item only . .. . Answer : I think you can simply search for ul descendants : .. . .. . demo http : jsfiddle.net lhoeppner TZwK5 4", "Question : I m working with the Kendo UI menu widget and would like to only trigger the onSelect event when the last child menu item has been selected : .. . .. . For example let s say I select Business Group menu item below . I then want to trigger additional functions . However if I click on Report I don t want to do anything . It s probably something easy like checking for last child but I m still trying to figure that out . Here s the HTML code with kendo-menu widget : .. . .. . In my javascript controller code I wire up the event : .. . .. . However it fires every time I click any of the menu items . I d like to react on the bottom most item only . .. . Answer : I ended up using .className.match which worked well :", "Question : Kendo UI Menu doesn t work in IE on Tablets running Windows 8 IE 10 IE 11 . The menu drop down doesn t work . The menu works in Google chrome on the same Windows tablet . Comment : if you hit F12 in chrome to show dev tools do you got some error red notitication in bottom right corner .. . Answer : Upgrade to a newer version of Kendo . They fixed this in their Q2 2013 release 2013.2.918 . Kendo Link http : www.kendoui.com forums kendo-ui-web menu menu-select-event-not-firing-in-ie-11-non-compat-mode.aspx", "Question : I m working with the Kendo UI menu widget and would like to only trigger the onSelect event when the last child menu item has been selected : .. . .. . For example let s say I select Business Group menu item below . I then want to trigger additional functions . However if I click on Report I don t want to do anything . It s probably something easy like checking for last child but I m still trying to figure that out . Here s the HTML code with kendo-menu widget : .. . .. . In my javascript controller code I wire up the event : .. . .. . However it fires every time I click any of the menu items . I d like to react on the bottom most item only . .. . Answer : I dont know how you generate your markup but you could add class selector for those which can be clicked . JavaScript : .. . .. . Markup : Comment : great I ll try it this morning . I ended up using if e.item.firstChild.text e.item.firstChild.text which in this case means I have reached the bottom . But my code doesn t seem like a clean solution . Comment : for some reason the item.hasClass selectable always evaluates to FALSE .", "Question : kendoMenu is not a function Other functions like kendobutton and kendotabstrip are working but kendoMenu is not working.Please give solution for this Is there is any JS or CSS file is missing from this code I have following html : - .. . .. . DEMO : http : demos.telerik.com kendo-ui menu index Comment : no error for me using this script src http : cdn.kendostatic.com 2015.1.429 js kendo.all.min.js script .. . Answer : i think you missed some Css or JS .. . .. . above CSS Js are needed for display the menu .. . .. . for more information please find this link .. . .. . http : demos.telerik.com kendo-ui menu right-to-left-support", "Question : After much testing I have found that my menu no longer works due to what appears to be a bug in the kendo-ui menu component . This used to work and it no longer does . As we are still in the early phases of the project we are not using nav that much so I don t know when it stopped working . I have created very simple a fiddle that demonstrates the issue . Basically there are two navs next to each other one works and the other doesn t . The only difference being that the one that doesn t work has openOnClick : true and closeOnClick : false . NOTE : I had to set it to open the link in a new window in the fiddle as jsfiddle wouldn t let google load in the iframe so allow popups . Fiddle : http : jsfiddle.net codeowl HLaRx 4 .. . .. . HTML : .. . .. . JavaScript : .. . .. . Please help me to resolve this issue . Here is an example of the nav panel I am trying to create : enter image description here http : i.stack.imgur.com lOaYl.png .. . .. . Regards .. . .. . Scott .. . Answer : Not sure when it stopped working but I would say that current behavior is pretty understandable despite maybe not what you would like . Menus expect that what you have inside is a menu option not a full HTML . So when you set openOnClick to true in opposition to default that is mouse over what Kendo UI has to do is intercept the click event on any HTML element on that menu . As consequence you have that it does not open the URL as you expected . So my question why do you need to define it as you are doing Would be possible something like this instead : .. . .. . Example here : http : jsfiddle.net OnaBai HLaRx 6 Comment : Thanks for responding mate . See pic I added to the question to demonstrate the nav I have created that used to work . Basically there are a lot of menu items and a number of top level navs that unfold like this.. . it makes finding things easier than dealing with cascading menus . You guys do the same thing on the kendo site click on products : telerik.com kendo-ui http : www.telerik.com kendo-ui but it looks like your not using the kendo-menu on the kendo site.. . Comment : FYI this issue was acknowledged as a bug and resolved by Telerik support . Comment : @user2109254 just about You guys do the same thing on the kendo site just to let you know that I have nothing to do neither with Telerik nor with Kendo UI . I do this for fun and for helping others . Comment : Ok fair enough.. . I appreciate your support mate -", "Question : The example for Kendo Menu documentation here http : docs.telerik.com kendo-ui api javascript ui menu configuration-popupCollision sets the popupCollision property in Javascript . How can this property be set using Asp.Net MVC HtmlHelpers for Kendo Menu .. . Answer : According to Menu Builder ASP.NET MVC documentation http : docs.telerik.com kendo-ui api aspnet-mvc kendo.mvc.ui.fluent menubuilder there is not such property . Unfortunately this differeneces sometimes happens betveen JS and ASP versions like there are two other teams of developers . MVC HTML Helper just generate JavaScript code so you can try set it using JavaScript setOptions on document-ready : .. . .. . Or even better use the javascript version in the first place if you need this property .", "Question : null .. . Answer : We are making use of Kendo UI Grid Kendo Menu in our application . We have selectable enabled for Kendo UI Grid and it works as expected in all the browsers IE Firefox and in Google Chrome . Users will be able to select a row in the Grid and will be able to select an item in the Kendo Menu . But its failing in the Internet Explorer Version 10.0.9200.16438 . We are unable to select a row in the Kendo Grid . Similarly we are not able to select a menu item in the Kendo Menu also . Any help would be highly appreciated .", "Question : I have defined the kendo-window in the following fiddle . How can we display the kendo-menu items at the top . the fiddle link : http : jsfiddle.net Naidu526 gX2tM .. . .. . How can i display the menu on top . I have written the code like : .. . .. . Html : .. . .. . Js : .. . Answer : There isn t really a good way to do that . It is a bit of a CSS limitation with the way the elements are stacked . The table uses a div around it to provide the vertical-scrolling overflow : scroll and the dropdown for the menu is inside that wrapper so when it is open it will be cut off by the bottom of the table . Plus the individual table cells are set to overflow : hidden by Kendo as well . If you just have a dropdown of 3 items you might want to use a Kendo DropDown widget instead . If I remember correctly it appends its contents to the end of the document instead of inline in the table cell so will be able to show itself over the boundaries of the table . Comment : Then what should i do about the issue", "Question : I have kendo-menu @ Html.Kendo .Menu in my web page.When the user reduce the size of web browser user cannot see all the menu items.Can i add scrolling for this menu .. . Answer : No the Kendo UI Menu doesn t support automatic scrolling .", "Question : Here is code I have and the menu displays . However clicking an item makes a non ajax call which won t work in our architecture . Basically with the kendo-menu item I m shooting to have links which function exactly like what this does . I thought I was going to be able to set the HTMLAttributes for each item but that s read only . Our dynamic menu is hiearchical with no limits on levels . I m working another angle with a recursive partial page but having a lot of trouble with CSS . The kendo-menu was extremely simple to bind to a our self referencing model I just have to figure out how to get it to make an Ajax.ActionLink call . Any pointers are greatly appreciated . Thanks . .. . Answer : Just realized the Attributes have an add . This appears to be what we were shooting for . For anybody else this is a fully dynamic menu built using a hierarchical self-referencing model . UserMenuItemModel contains a List .. . .. . Adding keywords because I really never found anything like this Kendo Menu Ajax ActionLink hierarchical self-referencing .. . .. . Hope this helps others .", "Question : null .. . Answer : I am trying to customize XMLSiteMap for Kendo UI Menu to include more properties other than title controller action area . But XMLSiteMap didn t provide any override method to implement custom properties.Can we add more properties to SiteMap file Is it possible to have custom XmlSiteMapProvider for Kendo UI Menu Any inputs will be helpful to proceed . Thanks Siva", "Question : Kendo UI Menu doesn t work in IE on Tablets running Windows 8 IE 10 IE 11 . The menu drop down doesn t work . The menu works in Google chrome on the same Windows tablet . Comment : if you hit F12 in chrome to show dev tools do you got some error red notitication in bottom right corner .. . Answer : It would be easier if you posted a code example . By far the most common problem I have with things not working on IE is with trailing commas in arrays . For example : .. . .. . Runs just fine in chrome but IE breaks .", "Question : Kendo UI Menu doesn t work in IE on Tablets running Windows 8 IE 10 IE 11 . The menu drop down doesn t work . The menu works in Google chrome on the same Windows tablet . Comment : if you hit F12 in chrome to show dev tools do you got some error red notitication in bottom right corner .. . Answer : The latest version from KendoUIWeb 2013.3.1119 http : www.kendoui.com web whats-new release-notes q3-2013-web.aspx does now also solve this issue .", "Question : below is my code .. . .. . but there is not server hit on controller and menu is displayed as undefined . Controller code Comment : Can you please share the code from the controller .. . Answer : The Kendo UI Menu doesn t support binding to a remote data source for the time being .", "Question : Kendo UI s default menu is great but Bootstrap s menu is awesome . What must I do in order to keep the same Bootstrap menu s structure while calling the menus via kendo-ui bootstrap menu structure : .. . .. . kendo calling its menu Comment : did someone answer my question cos I saw something at the end of my question about someone called OnaBai Thanks in advance for any help Comment : thanks OnaBai I forgot but it s a bit too late by now .. . Answer : Finally since it s taking so much time and I probably have a tight deadline the TEMPORARY solution i have is to : .. . .. . 1 . decompress the kendo.menu.js in the core-file .. . 2 . make a backup first of course .. . 3 . hack the core structure and adapt it to the bootstrap html structure .. . .. . I still wonder if there is a way to extend the kendo.menu.js somewhere but as mentioned above it s a temporary solution hope someone comes up with a cool answer .. . .. . Thanks", "Question : I have defined the kendo-window in the following fiddle . How can we display the kendo-menu items at the top . the fiddle link : http : jsfiddle.net Naidu526 gX2tM .. . .. . How can i display the menu on top . I have written the code like : .. . .. . Html : .. . .. . Js : .. . Answer : Use the following css code to solve the issue .. . .. . .k-grid tr td overflow : visible .. . .. . thanks", "Question : I ve a kendo-menu to dynamically enable or disable the kendo-grid columns . When I select the options from the KendoMenu the selection is firing twice . I ve created the demo version below . demo http : jsfiddle.net jpremkumar 4cz4yp5v .. . .. . Check the console log while selecting the menu items . .. . Answer : Adding the checkbox to the menu item seems to lead to kendo firing the event for the menu click and the checkbox check . It seems hard to differentiate between the two instances so it might be better to do something different to indicate the check . The following icons can be used - maybe use the tick icon instead of an actual checkbox : .. . .. . http : demos.telerik.com kendo-ui styling icons Comment : I ve tried with openOnClick false . Still it triggers twice when I select the menu item . You can check out the jsfiddler version . Comment : Thanks for providing the demo not sure if you had that before but I hadn t noticed it . If I comment out the open event it only fires once and seems to provide the same functionality . It seems that setting the checked property in the open event is causing the select event to fire . What is the purpose of the open event code Like I said removing it doesn t seem to change the behavior . Comment : Even after removing the open event On click on the menu item the event got fired twice . On mouse over we get pointer cursor there its triggering twice towards right end hand cursor will come it triggers once but no action on check box . Comment : Interesting . I was just clicking the checkbox not the full menu item . If you do this it only fires once . But you are right-click the full menu item fires it twice . I ll play with it and see if there is a way to prevent that . Comment : Sorry I missed your point originally . After playing with it a little more it seems to be cause by adding the checkbox into the menu html . Kendo must wire-up the event to both the menu and the checkbox . If you just change the menu to the column name text without the checkbox it will fire just once . I m going to update my answer with a different strategy .", "Question : Hi how to remove extra space of Kendo menu item displaying at end . Here is my menu .. . .. . Kendo Menu http : i.stack.imgur.com lugQK.jpg .. . .. . In the above menu after Events it is displaying extra blank . Is there any way to hide or remove it Thanks Comment : can you share your code Comment : I ve taken from here jsfiddle.net OnaBai 7bk2h 1 http : jsfiddle.net OnaBai 7bk2h 1 and also I tried below link telerik.com forums that-space-to-the-right-of-the-last-item http : www.telerik.com forums that-space-to-the-right-of-the-last-item .. . Answer : Define the following CSS style : .. . .. . Where menu is the id of the HTML element containing the menu . Example here : http : jsfiddle.net OnaBai 7bk2h 16 Comment : I want to display my menu at center of the page horizontal align center . Comment : I got it I put this thing in div and applied my style . Thanks OnaBai" ] }
[ "yes-answer-long", "yes-answer-short" ]
kendo-ui
UNK_RELATION
node-request@http@52
node-request -- a node.js npm package for handling @placeholder requests .
{ "confidence": [ 32.92575454711914, 32.09246063232422, 31.605741500854492, 30.617366790771484, 28.967987060546875, 28.785194396972656, 28.635509490966797, 28.567459106445312, 28.351276397705078, 27.714458465576172, 27.126537322998047, 27.126537322998047, 27.06307601928711, 26.771411895751953, 26.65951156616211, 25.827787399291992, 25.53896713256836, 25.324295043945312, 25.192277908325195, 25.16189956665039, 25.083927154541016, 24.925540924072266, 24.892332077026367, 24.892332077026367, 24.892332077026367, 24.892332077026367, 24.806926727294922, 24.775623321533203, 24.670543670654297, 24.670543670654297, 24.15137481689453, 24.08653450012207, 24.05327606201172, 23.95573616027832, 23.95573616027832, 23.95573616027832, 23.848854064941406, 23.806167602539062, 23.71965980529785, 23.71965980529785, 23.619125366210938, 23.524951934814453, 23.450092315673828, 23.450092315673828, 23.450092315673828, 23.450092315673828, 23.450092315673828, 23.022422790527344, 22.938587188720703, 22.897686004638672, 22.697906494140625, 22.406614303588867, 22.357973098754883, 22.357973098754883, 22.357973098754883, 22.357973098754883, 22.357973098754883, 22.34514617919922, 22.30072021484375, 22.263704299926758, 22.212417602539062, 22.13011360168457, 22.13011360168457, 22.13011360168457, 22.13011360168457, 22.082712173461914, 22.082712173461914, 21.99343490600586, 21.99343490600586, 21.991098403930664, 21.72153091430664, 21.72153091430664, 21.72153091430664, 21.7203311920166, 21.499744415283203, 21.398353576660156, 21.398353576660156, 21.050682067871094, 21.02440643310547, 21.00436782836914, 20.932743072509766, 20.932743072509766, 20.858482360839844, 20.858482360839844, 20.83496856689453, 20.735294342041016, 20.735294342041016, 20.63263511657715, 20.575788497924805, 20.575788497924805, 20.575788497924805, 20.575788497924805, 20.551197052001953, 20.512413024902344, 20.512413024902344, 20.41196632385254, 20.401552200317383, 20.401552200317383, 20.354150772094727, 20.330289840698242 ], "content": [ "If all these requests are to the same endpoint then the default http module in node.js will only make a max of N requests at a time and will queue the rest .", "To accomplish this on the OpenShift app I am using the Node npm-request module .", "I ve written a program in Node and Express using Request https : github.com request request to connect to an API and downloads a bunch of data think 3 000 API requests all within the usage limits of the API mind you .", "It might have been because it was by passing my own error-handling for requests that weren t 200 .", "500 requests .. . .. .", "To clarify : Do you send all the requests immediately", "I have found a package called request https : github.com mikeal request in npm .", "But these requests are sent in one after another .", "I created a node.js server that uses busboy to take requests and pipe the files to Imgur for upload .", "I ve read all other similar posts : .. . .. . httpd - Increase number of concurrent requests http : stackoverflow.com questions 35386285 httpd-increase-number-of-concurrent-requests .. . Thousands of concurrent http requests in node http : stackoverflow.com questions 28395616 thousands-of-concurrent-http-requests-in-node .. . Increasing the maximum number of tcp-ip connections in linux http : stackoverflow.com questions 410616 increasing-the-maximum-number-of-tcp-ip-connections-in-linux .. . .. . Is there a way I can know the exact number of concurrent requests that my system can manage", "Did you consider restricting the number of concurrent requests e.g .", "Can they guarantee that I receive a body for every types of requests", "For example request-cookies https : www.npmjs.com package request-cookies", "My requests are like so : .. . .. . For the first few hundred requests this always works fine but then I get lots nad lots of either ENOTFOUND or timeout errors and I think the issue might be the way my code is dealing with all these requests .", "We are currently building a desktop application in node-webkit and we need to send http requests to a remote-server .", "Generally speaking with Node if it s a common problem to solve someone s already gone to the trouble to write and publish something on npm .", "What version of node-request and canvas are you using", "I m using the request npm module to make POST request and i have URL METHOD HEADERS request body json in this case .", "Front end .. . .. . --- or --- .. . .. . Back end .. . .. . Just install request https : www.npmjs.com package request .", "That said request already has some extensive documentation on cookies as well - you might find this suits your needs : .. . .. . Cookies are disabled by default else they would be used in subsequent requests .", "You can use request module npmjs.com package request tlsssl-protocol https : www.npmjs.com package request tlsssl-protocol", "Whenever I run this I get Error : write after end .. . .. . I found this from the solution here : Uploading file using POST request in Node.js http : stackoverflow.com questions 25344879 uploading-file-using-post-request-in-node-js .. . .. . I cannot find a source that works for me .", "However some of my logic requires up to five sequential requests and it causes quite the nested nightmare .", "I have created a proxy to run locally so I have control over inbound requests .", "In my action i have a number of requests to other services datasources etc that i need to load up .", "If your DNS query takes long-ish time requests will block on the DNS phase and the symptom is exactly ESOCKETTIMEDOUT or ETIMEDOUT .", "Given 100 requests send all of them in a single test .. . .. . In case your test case is Send 100 requests and test that they all return you have to use async in your test .", "I did look at the NPM Package windows-certs but was not sure how to use it .", "I m using request.js for node.js .", "That s the common pattern in node.js .", "After about 1 000 of those requests which return data fine I start seeing Error : read ETIMEDOUT for almost every request .", "I am using the Node request module for reading site content .", "I m using the request https : npmjs.org package request and node-canvas https : npmjs.org package canvas modules to try and download and process an image : .. . .. . I get the error Error : error while reading from input stream the onerror event is fired .", "It s around 3 000 requests and they all happen fairly simultaneously .", "enter image description here http : i.stack.imgur.com Bnbh4.png .. . .. . 1000 requests .. . .. .", "The server is a webserver and returns json objects on different requests works flawlessy .", "I m using Node.js - async request module to crawl 100+ millions of websites and I keep bumping into errors ESOCKETTIMEDOUT ETIMEDOUT after few minutes .", "I installed request and canvas via npm so I assume they re the latest version .", "Each it is supposed to be asynchronous but it is definitely not the case-when waiting for request data .. . .. . Basically the first 100 HTTP requests register accounts and the next 100 retrieve info for each respective account .", "Consider the following contrived example : .. . .. . For a successful request resolution works as expected : .. . .. . For HTTP requests that error eg 404 500 status etc the promise is never rejected and neither the catch or error blocks are executed .", "The node.js is still using the node-request https : github.com request request module to compose and send the POST request using the following code : .. . .. . This works now but what confuses me is that since the content-type is application json how does the bodyParser.urlencoded extended : true or false matter", "I ve batched them in a queue with timeouts so the requests happen relatively slowly it helps a little bit but doesn t solve the problem completely .", "I know how to get the videos but I m not sure how to put these two requests together to ultimately get the video data .", "I need mocha to send for example 100 HTTP requests all at once and then have 100 callbacks waiting for response data .", "And then after all 100 of those calls are done I need to run another series of 100 HTTP requests .", "Right now I am having trouble with just getting these HTTP requests to run in asynchronous .", "I am using Express to proxy requests to a separate API server which is protected by OAuth 2 access tokens .", "I use promise-request https : www.npmjs.com package request-promise to send binary body with a PUT request but you can adapt this code with request library or needle library .", "I need to perform a million API calls in under an hour The server can handle this much traffic for this I m using node to run multiple requests in parallel but when I try to run 1000 concurrent requests I keep getting these errors : .. . .. . EAI AGAIN .. . .. . ECONNRESET .. . .. . How can I prevent this from happening without reducing the requests to 500", "Finally you ll probably need to reinstall node-canvas via npm so navigate to your node-modules folder and delete the canvas dir .", "A node app is throwing this error when an HTTP POST request is made by our node express middleware using request library error present only in a particular node app no issues in others apps on the same machine using the middleware .", "I have the following request call in my node.js app .. . .. . And I m getting TypeError : Cannot read property items of undefined while processing the response .", "For this we decided to use request a http wrapper module for node .", "Node sent the request through the proxy server wich contacted the target server .", "...And on the other machine : .. . .. . This time Node attempted to send the request directly to the target server .", "How is node somehow detecting the proxy and sending the request to the proxy", "Is this something wrong with the test the request or the jasmine-node setup I have .", "Solved this using node-fetch https : github.com bitinn node-fetch .", "It uses the TLS library in node.js not the one shipped by your OS .", "My code is as following by using node.js request client library .. . .. . as result I get this error : Error : getaddrinfo ENOTFOUND skytrip.localhost skytrip.localhost : 8080 .. . .. . How can I solve this problem", "I am using node-archiver https : github.com archiverjs node-archiver to archive some folders and trying to send the archive with request https : github.com request request library using multipart form-data https : github.com request request forms .", "I have a service in node which makes a POST request to a RESTful API end point to save some data .", "It is showing else statement as its not getting post value in body of request promise of node function .", "I think I have some wrong perception of how request or node streams really work .", "I just copy-pasted your code installed latest canvas request on a linux machine with node v0.10.15 and it worked .", "Within one describe I run the 100 HTTP requests using async which is what most Stackoverflow responses told me to do .", "I have two terminals up one for the API and the other for mocha tests sending requests and the API is not receiving all the calls asynchronously .", "This happened even though I ve stayed within the published rate limits per day but turned out they have an unwritten limit per minute or more like - just unable to process so many requests .", "If your second callback depends on the first one then you need something like it but if longExternalCallOne and longExternalTwo are independent of each other you should be using a library like async to help parallelize the requests https : github.com caolan async", "And I have made a 1M request in an hour but from three differents servers since I can t get more requests from 1 server without getting this error .", "What s the suggested solution here using a timeout interval to batch the requests into more manageable chunks", "Here s a code sample that works perfectly when running 500 requests at a time but fails when the limit is over 1000 .", "It s all single thread that executes the javascript AND handle network requests - they take turns .", ".. . .. . .. . .. . I have a question about a potential arcane scenario involving the Node Request module https : www.npmjs.com package request in which : .. . .. . A complete HTTP request is constructed and executed over the network taking however many ms or even seconds .. . .. . .. . before a single function is executed at runtime on the local machine typically in the nanoseconds", "node.js doesn t just hang .", "Can I still do a request with a request module to a server that requires TLS", "What does the request module use to do a HTTPS request", "Rate-limiting of my requests -- if this is somehow the case I would like to know why this is happening specifically on my server and not say on my local machine .. . .. . The manner in which I m making my requests i.e .", "How can I pass formData to Node for uploading", "I m looking into the node s request https : github.com request request module and documentation says that callback accepts three params - error response http.IncomingMessage and body .", "I m trying to get some data from a third party service using the node-request module and return this data as string from a function .", "Try this and see if you re request call is not returning something : .. . .. . Take a look at this piece of article here https : github.com maxogden art-of-node callbacks .", "I am using mocha to test a Node.js API I am writing .", "Maybe the problem that you re facing is due to the asynchronous nature of node.js .", "The exception being a single case where a file needs to be uploaded and since that is a multipart body I am using request https : github.com request request and form-data https : github.com form-data form-data to build that type of request and using multer https : github.com expressjs multer on the server-side to process the multipart request since body-parser does not process such requests .", "Does request provides a way to do it", "why is pool on the request set twice", "In your call to Promise.promisifyAll require request you need to pass a second parameter to indicate you re interested in all parameters Promise.promisifyAll require request multiArgs : true .. . .. . Alternatively you can use the request-promise package that does this for you with some other minor fixes it uses bluebird internally .", "my node version is v4.2.5", "My node version is v5.6.0 .", "This is the node way of doing things .", "I m using Node v0.10.21 .", "I m using Requests to pipe an HTTP Stream to a local geospatial file-processing utility ogr2ogr : .. . .. . However if the file I receive is too big I want to abort : .. . .. . Is calling httpStream.abort enough", "Scroll down to the bottom of the readme https : github.com request request to find the bits about cookies .", "Is there a less-nested way to achieve the following with request-promise : .. . .. . Each request is dependent on the result-of the last and so they need to be sequential .", "I have looked into using request https : github.com request request to post a file but am confused as to what to put in their form example specifically here : .. . .. . My current attempt is using a mix of formidable and request but it fails with the following error : .. . .. . TypeError : Cannot read property hasOwnProperty of null .. . .. . My HTML form is as follows : .. . .. . Here is my Node Formidable Request Code : .. . .. . At this point I would be happy with just being able to POST my file using Node with the end goal of being able to save the response of a png file to Azure .", "I m using node express routing request to call a token from an api and async series to keep everything clean .", "If so - is it true that the construction of the HTTP request occurs inside this Javascript thread or could it occur inside a hidden thread in the Node internals", "The strange thing is that we do not specify a proxy in our code however the requests do seem to go through the proxy...but not on the other machine .", "Postman provides three different node implementations Native Request and Unirest ." ] }
{ "confidence": [ 40.52549743652344, 37.73463439941406, 35.555118560791016, 35.525787353515625, 35.45103454589844, 34.20708465576172, 33.969364166259766, 33.92375564575195, 33.613121032714844, 33.49494934082031, 33.3371696472168, 31.377628326416016, 31.201953887939453, 31.171497344970703, 30.911666870117188, 30.849655151367188, 30.835166931152344, 30.78598403930664, 29.46280288696289, 28.537944793701172 ], "content": [ "Question : Result .. . .. . I want to pick up value of set-cookie from response headers . How to pick it up Is there any cool and simple way Should I use for statement from filedkey or . What should I do I don t know I m totally newbie on Javascript . Thanks.. . .. . Answer : Generally speaking with Node if it s a common problem to solve someone s already gone to the trouble to write and publish something on npm . For example request-cookies https : www.npmjs.com package request-cookies In particular I think you ll find the toJSON method most helpful though admittedly the package s documentation is rather light . You can check out the tests https : github.com lalitkapoor request-cookies tree master test for some working examples . That said request already has some extensive documentation on cookies as well - you might find this suits your needs : .. . .. . Cookies are disabled by default else they would be used in subsequent requests . To enable cookies set jar to true either in defaults or options . Scroll down to the bottom of the readme https : github.com request request to find the bits about cookies .", "Question : I m using a nodejs server to mockup a backend at the moment . The server is a webserver and returns json objects on different requests works flawlessy . Now I have to get the json objects from another domain so I have to proxy the server . I have found a package called request https : github.com mikeal request in npm . I can get the simple example to work but I have to forward the whole webpage . My code for the proxy looks like this : .. . .. . I m loggin the real server and it is acting correctly I can track the get response but the body is empty . I just want to pass-through the whole website from the nodejs server through the request.pipe function . Any ideas .. . Answer : Since in Node.js a.pipe b returns b see documentation http : nodejs.org api stream.html stream readable pipe destination options your code is equivalent to this : .. . .. . As you only want a proxy there is no need to pipe req into res and here it doesn t make sense to pipe multiple readable streams into one writable stream just keep this and your proxy will work :", "Question : Is there a less-nested way to achieve the following with request-promise : .. . .. . Each request is dependent on the result-of the last and so they need to be sequential . However some of my logic requires up to five sequential requests and it causes quite the nested nightmare . Am I going about this wrong .. . Answer : You can return a Promise in the onFulfilled function provided to Promise.then : .. . .. . This lets you handle multiple calls without ending up in a nested nightmare - .. . .. . Additionally this makes error-handling a lot easier if you don t care which exact Promise failed : Comment : This is good but I m having an issue where it seems like my second request is called twice and then my third request is called four times . Why might that be Comment : Hard to tell without seeing any code.. . Comment : Sorry it was my mistake . Setting the simple option to false looks like it fixed the issue . It might have been because it was by passing my own error-handling for requests that weren t 200 .", "Question : I m using Node.js - async request module to crawl 100+ millions of websites and I keep bumping into errors ESOCKETTIMEDOUT ETIMEDOUT after few minutes . It works again after I restart the script . It doesn t seem to be connection limit issue because I can still do resolve4 resolveNs resolveMx and also curl without delay . Do you see any issue with the code or any advice I d like to push up the async.queue concurrency to at least a 1000 . Thank you . And the system limits are pretty high . sysctl Comment : why is pool on the request set twice Comment : It is to disable the pool . I still get the errors with or without the pool and the maxSockets . Comment : were you able to find the cause .. . Answer : By default Node has 4 workers to resolve DNS queries http : docs.libuv.org en latest threadpool.html . If your DNS query takes long-ish time requests will block on the DNS phase and the symptom is exactly ESOCKETTIMEDOUT or ETIMEDOUT . Try increasing your uv thread pool size : .. . .. . or in index.js or wherever your entry-point is : .. . .. . I reproduced this locally https : github.com Motiejus blackhole by slowing down the responses from DNS server using tc .", "Question : I m using the request https : npmjs.org package request and node-canvas https : npmjs.org package canvas modules to try and download and process an image : .. . .. . I get the error Error : error while reading from input stream the onerror event is fired . But when I hit the above image URL in a browser it displays the image as expected . What am I doing wrong Comment : It works as expected for me firing onload event . What version of node-request and canvas are you using Comment : I m using Node v0.10.21 . I installed request and canvas via npm so I assume they re the latest version . I m running on OSX 10.9 Mavericks I followed the instructions to install Pixman and Cairo . Comment : canvas is v1.1.3 . request is 2.33.0 Comment : Can you confirm that body is indeed a buffer I can see that only if I remove encoding : null I get an error . Other than that I can t think of anything else . I just copy-pasted your code installed latest canvas request on a linux machine with node v0.10.15 and it worked . Comment : Yes it s definitely a Buffer . If I run console.log body the terminal outputs Buffer O1 12 B2 G4 etc etc.. . I can use body to write the image to the hard drive and I get a valid image file and I can open etc . .. . Answer : Fixed it Seems I had a corrupted install of pixman and or cairo on OSX dependencies of node-canvas probably because I tried to install them via homebrew . The solution was to get rid of them from homebrew using : .. . .. . ...then run : .. . .. . ..to check for any broken symlinks etc . related to cairo and pixman . Then you have to manually delete any cairo pixman bins libs symlinks etc . using Finder . Next follow the install instructions for node-canvas https : github.com LearnBoost node-canvas wiki Installation---OSX to reinstall cairo and pixman on OSX . Finally you ll probably need to reinstall node-canvas via npm so navigate to your node-modules folder and delete the canvas dir . Then run :", "Question : I ve written a program in Node and Express using Request https : github.com request request to connect to an API and downloads a bunch of data think 3 000 API requests all within the usage limits of the API mind you . When running this in a Docker container I m getting a lot of getaddrinfo ENOTFOUND errors and I m wondering if this is a resourcing issue . My requests are like so : .. . .. . For the first few hundred requests this always works fine but then I get lots nad lots of either ENOTFOUND or timeout errors and I think the issue might be the way my code is dealing with all these requests . I ve batched them in a queue with timeouts so the requests happen relatively slowly it helps a little bit but doesn t solve the problem completely . Do I need to destroy the body response objects to free up memory or something Comment : To clarify : Do you send all the requests immediately Did you consider restricting the number of concurrent requests e.g . with async Comment : you re most likely running into provisioning issues with the API you re calling Comment : @h0ru5 I ve done something similar in that I ve created a queue array and a script that loops through it doing 25 calls every 5 seconds . Comment : Are you absolutely sure you re not hitting api limits This usually happens either due to the target network limiting you or being overloaded or your server local network being overloaded . at 25 5 sec it s probably not a network issue more likely to be limiting . Comment : @MikeDinescu Possibly but see comment above . .. . Answer : I ve encountered similar issues with an API I was using and it ended up being what some here suggested - rate limits . Some APIs don t return readable errors on rate limits as they provide certain amount of resources per client and when you ve used it all up they can t even send you a bad response . This happened even though I ve stayed within the published rate limits per day but turned out they have an unwritten limit per minute or more like - just unable to process so many requests . I answered it though by mocking that API with my own code placing it in the network so it will maximize the similarities and as my mocked code didn t do anything I never got any errors in the NodeJS server . Then I put it some countdowns and timeouts when it was needed . I suggest the same to you . Remember them having a per hour limit doesn t mean they don t have a different per second minute limit .", "Question : I use MongoDB as the back-end database for my node Express application . To summarize the problem I am facing I don t know how to set up the body-parser configuration in my Express app because the server-side application is not receiving the full JSON posted by the client application also a node.js app . For the most part the client is sending JSON in the request body to RESTful endpoints . The exception being a single case where a file needs to be uploaded and since that is a multipart body I am using request https : github.com request request and form-data https : github.com form-data form-data to build that type of request and using multer https : github.com expressjs multer on the server-side to process the multipart request since body-parser does not process such requests . On the server-side Express I have the following configuration of the Express app : .. . .. . On the node client I am using the following code to build up a JSON-style JavaScript object and post it to a RESTful endpoint : .. . .. . I am having difficulty composing the request on the client-side with node-request https : github.com request request : .. . .. . Note that I attempted multiple versions of the above code by explicitly specifying the content-type as application JSON as well as using JSON.stringify to convert the JavaScript object into a JSON string . The MongoDB collection class stores the following type of document which contains foreign-keys to two other collections subject and student : .. . .. . In the server logs I see the following error : .. . .. . which is strange because scores array of sub-documents is empty scores : whereas on the client-side I am sending a non-empty array with some students performances elements in it . Have I violated the right way to post JSON to Express apps How do I fix this Edited : 7 5 2016 I changed the body parser middle-ware configuration to use extended : true instead . The node.js is still using the node-request https : github.com request request module to compose and send the POST request using the following code : .. . .. . This works now but what confuses me is that since the content-type is application json how does the bodyParser.urlencoded extended : true or false matter Comment : Is the json received in the node backend as it supposed to be whole document Comment : @cs04iz1 yes it is the whole document looking stringified . .. . Answer : Issue is with form : JSON.stringify class in your first request . form takes url encoded form input stringified json won t work . check content-type header application x-www-form-urlencoded .. . .. . json : class in your 2nd snippet works as this handles json data and sets correct content-type header correctly . Comment : Thanks that worked", "Question : I use MongoDB as the back-end database for my node Express application . To summarize the problem I am facing I don t know how to set up the body-parser configuration in my Express app because the server-side application is not receiving the full JSON posted by the client application also a node.js app . For the most part the client is sending JSON in the request body to RESTful endpoints . The exception being a single case where a file needs to be uploaded and since that is a multipart body I am using request https : github.com request request and form-data https : github.com form-data form-data to build that type of request and using multer https : github.com expressjs multer on the server-side to process the multipart request since body-parser does not process such requests . On the server-side Express I have the following configuration of the Express app : .. . .. . On the node client I am using the following code to build up a JSON-style JavaScript object and post it to a RESTful endpoint : .. . .. . I am having difficulty composing the request on the client-side with node-request https : github.com request request : .. . .. . Note that I attempted multiple versions of the above code by explicitly specifying the content-type as application JSON as well as using JSON.stringify to convert the JavaScript object into a JSON string . The MongoDB collection class stores the following type of document which contains foreign-keys to two other collections subject and student : .. . .. . In the server logs I see the following error : .. . .. . which is strange because scores array of sub-documents is empty scores : whereas on the client-side I am sending a non-empty array with some students performances elements in it . Have I violated the right way to post JSON to Express apps How do I fix this Edited : 7 5 2016 I changed the body parser middle-ware configuration to use extended : true instead . The node.js is still using the node-request https : github.com request request module to compose and send the POST request using the following code : .. . .. . This works now but what confuses me is that since the content-type is application json how does the bodyParser.urlencoded extended : true or false matter Comment : Is the json received in the node backend as it supposed to be whole document Comment : @cs04iz1 yes it is the whole document looking stringified . .. . Answer : Try .toJSON method over class before sending . Comment : you mean instead of performing JSON.stringify class Comment : Yes try class.toJSON Comment : I tried that and get an error.. . Underlying error : class.toJSON is not a function", "Question : I am using mocha to test a Node.js API I am writing . I need mocha to send for example 100 HTTP requests all at once and then have 100 callbacks waiting for response data . And then after all 100 of those calls are done I need to run another series of 100 HTTP requests . What I know about Mocha : each side-by-side describe function-call runs synchronously . Within one describe I run the 100 HTTP requests using async which is what most Stackoverflow responses told me to do . Right now I am having trouble with just getting these HTTP requests to run in asynchronous . Each it is supposed to be asynchronous but it is definitely not the case-when waiting for request data .. . .. . Basically the first 100 HTTP requests register accounts and the next 100 retrieve info for each respective account . I don t know when to call done and when to call callback pertaining to async.map . Anybody know what to do here .. . Answer : Maybe I m wrong but I do not see the point here to use async.map in your code . Given 100 requests send all of them in a single test .. . .. . In case your test case is Send 100 requests and test that they all return you have to use async in your test . Given a list of 100 calls test each single call .. . .. . If what you want to do is to have a list of calls and have a it test for each of them then you can just produce a new it clojure for each call . mocha will register the it tests and then execute them . Comment : yeah you re right I took out the async.map . But these requests are sent in one after another . I have two terminals up one for the API and the other for mocha tests sending requests and the API is not receiving all the calls asynchronously . request is blocking every subsequent call until the previous is returned Comment : If you want concurrent calls I d recommend to group them : even if you fire them all together usually there s a maximum number of calls that can be open in parallel . I believe that 100 is far above that cap . Comment : well I can t even get 2 concurrent calls with this though Comment : Ok then I think the answer above is not right as it is . I will update it . Comment : @Jeremy it is updated now", "Question : See bottom of question for an update based on comments answers : This question is really about the possibility of hidden threads that do not execute callbacks . .. . .. . .. . .. . I have a question about a potential arcane scenario involving the Node Request module https : www.npmjs.com package request in which : .. . .. . A complete HTTP request is constructed and executed over the network taking however many ms or even seconds .. . .. . .. . before a single function is executed at runtime on the local machine typically in the nanoseconds - see below for details .. . .. . I am posting this mostly as a sanity check just to make sure I am not misunderstanding something about Node JS Request module code . From the examples in the Request module https : www.npmjs.com package request examples see the SECOND example in that section is this : .. . .. . I have indicated my arcane scenario in the code snippet . Suppose the Node process hangs at the point indicated but that Node internally in a hidden thread invisible to Javascript and therefore not calling any callbacks WAS able to construct the request and send it over the network suppose the hang continues until a response in two chunks say is received and waiting to be processed by Node . This is the scenario that is certainly arcane and that I m not sure is even theoretically possible . Then suppose that the hang ends and the Node thread above wakes up . Further suppose that somehow Node was able to process the response all the way to the point of executing the callback function in the code above yet without moving past the hanged point in the code in the original code path -- again if this is even theoretically possible . Is the above arcane scenario theoretically possible If so wouldn t the data packets be received over the network and combined ready to be passed to the callback function before the data event was scheduled on the object In this case if it s possible I would imagine that the data event would be missed . Again I understand that this is an arcane scenario - perhaps it s not even theoretically possible given the internal mechanisms and coding involved . That is my question - is the above arcane scenario with its extremely unlikely race-condition nonetheless theoretically possible I ask just to make sure I m not missing some key point . Thanks . .. . .. . UPDATE : From comments answers : I now have clarified my question . The arcane scenario would require that there is a HIDDEN thread which therefore CANNOT execute any USER code including CALLBACKS that constructs the request sends it over the network and receives the response - WITHOUT having any callbacks to trigger including the data callback - and stops short just at the point that the response callback is ready to be called waiting for the single visible JS thread to wake up . Comment : You might want to read developer.mozilla.org en-US docs Web JavaScript EventLoop https : developer.mozilla.org en-US docs Web JavaScript EventLoop Comment : @FelixKling Thank you . I just want to be certain that there is no hidden thread that processes the request and sends it over the network just up to but not including the point of the callback which I understand is in the single JS thread . Comment : I don t really understand how you think that a data event could be missed . You mean the packets are received before the handler is installed Comment : @Bergi - Exactly . I trust this can t actually occur I just want to be sure I understand why . Because though all USER code must occur in a single thread from the other comments answer and all CALLBACKS must execute in that same thread where does it say that there cannot be a hidden invisible internal thread that does processing up to but not including the point at which a callback needs to be called Comment : What does thread hangs here mean node.js doesn t just hang . There could be an infinite-loop but execution doesn t just hang . .. . Answer : There s only one thread involved in Node.js an event-loop is used to process tasks that run asynchronously and nothing queued will ever interrupt anything already running . So no there is no race-condition there . Comment : Internally to the Node implementation I think there must be additional threads - at least so that some thread can block on the operating-system s event or condition etc . object . These threads would not be visible to the Javascript Node code . However - there is just one thread that executes the Javascript code correct If so - is it true that the construction of the HTTP request occurs inside this Javascript thread or could it occur inside a hidden thread in the Node internals Comment : There are other threads internal to node.js to make certain things wrok . In fact async file I O uses threads . But it is my understanding that networking does not use threads it uses events . Comment : @DanNissenbaum : When it comes to network I O there are no additional threads visible or otherwise . It s all single thread that executes the javascript AND handle network requests - they take turns . The only exception is disk I O which the node developers have chosen to implement as threads to simplify cross-platform support of async disk I O Comment : @DanNissenbaum : See this for an explanation of how node works : stackoverflow.com questions 29883525 http : stackoverflow.com questions 29883525 i-know-that-callback-function-runs-asynchronously-but-why 29885509 29885509 Comment : @DanNissenbaum : Not only those there can also be UI events browser and thread job completion events web workers . But all of them can be implemented using file socket I O as the communications medium so the core of the system will still work .", "Question : Specs .. . .. . Here s some background info on the system I m running : .. . .. . Ubuntu v 14.04 .. . .. . Node v4.4.0 .. . .. . Node request module v2.69.0 .. . .. . All of this on a DigitalOcean droplet server on a New York-based center . Problem Description .. . .. . So I run the following js file : .. . .. . On my droplet . s Roughly 70-80 of the time I try this s Now every single time I try this I ll get an ETIMEDOUT error like so : .. . .. . Of note the errors seem to come in waves . That is I ll manage to get a handful of requests through for a certain period of time followed by a string of ETIMEDOUT errors . Errors happen more often than I am able to get my requests through by a ratio of approximately 3 : 1 errors to successes . On my own computer Mac running OS X El Capitan running the js file for the given site works with 100 success i.e . I ve never run into this problem before .. . so I m not sure why the problem is contained to my droplet . Any pointers would be appreciated . Research Similar Posts : .. . .. . Node.js 0.4.10 . http-get request ETIMEDOUT Connection timed out frequently https : stackoverflow.com questions 8515706 node-js-0-4-10-http-get-request-etimedout-connection-timed-out-frequentl .. . .. . Why can t I ping herokuapp https : stackoverflow.com questions 23505192 why-cant-i-ping-herokuapp -- starting to get a better picture of what s going on here.. . .. . .. . Problem with http GET request on node js https : stackoverflow.com questions 6882082 problem-with-http-get-request-on-node-js -- seemed helpful at first later realized setting User-Agent probably does nothing significant .. . .. . .. . .. . Additional Info .. . .. . I also feel that it s worth mentioning the site I m trying to make requests at actively has a problem with scripts and web scrapers so I wouldn t be surprised if they tried everything in the book to prevent this from taking place . Possible Causes .. . .. . IP address blocking -- s not the case yet as I will still occasionally get responses from the server s I am no longer able to get any sort of response from the server . This might be the cause but I am really confused at how they might be doing this . No issues on my local machine no issues requesting their page from a browser on my droplet but then this . Rate-limiting of my requests -- if this is somehow the case I would like to know why this is happening specifically on my server and not say on my local machine .. . .. . The manner in which I m making my requests i.e . not through a browser . -- I don t think this is the case because I can run the first script with a 100 response rate on my local computer unless there is something my local computer does before sending my request to their server . The system itself . I ve only tested the first script on my Mac . Perhaps the code runs differently on different OS s systems. . s s .. . .. . Diagnosing with traceroute .. . .. . So as per @ RabeeAbdelWahab s suggestion I attempted to diagnose the problem with traceroute . However I have practically no knowledge of networks so I m not sure how to proceed . Here s an example output : .. . .. . .. . .. . So after running traceroute several more times I notice the following patterns : .. . .. . The outputs begin at some point on or slightly after the 15th hop . The last IP Address before the hops mostly seems to alternate between the same to addresses : 205.251.XXX.XXX slightly more often the case or 54.239.XXX.XXX . In a few select instances I ll get an address like 72.21.222.155 . In addition I have seen no differences when : .. . .. . Running traceroute with the -m 255 option i.e . max number of hops . Running traceroute with the -I option . Running traceroute with the -e option . Running traceroute with the -p 80 or -p 25 options . Running traceroute on a different droplet located in the same data center as the droplet in question . Diagnosing with ping .. . .. . Using ping here s a running list of sites I can and cannot connect to : .. . .. . Can connect .. . .. . google.com .. . .. . facebook.com .. . .. . reddit.com .. . .. . github.com .. . .. . stackoverflow.com .. . .. . youtube.com .. . .. . twitter.com .. . .. . Can t connect : .. . .. . amazon.com .. . .. . microsoft.com .. . .. . apple.com .. . .. . walmart.com .. . .. . paypal.com .. . .. . cnn.com .. . .. . nyt.org .. . .. . wolframalpha.com .. . .. . Observations : Is there a reason why I seem to be able to connect to sites that have social features and otherwise not Apparently it s common for sites not to return replies by ICMP which is what ping traceroute uses . Please disregard the above.. . .. . .. . s s .. . .. . .. . .. . Additional findings .. . .. . So I ve noticed that if I modify my request to take an additional User-Agent header code example provided below I m able to initially get back the html response . I m actually able to get back a response using the above method a few times . Afterwards it seems all my connections lead to the aforementioned ETIMEDOUT error . Then I ll have to wait some lengthy period of time and it s rinse wash and repeat . I actually performed a simple two-tailed proportional test for the above i.e . receiving a response with and without a User-Agent header and got a p-value of 0.8493.. . so no statistical significance between the two . Again please disregard the aforementioned.. . Comment : have you tried to traceroute the request from your droplet and compare it to the local traceroute Comment : howtogeek.com 134132 http : www.howtogeek.com 134132 how-to-use-traceroute-to-identify-network-problems and this is a DO one digitalocean.com community tutorials https : www.digitalocean.com community tutorials how-to-use-traceroute-and-mtr-to-diagnose-network-issues Comment : @RabeeAbdelWahab - ah ok I see . Sounds useful I ll check it out . Thanks Comment : The suggestion then ended up with both requests giving the same outcome i will try to look if I will be able to add something else that could be helpful Comment : Your DO is hosted on NY and what about your current location are you from NY too What happens when you increase your timeout settings Same error after waiting some more time Have you tried using nodejs s http.ClientRequest https : nodejs.org api http.html http class http clientrequest instead of request package .. . Answer : This is caused when your request response is not received in given time by timeout request module option . Basically to catch that error first you need to register a handler on error so the unhandled error won t be thrown anymore : out.on error function err handle errors here . Some more explanation here https : github.com request request issues 636 . In the handler you can check if the error is ETIMEDOUT and apply your own logic : if err.message.code ETIMEDOUT apply logic . .. . .. . If you want to request for the file again I suggest using node-retry https : github.com tim-kos node-retry or node-backoff https : github.com MathieuTurcotte node-backoff modules . It makes things much simpler . If you want to wait longer you can set timeout https : github.com request request requestoptions-callback option of request yourself https : github.com request request requestoptions-callback . You can set it to 0 for no timeout . Hope This helpful to you and solve your problem . Comment : Hi Akhilesh thanks for your comment . As I mentioned in my bounty description I am primarily concerned with figuring out how to prevent circumvent the response or rather lack of from the server . Otherwise I d like to know what is causing this issue . My concerns at the moment are neither error-handling nor re-trying the sample code as they don t address the problem . Comment : @youngrrrr i didn t see the bounty desciption section i focused only on your question IF i get anything related to your exact problem or solution . I definitely help you . Comment : Hey Akhilesh here s the description : I am ideally looking for a solution to my problem - namely how to perform requests to supremenewyork.com without any ETIMEDOUT errors on my server . If this is not possible the next best answer will explain what s going on and why the biggest question I have in particular is : why I can perform requests with 100 success on my local machine and not on my digital-ocean server droplet which has a 25 success rate . Thanks", "Question : We are currently building a desktop application in node-webkit and we need to send http requests to a remote-server . For this we decided to use request a http wrapper module for node . This works fine on all but one of our machines . The code for the download looks a bit like this : .. . .. . So with this the result we get on my machine is this : .. . .. . On our network here the proxy server is 172.24.8.14 and my address is 172.24.9.130 . Node sent the request through the proxy server wich contacted the target server . The result that is sent back is a 301 which is expected . ...And on the other machine : .. . .. . This time Node attempted to send the request directly to the target server . This resulted in the proxy blocking the request completely . The strange thing is that we do not specify a proxy in our code however the requests do seem to go through the proxy...but not on the other machine . Is there some reason for this How is node somehow detecting the proxy and sending the request to the proxy Comment : The proxy settings might be set in an environment variable in some machines and not in the other.. . Comment : Interesting i believe we checked the proxy settings in the registry of both machines but i didn t think there was anything in the env vars i will check .. . Answer : The reason for this turned out to be that our network was using an NTLM proxy which required ISA client to be running on our machines but it was not running on the other machine . Installing ISA client on that machine allowed traffic to go through the proxy as normal .", "Question : null .. . Answer : Just building a simple test for uploading a file . Whenever I run this I get Error : write after end .. . .. . I found this from the solution here : Uploading file using POST request in Node.js http : stackoverflow.com questions 25344879 uploading-file-using-post-request-in-node-js .. . .. . I cannot find a source that works for me . Any ideas what I m doing wrong", "Question : null .. . Answer : I need to perform a million API calls in under an hour The server can handle this much traffic for this I m using node to run multiple requests in parallel but when I try to run 1000 concurrent requests I keep getting these errors : .. . .. . EAI AGAIN .. . .. . ECONNRESET .. . .. . How can I prevent this from happening without reducing the requests to 500 Here s a code sample that works perfectly when running 500 requests at a time but fails when the limit is over 1000 . Your limit may be different . I added http.globalAgent.maxSockets Infinity even though is the default-value . 500 requests .. . .. . enter image description here http : i.stack.imgur.com Bnbh4.png .. . .. . 1000 requests .. . .. . enter image description here http : i.stack.imgur.com Ha4Ox.png .. . .. . Aditional info : .. . .. . I m running the tests on ubuntu 14.04 15.04 and I modified file-max tcp fin timeout tcp tw reuse ip local port range default values in etc sysctl.conf as described in this post http : www.nateware.com linux-network-tuning-for-2013.html .VwqFJ3UrLV1 .. . .. . file-max : 100000 .. . tcp fin timeout : 15 .. . tcp tw reuse : 1 .. . ip local port range : 10000 65000 .. . .. . Added following lines in etc security limits.conf .. . .. . With this values I m still getting the error . I ve read all other similar posts : .. . .. . httpd - Increase number of concurrent requests http : stackoverflow.com questions 35386285 httpd-increase-number-of-concurrent-requests .. . Thousands of concurrent http requests in node http : stackoverflow.com questions 28395616 thousands-of-concurrent-http-requests-in-node .. . Increasing the maximum number of tcp-ip connections in linux http : stackoverflow.com questions 410616 increasing-the-maximum-number-of-tcp-ip-connections-in-linux .. . .. . Is there a way I can know the exact number of concurrent requests that my system can manage Comment : The server can handle this much traffic . Are you affiliated with Google in some way or are you just assuming that Comment : I m not making calls to google.. . The sample is just an example so you can run it . And I have made a 1M request in an hour but from three differents servers since I can t get more requests from 1 server without getting this error . Comment : So you want us to DDoS Google instead More seriously I m more worried about the connection timeout than about the other error -- something seems to be dropping connections on the floor or blacklisting your client . Comment : @Fr d ricHamidi 500 requests to google Is far far away from a DDoS attack And it s just a sample I ll change google with example.com if you want to get picky . Comment : EAI AGAIN appears to be a temporary failure in DNS lookup . So perhaps you are swamping some DNS resource local or otherwise . If your million connections are all to the same set of hosts perhaps you can resolve their IP address once and just use the IP address from then on .", "Question : I am building a proxy server which is supposed to forward data from an Shoutcast server to the client . Using request or even Node s http module this fails due to missing HTTP header : .. . .. . The URL in question is : http : stream6.jungletrain.net : 8000 .. . .. . Doing a header request with curl I was able to verify this : .. . .. . Yet the stream is working fine as tested with curl stream6.jungletrain.net : 8000 . .. . .. . Is there a way to disable the header verification in request or Node s http This is the code I am testing it on : .. . .. . I am aware this can be achieved by rolling an implementation with net https : nodejs.org api net.html there is also icecast-stack https : www.npmjs.com package icecast-stack but subjectively seen it only implements half of the Stream interfaces properly . Comment : What type of stream is icecast Also - what s stream.pipe res doing in your example Comment : Recommand you look at github.com nodejitsu node-http-proxy https : github.com nodejitsu node-http-proxy for an already node based http-proxy implementation . But personally I would not recommand nodejs for a proxy server and you better off with something like nginx . Comment : This is NOT an Icecast server . It s Shoutcast which is NOT HTTP compliant so no surprise you have problems . Comment : @TBR Well spotted how did you find out Comment : I m the Icecast maintainer and know that Icecast doesn t do such crap but Shoutcast does . - .. . Answer : Using icecast https : www.npmjs.com package icecast I was able to get this working both using the on data event and by piping it to the Express response : .. . .. . Or simply : .. . .. . Also of some note : .. . .. . It appears the icecast package has been superseded by https : www.npmjs.com package icy Comment : Thanks maybe I should have clarified but I was using the predecessor implementation and it didn t expose a proper unpipe or close interface . Comment : So this module does expose those or not And if it doesn t I d suggest the easiest course of action is to try and implement them into icecast and submit a PR . Comment : Hrm it also seems that it s been replaced and the old one was never removed from NPM . npmjs.com package icy https : www.npmjs.com package icy", "Question : null .. . Answer : I am using Express to proxy requests to a separate API server which is protected by OAuth 2 access tokens . When a token expires the server will return a 401 which I am now handling in my router middleware to then go and refresh the access token associated with the clients session I am using express-session . Here is my code : .. . .. . router.js .. . .. . app.use api require . routes.js .. . .. . routes.js .. . .. . routes.controller.js .. . .. . authController .. . .. . After updating the token I would like to re-issue the original API request that I am triggering using the request module in my fetch controller . I m a bit stumped how I actually go about doing this is there an elegant way to achieve this", "Question : Specs .. . .. . Here s some background info on the system I m running : .. . .. . Ubuntu v 14.04 .. . .. . Node v4.4.0 .. . .. . Node request module v2.69.0 .. . .. . All of this on a DigitalOcean droplet server on a New York-based center . Problem Description .. . .. . So I run the following js file : .. . .. . On my droplet . s Roughly 70-80 of the time I try this s Now every single time I try this I ll get an ETIMEDOUT error like so : .. . .. . Of note the errors seem to come in waves . That is I ll manage to get a handful of requests through for a certain period of time followed by a string of ETIMEDOUT errors . Errors happen more often than I am able to get my requests through by a ratio of approximately 3 : 1 errors to successes . On my own computer Mac running OS X El Capitan running the js file for the given site works with 100 success i.e . I ve never run into this problem before .. . so I m not sure why the problem is contained to my droplet . Any pointers would be appreciated . Research Similar Posts : .. . .. . Node.js 0.4.10 . http-get request ETIMEDOUT Connection timed out frequently https : stackoverflow.com questions 8515706 node-js-0-4-10-http-get-request-etimedout-connection-timed-out-frequentl .. . .. . Why can t I ping herokuapp https : stackoverflow.com questions 23505192 why-cant-i-ping-herokuapp -- starting to get a better picture of what s going on here.. . .. . .. . Problem with http GET request on node js https : stackoverflow.com questions 6882082 problem-with-http-get-request-on-node-js -- seemed helpful at first later realized setting User-Agent probably does nothing significant .. . .. . .. . .. . Additional Info .. . .. . I also feel that it s worth mentioning the site I m trying to make requests at actively has a problem with scripts and web scrapers so I wouldn t be surprised if they tried everything in the book to prevent this from taking place . Possible Causes .. . .. . IP address blocking -- s not the case yet as I will still occasionally get responses from the server s I am no longer able to get any sort of response from the server . This might be the cause but I am really confused at how they might be doing this . No issues on my local machine no issues requesting their page from a browser on my droplet but then this . Rate-limiting of my requests -- if this is somehow the case I would like to know why this is happening specifically on my server and not say on my local machine .. . .. . The manner in which I m making my requests i.e . not through a browser . -- I don t think this is the case because I can run the first script with a 100 response rate on my local computer unless there is something my local computer does before sending my request to their server . The system itself . I ve only tested the first script on my Mac . Perhaps the code runs differently on different OS s systems. . s s .. . .. . Diagnosing with traceroute .. . .. . So as per @ RabeeAbdelWahab s suggestion I attempted to diagnose the problem with traceroute . However I have practically no knowledge of networks so I m not sure how to proceed . Here s an example output : .. . .. . .. . .. . So after running traceroute several more times I notice the following patterns : .. . .. . The outputs begin at some point on or slightly after the 15th hop . The last IP Address before the hops mostly seems to alternate between the same to addresses : 205.251.XXX.XXX slightly more often the case or 54.239.XXX.XXX . In a few select instances I ll get an address like 72.21.222.155 . In addition I have seen no differences when : .. . .. . Running traceroute with the -m 255 option i.e . max number of hops . Running traceroute with the -I option . Running traceroute with the -e option . Running traceroute with the -p 80 or -p 25 options . Running traceroute on a different droplet located in the same data center as the droplet in question . Diagnosing with ping .. . .. . Using ping here s a running list of sites I can and cannot connect to : .. . .. . Can connect .. . .. . google.com .. . .. . facebook.com .. . .. . reddit.com .. . .. . github.com .. . .. . stackoverflow.com .. . .. . youtube.com .. . .. . twitter.com .. . .. . Can t connect : .. . .. . amazon.com .. . .. . microsoft.com .. . .. . apple.com .. . .. . walmart.com .. . .. . paypal.com .. . .. . cnn.com .. . .. . nyt.org .. . .. . wolframalpha.com .. . .. . Observations : Is there a reason why I seem to be able to connect to sites that have social features and otherwise not Apparently it s common for sites not to return replies by ICMP which is what ping traceroute uses . Please disregard the above.. . .. . .. . s s .. . .. . .. . .. . Additional findings .. . .. . So I ve noticed that if I modify my request to take an additional User-Agent header code example provided below I m able to initially get back the html response . I m actually able to get back a response using the above method a few times . Afterwards it seems all my connections lead to the aforementioned ETIMEDOUT error . Then I ll have to wait some lengthy period of time and it s rinse wash and repeat . I actually performed a simple two-tailed proportional test for the above i.e . receiving a response with and without a User-Agent header and got a p-value of 0.8493.. . so no statistical significance between the two . Again please disregard the aforementioned.. . Comment : have you tried to traceroute the request from your droplet and compare it to the local traceroute Comment : howtogeek.com 134132 http : www.howtogeek.com 134132 how-to-use-traceroute-to-identify-network-problems and this is a DO one digitalocean.com community tutorials https : www.digitalocean.com community tutorials how-to-use-traceroute-and-mtr-to-diagnose-network-issues Comment : @RabeeAbdelWahab - ah ok I see . Sounds useful I ll check it out . Thanks Comment : The suggestion then ended up with both requests giving the same outcome i will try to look if I will be able to add something else that could be helpful Comment : Your DO is hosted on NY and what about your current location are you from NY too What happens when you increase your timeout settings Same error after waiting some more time Have you tried using nodejs s http.ClientRequest https : nodejs.org api http.html http class http clientrequest instead of request package .. . Answer : Since you said they had issues and are trying to prevent scraping or something you may be subject to those efforts . Why would you need to keep hitting their page so often I think if you really want it to work you are going to need to fool their anti-scraping systems firewall or whatever . So you can try using a droplet in a different data center city and also try adding headers to imitate a web browser . User-Agent would be the first I would try . Also make sure you don t hit their site too often and get rate limited . Comment : To address your first question I don t believe I am making a whole lot of requests . Definitely not in the hundreds but on the other hand way more than a typical user interfacing with their site via a browser . Either way I am definitely trying to minimize the number of requests I am making in case they do have some sort of detection system set in-place although I am inclined to believe they are not that capable . Comment : To address your main point : In my post you will find that I actually have tried setting the User-Agent under Additional Findings . However it does not seem to yield better results than sending a request without that header attached . This combined with the fact that I have never had problems making requests from my local machine i.e . I get a 100 response rate using the script mentioned in my post leads me to suspect that HOW I m making the requests is not the problem . That said I m also not sure if changing the droplet s location will do what I m looking for . Comment : Anyway I appreciate the time you took to make a reply and I DEFINITELY welcome ANY more suggestions and ideas you might have . Thanks a lot :", "Question : null .. . Answer : My app uses NodeJS Express and Request . I m downloading a bunch of data from an API all within the API s usage limits . It s around 3 000 requests and they all happen fairly simultaneously . After about 1 000 of those requests which return data fine I start seeing Error : read ETIMEDOUT for almost every request . I can manually do a CURL request for the API endpoint from my terminal and it gets a response just fine . Is this a known issue with NodeJS Perhaps an agent pooling issue Or is this likely some sort of call limit on my API s end Comment : 3 000 simultaneous API calls is a lot that would put a burden on the vast majority of APIs out there not to mention the bandwidth issues on both ends depending on how much data is involved . It s likely you re just flooding the pipes or burying the server for a moment . Comment : @EdCottrell Hrm they mention an hourly rate limit for their API but nothing else . it s a CRM so I would ve assumed this isn t something uncommon . What s the suggested solution here using a timeout interval to batch the requests into more manageable chunks Comment : Yep . Also since you said it s a lot of data keep in mind that the problem might be on your end . If each response generates say 100k of data that would be 300 MB of data . Even if the server can handle it it might take so long to get back to your machine that it looks like it timed out because the pipe is full . Comment : If all these requests are to the same endpoint then the default http module in node.js will only make a max of N requests at a time and will queue the rest . It s pretty easy to imagine that if you queue up 3000 of them and they re only being sent 10 at a time that some of the other 2990 in the queue might timeout before they get their turn . I d suggest you only send N at a time where you will have to decide what the value of N should be . Of course it s also possible that you re overwhelming the server too but I d first make sure you don t have a problem on your end . Comment : @jfriend00 Great responses guys thank you .", "Question : null .. . Answer : I have a service in node which makes a POST request to a RESTful API end point to save some data . I m using the request npm module to make POST request and i have URL METHOD HEADERS request body json in this case . When i start the node server i get this error Error : unable to verify the first certificate code : UNABLE TO VERIFY LEAF SIGNATURE Tried googling around the issue and could not find any workable solution so far . I m running everything behind a proxy . Is it something related to SSL if so what would be the optimal solution for this one My node version is v5.6.0 . Comment : Possible duplicate of Unable to verify leaf signature http : stackoverflow.com questions 20082893 unable-to-verify-leaf-signature Comment : Got a chance to view that as well before posting the query but that s more of a workaround and may escalate security concerns . Is there a proper solution for this error without any workarounds . Comment : Any resolution for this issue If so please share Comment : Tried using this require ssl-root-cas latest .inject but still facing the same error . @CoolAJ86 any thoughts", "Question : I have a Node Express app that runs with no problems on the OpenShift cloud . It accepts router.post and router.get just fine . But I want the OpenShift app to also post some data to a Raspberry Pi which is also running a Node and Express app . To accomplish this on the OpenShift app I am using the Node npm-request module . When I run it in the Node dev space at http : tonicdev.com it works just fine . It sends its JSON data to the RPi and the Pi accepts and processes it . enter image description here http : i.stack.imgur.com QX8tO.png .. . .. . But when I run the exact same request code in the node app in the OpenShift cloud it crashes with an EACCES error . Note that I am using the request-debug module which displays the request module headers immediately before the crash . They are as expected to be . enter image description here http : i.stack.imgur.com OYSL6.png .. . .. . What in the devil is going on in the OpenShift environment that is changing the request module s execution causing it to crash and how can I address it .. . Answer : OpenShift Online currently has a whitelist of acceptable outbound ports and port 3000 is probably not in the list . We can add ports to the list but typically we only do this for well-known service ports . Can you run the remote service on a different port such as 80 or 8080 Comment : I sure can try it . I m in full control of the Raspberry Pi . Do you have a link available where I can check on acceptable ports so I can shortcut this problem I have been out of commission for days . I will try 8080 and get back ." ] }
[ "yes-answer-long", "yes-answer-short" ]
http
UNK_RELATION
hybris@pim@155
hybris -- hybris is an sap company delivering enterprise software and on-demand solutions for omni-channel commerce b2b b2c mobile master-data-management @placeholder and order management.the hybris solution is named hybris commerce suite .
{ "confidence": [ 89.79908752441406, 87.26728057861328, 80.76110076904297, 79.43624877929688, 79.16210174560547, 78.44613647460938, 77.80105590820312, 77.80105590820312, 77.40309143066406, 77.26748657226562, 76.71759033203125, 75.08240509033203, 75.08240509033203, 75.08240509033203, 75.08240509033203, 73.53907775878906, 73.19313049316406, 73.01979064941406, 72.69745635986328, 72.66667938232422, 72.61471557617188, 71.55793762207031, 71.55793762207031, 71.55793762207031, 71.09456634521484, 70.90425872802734, 70.90425872802734, 70.47314453125, 70.22216796875, 69.4593734741211, 69.4593734741211, 69.4593734741211, 69.4593734741211, 69.4593734741211, 69.14799499511719, 68.90924835205078, 68.45974731445312, 68.45974731445312, 68.45974731445312, 68.45974731445312, 68.45974731445312, 67.92221069335938, 67.92221069335938, 66.8245620727539, 66.8245620727539, 65.7397689819336, 65.21585845947266, 64.91616821289062, 64.72261810302734, 64.49263000488281, 64.4081802368164, 64.22533416748047, 63.49394989013672, 62.47166442871094, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 62.04812240600586, 61.17597198486328, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 60.412933349609375, 59.889801025390625, 59.547725677490234, 59.32814025878906, 59.32814025878906, 59.32814025878906, 59.32814025878906, 58.6566047668457, 58.6566047668457, 58.6566047668457, 58.6566047668457, 58.027984619140625, 58.027984619140625, 58.027984619140625, 58.027984619140625, 58.027984619140625, 58.027984619140625, 58.027984619140625 ], "content": [ "I m fairly new to Hybris Commerce and its extensions .", "But not working on Hybris Server of Hybris 5.3 .", "I m running a freshly installed Hybris Commerce with the b2c acc recipe on Azure .", "Since version 5.1 hybris no longer ship the tcserver embedded with the hybris Platform .", "I am newbie to hybris .", "After the installation has been completed the chosen directory should contain the structure similar to the example below : And unzipped the downloand file .. . .. . hybris-commerce-suite-5.6.0.2.zip into that path to get.. . .. . .. . README build-tools hybris hybris-Mobile-Apps-SDK hybris-ems hybris-oms hybris-sbg installer licenses .. . .. . And in the 00hybris hybris path .. . .. . bin .. . .. . But Sebastian I cannot find the 00hybris hybris config path after unzipping the download file .. . .. . 4 . : Set Up Apache Ant : To set up Apache Ant perform the following steps : 1 .", "As we know hybris server is hybris modified tomcat server .", "For hybris issues you can better ask the hybris-support .", "This is specific to Hybris .", "The hybris Commerce Suite modules installation creates several sub-directories therefore use short directory paths .", "00hybris hybris bin", "In Hybris two servers available .", "But to be honest this is really the basics of hybris .", "I am new to Hybris .", "Which version of hybris are you on", "For more reference : Hybris wiki https : wiki.hybris.com display hybrisALF Go-live+-+Hybris+Application+Server+Considerations", "it is 3.1 and Hybris version is 5.7.x .", "This is not issue I am just looking a solution for java code hot deployment on hybris server hybris modified tomcat", "It is also based on the Hybris Platform .", "Please follow Hybris Commerce Side trails Optional Preparation Steps to setup your website .", "Typically hybris is used for the entire solution and relies on data being present .", "With https Hybris doesn t load at all .", "I am using hybris 5.4 .", "which hybris version are you working on", "Setting ant home to : C : hybris-5.0 hybris bin platform apache-ant-1.8.2 7 .", "They used it before and now it is not supported by its developers and hybris .", "Why are your products not already synchronized with Hybris", "But I m not sure how to implement this in hybris .", "I want to install a Hybris Commerce 5.7 on an Azure VM Windows Server 2012 D13 configuration for testing .", "wiki.hybris.com display release4 hybris+Server https : wiki.hybris.com display release4 hybris+Server", "wiki.hybris.com display release4 hybris+Server https : wiki.hybris.com display release4 hybris+Server .", "Axis is not working well with hybris as AxisProperties resettled back by hybris taskexecutor running in background .", "I have just started reading Hybris and read somewhere that GenricItem is by default parent of each item in Hybris .", "I try to migrate the version of my application from Hybris 4.8 to Hybris 5.6.0.5 .", "mkdir Created dir : Users mlittle 00hybris hybris log mkdir Created dir : Users mlittle 00hybris hybris data mkdir Created dir : Users mlittle 00hybris hybris temp hybris mkdir Created dir : Users mlittle 00hybris hybris roles input input NO CONFIG FOLDER FOUND input .. . input No config folder was found at Users mlittle 00hybris hybris config .", "Building the hybris Commerce Suite fails if the directory path contains spaces .. . .. . : I have created a directory : .. . .. . 00hybris .. . .. . 3 . : Extract the ZIP archives into the created directory .", "How can I configure tcServer in Hybris", "PS : I cannot post this question in Hybris forum .", "C : hybris bin platform setantenv.bat 6 .", "This is probably introduced with the intention of the Separation of Concerns ideology of hybris .", "Regards Martin .. . .. . Hybris log : .. . .. . Browser log", "yes we are using Hybris for placing Orders only we do not want to store any products in Hybris they will be stored in MDM system only .", "Hybris not known to me but maybe even with hybris could there be some code-snippets included in the question to help others knowing to help you", "The detailed information can be found on the hybris wiki e.g .", "PS : I cannot post questions on Hybris forum .", "Sorry I m new to solr and also novice in Hybris .", "https : wiki.hybris.com display R5T hybris+5+Developer+Training+Trails+5.7+-+Part+II+-+Commerce .. . .. . If you want to proceed with HMC .", "We have a hybris set up without any product data Products are stored in MDM and displayed on front-end using another system Java app .The request is sent to hybris when the user clicks checkout on the upstream system to create products in Hybris .", "And yes its annoying to restart the hybris at every codechange.. . but JRebel is a good solution .", "you are always going to need some product info in hybris .", ".. . .. . Hybris server Tomcat .. . .. . Default Hybris server .. . Optimized and pre-configured server based on Apache Tomcat .. . Production-ready quality and best suited to run all applications of the hybris Multichannel Suite .. . Hybris Server Support is included in the standard hybris Service Level Agreements .. . Independent of the operating-system .. . .. . .. . .. . .. . .. . Tc Server .. . .. . EDIT : main benefit is to simplify work at production site and provide advanced configuration like multiple runtime instance from one binary .", "I am new to hybris and trying to load my apparel store data .", "Basically b2c acc recipe should initialize and run the Hybris platform with b2c accelerator out-of-the-box .", "No I haven t changed this actually what happens I have switched from Hybris5.4 to Hybris 6 so Hybris OOB for ConsignmentEntry status field was String previously but in Hybris 6 they changes it to ConsignmentEntryStatus object so at the time fetching data it was throwing the error .", "by default hybris runs on tomact but i would like to run on tcServer", "I am working on a navigation IMPEX for hybris not really confident with it sorry", "I am using an Hybris 5.5.1 trial for learning purposes .", "I am new to Hybris and was little confused about the structure of an extension in it .", "Do not use directory paths containing spaces such as C : hybris Platform .", "Navigate to the HYBRIS BIN DIR platform directory for example : C : hybris bin platform .", "The problem is because there is an incompatibility between the version hybris was compiled and what is on my machine.. .", "I am not sure why this time is it so challenging to install this hybris instance", "There is some way to point the hybris configuration directory to somewhere else e.g .", "Post the hybris 5.5.1 version there have been significant changes in the platform .", "Do you have any errors in under Hybris logs", "Hybris : product cockpit throws ClassCastException in compare mode for collections .", "You have different options to import new products within Hybris : .. . .. . Use OCC and update the existing ProductController to have a new API method to add a new product .. . Use the ant importimpex target Hybris V6 .. . Use the hot folder CSV to Impex .. . Use Hybris Data-Hub .. . .. . Are you using Hybris to place the orders only", "But I am using Hybris 5.3 which support only java-7 .", "I have created a custom promotion in hybris by overriding the default ProductPercentageDiscountPromotion .", "I have to update the Hybris system to do this but it s not working .", "PS : I don t have authority to post this question on Hybris Forum .", "I want to add categories to a catalog using hotfolder functionality of Hybris .", "PS : I don t have rights to post question on Hybris Wiki and Experts .", "Is there any way to get the java code changed without hybris server restart .", "Where can I find this setting in my Hybris system", "But on hybris wiki I found type hierarchy diagram which is", "I was just trying to be clear about basic concepts of Hybris .", "Whether you have write or not Hybris will implicitly extend this class .", "Did you use an installer recipe to setup hybris if so which one", "I think it is the default functionality of hybris to have two level of approval .", "I read the following links but I cannot find anything about using a converter inside a populator or populator inside of populators : .. . .. . Wiki Hybris - Converters and Populators https : wiki.hybris.com display release5 Converters+and+Populators .. . .. . Wiki Hybris - DTOS best practice https : wiki.hybris.com display release5 Using+Facades+and+DTOs+-+Best+Practice .. . .. . Wiki Hybris 6 https : help.hybris.com 6.0.0 hcd 8b937ff886691014815fcd31ff1de47a.html .. . .. . so can we use converters inside populator like Hybris does", "5 : Perform Build Procedure for hybris Commerce Suite .. . .. . Go to the Windows command-prompt shell in Unix family systems navigate to the HYBRIS BIN DIR platform directory and type ant clean all .", "I am trying to create my own site in hybris 5.3.0.0 .", "Can anyone please suggest how to initiate default site in hybris .", "I ve used the one that hybris bring on his example store .", "In Hybris we are using ClassAttributeAssignment to set the classification attribute for the SolrIndexed Property .", "in Hybris 5.4 i can see this is String in Hybris 6 this is using ENUM ConsignmentEntryStatus @Accessor qualifier status type Accessor.Type.GETTER public ConsignmentEntryStatus getStatus return getPersistenceContext .getPropertyValue STATUS", ": command not found mlittle-mbook1 : platform mlittle pwd Users mlittle 00hybris hybris bin platform c . From Users mlittle 00hybris hybris bin platform I ran mlittle-mbook1 : platform mlittle .", "Found a post regarding this and it also helped to solve the issue : .. . .. . hybris installation issure resolved http : webtech-kapil.blogspot.in 2015 10 hybris-installation-issue-563.html", "Hybris 5.6+ requires Java 8 update your environment-variables to point Java 1.8 .. . .. . More references here : http : hybrisdude.blogspot.com 2015 09 hybris-setup-issue-unsupported.html", "@HristoStaykov In hybris changes in web.xml need system update as well", "Hybris has been added configuration property to adjust session-timeout .", "I m deploying a Hybris application which uses Jawr to a Tomcat server .", "Any error logged Apache or Hybris what is your browser saying", "Could you post any error messages from Apache or Hybris", "It exits with and exit code for me what version of Hybris are you using", "Is there an easy way in hybris to know which Controller serves a certain HTTP request" ] }
{ "confidence": [ 117.37443542480469, 112.67668151855469, 112.67668151855469, 107.25062561035156, 106.83367156982422, 106.55410766601562, 100.94367980957031, 100.06298828125, 98.26631164550781, 94.61670684814453, 94.10879516601562, 94.08865356445312, 93.37725067138672, 92.32024383544922, 89.03987121582031, 89.03231811523438, 88.282958984375, 87.66873931884766, 87.14814758300781, 86.7197265625 ], "content": [ "Question : Can anyone please provide some steps to create a new website using storefront extension . .. . .. . default from hybris .. . .. . I have used modulegen to create new B2C modules with name : jewels so i have 7 extensions generated in custom as jewelscore jewelsstorefront .. . .. . .. . http : localhost : 9001 jewelsstorefront site apparel-uk OR apparel-de is working ok . I want to create my own website here for development perspective and it should be like http : localhost : 9001 jewelsstorefront .. . .. . Please suggest me some steps to create my own website . Comment : Hybris not known to me but maybe even with hybris could there be some code-snippets included in the question to help others knowing to help you We are all coders here .. . .. . Answer : Please follow Hybris Commerce Side trails Optional Preparation Steps to setup your website . https : wiki.hybris.com display R5T hybris+5+Developer+Training+Trails+5.7+-+Part+II+-+Commerce .. . .. . If you want to proceed with HMC . You can follow this link .. . .. . https : wiki.hybris.com display release5 cms2+Extension+Tutorial Comment : Thank you shreshtt", "Question : The installation script reports a Build failure.. . .. . .. . BUILD FAILED .. . .. . It is looking for the path and the file at that path. . Users mlittle hybris bin platform ext core web webroot WEB-INF external-dependencies.xml .. . .. . When one looks in the path I could not find Users mlittle hybris bin platform ext core web Any suggestions Best Regards . Additional information.. . 2015-10-09-0952 EST .. . .. . Step : .. . Procedure : .. . MJL comment 1 : Go to the Download page and download the packages you want to install . : Done .. . .. . 2 . : Create the directory where you will extract the ZIP archives . This directory must meet the following conditions : It must be close to the system root directory for example C : hybris . You may download the files directly to the root directory because the ZIP files already contain directory hybris . Microsoft Windows requires the directory paths to be shorter than 255 characters . Any part of a directory path exceeding this limitation is truncated . The hybris Commerce Suite modules installation creates several sub-directories therefore use short directory paths . Do not use directory paths containing spaces such as C : hybris Platform . Building the hybris Commerce Suite fails if the directory path contains spaces .. . .. . : I have created a directory : .. . .. . 00hybris .. . .. . 3 . : Extract the ZIP archives into the created directory . After the installation has been completed the chosen directory should contain the structure similar to the example below : And unzipped the downloand file .. . .. . hybris-commerce-suite-5.6.0.2.zip into that path to get.. . .. . .. . README build-tools hybris hybris-Mobile-Apps-SDK hybris-ems hybris-oms hybris-sbg installer licenses .. . .. . And in the 00hybris hybris path .. . .. . bin .. . .. . But Sebastian I cannot find the 00hybris hybris config path after unzipping the download file .. . .. . 4 . : Set Up Apache Ant : To set up Apache Ant perform the following steps : 1 . Open a command-prompt in Microsoft Windows shell in Unix family systems . 2 . Navigate to the HYBRIS BIN DIR platform directory for example : C : hybris bin platform . 3 . On Microsoft Windows systems run the setantenv.bat file by entering setantenv.bat . Do not close the command window . 4 . On Unix-based systems like Mac OS X or Linux run setantenv.sh by entering . . setantenv.sh . Do not close the command window . 5 . C : hybris bin platform setantenv.bat 6 . Setting ant home to : C : hybris-5.0 hybris bin platform apache-ant-1.8.2 7 . Apache Ant TM version 1.8.2 compiled on March 26 2013 .. . .. . : With this. . a . created a new shell session b . Navigated to 00hybris hybris bin platform .. . .. . mlittle-mbook1 : hybris mlittle cd bin platform mlittle-mbook1 : platform mlittle pwd . -bash : pwd . : command not found mlittle-mbook1 : platform mlittle pwd Users mlittle 00hybris hybris bin platform c . From Users mlittle 00hybris hybris bin platform I ran mlittle-mbook1 : platform mlittle . . setantenv.sh with the result .. . .. . mlittle-mbook1 : platform mlittle . . setantenv.sh mlittle-mbook1 : platform mlittle .. . .. . It appeared to run but it gave back no response : why 5 : Perform Build Procedure for hybris Commerce Suite .. . .. . Go to the Windows command-prompt shell in Unix family systems navigate to the HYBRIS BIN DIR platform directory and type ant clean all . : See response below .. . .. . mlittle-mbook1 : platform mlittle ant clean all Buildfile : Users mlittle 00hybris hybris bin platform build.xml echo Users mlittle 00hybris hybris bin platform tomcat bin echo Users mlittle 00hybris hybris bin platform ext core web webroot WEB-INF external-dependencies.xml was not found mkdir Created dir : Users mlittle 00hybris hybris log mkdir Created dir : Users mlittle 00hybris hybris data mkdir Created dir : Users mlittle 00hybris hybris temp hybris mkdir Created dir : Users mlittle 00hybris hybris roles input input NO CONFIG FOLDER FOUND input .. . input No config folder was found at Users mlittle 00hybris hybris config . input A fresh folder containing basic configuration-files and the hybris input demo licence will be created for your convenience . input Please adjust and review the configuration-files and license and input call ant again . This directory will never be overridden or input touched again . Always use this configuration folder for configuration input of platform do not change anything within the platform folder . input input Please choose the configuration template . input Press Enter to use the default-value develop production .. . .. . BUILD FAILED Users mlittle 00hybris hybris bin platform build.xml : 20 : The following error occurred while executing this line : Users mlittle 00hybris hybris bin platform resources ant antmacros.xml : 123 : java.lang.UnsupportedClassVersionError : de hybris ant taskdefs DbDriverValidator : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1 Native Method at java.lang.ClassLoader.defineClass ClassLoader.java : 791 at org.apache.tools.ant.AntClassLoader.defineClassFromData AntClassLoader.java : 1128 at org.apache.tools.ant.AntClassLoader.getClassFromStream AntClassLoader.java : 1299 at org.apache.tools.ant.AntClassLoader.findClassInComponents AntClassLoader.java : 1354 at org.apache.tools.ant.AntClassLoader.findClass AntClassLoader.java : 1315 at org.apache.tools.ant.AntClassLoader.loadClass AntClassLoader.java : 1068 at java.lang.ClassLoader.loadClass ClassLoader.java : 356 at java.lang.Class.forName0 Native Method at java.lang.Class.forName Class.java : 266 at org.apache.tools.ant.taskdefs.Definer.addDefinition Definer.java : 579 at org.apache.tools.ant.taskdefs.Definer.execute Definer.java : 237 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.taskdefs.Sequential.execute Sequential.java : 68 at net.sf.antcontrib.logic.IfTask.execute IfTask.java : 217 at sun.reflect.GeneratedMethodAccessor19.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.TaskAdapter.execute TaskAdapter.java : 154 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 168 at org.apache.tools.ant.taskdefs.ImportTask.importResource ImportTask.java : 230 at org.apache.tools.ant.taskdefs.ImportTask.execute ImportTask.java : 162 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.NativeMethodAccessorImpl.invoke0 Native Method at sun.reflect.NativeMethodAccessorImpl.invoke NativeMethodAccessorImpl.java : 57 at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 179 at org.apache.tools.ant.ProjectHelper.configureProject ProjectHelper.java : 93 at org.apache.tools.ant.Main.runBuild Main.java : 826 at org.apache.tools.ant.Main.startAnt Main.java : 235 at org.apache.tools.ant.launch.Launcher.run Launcher.java : 280 at org.apache.tools.ant.launch.Launcher.main Launcher.java : 109 .. . .. . Total time : 21 seconds mlittle-mbook1 : platform mlittle .. . .. . 5 : Continued Checking what this has done a . it has created a directory structure under 00hybris hybris : .. . .. . bin config data log path.txt path2.txt roles temp .. . .. . And opening the 00Hybris hybris config localextensions.xml file. . It does not seem to have populated the variable with the value for HYBRIS BIN DIR .. . 00hybris hybris bin 2015-10-10-1726EST .. . .. . OK.. . investigated.. . The problem is because there is an incompatibility between the version hybris was compiled and what is on my machine.. . Comment : can you post your localextensions.xml file Did you use the installer recipes to create the localextensions.xml If so which one the localextenions.xml file is in hybris config Can you also post the exact exception failure coming back from ant It usually gives hints and linenumbers as to where it fails Comment : Hello Sebastian thank you.. . standby.. . Comment : Hello Sebastian. . see my comments above.. . standby.. . Comment : Hi Sebastian.. . see response above. . my thought is to manually edit my 00hybris hybris config localextensions.xml with the path for HYBRIS BIN DIR .. . 00hybris hybris bin However when I ran . . setantenv.sh it appears not to have ran correctly as it did not respond as per the Hybris installation instructions.. . in which indicated that I should have a response indicating the Home path but I did not get a response.. . why How to fix .. . Answer : Found a post regarding this and it also helped to solve the issue : .. . .. . hybris installation issure resolved http : webtech-kapil.blogspot.in 2015 10 hybris-installation-issue-563.html", "Question : The installation script reports a Build failure.. . .. . .. . BUILD FAILED .. . .. . It is looking for the path and the file at that path. . Users mlittle hybris bin platform ext core web webroot WEB-INF external-dependencies.xml .. . .. . When one looks in the path I could not find Users mlittle hybris bin platform ext core web Any suggestions Best Regards . Additional information.. . 2015-10-09-0952 EST .. . .. . Step : .. . Procedure : .. . MJL comment 1 : Go to the Download page and download the packages you want to install . : Done .. . .. . 2 . : Create the directory where you will extract the ZIP archives . This directory must meet the following conditions : It must be close to the system root directory for example C : hybris . You may download the files directly to the root directory because the ZIP files already contain directory hybris . Microsoft Windows requires the directory paths to be shorter than 255 characters . Any part of a directory path exceeding this limitation is truncated . The hybris Commerce Suite modules installation creates several sub-directories therefore use short directory paths . Do not use directory paths containing spaces such as C : hybris Platform . Building the hybris Commerce Suite fails if the directory path contains spaces .. . .. . : I have created a directory : .. . .. . 00hybris .. . .. . 3 . : Extract the ZIP archives into the created directory . After the installation has been completed the chosen directory should contain the structure similar to the example below : And unzipped the downloand file .. . .. . hybris-commerce-suite-5.6.0.2.zip into that path to get.. . .. . .. . README build-tools hybris hybris-Mobile-Apps-SDK hybris-ems hybris-oms hybris-sbg installer licenses .. . .. . And in the 00hybris hybris path .. . .. . bin .. . .. . But Sebastian I cannot find the 00hybris hybris config path after unzipping the download file .. . .. . 4 . : Set Up Apache Ant : To set up Apache Ant perform the following steps : 1 . Open a command-prompt in Microsoft Windows shell in Unix family systems . 2 . Navigate to the HYBRIS BIN DIR platform directory for example : C : hybris bin platform . 3 . On Microsoft Windows systems run the setantenv.bat file by entering setantenv.bat . Do not close the command window . 4 . On Unix-based systems like Mac OS X or Linux run setantenv.sh by entering . . setantenv.sh . Do not close the command window . 5 . C : hybris bin platform setantenv.bat 6 . Setting ant home to : C : hybris-5.0 hybris bin platform apache-ant-1.8.2 7 . Apache Ant TM version 1.8.2 compiled on March 26 2013 .. . .. . : With this. . a . created a new shell session b . Navigated to 00hybris hybris bin platform .. . .. . mlittle-mbook1 : hybris mlittle cd bin platform mlittle-mbook1 : platform mlittle pwd . -bash : pwd . : command not found mlittle-mbook1 : platform mlittle pwd Users mlittle 00hybris hybris bin platform c . From Users mlittle 00hybris hybris bin platform I ran mlittle-mbook1 : platform mlittle . . setantenv.sh with the result .. . .. . mlittle-mbook1 : platform mlittle . . setantenv.sh mlittle-mbook1 : platform mlittle .. . .. . It appeared to run but it gave back no response : why 5 : Perform Build Procedure for hybris Commerce Suite .. . .. . Go to the Windows command-prompt shell in Unix family systems navigate to the HYBRIS BIN DIR platform directory and type ant clean all . : See response below .. . .. . mlittle-mbook1 : platform mlittle ant clean all Buildfile : Users mlittle 00hybris hybris bin platform build.xml echo Users mlittle 00hybris hybris bin platform tomcat bin echo Users mlittle 00hybris hybris bin platform ext core web webroot WEB-INF external-dependencies.xml was not found mkdir Created dir : Users mlittle 00hybris hybris log mkdir Created dir : Users mlittle 00hybris hybris data mkdir Created dir : Users mlittle 00hybris hybris temp hybris mkdir Created dir : Users mlittle 00hybris hybris roles input input NO CONFIG FOLDER FOUND input .. . input No config folder was found at Users mlittle 00hybris hybris config . input A fresh folder containing basic configuration-files and the hybris input demo licence will be created for your convenience . input Please adjust and review the configuration-files and license and input call ant again . This directory will never be overridden or input touched again . Always use this configuration folder for configuration input of platform do not change anything within the platform folder . input input Please choose the configuration template . input Press Enter to use the default-value develop production .. . .. . BUILD FAILED Users mlittle 00hybris hybris bin platform build.xml : 20 : The following error occurred while executing this line : Users mlittle 00hybris hybris bin platform resources ant antmacros.xml : 123 : java.lang.UnsupportedClassVersionError : de hybris ant taskdefs DbDriverValidator : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1 Native Method at java.lang.ClassLoader.defineClass ClassLoader.java : 791 at org.apache.tools.ant.AntClassLoader.defineClassFromData AntClassLoader.java : 1128 at org.apache.tools.ant.AntClassLoader.getClassFromStream AntClassLoader.java : 1299 at org.apache.tools.ant.AntClassLoader.findClassInComponents AntClassLoader.java : 1354 at org.apache.tools.ant.AntClassLoader.findClass AntClassLoader.java : 1315 at org.apache.tools.ant.AntClassLoader.loadClass AntClassLoader.java : 1068 at java.lang.ClassLoader.loadClass ClassLoader.java : 356 at java.lang.Class.forName0 Native Method at java.lang.Class.forName Class.java : 266 at org.apache.tools.ant.taskdefs.Definer.addDefinition Definer.java : 579 at org.apache.tools.ant.taskdefs.Definer.execute Definer.java : 237 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.taskdefs.Sequential.execute Sequential.java : 68 at net.sf.antcontrib.logic.IfTask.execute IfTask.java : 217 at sun.reflect.GeneratedMethodAccessor19.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.TaskAdapter.execute TaskAdapter.java : 154 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 168 at org.apache.tools.ant.taskdefs.ImportTask.importResource ImportTask.java : 230 at org.apache.tools.ant.taskdefs.ImportTask.execute ImportTask.java : 162 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.NativeMethodAccessorImpl.invoke0 Native Method at sun.reflect.NativeMethodAccessorImpl.invoke NativeMethodAccessorImpl.java : 57 at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 179 at org.apache.tools.ant.ProjectHelper.configureProject ProjectHelper.java : 93 at org.apache.tools.ant.Main.runBuild Main.java : 826 at org.apache.tools.ant.Main.startAnt Main.java : 235 at org.apache.tools.ant.launch.Launcher.run Launcher.java : 280 at org.apache.tools.ant.launch.Launcher.main Launcher.java : 109 .. . .. . Total time : 21 seconds mlittle-mbook1 : platform mlittle .. . .. . 5 : Continued Checking what this has done a . it has created a directory structure under 00hybris hybris : .. . .. . bin config data log path.txt path2.txt roles temp .. . .. . And opening the 00Hybris hybris config localextensions.xml file. . It does not seem to have populated the variable with the value for HYBRIS BIN DIR .. . 00hybris hybris bin 2015-10-10-1726EST .. . .. . OK.. . investigated.. . The problem is because there is an incompatibility between the version hybris was compiled and what is on my machine.. . Comment : can you post your localextensions.xml file Did you use the installer recipes to create the localextensions.xml If so which one the localextenions.xml file is in hybris config Can you also post the exact exception failure coming back from ant It usually gives hints and linenumbers as to where it fails Comment : Hello Sebastian thank you.. . standby.. . Comment : Hello Sebastian. . see my comments above.. . standby.. . Comment : Hi Sebastian.. . see response above. . my thought is to manually edit my 00hybris hybris config localextensions.xml with the path for HYBRIS BIN DIR .. . 00hybris hybris bin However when I ran . . setantenv.sh it appears not to have ran correctly as it did not respond as per the Hybris installation instructions.. . in which indicated that I should have a response indicating the Home path but I did not get a response.. . why How to fix .. . Answer : Hybris 5.6+ requires Java 8 update your environment-variables to point Java 1.8 .. . .. . More references here : http : hybrisdude.blogspot.com 2015 09 hybris-setup-issue-unsupported.html", "Question : The installation script reports a Build failure.. . .. . .. . BUILD FAILED .. . .. . It is looking for the path and the file at that path. . Users mlittle hybris bin platform ext core web webroot WEB-INF external-dependencies.xml .. . .. . When one looks in the path I could not find Users mlittle hybris bin platform ext core web Any suggestions Best Regards . Additional information.. . 2015-10-09-0952 EST .. . .. . Step : .. . Procedure : .. . MJL comment 1 : Go to the Download page and download the packages you want to install . : Done .. . .. . 2 . : Create the directory where you will extract the ZIP archives . This directory must meet the following conditions : It must be close to the system root directory for example C : hybris . You may download the files directly to the root directory because the ZIP files already contain directory hybris . Microsoft Windows requires the directory paths to be shorter than 255 characters . Any part of a directory path exceeding this limitation is truncated . The hybris Commerce Suite modules installation creates several sub-directories therefore use short directory paths . Do not use directory paths containing spaces such as C : hybris Platform . Building the hybris Commerce Suite fails if the directory path contains spaces .. . .. . : I have created a directory : .. . .. . 00hybris .. . .. . 3 . : Extract the ZIP archives into the created directory . After the installation has been completed the chosen directory should contain the structure similar to the example below : And unzipped the downloand file .. . .. . hybris-commerce-suite-5.6.0.2.zip into that path to get.. . .. . .. . README build-tools hybris hybris-Mobile-Apps-SDK hybris-ems hybris-oms hybris-sbg installer licenses .. . .. . And in the 00hybris hybris path .. . .. . bin .. . .. . But Sebastian I cannot find the 00hybris hybris config path after unzipping the download file .. . .. . 4 . : Set Up Apache Ant : To set up Apache Ant perform the following steps : 1 . Open a command-prompt in Microsoft Windows shell in Unix family systems . 2 . Navigate to the HYBRIS BIN DIR platform directory for example : C : hybris bin platform . 3 . On Microsoft Windows systems run the setantenv.bat file by entering setantenv.bat . Do not close the command window . 4 . On Unix-based systems like Mac OS X or Linux run setantenv.sh by entering . . setantenv.sh . Do not close the command window . 5 . C : hybris bin platform setantenv.bat 6 . Setting ant home to : C : hybris-5.0 hybris bin platform apache-ant-1.8.2 7 . Apache Ant TM version 1.8.2 compiled on March 26 2013 .. . .. . : With this. . a . created a new shell session b . Navigated to 00hybris hybris bin platform .. . .. . mlittle-mbook1 : hybris mlittle cd bin platform mlittle-mbook1 : platform mlittle pwd . -bash : pwd . : command not found mlittle-mbook1 : platform mlittle pwd Users mlittle 00hybris hybris bin platform c . From Users mlittle 00hybris hybris bin platform I ran mlittle-mbook1 : platform mlittle . . setantenv.sh with the result .. . .. . mlittle-mbook1 : platform mlittle . . setantenv.sh mlittle-mbook1 : platform mlittle .. . .. . It appeared to run but it gave back no response : why 5 : Perform Build Procedure for hybris Commerce Suite .. . .. . Go to the Windows command-prompt shell in Unix family systems navigate to the HYBRIS BIN DIR platform directory and type ant clean all . : See response below .. . .. . mlittle-mbook1 : platform mlittle ant clean all Buildfile : Users mlittle 00hybris hybris bin platform build.xml echo Users mlittle 00hybris hybris bin platform tomcat bin echo Users mlittle 00hybris hybris bin platform ext core web webroot WEB-INF external-dependencies.xml was not found mkdir Created dir : Users mlittle 00hybris hybris log mkdir Created dir : Users mlittle 00hybris hybris data mkdir Created dir : Users mlittle 00hybris hybris temp hybris mkdir Created dir : Users mlittle 00hybris hybris roles input input NO CONFIG FOLDER FOUND input .. . input No config folder was found at Users mlittle 00hybris hybris config . input A fresh folder containing basic configuration-files and the hybris input demo licence will be created for your convenience . input Please adjust and review the configuration-files and license and input call ant again . This directory will never be overridden or input touched again . Always use this configuration folder for configuration input of platform do not change anything within the platform folder . input input Please choose the configuration template . input Press Enter to use the default-value develop production .. . .. . BUILD FAILED Users mlittle 00hybris hybris bin platform build.xml : 20 : The following error occurred while executing this line : Users mlittle 00hybris hybris bin platform resources ant antmacros.xml : 123 : java.lang.UnsupportedClassVersionError : de hybris ant taskdefs DbDriverValidator : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1 Native Method at java.lang.ClassLoader.defineClass ClassLoader.java : 791 at org.apache.tools.ant.AntClassLoader.defineClassFromData AntClassLoader.java : 1128 at org.apache.tools.ant.AntClassLoader.getClassFromStream AntClassLoader.java : 1299 at org.apache.tools.ant.AntClassLoader.findClassInComponents AntClassLoader.java : 1354 at org.apache.tools.ant.AntClassLoader.findClass AntClassLoader.java : 1315 at org.apache.tools.ant.AntClassLoader.loadClass AntClassLoader.java : 1068 at java.lang.ClassLoader.loadClass ClassLoader.java : 356 at java.lang.Class.forName0 Native Method at java.lang.Class.forName Class.java : 266 at org.apache.tools.ant.taskdefs.Definer.addDefinition Definer.java : 579 at org.apache.tools.ant.taskdefs.Definer.execute Definer.java : 237 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.taskdefs.Sequential.execute Sequential.java : 68 at net.sf.antcontrib.logic.IfTask.execute IfTask.java : 217 at sun.reflect.GeneratedMethodAccessor19.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.TaskAdapter.execute TaskAdapter.java : 154 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.GeneratedMethodAccessor4.invoke Unknown Source at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 168 at org.apache.tools.ant.taskdefs.ImportTask.importResource ImportTask.java : 230 at org.apache.tools.ant.taskdefs.ImportTask.execute ImportTask.java : 162 at org.apache.tools.ant.UnknownElement.execute UnknownElement.java : 292 at sun.reflect.NativeMethodAccessorImpl.invoke0 Native Method at sun.reflect.NativeMethodAccessorImpl.invoke NativeMethodAccessorImpl.java : 57 at sun.reflect.DelegatingMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java : 43 at java.lang.reflect.Method.invoke Method.java : 601 at org.apache.tools.ant.dispatch.DispatchUtils.execute DispatchUtils.java : 106 at org.apache.tools.ant.Task.perform Task.java : 348 at org.apache.tools.ant.Target.execute Target.java : 435 at org.apache.tools.ant.helper.ProjectHelper2.parse ProjectHelper2.java : 179 at org.apache.tools.ant.ProjectHelper.configureProject ProjectHelper.java : 93 at org.apache.tools.ant.Main.runBuild Main.java : 826 at org.apache.tools.ant.Main.startAnt Main.java : 235 at org.apache.tools.ant.launch.Launcher.run Launcher.java : 280 at org.apache.tools.ant.launch.Launcher.main Launcher.java : 109 .. . .. . Total time : 21 seconds mlittle-mbook1 : platform mlittle .. . .. . 5 : Continued Checking what this has done a . it has created a directory structure under 00hybris hybris : .. . .. . bin config data log path.txt path2.txt roles temp .. . .. . And opening the 00Hybris hybris config localextensions.xml file. . It does not seem to have populated the variable with the value for HYBRIS BIN DIR .. . 00hybris hybris bin 2015-10-10-1726EST .. . .. . OK.. . investigated.. . The problem is because there is an incompatibility between the version hybris was compiled and what is on my machine.. . Comment : can you post your localextensions.xml file Did you use the installer recipes to create the localextensions.xml If so which one the localextenions.xml file is in hybris config Can you also post the exact exception failure coming back from ant It usually gives hints and linenumbers as to where it fails Comment : Hello Sebastian thank you.. . standby.. . Comment : Hello Sebastian. . see my comments above.. . standby.. . Comment : Hi Sebastian.. . see response above. . my thought is to manually edit my 00hybris hybris config localextensions.xml with the path for HYBRIS BIN DIR .. . 00hybris hybris bin However when I ran . . setantenv.sh it appears not to have ran correctly as it did not respond as per the Hybris installation instructions.. . in which indicated that I should have a response indicating the Home path but I did not get a response.. . why How to fix .. . Answer : I think the root cause of the problem might be the wrong java version : .. . .. . indicates a java version conflict . Hybris 5.6 should work with java you can check at https : wiki.hybris.com display release5 System+Requirements+-+Release+5.6 .. . .. . Do you maybe have java-6 installed You can see via .. . .. . To be sure you should use java-8 as per https : wiki.hybris.com display general Third-Party+Compatibility+-+Release+5.6 btw you can also signup for the https : experts.hybris.com forum to get more in-depth hybris answers Comment : Thanks Sebastian standby.. . I have also put my questions to experts.hybris.com but I have had no response I am not impressed with the poor response on their internal forum that is why I posted here and I do appreciate your help.. . From terminal. . mlittle-mbook1 : mlittle java -version java version 1.7.0 21 Java TM SE Runtime Environment build 1.7.0 21-b12 Java HotSpot TM 64-Bit Server VM build 23.21-b01 mixed-mode mlittle-mbook1 : mlittle But preferences indicates Java 8. . update 60 standby.. . Comment : Weird I have just downloaded and installed Java 8 Update 60 and re-ran java - version but it is still indicating.. . java version 1.7.0 21 What gives.. . I shall restart my machine. . Comment : see comment above.. . problem with setting downloading and setting java home.. . Comment : I have found there is a problem with my installation of the Java JDK on my MacBook I have re-install Java 8 but there are problems with the Java home and Ant.. . I have posted an issue at stackoverflow.com questions 33062606 http : stackoverflow.com questions 33062606 difficulties-with-updating-my-mac-to-the-latest-java-jdk Comment : thank you the problem was to do with the java-home path .", "Question : In Hybris two servers available . One is tcServer and second is tomcat server . What is the use of the two servers and why these two and what are their purpose Is it mandatory to use these two .. . Answer : Although hybris provides you 2 application servers Tomcat tcServer to choose from and use for your development testing by default only Tomcat is configured to be used without doing any additional configuration i.e . when you build and run hybris server without any change in configuration Tomcat is used . If you want to switch to tcServer which is another powerful application server you can update the configuration and switch to it as it is readily available in your hybris commerce suite download . In case you like to use any other application server e.g . WebLogic you will have to download it separately and deal with the licensing terms . Thanks Arvind", "Question : I want to install a Hybris Commerce 5.7 on an Azure VM Windows Server 2012 D13 configuration for testing . The install.bat -r b2c acc command builds successfull but on install.bat -r b2c acc initialize I get the following error : .. . .. . I added the 8983 port to the VM s endpoints but that didn t help . Any idea what causes this error Comment : Are you sure initialize command should work with gradle recipes Basically b2c acc recipe should initialize and run the Hybris platform with b2c accelerator out-of-the-box . If you want to perform manual initialization you should go to platform bin directory in commerce suite make sure you have ant installed and optionally call ant clean and then call ant initialize . Make sure you have correctly configured localextensions.xml file and all your neccessary extensions are there . Comment : Is this the full error trace Anything else listing on 8983 Is your account an administrator account Comment : @piotr.wittchen the command should be fine and the recipe should have created the correct localextensions.xml . To me this sounds a bit like a potential windows specific problem regarding running solr as a service maybe user rights etc . Comment : The Windows user is an administrator account . Also the same files and commands work on my local machine . The problem indeed seems to be related to Solr . Any idea what I could do Comment : Configure a separate Solr server rather using the one bundled with the ECP .. . Answer : I am pretty sure you have something using your port 8983 I would say it s probably another Solr instance . Try accessing .. . .. . http : localhost : 8983 solr .. . .. . If you re able to access the solr server that s your problem . You can stop it running this command from hybris bin platform : .. . .. . To avoid this happening whenever you stop your hybris instance you should wait for Solr to finish gracefully instead of trying to kill the process multiple times . Comment : No as I wrote above using the pre-installed by Azure Administrator user the initialize process builds fine .", "Question : We have a hybris set up without any product data Products are stored in MDM and displayed on front-end using another system Java app .The request is sent to hybris when the user clicks checkout on the upstream system to create products in Hybris . Is there an OOTB API in hybris which allows us to create the products with all mandatory fields dynamically . .. . Answer : You have different options to import new products within Hybris : .. . .. . Use OCC and update the existing ProductController to have a new API method to add a new product .. . Use the ant importimpex target Hybris V6 .. . Use the hot folder CSV to Impex .. . Use Hybris Data-Hub .. . .. . Are you using Hybris to place the orders only Why are your products not already synchronized with Hybris Comment : yes we are using Hybris for placing Orders only we do not want to store any products in Hybris they will be stored in MDM system only . Comment : Then the best solution to me would be to have an ESB Datahub or other between two systems with real-time synchronization . Comment : you are always going to need some product info in hybris . OCC is not designed for this . Typically hybris is used for the entire solution and relies on data being present .", "Question : I m fairly new to Hybris Commerce and its extensions . I installed Hybris 5.7 and 6 and hopefully installed the platformwebservices extensions this way : .. . .. . I added these entries to localextensions.xml : .. . .. . .. . extension name tomcatembeddedserver .. . extension name platformservices .. . extension name lucenesearch .. . extension name platformwebservices .. . .. . .. . Ran ant clean all .. . Started the Hybris Server .. . .. . In the admin UI under Platform Extensions I see this : .. . .. . enter image description here http : i.stack.imgur.com JEKZ0.png .. . .. . What do those two red X mean for the platformwebservices extension . Are the rest services now exposed EDIT : It seems the services are running . But I get a 403 Forbidden response . This is what I enter with cUrl : .. . Answer : Found the solution : It seems that the admin user was not part of the webservicegroup . After performing a system update with Create essential data checkbox checked that usergroup was created and it finally worked .", "Question : In Hybris two servers available . One is tcServer and second is tomcat server . What is the use of the two servers and why these two and what are their purpose Is it mandatory to use these two .. . Answer : Both Hybris server Tomcat and tcServer come with hybris installation you can select the one that fit your requirements Tomcat is enough most of the time and I personally never used Tc Server . .. . .. . Hybris server Tomcat .. . .. . Default Hybris server .. . Optimized and pre-configured server based on Apache Tomcat .. . Production-ready quality and best suited to run all applications of the hybris Multichannel Suite .. . Hybris Server Support is included in the standard hybris Service Level Agreements .. . Independent of the operating-system .. . .. . .. . .. . .. . .. . Tc Server .. . .. . EDIT : main benefit is to simplify work at production site and provide advanced configuration like multiple runtime instance from one binary . Tc Server or SpringSource tcServer doc http : static.springsource.com projects tc-server 2.5 getting-started html index.html is an enterprise version of Apache Tomcat .. . .. . Can be activated with : bundled.server.type tcserver .. . Simplifies work at production site monitoring deadlock detection Garbage metrics ams Comment : wiki.hybris.com display release4 hybris+Server https : wiki.hybris.com display release4 hybris+Server . wiki.hybris.com display release4 SpringSource+tc+Server https : wiki.hybris.com display release4 SpringSource+tc+Server .. . wiki.hybris.com display release4 Oracle+WebLogic+10.3 https : wiki.hybris.com display release4 Oracle+WebLogic+10.3 ..... . wiki.hybris.com display release4 IBM+WebSphere+7.0 https : wiki.hybris.com display release4 IBM+WebSphere+7.0 . . But in the suite default have two servers tcserver and tomcat but what is the benefit of tcserver . Comment : It has built-in tools for monitoring it s based on Tomcat so it s not a big difference The benefit in my EDIT", "Question : I m fairly new to Hybris Commerce and its extensions . I installed Hybris 5.7 and 6 and hopefully installed the platformwebservices extensions this way : .. . .. . I added these entries to localextensions.xml : .. . .. . .. . extension name tomcatembeddedserver .. . extension name platformservices .. . extension name lucenesearch .. . extension name platformwebservices .. . .. . .. . Ran ant clean all .. . Started the Hybris Server .. . .. . In the admin UI under Platform Extensions I see this : .. . .. . enter image description here http : i.stack.imgur.com JEKZ0.png .. . .. . What do those two red X mean for the platformwebservices extension . Are the rest services now exposed EDIT : It seems the services are running . But I get a 403 Forbidden response . This is what I enter with cUrl : .. . Answer : It just says whether that particular extension contains that hyrbis module or not . You could see it to the right on small panel on the same screen as mentioned in your question . Hybris Info http : i.stack.imgur.com eAhYJ.jpg .. . .. . I am not sure exactly how platformwebservices extension work as I never used it . Regarding webservices you need to add webmodule to your extension and then you can use spring based controllers to expose webservices . Might need to add following line to your extensions info to add webmodule .", "Question : I want to install a Hybris Commerce 5.7 on an Azure VM Windows Server 2012 D13 configuration for testing . The install.bat -r b2c acc command builds successfull but on install.bat -r b2c acc initialize I get the following error : .. . .. . I added the 8983 port to the VM s endpoints but that didn t help . Any idea what causes this error Comment : Are you sure initialize command should work with gradle recipes Basically b2c acc recipe should initialize and run the Hybris platform with b2c accelerator out-of-the-box . If you want to perform manual initialization you should go to platform bin directory in commerce suite make sure you have ant installed and optionally call ant clean and then call ant initialize . Make sure you have correctly configured localextensions.xml file and all your neccessary extensions are there . Comment : Is this the full error trace Anything else listing on 8983 Is your account an administrator account Comment : @piotr.wittchen the command should be fine and the recipe should have created the correct localextensions.xml . To me this sounds a bit like a potential windows specific problem regarding running solr as a service maybe user rights etc . Comment : The Windows user is an administrator account . Also the same files and commands work on my local machine . The problem indeed seems to be related to Solr . Any idea what I could do Comment : Configure a separate Solr server rather using the one bundled with the ECP .. . Answer : Found the solution : Using the pre-installed by Azure Administrator user the initialize process built fine . Don t know why it wouldn t work with my other account which is set to admin .", "Question : I m running a freshly installed Hybris Commerce with the b2c acc recipe on Azure . Everything seems to run fine besides Live editing in the WCMS module . When I click on Live Edit and then on one of the sites I get this error message : .. . .. . Am I missing something Comment : Are you using the cockpit in https Comment : Please show the URL that you are using in the browser Comment : This is the URL : localhost : 9001 cmscockpit index.zul http : localhost : 9001 cmscockpit index.zul . With https Hybris doesn t load at all . .. . Answer : Can you please try it with : .. . .. . http : hybris.local : 9001 cmscockpit .. . .. . or .. . .. . localhost : 9001 cmscockpit .. . .. . I think there is an issue with the URL . As you see the Nullpointer exception is in DefaultUrlEncoderService", "Question : In Hybris two servers available . One is tcServer and second is tomcat server . What is the use of the two servers and why these two and what are their purpose Is it mandatory to use these two .. . Answer : The gist is : Hybris needs a web server to run in as all of its administrative interfaces hac hmc cockpits backoffice are web UIs but also a lot of customers will run webstores integrated with hybris . Hybris supports both tomcat and tcServer as well as some other application servers most notably Weblogic and WebSphere afaik . The detailed information can be found on the hybris wiki e.g . : .. . .. . https : wiki.hybris.com display release4 SpringSource+tc+Server https : wiki.hybris.com display release5 Third-Party+Application+Servers .. . .. . Note that support always depends on the hybris version you end up using but for tomcat and tcServer those are bundled with the hybris download . If you don t have a hybris wiki account yet I strongly suggest you get one it s free : as you will find a lot of information there plus there is also a forum at http : experts.hybris.com with quite some activity .. . .. . Hope this helps .. . .. . Sebastian Comment : wiki.hybris.com display release4 hybris+Server https : wiki.hybris.com display release4 hybris+Server Comment : wiki.hybris.com display release4 hybris+Server https : wiki.hybris.com display release4 hybris+Server . wiki.hybris.com display release4 SpringSource+tc+Server https : wiki.hybris.com display release4 SpringSource+tc+Server .. . wiki.hybris.com display release4 Oracle+WebLogic+10.3 https : wiki.hybris.com display release4 Oracle+WebLogic+10.3 ..... . wiki.hybris.com display release4 IBM+WebSphere+7.0 https : wiki.hybris.com display release4 IBM+WebSphere+7.0 . . But in the suite default have two servers tcserver and tomcat but what is the benefit of tcserver .", "Question : Is there any way to get the java code changed without hybris server restart . Its taking long time for each java code change and then server restart . Development time get increase and productivity decrease . One way is JRebel but that is license tool and evaluation version last till 15 days only . I am looking for any opensource tool or specific configuration to reflect java code changes without server restart . I am using hybris 5.4 . As we know hybris server is hybris modified tomcat server . Comment : Have a look here : stackoverflow.com questions 7998669 http : stackoverflow.com questions 7998669 redeploy-alternatives-to-jrebel .. . Answer : For hybris issues you can better ask the hybris-support . Besides of that as I developed in hybris I used JRebel which worked very good . I dont know other helpful things for that . And yes its annoying to restart the hybris at every codechange.. . but JRebel is a good solution . Comment : yes I know JRebel is good but its licence one . This is not issue I am just looking a solution for java code hot deployment on hybris server hybris modified tomcat", "Question : 2015-10-13 : 2043 Here is a screen shot of the intalled extensions.. . Screen shot of the Hybris installed extensions from the HAC http : i.stack.imgur.com dtVvQ.png .. . .. . .. . I think there is a problem with the initialisation script. . .. . .. . .. . .. . I have now installed hybris5.6.0.2 : .. . .. . 1 . I have now been able to run the Hybris Administration Console localhost : 9001 .. . .. . 2 . I have logged in . 3 . I have ran the Initialisation because being a first time installation except of taking about an hour to complete it took about 1 minute 30 sec to complete . I suspect something is wrong . 4 . It has been about six months since I worked with hybris and I have forgotten the URLs for the hMC and for the MCC.. . for the MCC is it : .. . .. . http : localhost : 9001 mcc for the hMC is it : .. . .. . http : localhost : 9001 hMC Any suggestions Comment : see my answer below . btw . the initialization time heavily depends on what extensions you have in your localextensions.xml. . all the accelerator extensions contain a lot if sample-data e.g . electronicstore powertools etc which take some time to import . your 1 : 30mins are probably ok as you run a pretty empty hybris with barely any extensions . .. . Answer : By default under Hybris 5.6 the generated localextensions.xml is now totally empty it used to be not : .. . .. . When you run ant all you can actually see what extensions are loaded : .. . .. . Now the question is what do you want Do you want to run a B2C site If yes the best way is to run ant modulegen and then add your own extensions or if you simply want out of the box default sites add those lines under your localextensions.xml file : .. . .. . By doing this you will have out of the box store fronts and HMC Cockpits .", "Question : Hybris tell us that Converters should use populators and not vice versa because can be critical for performance considerations . But when I am digging in hybris code you can see populators like DefaultAbstractOrderEntryPopulator ProductFeatureListPopulator which are wiring converters.And I have also find Populators using other populators such as ProductPopulator . I read the following links but I cannot find anything about using a converter inside a populator or populator inside of populators : .. . .. . Wiki Hybris - Converters and Populators https : wiki.hybris.com display release5 Converters+and+Populators .. . .. . Wiki Hybris - DTOS best practice https : wiki.hybris.com display release5 Using+Facades+and+DTOs+-+Best+Practice .. . .. . Wiki Hybris 6 https : help.hybris.com 6.0.0 hcd 8b937ff886691014815fcd31ff1de47a.html .. . .. . so can we use converters inside populator like Hybris does and populators inside populators .. . Answer : Basically the way to do it is : never write a concrete converter class and never call a populator directly . But this is how the product is built for extensibility and frankly you can do whatever you like . Comment : You cannot do whatever you like . If you wire many converters inside a populator it will lead to a long conversion hierarchy of unnecessary object creation and garbage-collection .", "Question : null .. . Answer : while trying to get value in code I am getting this exception Please suggest what i did wrong . code is getting error on below line while fetching Invoicenumber Comment : Have you changed the impl of your InvoiceNumber from String to Long perhaps Maybe have you created this column by some means other than an init update Comment : No I haven t changed this actually what happens I have switched from Hybris5.4 to Hybris 6 so Hybris OOB for ConsignmentEntry status field was String previously but in Hybris 6 they changes it to ConsignmentEntryStatus object so at the time fetching data it was throwing the error . Comment : Bluff . There is no item ConsignmentEntryStatus and ConsignmentEntry contains no status String or otherwise . Comment : @Stretch : Please open ConsignmentEntryModel and check for ConsignmentEntryStatus in Hybris 6 hope you will find it . in Hybris 5.4 i can see this is String in Hybris 6 this is using ENUM ConsignmentEntryStatus @Accessor qualifier status type Accessor.Type.GETTER public ConsignmentEntryStatus getStatus return getPersistenceContext .getPropertyValue STATUS Comment : i am betting shoppersstop based on these bits of custom code .", "Question : null .. . Answer : I am new to Hybris . I started my hybris server and when I try to initialize I get the following error : .. . .. . If I dont do ant initialize and directly start my Hybris Server I get this error : .. . .. . Solr will start but fail to index data of my store . Can anyone help me on this Thanks Comment : can you add more information Which version of hybris are you on Did you use an installer recipe to setup hybris if so which one Can you post your config localextensions.xml file Can you post a bit more of the console log Are there any exceptions or more detailed errors before the message above Comment : Needs way more information . Put the full build log in a gist somewhere or in the question itself . Usually failure to start because of a failing Spring context means there was a build or deployment error higher up .", "Question : 2015-10-13 : 2043 Here is a screen shot of the intalled extensions.. . Screen shot of the Hybris installed extensions from the HAC http : i.stack.imgur.com dtVvQ.png .. . .. . .. . I think there is a problem with the initialisation script. . .. . .. . .. . .. . I have now installed hybris5.6.0.2 : .. . .. . 1 . I have now been able to run the Hybris Administration Console localhost : 9001 .. . .. . 2 . I have logged in . 3 . I have ran the Initialisation because being a first time installation except of taking about an hour to complete it took about 1 minute 30 sec to complete . I suspect something is wrong . 4 . It has been about six months since I worked with hybris and I have forgotten the URLs for the hMC and for the MCC.. . for the MCC is it : .. . .. . http : localhost : 9001 mcc for the hMC is it : .. . .. . http : localhost : 9001 hMC Any suggestions Comment : see my answer below . btw . the initialization time heavily depends on what extensions you have in your localextensions.xml. . all the accelerator extensions contain a lot if sample-data e.g . electronicstore powertools etc which take some time to import . your 1 : 30mins are probably ok as you run a pretty empty hybris with barely any extensions . .. . Answer : @sebastian thank you for your response.. . I am not sure why this time is it so challenging to install this hybris instance In the past I have not had these challenges it would just run without problem.. . but a couple of things.. . .. . .. . a . I removed what I had done before and again unpacked the hybris and copied into a folder user mlittle 00hybris. . and found that in the hybris path there was a bin folder but no config path : .. . .. . And so that is why I am not able to edit HYBRIS HOME config localextensions.xml and may explain why I cannot add. . I shall run . . antsetenv.sh and ant clean all .. . and then try and edit it.. . the installer gave an error message stating that the config path does not exist but creates it and creates an localextensions.xml file that is completely empty : Comment : sorry I saw this only now . You should comment on my answer so that I get notified . Let me know if you still have problems but normally the first time you run any ant command in the hybris platform it will check for the configuration and if it is not present ask for a configuration templage to use which defaults to develop which is an empty localextensions.xml . There is some way to point the hybris configuration directory to somewhere else e.g . outside of your hybris installation but I don t remember right now how to set it . Maybe that is set for you to point somewhere else. .", "Question : I created an Apache Axis 1.3 client to call payment-gateway services and install it on hybris yempty extension . Now payment-gateway support TLS 1.2 protocol to communicate Which is available on java-8 . But I am using Hybris 5.3 which support only java-7 . So I configured my client to use TLS 1.3 by setting Axisproperties . AxisProperties.setProperty org.apache.axis.components.net.SecureSocketFactory TrustAllSSLSocketFactory.class.getName .. . .. . TrustAllSSLSocketFactory .java is my java class that is setting SSLContext to TLS 1.2 . This Solution is working on standalone java-7 and Tomcat 7 . But not working on Hybris Server of Hybris 5.3 . Please provide some pointers for resolution . .. . Answer : I found the workaround of this problem . Axis is not working well with hybris as AxisProperties resettled back by hybris taskexecutor running in background . Created Soap Client with wsimport tool and pass -Dhttps.protocols TLSv1.2 to tomcat wrapper.conf . I also set the system property to TLS 1.2 . System.setProperty https.protocols TLSv1.2 Now TLS 1.2 negotiation working well ." ] }
[ "yes-answer-long", "yes-answer-short" ]
pim
UNK_RELATION
yacc@operating-system@111
yacc -- the computer program yacc is a parser-generator developed by stephen c .johnson at at t for the unix @placeholder .
{ "confidence": [ 46.98527908325195, 46.27683639526367, 44.67168426513672, 44.67168426513672, 42.933258056640625, 42.72533416748047, 41.54237747192383, 41.54237747192383, 41.20341491699219, 40.48055648803711, 39.55784225463867, 39.22838592529297, 38.35012435913086, 38.33264923095703, 38.30110168457031, 38.30110168457031, 38.30110168457031, 38.30110168457031, 38.30110168457031, 38.132015228271484, 37.95298385620117, 37.83750915527344, 37.539710998535156, 37.456912994384766, 37.13612365722656, 37.13612365722656, 36.914791107177734, 36.914791107177734, 36.91022491455078, 36.91022491455078, 36.91022491455078, 36.81556701660156, 36.779632568359375, 36.779632568359375, 36.779632568359375, 36.36738204956055, 36.30585861206055, 36.15895462036133, 36.15895462036133, 36.055213928222656, 36.01023864746094, 35.98750686645508, 35.80889129638672, 35.745243072509766, 35.581214904785156, 35.51148986816406, 35.388755798339844, 35.388755798339844, 35.388755798339844, 35.388755798339844, 35.388755798339844, 35.37574005126953, 34.88160705566406, 34.88160705566406, 34.8662109375, 34.736289978027344, 34.736289978027344, 34.736289978027344, 34.736289978027344, 34.736289978027344, 34.511619567871094, 34.48283004760742, 34.48283004760742, 34.48283004760742, 34.46603775024414, 34.36146926879883, 34.34897232055664, 34.34897232055664, 34.23794937133789, 34.23794937133789, 34.0477409362793, 33.56011199951172, 33.448974609375, 33.34712600708008, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 33.34541320800781, 32.84707260131836, 32.84707260131836, 32.84707260131836, 32.84707260131836, 32.84707260131836, 32.83759307861328, 32.83759307861328, 32.769229888916016, 32.50944137573242, 32.486663818359375, 32.4542121887207, 32.4542121887207, 32.4542121887207, 32.42269515991211, 32.42269515991211, 32.42269515991211 ], "content": [ "ocamlyacc can t be an LR parser-generator since yacc is not one .", "bison is a compiler-generator compatible with Yacc .", "Of course yacc bison is not a pure LALR 1 parser-generator .", "Is there a good parser-generator think lex yacc or antlr for .NET", "We re currently in the stage of building the parser in yacc .", "AT T Lex and Yacc are not .", "I am writing my first parser in yacc .", "Do you neccesarily need a yacc bison parser", "They started using a recursive decent parser because C++ is difficult in yacc .", "I am trying to create a parser using golang s yacc tool https : golang.org cmd yacc .", "It will be called automatically by the yacc bison-generated parser but yacc bison does not put any particular requirements on the yyerror prototype .", "I m new to yacc lex and I m working on a parser that was written by someone else .", "the bison yacc parser was replaced with a recursive-descent parser in gcc-3.4", "If not can anyone suggest a lexical analyser and parser-generator ie anything like Lex and Yacc that will create PHP code .", "By default yacc will shift .", "Bison is just GNU s yacc .", "Lex is in flex and Yacc in bison .", "lex flex yacc gyacc", "Yacc rules look like this :", "Bison the yacc-compatible parser-generator most commonly mistakenly called yacc can generate Java parsers https : www.gnu.org software bison manual bison.html Java-Parsers .", "First get a state machine output from yacc http : tldp.org HOWTO Lex-YACC-HOWTO-7.html .", "INTRODUCTION : .. . .. . We will use lex flex and yacc Bison to generate an LALR parser .", "Gardens Point LEX http : gplex.codeplex.com and the Gardens Point Parser Generator http : gppg.codeplex.com are strongly influenced by LEX and YACC and output C code .", "@Daniel : AFAIK AT T Yacc can t be obtained from Berkeley - what you get from Berkeley is the Berkeley Yacc .", "Lex : .. . .. . Yacc : .. . .. . The program I am trying to compile with this compiler is a file containing : a .", "In the Yacc program extern FILE yyin must be added in the definitions section .", "hi there i m trying to make a simple parser and using lex and yacc .", "How to get expected token in bison yacc GLR-parser", "Nothing in particular to do with yacc .", ".. . .. . Piece of yacc file :", "I m not sure of the YACC syntax for that .", "And all of this produces the exact same result as the original yacc .", "Not sure about lex but yacc is in byacc .", "Both yacc and lex don t exist .", "What should be declaration of the yymore in yacc", "F lex and Yacc Bison are often used in C less often in C++ .", "Does AS have a compiler generator along the lines of lex yacc or ANTLR", "gcc uses lex and yacc for the C++ front-end .", "Where the C++ front-end is lex and yacc .", "Posix insists that yacc do so and bison tries to emulate yacc .", "That would also be the case for BYacc J you cannot just provide a C-targetted yacc grammar file to a parser-generator and expect to get a functioning Java parser .", "Is there an implementation of Lex and Yacc in PHP", "Is there a sense to look at YACC LEX tools and other parser generators", "Write Yacc Bison specification for a program that will compute and print the value of expressions in this syntax .", "Any C comment is acceptable as a comment anywhere in a program in both Yacc and Lex BUT : .. . .. . When using Lex or Yacc whitespace is important so comment written into your program touching the LHS of your text will NOT WORK", "Lex and Yacc are maintained by the Unix SVRx licencees - companies such as IBM AIX HP HP-UX and Sun Solaris have modified versions of Lex and Yacc at their command .", "There is no feature of lex or yacc that does it for you .", "The only changes needed are in the bison yacc .", "ANTLR hasn t superceded Lex Yacc .", "BNF yacc made me crazy .", "Is yacc a suitable tool for a construct like this", "As I see it the third option would be to learn YACC and another parser-generator that I can use in Java and rewrite the whole thing in that .", "The information about Yacc is incorrect .", "Lex yacc will not be enough .", "There are no conflicts when Yacc Bison spec is converted to a .c file .", "The syntax-error happens when yacc encounter a .", "I m given a yacc bison spec file .", "Yacc does not permit objects to be passed around .", "Any website to study the basic of Lex and Yacc", "I do not want an implementation of yymore in yacc .", "Of course you would add update these values in Yacc parser .", "I d start with yacc examples - see what yacc can do and how it does it .", "This makes the grammar unresolvable with plain Yacc because Yacc can only look ahead one token .", "Your icg.y file was processed without complaint by Berkeley yacc byacc but bison will not process it even in yacc compatibility-mode .", "It is open-source and uses lex and yacc .", "For one thing the grammar for C++ is not completely parseable by a LALR parser http : en.wikipedia.org wiki LALR 5Fparser such as yacc .", "I am writing a simple Yacc program that takes a program code and returns the counts of int and double type of variables and the functions .", "Hi I am writing a simple yacc program that takes a program code and counts how many assign statements there are .", "If a syntax-error occurs the yacc parser just stops running and references to all of those created objects are lost .", "Jacc is about as close to yacc as you can get but it is implemented in pure java and generates a java parser .", "maybe you should try a yacc -v filename it generates an output of the details .", "The following is yacc code : .. . .. . The following is lex code : .. . .. . I compiled both lex and yacc code .", "yacc and bison handle lookahead tokens differently yacc always reads the lookahead token while bison only does so if it is needed .", "One of the first results for a search on actionscript parser-generator will show ASYACC http : code.google.com p sepy-asyaac that is a port of YACC for ActionScript .", "I am new to lex and yacc and compiler design .", "Step 1 is to find a yacc tutorial with examples .", "Normally one would not use bison yacc in this way .", "Is that correct that Flex Yacc are the most proper way to do it", "ANTLR http : www.antlr.org is commonly used as are Lex Yacc .", "In your lex file .. . .. . In your yacc file", "How can I put this into the yacc code .", "There doesn t exist a Lex Yacc configuration-files for LOGO .", "Thanks I d seen this before in the lexx yacc book .", "My goal is to use that yacc file to create a parser for my custom text area in my Java application .", "I m relatively new to lex yacc and parser generators in general but my gut says this is kind of a hack .", "One major difference is that ANTLR generates an LL parser whereas YACC and Bison both generate parsers that are LALR .", "I want to parse a string which I give to the parser in the main function of yacc .", "lol cause this is why I stopped writing my own parser and started looking at Lex Yacc .", "As others have already said yacc is a poor choice for implementing a C++ parser .", "for objective-C code in lex and yacc input files with XCode", "From the C++ FAQ Lite http : www.parashift.com c 2B 2B-faq-lite : .. . .. . 38.11 Is there a yacc-able C++ grammar", "Lex compiles and Yacc compiles and they link together but the outputted program does not do what I expected .", "Update with YACC syntax : .. . .. . Not in YACC but might be helpful anyway here s a full grammar in ANTLR v3 that works for the cases you described excludes strings in the lexer because it s not important for this example also uses C console output because that s what I tested it with : .. . .. . This won t work exactly as is in YACC because YACC generates and LALR parser while ANTLR is a modified recursive-descent .", "MKS also provides MKS Lex and MKS Yacc however the Yacc at least has some non-standard extensions .", "Also there is also Berkeley YACC which is compatible with the original YACC but does not share source code .", "possible duplicate of Integrating Bison Flex Yacc into XCode http : stackoverflow.com questions 6296758 integrating-bison-flex-yacc-into-xcode", "How does one make a comment in Lex and Yacc", "It is not a yacc bison though as it has already been said .", "XSLT is rule oriented se xsl : template like Yacc ." ] }
{ "confidence": [ 54.338348388671875, 50.46418762207031, 48.41926574707031, 48.14171600341797, 47.94093322753906, 47.869911193847656, 47.840911865234375, 47.71341323852539, 47.11011505126953, 47.03423309326172, 46.95109558105469, 46.93035125732422, 46.68125915527344, 46.62390899658203, 46.39894104003906, 46.016746520996094, 45.84722137451172, 45.73567199707031, 45.732337951660156, 45.15966796875 ], "content": [ "Question : I have a yacc file that was created by someone else quite a long time ago . The file describes a custom language . My goal is to use that yacc file to create a parser for my custom text area in my Java application . The endgoal is to show errors when the syntax is incorrect . I m currently using RSyntaxTextArea which handles highlighting rather nicely based on my own implementation not the yacc file but creating a parser that can detect every possible error the user can make is a much harder task . The way I see it I have three options : .. . .. . 1 . The best case scenario would be if somehow I could use the yacc file I have directly in my Java application . 2 . The second best case would be if there d be a way to parse the yacc file to a format I can easily use in Java . I found BYACC J which creates a Java class from the yacc file but the file I got was riddled with syntax errors missing functions variables etc . so that didn t work out too well . 3 . As I see it the third option would be to learn YACC and another parser-generator that I can use in Java and rewrite the whole thing in that . Learning new things is never a bad thing but since my time is not endless and these compiler compilers seem to have a rather steep learning curve I d only want to invest time in it if there s no way to use the YACC definition directly . As I ve found there are quite a lot of potential options out there between JavaCC Jacc CUP ANTLR4 and probably lots of others I d want to choose one that s as close to yacc as possible to reduce the implementation time . Any help would be appreciated . .. . Answer : Bison the yacc-compatible parser-generator most commonly mistakenly called yacc can generate Java parsers https : www.gnu.org software bison manual bison.html Java-Parsers . Having said that I ve never tried it so I have no idea what problems you would run into . A yacc grammar includes semantic rules in the target language if you have an existing grammar the semantic rules will probably be written in C . Yacc grammars also depend on the existence of a scanner often created with flex or JFlex for Java which works in a very similar manner . In order to use a Java-based solution even one which uses the same grammar syntax you would need to rewrite all of the semantic actions in your existing yacc grammar as well as rewrite the accompanying scanner . That would also be the case for BYacc J you cannot just provide a C-targetted yacc grammar file to a parser-generator and expect to get a functioning Java parser . So you would definitely need to learn how yacc bison flex work . Note : Bison and friends are designed to parse syntactically-correct programs . Obviously they can detect a syntax-error but recovering from the syntax-error to continue the parse is a lot trickier for syntax-highlighting you definitely want to be able to detect more than one error if at all possible . So you may well find that your existing yacc grammar is only a start .", "Question : How much time would it take to write a C++ compiler using lex yacc Where can I get started with it Comment : Good luck . And @Neil the new tag is incorrectly gnu-flex or alternately lex Comment : You can start with reading Software Estimation by Steve McConnell of Code Complete fame . Comment : some help : Let s Build a Compiler by Jack Crenshaw at compilers.iecc.com crenshaw http : compilers.iecc.com crenshaw .. . Answer : A long time and lex and yacc won t help .. . .. . If you have the skills to write a compiler for such a large language you will not need the small amount of help that lex and yacc give you . In fact while lex is OK it may take longer to use yacc as it s not really quite powerful enough for C or C++ and you can end up spending far more time getting it to work right than it would take to just write a recursive-descent parser . I believe lex and yacc are best used for simple grammars or when it is worth the extra effort to have a nicely readable grammar file perhaps because the grammar is experimental and subject to change . For that matter the entire parser is possibly not the major part of your job depending on exactly what goals you have for the code generator . Comment : I completely disagee . As do the gcc team . Where the C++ front-end is lex and yacc . Comment : Martin : it s not . the bison yacc parser was replaced with a recursive-descent parser in gcc-3.4 Comment : Martin : it s certainly possibly to use yacc and gcc has done it both with and without . Ruby has a complex grammar and the main implementation does use yacc . I ve written parsers both ways certainly there are no easy always do it this way answers I just think it s important to realize that the parser will be roughly the same amount of effort either way . The real problem with yacc is that while easy stuff is really easy you can also get stuck on hard-to-understand bugs . With RD you just fix the code . Comment : I think the main point is not whether or not flex yacc are good tools but to point out that they re a pretty small portion of the overall problem . Great you ve parsed a file into some intermediate representation AST whatever - now what", "Question : I have some files that I ve written in a custom scripting-language which I would like to be able to read and execute in ActionScript . Does AS have a compiler generator along the lines of lex yacc or ANTLR .. . Answer : One of the first results for a search on actionscript parser-generator will show ASYACC http : code.google.com p sepy-asyaac that is a port of YACC for ActionScript . It is not the only result btw .", "Question : Yacc does not permit objects to be passed around . Because the union can only contain POD types complex objects must be new d and passed around by pointer . If a syntax-error occurs the yacc parser just stops running and references to all of those created objects are lost . The only solution I ve come up with is that all new d object inherit a particular base-class be added to a container when allocated and if there is an error everything in that container can be deleted . Does anyone know of any better yacc tricks to solve this problem Please don t tell me to choose a different parser . .. . Answer : Why is using a different parser such a problem Bison is readily available and at least on linux yacc is usually implemented as bison . You shouldn t need any changes to your grammar to use it except for adding destructor to solve your issue . Comment : Bison is just GNU s yacc . Same question applies .", "Question : I m looking for the C grammar in GCC source code more specifically for the grammar in the yacc bison form . Comment : That s more of a statement than a question I decided to reciprocate by phrasing my statement as a question . fun Comment : Did you try googling I searched for c yacc grammar and came up with lysator.liu.se c ANSI-C-grammar-y.html http : www.lysator.liu.se c ANSI-C-grammar-y.html among many other hits . Comment : @Neil perhaps it s not what Hurkai meant but GCC has some C extensions and generic C grammar wouldn t precisely fit it . Comment : I ve looked into C-standard grammar already but its old compared to the grammar used in gcc that s why I m looking for it . Comment : It s just imparsable .. . .. . Answer : GCC doesn t use a generated parser its parser is a hand-written recursive-descent parser . Comment : it s true from version 4.6+ Comment : @Jack : Interesting Can you point me to any documentation I know they switched from a generated parser to the new hand-written one for performance and more importantly maintainability reasons probably somewhere around the 3.4 4.2 timeframe I don t precisely remember . What were the reasons for switching back and which parser-generator do they use", "Question : How much time would it take to write a C++ compiler using lex yacc Where can I get started with it Comment : Good luck . And @Neil the new tag is incorrectly gnu-flex or alternately lex Comment : You can start with reading Software Estimation by Steve McConnell of Code Complete fame . Comment : some help : Let s Build a Compiler by Jack Crenshaw at compilers.iecc.com crenshaw http : compilers.iecc.com crenshaw .. . Answer : There are many parsing rules that cannot be parsed by a bison yacc parser for example distinguishing between a declaration and a function-call in some circumstances . Additionally sometimes the interpretation of tokens requires input from the parser particularly in C++0x . The handling of the character sequence for example is crucially dependent on parsing context . Those two tools are very poor choices for parsing C++ and you would have to put in a lot of special cases that escaped the basic framework those tools rely on in order to correctly parse C++ . It would take you a long time and even then your parser would likely have weird bugs . yacc and bison are LALR 1 http : en.wikipedia.org wiki LALR 5Fparser parser generators which are not sophisticated enough to handle C++ effectively . As other people have pointed out most C++ compilers now use a recursive-descent http : en.wikipedia.org wiki Recursive 5Fdescent parser and several other answers have pointed at good solutions for writing your own . C++ templates are no good for handling strings even constant ones though this may be fixed in C++0x I haven t researched carefully but if they were you could pretty easily write a recursive-descent parser in the C++ template language . I find that rather amusing . Comment : If I am not mistaken gcc switched to using a recursive-descent parser sometime late in the 3.x series . Comment : gcc uses lex and yacc for the C++ front-end . For all the ambiguities you mention there are explicit commands to resolve the conflicts . Personally I doubt there is a better framework for parsing C++ out there . BUT writing a C++ lexer parser without lots of compiler experience is a non starter for a single developer using lex yacc its just to large and complicated . Comment : @Martin York in fact the bison yacc parser was replaced with a recursive-descent parser in gcc-3.4 - gcc.gnu.org gcc-3.4 changes.html http : gcc.gnu.org gcc-3.4 changes.html Comment : Recursive descent parsers are also much much easier to understand . In fact if you re interested in language development I d probably recommend starting with hand-generating a recursive-descent parser for a relatively simple grammar . Comment : @kyoryu : Recursive descent parsers are NOT that much easier to understand than the pure grammar especially for an artifact of the scale of C++ . You really want a parser-generator driven from the language definition in terms of BNF rules . The people that say C++ is hard to parse are those that use YACC and variants and those that tangle name type resolution with parsing . GLR parser generators allow you to build a very good parser using the BNF rules and isolate name type resolution this separate makes each task a lot easier although not easy . See my answer here .", "Question : Yacc does not permit objects to be passed around . Because the union can only contain POD types complex objects must be new d and passed around by pointer . If a syntax-error occurs the yacc parser just stops running and references to all of those created objects are lost . The only solution I ve come up with is that all new d object inherit a particular base-class be added to a container when allocated and if there is an error everything in that container can be deleted . Does anyone know of any better yacc tricks to solve this problem Please don t tell me to choose a different parser . .. . Answer : I love Yacc but the discriminating union stack does present a challenge . I don t know whether you are using C or C++ . I ve modified Yacc to generate C++ for my own purposes but this solution can be adapted to C . .. . .. . My preferred solution is to pass an interface to the owner down the parse-tree rather than constructed objects up the stack . Do this by creating your own stack outside of Yacc s . Before you invoke a non-terminal that allocates an object push the owner of that object to this stack . For example : .. . .. . Everything that wants an expression has to implement the IExpressionOwner interface and push itself to the stack before invoking the expression non-terminal . It s a lot of extra code but it controls object-lifetime . Update .. . .. . The expression example is a bad one since you don t know the operation until after you ve reduced the left operand . Still this technique works in many cases and requires just a little tweaking for expressions . Comment : can you show how this would be used in the .ypp file Comment : I accept that the best solution is to create a parallel data structure outside of the syntax parser . It makes the parser non-reentrant since the parser must access global-variables but I can live with that .", "Question : What is the difference between Flex Lex and Yacc Bison . I searched the Internet wildly and I didn t find any solid answer . Can I install pure Lex and Yacc on Ubuntu or I can install only flex and bison . I am confused . Is Lex or Yacc still being maintained by someone Are all of them free If Lex is not free why do I have it installed on my Ubuntu distribution lex --version .. . lex 2.5.35 Comment : There is no lex version 2.5.35 -- you re running flex version 2.5.35 it just identifies itself as lex if you invoke it as lex .. . Answer : There are some differences between Lex and Flex but you have to be abusing Lex to run into the problems with Flex . I have a program which abuses Lex and doesn t work under Flex therefore . This is primarily in the area of input lookahead in Lex you can provide your own input code and modify the character stream Flex won t let you do that . Yacc and Bison are pretty closely compatible though Bison has some extra tricks it can do . You probably can t find legitimate copies of the original AT T versions of Lex and Yacc to install on Ubuntu . I wouldn t necessarily say it is impossible but I m not aware of such . Flex and Bison are readily available and are equivalent for most purposes . You may also find various alternative and approximately equivalent programs from the BSD world . Lex and Yacc are maintained by the Unix SVRx licencees - companies such as IBM AIX HP HP-UX and Sun Solaris have modified versions of Lex and Yacc at their command . MKS also provides MKS Lex and MKS Yacc however the Yacc at least has some non-standard extensions . Flex and Bison are free . AT T Lex and Yacc are not . Comment : The information about Yacc is incorrect . Berkeley has a Yacc which is present and available under the BSD license on all open-source BSD operating systems . I downvoted on this account but if the answer is corrected quickly enough I ll remove the downvote . Comment : @Daniel : AFAIK AT T Yacc can t be obtained from Berkeley - what you get from Berkeley is the Berkeley Yacc . I ll clarify the answer to reflect that . Comment : In flex you certainly can switch input buffers painlessly I did it once to handle essentially include . My O Reilly book on lex yacc not at hand here sorry said that it only was possible in lex through disgusting hacks .", "Question : I ve got a set of function definitions written in a C-like language with some additional keywords that can be put before some arguments the same way as unsigned or register for example and I need to analyze these lines as well as some function stubs and generate actual C code from them . Is that correct that Flex Yacc are the most proper way to do it Will it be slower than writing a Shell or Python script using regexps which may become big pain as I suppose if the number of additional keywords becomes bigger and their effects would be rather different provided that I have zero experience with analysers parsers though I know how LALR does its job Are there any good materials on Lex Yacc that cover similar problems All papers I could find use the same primitive example of a toy calculator . Any help will be appreciated . .. . Answer : That entirely depends on your definition of effective . If you have all the time of the world the fastest parser would be a hand-written pull parser . They take a long time to debug and develop but today no parser-generator beats hand-written code in terms of runtime performance . If you want something that can parse valid C within a week or so use a parser-generator . The code will be fast enough and most parser generators come with a grammar for C already which you can use as a starting point avoiding 90 of the common mistakes . Note that regexps are not suitable for parsing recursive structures . This approach would both be slower than using a generator and more error prone than a hand-written pull parser . Comment : and the last 10 will take you another year because of C s context sensitivity . Ask the GNU guys .", "Question : How does one make a comment in Lex and Yacc So far I haven t tried Yacc but in Lex I have tried comment and comment but neither of these compile . I am on a Mac using the builtin Lex and Yacc compilers or maybe the X-Code ones I don t know . What is the correct syntax for comments in Lex or Yacc or preferably both .. . Answer : Any C comment is acceptable as a comment anywhere in a program in both Yacc and Lex BUT : .. . .. . When using Lex or Yacc whitespace is important so comment written into your program touching the LHS of your text will NOT WORK .. . to make it work you must add a tab or space to the beginning of the line to shove it to C code and not Lex or Yacc code . gcc is a nice compiler and loves you very much so it accepts comment comments Lex and Yacc are not nice . these comments while will work in a C program will NOT WORK", "Question : Yacc does not permit objects to be passed around . Because the union can only contain POD types complex objects must be new d and passed around by pointer . If a syntax-error occurs the yacc parser just stops running and references to all of those created objects are lost . The only solution I ve come up with is that all new d object inherit a particular base-class be added to a container when allocated and if there is an error everything in that container can be deleted . Does anyone know of any better yacc tricks to solve this problem Please don t tell me to choose a different parser . .. . Answer : Use smart-pointers http : www.boost.org doc libs 1 36 0 libs smart ptr smart ptr.htm Or if you re uncomfortable depending on yet another library you can always use auto-ptr http : www.gotw.ca publications using auto-ptr effectively.htm from the C++ standard-library . Comment : auto-ptr is a complex object that cannot be passed", "Question : Is there a good parser-generator think lex yacc or antlr for .NET Any that have a license that would not scare lawyers Lot s of LGPL but I am working on embedded components and some organizations are not comfortable with me taking an LGPL dependency . I ve heard that Oslo may provide this functionality but I m not sure if it s a build time dependency or also a runtime dependency . Can anyone clarify what Oslo will provide UPDATE .. . What I would really like is a parser-generator that is a build time only dependency . It looks like ANTLR has a runtime component . Comment : Opensorce generators to C language : YaccConstructor GLL C Apache 2.0 yaccconstructor.github.io YaccConstructor gll.html http : yaccconstructor.github.io YaccConstructor gll.html NLT GLR C MIT sourceforge.net projects naivelangtools http : sourceforge.net projects naivelangtools GLRSharp GLR C v4 MIT github.com jcoder58 GLRSharp https : github.com jcoder58 GLRSharp GPPG LALR 1 C BSD SableCC LALR 1 LGPL Antlr Java BSD Lapg LALR 1 Java GPL jay LALR 1 Java BSD Hime LR 1 LALR 1 LGPL LLLPG LL k LGPL C Grammatica LL k Java csharpcc C LL k BSD Coco R GPL Irony Eto.Parser Comment : softwarerecs.stackexchange.com questions 24630 http : softwarerecs.stackexchange.com questions 24630 which-parser-generator-to-use-on-mono .. . Answer : I just discovered that F ships with an implementation of yacc and lex . It looks like I will be able to leverage this parser-generator for my .NET needs . F Samples http : code.msdn.microsoft.com fsharpsamples Wiki View.aspx title Home version 2 .. . .. . The Parsing sample shows how to use the fsyacc and fslex tools to build parsers and lexers for use with F . Mode : Compiled Runs on : any CLI including Mono .. . .. . Related blog posts : .. . .. . A simple parser in F http : strangelights.com blog archive 2006 05 11 1302.aspx", "Question : Is there a simple way for integrating Bison Flex Yacc into XCode I want to write my own language to be parsed which interacts with my ObjC objects . But the tools will only take STDIN as input and will only produce C code instead of ObjC . They re basically only seem useful for command-line tools otherwise they need massive pain to override the output every time I regenerate the parser code . .. . Answer : Xcode does know how to process yacc and flex files and will automatically compile the generated code files into your project . The trick is figuring out which extensions it expects . In Xcode 4 click on the top-level item in the source list to get the project settings . Click your target in the next list then Build Rules in the table view header . Scroll down to System Lex rule and System Yacc rule then hover the cursor over source files in each of those to get a tool tip with the extensions it uses for that rule . What That wasn t obvious For Lex it s : .l .lm .lmm .lpp .lp .lxx .. . .. . For Yacc it s : .y .ym .ymm .ypp .yp .yxx .. . .. . If you have any Objective-C code in your lex yacc files you ll need to use the . m extension to tell Xcode to generate a .m file likewise . mm for Objective-C++ . I m guessing . pp . p and . xx are all C++ . From what I ve seen this Just Works no Makefile needed . If you want to keep the .flex extension you can click the Copy to Target button in the Lex rule and make a new rule for that extension . Now the fun part is trying to integrate yacc into your code . By default the yyparse function which makes the whole thing go expects input from STDIN unless you jump through a bunch of hoops to make it work otherwise . If you re dead-set on using yacc there s plenty of info on the web about how to bend it to your whims . But you might wind up with fewer keyboard dents on your forehead if you use a modern parser-generator like lemon http : www.sqlite.org src doc trunk doc lemon.html . The syntax is based on yacc s and it s LALR 1 whatever that means so everything you know about shift reduce conflicts still holds . I found it much easier to work with than yacc flex . Edit : I seem to recall that Xcode didn t add the .l file to the build phase automatically but it did add the .y file . Check your build phases by clicking the top-level item in the Xcode source list click you target click the Build Phases table header then expand the Compile Sources row . If your .l file isn t in there drag it in from the source list .", "Question : I am doing project in SENSE for that i have to install Lex and Yacc . If you can help me how to install in Ubuntu . I very new to this area . So can you help me . Any website to study the basic of Lex and Yacc Comment : Better suited on ubuntu.stackexchange.com http : ubuntu.stackexchange.com Comment : ...or to Super User http : superuser.com but more or less off topic here . .. . Answer : Use the synaptic packet manager in order to install yacc lex . If you are feeling more confortable doing this on the console just do : .. . .. . There are some very nice articles on the net on how to get started with those tools . I found the article from CodeProject to be quite good and helpful http : www.codeproject.com KB recipes introlexyacc.aspx . But you should just try and search for introduction to lex there are plenty of good articles showing up . Comment : I don t think that the packages are actually called yacc and lex . Not sure about lex but yacc is in byacc . Comment : Both yacc and lex don t exist . Lex is in flex and Yacc in bison . So it should be sudo apt-get install flex bison Comment : lex flex yacc gyacc Comment : yes you re right . bison is a compiler-generator compatible with Yacc . But I couldn t find gyacc in the repositories.. .", "Question : Is there an implementation of Lex and Yacc in PHP If not can anyone suggest a lexical analyser and parser-generator ie anything like Lex and Yacc that will create PHP code . I m not too worried about the performance of the resulting parser . I am sick of using regex to parse things that really shouldn t be parsed with regex.. . Comment : @nickf Well deserved though Comment : +1 preg split .. . can only get you so far . Comment : You may want use the buil-in PHP tokenizer if your language uses the same tokens as PHP .. . Answer : Cheap trick : code a recursive-descent parser . This will cover a lot of cases . See Is there an alternative for flex bison that is usable on 8-bit embedded systems http : stackoverflow.com questions 2245962 is-there-an-alternative-for-flex-bison-that-is-usable-on-8-bit-embedded-systems 2336769 2336769", "Question : I m working on a compiler design project in Java . Lexical analysis is done using jflex and I m wondering which yacc-like tool would be best most efficient easiest to use etc . for doing syntactical analysis and why . .. . Answer : If you specifically want YACC-like behavior table-driven the only one I know is CUP http : www2.cs.tum.edu projects cup . In the Java world it seems that more people lean toward recursive-descent parsers like ANTLR http : www.antlr.org or JavaCC https : javacc.java.net . And efficiency is seldom a reason to pick a parser-generator . Comment : Difficulty : CUP is no longer maintained and CUP 2 http : www2.in.tum.de cup2 is beta . Is it still OK Comment : @minopret - I haven t used CUP in over a dozen years but unless there was a major unfixed bug then it should be OK even if not actively maintained . However unless you have a need for YACC-like behavior I d look at ANTLR .", "Question : I want to know how to use yymore function in yacc file as external declaration . What should be declaration of the yymore in yacc Comment : Why You should only be using it in the lexer . In the parser you ll often be a token ahead of yourself anyway so it won t make sense . Comment : @EJP If suppose in yacc after encountering certain token I want to store further read tokens in a string till i encounter some specific token . Then I would have to keep adding read strings to yytext using yymore function till I stop . So how to call this yymore function from yacc file . Comment : I do not want an implementation of yymore in yacc . I want to call lexer yymore function from yacc file . Comment : I ve already told you it doesn t make sense and I have also told you why . You need to use parsing tools for parsing problems and lexical tools for lexical problems . There is nothing here that suggests this is a parsing problem and if it is yymore is not the solution . Comment : I understood now . Thanks .. . Answer : You can only call yymore inside the action of a flex rule it indicates that the rule does not complete the token so that the next matched rule will append to the token rather than starting a new one . It makes no sense to call yymore in a parser action parser actions are only executed when the scanner has returned a complete token so there is no current token which can be extended . If I understand correctly what you are trying to do you will need to create a context-dependent scanner using a start condition http : flex.sourceforge.net manual Start-Conditions.html Start-Conditions . In that start condition tokens are appended into a single token until you find the token which is supposed to terminate the concatenation . You cannot call the BEGIN macro in the parser either but you can export your own function from the scanner which sets the start condition . Be aware that semantic feedback of this form is not very robust since the parser may well have already read the following token as a lookahead token . yacc and bison handle lookahead tokens differently yacc always reads the lookahead token while bison only does so if it is needed .", "Question : I m looking for the C grammar in GCC source code more specifically for the grammar in the yacc bison form . Comment : That s more of a statement than a question I decided to reciprocate by phrasing my statement as a question . fun Comment : Did you try googling I searched for c yacc grammar and came up with lysator.liu.se c ANSI-C-grammar-y.html http : www.lysator.liu.se c ANSI-C-grammar-y.html among many other hits . Comment : @Neil perhaps it s not what Hurkai meant but GCC has some C extensions and generic C grammar wouldn t precisely fit it . Comment : I ve looked into C-standard grammar already but its old compared to the grammar used in gcc that s why I m looking for it . Comment : It s just imparsable .. . .. . Answer : GCC s g++ switched from a yacc bison based parser years ago probably at least 5 years . They started using a recursive decent parser because C++ is difficult in yacc . After using this parser in for C++ for several years they switched C to parsing using recursive decent as well . strike You will have to go back several versions to locate the grammar in bison format but it is out there . You should try google s code search with strike .. . .. . gcc yyparse .. . .. . Update : Google Code Search Shutdown in 2012 .. . .. . http : en.wikipedia.org wiki Google Code Search .. . .. . Old : http : yaxx.googlecode.com svn branches yaxx-proc gcc-3.4.0 gcc c-parse.y .. . .. . to find a version of gcc that has it and then you should be able to find the yacc bison source file in there . It will be old though . Comment : I think you meant descent though the parser is decent enough :", "Question : I m having the following file and which need to be parsed .. . .. . The lines start with -- will be treated as comment lines . and the file starts Start and ends-with end . The string after Start is the UserID and then the name and address will be inside the double quots . I need to parse the file and write the parsed data into an xml file . So the resulting file will be like .. . .. . now i m using pattern-matching Regular Expressions to parse the above file . Here is my sample code . Method : ReadFile .. . .. . Method : FormateRowData .. . .. . Method : ParseData .. . .. . Method : WriteFile .. . .. . i ve heard of ParserGenerator http : www.bumblebeesoftware.com .. . .. . Please help me to write a parser using lex and yacc . The reason for this is my exsisting parser Pattern Matching is not flexible more over its not the right way I think so . How to i make use of the ParserGenerator I ve read Code Project Sample One http : www.codeproject.com KB recipes introlexyacc.aspx and Code Project Sample Two http : www.codeproject.com KB recipes lexyacc2.aspx msg 2067628 but still i m not familiar with this . Please suggest me some parser-generator which outputs C parsers . .. . Answer : You will first have to define the grammar for your parser . Yacc part .. . .. . Seem like to be something like : .. . .. . The lexical-analysis will be perform be lex . And I guess your regex will be useful to defined them . My answer is a rough draft I advise you to look on the internet to find a more complete tutorial on lex yacc flex bison and come back here if you have a more focused problem . I also do not know if there is a C implementation that would allowed you to keep a managed code . You may have to use unmanaged C C++ import .", "Question : Is there a good parser-generator think lex yacc or antlr for .NET Any that have a license that would not scare lawyers Lot s of LGPL but I am working on embedded components and some organizations are not comfortable with me taking an LGPL dependency . I ve heard that Oslo may provide this functionality but I m not sure if it s a build time dependency or also a runtime dependency . Can anyone clarify what Oslo will provide UPDATE .. . What I would really like is a parser-generator that is a build time only dependency . It looks like ANTLR has a runtime component . Comment : Opensorce generators to C language : YaccConstructor GLL C Apache 2.0 yaccconstructor.github.io YaccConstructor gll.html http : yaccconstructor.github.io YaccConstructor gll.html NLT GLR C MIT sourceforge.net projects naivelangtools http : sourceforge.net projects naivelangtools GLRSharp GLR C v4 MIT github.com jcoder58 GLRSharp https : github.com jcoder58 GLRSharp GPPG LALR 1 C BSD SableCC LALR 1 LGPL Antlr Java BSD Lapg LALR 1 Java GPL jay LALR 1 Java BSD Hime LR 1 LALR 1 LGPL LLLPG LL k LGPL C Grammatica LL k Java csharpcc C LL k BSD Coco R GPL Irony Eto.Parser Comment : softwarerecs.stackexchange.com questions 24630 http : softwarerecs.stackexchange.com questions 24630 which-parser-generator-to-use-on-mono .. . Answer : You could also try Malcolm Crowe s http : cis.paisley.ac.uk crow-ci0 research LEX YACC compiler tools http : cis.paisley.ac.uk crow-ci0 CSTools.zip . Lots of good examples . Comment : They have a runtime component ." ] }
[ "yes-answer-long" ]
operating-system
UNK_RELATION
overlapping@css@105
overlapping -- the overlapping tag is used to describe elements on a webpage absolutely positioned with @placeholder so they overlap each other .
{ "confidence": [ 36.507057189941406, 35.06315994262695, 33.41609573364258, 33.003902435302734, 32.57530975341797, 32.57530975341797, 32.57530975341797, 32.37065505981445, 32.357723236083984, 32.110267639160156, 31.86568832397461, 31.797040939331055, 31.797040939331055, 31.797040939331055, 31.797040939331055, 31.797040939331055, 31.797040939331055, 31.63412094116211, 30.991321563720703, 30.991321563720703, 30.825145721435547, 30.825145721435547, 30.825145721435547, 30.825145721435547, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.07111167907715, 30.059947967529297, 30.059947967529297, 29.660301208496094, 29.647350311279297, 29.09921646118164, 29.09921646118164, 29.09921646118164, 29.09921646118164, 29.09921646118164, 29.09921646118164, 28.855493545532227, 28.43340301513672, 28.213665008544922, 28.078704833984375, 28.078704833984375, 28.011871337890625, 28.011871337890625, 27.939468383789062, 27.934371948242188, 27.934371948242188, 27.934371948242188, 27.86305809020996, 27.80682373046875, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.733240127563477, 27.248043060302734, 27.106807708740234, 26.847026824951172, 26.847026824951172, 26.84135627746582, 26.83492660522461, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.76134490966797, 26.567955017089844, 26.496591567993164, 26.496591567993164, 26.083200454711914, 26.049152374267578, 25.996498107910156, 25.742082595825195, 25.742082595825195, 25.7012996673584, 25.67008399963379, 25.67008399963379, 25.596500396728516 ], "content": [ "If ranges overlap partially it should count only the days of the part that is not overlapping", "They re overlapping because you re positioning them over each other .", "@dfeuer you mean not using overlapping instances by rewriting the instances so I don t need overlapping", "I forgot that advanced overlap still has overlapping instances at the use site .", "I have a list of tuple list which have overlapping elements .", "I am trying to merge overlapping elements in the tuple list .", "I have elements which are overlapping and I would like to prevent this .", "So I need for each circle in the two matrices There are k1+k2 of them how much area is overlapping with the other matrix and what are the circles in the other matrix that are overlapping .", "So overlapping really means that there is an unreachable pattern .", "Overlapping patterns are a compiler warning .", "According to the definition used in fp101x the following function has overlapping patterns : .. . .. . This is in contradiction with GHC definition of overlapping pattern which does not consider it to have any overlapping patterns .", "I want proper spacing but no overlapping .", "Are there any ways to fix overlapping programmatically", "The overlapping overlappable thing is 7.10 only .", "Either IX is overlappable or IY is overlapping .", "I m having issues with overlapping contents .", "The overlapping between A and B does not matter .", "One of the periods must always start or end inside the other if they are overlapping .", ".. . .. . Update .. . .. . I am looking for the overlapping pattern definition used in fp101x course .", "I am looking for the overlapping pattern definition used in fp101x course .", "The first tick labels keep overlapping .", "Packery-items are overlapping while resizing .", "It was overlapping for me about 20 of the time .", "Is there a formal definition of what pattern overlapping is", "Question here is : is this overlapping even possible to prevent", "I m stumped on this overlapping instances error message .", "I was wondering what the solution to separate the overlapping titles is .", "Since the last row is completely overlapping the second row .", "Also my z-ticks are overlapping with the Z-axis .", "With less xticks and its labels the overlapping may be disappear .", "Instances X and Y are identical in type that is fully overlapping .", "The first compilation fails with the stated overlapping instances error .", "And the onus on you is to obey the contract and not pass overlapping objects .", "findall doesn t yield overlapping matches by default .", "You can t get overlapping matches in Regex .", "Regex can be tailored to do different overlapping .", "How do I avoid overlapping of labels", "Final non-overlapping solution .. . .. . This is a working example http : jsfiddle.net 92c9a 2 of non-overlapping functionality .", "The problem is that the GHC meaning of overlapping pattern does not match the first function definition even though that is an overlapping pattern too .", "What is the solution for overlapping cars for counting", "However that will give more overlapping groups so a longer final merged list .", "You d need to use a loop to get overlapping pieces .", "It s illegal to have overlapping instances with type-families .", "overlapping while resizing http : i.stack.imgur.com oh2k9.gif", "How can I prevent them from overlapping", "@chi : that would be what GHC consideres to be pattern overlapping .", "It is confusing to get an Overlapping instances error though .", "Is there a way to position the elements as close to their natural spot without overlapping -- in the example 50 would go up just a hair and 51 would go down just a hair so they dont overlap .", "Thank you so much but can you add the line where it doesn t count overlapping letters", "from Programming in Haskell Graham Hutton .. . .. . So this example would be non-overlapping .. . .. . Because you can change the order of pattern-matching like this : .. . .. . And here you can t : .. . .. . So the last one is overlapping .", "I used the datediff function to sum the days but now I want to exclude overlapping days .", "I am trying to understand the following code used to pull out overlapping lines over multiple-files using BASH .", "My current understanding of pattern overlapping in Haskell is that 2 patterns are considered to be overlapping if some argument values passed to a function can be matched by multiple patterns .", "What makes this confusing is that although the patterns are by the definition above overlapping GHC does not show any warning about them being overlapping .", "I m trying to make CollapsingToolbarLayout with Toolbar and TabLayout below it but they overlapping each other and I get this http : i.stack.imgur.com 09HyL.png .. . .. .", "@McAdam331 because the dates are overlapping with id 1 .", "Hackishly fixed overlapping issue I think", "last1 should be non overlapping in comparison to last2 .", "drag elements in container should not be overlap how can we restrict .", "To me it looks like he wants to find the names with overlapping dates and in the other question he wants to find the IDs .", "These 3 lines of sql clauses cover the 4 cases of overlapping required .", "I needed to find any kind of overlapping date to detect and stop the booking .", "But saving the original figure as pdf still yields overlapping rectangles .", "In my plot the first values on x and y axes keep overlapping .", "I have a blog that is overlapping media content with infinite-scroll enabled .", "In my case there could be up to 5 circles overlapping on the same geo location .", "I am facing issues while drawing 2 overlapping polygons with cesium.js .", "My sidebar nav is overlapping the footer how can i fix this", "I can t use Blockproc because it gives a not overlapping block .", "The easiest method to get overlapping blocks is to use im2col with sliding option .", "I have tested my code and it works well with overlapping in Linux .", "Lookahead http : stackoverflow.com questions 320448 overlapping-matches-in-regex", "The regex library allows for overlapping matches using the overlapped flag .", "The only problem is that I have some overlapping of the variables names .", "Each tuple list in the list often overlapping as they are generated from a bigger list using sliding function .", "Do you know if there is any definition which can be used to determine exactly what overlapping pattern means", "Alternativa z-sorting engine don t react well to this overlapping and the output is jittery texture i don t know how else to call it in the overlapping places .", "Here s a JavaSE HSQLDB Ant standalone app : kawoolutions.com media geoinfo-hib-overlapping-fks.zip http : www.kawoolutions.com media geoinfo-hib-overlapping-fks.zip", "Let s assume I have one table with names and given dates : .. . .. . I would like to find the elements Name which has conflicting overlapping dates .", "There s simply no other way when you want random positions and non overlapping .", "User should be able to scroll content of the body without overlaying overlapping header .", "I ve seen it implemented multiple times in a similar way without that overlapping .", ".. . .. . If you really need overlapping matches you could use a lookahead .", "What is the correct way to determine if a function has overlapping patterns or not", "The first function definition seems to be considered pattern overlapping also .", "From your description it seems like they don t want any sort of overlapping .", "The updated question clarifies the OP wants a formal definition of overlapping patterns .", "Patterns that do not rely on the order in which they are matched are called disjoint or non-overlapping .", "I tried margin but then I have overlapping again .", "There is a bug.. . try to add another overlapping record : insert into period values 7 2013-04-08 10 : 00 2013-04-08 11 : 00 Test I expect just another 1h on overlapping sum .", "possible duplicate of Merging a list of time-range tuples that have overlapping time-ranges http : stackoverflow.com questions 5679638 merging-a-list-of-time-range-tuples-that-have-overlapping-time-ranges", "Each record has 30 attributes how can I discover if there is class overlapping using Weka features", "But I can t seem to figure out how to add to the code that it has to read non-overlapping letters .", "As an example suppose we work with lists of booleans : .. . .. . Here the remaining set did not change so the last pattern is overlapping .", "So in the case of overlapping views - touch-events are dispatched from the topmost child to the one behind then another one behind the 2nd child and so on .", "@R ppell sVulture The documentation clearly says that it does not check for overlaps so you should not pass overlapping buffers so the const makes sense .", "In order to prevent overlapping instances you can use a type wrapper that is used to distinguish arbitrary lists from the lists you are using .", "My goal is to get the closest profile from me and check for if there s some other profile overlapping it .", "I am sorry I am not quite familiar with the term overlapping but just double-checking if it has any other synonyms .", "The problem is : Since the imported model is complex it has a lot of overlapping parts ." ] }
{ "confidence": [ 59.87704086303711, 56.7111930847168, 45.06504821777344, 42.22616195678711, 40.656898498535156, 39.81041717529297, 39.228702545166016, 38.746803283691406, 38.50847625732422, 38.091304779052734, 37.283226013183594, 37.04091262817383, 36.9492073059082, 36.83055114746094, 36.827457427978516, 36.616302490234375, 36.30446243286133, 36.29752731323242, 36.01502227783203, 35.82033157348633 ], "content": [ "Question : I have elements which are overlapping and I would like to prevent this . Here is a picture : http : grab.by cB7t .. . .. . Also here is the CSS for those elements : .. . .. . And here they are in the HTML : .. . .. . As you can see I am using them as simple styled links using the HTML a tag . The reason that their positions are absolute is because I am moving them using jQuery : .. . .. . When they move though they sometimes overlap which is annoying . How can I prevent them from overlapping Thank you for your efforts . Comment : They re overlapping because you re positioning them over each other . Just don t position them over each other if you don t want them to overlap . Comment : @user156629 They are being positioned at random . Comment : @Robert Koritnik Thank you for correctly formatting my snippets - I realized I used the single line symbols instead of block snippets however it said because I am a new user I cannot post more than 2 hyperlinks . Comment : If you re going to position them absolutely and randomly assign them positions then you re going to need some relatively complex logic to make sure your moveAll function doesn t position them over each other . It will need to determine if any other elements bounding-box will be overlapped by the next element it moves to it s determined location choose another position if it does and check again until it finds an unused area . Are you asking for the function logic to do this Comment : No worries . that s why we re here more seasoned users . To help . .. . Answer : You can change the position value to relative . See my example : http : jsfiddle.net NmmX6 2 .. . .. . I changed your loop so that it isn t id dependent : .. . .. . I tested it and did not find one case where it actually overlaps but check it out . Comment : It was overlapping for me about 20 of the time . Comment : Overlapped for me as well . Change 500 to 200 and it will be more likely that they will overlap .", "Question : I have elements which are overlapping and I would like to prevent this . Here is a picture : http : grab.by cB7t .. . .. . Also here is the CSS for those elements : .. . .. . And here they are in the HTML : .. . .. . As you can see I am using them as simple styled links using the HTML a tag . The reason that their positions are absolute is because I am moving them using jQuery : .. . .. . When they move though they sometimes overlap which is annoying . How can I prevent them from overlapping Thank you for your efforts . Comment : They re overlapping because you re positioning them over each other . Just don t position them over each other if you don t want them to overlap . Comment : @user156629 They are being positioned at random . Comment : @Robert Koritnik Thank you for correctly formatting my snippets - I realized I used the single line symbols instead of block snippets however it said because I am a new user I cannot post more than 2 hyperlinks . Comment : If you re going to position them absolutely and randomly assign them positions then you re going to need some relatively complex logic to make sure your moveAll function doesn t position them over each other . It will need to determine if any other elements bounding-box will be overlapped by the next element it moves to it s determined location choose another position if it does and check again until it finds an unused area . Are you asking for the function logic to do this Comment : No worries . that s why we re here more seasoned users . To help . .. . Answer : Removing position : absolute would render them side-by-side . JSFiddle http : jsfiddle.net NmmX6 .. . .. . But if the whole point is to scatter them around randomly then you will have to keep track of positioned elements and take that into account when calculating their position . You should save each link s position and calculate every next link s position according to previous already positioned links . There s simply no other way when you want random positions and non overlapping . Final non-overlapping solution .. . .. . This is a working example http : jsfiddle.net 92c9a 2 of non-overlapping functionality . If you d want your links to not even touch you should change to and to in the if-statement condition . Relevant code Comment : But then I can t move them using jQuery . Comment : @Tim : check my edit . Comment : @Tim : I ve written some code that makes your links non-overlapped . Check the second code and see how it works . You can see log as well . Every dot in it is a failed attempt . So you can see that it doesn t need so many attempts to calculate free space for your links . Number of attempts will of course become bigger when there s small space for all links . Comment : +1 nice answer . It might be worth adding a limit to the number of attempts to position each element say 100 just to stop the browser freezing if there is no solution . Comment : @thirtydot : Or even less when there s definitely lots of space for the elements . The whole positioning process could as well be restarted one more time and if it failed again there could be some lifeline hardcoded calculation that deterministically positions elements not random though . But you re right . There should be some too long loop checking . But that s on the user that will use this code .", "Question : I have a list of tuple list which have overlapping elements . I am trying to merge overlapping elements in the tuple list . Here is a code that i am working on which uses foldleft to merger overlapping tuple list from the list.The merging doesn t seam to be working as it misses out some elements of the tuple list.Each tuple list contains 4 tuples present in them . Each tuple list in the list often overlapping as they are generated from a bigger list using sliding function . here is the example data which i am using : .. . .. . The merged list look like : .. . .. . Update 1 : .. . .. . Overlap : If two list of tuples have the 3 or more exact tuples present in both list then they are supposed to be overlapping list of tuples.But there should not be any difference when two list is merged.If one of the tuple values in both list have same integer but different char then they shall not be merged . Merge : Combining two or more list of tuple list when they overlap . Update 2 : I have come up with a small solution but not sure how efficient is it . so when i print the above code i get tuple list grouped in this manner . i have printed only the index of the each tuple group that should be merged . Result generated : ListBuffer 0 2 0 3 1 4 2 5 3 6 4 7 5 8 6 9 7 10 .. . .. . here is the list of tuples with their index that was used .. . .. . So now all i had to do was use the interGrps link the groups based on second value and finally replace the indexes with list of tuples. . Comment : The definition of your merged list and what you mean by overlap is very unclear especially as you don t give the totals . Comment : Sorry still unclear . Do they overlap when there is a difference in char with the same integer value It s a bit confusing because you use merge there . Is it correct to say two lists overlap if they share 3 or more tuples and any pair of tuples with the same number do not have different characters Comment : Yes two lists overlap if they share 3 or more tuples and any pair of tuples with the same number do not have different characters Comment : But that produces more output elements not less as now less things overlap . See my updated question - which still won t give the right answer Comment : i have updated the question with answer i ended up with . .. . Answer : The following code follows I think the description of your algorithm . However it does not give the same output so there s something still to clear up about wha you want .. . .. . First the test data .. . .. . Now a method to implement If two list of tuples have the 3 or more exact tuples present in both list then they are supposed to be overlapping list of tuples . Then using something I wrote over here http : stackoverflow.com a 35919875 21755 that groups elements that match according to the predicate .. . .. . we can get a list of lists of overlapping elements .. . .. . Then we write a function to merge a list of overlapping tuples : .. . .. . doing a union of the tuples by adding any that aren t already in the accumulated result and adding up the ints . The .sorted is just to make it easier to visually review the result .. . .. . Then merge the overlapping entries .. . .. . Giving this but that isn t the output you have EDIT : Following the comments here s an updated isOverlap . However it means less overlaps than the original so more elements in the final merged output so it s still not right : Comment : Thank you for the reply . I see the problem.The fault is on my side sorry as i missed one condition in the explanation . When i merge the list of tuples they should have minimum 3 overlaps but with no difference . ie in your output the first list of tuple has 348 c 348 t .I shall update the question Comment : Sorry not clear what you mean there : Comment : Its okey thank you.When two tuples are merged they are two conditions- 1 . They should have more than 3 intersections as per given in description . 2 . If any tuple in both list has same integer but a different string char as its value then they cannot be grouped together . Comment : Oh cool so it s just a matter of changing isOverlap . However that will give more overlapping groups so a longer final merged list . But my code already produces a list longer than your output in the question so that doesn t seem right . Comment : I am not sure because when i tested with the conditions i mentioned i always ended up with less sequences than there should be . So I had come up different solution without making it soo complex . I have just posted it above . not sure how efficient it though .", "Question : My current understanding of pattern overlapping in Haskell is that 2 patterns are considered to be overlapping if some argument values passed to a function can be matched by multiple patterns . Given : .. . .. . passing the argument value 1 would match both the first pattern x and the 2nd pattern : xs - so that would mean the function has overlapping patterns even though both patterns can be matched . What makes this confusing is that although the patterns are by the definition above overlapping GHC does not show any warning about them being overlapping . Reverting the 2 pattern matches in the last function does show the overlapping warning : .. . .. . Warning : .. . .. . It is almost as though GHC consideres the patterns overlapping if a previous pattern makes it impossible to match a pattern which occurs later . What is the correct way to determine if a function has overlapping patterns or not .. . .. . Update .. . .. . I am looking for the overlapping pattern definition used in fp101x course . According to the definition used in fp101x the following function has overlapping patterns : .. . .. . This is in contradiction with GHC definition of overlapping pattern which does not consider it to have any overlapping patterns . Without a proper definition of what overlapping pattern means in the fp101x course context it is impossible to solve that exercise . And the definition used there is not the GHC one . Comment : GHC warns about pattern overlapping when it actually detects pattern inclusion -- precisely when one case in the pattern becomes unreachable since it only covers values already dealt with in previous cases . Comment : @chi : that would be what GHC consideres to be pattern overlapping . The first function definition seems to be considered pattern overlapping also . Is there a formal definition of what pattern overlapping is Comment : From your description it seems like they don t want any sort of overlapping . Then you could do something like use the pattern last : x : xs last x : xs last x x or use guards . .. . Answer : The updated question clarifies the OP wants a formal definition of overlapping patterns . Here overlapping is meant in the sense used by GHC when it emits its warnings : that is when it detects that a case branch is unreachable because its pattern does not match with anything which is not already handled by earlier branch . A possible formal definition can indeed follow that intuition . That is for any pattern p one can first define the set of values denotations p matching with p . For this it is important to know the type of the variables involved in p -- p depends on a type environment Gamma . Then one can say that in the sequence of patterns .. . .. . the pattern p is overlapping iff p as a set is included in q0 union .. . union qn . The above definition is hardly operative though -- it does not immediately lead to an algorithm for checking overlaps . Indeed computing p is unfeasible since it is an infinite set in general . To define an algorithm I d try to define a representation for the set of terms not yet matched by any pattern q0 . . qn . As an example suppose we work with lists of booleans : .. . .. . Here the remaining set did not change so the last pattern is overlapping . As another example : .. . .. . As you can see in each step we match each of the remaining samples with the pattern at hand . This generates a new set of remaining samples possibly none . The collection of all these samples forms the new remaining set . For this note that it is important to know the list of constructors for each type . This is because when matching with True you must know there s another False case remaining . Similarly if you match against there s another : case remaining . Roughly when matching against constructor K all other constructors of the same type remain . The above examples are not yet an algorithm but they can get you started hopefully . All of this of course ignores case guards which make the overlap undecidable pattern guards GADTs which can further refine the remaining set in quite subtle ways .", "Question : I use a RelativeLayout to place views using LayoutParams and setting the top y coordinate and left margin x coordinate . How can I make sure that when I place views using absolute position that none of them overlap each other I do run into overlapping issues in some spots and the only work around I have right now is to scale up the y values . Here s my code to place the views : .. . .. . then once I create the view I place it in the layout at the correct spot : .. . .. . Here s a picture of what happens though sometimes : .. . .. . enter image description here http : i.stack.imgur.com 11h5m.png .. . .. . The textview and radiogroup in this case are overlapping . Are there any ways to fix overlapping programmatically Thank you . .. . Answer : You don t most likely want to use x y coordinates to set the position of your views instead use alignTop alignBottom layout parameters to set the position relative to other view which will ensure that no overlapping is going to happen Also please consider using different layouts such as LinearLayout with Vertical orieantation its much more efficient in simple cases such as yours . Also please consider defining layout in XML instead of Java code .", "Question : I m looking for the number of days within several dateranges . I used the datediff function to sum the days but now I want to exclude overlapping days . So from the oldest date untill curdate I would like to have the number of days within the dateranges and every day only counted once if it is in an overlapping range . My table looks like this : .. . .. . If I sum this I would get 382 but the answer I m looking for is 369 . Since the last row is completely overlapping the second row . Does anyone have a solution Comment : Hmm seems doable at first but what is the rule if periods overlap only partially Like if the third period was until 2015-10-31 -- Ah got it now count actually gives the number of days in that range and is not an independent data column . Comment : Which RDBMS are you using Comment : Yes Column Count is a count of the number of days in de daterange . Tried to make it easier to explain my question . If ranges overlap partially it should count only the days of the part that is not overlapping Comment : Working with a MySQL database Comment : The end dates themselves do not count as part of the periods i.e . they are the first day after the period .. . Answer : I have padded out your example with a second Person id and shortened the column names a bit to make the code a little shorter : .. . .. . So working on the above data you could apply the following query : .. . .. . Contrary to other RDBMS MySql has a certain procedural feel to it when it comes to select statements . You can actually use variables @id and @ed in them that will-change their state over time in this context the order by clause at the end is extremely important . The basic idea behind this query is : start with a certain pid and list the intervals in the order of increasing start dates sd . Always remember the maximum value of the end date ed in variable @ed . Now with each new interval check whether there is an overlap with the previous interval i . e . check whether the current start date sd is smaller than the previous maximum end date @ed and calculate the interval days accordingly . The first case clause is necessary to reset the variables @id and @ed whenever the current pid changes . Subquery const just sets the variable @id in the beginning . The query yields the following result : .. . .. . See here for a Demo http : sqlfiddle.com 2 e7638 2 . If you are just interested in the total sums you can of course wrap the whole query in another group ing one like this : .. . .. . which will then get you Comment : Thanks a lot Will try this query . Comment : Thanks It worked", "Question : I use a RelativeLayout to place views using LayoutParams and setting the top y coordinate and left margin x coordinate . How can I make sure that when I place views using absolute position that none of them overlap each other I do run into overlapping issues in some spots and the only work around I have right now is to scale up the y values . Here s my code to place the views : .. . .. . then once I create the view I place it in the layout at the correct spot : .. . .. . Here s a picture of what happens though sometimes : .. . .. . enter image description here http : i.stack.imgur.com 11h5m.png .. . .. . The textview and radiogroup in this case are overlapping . Are there any ways to fix overlapping programmatically Thank you . .. . Answer : Use align top layout below and other properties provided by Relative Layout to align your views.I would also recommend you to align your layouts via XML and not programmatically . Read this for more info on relative layouts http : developer.android.com intl pt-br reference android-widget RelativeLayout.html", "Question : I use a RelativeLayout to place views using LayoutParams and setting the top y coordinate and left margin x coordinate . How can I make sure that when I place views using absolute position that none of them overlap each other I do run into overlapping issues in some spots and the only work around I have right now is to scale up the y values . Here s my code to place the views : .. . .. . then once I create the view I place it in the layout at the correct spot : .. . .. . Here s a picture of what happens though sometimes : .. . .. . enter image description here http : i.stack.imgur.com 11h5m.png .. . .. . The textview and radiogroup in this case are overlapping . Are there any ways to fix overlapping programmatically Thank you . .. . Answer : Either restrict the radio-button to stay below the text view or restrict the text view to stay above the radio-button . Use the addRule int int method of layout params and RelativeLayout.BELOW or RelativeLayout.ABOVE . http : developer.android.com reference android-widget RelativeLayout.LayoutParams.html addRule int int", "Question : I m looking for the most memory efficient way to solve this problem . I have a list of tuples representing partial string matches in a sentence : .. . .. . The first value of each tuple is the start position for the match the second value is the length . The idea is to collapse the list so that only the longest continue string match is reported . In this case it would be : .. . .. . I do not want just the longest range like in algorithm to find longest non-overlapping sequences http : stackoverflow.com questions 4593583 but I want all the ranges collapsed by the longest . In case your wondering I am using a pure python implementation of the Aho-Corasick for matching terms in a static dictionary to the given text snippet . EDIT : Due to the nature of these tuple lists overlapping but not self-contained ranges should be printed out individually . For example having the words betaz and zeta in the dictionary the matches for betazeta are 0 5 4 8 . Since these ranges overlap but none is contained in the other the answer should be 0 5 4 8 . I have also modified the input dataset above so that this case is covered . Thanks Comment : possible duplicate of Merging a list of time-range tuples that have overlapping time-ranges http : stackoverflow.com questions 5679638 merging-a-list-of-time-range-tuples-that-have-overlapping-time-ranges Comment : i imagine you d use an interval-tree merging completely contained intervals on addition but giving a complete worked answer is more than i can do right now . Comment : the suggested duplicate merges partial overlaps . i think this question is supposed to merge only proper inclusion but am guessing . in other words other answer gives 0 4 for 0 3 1 4 while i guess this question expects both ranges to be returned . Comment : @andrew cooke - oh. . : Comment : @andrew cooke : The OP wants the list collapsed so that only the longest continuous strings matches remain -- so I don t understand why you think both ranges would be in your two tuple example . .. . Answer : Comment : This does the trick Thanks a lot", "Question : Im creating a website for a Software Design project and one of the criteria is that nothing is allowed to overlap . I have a hover feature so that when you hover over the steps the process of the step is shown . With step 2 3 the text displayed during the hover effect is blocked by the edge of the webpage so it makes new lines in a kind of paragraph form . Screenshot of Webpage with hover effect on step 2 : http : s32.postimg.org kw0u3lk8l Screen Shot 2016 05 14 at 7 05 13 PM.png .. . .. . This is what I want to do with step 7 8 as instead of being blocked by anything they continue as a string overlapping the circle . So i was wondering if there was a way of making the circle a solid object or something that cannot be overlapped forcing the text to make new lines . Image of the overlap on step 8 hover effect below : http : s32.postimg.org yof8z8b05 Screen Shot 2016 05 14 at 7 05 25 PM.png .. . .. . Here is my Code : Comment : Found the solution to my problem . It is featured below . .. . Answer : To fix this issue a width must be specified then you can word-wrap . So add the lines into css for .common : Comment : Duh.. . You want to enforce a width how else would you do it Comment : @NiettheDarkAbsol Idk thats why I asked the question .", "Question : After reading the following about memcpy I proceeded to read about memmove : .. . .. . To avoid overflows the size of the arrays pointed by both the destination and source parameters shall be at least num bytes and should not overlap for overlapping memory blocks memmove is a safer approach . LINK http : www.cplusplus.com reference cstring memcpy .. . .. . And after checking the program used to illustrate the working of memmove I decided to tweak it by using memcpy instead to see how different is the output.To my surprise they are the same even if it s a case of overlapping memory blocks.Here is the program and the output and I have proceeded to describe my confusion after that : .. . .. . Output memmove can be very very useful . .. . .. . This output is the same as it is for memmove .And here are my confusions : .. . .. . 1 Why is output same for both Since there is no intermediate buffer used in case of memcpy I expect the copy to start by copying the character in str+15 position to the str+20 position overwriting what is there character in str+16 position to str+21 position and so on till character in str+20 position which has by now changed to the character in str+15 position to be copied to the str+25 position .But it s not so there is no overwriting and it s acting as-if an intermediate buffer is used to write the exact original string.Here s an illustration : .. . .. . Then why is memcpy copying it as memmove can be very very useful instead of memmove can be very very very v 2 Now a minor secondary question arising from it.The following is said about memmove LINK http : www.cplusplus.com reference cstring memmove .. . .. . Copying takes place as-if an intermediate buffer were used allowing the destination and source to overlap . .. . .. . What exactly is as-if here Isn t an intermediate buffer really used for memmove Comment : @Koushik Not undefined.Unless an intermediate buffer is used I really expect the character at str+20 to be overwritten . Comment : Unless an intermediate buffer it will be implementation defined . really cant tell . Comment : @Koushik Since the second parameter of memcpy is a constant why are we even allowed to write onto that without generating errors for memcpy Comment : compiler has no way of knowing which memory you are accessing . it only has the pointer to the source . you are saying that the source wont be modified by decalring the second parameter as const but you break the promise soo after which compiler cant help.so doing anything to a const declared location is UB even if the const location is not read only Comment : you can do this const int i 10 ..... . int ptr i . . ptr 100 . . printf d i . which is UB . but i broke the covenant . compiler warns but i can do it . you cant even be sure wherther it will print .. . Answer : If the objects overlap the behaviour of memcpy is undefined . There s little point in trying to reason about undefined behaviour . Since it is undefined it defies reason . You know the rules and they are clearly documented . If the objects overlap use memmove . As for the use of as-if that is to specify behaviour but not place any limitations on implementation . This allows the library implementor to use whatever method they see fit so long as the end result is the same as using an intermediate buffer . For example the implementation could detect that the objects do not overlap and so avoid using an intermediate buffer for performance reasons . Comment : The prototype of memcpy is void memcpy void destination const void source size-t num .ie the source is supposed to be a constant.Why then memcpy even let the source string be altered written onto Comment : @R ppell sVulture The documentation clearly says that it does not check for overlaps so you should not pass overlapping buffers so the const makes sense . Comment : @perreal Why aren t we warned or get an error that we are trying to change the value of a constant Comment : It s UB for source and dest to overlap . And the onus on you is to obey the contract and not pass overlapping objects . One of the goals of the C standard-library is to provide high performance code . And this is achieved in this case by making the programmer guarantee pre-conditions rather than the library function spending time checking pre-conditions . Comment : @R ppell sVulture because you are passing in pointers it cannot warn you without checking it online which is the reason why it is undefined .", "Question : I m having issues with overlapping contents . When I try this code for the HTML the text within content left overlaps the entire area i want it to contain . When I change height to auto it does not solve the problem. . Contents overlap to the right and the bottom is cut off . CSS .. . .. . Example jsfiddle Example http : jsfiddle.net L6acE Comment : you will need to provide the CSS for the rest of the elements.. . a working jsfiddle http : jsfiffle.net would be best Comment : @GabyakaG.Petrioli jsfiddle.net L6acE http : jsfiddle.net L6acE .. . Answer : its because there is no space in string word try .. . .. . and i dont think any valid string word as long as yours Comment : +1 Right on NullPointer", "Question : This table is used to store sessions events .. . .. . We don t want to have conflict between ranges .. . Let s say we need to insert a new session from 2010-01-05 to 2010-01-25 .. . We would like to know the conflicting session s . Here is my query : .. . .. . Here is the result : .. . .. . Is there a better way to get that .. . .. . fiddle http : sqlfiddle.com 9 f21cc 2 Comment : Your third condition is wrong . It is supposed to be 2010-01-05 start date AND 2010-01-25 end date . See stackoverflow.com a 28802972 632951 http : stackoverflow.com a 28802972 632951 for visualization . Your current third condition will never evaluate because the first and second condition already covers it . .. . Answer : These 3 lines of sql clauses cover the 4 cases of overlapping required . Comment : good job mate : Comment : Even if the OP was not apparently looking for this overlapping definition this answer is the best solution for the problem described by the question name . I was looking for this overlap which is the true overlap .", "Question : I m using Weka to develop a classifier for a medical problem . This dataset has a class imbalance situation and I want to know if there is also a problem of class overlapping . Each record has 30 attributes how can I discover if there is class overlapping using Weka features .. . Answer : To solve the class imbalance problem you can use SMOTE . It is in the Weka supervised filter instance . But can you explain what do you mean by class overlapping Comment : I used SMOTE to oversampling minority class and I had better results . Class Overlapping happens when some samples from different classes have very similar characteristics . So they lead to bad classification models . Comment : Does it have something to do with the degree of redundancy of features or correlations among features I am sorry I am not quite familiar with the term overlapping but just double-checking if it has any other synonyms .", "Question : I have two matrices . Each matrix is of dimension 3 k and represents k circles with each column in the form of x y r where x y is the center of the circle and r is it s radius . So one matrix which has 3 circles is in the form of x1 x2 x3 y1 y2 y3 r1 r2 r3 .. . .. . I need to find what are the circles which overlap and the overlapped area between the two matrices . Suppose consider a circle in first matrix . Now consider every other circle in second matrix . Now I need to find out what circles in the second matrix overlap with the circle considered . I need to do this for every circle in the first matrix . Similarly for every circle in the second matrix with respect to first matrix . So I need for each circle in the two matrices There are k1+k2 of them how much area is overlapping with the other matrix and what are the circles in the other matrix that are overlapping . .. . .. . Clearly there may be multiple circles which overlap.The dimension k may be different for two matrices . I have 2 extra matrices of each matrix one sorted by it s x coordinates and other sorted by y coordinates if that helps in computation.The problem is that there are a lot of circles in the matrix and i m looking for an efficient way to do it . Moreover I would like to extend this this more than two matrices and then an efficient algorithm would greatly improve the execution-time . A preview of the two images whose corresponding matrices of circles i have with me is given in the this link : https : www.dropbox.com s om5has5uw91dj6p overlap.jpg Comment : Think about what an inter-point distance-matrix would do for you . You can compute that matrix using bsxfun as an aid . TRY IT . Try something . You are more likely to get a useful response if you show some effort rather than just asking for someone to do it for you . Comment : Actually finding out whether two circles overlap is elementary however calculating the area of overlap requires some math . But once you formulate that formula in terms of the coordinates and radii then it will just be a matter of evaluation . However I don t know how it can be done in a complexity less than O k1 k2 . Comment : When you have lots of circles and relatively few overlaps you can sort on the X coordinate for example and only try to match when dx sum r . This can greatly reduce the number of comparisons needed . Alternatively you can sort on radius and for smaller circles divide the image into smaller boxes and only compare adjacent boxes . All these will in general reduce the number of comparisons - but matlab is pretty fast.. . what is the price of your time developing debugging more complex algorithms .. . Answer : You need two things : .. . .. . 1 . Find out what pairs of circles have overlap distance sum of radii .. . 2 . compute area of overlap for those pairs .. . .. . EDITED I modified the code to add some vectorization and trap the case where one circle is entirely inside the other - where the Wolfram formula http : mathworld.wolfram.com Circle-CircleIntersection.html was breaking down . Demonstrated speed with 1000 x 2000 circles compared . Here is some code that does these things with simple example . It seems to be reasonably efficient . Took 1.4 seconds to compare 1000 with 2000 circles 1.66 million overlapping . Put the following in its own file overlap.m in your path : this computes the overlap Comment : +1 can you give a reference explaining the overlap geometric formula Comment : ah never mind now I see you mentioned Wolfram : mathworld.wolfram.com Circle-CircleIntersection.html http : mathworld.wolfram.com Circle-CircleIntersection.html Comment : @Amro - I had accidentally edited out the link which was there in my code at one time . Thanks for pointing it out - I have added it back in .", "Question : My current understanding of pattern overlapping in Haskell is that 2 patterns are considered to be overlapping if some argument values passed to a function can be matched by multiple patterns . Given : .. . .. . passing the argument value 1 would match both the first pattern x and the 2nd pattern : xs - so that would mean the function has overlapping patterns even though both patterns can be matched . What makes this confusing is that although the patterns are by the definition above overlapping GHC does not show any warning about them being overlapping . Reverting the 2 pattern matches in the last function does show the overlapping warning : .. . .. . Warning : .. . .. . It is almost as though GHC consideres the patterns overlapping if a previous pattern makes it impossible to match a pattern which occurs later . What is the correct way to determine if a function has overlapping patterns or not .. . .. . Update .. . .. . I am looking for the overlapping pattern definition used in fp101x course . According to the definition used in fp101x the following function has overlapping patterns : .. . .. . This is in contradiction with GHC definition of overlapping pattern which does not consider it to have any overlapping patterns . Without a proper definition of what overlapping pattern means in the fp101x course context it is impossible to solve that exercise . And the definition used there is not the GHC one . Comment : GHC warns about pattern overlapping when it actually detects pattern inclusion -- precisely when one case in the pattern becomes unreachable since it only covers values already dealt with in previous cases . Comment : @chi : that would be what GHC consideres to be pattern overlapping . The first function definition seems to be considered pattern overlapping also . Is there a formal definition of what pattern overlapping is Comment : From your description it seems like they don t want any sort of overlapping . Then you could do something like use the pattern last : x : xs last x : xs last x x or use guards . .. . Answer : I am looking for the overlapping pattern definition used in fp101x course . Patterns that do not rely on the order in which they are matched are called disjoint or non-overlapping . from Programming in Haskell Graham Hutton .. . .. . So this example would be non-overlapping .. . .. . Because you can change the order of pattern-matching like this : .. . .. . And here you can t : .. . .. . So the last one is overlapping .", "Question : I m looking for the number of days within several dateranges . I used the datediff function to sum the days but now I want to exclude overlapping days . So from the oldest date untill curdate I would like to have the number of days within the dateranges and every day only counted once if it is in an overlapping range . My table looks like this : .. . .. . If I sum this I would get 382 but the answer I m looking for is 369 . Since the last row is completely overlapping the second row . Does anyone have a solution Comment : Hmm seems doable at first but what is the rule if periods overlap only partially Like if the third period was until 2015-10-31 -- Ah got it now count actually gives the number of days in that range and is not an independent data column . Comment : Which RDBMS are you using Comment : Yes Column Count is a count of the number of days in de daterange . Tried to make it easier to explain my question . If ranges overlap partially it should count only the days of the part that is not overlapping Comment : Working with a MySQL database Comment : The end dates themselves do not count as part of the periods i.e . they are the first day after the period .. . Answer : This SQL will return the sum of days not counting the overlaps double : .. . .. . It is required that the periods are unique for a given person so that no two periods have both the same start date as end date . This fiddle http : sqlfiddle.com 9 0a8a1 3 returns 369 for the sample-data and person . Alternative .. . .. . You could create a sequence table which is useful for many purposes and then count unique days with that . So as a one-shot operation you would extend your database model with an additional table that just contains natural numbers 0 1 2 .. . : .. . .. . You can continue to insert records like that but for the current task this is more than enough . Now to the actual solution : .. . .. . This query uses the unique numbers for getting days starting from the earliest start date and includes such dates when they are in a period . Then it counts the unique dates that fulfil that condition . The where clause is optional but will speed up the query . Here is a fiddle http : sqlfiddle.com 9 b4c5e9 10 . It produces this result : Comment : When applying your first solution to my extended sample-data see above it only returns a single result for one person id . The Alternative solution works perfectly though and has the advantage of beeing applicable in any RDBMS almost unchanged DATEDIFF and date add might need some attention Comment : Thanks for pointing that out @cars10 I had forgotten to add the group-by person id at the end . Is fixed now . Comment : Thanks a lot for the answer . Gonna try it Comment : Thanks for the help . I managed to create a usefull query", "Question : I need to place text in an array based on the content in the array . For example .. . .. . will output .. . .. . Which is what I want however the issue is the elements in the array may be close together like 51 instead of 55 instead : .. . .. . which would output .. . .. . since the font-size of the text is larger than a single pixel . Is there a way to position the elements as close to their natural spot without overlapping -- in the example 50 would go up just a hair and 51 would go down just a hair so they dont overlap . Comment : What does just a hair higher mean in programming You need to know the font-size line size and then it s just mathematics.. . I somewhat doubt there is a premade library for you to use . .. . Answer : You could use position : relative like this : .. . .. . Update : .. . .. . This should work for you : Comment : Thanks Rizer -- the relative works great for non-overlapping but I don t get the placement I need -- specifically I put out 2 columns side-by-side and if possible I want the same number to appear at the same position in the 2 columns . If one array contains 5 10 15 20 50 and the other contains 10 50 then the 50 in the 1st column would go down an extra 4 positions because of the relative tag . Comment : @NevilleAga updated my answer so that it is absolute an you can have 2 columns Also i check if that the min . difference between the number is 15 if not im add 10 to the value Comment : @NevilleAga Did this worked for you", "Question : My current understanding of pattern overlapping in Haskell is that 2 patterns are considered to be overlapping if some argument values passed to a function can be matched by multiple patterns . Given : .. . .. . passing the argument value 1 would match both the first pattern x and the 2nd pattern : xs - so that would mean the function has overlapping patterns even though both patterns can be matched . What makes this confusing is that although the patterns are by the definition above overlapping GHC does not show any warning about them being overlapping . Reverting the 2 pattern matches in the last function does show the overlapping warning : .. . .. . Warning : .. . .. . It is almost as though GHC consideres the patterns overlapping if a previous pattern makes it impossible to match a pattern which occurs later . What is the correct way to determine if a function has overlapping patterns or not .. . .. . Update .. . .. . I am looking for the overlapping pattern definition used in fp101x course . According to the definition used in fp101x the following function has overlapping patterns : .. . .. . This is in contradiction with GHC definition of overlapping pattern which does not consider it to have any overlapping patterns . Without a proper definition of what overlapping pattern means in the fp101x course context it is impossible to solve that exercise . And the definition used there is not the GHC one . Comment : GHC warns about pattern overlapping when it actually detects pattern inclusion -- precisely when one case in the pattern becomes unreachable since it only covers values already dealt with in previous cases . Comment : @chi : that would be what GHC consideres to be pattern overlapping . The first function definition seems to be considered pattern overlapping also . Is there a formal definition of what pattern overlapping is Comment : From your description it seems like they don t want any sort of overlapping . Then you could do something like use the pattern last : x : xs last x : xs last x x or use guards . .. . Answer : I think the thing is that in the first case not all matches of x will match : xs . On the second case the converse is true no one matching : xs will fall through x . So overlapping really means that there is an unreachable pattern . This is what GHC documentation has to say about it : .. . .. . By default the compiler will warn you if a set of patterns are either incomplete i.e . you re only matching on a subset of an algebraic data type s constructors or overlapping i.e . .. . .. . .. . f : : String - Int .. . f 0 .. . f : xs 1 .. . f 2 2 .. . .. . .. . where the last pattern match in f won t ever be reached as the second pattern overlaps it . More often than not redundant patterns is a programmer mistake error so this option is enabled by default . Maybe unreachable pattern would be a better choice of words . Comment : Do you know if there is any definition which can be used to determine exactly what overlapping pattern means I m pretty sure that both functions regardless of order are considered to have overlapping patterns but without a clear definition it is imposibile to determine . Comment : Will wait for better answers since this needs a clear definition that covers all the cases . Comment : Overlapping patterns are a compiler warning . They only come up when there s an unreachable pattern . I don t think there s a precise meaning for this anywhere . I ll add what GHC documentation says to my answer . I hope that further clarifies things . Comment : The problem is that the GHC meaning of overlapping pattern does not match the first function definition even though that is an overlapping pattern too . Comment : In the first definition last : xs last xs is still reachable last 1 2 for instance . The warning is about a pattern being completely overlapped by a previous pattern .", "Question : My current understanding of pattern overlapping in Haskell is that 2 patterns are considered to be overlapping if some argument values passed to a function can be matched by multiple patterns . Given : .. . .. . passing the argument value 1 would match both the first pattern x and the 2nd pattern : xs - so that would mean the function has overlapping patterns even though both patterns can be matched . What makes this confusing is that although the patterns are by the definition above overlapping GHC does not show any warning about them being overlapping . Reverting the 2 pattern matches in the last function does show the overlapping warning : .. . .. . Warning : .. . .. . It is almost as though GHC consideres the patterns overlapping if a previous pattern makes it impossible to match a pattern which occurs later . What is the correct way to determine if a function has overlapping patterns or not .. . .. . Update .. . .. . I am looking for the overlapping pattern definition used in fp101x course . According to the definition used in fp101x the following function has overlapping patterns : .. . .. . This is in contradiction with GHC definition of overlapping pattern which does not consider it to have any overlapping patterns . Without a proper definition of what overlapping pattern means in the fp101x course context it is impossible to solve that exercise . And the definition used there is not the GHC one . Comment : GHC warns about pattern overlapping when it actually detects pattern inclusion -- precisely when one case in the pattern becomes unreachable since it only covers values already dealt with in previous cases . Comment : @chi : that would be what GHC consideres to be pattern overlapping . The first function definition seems to be considered pattern overlapping also . Is there a formal definition of what pattern overlapping is Comment : From your description it seems like they don t want any sort of overlapping . Then you could do something like use the pattern last : x : xs last x : xs last x x or use guards . .. . Answer : I would suggest using reasoning logic in combination with compiler messages and test results would be a better way to understand if a function has overlapping patterns or not . As two examples the first which has already been listed indeed results in a compiler warning . in the second case if we swap the last two lines around then a compiler error which states . Program error : pattern match failure : init1 results .. . .. . This matches the logic of passing a singleton list which could match in both patterns and in this case the now second line . will match in both cases . If we then move onto the second example .. . .. . In the second case if we again swap the last line with the first line then we don t get a compiler error but we also don t get the results we expect . Main drop 1 1 2 3 returns an empty list .. . .. . In summary I think this is why reasoning as oppose to a formal definition for determining overlapping patterns works ok ." ] }
[ "yes-answer-long", "yes-answer-short" ]
css
UNK_RELATION
pde@differential-equations@49
pde -- use this tag for questions about partial @placeholder .
{ "confidence": [ 30.45761489868164, 30.45761489868164, 29.5107421875, 27.37660026550293, 26.17517852783203, 26.02295684814453, 25.84528350830078, 25.667518615722656, 25.64392852783203, 25.532703399658203, 24.97635269165039, 24.720298767089844, 24.669281005859375, 24.490190505981445, 24.109905242919922, 23.879796981811523, 23.579151153564453, 23.579151153564453, 23.579151153564453, 23.579151153564453, 23.419071197509766, 23.251140594482422, 23.018959045410156, 22.82010269165039, 22.762657165527344, 22.6407470703125, 22.39444923400879, 22.39444923400879, 22.276493072509766, 21.85081672668457, 21.736682891845703, 21.666099548339844, 21.666099548339844, 21.595598220825195, 21.594514846801758, 21.594514846801758, 21.51828956604004, 21.499406814575195, 21.499406814575195, 21.499406814575195, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.155399322509766, 21.108352661132812, 20.876544952392578, 20.876544952392578, 20.838470458984375, 20.838470458984375, 20.623802185058594, 20.61678695678711, 20.52475929260254, 20.49795913696289, 20.49795913696289, 20.49795913696289, 20.49795913696289, 20.49795913696289, 20.393693923950195, 20.393693923950195, 20.393693923950195, 20.350147247314453, 20.264324188232422, 20.224109649658203, 20.18075180053711, 19.972902297973633, 19.972902297973633, 19.725780487060547, 19.540382385253906, 19.3992977142334, 19.394739151000977, 19.376379013061523, 19.356616973876953, 19.356616973876953, 19.356616973876953, 19.356616973876953, 19.169189453125, 19.169189453125, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172, 19.154644012451172 ], "content": [ "use the eclipse-pde tag unless you really mean Partial-Differential Equations .", "@Markus use the eclipse-pde tag unless you really mean Partial-Differential Equations .", "It include a default IDE that use .pde extension .", "using PDE export or PDE build", "Wiring is a microcontroller that use the same IDE and Arduino use a modified version but also using .pde .", "then how to have pde toolbox", "Some PDE builds use map files .", "I want to solve the following PDE fourth order Partial Differential equation in polar-coordinates equation is given in the image file : equation of 4th order pde http : i.stack.imgur.com lXNXg.png .. . .. . I will highly appreciate if anyone help me .", "Then solve the pde .", "I want to build an Eclipse RCP application with a PDE headless build http : www.eclipse.org pde pde-build .", "The PDE headless build works well .", "To do this I am trying to solve an elliptic PDE using MATLAB s PDE toolbox .", "Eclipse PDE", "Sometimes PDE automatically adds dependencies to launches which can explain why it runs within PDE .", "I have problem in executing PDE function in Matlab .", "So far so good with IDE PDE build .", "What is the language of .pde file", "What is the language of .pde file", "Yes Eclipse PDE", "This is also true for PDE support .", "The documentation http : mathworks.com help pde ug pdegrad.html states that you d better switch to the recommended function evaluateGradient http : mathworks.com help pde ug evaluategradient.html .", "See this blog post : .. . .. . http : contraptionsforprogramming.blogspot.com 2010 03 ajdt-pde-builds-redux.html .. . .. . You should not be using AJDT-PDE .", "We plan to use the same P2 repo for Tycho and PDE Target definition. .", "The .pde file extension is the one used by the Processing http : processing.org Wiring http : wiring.org.co and the Arduino http : www.arduino.cc IDE .", "The project is imported but its not a PDE-Project .", "I m attempting to solve a complex PDE with FiPy .", "Is there any way to instruct headless PDE to skip this kind of checks", "Does your product file pass validation from within IDE PDE", "The Eclipse headless PDE build can be triggered from within Maven using the pde-maven-plugin .", "It is a work-in-progress and it does use PDE build under the covers .", "I have 3 coupled partial differential equation .", "From there you can open up a .pde file .", "What sense does the pde in the pom.xml make", "While searching for an implementation of the Barnsley s Fern fractal i came across a implementation that has .pde extension which programming language uses this extension", "I suppose that this is a PDE or p2 problem .", "The simplest way to obtain PDE is : .. . .. . 1 .", "PDE development is pretty exotic and you ll find that IvyDE isn t the only thing that doesn t know about it .", "I was able to implement periodic boundary conditions in 2016a for use within the pde toolbox .", "I confess that we just checked in an interactive Eclipse some time ago and use it as our PDE builder .", "I tried to use Mathematica 10.3 DSolve to solve 2D diffusion PDE with Dirichlet boundary conditions .", "I setup and meshed a domain using Matlab s PDE toolbox .", "I was solving PDE Stokes equation to be specific in Fourier space .", "Maven normally takes care of all this but it doesn t play nice with PDE .", "3.6.2 PDE plugin generates feature build.xml with empty all.features target .", "Samuel this depends very much on the exact PDE you are simulating .", "I have the build script PDE Headless build for building the RCP application .", "Told it where I wanted my PDE builder instance to go .", "I am using a plugin for the Eclipse PDE 4.6 as an IDE for a language .", "We are currently using PDE to automatically build features and our complete product .", "With some helping Ruby scripts we went with the PDE build anyway .", "Buckminster sits on top of PDE build so there s no getting away from PDE build in the near future .", "I am running eclipse PDE Build from ant file .", "But when we export them via PDE Build ant script they are jarred .", "unfortunatelly my eclipse installation is about 260MB big but I assume that a PDE build does NOT require all of those plugins in a standard eclipse installation .", "However the PDE tutorials I ve been able to find are all about a decade out of date deprecated APIs nonexistent wizards etc .", "that weird because I have the pde toolbox so I should have this function too .", "I finally needed to do this myself today to address a problem I was having where directories with spaces in their names weren t being included in the bundle PDE Build produced http : stackoverflow.com questions 2782622 why-does-headless-pde-build-omit-directories-ive-specified-in-build-propertiess .", "I try to use explicit finite difference method to solve this PDE and get the price of a call option .", "What you need is to do a PDE Build .", "Now my automated PDE build is running as expected .", "I m currently working on a pde build for a rcp application .", "Is there anything I have to do to manually enable the PDE", "In general PDE has never guaranteed forward compatibility .", "Ex : com.test.app.1.0.0.201404091703.jar .. . .. . I need to get the value 201404091703 from the PDE once the build is successful .", "As i mentioned in my post for custom bundling of the artifacts i should be able to access this value when the PDE build is finished .", "The PDE headless build generates property files for each bundle with the current version numbers .", "these were both effectively hardcoded into the build script .. . .. . About Eclipse PDE .. . .. . the uitestapplication requires another testApplication .", "There are lots of software and toolbox for solving partial differential-equations and also there are lots of them to solving a system of odes ordinary differential equation but I can t find any software or toolbox to solve a system of partial differential-equations .", "The switch is since version 1.0 as noted in arduino.cc en Guide Environment https : www.arduino.cc en Guide Environment : NB : Versions of the Arduino Software IDE prior to 1.0 saved sketches with the extension .pde .", "A .pde file is a file that can be opened up by the Processing editor .", "This may be a simple question but what is the correct FiPy syntax to use if I want to solve PDE with spatially varying coefficient that is outside of gradient", "This may be a simple question but what is the correct FiPy syntax to use if I want to solve PDE with spatially varying coefficient that is outside of gradient", "From the PDE API Tools User Guide http : wiki.eclipse.org PDE API Tools User Guide Define an API Baseline : .. . .. . An API baseline defines the state you want to compare your development workspace bundles against for the purposes of binary compatibility bundle version numbers and @since tags .", "You must not have the partial differential equation toolbox .", "I am trying to make a function to solve a pde without using the GUI however I m having trouble setting up boundary conditions .", "I run a program about partial differential equation in MATLAB so I used .. . .. . But there s an error : .. . .. . Undefined function createpde for input arguments of type double .", "According to this http : stackoverflow.com questions 17277288 what-do-the-pde-icons-in-eclipse-mean stackoverflow answer .", "To me the first question should be if you really want to use the Eclipse PDE export wizards for delivering updates .", "One option to boundary conditions in PDE discretization is to use ghost halo cells gridpoints .", "In my project I use PDE Build to build my RCP application on a remote-server in Hudson .", "As the pde build plugin is configured to use a specific version eclipse would complain that it cannot find the particular plugin even when it is there .", "However for some custom bundling of my artifacts i need to access the timestamp that PDE uses while creating jars of my plugins and features .", "Since upgrading to Eclipse 3.7 the Eclipse PDE plugin wants me to specify an API Baseline for all my Eclipse Plugin projects .", "How can we modify the matlab PDE toolbox code to implement periodic boundary conditions", "Here is the approach for implementing periodic boundary conditions for parabolic and hyperbolic problems using the method of lines of the pde toolbox : .. . .. . 1 .", "Note that the nodes of meshes produced by the pde toolbox for a 3D cube cannot be used since they do not have the appropriate periodic structure .", "For my studies I had to write a PDE solver for the Poisson equation on a disc shaped domain using the finite difference method .", "As far as flux goes there s pdecgrad http : www.mathworks.com help pde ug pdecgrad.html .", "The PDE was in 3 dimension and I had three wavenumbers namely k1 k2 and k3 for three directions .", "I have a large number of elements and I want to solve a PDE using the assempde command .", "Therefore I want to incorporate everything in one script and it should provide PDE solution and data in single run .", "Is it possible to bundle my database along with my application using PDE headless build", "The bundle pool dir in metadata is the cache location PDE provides to p2 when downloading target content .", "Is there an ANT task in the PDE build where I can replace Strings in map files before Ant tries to fetch resources", "I am currently using PDE build in headless mode to build my OSGI Bundle project .", "The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local Eclipse installation .", "Does anyone now what is the minimum list of plugins I need for doing a headless PDE build", "It would appear that FiPY does not support complex arguments and the general advice seems to be to split the PDE solve separately and then recombine .", "I can see the plug-in spy but my target contains the complete JDT and PDE .", "So.. . can anyone point me at a clear and up-to-date tutorial for creating plugins in eclipse s PDE" ] }
{ "confidence": [ 34.64213562011719, 31.250164031982422, 30.749305725097656, 30.236024856567383, 28.393726348876953, 27.522125244140625, 27.45655059814453, 27.40047836303711, 27.21591567993164, 26.681243896484375, 26.377201080322266, 26.038616180419922, 25.895084381103516, 25.759422302246094, 25.70928955078125, 25.43194580078125, 25.24020767211914, 25.24020767211914, 25.136802673339844, 24.864641189575195 ], "content": [ "Question : null .. . Answer : I want to solve the following PDE fourth order Partial Differential equation in polar-coordinates equation is given in the image file : equation of 4th order pde http : i.stack.imgur.com lXNXg.png .. . .. . I will highly appreciate if anyone help me . Thanks Abrar Comment : I m voting to close this question as off-topic because we are a programming site not a math site . Comment : Try separation of variables .", "Question : null .. . Answer : I run a program about partial differential equation in MATLAB so I used .. . .. . But there s an error : .. . .. . Undefined function createpde for input arguments of type double . I tried to search the solution and based on another forum I should use which createpd -all to determine the path of the function . But when I tried to used that command I got this error : .. . .. . createpde not found .. . .. . So how can I fix this error Comment : You must not have the partial differential equation toolbox . You can check this by looking for it when you type ver . Comment : you re right then how to have pde toolbox Comment : You would have to purchase it from The Mathworks . It is a separate product Comment : oww i m sorry i checked it again and i have it Comment : THen what version of MATLAB are you using createpde was introduced in R2015a", "Question : null .. . Answer : I have an existing and working ANT PDE build for my eclipse-rcp . Now I have another developer who is developing a plugin for this rcp product . I have the following new requirement : .. . .. . The plugin of the new developer should be part of the existing build-process but I m not allowed to simple add the new source and build from it . Which I did previously and worked fine .. . .. . I m expected to build the plugin of the new developer with a build script that does not exist yet . I found out that the way to build a plugin without the IDE is to define an ANT file : .. . .. . I can build this plugin from the command-line like that : .. . .. . So basically I m specifying the equinox launcher the antRunner the build file AND an eclipse workspace that contains the path to the source of the plugin . So I can build the plugin of the other developer ONLY when I have a workspace that contains the location to a project with the source . I don t understand why I can t directly build from sources It is nearly impossible to use a workspace folder on a build-server . Since I can t get my head around how to get ride of the -data parameter I was thinking about adding the build script of the new plugin to my existing product build but I don t even know where to start since I know nothing about PDE . So here is my existing ANT PDE build : How can I solve my problem Comment : use the eclipse-pde tag unless you really mean Partial-Differential Equations .", "Question : While searching for an implementation of the Barnsley s Fern fractal i came across a implementation that has .pde extension which programming language uses this extension Implemantation Page http : www.openprocessing.org visuals visualID 198 .. . Answer : The .pde file extension is the one used by the Processing http : processing.org Wiring http : wiring.org.co and the Arduino http : www.arduino.cc IDE . Processing is not C based but Java based and with a syntax derived from java . It is a Java framework that can be used as a java library . It include a default IDE that use .pde extension . Just wanted to rectify @kersny answer . Wiring is a microcontroller that use the same IDE and Arduino use a modified version but also using .pde . The OpenProcessing page where you found it is a web site to exhibit some Processing work . If you know Java it should be fairly easy to convert the Processing code to Java AWT .", "Question : This may be a simple question but what is the correct FiPy syntax to use if I want to solve PDE with spatially varying coefficient that is outside of gradient All the examples I ve seen so far only talk about coefficient inside of the gradient . For example : .. . .. . d dt Sigma 1 r d dr r 0.5 d dr nu Sigma r 0.5 .. . .. . I m ignoring numerical factors .. . .. . and I want to solve for Sigma t r . How do I handle 1 r in front of d dr I know this simple equation can be massaged so that I don t need to worry about spatially varying coefficient that is outside of gradient or simply move the coefficient inside the time derivative term but I ll have to add-in more terms for the actual problem I m trying to solve and the trick will no longer be valid . For instance what should I do if my equation looks like : .. . .. . d dt var f r d 2 dr 2 var + g r d dr var .. . .. . Any help would be greatly appreciated .. . Answer : This may be a simple question but what is the correct FiPy syntax to use if I want to solve PDE with spatially varying coefficient that is outside of gradient I think that the general equation can always be rewritten in such a way that FiPy can still operate implicitly on the solution variable . This does require an extra source term in most cases . I know this simple equation can be massaged so that I don t need to worry about spatially varying coefficient that is outside of gradient or simply move the coefficient inside the time derivative term but I ll have to add-in more terms for the actual problem I m trying to solve and the trick will no longer be valid . The example equation .. . .. . eqn1 http : bit.ly 1KcPB9Y .. . .. . can be represented as .. . .. . eqn2 http : bit.ly 1HBpSbI .. . .. . in FiPy which doesn t add any extra terms . For the general case .. . .. . eqn3 http : bit.ly 1GvFSNB .. . .. . the equation can be represented as .. . .. . frac partial partial t left frac phi f right frac partial 2 phi partial r 2 + frac partial partial r left frac g phi f right - phi frac partial partial r left frac g f right http : bit.ly 1GjmBtk .. . .. . Although there is an extra term the terms are still implicit in phi and the extra term can be represented as an implicit source term for phi depending on the sign of g f . FiPy should handle the sign issue just by using the ImplicitSourceTerm . Note that often r occurs outside of the operator when using cylindrical coordinates . FiPy has a mesh class CylindricalGrid1D https : github.com usnistgov fipy blob develop fipy meshes factoryMeshes.py L254 that handles cylindrical coordinates while using the standard terms no need to and the r spatial variable in the equations .", "Question : While searching for an implementation of the Barnsley s Fern fractal i came across a implementation that has .pde extension which programming language uses this extension Implemantation Page http : www.openprocessing.org visuals visualID 198 .. . Answer : pde is extesion for : .. . .. . Processing : Java derived language .. . .. . Wiring : C C++ derived language Wiring is derived from Processing .. . .. . Early versions of Arduino : C C++ derived Arduino IDE is derived from Wiring .. . .. . For Arduino for example the IDE preprocessor is adding some defines and some C C++ files before giving all to gcc .", "Question : I am currently using PDE build in headless mode to build my OSGI Bundle project . The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local Eclipse installation . unfortunatelly my eclipse installation is about 260MB big but I assume that a PDE build does NOT require all of those plugins in a standard eclipse installation . Does anyone now what is the minimum list of plugins I need for doing a headless PDE build All of my dependencies I actually have in a custom target-platform folder so I guess the only thing I need from my eclipse installation are the dependencies which PDE build actually needs . But what are those Can I shrink my installation to a very minimum My goal is to also check-in this build-eclipse folder into my project s SVN so that when you check it out you have everything you need to start a full build without touching any build.properties . But I don t want to commit 266MB of eclipse if I maybe need only 20MB of it . Thanks Christoph .. . Answer : I finally needed to do this myself today to address a problem I was having where directories with spaces in their names weren t being included in the bundle PDE Build produced http : stackoverflow.com questions 2782622 why-does-headless-pde-build-omit-directories-ive-specified-in-build-propertiess . I eventually got something that could build my collection of Java-based plug-ins . I don t know whether it s minimal but it s Java PDE Build-focused and much smaller than a full Eclipse IDE install . I took rough notes there could be a few omissions or superfluous steps here but in the main it should guide . I : .. . .. . 1 . Fired up a recent Eclipse IDE in my case the 3.5 instance I use at the moment . 2 . Used a scratch workspace so changes to the target-platform wouldn t mess up my real projects . 3 . Made sure the target-platform was set to the place I wanted to draw my PDE builder s plug-ins from in my case just my running Eclipse . Window Preferences.. . Plug-in Development Target Platform .. . 4 . Created a new empty project . 5 . Created a new Product Configuration within that project using the basic settings . 6 . On the new product configuration s Overview page unchecked The product includes native launcher artifacts . .. . 7 . On Dependencies specified the following plug-ins as constituting the product : .. . org.eclipse.pde.build .. . org.apache.ant .. . org.eclipse.jdt.core .. . 8 . Checked Include optional dependencies . . . .. . 9 . Clicked Add Required Plug-ins . 10 . Right-clicked product definition in Package Explorer and picked Export Eclipse product . 11 . Told it where I wanted my PDE builder instance to go . 12 . Unchecked Synchronize before exporting . 13 . Unchecked Generate metadata repository . 14 . Clicked Finish . Now I can continue to launch a PDE Build from my normal Ant build by invoking a macro like the following is there a better way : Comment : Hi Woody that is great news . I didn t have enough time recently to continue to digg into this issue . But mayby I ll find some time so that I can verify your findings . What is the actual size in MB to which you could decrease your build eclipse installation Comment : In my case the result was a little less than 20 MB . That still seems kind of large for what it is -- maybe I shouldn t have included those optional dependencies -- but this works for me .", "Question : Am using ant to build my RCP application . The PDE headless build works well . However for some custom bundling of my artifacts i need to access the timestamp that PDE uses while creating jars of my plugins and features . Ex : com.test.app.1.0.0.201404091703.jar .. . .. . I need to get the value 201404091703 from the PDE once the build is successful . Is this possible I tried with forceContextQualifier from the build.properties but the problem with this is everytime before the build starts i need to update this value manually to some static value and overriding of this global property dynamically using ANT is not possible . Any suggestions is appreciated .. . Answer : The PDE headless build generates property files for each bundle with the current version numbers . In a custom callback or else in your Ant build file you can read such a property file and use the properties . Search for the property generateVersionsLists in Eclipse Help . http : help.eclipse.org luna index.jsp topic 2Forg.eclipse.pde.doc.user 2Ftasks 2Fpde version qualifiers.htm", "Question : null .. . Answer : We have a large OSGi project with some own bundles and hundreds of third parties bundles . After some tweaking of dependencies we were able to produce a valid Launch Configuration that runs correctly and a product feature configuration that builds correctly via IDE of Eclipse Luna and generates a valid executable . So far so good with IDE PDE build . Now we want to run the build in the headless way . We have followed the tutorial for Eclipse Luna http : help.eclipse.org luna index.jsp topic 2Forg.eclipse.pde.doc.user 2Ftasks 2Fpde feature build.htm and set-up a headless build environment . We use the same product feature files as before but now we got unresolved uses directives and the build fails . The environment looks sane since we can build headless other smaller applications with no problems . Digging in some of the problems we have seen that some of them refers to OPTIONAL imports not resolved.. . To my understanding they should not complain . Example : .. . .. . Since we have thousands of third parties uses directives of course we are not going to hack the manifest of all the involved bundles.. . .. . .. . Why does the headless build is so picky about the uses directives Is there any way to instruct headless PDE to skip this kind of checks Thank you in advance Comment : Does your product file pass validation from within IDE PDE Sometimes PDE automatically adds dependencies to launches which can explain why it runs within PDE . The product validation can show you if a dependency is missing .", "Question : I am currently using PDE build in headless mode to build my OSGI Bundle project . The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local Eclipse installation . unfortunatelly my eclipse installation is about 260MB big but I assume that a PDE build does NOT require all of those plugins in a standard eclipse installation . Does anyone now what is the minimum list of plugins I need for doing a headless PDE build All of my dependencies I actually have in a custom target-platform folder so I guess the only thing I need from my eclipse installation are the dependencies which PDE build actually needs . But what are those Can I shrink my installation to a very minimum My goal is to also check-in this build-eclipse folder into my project s SVN so that when you check it out you have everything you need to start a full build without touching any build.properties . But I don t want to commit 266MB of eclipse if I maybe need only 20MB of it . Thanks Christoph .. . Answer : I can t directly answer your question but I can wave my hands around a little bit some of which might help you find a real answer . In my PDE experience I have found it very useful to distinguish : .. . .. . The Eclipse IDE I was using for interactive editing .. . The Eclipse installation I was using for headless PDE builds .. . The target-platform set of plug-ins features etc . the thing I m building depends on .. . .. . It sounds like these are clear separate concepts in your head as well : you have already isolated the target-platform and are looking to isolate your interactive Eclipse from your PDE builder . You could try creating a new blank workspace in your interactive Eclipse just to be sure you re looking at it not at your target-platform opening the Plug-ins view right-clicking a promising-looking plug-in like org.eclipse.pde.build and choosing Open Dependencies . The Flat Layout might be a more useful way to view the results than the hierarchical though in my Eclipse I don t seem to be able to copy and paste this list . In my case this didn t mention anything in the JDT which makes me think that actually trying to build a Java-based plug-in would fail but hopefully that would provide another lead e.g . can t find org.eclipse.jdt or something . It seems like there ought to be a way to use the Software Updates mechanism Target Platform or Buckminster to just name one plug-in and have all the others fall into place . Maybe you could use the Target Platform select the plug-in you need hit the button to select required ones then somehow export a build that would effectively just collect all those plug-ins I confess that we just checked in an interactive Eclipse some time ago and use it as our PDE builder . We don t use it interactively and we do maintain a separate target-platform as well . Our PDE builder is clearly not minimal but could also perhaps stand to be so I hope you ll update this space with your discoveries . Comment : Hi Woody thanks for your answer . You are absolutly right about the three concepts...thats exactly what I was talking about too . I basically want to get rid of the interactive Eclipse related plugins . Your ideas sound good and I will give it a try tomorrow . I will post my findings here . I wonder if we are the only ones thinking about this problem Thanks Christoph Comment : Ok here are my first findings : org.eclipse.pde.build and dependencies are not enough to make a build . The build-process somehow stops without debugging output so I first have to find out what actually happens under the hood . Do you know of any command-line argument so that I can get more debugging output about the internals of the build-process e.g . -verbose or something If I find out what is missing I try to find the needed plugins step by step and will post it here . Thanks Christoph Comment : Christoph I m not sure . . . but when you run a command-line PDE build somewhere along the way you are firing up an OSGi runtime which as I understand it has something akin to an Eclipse Workspace where it can cache dependency information etc . and also - relevant here - place log files . Maybe you can figure out where that workspace is and read its log", "Question : null .. . Answer : I was solving PDE Stokes equation to be specific in Fourier space . The PDE was in 3 dimension and I had three wavenumbers namely k1 k2 and k3 for three directions . I am confused with using ifft of Matlab to get the solution in real space . I am providing some expression of relevant quantities : .. . .. . I need to find both X and Y in physical space . Y will have three components in x y and z direction . I am confused about how to use ifft or ifft3 to get the solution . I appreciate your help and patience . Thank you", "Question : null .. . Answer : I will try to explain my doubt in the better way possible : .. . .. . I m trying to solve the reaction-diffusion equation with PDE Toolbox Matlab the syntax to get the solution u is : .. . .. . parabolic - Solve parabolic PDE problem .. . .. . This MATLAB function produces the solution to the FEM formulation of the scalar PDE problem : u1 parabolic u0 tlist b p e t c a f d .. . .. . c a f d are the coefficients of the parabolic equation : .. . .. . But I want this : .. . .. . u0 is the initial solution tlist is a vector array of times where I record the solution b corresponds to boundary conditions p e t are the elements of the mesh and @coeffunction is a function-handle which corresponds to the coefficient a . My question is : Anyone knows if is it possible to specify a as a variable coefficient which have a dependency with tlist", "Question : Am using ant to build my RCP application . The PDE headless build works well . However for some custom bundling of my artifacts i need to access the timestamp that PDE uses while creating jars of my plugins and features . Ex : com.test.app.1.0.0.201404091703.jar .. . .. . I need to get the value 201404091703 from the PDE once the build is successful . Is this possible I tried with forceContextQualifier from the build.properties but the problem with this is everytime before the build starts i need to update this value manually to some static value and overriding of this global property dynamically using ANT is not possible . Any suggestions is appreciated .. . Answer : You can specify -DforceContextQualifier xxx as an argument to the org.eclipse.equinox.launcher xxx run in your build.xml . Update : .. . .. . So for example : .. . .. . Sets the qualifier for a build to YYYYMMDDHHMM-num Comment : Hi thanks for the reply . Yeah this is possible but every time before the build starts i need to manually specify the value which i want to avoid . Is there a way to dynamically update the value for -DforceContextQualifier As i mentioned in my post for custom bundling of the artifacts i should be able to access this value when the PDE build is finished . Could you help in specifying this value dynamically Comment : Added example of constructing a value for the qualifier Comment : it worked like a charm...thanks for the example", "Question : Since upgrading to Eclipse 3.7 the Eclipse PDE plugin wants me to specify an API Baseline for all my Eclipse Plugin projects . However there seems to be no documentation which actually explains what API Baseline stands for here and what is it used for . Could somebody please explain .. . Answer : From the PDE API Tools User Guide http : wiki.eclipse.org PDE API Tools User Guide Define an API Baseline : .. . .. . An API baseline defines the state you want to compare your development workspace bundles against for the purposes of binary compatibility bundle version numbers and @since tags . For example if you are developing bundles for Eclipse 3.4 you will use Eclipse 3.3 as your baseline . Comment : i dont get it . if i am developing for eclipse-3.4 then why use 3.3 as baseline instead of 3.4 Comment : Eclipse 3.3 is being used as the reference here the intent is to understand what changes in the plugin for Eclipse 3.4 will not be compatible with the version of the plugin for Eclipse 3.3 Comment : @pdeva - I think that that is a mistake in the 2nd sentence . Ignore that sentence and just base your understanding on the first one .", "Question : While searching for an implementation of the Barnsley s Fern fractal i came across a implementation that has .pde extension which programming language uses this extension Implemantation Page http : www.openprocessing.org visuals visualID 198 .. . Answer : This code is from Processing.org an open-source Java based IDE . You can find it Processing.org http : processing.org . The Arduino IDE also uses this extension although they run on a hardware board . EDIT - And yes it is C syntax used mostly for art or live media presentations . Comment : Well it s C syntax not based . Comment : My bad thanks Comment : Current versions of Arduino switched to .ino extensions . see arduino.cc en Reference Comparison https : www.arduino.cc en Reference Comparison . They say : The Arduino language based on Wiring is implemented in C C++ and therefore has some differences from the Processing language which is based on Java . The switch is since version 1.0 as noted in arduino.cc en Guide Environment https : www.arduino.cc en Guide Environment : NB : Versions of the Arduino Software IDE prior to 1.0 saved sketches with the extension .pde . It is possible to open these files with version 1.0 you will be prompted to save the sketch with the .ino extension on save .", "Question : I want to build an Eclipse RCP application with a PDE headless build http : www.eclipse.org pde pde-build . When I run the Ant script of the build it fails with the following error message : .. . Answer : I found the solution in the discussion here https : groups.google.com forum topic vogella OXp6TGD4VTY : It is important to run the Ant script of the build within the same JRE as the workspace because otherwise the PDE Ant tasks cannot be found : .. . .. . Right click on the Ant script build.xml Run As Ant Build JRE tab of the wizard switch to option : Run in the same JRE as the workspace Comment : If running from the command-line instead of from inside the Eclipse IDE then you would run the build using eclipse -application org.eclipse.ant.core.antRunner -buildfile file rather than just running ant directly .", "Question : null .. . Answer : I m doing homework for my pde class but I dont know how to solve this problem : .. . .. . Find the soulution to the Cauchy problem ut a u + b u + cu u 0 x u 0 .. . .. . a b c are continuous functions and depend on t where u 0 is continuous depending on x . Comment : What is your solution Does it work If not what is the problem Comment : I dont even where to begin how to find the solution .", "Question : While searching for an implementation of the Barnsley s Fern fractal i came across a implementation that has .pde extension which programming language uses this extension Implemantation Page http : www.openprocessing.org visuals visualID 198 .. . Answer : Bad news I m afraid or maybe great news : it isn t C code it s an example of Processing - an open-source language aimed at programming images . Take a look here http : www.processing.org .. . .. . Looks very cool .", "Question : null .. . Answer : I have a problem with the command pdegrad . dat and the mesh parameters comme form an other code that I download on Matlab . Assume that the variable dat has N elements points has N number of elements and tri has t number of elements . Then after computaion of pdegrad the number of element of ux and uy will be t . That s my problem why it doesn t conserve the same length than dat . Because after I need the product between ux and dat . Thank you a lot for your help . B.Y .. . .. . Ps : You should know that computation of pdegrad gives the expected result Comment : The documentation http : mathworks.com help pde ug pdegrad.html states that you d better switch to the recommended function evaluateGradient http : mathworks.com help pde ug evaluategradient.html . That being said did you read through the docs I think you can find the answer there . Comment : I tried your proposition but I got this message Undefined function or variable evaluateGradient . that weird because I have the pde toolbox so I should have this function too .", "Question : There is an Eclipse Plugin managed by Maven containing this configuration : .. . .. . In console I run .. . .. . If I open Eclipse in the workspace there is no project . Comment : The intention of the maven-eclipse-plugin https : maven.apache.org plugins maven-eclipse-plugin is to create change upgrade the eclipse configuration from command-line etc . It is usually not needed in the pom to be configured . Comment : @khmarbaise maven.apache.org plugins maven-eclipse-plugin pde.html https : maven.apache.org plugins maven-eclipse-plugin pde.html told me to configure it Comment : Ah ok...wasn t aware of that . .. . Answer : First of all you have to understand that the purpose of the maven-eclipse-plugin https : maven.apache.org plugins maven-eclipse-plugin index.html is quoting its documentation : .. . .. . to generate Eclipse IDE files .classpath .project .wtpmodules and the .settings folder for use with a project . Its goal is not to create an entire project but the building Eclipse blocks from an existing project . This is also true for PDE support . Quoting its documentation https : maven.apache.org plugins maven-eclipse-plugin pde.html : .. . .. . Note that the scope of the maven-eclipse-plugin is to synchronise the Eclipse .project and .classpath files with the configuration found in the pom file . Once you have finished configuring the Eclipse plugin as below and once you have run the eclipse : eclipse goal you will be in a position to build your plugin code with the Eclipse IDE or the Eclipse headless PDE build . The Eclipse headless PDE build can be triggered from within Maven using the pde-maven-plugin . As such the configuration you have simply enables the creation of correct .project and .classpath files for an existing project nothing more . Once this configuration has been made and eclipse : eclipse goal was run you will need to follow these steps : .. . .. . Open Eclipse and import the existing project by going to File Import.. . Existing Projects into Workspace . Right-click the new project and select Configure Convert to Plugins Projects.. . . Confirm this choice . You will then be able to build your Eclipse plugin directly in the IDE . Note that I do not recommend using this solution and I would suggest you use Tycho instead this might be an improvement you could make to this plugin refer to this question http : stackoverflow.com q 6830399 1743880 . Comment : Please note that the Maven Eclipse Plugin is deprecated in favor of m2e and will be removed from the ASF . Comment : @Michael-O Yes m2e should definitely be prefered over Maven Eclipse Plugin . Official JIRA about the retirement of this plugin : MECLIPSE-763 https : issues.apache.org jira browse MECLIPSE-763 . Comment : I did that but the project is not marked as Eclipse Plugin . Comment : @PeterRader What do you mean What did you do Comment : I just open eclipse and import the existing project by going .. . . The project is imported but its not a PDE-Project . What sense does the pde in the pom.xml make" ] }
[ "yes-answer-long", "yes-answer-short" ]
differential-equations
UNK_RELATION
common-table-expression@create-view@170
common-table-expression -- a common-table-expression cte is a temporary result set that is defined within the execution scope of a single select insert update delete or @placeholder statement .
{ "confidence": [ 96.17858123779297, 73.3008041381836, 72.04469299316406, 67.37859344482422, 60.44895935058594, 57.592613220214844, 55.746437072753906, 55.01237487792969, 54.170684814453125, 53.938568115234375, 52.91282653808594, 52.659149169921875, 52.194297790527344, 52.194297790527344, 51.78667068481445, 51.49294662475586, 50.69269561767578, 49.6805419921875, 48.977447509765625, 47.07923889160156, 46.91266632080078, 46.58595275878906, 46.507728576660156, 45.97241973876953, 44.98647689819336, 44.679664611816406, 44.47768783569336, 44.45246124267578, 44.37112045288086, 44.067386627197266, 43.796722412109375, 43.492919921875, 43.30168914794922, 43.25239944458008, 43.198883056640625, 43.04308319091797, 42.889461517333984, 42.75100326538086, 42.75100326538086, 42.64748001098633, 42.592655181884766, 42.55181121826172, 42.374839782714844, 42.29480743408203, 41.92979049682617, 41.82912063598633, 41.7354850769043, 41.54602813720703, 41.348411560058594, 41.348411560058594, 41.272361755371094, 41.230594635009766, 41.05794143676758, 40.977535247802734, 40.81850814819336, 40.817420959472656, 40.59144973754883, 40.52418518066406, 40.44843673706055, 40.17362594604492, 39.77884292602539, 39.73937225341797, 39.59330368041992, 39.45633316040039, 39.18937301635742, 38.96900939941406, 38.40449142456055, 38.30799865722656, 37.988895416259766, 37.94678497314453, 37.94678497314453, 37.828914642333984, 37.718326568603516, 37.579376220703125, 37.556095123291016, 37.459678649902344, 37.3500862121582, 37.32737350463867, 37.23987579345703, 37.17145538330078, 37.01018142700195, 37.00849914550781, 36.93000793457031, 36.604331970214844, 36.604331970214844, 36.52127456665039, 36.49787521362305, 36.49280548095703, 36.449127197265625, 36.1253662109375, 36.032955169677734, 36.013545989990234, 36.01116943359375, 35.9675407409668, 35.92231750488281, 35.83673858642578 ], "content": [ "A common-table-expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement .", "In Sql the with-statement specifies a temporary named result set known as a common-table-expression CTE .", "From MSDN http : msdn.microsoft.com en-us library ms190766.aspx .. . .. . A common-table-expression CTE can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement .", "From MSDN : http : msdn.microsoft.com en-us library ms345368.aspx .. . .. . A common-table-expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement .", "Can I add an INDEX to a Common Table Expression CTE", "http : stackoverflow.com questions 584841 common-table-expression-cte-in-linq-to-sql", "If this statement is a common-table-expression or an xmlnamespaces clause the previous statement must be terminated with a semicolon .", "You need to use a recursive common-table-expression using union-all .", "This is called a common-table-expression and is a way of expressing a recursive-query in SQL : .. . .. . t n defines the name of the CTE as t with a single column named n .", "The general syntax is insert into .. . select .. . That will insert all the records from the cte table .", "Emphasis on single SELECT INSERT UPDATE DELETE or CREATE VIEW statement .", "The query is a common-table-expression CTE which runs just fine from SQL Server Management Studio .", "Common table expression may be your way to go .", "This function contains a recursive common-table-expression .", "You need to put the CTE first and then combine the INSERT INTO with your select statement .", "Usually in SQL Server Common Table Expression clause there is semicolon in front of the statement like this : .. . .. . Why", "The CTE Commom Table Expression effectively creates a view on the fly that be can used within the scope of the expression .", "You can only have a single select statement as the final statement in a CTE .", "First of all .. . .. . What is a Common Table Expression", "strike Is LINQ-to-SQL integrated with Common Table Expressions http : msdn.microsoft.com en-us library ms186243.aspx strike I found Common Table Expression CTE in linq-to-sql", "In PostgreSQL you can use recursive CTEs Common Table Expression to walk trees in your queries .", "I m building a Common Table Expression CTE in SQL Server 2008 to use in a PIVOT query .", "I have seen many posts that address how to convert an Oracle connect-by prior statement to a SQL Server common-table-expression .", "Common Table Expression feature is not available in MySQL so you have to go to make a view or temporary table to solve here I have used a temporary table .", "Unfortunately MySQL doesn t support CTE Common Table Expressions .", "Is it possible to do common table expressions CTE like shown below in Linq to SQL .", "If I try to UNION or INTERSECT or EXCEPT a common-table-expression I get a syntax-error near the UNION .", "I have a very fat common-table-expression which includes row numbers so that I can return a paged result set .", "so if i changed that to select customerid from cte how do i write my insert statement to create a record for each of the customerIds that are returned", "They are merely a language element a way to express a table expression that will be used possible repeatedly in a statement .", "I have a very complex CTE and I would like to insert the result into a physical table .", "Split the CTE expression into anchor and recursive members .", "You can only add rows to one table in a single INSERT statement in PostgreSQL .", "The WITH clause for Common Table Expressions go at the top .", "I have the following common-table-expression which I have tried multiple things with but I have yet to get the output I need .", "Within the select statement you can then include your other parameters .", "I have a CTE and query this one .. . .. . Now I try to save this result into a table-variable or temporary table .", "Why can t I use the CTE WITH statement in Mule", "As of 2016-04-27 the CTE statement is not supported by Mule .", "So instead of using an except clause with a cte you can use a plain update statement : .. . .. . But if you don t want to update the actual table and you just want a recordset on the memory you can use a table-variable like below : .. . .. . Or if you want to stick with cte :", "@Yang : OK but that s what a CTE does out of the box : a temporary table visible only within one query .", "You can create your common-table-expression CTE subquery factoring http : docs.oracle.com cd E11882 01 server.112 e41084 statements 10002.htm SQLRF30048 etc .", "CTEs allow for a table expression used multiple times to be declare only once : .. . .. . Compare this with the semantically similar derived table form : .. . .. . The CTE is clearly more readable .", "Now then what is the advantage of using a CTE Common Table Expression over a sub-query thus more readable what the query is actually doing .. . .. . The only advantage of using a CTE over sub select is that I can actually name the sub query .", "I got this Common Table Expression Sql script and it works perfectly but applying the SQL script within my code with the server.createobject i get the following error : .. . .. . Microsoft VBScript runtime-error 800a000d Type mismatch : string : WITH CTE AS SELECT .. . .. . This is my code :", "You can however insert all rows to the target table with null as ParentID and then update ParentID in a separate update statement .", "simply insert data from each CTE into a temp table and then use UNION .", "Per the other comments the second Common Table Expression CTE is preceded by a comma not a WITH statement so .. . .. . In terms of your actual query this syntax should work in PostgreSql Oracle and sql-server well the later typically you will proceed WITH with a semicolon but that is because typically sql-server folkes myself included don t end previous statements which need to be ended prior to a CTE being defined.. .", "Use something like a common-table-expression on the server to build your results in a flat table or build an XML tree in T-SQL .", "And there is now : use a view or table-based function using the Common Table Expression using the WITH . . UNION ALL construct as shown in other answers here .", "My question is where should I put it in a query that includes a CTE a subquery and an update statement on the CTE", "A CTE does not materialize the table .", "A CTE expression is only valid in its body .", "You add the insert statement to the main query right after the CTE declarations .", "Which means that doesn t matter if you defined one of your CTE with a DISTINT ON clause because other CTEs and your main query will see only a temporary table or more like a result-set but nothing more .", "Views referencing common table expressions cannot be indexed .", "I guess the Insert Into command expects a Select statement instead of a WITH and the same goes for Create Table .", "Related : .. . .. . PostgreSQL multi INSERT...RETURNING with multiple-columns http : stackoverflow.com questions 22775109 postgresql-multi-insert-returning-with-multiple-columns 22775268 22775268 .. . SELECT FROM NEW TABLE equivalent in Postgres http : stackoverflow.com questions 26580491 select-from-new-table-equivalent-in-postgres 26580960 26580960 .. . Combining INSERT statements in a data-modifying CTE with a CASE expression http : stackoverflow.com questions 28992241 combining-insert-statements-in-a-data-modifying-cte-with-a-case-expression 28993466 28993466", "myMethod is analogous to table expression and res is table-variable temp table .", "A CTE is not a temp table think of a CTE as a view that is defined only for your current query .", "That will allow you to define the structure of your temporary table based on what you select similar to your CTE .", "Yes I know that a single INSERT statement can only add rows to one table that s why I was asking the question in the first place .", "In a session any statement can use or alter the table once it has been created : .. . .. . Both ProcA ProcB and ProcC can select insert delete or update data from temp .", "Temporary table .. . .. . If you are looking for a temporary table that persists for the duration of your session use an actual TEMPORARY TABLE .", "It s details are : .. . .. . Mule 3.7.2 EE .. . Anypoint Studio 5.4.1 .. . jdk1.7.0 51 .. . Using oracle ojdbc6 driver .. . .. . Now when I create a database-connection using the ojdbc6 driver without the use of a Common Table Expression CTE the query runs fine at 2.5 secs .", "When I ran the SELECT statement only inside the cte I could get the result for ex : 1 2 3 4 .", "I can create Recursive CTEs Common Table Expression aka RCTE to handle the hierarchical-data .", "In my case I m using the CTE value within the RETURN clause of a table-valued user-defined function .", "CREATE TEMPORARY TABLE AS in the manual .", "Because the CTE does not get params from the Table", "Updates you make to the CTE will be cascaded to the source table .", "In that new CTE referencing the previous defined CTE we can make the count query : .. . .. . query is the main CTE and totalCount is using it for get the total rows count .. . .. . Microsoft should have an example for a common task like this .", "I think this is because RECURSIVE is modifier of WITH statement http : www.postgresql.org docs current static queries-with.html not a property of common-table-expression z so you can use it like this : .. . .. . sql fiddle demo http : sqlfiddle.com 12 d41d8 1940", "The result was 70 time consuming for CTE -30 time consuming for temp table .", "Have you ever tried Temporary Table", "A CTE is per definition only valid for one statement .", "This query will INSERT what ever the SELECT returns into the table foo .", "Delete insert and display the deleted rows in a single statement : sqlfiddle.com 15 7b0ea 2 http : sqlfiddle.com 15 7b0ea 2", "Interesting I have re-written the stored procedure to use a temporary table and insert rather than using the CTE .", "I don t think CTE makes a temp table only with selected query but 3 times make select to a big table .", "When the query plan for a common-table-expression query uses a spool operator to save intermediate query results the Database Engine creates a work table in tempdb to support this operation .", "Lets say I have a Customer table that contains CustomerId as a primary-key and ParentCustomerId as a foreign key and I want to cascade an insert statement to create a record for each of the Customers in the hierarchy chain .", "When you say in the CTE select do you mean the select that s creating the CTE or the select that s using the CTE", "Here is the error message - .. . .. . Msg 10137 Level 16 State 1 Line 1 Cannot create index on view ShareBill.Test.Database.dbo.FriendBalances because it references common-table-expression trans .", "Consider not indexing the view or removing the common-table-expression from the view definition . .. . .. . The concept : Transaction mainly consists of : .. . .. . an Amount that was paid .. . UserId of the User who paid that amount .. . and some more information which is not important for now .", "I am trying to create a CTE in Oracle that doesn t select from an existing table but instead has data inserted into it .", "That feature is called a common-table-expression http : msdn.microsoft.com en-us library ms190766.aspx .. . .. . You won t be able to do the exact thing in mySQL the easiest thing would to probably make a view that mirrors that CTE and just select from the view .", "Include all remaining rows in the result-of the recursive-query and also place them in a temporary working table . .", "Put your results into a temp table or a @table variable .. . .. . Materialize the results into a real table and reference that .. . .. . Alter slightly to just SELECT COUNT from your CTE : .. . .. . .", "Rest of code is pretty simple - result form CTE inserted into @numbers table-variable and then simply selected .", "The insert statement grabs the unique key from the Contacts table and loads it into a variable called @filteredIdList .", "You can rebuild values in Data table with the help of recursive CTE : .. . .. . Output : .. . .. . To update Data :", "My Sollution for small data sets in tables : create-table abc2 like abc insert into abc2 select from abc", "I was trying to achieve the same order during the cte select and after the update .", "On the other hand if you need to use the result-of the CTE in several different queries and speed is already an issue I d go for a table either regular or temp .", "When you use from .. . you create something like a temporary table a derived table and it requires a name ." ] }
{ "confidence": [ 100.00994873046875, 87.08487701416016, 87.08487701416016, 79.46705627441406, 66.90924072265625, 66.00249481201172, 65.01530456542969, 63.21672058105469, 63.15998077392578, 63.13996887207031, 63.00978469848633, 61.88081359863281, 61.17352294921875, 60.869468688964844, 60.63082504272461, 60.25379943847656, 60.011505126953125, 59.98902893066406, 59.421058654785156 ], "content": [ "Question : I have a very fat common-table-expression which includes row numbers so that I can return a paged result set . I also want to return the total number of records that match the query before I page the result set . Obviously my query above is patchy but it s just for illustrating my point . I want a page of results AND the total number of matches . How do I do this without having to literally copy and paste the entire 20+ line CTE Comment : I would perhaps consider renaming this question since the accepted answer doesn t actually use the CTE twice . .. . Answer : Don t think you can . From MSDN http : msdn.microsoft.com en-us library ms190766.aspx .. . .. . A common-table-expression CTE can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement . Emphasis on single SELECT INSERT UPDATE DELETE or CREATE VIEW statement . This might be a situation where you want to use a Temporary Table http : msdn.microsoft.com en-us library ms174979.aspx . If you don t know the structure of the table before hand you can use this form to create a temporary table : .. . .. . You will be able to use the Temporary table in the manner you have described above . Comment : Also I d recommend using those SELECT s only if you truly need them . They can cause performance issues and most of the time aren t really necessary . Comment : This syntax for creating the temp table may also prove useful : Select Into Recs From.. . Comment : Actually I have a complex SELECT statement I need to do on hierarchical-data and the way in which it is called will vary heavily depending on the situation . Comment : Hmmm are you saying that the structure of the CTE Temp table will vary If that is the case then I would recommend David Hall s suggestion . That will allow you to define the structure of your temporary table based on what you select similar to your CTE . Comment : My issue with using a temp table is that I don t want to stuff half a million or more rows into a table . Seems inefficient to do it that way .", "Question : I ve tried googling but maybe it s the keywords I used I have not been able to find a straightforward answer . So the question is simple and straight forward . Do CTEs use any space in tempdb or does it use memory exclusively I ve tagged the question with both mssql 2005 and 2008 as I use both . Comment : Queries are certainly noted in technet.microsoft.com en-us library cc966545.aspx EEAA gt http : technet.microsoft.com en-us library cc966545.aspx EEAA gt . See the section below this on Space required by queries also . .. . Answer : A common-table-expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement . When the query plan for a common-table-expression query uses a spool operator to save intermediate query results the Database Engine creates a work table in tempdb to support this operation . source http : msdn.microsoft.com en-us library ms345368.aspx", "Question : I ve tried googling but maybe it s the keywords I used I have not been able to find a straightforward answer . So the question is simple and straight forward . Do CTEs use any space in tempdb or does it use memory exclusively I ve tagged the question with both mssql 2005 and 2008 as I use both . Comment : Queries are certainly noted in technet.microsoft.com en-us library cc966545.aspx EEAA gt http : technet.microsoft.com en-us library cc966545.aspx EEAA gt . See the section below this on Space required by queries also . .. . Answer : From MSDN : http : msdn.microsoft.com en-us library ms345368.aspx .. . .. . A common-table-expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT INSERT UPDATE DELETE or CREATE VIEW statement . When the query plan for a common-table-expression query uses a spool operator to save intermediate query results the Database Engine creates a work table in tempdb to support this operation .", "Question : Lets say I have a Customer table that contains CustomerId as a primary-key and ParentCustomerId as a foreign key and I want to cascade an insert statement to create a record for each of the Customers in the hierarchy chain . I also have a CustomerContact table that has a clustered primary-key of CustomerId PersonId and DateCreated .. . .. . So if I have the following : .. . .. . Customer1 : CustomerId : 1 : ParentCustomerId : Null .. . .. . Customer2 : CustomerId : 2 : ParentCustomerId : 1 .. . .. . Customer3 : CustomerId : 3 : ParentCustomerId : 2 .. . .. . And I pass 1 into my customer ID but I want to create 3 although in this case the 3 is a variable the hierarchies could go deeper so that I insert into a different table a row for each customer in the chain . How can I write a CTE to get the children of all the customers related to param @1 and create a record in CustomerContact for each Comment : You need to use recursive cte Comment : what is set @1 1 some language extension a scalar constant Comment : @wildplasser in the final query @1 will be a parameter I was setting it to 1 to make a sensible example or at least attempting to .. . Answer : You need to use a recursive common-table-expression using union-all . Here s a reduced example : .. . .. . With your sample-data this will return 3 records and can also handle deeper relationships . Comment : so if i changed that to select customerid from cte how do i write my insert statement to create a record for each of the customerIds that are returned Comment : @USER 8675309 -- not 100 sure I m following but are you referring to something like this : insert into CustomerContact select customerid @2 @3 from cte Comment : for each customerId in cte insert into customercontact customerid @2 @3 next is what I am going for . forgive the VB.Net like syntax Comment : If I m understanding correctly you can use my above statement . The general syntax is insert into .. . select .. . That will insert all the records from the cte table . Within the select statement you can then include your other parameters . Comment : sorry killed it -- i found my answer", "Question : Im using SQL Server 2005 . I have 2 WITH Clauses in my stored procedure .. . .. . But the error occurs .. . .. . Incorrect syntax near the keyword with . If this statement is a common-table-expression or an xmlnamespaces clause the previous statement must be terminated with a semicolon . What are my options Is there any splitter I don t know about .. . Answer : Doesn t work for me . In my case I m using the CTE value within the RETURN clause of a table-valued user-defined function . If I wrap the RETURN clause in BEGIN-END I get the same error message but a bare RETURN clause works okay . I believe the error message is incorrect in this case . This works :", "Question : I have a Mule application running a DB query which runs perfectly well albeit a little bit slow . It s details are : .. . .. . Mule 3.7.2 EE .. . Anypoint Studio 5.4.1 .. . jdk1.7.0 51 .. . Using oracle ojdbc6 driver .. . .. . Now when I create a database-connection using the ojdbc6 driver without the use of a Common Table Expression CTE the query runs fine at 2.5 secs . When I utilise my CTE the query fails with the error : .. . .. . org.mule.api.MessagingException : Query type must be one of SELECT STORE PROCEDURE CALL but was DDL java.lang.IllegalArgumentException . Message payload is of type : NullPayload .. . .. . Clearly at some point the Mule EE server thinks that I m trying to execute DDL when I m not . The new query using the CTE works perfectly fine at .250 sec in SQL Developer so I know that it s not my query . Why can t I use the CTE WITH statement in Mule .. . .. . Is this a known issue Am I doing something wrong .. . .. . Query simplified after CTE : .. . Answer : As of 2016-04-27 the CTE statement is not supported by Mule . I had to dig deep for this one . I tweeted this question and tagged @MuleSoft and @MuleDev https : twitter.com IamMooz status 717284547503607808 .. . To which I got the reply : .. . .. . if you haven t already we d also suggest posting this in the forums - http : forums.mulesoft.com .. . .. . I then posted the issue on the Mulesoft Forums https : forums.mulesoft.com questions 40547 can-i-use-a-sql-common-table-expression-cte-or-wit.html .. . To no avail .. . I then logged a support ticket with Mulesoft case number 00107313 .. . To which I got the reply : .. . .. . WITH is not currently supported by Mule ESB . Enhancement request SE-987 has been raised but not implemented yet . Engineering team work on JIRAs based on the priorities . If this JIRA is urgent to you please provide the following information then I will escalate the JIRA for you", "Question : I am converting all my SQL Server queries to MySQL and my queries that have WITH in them are all failing . Here s an example : Comment : You dumbed-down that query right There is no reason to use a CTE there at all . Comment : Step 1 . Uninstall MySQL . Step 2 . Install PostgreSQL Comment : @NeilMcGuigan Oh my God This is one of the funniest comments I ve seen on this site although it s really not that funny but the cheekyness +1 . Comment : I think this is a related or duplicate question Generating a series of dates http : stackoverflow.com questions 14105018 generating-a-series-of-dates .. . Answer : In Sql the with-statement specifies a temporary named result set known as a common-table-expression CTE . It can be used for recursive queries but in this case it specifies as subset . If mysql allows for subselectes i would try", "Question : I have a very complex CTE and I would like to insert the result into a physical table . Is the following valid I am thinking of using a function to create this CTE which will allow me to reuse . Any thoughts .. . Answer : You need to put the CTE first and then combine the INSERT INTO with your select statement . Also the AS keyword following the CTE s name is not optional : .. . .. . Please note that the code assumes that the CTE will return exactly four fields and that those fields are matching in order and type with those specified in the INSERT statement . If that is not the case just replace the SELECT with a specific select of the fields that you require . As for your question on using a function I would say it depends . If you are putting the data in a table just because of performance reasons and the speed is acceptable when using it through a function then I d consider function to be an option . On the other hand if you need to use the result-of the CTE in several different queries and speed is already an issue I d go for a table either regular or temp . WITH common-table-expression Transact-SQL http : msdn.microsoft.com en-us library ms175972 28v sql.105 29.aspx", "Question : null .. . Answer : I got this Common Table Expression Sql script and it works perfectly but applying the SQL script within my code with the server.createobject i get the following error : .. . .. . Microsoft VBScript runtime-error 800a000d Type mismatch : string : WITH CTE AS SELECT .. . .. . This is my code : Comment : Typically CTE s start with a semicolon . Can you throw one on the front and try WITH CTE AS.... . Comment : @dfundako No the semicolon did not work same error . Comment : What about not splitting up the code and just making it one string objFrConn.CommandText WITH CTE AS SELECT...some code.. . SELECT FROM CTE WHERE RN 1 ORDER BY Date", "Question : I have been reading around With Query in Postgres . And this is what I m surprised with .. . .. . I m not able to understand how does the evaluation of the query work . t n it sound like a function with a parameter . how does the value of n is passed . Any insight on how the break down happen of the recursive statement in SQL . Comment : stackoverflow.com q 30015842 330315 http : stackoverflow.com q 30015842 330315 .. . Answer : This is called a common-table-expression and is a way of expressing a recursive-query in SQL : .. . .. . t n defines the name of the CTE as t with a single column named n . It s similar to an alias for a derived table : .. . .. . The recursion starts with the value 1 that s the values 1 part and then recursively adds one to it until the 99 is reached . So it generates the numbers from 1 to 99 . Then final query then sums up all those numbers . n is a column name not a variable and the assignment happens in the same way as any data-retrieval . If you unroll the recursion which in fact is an iteration then you d wind up with something like this : .. . .. . More details in the manual : .. . https : www.postgresql.org docs current static queries-with.html Comment : I understand what the SQL statement does all I want to know how does the evaluation work since . like for example how does the value n is assign to 1 I know it get assigned by VALUES 1 but how next the Union ALL on VALUES 1 and SELECT n+1 .. . It just that it way different that how a traditional recursion function we write in high end language like C or C++ Comment : The purpose of the question is to understand the evaluation . So that I can be confident enough to write one if when needed . Comment : @LivingColors n isn t a variable . It s a column name . Comment : Evaluate the non-recursive term . For UNION but not UNION ALL discard duplicate rows . Include all remaining rows in the result-of the recursive-query and also place them in a temporary working table . . Can you help me understand what is the recursive term in the above example . I m not able to understand which part of the statement is causing a recursion . Comment : values 1 is the non-recursive part aka root . The select after the union-all is the recursive part because it references joins to the CTE named t", "Question : I ve always thought that With clause was working as a one-time execute statement which behaves as a normal table - you can do all SQL operations on it as you would on a regular table . But it turned out that in several databases Oracle Netezza Sybase Teradata the with clause is executed each time it is used . Instead of 2 identical numbers the query above returns 2 different numbers so it is executed for each of the selects . If I have a very complex query within a With clause and I use it 5 times in the rest of the query it would execute 5 times which seems very ineffective to me . So can someone give me a good logical reason is it working this way Comment : Postgres returns the same number for both outer selects . So the CTE is only run once there Comment : In Oracle WITH test rnd AS SELECT +MATERIALIZE DBMS RANDOM.VALUE FROM DUAL SELECT a t . FROM test t UNION ALL SELECT b t . FROM test t gives the same number for both . .. . Answer : In the oracle world http : stackoverflow.com documentation oracle 3506 recursive-sub-query-factoring-using-the-with-clause-a-k-a-common-table-express t 201607281050362523834 as explained here http : www.morganslibrary.org reference with.html The WITH query name clause lets you assign a name to a subquery block . You can then reference the subquery block multiple places in the query by specifying the query name . Oracle optimizes the query by treating the query name as either an inline view or as a temporary table . You can specify this clause in any top-level SELECT statement and in most types of subqueries . The query name is visible to the main query and to all subsequent subqueries except the subquery that defines the query name itself . A WITH clause is most valuable when the result-of the WITH query is required more than one time in the body of the main query such as where one averaged value needs to be compared against two or three times . The point is to minimize the number of accesses to a table joined multiple times into a single query . Restrictions on Subquery Factoring : .. . .. . You cannot nest this clause . That is you cannot specify the subquery factoring clause within the subquery of another subquery factoring clause . However a query name defined in one subquery factoring clause can be used in the subquery of any subsequent subquery factoring clause . In a query with set operators the set operator subquery cannot contain the subquery factoring clause but the FROM subquery can contain the subquery factoring clause . In your case you have used a random function which will be treated differently by the optimizer which will treat it as an inline view rather than a materialized one . As @ibre5041 suggested use a EXPLAIN PLAN for different cases . Consider the case of a recursive CTE it is used internally everytime .", "Question : I have a CTE and query this one .. . .. . Now I try to save this result into a table-variable or temporary table . If I try .. . .. . I get an incorrect syntax-error around the WITH statement . I guess the Insert Into command expects a Select statement instead of a WITH and the same goes for Create Table . I was looking for solutions but all I found https : social.msdn.microsoft.com forums sqlserver en-US 63725d14-8e59-4009-b1da-c28f96f98d8e using-a-cte-then-getting-results-into-a-temp-table did not involve the Select Statement after the With . How do I get the output shown above into a temporary table or table-variable I use SQL Server 2014 . Comment : The keyword to start a CTE is with not with . Comment : @a horse with no name Really Comment : @Frisbee : yes see Mikael s answer for a correct usage of the statement termination character Comment : @a horse with no name Terminator is not line dependent . You can move it to the with line . with is not keyword . It is a terminator followed by a keyword . Comment : @Frisbee : I know that . But the constant pattern of writing with apparently makes a lot of people think that a CTE is started by using with see e.g . questions like this : stackoverflow.com q 11491240 330315 http : stackoverflow.com q 11491240 330315 or this stackoverflow.com q 26670414 330315 http : stackoverflow.com q 26670414 330315 and the way this question is written kind give me the impression that ruedi also thinks that a CTE needs to start with with .. . Answer : You add the insert statement to the main query right after the CTE declarations .", "Question : Which are more performant CTE or temporary tables Comment : Related question : dba.stackexchange.com q 13112 http : dba.stackexchange.com q 13112 Comment : Users can find background information not relating to performance in the Using Common Table Expressions https : technet.microsoft.com en-us library ms190766 v sql.105 .aspx page on technet.microsoft.com . .. . Answer : CTE won t take any physical space . It is just a result set we can use join . Temp tables are temporary . We can create indexes constrains as like normal tables for that we need to define all variables . Temp table s scope only within the session . EX : Open two SQL query window .. . .. . Run this query in first window then run the below query in second window you can find the difference . Comment : it is just a result set we can use join . - This is not accurate . CTE is not a a result set but inline code . SQL Server query-engine parse the CTE code as part of the query text and build an execution plan according . The idea that CTE is inline is the big advantage of using CTE since it allows the server to create a combine execution plan", "Question : From this post How to use ROW NUMBER in the following procedure http : stackoverflow.com questions 706720 how-to-use-rownumber-in-the-following-procedure 706756 706756 .. . .. . There are two versions of answers where one uses a SubQuery and the other uses a CTE to solve the same problem . Now then what is the advantage of using a CTE Common Table Expression over a sub-query thus more readable what the query is actually doing .. . .. . The only advantage of using a CTE over sub select is that I can actually name the sub query . Are there any other differences between those two when a CTE is used as a simple non-recursive CTE Comment : Derivative question with good discussion : stackoverflow.com q 11169550 781695 http : stackoverflow.com q 11169550 781695 Comment : IMO anyone who thinks a CTE is less readable that a gigantic blob of interwoven subqueries hasn t seen the garbage pile of confusing saw-teeth-shaped queries in use across the majority of enterprise data management systems . Large non-trivial queries are typically dramatically easier to read later or by new eyes than subqueries and at least in the case of Postgres magically perform much better in many cases . For reasons I have yet to understand stackoverflow.com questions 33731068 http : stackoverflow.com questions 33731068 postgres-cte-vs-subquery-performance-difference-why as the opposite seems more likely . .. . Answer : The main advantage of the Common Table Expression http : msdn.microsoft.com en-us library ms190766.aspx when not using it for recursive queries http : msdn.microsoft.com en-us library ms186243.aspx is encapsulation instead of having to declare the sub-query in every place you wish to use it you are able to define it once but have multiple references to it . However this does not mean that it is executed only once as per previous iterations of this answer http : stackoverflow.com revisions 706983 3 thank you to all those that have commented . The query definitely has the potential to be executed multiple times if referenced multiple times the query optimizer ultimately makes the decision as to how the CTE should be interpreted . Comment : Think of a CTE as a temp table-variable does that mean CTE is stored in disk or in memory Comment : You cannot use the CTE or subquery in multiple queries by definition . I m pretty sure that the optimizer handles the subquery the same way it would handle the CTE evaluating the result set only once regardless of how many times it is used within the 1 query Comment : @AlexCuse : I think I ve clarified the context of the CTE enough but I added more to try and clarify more . Comment : This answer is very misleading . A CTE is not a temp table think of a CTE as a view that is defined only for your current query . Just like a view a CTE is expanded and folded into the overall query plan . Global optimization will still occur but do not think that just because you use a CTE you will only execute the query once . Here is a trivial example that fits in this space : WITH vw AS SELECT COUNT c FROM Person SELECT a.c b.c FROM vw a vw b The query plan will clearly show two scans aggregations and a join instead of just projecting the same result twice . Comment : @IanC @Michael Petito @AlexCuse - I ve modified the answer heavily based on all of your input thank you for contributing .", "Question : Should be a pretty straight forward question . Can I add an INDEX to a Common Table Expression CTE Comment : It might be sort of possible with some messing around with plan guides . This article http : explainextended.com 2009 05 28 generating-xml-in-subqueries by Quassnoi http : stackoverflow.com users 55159 quassnoi shows how to use a plan guide to get the results of a CTE cached by adding an EagerSpool to the plan . This builds a temporary index over them in tempdb . Comment : @Martin Smith : WOW I will have a good read of that and try and get my head around it all : .. . Answer : I have had the same requirement . Indexes can not be added to a CTE . However in the CTE select adding an ORDER BY clause on the joined fields reduced the execution-time from 20 minutes or more to under 10 seconds . You need to also ADD SELECT TOP 100 PERCENT to allow an ORDER BY in a CTE select . Comment : Where d you learn such voodoo It has a remarkable effect on a long-running query we had . Top 100000 works better than Top 100 PERCENT . I m going to start digging into the query analyzer to see what s going on . Thanks Comment : That is very interesting and good to know . I changed my query from top 1000000 to top 100 PERCENT . I will-change it back . I came across post on MSDN with this hint when trying to index a CTE for perforance . Comment : When you say in the CTE select do you mean the select that s creating the CTE or the select that s using the CTE Comment : i always love to know these technique can you set up a example to prove that thanx Comment : Hard to put an example up that will be meaningful to you as you will need to execute against substantial data set to see the value . I will look for the query that gave me this benefit and document in more detail the results and performance improvement for you in the next few days .", "Question : My stored procedure looks like : .. . .. . Can I only use it once .. . Answer : CTE don t create anything real . They are merely a language element a way to express a table expression that will be used possible repeatedly in a statement . When you say .. . .. . is just another way of saying .. . .. . CTE and derived tables are very similar any query using derived tables can be rewriten as a CTE and any non-recursive CTE can be rewritten as a query using derived tables . Personally I much more preffer the CTE form as is more concise and easy to read . CTEs allow for a table expression used multiple times to be declare only once : .. . .. . Compare this with the semantically similar derived table form : .. . .. . The CTE is clearly more readable . But you must understand that the two forms are producing the same query . The CTE form might suggest that an intermediate result is created then the join is run on the intermediate result but this is not true . The CTE form is compiled into exactly the same form as the derived table one which makes clear the fact that the CTE s table expresion is run twice .", "Question : Should be a pretty straight forward question . Can I add an INDEX to a Common Table Expression CTE Comment : It might be sort of possible with some messing around with plan guides . This article http : explainextended.com 2009 05 28 generating-xml-in-subqueries by Quassnoi http : stackoverflow.com users 55159 quassnoi shows how to use a plan guide to get the results of a CTE cached by adding an EagerSpool to the plan . This builds a temporary index over them in tempdb . Comment : @Martin Smith : WOW I will have a good read of that and try and get my head around it all : .. . Answer : No . A CTE is a temporary inline view - you cannot add an index to such a construct . If you need an index create a regular view with the SELECT of your CTE and make it an indexed view by adding a clustered-index to the view . You ll need to obey a set of rules outlined here : Creating an Indexed View http : msdn.microsoft.com en-us library aa933148 28SQL.80 29.aspx . Comment : Thanks . I wasn t sure as Bing-ing didn t show anything and neither did Googl-ing . Comment : What about Lycos-ing", "Question : The requirement is to write a table-valued function that takes 2 parameters . The function will return a table containing the numbers between @start number and @end number including both the parameter numbers . Here is the code : .. . .. . The query gives desired output.But I need an explanation from start to end how these lines are working What is the purpose of max recursion here Comment : Why don t you ask author of this Comment : I am asking the author and proposing a different approach if you haven t noticed . Comment : @FDavidov I think that question was for Zahid.. . Comment : So.. . who is the author if not Zahid Comment : @Zahid : In the real world a DBA would use a numbers table http : www.sqlservercentral.com articles T-SQL 62867 for this kind of things there is no need to generate the numbers sequence every time just select them sequence you need from the numbers table . I m guessing this is some kind of homework .. . Answer : Table variable would be operated almost as usual table . About difference between temporary table and table-variable refer this question https : stackoverflow.com questions 27894 whats-the-difference-between-a-temp-table-and-table-variable-in-sql-server or msdn https : msdn.microsoft.com en-us library ms175010.aspx . CTE https : technet.microsoft.com en-us library ms190766 v sql.105 .aspx is like nested query temporary result set . Primary difference is that it can be self-referenced like in your case . You declare CTE with only one column number . Specifying columns manually is not required if they can be resolved . This is a recursive CTE https : technet.microsoft.com en-us library ms186243 v sql.105 .aspx - select a number and join itself appending +1 to number . So each subsequent row will have +1 to previous row . When you select from CTE anchor select @start number as number is executed . Than it concatenated with everything returned form itself with +1 added . Let s go step by step inside CTE : .. . .. . So your result set is each nest level is inside and : .. . .. . where 1 +1 2 1 1 +1 +1 1 2 +1 2 3 and so on .. . .. . So if you will not limit this query nesting will be infinite . That is why recursion limit appear . Engine will simply filter your infinite query and stop nesting as on any subsequent selection it will get value that will not match you filter and that selection will return empty result set . For example you filter values less then 10 : .. . .. . Note that if you filter incorrectly in recursive call e.g . that very first recursive call will return to you @start number which is not match to you filter and no recursion will occur . Actually filter .. . .. . is excessive . It can be simplified to .. . .. . Note in both cases filter will not match @end number as adds +1 to previous value . So as you start with @start number anchor and concatenating with with recursion that returns .. . .. . result will be .. . .. . Hint https : msdn.microsoft.com en-us library ms181714.aspx in select statement option maxrecursion 10000 https : msdn.microsoft.com en-us library ms175972.aspx overrides default maximum recursion level by default it is 100 valid values are 0..32767 . So your particular function is limited to 10000 values and if you will try to generate more then 10000 values you will get this error : .. . .. . The statement terminated . The maximum recursion 10000 has been exhausted before statement completion . Note filter that limits recursion must be placed inside your CTE not where you use that CTE as in that case engine will continue to iterate through CTE looking for next matching value but your CTE would be literally infinite and error will occur . Rest of code is pretty simple - result form CTE inserted into @numbers table-variable and then simply selected . Variable @max recursion can be removed as it not used and cannot be used inside OPTION clause .", "Question : I am using a Common Table Expression for paging : .. . .. . Immediately after making this query I make make an almost identical query in order to retrieve the total number of items : .. . .. . I have tried combining these together ie : define the CTE query the data and then query the Count but when I do this I get an error message Invalid object name query in response the the second query the Count . Is there any way to combine these two queries into one to save a round-trip to the DB .. . Answer : According to Microsoft in this link http : msdn.microsoft.com en-us library ms175972 28v sql.100 29.aspx : .. . .. . A CTE can reference itself and previously defined CTEs in the same WITH clause . In that new CTE referencing the previous defined CTE we can make the count query : .. . .. . query is the main CTE and totalCount is using it for get the total rows count .. . .. . Microsoft should have an example for a common task like this ." ] }
[ "yes-answer-long", "yes-answer-short" ]
create-view
UNK_RELATION
maven-eclipse-plugin@ide@67
maven-eclipse-plugin -- an eclipse plug-in for generating eclipse @placeholder files like .classpath .project etc .
{ "confidence": [ 56.12823486328125, 55.42047882080078, 54.68730163574219, 53.58849334716797, 53.436737060546875, 53.056217193603516, 52.44750213623047, 52.07617950439453, 51.960567474365234, 51.59074401855469, 51.052547454833984, 50.950782775878906, 50.69038391113281, 50.46601867675781, 50.42291259765625, 50.11906051635742, 50.11906051635742, 49.772544860839844, 49.4378547668457, 49.4378547668457, 49.130882263183594, 48.96929931640625, 48.557525634765625, 48.44142532348633, 48.44142532348633, 48.04103469848633, 48.04103469848633, 47.63867950439453, 47.539669036865234, 47.43651580810547, 47.055633544921875, 47.055633544921875, 46.67164993286133, 46.542694091796875, 46.542694091796875, 46.51305389404297, 46.34050750732422, 46.34050750732422, 46.23924255371094, 46.11705017089844, 46.11705017089844, 45.68413162231445, 45.62910842895508, 45.49333953857422, 45.48505401611328, 45.40874481201172, 45.38633346557617, 45.33470916748047, 45.241004943847656, 45.199790954589844, 45.012046813964844, 44.927345275878906, 44.92277526855469, 44.90672302246094, 44.65027618408203, 44.65027618408203, 44.464778900146484, 44.441131591796875, 44.441131591796875, 44.3590202331543, 44.3590202331543, 44.3590202331543, 44.3590202331543, 44.3590202331543, 44.3590202331543, 44.16304016113281, 44.09095764160156, 43.98384475708008, 43.95296096801758, 43.53516387939453, 43.42448043823242, 43.131649017333984, 43.131649017333984, 43.046112060546875, 43.046112060546875, 42.70785903930664, 42.59840393066406, 42.530059814453125, 42.15612030029297, 42.15612030029297, 42.034645080566406, 42.034645080566406, 42.021785736083984, 42.021785736083984, 42.01225280761719, 41.94912338256836, 41.93719482421875, 41.87335205078125, 41.850303649902344, 41.850303649902344, 41.850303649902344, 41.66438674926758, 41.65668487548828, 41.65668487548828, 41.544952392578125, 41.480812072753906, 41.45662307739258, 41.43690490722656, 41.25345230102539, 41.18422317504883 ], "content": [ "We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files .", "Sure you can override the .classpath generated using the maven-eclipse-plugin", "Another way to install Maven plug-in for Eclipse : .. . .. . 1 .", "Make sure maven-plugin-api.jar has successcully downoladed in your maven local repository and exist in classpath in Eclipse project .", "I mean the maven-eclipse-plugin .", "See here : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html", ".. . .. . Technical information .. . .. . Java 6 Maven 3.0.2 maven-eclipse-plugin 2.8 Eclipse 3.3.2 but I can test with newer version of Eclipse no m2eclipse plugin .", "Maven Eclipse plugin installation step by step : .. . .. . 1 .", "With the maven-eclipse-plugin using mvn eclipse : eclipse http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html you can specifiy eclipse project natures http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalProjectnatures and builders http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalBuildcommands that will automatically be added to the eclipse project .", "I guess you ve read Apache Maven Eclipse Plugin Introduction https : maven.apache.org plugins maven-eclipse-plugin and its eclipse : eclipse https : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html page .", "i want to install maven plug in on eclipse .", "I am using maven-eclipse-plugin for working with a war project .", "Now create a new Maven project in eclipse .", "Sometime Eclipse needs a little help : maven.apache.org plugins maven-eclipse-plugin reactor.html https : maven.apache.org plugins maven-eclipse-plugin reactor.html", "I am using the maven-eclipse-plugin not M2E", "They stopped working together from 2.7 release of maven-eclipse-plugin when maven-eclipse-plugin dropped eclipse : m2eclipse goal .", "I am using Groovy-Eclipse compiler plugin for Maven http : groovy.codehaus.org Groovy-Eclipse+compiler+plugin+for+Maven", "The question is : Maven installation in eclipse .", "In fact there is no more reason to use the maven-eclipse-plugin at all now that m2e is a top-level eclipse project", "The context : I m working with Eclipse on a Java GWT Maven project with the Eclipse Google Plugin .", "Do not use maven-eclipse-plugin .", "I am trying to convert and Eclipse plugin project to use Maven .", "If it is a plugin for Eclipse 3.7 a.k.a .", "Does this mean the maven-eclipse-plugin is essentially obsolete", "You should use maven-eclipse-plugin or m2eclipse .", "A good maven-plugin for eclipse is the eclipse maven sonatype m2eclipse https : www.eclipse.org m2e download .", "STEPS TO INSTALL MAVEN in Eclipse : .. . Maven Eclipse plugin installation step by step : .. . 1 .", "The Apache Maven Eclipse Plugin https : maven.apache.org plugins maven-eclipse-plugin is RETIRED : .. . .. . Users are advised to use m2e the Eclipse Maven Integration https : projects.eclipse.org projects technology.m2e instead of this plugin as it can more closely resemble the actual build and runtime classpaths as described in the project pom.xml - among other advantages .", "Another way to install Maven plug-in for Eclipse : .. . .. . After successful installation do the followings in Eclipse : .. . 1 .", "Is there a solution for this where I can add a linked folder as a source folder to my eclipse project generated using the Maven eclipse-plugin", "What does Maven - Update Project.. . do in Eclipse", "I got my first Maven Project in Eclipse .", "I installed maven plug-in 1.3 with eclipse on Mac OS X Lion .", "maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin and m2eclipse http : m2eclipse.sonatype.org now m2e http : eclipse.org m2e are independent projects .", "Install Maven Plugin for Eclipse .. . .. . Installing a Maven Plugin for Eclipse can be a bit tricky if you want to get the whole spectrum of features .", "Eclipse needs to import Maven projects somehow and introduce few eclipse specific build files .", "I can t find anything in the maven-eclipse-plugin docs that tells me .", "I just installed the maven-eclipse-plugin and all is great .", "After running the maven Eclipse plugin my .classpath includes all dependencies like so : .. . .. . Is there a way to get it to just include the maven classpath container like so", "Is it possible to store this command in my eclipse maven-plugin .", "You can do it in maven-plugin in eclipse as below .", "Eclipse should be updating your classpath .", "Steps to install maven-plugin into eclipse : .. . .. . In eclipse : .. . .. . 1 . go to Help- install new software .", "Indigo you should be able to install M2E from the Eclipse Marketplace Help Eclipse Marketplace.. . : Search for m2e and select Maven Integration for Eclipse .", "Click on OK . .. . .. . Maven integration for eclipse will be dowloaded and installed .", "when we are trying to run mvn eclipse : eclipse from command-line we are getting following error : .. . .. . Internal error in the plugin manager executing goal org.apache.maven.plugins : maven-eclipse-plugin : 2.6 : eclipse : Unable to load the mojo org.apache.maven.plugins : maven-eclipse-plugin : 2.6 : eclipse in the plugin org.apache.maven.plugins : maven-eclipse-plugin .", "There is no way to generate custom attibutes for classpath containers with the Maven Eclipse Plugin up to version 2.9 .", "M2 : M2 HOME bin .. . .. . Steps to Configures maven on Eclipse IDE : .. . .. . Select Window - Preferences Note : If Maven option is not present then add maven-3 to eclipse or install it .", "I m trying to generate eclipse-project files using Maven2 eclipse-plugin for RAD7.5 .", "sometimes maven projects in eclipse needs to be occasionally updated with special eclipse maven goal .", "I have maven projects opened in my Eclipse .", "The point of the Eclipse m2e plugin is that you don t have to worry about the Eclipse classpath - m2e automagically takes care of including dependencies listed in your pom.xml .", "An Eclipse-plugin version .", "I want to install a Maven plugin and use it to start building Maven projects from Eclipse .", "just a simple question : I need to add a Maven dependency to a Eclipse Plugin project .", "That is interesting question : How to convert Eclipse PLugin project to be one built with Maven Tycho .", "I ve been googling for quite a bit and have tried following the steps both on http : eclipse-cs.sourceforge.net extending custom checks.html and http : jgonian.wordpress.com 2010 12 12 maven-checkstyle-and-eclipse .. . .. . The parent-pom has the project in which MyAuditListener exists as a dependency both under the maven-checkstyle-plugin and maven-eclipse-plugin .", "After installing the maven it will ask for restarting the Eclipse So restart the eclipse again to see the changes .", "After installing the maven it will ask for restarting the Eclipse So restart the eclipse again to see the changes .", "I inherited a largish Eclipse plugin codebase which builds with Maven Tycho .", "I m developing a web application using Eclipse Juno and Maven-WTP plugin .", "The Maven Eclipse WTP Plugin is getting the data to deploy from webapp directory .", "I am using Groovy-Eclipse compiler plugin for Maven", "Basically I want the behavior of the maven-eclipse-plugin in m2eclipse the way it used to be .", "No and possibly you should not use maven-bundle-plugin for Eclipse plugins development .", "Especially I don t want to : .. . .. . apply to any Maven conventions including project layout conventons .. . install and use any specific Eclipse plugins Eclipse shouldn t know at all that it is Maven project and treat it in any special way .. . depend on be bound to Maven in any other way than using it as lightweight jars libraries downloader .. . .. . My first and only idea is to use Eclipse Maven plugin http : maven.apache.org plugins maven-eclipse-plugin index.html from command-line to manage project classpath .", "I guess this might be confusing but when I say eclipse-plugin I do not mean the m2e plugin for eclipse .", "Is there a way to tell maven to treat these folders as source folders automatically when generating the eclipse project", "The value eclipse-plugin is not included in the combo i.e .", "By use install a Maven plugin and use it I am sure you are looking for a Eclipse plugin that will perform Maven functions within the IDE .", "Anyway the plugin gives me pretty much all the functionality of the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin I ever used of course there is a lot more though and I m happy with that .", "I have checked out a maven project into eclipse using subclipse .", "I m trying to add a wst.web facet for a multimodule maven project on eclipse .", "I have just include Maven integration plug-in at Eclipse : .. . .. . Just follow the bellow steps : .. . .. . In eclipse from upper menu item select- Help - click on Install New Software. . - then click on Add button .", "I have just include Maven integration plug-in with Eclipse : .. . .. . Just follow the bellow steps : .. . .. . In eclipse from upper menu item select- Help - click on Install New Software. . - then click on Add button .", "It seems like the eclipse-plugin might be deprecated or at least should be", "A bug at the eclipse-plugin perhaps", "Open Eclipse to workspace C : eclipse workspace .", "Click Install button at Maven Integration for Eclipse section .. . 5 .", "Lot of people assumes Eclipse and maven intergration is tough but its very eassy .", "I ve resigned from using m2eclipse and I m using the maven-eclipse-plugin .", "I used maven-eclipse-plugin in the pom.xml but that did not work .", "I tried overriding goals configure-workspace and from maven-eclipse-plugin but it don t works .", "Why do you want to avoid it but at the same time have something similar using the maven-eclipse-plugin", "In the POM I have specified to create linked virtual folders to organize the source in the Maven format src main java etc : .. . .. . When I create a project for eclipse by running mvn eclipse : clean eclipse : eclipse the .project file hence generated has linked folders or virtual folders : .. . .. . but the .classpath file generated does not add those folders to the classpath as source folders for my project i.e . an entry like the following is missing : .. . .. . If I were to create a project using eclipse and not using the maven-eclipse-plugin I could create virtual linked folders as necessary and add them as source folders to the project .", "I wonder if I can have a very minimal and lightweight Eclipse-Maven integration that provides only adding Maven dependencies to Eclipse project classpath in the simpliest possible way .", "The plugin reference http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html has some examples for adding build commands resources facets and of course also adhoc configuration .", "I would like that the JAR build-path or jar files in the build-path of and eclipse project pointed to a local directory into eclipse project named lib not pointed to M2 REPO variable my maven local repository path .. . .. . In lib directory there are jar files copied through overriding copy-dependencies goal in mave-dependency-plugin My intention is that eclipse project were self-contained .", "I m using M2E for maven integration with eclipse .", "Eclipse Maven Import http : i.stack.imgur.com UHSbr.png", "I m using Eclipse Mars with Maven v 3.3 .", "I would like to import Maven Projects into Eclipse programatically .", "It is now officially part of the Eclipse project .", "It syncs the Eclipse project settings with that of the pom .", "OR Is that like Equinox comes with eclipse and it s version is totally dependent on Eclipse Version .", "Whenever I create a new Maven project in Eclipse Juno it creates a pom.xml file by default .", "The latest maven-eclipse-plugin documentation makes it look like it still has the eclipse : eclipse goal .", "Eclipse", "I always have to configure the groovy folders in Eclipse even after I ve generated the eclipse project in maven using mvn eclipse : eclipse as shown below .", "Note that I m not sure that using the maven-eclipse-plugin to add dependencies will work anywhere but in Eclipse and you might want to build your projects on a continuous-integration server ." ] }
{ "confidence": [ 67.2797622680664, 65.60191345214844, 63.249061584472656, 61.74112319946289, 61.44206237792969, 61.43709945678711, 61.25948715209961, 61.081947326660156, 60.27862548828125, 60.25566482543945, 58.09367370605469, 57.93111801147461, 57.82252883911133, 57.42942428588867, 57.315826416015625, 56.84447479248047, 56.65046310424805, 56.58747100830078, 56.52239227294922, 56.272605895996094 ], "content": [ "Question : null .. . Answer : I always have to configure the groovy folders in Eclipse even after I ve generated the eclipse project in maven using mvn eclipse : eclipse as shown below . Is there a way to tell maven to treat these folders as source folders automatically when generating the eclipse project enter image description here http : i.stack.imgur.com sA0Da.jpg .. . .. . My plugin definition . I am using Groovy-Eclipse compiler plugin for Maven http : groovy.codehaus.org Groovy-Eclipse+compiler+plugin+for+Maven Comment : What groovy plugin are you using for maven Comment : @LeonardBr nings added my plug-in def . I am using Groovy-Eclipse compiler plugin for Maven", "Question : I would like that the JAR build-path or jar files in the build-path of and eclipse project pointed to a local directory into eclipse project named lib not pointed to M2 REPO variable my maven local repository path .. . .. . In lib directory there are jar files copied through overriding copy-dependencies goal in mave-dependency-plugin My intention is that eclipse project were self-contained . I tried overriding goals configure-workspace and from maven-eclipse-plugin but it don t works . is there way for to do this .. . Answer : Sure you can override the .classpath generated using the maven-eclipse-plugin Comment : It is a possible solution but problem is that are many dependencies . I have to write many classpathentry and is hard to manage too . Write kind con path lib doesn t work .", "Question : After running the maven Eclipse plugin my .classpath includes all dependencies like so : .. . .. . Is there a way to get it to just include the maven classpath container like so .. . Answer : The point of the Eclipse m2e plugin is that you don t have to worry about the Eclipse classpath - m2e automagically takes care of including dependencies listed in your pom.xml . Voila In fact it is recommended that you do not mess with the project classpath when using a pom.xml . Comment : Hmm yeah . It seems like the eclipse-plugin might be deprecated or at least should be Comment : No the m2e plugin is alive and well and included with the latest eclipse downloads . You just have to activate it . Bottom line is it should make life simpler and easier - if it does not something is wrong", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : It is now officially part of the Eclipse project . It is bundled with the Eclipse.org Java builds . The previous means of installing the plugin is essentially obsolete . It can now be installed via the Indigo update-site under Collaboration - m2e . Indigo update-site Maven http : i.stack.imgur.com ywz9h.png .. . .. . To import maven projects in to Eclipse simply use the same File - Import.. . - Maven - Existing Maven Project .. . .. . Eclipse Maven Import http : i.stack.imgur.com UHSbr.png Comment : It is now officially part .. . It is bundled .. . It can now be installed .. . -- could you please be more clear about what It refers to in your post", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin and m2eclipse http : m2eclipse.sonatype.org now m2e http : eclipse.org m2e are independent projects . They stopped working together from 2.7 release of maven-eclipse-plugin when maven-eclipse-plugin dropped eclipse : m2eclipse goal . I believe you can use maven-eclipse-plugin with Eclipse if you do not have m2e plugin but the support especially for wtp is limited if not non-existent . Comment : The latest maven-eclipse-plugin documentation makes it look like it still has the eclipse : eclipse goal . See here : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html Comment : @HDave . I did not say it does not . I said eclipse : m2eclipse goal - specifically to support m2eclipse . That is also why I mentioned you can still have it work with Eclipse . Comment : I think I need to get those eyeglasses...misread the text . Sounds like we ll go with m2e and try to get that working with configurations and all . Thanks .", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : I don t see it as a case of one making the other obsolete . I see it as two independent plugins with each establish a relationship between Eclipse and Maven but in opposite directions . With m2eclipse being a lot more integrated it appears to be the more popular option . It plays well with the maven-ear-plugin for packing up an EAR . The m2e-wtp http : www.eclipse.org m2e-wtp plugin also sits in the middle of m2eclipse and WTP to allow Eclipse to utilise your POM files to deploy your projects to the server using Run As. . Server .", "Question : I am using the maven-eclipse-plugin not M2E to generate my project . I have checked out the project under a source directory : C : source and this source is not organized in the Maven convention . My eclipse work space is under C : eclipse workspace where I have the POM files . In the POM I have specified to create linked virtual folders to organize the source in the Maven format src main java etc : .. . .. . When I create a project for eclipse by running mvn eclipse : clean eclipse : eclipse the .project file hence generated has linked folders or virtual folders : .. . .. . but the .classpath file generated does not add those folders to the classpath as source folders for my project i.e . an entry like the following is missing : .. . .. . If I were to create a project using eclipse and not using the maven-eclipse-plugin I could create virtual linked folders as necessary and add them as source folders to the project . Using the plugin I am forced to point to the absolute path to the source folder as sourceDirectory . The plugin does not seem to recognize linked virtual folders and hence does not add them as a source folder to my project . Is there a solution for this where I can add a linked folder as a source folder to my eclipse project generated using the Maven eclipse-plugin Thanks in advance . Comment : So to be clear does your source in version-control have a POM file and can be built with mvn clean install I was confused by your comment My eclipse work space is under C : eclipse workspace where I have the POM files . Comment : No the source from SCM is separate from the Mavenized project . So there is no POM under italic C : source italic it only has the source code . The POMs are located in the Mavenized project in the work space . Comment : Wow that feels a highly convoluted approach . Have you considered adding a POM to the source code and just running eclipse : eclipse there Some effort would be required to get the POM to accept the non-standard hierarchy but it should be doable . Then the invocation of eclipse : eclipse would be normal and you could just import the existing project into your Eclipse workspace using the menus . Comment : Hmm no the source cannot be mavenized at this point of time hence the search for a workaround . .. . Answer : Have you tried the following approach 1 . Check out source including existing POM file to C : source . 2 . Open Eclipse to workspace C : eclipse workspace . 3 . Select File Import.. . Maven Existing Maven Projects .. . .. . 4 . Navigate to the directory containing your pom.xml file and proceed to import . This works for me on projects where I keep the source and workspace paths completely separate . Comment : But when I import the project there is no source attached to it . Do I not need to manually configure the source folders then Comment : You shouldn t have to . Does your Maven project follow the standard project layout http : maven.apache.org guides introduction introduction-to-the-standard-directory-layout.html My answer also assumed you have an existing pom.xml file which builds fine from the command-line . Comment : No the source does not follow the standard layout either which is why I wanted to create virtual folders as per the standard layout . As an example the source module is like : source module java-package which when I import as a source folder would be like : module src main java java-package - where : virtual folder . It might not be possible at this moment to re-structure the source hence the problem . Comment : I guess this might be confusing but when I say eclipse-plugin I do not mean the m2e plugin for eclipse . I mean the maven-eclipse-plugin . Now to answer your question I have been running eclipse : clean eclipse : eclipse from the command-prompt and there I see the problem . The thing is when the plugin generates the .project file it correctly creates the virtual folders but in the generated .classpath file it does not have any references to the virtual folders as source . Comment : My mistake sorry I went off on the wrong tangent . I don t know the answer off hand . Any chance you could post a little pom.xml and suggest a project layout so that I can test this I would add that to the main question so that others can experiment .", "Question : From my experience Maven is often an overkill in small experimental applications . But depencency management is very useful feature of Maven and actually the only one that can be really helpful in mentioned type of applications . I wonder if I can have a very minimal and lightweight Eclipse-Maven integration that provides only adding Maven dependencies to Eclipse project classpath in the simpliest possible way . Especially I don t want to : .. . .. . apply to any Maven conventions including project layout conventons .. . install and use any specific Eclipse plugins Eclipse shouldn t know at all that it is Maven project and treat it in any special way .. . depend on be bound to Maven in any other way than using it as lightweight jars libraries downloader .. . .. . My first and only idea is to use Eclipse Maven plugin http : maven.apache.org plugins maven-eclipse-plugin index.html from command-line to manage project classpath . But by default this plugin does more than it sets up default maven project layout manage builders . Can I limit this plugin to only do what I want Or can I reach the goals I described in any other way Comment : I hope you don t use Eclipse Indigo Comment : @khmarbaise matter of fact I use Eclipse Indigo . Why it matters Comment : Than you shouldn t use eclipse-plugin to configure the path s should be already done by m2e via Eclipse . If you don t like the maven way than it might be better to take a look at Ivy . .. . Answer : Sorry there s not . As you can see here : .. . .. . http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html .. . .. . the configuration of the plugin allows to add some additional classppath items facelets etc . but you can t skip the default ones .", "Question : From my experience Maven is often an overkill in small experimental applications . But depencency management is very useful feature of Maven and actually the only one that can be really helpful in mentioned type of applications . I wonder if I can have a very minimal and lightweight Eclipse-Maven integration that provides only adding Maven dependencies to Eclipse project classpath in the simpliest possible way . Especially I don t want to : .. . .. . apply to any Maven conventions including project layout conventons .. . install and use any specific Eclipse plugins Eclipse shouldn t know at all that it is Maven project and treat it in any special way .. . depend on be bound to Maven in any other way than using it as lightweight jars libraries downloader .. . .. . My first and only idea is to use Eclipse Maven plugin http : maven.apache.org plugins maven-eclipse-plugin index.html from command-line to manage project classpath . But by default this plugin does more than it sets up default maven project layout manage builders . Can I limit this plugin to only do what I want Or can I reach the goals I described in any other way Comment : I hope you don t use Eclipse Indigo Comment : @khmarbaise matter of fact I use Eclipse Indigo . Why it matters Comment : Than you shouldn t use eclipse-plugin to configure the path s should be already done by m2e via Eclipse . If you don t like the maven way than it might be better to take a look at Ivy . .. . Answer : I found a solution that fits very well to needs use-case that I described in question : .. . .. . 1 . I created very minimal pom file in Eclipse project root : .. . .. . This .pom file consists of three parts : .. . .. . Required Maven stuff ie . modelVersion and GAV .. . build section where Maven default source and output directories and overriden to mimic Eclipse environment it s the answer to the part of question on limiting maven-eclipse-plugin behaviour some other eclipse : eclipse goal options like buildcommands may be useful in some more complex cases .. . dependencies section listing dependencies that I need to have on project classpath .. . .. . 2 . From command-line I invoked following commands : .. . .. . 3 . Each time I want to update Eclipse project classpath from Maven file I can do one of two things : .. . .. . invoke last two lines from command-line .. . bind mvn eclipse : eclipse to Eclipse external tool configuration http : help.eclipse.org helios index.jsp topic 2Forg.eclipse.platform.doc.user 2Ftasks 2Ftasks-exttools-running.htm and invoke it with single click", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : From a methodology perspective I would really prefer the m2eclipse way -- i.e . Eclipse invoking maven for builds so it does exactly the same thing as a pure maven-build . The problem I found with the m2eclipse though was that it always got so horribly ridiculously go-have-a-coffee-break-while-you-wait-for-it slow performance when the maven project became larger adding more and more sub-projects . I first tried it in 2010 and finally gave up on it . Tried it again a year later and to my dismay it still sucked just as much -- I dont get it -- it takes MUCH MUCH longer than just building with mvn clean install directly -- shouldnt it actually do the same thing The mvn eclipse : eclipse-plugin on the other hand works like a charm as long as you just have a PURE java jar war build . But if the maven build does other plugin stuff for example legacy rmi-compiles or using ant for sub-tasks etc that will just be ignored during the Eclipse-build and so doesnt work . The workaround for that is that you FIRST need to build the project ONCE in maven then run mvn eclipse : eclipse then you can edit java-code and it works in Eclipse -- as long as you dont do Project Clean If you do you that or change anything in the maven-plugins parts Eclipse doesnt understand about you need to re-build in maven then do eclipse : eclipse again then refresh the project in Eclipse . Thats how I usually work and I think and it works good enough . Comment : Reading the documentation it looks like as eclipse : eclipse provides enough configuration options to add builders for ant and other tasks . Have you tried them out", "Question : I am new to maven and hit a problem that looks easy in the first place but I already kept me busy for a whole day about and no way to get it working . First as part of running eclipse : eclipse-plugin I create a linked folder like below : .. . .. . And then I am adding that folder as a source folder like below : .. . .. . However when I am looking at the generated .classpath in eclipse the some real folder is there but the properties is not . It looks like by default the build-helper-maven-plugin will check if the folder is there and if it is not it won t add it . I am using maven 3.0.4 outside eclipse to run the build and I can see in the maven logs something like this : .. . .. . This is my project structure : .. . .. . All I need is to have both some real folder and the linked resource properties added to the .classpath of the project2 Comment : Can you show the directory structure of your project Which Eclipse version do you use Do you use m2e Comment : It is not a lot to show . I have : project1 -- properties this is the real folder project2 -- some real folder -- properties this is the link resource I need both some real folder and the linked resource properties to be part of the .classpath of the project2 Comment : Sorry not sure how to make it look nicer . Comment : Simply edit your post there you make better formatting . .. . Answer : It is a bad practice to include stuff from outside a artefact directly into a artefact . You should only include into project2 stuff below folder project2 and something from project2 s dependencies . I m not sure whether what you are doing is possible at all . So if you want to have project1 properties available in project2 you usually pack project1 properties in project1 s artefact and add a dependency on project1 to project2 . If this does not work for some reason for example since you want to move project1 s stuff to another location in project2 you can unpack it with maven-dependency-plugin http : maven.apache.org plugins maven-dependency-plugin dependency : copy-dependencies into project2 s target to some appropriate place .", "Question : I would like that the JAR build-path or jar files in the build-path of and eclipse project pointed to a local directory into eclipse project named lib not pointed to M2 REPO variable my maven local repository path .. . .. . In lib directory there are jar files copied through overriding copy-dependencies goal in mave-dependency-plugin My intention is that eclipse project were self-contained . I tried overriding goals configure-workspace and from maven-eclipse-plugin but it don t works . is there way for to do this .. . Answer : I suggest to try one of the following ways : .. . .. . Use a Maven Repository Manager such as Nexus and deploy any jar you have which are not in an available repository . Then use normal Maven dependencies . Use system Maven dependencies . Comment : I want to avoid writing systemPath in each depedency . Although it is unique solution surelly Comment : Why do you want to avoid it but at the same time have something similar using the maven-eclipse-plugin Note that I m not sure that using the maven-eclipse-plugin to add dependencies will work anywhere but in Eclipse and you might want to build your projects on a continuous-integration server . Comment : I think you re right . I will use systemPath . I hope there will not problems . I must use self-contained eclipse project due client policies . There aren t continuous-integration requisites in this project . Thanks .", "Question : With the maven-eclipse-plugin using mvn eclipse : eclipse http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html you can specifiy eclipse project natures http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalProjectnatures and builders http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalBuildcommands that will automatically be added to the eclipse project . Earlier versions of m2eclipse http : m2eclipse.sonatype.org used the configuration block of the maven-eclipse-plugin and also let you activate natures and builders using the same mechanisms . This seems to no longer be the case because a I can t find any reference to maven-eclipse-plugin in the m2eclipse sources and b it just doesn t work : - .. . .. . So this is my question : is there any way to configure the eclipse project generated by m2eclipse from the pom.xml Specifically : project builders and natures but I d be interested in other options as well . .. . Answer : I have now implemented this as a maven-plugin I call maven-eclipseconf-plugin . Unfortunately it s proprietary work for a client so I can t share it . But let me describe what I do : .. . .. . Tied to the lifecycle verify I check for the existence of an eclipse .project file . If it s there I check it for the presence of the builders and natures I want to automatically add and you can deactivate this behavior by using a maven property or a stop file with a configurable name . You can also define configuration-files that will be written like .pmd which is related to this other question of mine http : stackoverflow.com questions 4155094 in-the-eclipe-pmd-plugin-can-i-reference-the-standard-ruleset-files . The contents of the Configuration files can be specified inline it can come from an external file or from a URL . I also tried to introduce variable substitution in the config files where a special placeholder would be replaced with a multi-moduke-project s root folder but I had to give up on that approach http : stackoverflow.com questions 4146638 maven-variable-for-reactor-root . Anyway the plugin gives me pretty much all the functionality of the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin I ever used of course there is a lot more though and I m happy with that . Perhaps I will build something similar once more in open-source when this contract is finished .", "Question : I have a multiple maven project like this : .. . .. . The war use jar1 jar2 and jar3 .. . .. . When I run a mvn clean install the compiled war is good and work fine in my server jboss . When I run a mvn eclipse : eclipse to generate my eclipse configuration the build works but when I import my projects in eclipse Indigo and I publish my war in my server jar1 jar2 jar3 are not publish . In the war build path configuration jar1 jar2 jar3 are well configured . enter image description here http : i.stack.imgur.com EEZfw.jpg .. . .. . But when I look at the deployment assembly for the war project I have the next error : .. . .. . enter image description here http : i.stack.imgur.com MLbMI.jpg .. . .. . Here is my generated .classpath file for the war project : .. . .. . Here is my eclipse-plugin configuration : .. . .. . I don t understand why it s wrong in my plugin configuration and why eclipse doesn t find jars . Thanks for your help . Comment : Try ticking your three jar dependency projects in Java Build Path - Order and Export . Comment : Nothing change with that .. . Answer : I have found the problem . The jboss tools maven support plugin install with jboss tools break the link between projects . Uninstalling it will solve the problem . It s possible to uninstall just the maven support and keep the rest", "Question : I want to modify automatically the order on which classpathentry are written by the Maven Eclipse plugin . Is there a way to do that I want to do that for two reasons . First reason : in my application the interface org.w3c.dom.Node is provided by several third-party libraries for XML processing as well as the JDK 1.6 . However the version of org.w3c.dom . classes provided by these libraries are quite old compared to the JDK . For example the method Node.getTextContent http : download.oracle.com javase 6 docs api org w3c dom Node.html getTextContent 28 29 does not exist there . Running mvn eclipse : eclipse on my project will place these library before the JDK container in the .classpath using this method in Eclipse will result in a compilation error . So the idea is to put this line : .. . .. . at the beginning of the .classpath file . The second reason less important is when I run mvn eclipse : eclipse it always set my src test packages before src java ones which bothers me a little yes I know that in TDD we develop tests first but still.. . .. . .. . .. . .. . Technical information : Java 1.6 Maven 2.2.1 Eclipse plugin 2.8 .. . .. . .. . .. . Edit : There is a question here http : stackoverflow.com questions 793054 maven-classpath-order-issues that could look similar to mine but it did not help me as it only deals with the order for third-party dependencies.. . .. . Answer : See this post : Maven classpath order issues http : stackoverflow.com questions 793054 maven-classpath-order-issues . I can confirm that the 2.9 plugin has fixed this issue or allows you to futz with the config http : maven.apache.org plugins maven-eclipse-plugin myeclipse-mojo.html .", "Question : I have spent all day on the Maven site reading the 5- and 30-minute tutorials and trialing Maven out for the first time . I want to install a Maven plugin and use it to start building Maven projects from Eclipse . Despite an honest effort I have been unable to find a comprehensive tutorial on any Maven plugin . M2E which seems like the de facto standard has nothing but broken or recursive links on their site . I can t tell if I even installed the plugin correctly or how to use it . Does anyone know of a good step-by-step guide to M2E or any other plugin One that comes with good installation documentation along with a solid explanation of its features and proper uses I can t be the only developer who has ever had this frustration . Either that or I am looking in all the wrong places.. . Comment : I m in the same boat glad you posted this question. . I see this was a few days ago. . where you able to get it working I already installed maven on my machine but I haven t been able to install the plugin yet . Comment : If you use Eclipse Juno J2EE m2e is already included . .. . Answer : Maven Eclipse plugin installation step by step : .. . .. . 1 . Open Eclipse IDE .. . 2 . Click Help - Install New Software.. . .. . 3 . Click Add button at top right corner .. . 4 . At pop-up : fill up Name as M2Eclipse and Location as http : download.eclipse.org technology m2e releases or http : download.eclipse.org technology m2e milestones 1.0 .. . .. . 5 . Now click OK .. . .. . After that installation would be started . Another way to install Maven plug-in for Eclipse : .. . .. . 1 . Open Eclipse .. . 2 . Go to Help - Eclipse Marketplace .. . 3 . Search by Maven .. . 4 . Click Install button at Maven Integration for Eclipse section .. . 5 . Follow the instruction step by step .. . .. . After successful installation do the followings in Eclipse : .. . .. . 1 . Go to Window -- Preferences .. . .. . 2 . Observe Maven is enlisted at left panel .. . .. . Finally .. . .. . 1 . Click on an existing project .. . 2 . Select Configure - Convert to Maven Project Comment : : - Love you great job Comment : I have tired these steps but not install I got some error which detail below......Cannot complete the install because one or more required items could not be found . Software being installed : m2e - Maven Integration for Eclipse includes Incubating components 1.5.0.20140606-0033 org.eclipse.m2e.feature.feature.group 1.5.0.20140606-0033 Comment : @Krunal Patel : have you tried from Marketplace Comment : I have the same Cannot complete the install because one or more required items could not be found . Software being installed : m2e - slf4j over logback logging Optional 1.5.0.20140606-0033 org.eclipse.m2e.logback.feature.feature.group 1.5.0.20140606-0033 - didn t see the marketplace option under help . Comment : Eclipse juno doesnt support maven 1.5..still they have not added capability of 1.5 so try 1.4 or 1.3 download.eclipse.org technology m2e releases 1.3 http : download.eclipse.org technology m2e releases 1.3 download.eclipse.org technology m2e releases 1.4 http : download.eclipse.org technology m2e releases 1.4", "Question : I have a multiple maven project like this : .. . .. . The war use jar1 jar2 and jar3 .. . .. . When I run a mvn clean install the compiled war is good and work fine in my server jboss . When I run a mvn eclipse : eclipse to generate my eclipse configuration the build works but when I import my projects in eclipse Indigo and I publish my war in my server jar1 jar2 jar3 are not publish . In the war build path configuration jar1 jar2 jar3 are well configured . enter image description here http : i.stack.imgur.com EEZfw.jpg .. . .. . But when I look at the deployment assembly for the war project I have the next error : .. . .. . enter image description here http : i.stack.imgur.com MLbMI.jpg .. . .. . Here is my generated .classpath file for the war project : .. . .. . Here is my eclipse-plugin configuration : .. . .. . I don t understand why it s wrong in my plugin configuration and why eclipse doesn t find jars . Thanks for your help . Comment : Try ticking your three jar dependency projects in Java Build Path - Order and Export . Comment : Nothing change with that .. . Answer : You could give a try to Eclipse Multi-project Import Export http : eclipse-tools.sourceforge.net projecttransfer . I think it will cover your needs . Comment : Nothing change with this plugin", "Question : With the maven-eclipse-plugin using mvn eclipse : eclipse http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html you can specifiy eclipse project natures http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalProjectnatures and builders http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html additionalBuildcommands that will automatically be added to the eclipse project . Earlier versions of m2eclipse http : m2eclipse.sonatype.org used the configuration block of the maven-eclipse-plugin and also let you activate natures and builders using the same mechanisms . This seems to no longer be the case because a I can t find any reference to maven-eclipse-plugin in the m2eclipse sources and b it just doesn t work : - .. . .. . So this is my question : is there any way to configure the eclipse project generated by m2eclipse from the pom.xml Specifically : project builders and natures but I d be interested in other options as well . .. . Answer : Project configurators are the proposed approach . But the latest version of m2e-extensions is from early 2010 and developed against m2eclipse 0.10.x . There is a successor project called m2e-code-quality which is more recent and active and developed against m2eclipse 0.12.x . But neither m2e-extensions nor m2e-code-quality do support FindBugs at the moment . And there are some other limitations with header-files exclusions and modified JARs http : enterprise-it-solutions.blogspot.com 2011 02 m2e-extensions-project-configurator-pmd.html . I have successfully used a universal approach with AntRun Ant and XMLTask http : enterprise-it-solutions.blogspot.com 2011 03 settings-eclipse-project-antrun-maven.html to automatically add project natures builders and configuration-files for Eclipse plugins from pom.xml . Comment : Thanks for your feedback +1", "Question : Note : I didn t get any response in the first version of this question so I modified it to be more generic.. . .. . .. . Context .. . .. . My project is divided into several maven modules and several web-applications . Here is the structure : .. . .. . All the web-applications share common resources such as JS CSS and images files . Instead of duplicating these resources in each web-app-X I decided to create another project called web-resources which is a WAR project . The structure is then the following one : .. . .. . .. . .. . Maven .. . .. . In Maven 2 or Maven 3 as I just migrated my project to maven 3.0.2 this configuration is easy to manage as all web-app-X declare web-resources as a dependency : .. . .. . So when I build my WAR project it first get the web-resources.war built just before unzip it and build on top of it the web-app-X web-application . This way my WAR file will contains also a directory called web-resources that contains the shared resources . This is the war overlay principle . So on a Maven point of view everything is fine .. . .. . Eclipse .. . .. . Now here comes the main problem : having a good Eclipse configuration . Question : How can I use my current configuration to be managed correctly by Eclipse In particular when I deploy any web-app-X in Tomcat using Eclipse.. . Note that I want to get the more automatizable configuration and avoid any manual steps as this configuration should be used by dozens of developers.. . .. . .. . For me the best solution seems to use the linked resources of Eclipse . Thus I set the following configuration in my web-app-X pom.xml : .. . .. . When I run the mvn eclipse : eclipse configuration it adds succesfully this information in my .project file : .. . .. . Now I import my project in Eclipse . Problem : in Project properties Java Build Path Source I don t see the Link Source present . I only see my four Maven default directories src main java src main resources src test java and src test resources . What is strange is that when I try to manually add the linked resources it refuses and says that it already exists.. . So when I deploy my web application on my Tomcat in Eclipse it does not deploy the web resources directory and thus I don t get the CSS JS images deployed . After some tests it seems that I have to do two modifications : .. . .. . 1 . Add the line classpathentry kind src path web resources output src main webapp web resources in my .classpath file .. . 2 . Remove the project preclosing-web-resources project in the .project file . Note that using this configuration Eclipse will copy and keep synchronization the content of web resources project in my web-app-X src main webapp web resources but this is not a problem this directory is ignored by the SCM . The only automated solution I found was to create a simple Maven plugin that do the two previous modification and then run the following command or use a .bat file : .. . .. . .. . .. . Question .. . .. . Is there a better way to manage such configuration .. . .. . Technical information .. . .. . Java 6 Maven 3.0.2 maven-eclipse-plugin 2.8 Eclipse 3.3.2 but I can test with newer version of Eclipse no m2eclipse plugin . .. . Answer : You might want to take a look at this blog post . It covers a method for sharing resources using maven : .. . .. . http : www.sonatype.com people 2008 04 how-to-share-resources-across-projects-in-maven", "Question : I have spent all day on the Maven site reading the 5- and 30-minute tutorials and trialing Maven out for the first time . I want to install a Maven plugin and use it to start building Maven projects from Eclipse . Despite an honest effort I have been unable to find a comprehensive tutorial on any Maven plugin . M2E which seems like the de facto standard has nothing but broken or recursive links on their site . I can t tell if I even installed the plugin correctly or how to use it . Does anyone know of a good step-by-step guide to M2E or any other plugin One that comes with good installation documentation along with a solid explanation of its features and proper uses I can t be the only developer who has ever had this frustration . Either that or I am looking in all the wrong places.. . Comment : I m in the same boat glad you posted this question. . I see this was a few days ago. . where you able to get it working I already installed maven on my machine but I haven t been able to install the plugin yet . Comment : If you use Eclipse Juno J2EE m2e is already included . .. . Answer : Tried every stuff but this one worked . . 1 . Eclipse - Help - Install New Software . 2 . Type http : download.eclipse.org releases indigo Hit Enter . 3 . Expand Collaboration tag . 4 . Select Maven plugin from there . 5 . Click on next . 6 . Accept the agreement click finish . After installing the maven it will ask for restarting the Eclipse So restart the eclipse again to see the changes . Thanks Mukesh for Guiding . Comment : I liked this option as it will automatically List out the compatible m2e version for the eclipse we are using.Earlier I was trying to get the latest m2e plug-in for juno..but it was giving exception while installing" ] }
[ "yes-answer-long", "yes-answer-short" ]
ide
UNK_RELATION
defaulttreemodel@default@45
defaulttreemodel -- a defaulttreemodel is a @placeholder implementation for displaying jtree data in java swing .
{ "confidence": [ 44.007545471191406, 39.353294372558594, 39.244895935058594, 37.28314971923828, 36.89106750488281, 33.894508361816406, 31.969970703125, 31.224454879760742, 30.887210845947266, 30.048126220703125, 28.5523624420166, 27.92192840576172, 27.020057678222656, 27.01095199584961, 26.72160530090332, 25.71739959716797, 25.71739959716797, 25.284107208251953, 25.244823455810547, 24.502925872802734, 24.502925872802734, 24.350006103515625, 23.437015533447266, 23.437015533447266, 23.20765495300293, 23.20765495300293, 21.993181228637695, 21.993181228637695, 21.993181228637695, 21.993181228637695, 21.993181228637695, 21.993181228637695, 21.981435775756836, 21.368179321289062, 21.2628173828125, 21.2628173828125, 21.2628173828125, 21.2628173828125, 21.07701873779297, 20.88768196105957, 20.75145721435547, 20.43301010131836, 20.208166122436523, 20.146411895751953, 20.072534561157227, 20.048343658447266, 20.048343658447266, 20.048343658447266, 20.048343658447266, 20.048343658447266, 20.048343658447266, 20.048343658447266, 19.780487060546875, 19.39909553527832, 19.352458953857422, 18.88442611694336, 18.858060836791992, 18.739376068115234, 18.56601333618164, 18.283397674560547, 18.26891326904297, 17.95001220703125, 17.889732360839844, 17.835046768188477, 17.52490234375, 17.52490234375, 17.488603591918945, 17.428844451904297, 16.06932258605957, 15.358785629272461, 15.313493728637695, 14.807252883911133, 14.76521110534668, 14.619210243225098, 14.01897144317627, 13.95639419555664, 13.95639419555664, 13.903205871582031, 13.714913368225098, 13.65570068359375, 13.316924095153809, 13.307448387145996, 13.163630485534668, 13.163630485534668, 13.163630485534668, 13.163630485534668, 13.058277130126953, 13.050440788269043, 12.903343200683594, 12.095157623291016, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289, 12.021280288696289 ], "content": [ "I create tree with DefaultTreeModel .. . .. . Where root is a MutableTreeNode implementation .", "I am working on a swing based application that uses a JTable with a DefaultTreeModel and a lot of models on top of it .", "Client app removes all nodes from the DefaultTreeModel .", "I reload the DefaultTreeModel after reading the file but it doesn t work .", "In DefaultTreeModel http : docs.oracle.com javase 7 docs api javax swing tree DefaultTreeModel.html you can insert a node using the insertNodeInto methods .", "So could someone please explain if it is necessary to call nodesWereInserted and similar methods in DefaultTreeModel", "I have an application which contains a JTree backed with a DefaultTreeModel that is used to display a hierarchy of files which reflects a section of the file system on my server I will refer to this as my client app .", "I am using a custom tree model extends DefaultTreeModel and reacting in the DBTreeEvent.STRUCTURE CHANGED event to handle this .", "The default JTree http : docs.oracle.com javase 7 docs api javax swing JTree.html JTree 28 29 constructor Returns a JTree with a sample model .", "Problem in next you create your JTree like this JTree tree new JTree according to docs http : docs.oracle.com javase 7 docs api javax swing JTree.html JTree 28 29 it has sample nodes .", "In order to do this I expected to be able to do Kryo.register DefaultTreeModel .class and send then when I need to update the JTree all I would have to do would be server.sendToAllTCP this.treeModel but when I attempt to do that Kryonet gives a series of errors requesting that I register all the classes used by TreeModel .", "I would then create a custom TreeModel probably from the DefaultTreeModel which provided a makeDirectory method which you would pass the currently selected TreeNode and the name of the directory .", "I have a JTree which needs to be populated as the data is being loaded .", "I am new to java swing but not to java programming .", "Using the documentation of JTree : http : docs.oracle.com javase 7 docs api javax swing JTree.html .", "JTree implements a Model View pattern .", "it will be used for a JTree and nodes will be files and folders .", "I want to modify the standard JTree in Swing example as given in this link - Dynamic Tree Example http : www.java2s.com Tutorial Java 0240 Swing DynamicTree.htm A screenshot of the app is below : DynamicTreeDemo http : i.stack.imgur.com BiEbH.png .. . .. .", "I wrote this code in JTree but when I run the program JTree just shows the last fList .", "I read a JTree from a file .", "How you create your JTree", "How can I create a JTree using data from a .txt file", "The problem I am facing is with the tree model of the JTree .", "I need to be able to edit jTree contents at runtime .", "I have a Jtree With two top children Say A and B .", "Currently the code is designed to show both in the same panel as they are part of a shared JTree .", "I am trying to synchronize a client s JTree with a server s version .", "I created a form with default NetBeans edito and put a jTree on it .", "Don t forget to also remove the WindowListener when the JTree is removed from a window .", "Shall I still have one JTree or 2 JTrees", "I am trying to create a JTree I can edit later .", "That s simply because the JTree doesn t use your model .", "Use this to create the relevant nodes of your Jtree .", "@Abhishekkumar well I know how to hard code the JTree by adding nodes one by one but that is bad programming practice - programming to implementation as opposed to programming to an interface .", "Is there anything tha I can add to the code so that JTree display all of them", "I have successfully created a small program that will display the file system contents in a JTree .", "This method would then be responsible for the physical creation of the directory and notification of the structural changes to the JTree via the nodesWereInserted method .", "Now the Jtree has a complicated update system and there are ways of A members automatically entering B vice versa etc .", "Please refer to the example to see what these objects are Is there any way to get the Jtree to store only one object containing data from corresponding nodes of each tree but to display these data on separate trees", "You can read more about JTree in java tutorial How to Use Trees http : docs.oracle.com javase tutorial uiswing components tree.html .", "How can I get a JTree http : docs.oracle.com javase 7 docs api javax swing JTree.html to only listen to its TreeModel http : docs.oracle.com javase 7 docs api javax swing tree TreeModel.html while it is actually visible to the user or at least to have it unregister itself as soon as the corresponding JFrame http : docs.oracle.com javase 7 docs api javax swing JFrame.html is disposed", "docs http : docs.oracle.com javase 7 docs api java awt Container.html removeAll 28 29 .. . .. . Read tutorial for JTree http : docs.oracle.com javase tutorial uiswing components tree.html", "I know I can access the relevant data using : .. . .. . but is there a way of displaying A and its sub-children in one panel and B in another", "So my question is : How can I restore the expansion state of my JTree so that the GUI remains the same before and after a data model update", "You can have a look at the example shared here : stackoverflow.com questions 13142290 http : stackoverflow.com questions 13142290 easiest-way-to-clone-a-whole-jtree-treemodel", "The other option for me is to extract all the individual objects in the JTree and send them separately which is inefficient and time consuming .", "Even if I do jTree1.removeAll everything is still there.. . and non of my code for adding new items to the jTree working .", "I guess the best way would be to create a new class extending JTree that does the registering to and unregistering from the model .", "Oops of course I meant JTree not JTable I ll edit my question thanks", "JTree has a protected field called treeModelListener which you can remove from the model directly using JTreeModelListener.removeTreeModelListener .", "Whenever the JTree is added to a new window you can add a WindowListener unregisterOrWhatever when the window is closed .", "Can I get this to work using only one Jtree object in each DynamicTree object", "It just seems that calling a method to notify of a change called by another method is somewhat inconsistent with how Java Swing is designed I don t call an elementIsInserted method when I add an element to a JComboBox .", "If you want to remove your tree model from its own listener at will extend JTree and add the following method : .. . .. . If you want to get fancy with listening for window closing events add a HierarchyListener to your JTree which listens for HierarchyEvent.PARENT CHANGED events .", "Compound JTree Node allowing events to pass-through to objects underneath http : stackoverflow.com questions 10264469 compound-jtree-node-allowing-events-to-pass-through-to-objects-underneath .. . .. . I went through the answer by @Jakub Zaverka which was pretty lucid.But what I could not understand is where is the code to create tree nodes JTree food sports colors .", "Could you please explain with an example since I am new to swing .", "As far as I can see the only case a JTree unregisters itself from its model is if you pass it a new model using setModel .", "Also if you want to share the nodes of TreeA Tree B with thier root trees and MyTree then you can visit the link : stackoverflow.com questions 3849530 http : stackoverflow.com questions 3849530 sharing-children-among-parents-in-a-jtree", "The values you see are contained in the source http : grepcode.com file repository.grepcode.com java root jdk openjdk 6-b14 javax swing JTree.java JTree.getDefaultTreeModel 28 29 .", "is there real reason to recreating whole DefaultTreeModel not if yes then all notifiers expired are gone aways this code doesn t inserted a new XxxNode on proper coordinated have to override TreeModelListener and to store last path in variable after recreating model and iterating into new model then to expand corresponding path notice don t to confuse users lets that for users action notify them about changes", "Either way the results turn out the same with the node being added to the tree and displaying in the GUI .", "@fge No it s just a Java application .", "The real crux of the issue is displaying the tree in the expanded state .", "Implement your own TreeModel http : docs.oracle.com javase 7 docs api javax swing tree TreeModel.html which supports filtering", "If I create a Node extending JPanel having a JButton and JLabel as fields can I set the node using the constructor of JTree which would be rendered and edited by the same custom-renderer and editor .", "So even if the JTree is not visible anymore it is still kept in memory by the model which still needs to get updates from the WatchService although none of this is necessary any longer .", "I dont know much about java .", "Swing doesn t seem to play nice with my tree state for some reason .", ".. . .. . These are a few of the things that I have tried : .. . .. . I found a thread http : stackoverflow.com questions 6252462 jtree-lazy-load-expand with a similar setup to mine and his problem was solved by overriding equals and hashCode but that did not work for me .", "Added Implementation code its working fine for now but am not sure if this is the smarter approach .", "Next I use a common data object with this contains basic information about the data that should be shown by the tree s.. .", "We optimize our models to improve the performance but we hit a problem from java core .", "When the data I need to show is changed or added a listener is triggered which calls .. . .. . Debugger shows that insert is called but tree itself doesn t reflect the change .", "There is a github project for creating TreeModels from a Collection of data if that helps .", "New data is uploaded to the server .. . 2 .", "You should be able to use a single TreeModel for both trees having each one render the node data differently.. .", "Finally I use two different TreeCellRenderer s to render different aspects of the data maintained by the TreeModel .. . .. .", "I actually knew what to do in theory but I didn t know the implementation details .", "Example : I implemented a TreeModel using a WatchService http : openjdk.java.net projects nio javadoc java nio file WatchService.html to have an always up to-date model of a file system tree .", "Then I use DefaultTreeModel.insertNodeInto for each the returned data files .", "I couldn t find a concrete example online and I guess I was just being too lazy to think and come up with the implementation .", "In your current approach you are creating a new DefaultMutableTreeNode whenever getChild is called this could cause issues if parts of the API are relying on those references remaining constant for the given position data this would require you to maintain some kind of internal cache linking the File with the TreeNode ...which kind of defeats the purpose.. . .. . .. . A better approach might be to utilising the existing mutable tree node API each node would still be responsible for a single File but it would also cache the results .", "It takes our source data Collection and a Hierarchy description and bingo .", "Server app archives this data and populates a database with information about the uploaded files .", "Server app notifies client app that new data was uploaded .", "Client app requests data from the server starting with the root node .", "My problem comes when new data is uploaded to the server and I want to update the tree to not only include the new data but also to set the expansion state and selected node to what it was prior to updating the tree so that the user is not jerked around on the tree just because there is new data to view .", "In this example we use BufferedReader http : docs.oracle.com javase 6 docs api java-io BufferedReader.html in conjunction with InputStreamReader http : docs.oracle.com javase 1.4.2 docs api java-io InputStreamReader.html OR FileReader http : docs.oracle.com javase 1.4.2 docs api java-io FileReader.html depending on whether we are reading the .txt file as a resource or from the File System respectively .", "I know that my call to expandPath is working because I can see the request for data sent from the client and the response with data from the server for each call to expandPath .", "I also have a server application which provides the data that my client app needs to display I will refer to this as my server app .", "If I call reload the tree is drawn but it also collapses all the nodes .", "The model is changing and nodes are added correctly .", "What it is I am missing", "please why deosn t works no idea about any issue about are you tested if TreeModelEvent notified about insertXxx otherwise post an SSCCE short runnable compilable with harcoded value for node s or TreeModel", "and before any code here to test tree.makeVisible path.pathByAddingChild newNode and then tree.scrollRectToVisible tree.getPathBounds path.pathByAddingChild newNode", "tree.makeVisible path solves my problem .", "Thanks .", "no way : - not this not solve something : - node is added correctly but off screen", "However I noticed that there also exists the nodesWereInserted method that has this very terse Javadoc : .. . .. . Invoke this method after you ve inserted some TreeNodes into node .", "I find it very strange that this is a public-method ." ] }
{ "confidence": [ 50.97627258300781, 50.55376052856445, 50.55376052856445, 50.205474853515625, 50.0818977355957, 48.14558792114258, 46.583351135253906, 40.863094329833984, 36.81362533569336, 35.92843246459961, 35.14356994628906, 34.35368347167969, 34.340087890625, 34.337127685546875, 31.789024353027344, 29.43846893310547, 29.179153442382812, 26.85028076171875, 26.249874114990234, 26.237136840820312 ], "content": [ "Question : I read a JTree from a file . I want to show it in my JPanel . I reload the DefaultTreeModel after reading the file but it doesn t work . Read the file for loading DynamicTree .. . .. . The SetTree4load address method is : .. . .. . Thanks in advance : Comment : See also the related example discussed here http : stackoverflow.com q 11841117 230513 and here http : stackoverflow.com q 14354131 230513 . .. . Answer : Instead of changing the tree . Try to set the model and the datamodel from the loaded tree to the panel tree", "Question : In DefaultTreeModel http : docs.oracle.com javase 7 docs api javax swing tree DefaultTreeModel.html you can insert a node using the insertNodeInto methods . However I noticed that there also exists the nodesWereInserted method that has this very terse Javadoc : .. . .. . Invoke this method after you ve inserted some TreeNodes into node . I find it very strange that this is a public-method . I would expect that if it were to fire off ChangeEvents to listeners that it ought to be a private method that is called by insertNodeInto . It just seems that calling a method to notify of a change called by another method is somewhat inconsistent with how Java Swing is designed I don t call an elementIsInserted method when I add an element to a JComboBox . But I discovered that in my code that it doesn t matter if I call nodesWereInserted after insertNodeInto . Either way the results turn out the same with the node being added to the tree and displaying in the GUI . So could someone please explain if it is necessary to call nodesWereInserted and similar methods in DefaultTreeModel And if so why What does it do that insertNodeInto can t do on its own Comment : As the Javadoc says that insertNodeInto calls nodesWereInserted it s hard to see why you re surprised when it happens . Comment : @EJP looks like I had a case of tunnel vision then . I was so focused on the Javadoc for that method that I didn t even consider looking at the other method I wanted to call . Although I m still confused why nodesWereInserted is a public-method then if the only way to insert a node is to use insertNodeInto . Subclassing maybe .. . Answer : You don t need to call it by yourself . As EJP said it s called every time when a node is inserted . You can override this function in your derived-class to get signaled when a node is inserted . If you do not have your own derived classHowever you just add a TreeModellistener .", "Question : In DefaultTreeModel http : docs.oracle.com javase 7 docs api javax swing tree DefaultTreeModel.html you can insert a node using the insertNodeInto methods . However I noticed that there also exists the nodesWereInserted method that has this very terse Javadoc : .. . .. . Invoke this method after you ve inserted some TreeNodes into node . I find it very strange that this is a public-method . I would expect that if it were to fire off ChangeEvents to listeners that it ought to be a private method that is called by insertNodeInto . It just seems that calling a method to notify of a change called by another method is somewhat inconsistent with how Java Swing is designed I don t call an elementIsInserted method when I add an element to a JComboBox . But I discovered that in my code that it doesn t matter if I call nodesWereInserted after insertNodeInto . Either way the results turn out the same with the node being added to the tree and displaying in the GUI . So could someone please explain if it is necessary to call nodesWereInserted and similar methods in DefaultTreeModel And if so why What does it do that insertNodeInto can t do on its own Comment : As the Javadoc says that insertNodeInto calls nodesWereInserted it s hard to see why you re surprised when it happens . Comment : @EJP looks like I had a case of tunnel vision then . I was so focused on the Javadoc for that method that I didn t even consider looking at the other method I wanted to call . Although I m still confused why nodesWereInserted is a public-method then if the only way to insert a node is to use insertNodeInto . Subclassing maybe .. . Answer : Imagine that your TreeModel uses an independent real tree and some nodes are inserted by separate process which is not aware of the model existing . Or two TreeModels use the same tree of objects nodes . The process just adds children to some nodes . Or you insert node in the first model but also have to update the second . Then you somehow should update model . In this case you use nodesWereInserted and you need public-method to be called from outside the model . Of couse if you call insertNodeInto the nodesWereInserted is called inside", "Question : null .. . Answer : I am trying to synchronize a client s JTree with a server s version . In order to do this I expected to be able to do Kryo.register DefaultTreeModel .class and send then when I need to update the JTree all I would have to do would be server.sendToAllTCP this.treeModel but when I attempt to do that Kryonet gives a series of errors requesting that I register all the classes used by TreeModel . However registering all the required classes then results in some internal error with Kryonet . My question is this : what is the best way to send a TreeModel to a client Or is there even a way to do this The other option for me is to extract all the individual objects in the JTree and send them separately which is inefficient and time consuming .", "Question : I have an application which contains a JTree backed with a DefaultTreeModel that is used to display a hierarchy of files which reflects a section of the file system on my server I will refer to this as my client app . I also have a server application which provides the data that my client app needs to display I will refer to this as my server app . I am using a lazily load children approach so that I only have to load files into my tree if the user is interested in them . Lazy load approach : .. . .. . 1 . I override treeWillExpand TreeExpansionEvent evt .. . 2 . I set the selection path to be that of the expanding node . 3 . Then I send a message to the server asking for the children of that node . 4 . When the server responds I get the last selected path component . 5 . Then I use DefaultTreeModel.insertNodeInto for each the returned data files . 6 . Finally I call DefaultTreeModel.nodeStructureChanged . The above works fine and I am not having any issues with lazily loading the children . My problem comes when new data is uploaded to the server and I want to update the tree to not only include the new data but also to set the expansion state and selected node to what it was prior to updating the tree so that the user is not jerked around on the tree just because there is new data to view . The flow is as follows : .. . .. . 1 . New data is uploaded to the server .. . 2 . Server app archives this data and populates a database with information about the uploaded files . 3 . Server app notifies client app that new data was uploaded . 4 . Client app saves the expansion state of the tree using JTree.getExpandedDescendants .. . 5 . Client app saves the selection path of the tree using JTree.getSelectionPath .. . 6 . Client app removes all nodes from the DefaultTreeModel . 7 . Client app requests data from the server starting with the root node . 8 . Client app traverses the tree path enumeration returned from JTree.getExpandedDescendants calling JTree.expandPath on each TreePath in the enumeration . 9 . Client app sets the selected tree path . My problem is that no matter what I try the tree s GUI is not updated to reflect the expansion state . I know that my call to expandPath is working because I can see the request for data sent from the client and the response with data from the server for each call to expandPath . I also display information about the currently selected node in another window and it is showing the correctly selected node . But alas to my disappointment the GUI only displays the root node expanded and it s children not expanded instead of the previous expanded state . So my question is : How can I restore the expansion state of my JTree so that the GUI remains the same before and after a data model update .. . .. . These are a few of the things that I have tried : .. . .. . I found a thread http : stackoverflow.com questions 6252462 jtree-lazy-load-expand with a similar setup to mine and his problem was solved by overriding equals and hashCode but that did not work for me . Various methods to invoke expansion such as : setExpandsSelectedPaths true nodeStructureChanged JTree.invalidate .. . Many different variations on saving the expansion state however I don t believe the expansion state is incorrect as I can see the correct data being passed back and forth between the client app and the server app . Here is my SSCCE : .. . .. . Thanks in advance for any help you can provide . P.S . This is my first question so please let me know if I am asking properly and take it easy on me . Comment : Wow +1 for lots of useful info upfront I suspect that you re going to have to reconstruct a tree path using the new nodes based off the old nodes . I assume you have some way to identifing each node Generate a simple String for example that represents all the expanded paths . When you come to update the tree using these String paths build new tree paths from the available nodes.. . Comment : The FileTreeModel cited here http : stackoverflow.com a 14837208 230513 may simplify your code if not eliminate the problem . Comment : @trashgod The FileTreeModel won t work for me as my nodes are custom objects that have information about the file as well as application specific information . Also my client app doesn t have direct access to these file as the reside on the server . Comment : @MadProgrammer My problem isn t building the paths that seems to be working . The real crux of the issue is displaying the tree in the expanded state . Swing doesn t seem to play nice with my tree state for some reason . Comment : is there real reason to recreating whole DefaultTreeModel not if yes then all notifiers expired are gone aways this code doesn t inserted a new XxxNode on proper coordinated have to override TreeModelListener and to store last path in variable after recreating model and iterating into new model then to expand corresponding path notice don t to confuse users lets that for users action notify them about changes .. . Answer : I am using a custom tree model extends DefaultTreeModel and reacting in the DBTreeEvent.STRUCTURE CHANGED event to handle this . This is what I do to preserve the old state . Not sure if it will help you or not. .", "Question : null .. . Answer : I have a JTree which needs to be populated as the data is being loaded . I create tree with DefaultTreeModel .. . .. . Where root is a MutableTreeNode implementation . When the data I need to show is changed or added a listener is triggered which calls .. . .. . Debugger shows that insert is called but tree itself doesn t reflect the change . If I call reload the tree is drawn but it also collapses all the nodes . The model is changing and nodes are added correctly . What it is I am missing Comment : please why deosn t works no idea about any issue about are you tested if TreeModelEvent notified about insertXxx otherwise post an SSCCE short runnable compilable with harcoded value for node s or TreeModel Comment : and before any code here to test tree.makeVisible path.pathByAddingChild newNode and then tree.scrollRectToVisible tree.getPathBounds path.pathByAddingChild newNode Comment : tree.makeVisible path solves my problem . Thanks . Comment : no way : - not this not solve something : - node is added correctly but off screen", "Question : In DefaultTreeModel http : docs.oracle.com javase 7 docs api javax swing tree DefaultTreeModel.html you can insert a node using the insertNodeInto methods . However I noticed that there also exists the nodesWereInserted method that has this very terse Javadoc : .. . .. . Invoke this method after you ve inserted some TreeNodes into node . I find it very strange that this is a public-method . I would expect that if it were to fire off ChangeEvents to listeners that it ought to be a private method that is called by insertNodeInto . It just seems that calling a method to notify of a change called by another method is somewhat inconsistent with how Java Swing is designed I don t call an elementIsInserted method when I add an element to a JComboBox . But I discovered that in my code that it doesn t matter if I call nodesWereInserted after insertNodeInto . Either way the results turn out the same with the node being added to the tree and displaying in the GUI . So could someone please explain if it is necessary to call nodesWereInserted and similar methods in DefaultTreeModel And if so why What does it do that insertNodeInto can t do on its own Comment : As the Javadoc says that insertNodeInto calls nodesWereInserted it s hard to see why you re surprised when it happens . Comment : @EJP looks like I had a case of tunnel vision then . I was so focused on the Javadoc for that method that I didn t even consider looking at the other method I wanted to call . Although I m still confused why nodesWereInserted is a public-method then if the only way to insert a node is to use insertNodeInto . Subclassing maybe .. . Answer : We can have our own custom tree node which is doing some processing . Say we want to check if the new node is eligible for being inserted . We add a new child to this custom tree node with the DefaultMutableTreeNode.insert method . At this point we need to inform the model about the insertion by calling the DefaultTreeModel.nodesWereInserted method . If the modifications are too complex it might be necessary to call the DefaultTreeModel.reload method . If we do not have any custom processing in a our own tree node then we can just add a new node by calling DefaultTreeModel.insertNodeInto . Comment : it might be necessary to call the DefaultTreeModel.reload not to use proper models notifiers but depends of structure because is possible to create an ZOO", "Question : null .. . Answer : I am working on a swing based application that uses a JTable with a DefaultTreeModel and a lot of models on top of it . We optimize our models to improve the performance but we hit a problem from java core . Every time a node is inserted in the table the resetRowSelection method is called . If we have 3000 rows in the table and then we insert another 3000 we simply cannot select another rows meanwhile the rows are inserted because the selection is keep jumping . Bellow is the stack-trace that I suspect is guilty for this behavior . I tried different solutions but I couldn t find one that doesn t affect the functionality too . I also tried to fire this method fireTreeNodesInserted on batches for 100 rows but with no effect . Does anyone know how you can keep the selection working while you are inserting rows in a table Comment : for better help sooner post an SSCCE MCVE short runnable compilable http : stackoverflow.com q 8843638 714968 have to decide if is JTrees view inside JTable final and good solution because there are a few good free attempts about JTreeTable and non free by Jide and another but I think that Jide is top of", "Question : How can I get a JTree http : docs.oracle.com javase 7 docs api javax swing JTree.html to only listen to its TreeModel http : docs.oracle.com javase 7 docs api javax swing tree TreeModel.html while it is actually visible to the user or at least to have it unregister itself as soon as the corresponding JFrame http : docs.oracle.com javase 7 docs api javax swing JFrame.html is disposed As far as I can see the only case a JTree unregisters itself from its model is if you pass it a new model using setModel . This causes the tree not being garbage collected if the model is referenced from somewhere else . Example : I implemented a TreeModel using a WatchService http : openjdk.java.net projects nio javadoc java nio file WatchService.html to have an always up to-date model of a file system tree . Even a single listener on the model requires me to keep the WatchService informing the model about file system changes so it cannot be garbage collected . So even if the JTree is not visible anymore it is still kept in memory by the model which still needs to get updates from the WatchService although none of this is necessary any longer . I guess the best way would be to create a new class extending JTree that does the registering to and unregistering from the model . If so which methods are called when the component is shown or disposed Probably addNotify and removeNotify are good candidates Comment : TreeModel You must have a customized table to begin with.. . JTables have TableModel . Comment : Oops of course I meant JTree not JTable I ll edit my question thanks : -P .. . Answer : Using the documentation of JTree : http : docs.oracle.com javase 7 docs api javax swing JTree.html . JTree has a protected field called treeModelListener which you can remove from the model directly using JTreeModelListener.removeTreeModelListener . If you want to remove your tree model from its own listener at will extend JTree and add the following method : .. . .. . If you want to get fancy with listening for window closing events add a HierarchyListener to your JTree which listens for HierarchyEvent.PARENT CHANGED events . Whenever the JTree is added to a new window you can add a WindowListener unregisterOrWhatever when the window is closed . Don t forget to also remove the WindowListener when the JTree is removed from a window .", "Question : I created a form with default NetBeans edito and put a jTree on it . It somehow then creates bunch of elements such as colors sports food in there . But it is not in the creation code . Where is it coming from and how can I edit it.. . Even if I do jTree1.removeAll everything is still there.. . and non of my code for adding new items to the jTree working . I need to be able to edit jTree contents at runtime . Comment : How you create your JTree what do you want to do not clear . Comment : I use form builder in NetBeans I just dropped it on the form in this visual editor . I didn t do anything beyond that . .. . Answer : Problem in next you create your JTree like this JTree tree new JTree according to docs http : docs.oracle.com javase 7 docs api javax swing JTree.html JTree 28 29 it has sample nodes . Add next lines after you create your nodes root child1 child2 and all will be work : .. . .. . Also you needn t to call jTree1.removeAll it is used for other purposes . docs http : docs.oracle.com javase 7 docs api java awt Container.html removeAll 28 29 .. . .. . Read tutorial for JTree http : docs.oracle.com javase tutorial uiswing components tree.html Comment : Oh . Now it makes sense . Thank you for explainin", "Question : Compound JTree Node allowing events to pass-through to objects underneath http : stackoverflow.com questions 10264469 compound-jtree-node-allowing-events-to-pass-through-to-objects-underneath .. . .. . I went through the answer by @Jakub Zaverka which was pretty lucid.But what I could not understand is where is the code to create tree nodes JTree food sports colors . Could someone explain how the nodes are created . If I create a Node extending JPanel having a JButton and JLabel as fields can I set the node using the constructor of JTree which would be rendered and edited by the same custom-renderer and editor . Comment : @Jakub Zaverka : Perhaps you would be the best person to answer the question.I would have commented my doubts on the original thread but my privilege to comment on others post is yet to unlock.Apologies for that .. . Answer : The default JTree http : docs.oracle.com javase 7 docs api javax swing JTree.html JTree 28 29 constructor Returns a JTree with a sample model . To get the sample model the constructor invokes the protected method getDefaultTreeModel which returns a sample model that is Used primarily for beanbuilders to show something interesting . The values you see are contained in the source http : grepcode.com file repository.grepcode.com java root jdk openjdk 6-b14 javax swing JTree.java JTree.getDefaultTreeModel 28 29 . A related example is seen here http : stackoverflow.com a 15738813 230513 .", "Question : I have successfully created a small program that will display the file system contents in a JTree . It shows only folders and plain text-files by design . I would now like to add a folder to the tree when it is created . The example program will display the tree and create a folder but it will not insert a new node for the folder that was just created . How can I insert a node into the tree when a folder is created and have the tree display the new folder Many thanks This class creates and displays the tree . This class is the tree model . This last class is the tree cell renderer . Comment : As a second problem - One problem per question please.. . Comment : I believe the two problems are related . I think the second problem is caused by the first . Comment : I don t know I see distinct questions but that s me.. . Comment : OK I just changed it to focus on a single problem . Comment : There seems to be a disconnection between where you want to insert the new node and where the model thinks it resides this is caused by the fact that rather than actually modelling the file system you are continuously reading from it . .. . Answer : There seems to be a basic mismatch of approaches . You are using DefaultMutableTreeNode s which cache there child nodes but are managing the actual nodes directly via the model this is causing confusion at multiple different levels.. . If you want to continue monitoring the disk contents directly or proxying it I would create a custom TreeNode whose sole responsibility was to monitor a single directory . I would then create a custom TreeModel probably from the DefaultTreeModel which provided a makeDirectory method which you would pass the currently selected TreeNode and the name of the directory . This method would then be responsible for the physical creation of the directory and notification of the structural changes to the JTree via the nodesWereInserted method . I d probably have this node return an instance a TreeNode which represented the child.. . There are a lot of problems with this approach namly with the referencing of objects . In your current approach you are creating a new DefaultMutableTreeNode whenever getChild is called this could cause issues if parts of the API are relying on those references remaining constant for the given position data this would require you to maintain some kind of internal cache linking the File with the TreeNode ...which kind of defeats the purpose.. . .. . .. . A better approach might be to utilising the existing mutable tree node API each node would still be responsible for a single File but it would also cache the results . The problem here is managing when a node should be populated as you don t want to populate directory nodes that are not expanded . I you are planning on utilising the Watch Service API then I would go for the mutable tree node API and cache the child files within it as you need to it will simply the issues.. . Comment : You ve given me a lot to think about I will try your suggestion and see how it goes . I may be back with more questions . Thanks", "Question : I have a Jtree With two top children Say A and B . Currently the code is designed to show both in the same panel as they are part of a shared JTree . What I want to do is seperate A and Binto two different panels . Now the Jtree has a complicated update system and there are ways of A members automatically entering B vice versa etc . and I don t really want to have two seperate JTrees . I know I can access the relevant data using : .. . .. . but is there a way of displaying A and its sub-children in one panel and B in another if no I guess I will have to resort to creating myTree A and myTree B which will track myTree . What is the neatest and msot efficient way of doing this Update : .. . .. . So I opted for creating two separate trees . I however have a small problem when I root A.add A and root B.add B in my two new trees where root A and root B are myTreeA and myTreeB s roots respectively A and B are detached from myTree s root and I can no longer hook the elements of myTreeA B to the original myTree and call the relevant routines . Any way of telling myTreeA and myTreeB to track A and B without deleting their parent In other words can I share models nodes between trees Comment : Implement your own TreeModel http : docs.oracle.com javase 7 docs api javax swing tree TreeModel.html which supports filtering Comment : It s legacy code and I would like to avoid that . Comment : you can implement your own tree model as a wrapper for the old model which additionally provides filtering . .. . Answer : The neatest way will be to create two separate trees so that models attach to A and B can be easily updated and reflected easily . Comment : see the updated question . Comment : Why would you like to make myTree as parent of TreeA and TreeB instead of Root A and Root B Also if you want to share the nodes of TreeA Tree B with thier root trees and MyTree then you can visit the link : stackoverflow.com questions 3849530 http : stackoverflow.com questions 3849530 sharing-children-among-parents-in-a-jtree Comment : I made no mention of a parent-child relationship . I want them to share the same same model as the parent tree . That s not exactly the same thing is it Comment : No that was if you want to share the nodes between trees.and yes you can always share the model between two jtrees . You can have a look at the example shared here : stackoverflow.com questions 13142290 http : stackoverflow.com questions 13142290 easiest-way-to-clone-a-whole-jtree-treemodel", "Question : I want to modify the standard JTree in Swing example as given in this link - Dynamic Tree Example http : www.java2s.com Tutorial Java 0240 Swing DynamicTree.htm A screenshot of the app is below : DynamicTreeDemo http : i.stack.imgur.com BiEbH.png .. . .. . enter image description here http : i.stack.imgur.com 7JHek.jpg .. . .. . I want to use this structure to maintain two trees both having exactly the same structure . I should be able to collapse and expand both simultaneously when either is collapsed expanded by a mouse click Also when user selects a node from either tree the corresponding node in the other tree should get highlighted too . One tree might contain files folders as nodes and the other might have time of creation as nodes . Can I get this to work using only one Jtree object in each DynamicTree object Please refer to the example to see what these objects are Is there any way to get the Jtree to store only one object containing data from corresponding nodes of each tree but to display these data on separate trees Currently I am using two Jtrees and can add nodes by taking two parents and two children as inputs to the add function and adding corresponding child to the corresponding parent . However in the remove expand collapse function I need to remove expand collapse two corresponding nodes from two trees . How do I do this I am new to java swing but not to java programming . So please elucidate the parts requiring knowledge of Jswing . Thanks in advance . Comment : You should be able to use a single TreeModel for both trees having each one render the node data differently.. . Comment : Could you please explain with an example since I am new to swing . Shall I still have one JTree or 2 JTrees Comment : Then the first thing you need to look at is How to use trees http : docs.oracle.com javase tutorial uiswing components tree.html .. . Answer : So the trick is to use a single TreeModel link the tree s SelectionModel s and two custom TreeCellRenderer s and use a TreeExpansionListener capable of determine which tree expanded collapsed and mirror the results . Basically each tree shares the same TreeModel and SelectionModel this makes life so much simpler as they will both respond to changes that are made to both models . Expansion collapse is a little more difficult as this needs to be handled via a custom TreeExpansionListener which is detects who triggered the event and then notifies the opposite tree of the change . Next I use a common data object with this contains basic information about the data that should be shown by the tree s.. . Finally I use two different TreeCellRenderer s to render different aspects of the data maintained by the TreeModel .. . .. . Tree http : i.stack.imgur.com nniIC.gif .. . .. . See How to Use Trees http : docs.oracle.com javase tutorial uiswing components tree.html for more details Comment : Thanks . Exactly what I needed . Unfortunately I cannot upvote your answer since I do not have sufficient reputation . Edit : There is a problem of synchronisation between the 2 JScrollPanes which I still need to fix . Perfect otherwise .", "Question : I dont know much about java . I wrote this code in JTree but when I run the program JTree just shows the last fList . Is there anything tha I can add to the code so that JTree display all of them JTreeCode is another class in the same package . .. . Answer : JTree implements a Model View pattern . In this pattern you build the entire model first and then you assign it to the tree only once . Multiple assigns of the Model result as you have seen in applying only the last one .", "Question : How can I create a JTree using data from a .txt file The text file is formatted as follows : .. . .. . The .txt file contains over 700 lines . Comment : What you have tried Comment : @Abhishekkumar well I know how to hard code the JTree by adding nodes one by one but that is bad programming practice - programming to implementation as opposed to programming to an interface . So I wanted a smarter way and I came to StackOverflow where I have learnt that it is not a place where someone just does all the hard work for you . You have challenged me to think harder and research widely which led me to the solution . Thank you . .. . Answer : If the txt will have tabular or spaces well formatted you can read the file line by line count the number of spaces and then add the node to the tree as needed . You can read more about JTree in java tutorial How to Use Trees http : docs.oracle.com javase tutorial uiswing components tree.html . But as @Abhishekkumar said what have you tried Why you can t do it Complete your answer and don t make others do your work . Comment : Thanks . I actually knew what to do in theory but I didn t know the implementation details . I couldn t find a concrete example online and I guess I was just being too lazy to think and come up with the implementation .", "Question : How can I create a JTree using data from a .txt file The text file is formatted as follows : .. . .. . The .txt file contains over 700 lines . Comment : What you have tried Comment : @Abhishekkumar well I know how to hard code the JTree by adding nodes one by one but that is bad programming practice - programming to implementation as opposed to programming to an interface . So I wanted a smarter way and I came to StackOverflow where I have learnt that it is not a place where someone just does all the hard work for you . You have challenged me to think harder and research widely which led me to the solution . Thank you . .. . Answer : Just as PhoenixS http : stackoverflow.com users 491245 phoneixs has mentioned in his answer above the procedure involves the following steps : .. . .. . 1 . Read the .txt file line by line . In this example we use BufferedReader http : docs.oracle.com javase 6 docs api java-io BufferedReader.html in conjunction with InputStreamReader http : docs.oracle.com javase 1.4.2 docs api java-io InputStreamReader.html OR FileReader http : docs.oracle.com javase 1.4.2 docs api java-io FileReader.html depending on whether we are reading the .txt file as a resource or from the File System respectively . 2 . Depending on the formatting of the .txt file use the delimiter to determine the hierarchy level of each line as it is being read . Use this to create the relevant nodes of your Jtree . In this case the .txt file is tab-delimited with the number of tabs indicating the hierarchy level . Here is the TreeFromTextFile class I wrote : .. . .. . To test the above I wrote the TreeFromTextFileDemo class which is as shown below : .. . .. . .. . .. . The following screenshot illustrates the output . You can use this file http : pastebin.com 40dAucNS as a sample text file . output of code TreeFromTextFileDemo.java code http : i.stack.imgur.com F48v8.jpg", "Question : How can I create a JTree using data from a .txt file The text file is formatted as follows : .. . .. . The .txt file contains over 700 lines . Comment : What you have tried Comment : @Abhishekkumar well I know how to hard code the JTree by adding nodes one by one but that is bad programming practice - programming to implementation as opposed to programming to an interface . So I wanted a smarter way and I came to StackOverflow where I have learnt that it is not a place where someone just does all the hard work for you . You have challenged me to think harder and research widely which led me to the solution . Thank you . .. . Answer : I had a similar problem and wrote a general builder class for this . It takes our source data Collection and a Hierarchy description and bingo . TreeModel . You can also swap the structure around in real-time . http : stackoverflow.com a 29823595 4824123 .. . .. . Project : https : github.com mnrussell collectionTreeModel .. . .. . Hope this helps", "Question : null .. . Answer : I am trying to create a method that go through all nodes of a path . it will be used for a JTree and nodes will be files and folders . So it must go through the folders as well . Here is my code : .. . .. . Main setup : .. . .. . Search method : .. . .. . So in my method I tied to specify if the node is a folder then go though it and follow the same process . otherwise get the next node and so on . But it does not work . Any idea Comment : If you use Guava you could consider using a TreeTraverser Comment : @fge No it s just a Java application .", "Question : How can I create a JTree using data from a .txt file The text file is formatted as follows : .. . .. . The .txt file contains over 700 lines . Comment : What you have tried Comment : @Abhishekkumar well I know how to hard code the JTree by adding nodes one by one but that is bad programming practice - programming to implementation as opposed to programming to an interface . So I wanted a smarter way and I came to StackOverflow where I have learnt that it is not a place where someone just does all the hard work for you . You have challenged me to think harder and research widely which led me to the solution . Thank you . .. . Answer : If you want it more flexible don t hard code the levels . Simply retain the last node at any given level using a Map . As you traverse the items in your file you will have access to any parent node via the map . Here is the code .. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
default
UNK_RELATION
neovim@vim@31
neovim -- neovim is a fork of @placeholder that aims to improve upon vim s out-of-the-box experience and allow for more powerful plugins and guis .
{ "confidence": [ 52.32525634765625, 51.45880889892578, 50.73468017578125, 50.12333679199219, 49.710906982421875, 49.29170227050781, 48.90577697753906, 48.90577697753906, 48.65416717529297, 48.12167739868164, 47.63447952270508, 47.0235595703125, 46.70704650878906, 46.47697067260742, 46.394142150878906, 46.373779296875, 46.04214859008789, 45.34581756591797, 45.147857666015625, 45.023136138916016, 44.959144592285156, 44.87311553955078, 44.87311553955078, 44.87311553955078, 43.78114318847656, 43.78114318847656, 42.410133361816406, 42.410133361816406, 42.033241271972656, 41.686885833740234, 41.686885833740234, 41.686885833740234, 41.634498596191406, 41.10009002685547, 41.03358459472656, 40.85844421386719, 40.85844421386719, 40.83218002319336, 40.662235260009766, 40.662235260009766, 40.51081848144531, 40.210777282714844, 39.4530029296875, 39.11054229736328, 39.073883056640625, 39.073883056640625, 39.073883056640625, 39.073883056640625, 39.073883056640625, 39.073883056640625, 38.64927673339844, 38.42823028564453, 38.219390869140625, 37.95097732543945, 37.86210632324219, 37.86210632324219, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.325984954833984, 37.30913162231445, 37.30913162231445, 37.3020133972168, 37.19297790527344, 36.85585021972656, 36.2161979675293, 36.166419982910156, 36.11420822143555, 36.11420822143555, 34.98004913330078, 34.776649475097656, 34.725337982177734, 34.57997512817383, 34.57997512817383, 34.57997512817383, 34.57997512817383, 34.57997512817383, 34.57997512817383, 34.57997512817383, 34.129642486572266, 32.85657501220703, 32.83207702636719, 32.83207702636719, 32.83207702636719, 32.83207702636719, 32.83207702636719, 31.829605102539062, 31.829605102539062, 31.672508239746094, 31.672508239746094, 31.135028839111328, 30.654682159423828, 30.654682159423828, 30.081707000732422, 29.81247329711914, 26.901599884033203 ], "content": [ "There is an issue for Windows support 1749 https : github.com neovim neovim issues 1749 with an open pull request 810 https : github.com neovim neovim issues 810 .", "@Nonbeliever Works for me in both vim and neovim .", "It is probably this issue https : github.com neovim neovim issues 2048 .", "I m somewhat new to Vim and NeoVim so I installed the plugins and started up NeoVim and for some reason the 256 colors are not showing on NeoVim instead I get this .. . .. .", "I m trying to use the Solarized theme for vim in NeoVim .", "https : github.com neovim neovim issues 2048", "First install neovim plugin .. . .. . pip install neovim .. . .. . Print g : loaded python provider .. . .. . echo g : loaded python provider .. . .. . If it returns 1 the python is not setup for neovim .", "I use Neovim on Arch Linux with python-neovim and python3-neovim installed for Python support .", "After verifying this wasn t an issue by using vim instead of NeoVim the problem was I was not using NeoVim TrueColor support .", "I updated neovim via brew update brew reinstall --HEAD neovim", "I install YouCompleteMe and UltiSnips plugins in my neovim .", "Since this isn t mentioned so far : if you encounter problems with the Python support try github.com neovim neovim wiki https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working to find out which Pythons are checked by Neovim .", "@SharkLaser update neovim .", "@ephiron In github.com neovim neovim issues 5023 https : github.com neovim neovim issues 5023 bfredl noted that you could use termopen to attach an on stdout handler just like you would with a normal jobstart .", "this is the project home https : github.com neovim neovim .. . .. . i m try to use cmake to build it but failed .", "Actually reinstall neovim with sudo pip2 install neovim solve it", "This command is necessary to create a special manifest file that is needed for the communication between special plugins and neovim due to the way neovim handles api communication msgpack-rpc .", "Neovim does not support this option https : github.com rogual neovim-dot-app issues 48 so I am wondering if it s possible to change the font Neovim uses in the Terminal", "Turns out it s a bug in NeoVim still unresolved .", "At the moment the master branch of Neovim does not build in Windows .", "Someone is actually using Neovim .", "@FDinoff have you tried neovim", "@Kent I have not tried neovim .", "Neovim does look at terminfo though .", "If so make sure to pip install neovim inside your virtualenv and make sure that import neovim works in the python interpreter .", "This issue has already been extensively debated here https : github.com neovim neovim issues 2048 .", "Neovim uses the xdg specification for their config files .", "The version of neovim I have is really old though .", "https : github.com neovim neovim pull 2198 .. . .. . Enabling this using the environment variable NVIM TUI ENABLE TRUE COLOR 1 .", "Are there any use cases that neovim terminal mode cannot satisfy", "With terminal emulation in neovim the shell is killed when the terminal buffer is closed .", "If you re using a Gui based neovim client it should support the option too .", "If you are transferring from an old version of neovim .nvimrc is now XDG CONFIG HOME nvim init.vim and .nvim is now XDG CONFIG HOME nvim .. . .. . should get you close to running with neovim This might not work for all plugins but its a start .", "I d like to try out neovim so I did the .. . .. . I m currently on ubuntu and installed neovim from the ppa at : https : launchpad.net neovim-ppa .. . .. . I can paste the contents of nvim -v if needed .. . .. . Here is the old vim colors - note the line numbers and the green of minibufexplorer : .. . .. .", "I am writing Typescript in Neovim with plugins leafgarland typescript-vim and benekastah neomake among others and whenever I save the file gets compiled .", "The neovim module is installed over pip and pip3 with install neovim but nvim can t find it even when I set the let g : python host prog path in nvimrc .", "TextChangedI notice the I at the end should fire in insert-mode but it doesn t work with : term that s a bug https : github.com neovim neovim issues 5018 .", ".. . .. . I made a feature request https : github.com neovim neovim issues 5023 for a jobattach function which would allow attaching on stdout handlers to existing jobs whereas jobstart only adds handlers to new jobs .", "I want to use neovim in an environment with no internet-connection .", "Do you use neovim and if so what version", "In vim this could be turned off as such : Disable underscore shortcut inserting - in Vim R plugin http : stackoverflow.com questions 22453482 disable-underscore-shortcut-inserting-in-vim-r-plugin .. . .. . What is the equivalent in neovim", "In order to keep a persistent vim session I would launch a tmux session on the remote machine start neovim and create as many terminal windows as needed .", "I finally decided to go to vim well neovim in this case but that s beside the point .", "Now that you can start terminals in NeoVim I would like to make a simple script that starts the same terminals except inside NeoVim .", "edit : .. . .. . This is my current config : .. . .. . And this is the error i get when loading Neovim :", "I installed nvim through homebrew as they describe it in the neovim documentation for OS X .", "I had the issue myself because I used neovim inside virtualenv .", "Until last update of the python-clients for neovim everything worked well .", "Make sure you have the python3.5 version of the neovim bindings installed .", "I am working on a Neovim plugin that interacts with a REPL in a terminal buffer .", "I didn t notice too much difference between Vim and Neovim speed and because Vim has Gvim as a GUI I decided to give Gvim a shot .", "I should mention that I originally posted this as an issue https : github.com neovim neovim issues 2329 on Neovim s tracker but it hasn t been getting a ton of traction there lately and I m beginning to suspect that it s more an issue with my setup rather than Neovim itself .", "You can try following .. . .. . Set kbs 177 in your terminal s terminfo termcap : .. . .. . .. . infocmp TERM sed s kbs hH kbs 177 TERM.ti .. . tic TERM.ti .. . .. . .. . Source https : github.com neovim neovim wiki Troubleshooting my-ctrl-h-mapping-doesnt-work", "I got the UltiSnips error message to go away by re installing the neovim package inside the current environment with pip install neovim .", "I m a new user of Neovim and trying to figure out how to enable syntax-highlighting for Ruby .", "I m trying to install neovim with linuxbrew on AWS but I keep getting the following messages and I can t figure it out : .", "Essentially I had stopped building neovim nightlies for a few months .", "@Hoopes I ll ask some of the neovim devs to take a look .", "I have a key command that isn t firing as expected in NeoVim .", "NeoVim is probably equating control H with a delete and ignoring the map call it a bug .", "Before the full transition I was working on some projects in Neovim .", "What s the proper way to get syntax-highlighting for jade and stylus in neovim", "I am trying to setup my neovim with the operator mono .", "However I would rather use my vimrc to specify the font for neovim .", "If that doesn t help you can try and run neovim with debug messages neovim -V3 or any other logging level and see what you can pick from there .", "The and marks aren t correctly set in the : term buffer I m not sure this is feasible for nvim to do automatically but I made a bug report https : github.com neovim neovim issues 5017 .", "Here is how I m mapping them : .. . .. . When I run verbose nnoremap C-h I see .. . .. . EDIT : Turns out this issue is specific to Neovim .", "Now that we have terminal mode in neovim I am wondering if there is still a use-case for tmux .", "If when you try let interp errors provider pythonx Detect 2 .. . .. . From the docs at https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working .. . .. . You get errors could be that you have your VIM environment variable pointed to the wrong probably vim74 runtime directory .", "variable of VIM with a path it will use that as your location of your runtime files - I had my set to usr share vim vim74 changing it to the location of neovim worked .", "As @Alex mentioned in comments pip install neovim does indeed solve the problem .", "In neovim when my completion plugin is triggered it will print out the methods signature in a preview window .. . .. .", "So my second question is : how do I activate Operator italic font for commented out code in neovim .", "I use a number of Haskell plugins in my editor Neovim one of which is ghcmod-vim which works together with syntastic to provide syntax checking as I write Haskell code .", "How do I get Neovim to highlight that group properly", "enter image description here http : i.stack.imgur.com ajPfb.png .. . .. . I m using Konsole on KDE linux to run NeoVim and my NeoVim init file looks like this after loading the plugins before these lines .. . .. . My TERM variable is xterm .", "I m trying to use neovim with deoplete https : github.com Shougo deoplete.nvim and UtilSnips https : github.com SirVer ultisnips .", "Please follow the instruction on http : neovim.io doc user nvim python.html to setup the python interpreter for neovim .", "Neovim needs pythonx.vim from the runtime autoload providers folder to load a python interp .", "After the new version of python clients for neovim were installed Python support seemed to have broken .", "Nonethelles a complete reinstall of neovim and the python api-bindings did also not solve the problem .", "The code for communicating with the REPL is here https : github.com parsonsmatt intero-neovim blob master autoload intero repl.vim .", "The code for managing the process is here https : github.com parsonsmatt intero-neovim blob master autoload intero process.vim .", "As far as I understand I tried diving into vim code but didn t write any patches it makes the code base much more complicated and that s exactly what Neovim developers are trying to remove .", "I am running neovim in iterm2 so I have used the profile preferences to select the Operator font and that is more or less working .", "Neovim results http : i.stack.imgur.com 0Iiqe.png .. . .. . If anyone has any advice or settings to try I d be extremely obliged .", "Below is the excerpt from my neovim config : .. . .. . Applicable entry from : nmap shows the binding hasn t been overridden .", "NeoVim version info .. . .. . PS : I m using iTerm2 but it seems to do the same thing in regular OSX Terminal .", "Currently if I open a jade or stylus file in neovim it stalls for up to 7 seconds and then opens the file .", "Normally I d activate those for comments in my vimrc like so : .. . .. . However these don t seem to work with neovim .", "On nvim-startup I get the message UltiSnips requires py 2.7 or py3 and for deoplete It requires Neovim with Python 3 support +python3 .", "pip install neovim https : neovim.io doc user nvim python.html and have the python3 path set up correctly in your .vimrc let g : python3 host prog path to python3", "Neovim colors http : i.stack.imgur.com RJvhO.png .. . .. . I was hoping this would be a simple drop-in replacement but doesn t appear that way currently .", "This is despite the fact that there are no references to this path in any of my Neovim or plugin config files or in any environment-variables .", "returns 1 and Unite throws the following exception : .. . .. . However I figured out that python works well within neovim by trying .. . .. . and .. . .. . I also tried to manually set the python host by using python host prog .", "One way to fix it is to put .. . .. . let g : loaded python provider 1 on the top of your .nvimrc .. . .. . I personally have stopped used neovim for this particular reason and use regular vim instead", "Environment : .. . .. . OS X : 10.11.3 .. . .. . NeoVim : 0.1.2-dev .. . .. . set fileformat unix .. . .. . The following vim function runs a zsh script which returns the page title URL last modified time and current date and time .", "Seems your not the only one to notice https : github.com luochen1990 rainbow issues 31 .. . .. . It looks like something doesn t work properly to activate the plugin in neovim .", "Everytime I open a project directory I use the exact same vim pane layout : .. . .. . I would like to be able to open a new vim session with this layout all of the panes on the right would start in : Explore mode while the left pane would start in : terminal mode specific to neovim .", "How can I search with a string and then look through a list of all occurrences using VIM and or VIM plugins" ] }
{ "confidence": [ 69.63088989257812, 67.36833953857422, 65.66332244873047, 65.63409423828125, 63.54085922241211, 63.50651168823242, 63.30199432373047, 62.76755142211914, 62.00190734863281, 61.23893356323242, 60.936805725097656, 59.4086799621582, 59.15755844116211, 57.58235549926758, 57.467796325683594, 57.40535354614258, 57.29880905151367, 57.274051666259766, 57.24204635620117, 56.23016357421875 ], "content": [ "Question : I m a new user of Neovim and trying to figure out how to enable syntax-highlighting for Ruby . What config should i edit edit : .. . .. . This is my current config : .. . .. . And this is the error i get when loading Neovim : .. . Answer : Neovim uses the xdg specification for their config files . If you are already using vim . If you are transferring from an old version of neovim .nvimrc is now XDG CONFIG HOME nvim init.vim and .nvim is now XDG CONFIG HOME nvim .. . .. . should get you close to running with neovim This might not work for all plugins but its a start . .. . .. . All you should need in XDG CONFIG HOME nvim init.vim is the following .. . .. . to get syntax-highlighting for ruby . Comment : Thank you for responding . Unfortunately adding your changes to .nvimrc generated an error . I ve updated the question to reflect this . Comment : @SharkLaser update neovim . Your runtime files appear to be out of date . Comment : thank you That was the final hurdle . I updated neovim via brew update brew reinstall --HEAD neovim Comment : @FDinoff have you tried neovim I haven t given it a try . how do you think about it good I mean first as good as vim Comment : @Kent I have not tried neovim . I ve just been following the development .", "Question : I m remapping C- hjkl to be used for navigating between window splits . C- jkl are all working as expected . C-h is not working and I cannot figure out why . Here is how I m mapping them : .. . .. . When I run verbose nnoremap C-h I see .. . .. . EDIT : Turns out this issue is specific to Neovim . If you come across this question and are working with vim it won t apply to you . .. . Answer : It is probably this issue https : github.com neovim neovim issues 2048 . You can try following .. . .. . Set kbs 177 in your terminal s terminfo termcap : .. . .. . .. . infocmp TERM sed s kbs hH kbs 177 TERM.ti .. . tic TERM.ti .. . .. . .. . Source https : github.com neovim neovim wiki Troubleshooting my-ctrl-h-mapping-doesnt-work", "Question : null .. . Answer : I m somewhat new to Vim and NeoVim so I installed the plugins and started up NeoVim and for some reason the 256 colors are not showing on NeoVim instead I get this .. . .. . enter image description here http : i.stack.imgur.com ajPfb.png .. . .. . I m using Konsole on KDE linux to run NeoVim and my NeoVim init file looks like this after loading the plugins before these lines .. . .. . My TERM variable is xterm . How can I fix this Thanks . Comment : Someone is actually using Neovim . Is it stable Comment : @rksh first try running with nvim --noplugin to see if the problem goes away . This will tell you if it s a problem with your startup files e.g . .vimrc . Then you can try to binary chop through your configuration to narrow down which part is causing the problem . Comment : TERM should be xterm-256color", "Question : VIM contains a set guifont option to change the font . Neovim does not support this option https : github.com rogual neovim-dot-app issues 48 so I am wondering if it s possible to change the font Neovim uses in the Terminal .. . Answer : Just change the font in your terminal-emulator s preferences . Terminal vim behaves the same way . Only Gvim or macvim use the set guifont option . If you re using a Gui based neovim client it should support the option too .", "Question : I have a key command that isn t firing as expected in NeoVim . Below is the excerpt from my neovim config : .. . .. . Applicable entry from : nmap shows the binding hasn t been overridden . But when pressing C-h nothing happens except system bell . All the other directions work fine . Changing the binding to a different key has the same effect . Calling the ex command manually works fine . This binding never gave me any trouble with Vim although I ve changed some plugins in the transition . Full vimrc is here https : github.com icook dotfiles blob master nvimrc L278 . NeoVim version info .. . .. . PS : I m using iTerm2 but it seems to do the same thing in regular OSX Terminal . Comment : NeoVim is probably equating control H with a delete and ignoring the map call it a bug . Comment : Ah yes I ve found the bug report on Github now . .. . Answer : Turns out it s a bug in NeoVim still unresolved . https : github.com neovim neovim issues 2048", "Question : I m trying to use neovim with deoplete https : github.com Shougo deoplete.nvim and UtilSnips https : github.com SirVer ultisnips . Both requires Python support from nvim . I followed the instructions in : help nvim python to set the support but the output of : echo has python or : echo has python3 are both 0 . On nvim-startup I get the message UltiSnips requires py 2.7 or py3 and for deoplete It requires Neovim with Python 3 support +python3 . My python 2.7.10 and python3 3.4.3 are both installed with homebrew . The neovim module is installed over pip and pip3 with install neovim but nvim can t find it even when I set the let g : python host prog path in nvimrc . I don t know what I am able to do anymore has anyone an idea whats wrong with it Comment : I m not sure if this works . Type where python or which python to check if your python is properly installed . Then manually configure your nvim to look at the resultant path . Another potential problem is your nvim installation is not what you think you have installed . Did you do manual unpacking before pip install Comment : My pythons are both located in usr local bin as the output of which says . I installed nvim through homebrew as they describe it in the neovim documentation for OS X . Comment : Having this exact issue any help appreciated Comment : Since this isn t mentioned so far : if you encounter problems with the Python support try github.com neovim neovim wiki https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working to find out which Pythons are checked by Neovim . This is more reliable than using : which python or similar . .. . Answer : If when you try let interp errors provider pythonx Detect 2 .. . .. . From the docs at https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working .. . .. . You get errors could be that you have your VIM environment variable pointed to the wrong probably vim74 runtime directory . Neovim needs pythonx.vim from the runtime autoload providers folder to load a python interp . Vim74 doesn t provide this file . If you have an env . variable of VIM with a path it will use that as your location of your runtime files - I had my set to usr share vim vim74 changing it to the location of neovim worked . I guess there is a compile-time option to point to the correct location too .", "Question : I ve enabled the following mappings in my init.vim : .. . .. . These greatly improve windows navigation in Vim . However I ve noticed that C-h does not work as expected when executed in terminal buffer . Trying this on a usual terminal session results in Backspace action . So probably it seems to be one of these alternative key combinations like C-i for Tab or C- for Esc . But is there any way to make C-h work in Neovim s terminal session as per my bindings Thanks .. . Answer : This issue has already been extensively debated here https : github.com neovim neovim issues 2048 . Original Vim does not rely on terminfo and includes its own patch for correct handling of C-h sequences . Neovim does look at terminfo though . Briefly the fix is executing these commands in the shell :", "Question : Now that we have terminal mode in neovim I am wondering if there is still a use-case for tmux . Let s say that I need to work on a remote machine using SSH . In order to keep a persistent vim session I would launch a tmux session on the remote machine start neovim and create as many terminal windows as needed . I don t need to use the windowing mechanism of tmux anymore . Are there any use cases that neovim terminal mode cannot satisfy .. . Answer : tmux provides session management . For example you can create multiple sessions and then detach re-attach as you please . With terminal emulation in neovim the shell is killed when the terminal buffer is closed . So there s still a use-case for it however the primary use-case with regards to vim + tmux has been eliminated with terminal emulation .", "Question : null .. . Answer : Currently if I open a jade or stylus file in neovim it stalls for up to 7 seconds and then opens the file . It even has halfway decent syntax-highlighting . What s the proper way to get syntax-highlighting for jade and stylus in neovim Comment : Have you ever tried vim-pug github.com digitaltoad vim-pug https : github.com digitaltoad vim-pug and vim-stylus github.com wavded vim-stylus https : github.com wavded vim-stylus plugins Comment : Those are the ones I use . Comment : So you are on right track just report the issues to plugin maintainers .", "Question : I am working on a Neovim plugin that interacts with a REPL in a terminal buffer . I want to be able to send a command to the REPL copy the response and display it to the user somehow . Currently the terminal buffer doesn t seem to refresh output until the current vimscript function terminates so I can t have a single function that does eg : .. . .. . as the get response function is working with the terminal buffer before it gets updated . Currently I m using neovim s job control though if this can be accomplished in vanilla vim all the better . Here s the code I m using to initialize the terminal : .. . .. . Here s how I m sending the command to the REPL : .. . .. . I ve tried adding an edit command to refresh but that doesn t seem to work in the REPL . The code for communicating with the REPL is here https : github.com parsonsmatt intero-neovim blob master autoload intero repl.vim . The code for managing the process is here https : github.com parsonsmatt intero-neovim blob master autoload intero process.vim . .. . Answer : In the : term buffer you can set up a TextChanged handler . E.g . the following code sends the entire : term buffer contents to s : on response : .. . .. . Figuring out which text is new since the previous TextChanged event will require some custom logic . The and marks aren t correctly set in the : term buffer I m not sure this is feasible for nvim to do automatically but I made a bug report https : github.com neovim neovim issues 5017 . Note that TextChanged only fires if the user is in normal-mode also immediately upon leaving insert-mode . TextChangedI notice the I at the end should fire in insert-mode but it doesn t work with : term that s a bug https : github.com neovim neovim issues 5018 . .. . .. . Another approach is to user timers see : help timer start . Here s a timer that calls s : on reponse timer id every second : .. . .. . But this isn t ideal because you would need to keep a map of terminals and timer ids or iterate through all : terminal buffers and check their contents . .. . .. . I made a feature request https : github.com neovim neovim issues 5023 for a jobattach function which would allow attaching on stdout handlers to existing jobs whereas jobstart only adds handlers to new jobs . This could then be used to attach to b : terminal job id of any : term buffer . Comment : Hmm the TextChanged autocmd doesn t quite do what I expect . It appears that it only fired when the user s cursor is currently located in the terminal buffer . Checking out jobattach now Comment : jobattach doesn t exist yet--it would be a feature request . Comment : @ephrion I added another suggestion using timers . But probably jobattach is what is really needed . Comment : @ephiron In github.com neovim neovim issues 5023 https : github.com neovim neovim issues 5023 bfredl noted that you could use termopen to attach an on stdout handler just like you would with a normal jobstart . So that should help as long as your plugin is in control of creating the : term buffers . Comment : That s extremely helpful thanks I appreciate you making the feature request .", "Question : As always we want to try something new and end up messing our configurations I didn t notice too much difference between Vim and Neovim speed and because Vim has Gvim as a GUI I decided to give Gvim a shot . Before the full transition I was working on some projects in Neovim . Now when I start it it complains about python host failed . For sure when installing Vim back it messed some configuration . Any ideas on what s wrong .. . Answer : Actually reinstall neovim with sudo pip2 install neovim solve it", "Question : I use Neovim on Arch Linux with python-neovim and python3-neovim installed for Python support . Until last update of the python-clients for neovim everything worked well . I particular use the Unite Plugin which needs Python support . After the new version of python clients for neovim were installed Python support seemed to have broken . returns 1 and Unite throws the following exception : .. . .. . However I figured out that python works well within neovim by trying .. . .. . and .. . .. . I also tried to manually set the python host by using python host prog . However this didn t change anything . UPDATE : .. . .. . In the meantime the error message has slightly changed and contains the python exception . Furthermore I found out that there was an issue on my machine with the update of packages when I upgraded python3.4 to 3.5 . Some packages linked . They were incorrectly linked between the two versions . Nonethelles a complete reinstall of neovim and the python api-bindings did also not solve the problem . Comment : : python3 print Hello Did this work It s not valid python 3 code . Comment : Make sure you have the python3.5 version of the neovim bindings installed . pip install neovim https : neovim.io doc user nvim python.html and have the python3 path set up correctly in your .vimrc let g : python3 host prog path to python3 Comment : @H ken Lid no you are completely right I did it correctly in the test but copied and pasted it incorrectly here . I corrected it in the post Comment : @@H ken Lid so I added let g : python3 host prog path to python3 and let g : python host prog path to python2 to my init.vim but there is no change in the behaviour the error mesage is still the same . Comment : Could be a problem with unite.vim . github.com Shougo unite.vim issues 1150 https : github.com Shougo unite.vim issues 1150 .. . Answer : The problem could be solved by calling : UpdateRemotePlugins . This command is necessary to create a special manifest file that is needed for the communication between special plugins and neovim due to the way neovim handles api communication msgpack-rpc . The update from python3.4 to python3.5 made the old manifest files obsolete . Consequently they had to be updated too .", "Question : I have some simple default syntax-highlighting and other colors in my regular vim . I d like to try out neovim so I did the .. . .. . I m currently on ubuntu and installed neovim from the ppa at : https : launchpad.net neovim-ppa .. . .. . I can paste the contents of nvim -v if needed .. . .. . Here is the old vim colors - note the line numbers and the green of minibufexplorer : .. . .. . Original vim colors http : i.stack.imgur.com xYmpw.png .. . .. . And here is what it looks like with nvim . It is doing some syntax-highlighting but not nearly what the original vim did . Neovim colors http : i.stack.imgur.com RJvhO.png .. . .. . I was hoping this would be a simple drop-in replacement but doesn t appear that way currently . I might certainly have something misconfigured in my system . I also tried .. . .. . to no avail . The entirety of my .vimrc is : .. . .. . Any help would be greatly appreciated Comment : Check your TERM variable . It should be something like xterm-256color Comment : YUP . That s it . Thanks If there s anything I can do more than upvote your comment let me know . .. . Answer : Check your TERM variable . It needs to be set to something like xterm-256color which says that the terminal supports 256 colors .", "Question : I m trying to use neovim with deoplete https : github.com Shougo deoplete.nvim and UtilSnips https : github.com SirVer ultisnips . Both requires Python support from nvim . I followed the instructions in : help nvim python to set the support but the output of : echo has python or : echo has python3 are both 0 . On nvim-startup I get the message UltiSnips requires py 2.7 or py3 and for deoplete It requires Neovim with Python 3 support +python3 . My python 2.7.10 and python3 3.4.3 are both installed with homebrew . The neovim module is installed over pip and pip3 with install neovim but nvim can t find it even when I set the let g : python host prog path in nvimrc . I don t know what I am able to do anymore has anyone an idea whats wrong with it Comment : I m not sure if this works . Type where python or which python to check if your python is properly installed . Then manually configure your nvim to look at the resultant path . Another potential problem is your nvim installation is not what you think you have installed . Did you do manual unpacking before pip install Comment : My pythons are both located in usr local bin as the output of which says . I installed nvim through homebrew as they describe it in the neovim documentation for OS X . Comment : Having this exact issue any help appreciated Comment : Since this isn t mentioned so far : if you encounter problems with the Python support try github.com neovim neovim wiki https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working to find out which Pythons are checked by Neovim . This is more reliable than using : which python or similar . .. . Answer : I had the issue myself because I used neovim inside virtualenv . If so make sure to pip install neovim inside your virtualenv and make sure that import neovim works in the python interpreter . If that doesn t help you can try and run neovim with debug messages neovim -V3 or any other logging level and see what you can pick from there .", "Question : I m trying to use the Solarized theme for vim in NeoVim . However despite setting the background to dark and confirming it s set to dark the solarized background-color is a very light grey almost white color . Setting background light only adjusts the color of text . I m using iTerm2 but had this issue with iTerm 1 and thought switching might fix . And I m using the solarized dark theme in the iTerm2 profile . I also have the CSApprox plugin installed . I ve confirmed both t Co 256 and term xterm-256colors . I ve noticed background colors being slightly off for other themes as well . .. . Answer : Solved this one myself . After verifying this wasn t an issue by using vim instead of NeoVim the problem was I was not using NeoVim TrueColor support . https : github.com neovim neovim pull 2198 .. . .. . Enabling this using the environment variable NVIM TUI ENABLE TRUE COLOR 1 . Adding .. . .. . to my .bash-profile fixed the issue . All schemes now look as advertised .", "Question : In vim this could be turned off as such : Disable underscore shortcut inserting - in Vim R plugin http : stackoverflow.com questions 22453482 disable-underscore-shortcut-inserting-in-vim-r-plugin .. . .. . What is the equivalent in neovim .. . Answer : Adding this to .nvimrc did the trick :", "Question : I m trying to use neovim with deoplete https : github.com Shougo deoplete.nvim and UtilSnips https : github.com SirVer ultisnips . Both requires Python support from nvim . I followed the instructions in : help nvim python to set the support but the output of : echo has python or : echo has python3 are both 0 . On nvim-startup I get the message UltiSnips requires py 2.7 or py3 and for deoplete It requires Neovim with Python 3 support +python3 . My python 2.7.10 and python3 3.4.3 are both installed with homebrew . The neovim module is installed over pip and pip3 with install neovim but nvim can t find it even when I set the let g : python host prog path in nvimrc . I don t know what I am able to do anymore has anyone an idea whats wrong with it Comment : I m not sure if this works . Type where python or which python to check if your python is properly installed . Then manually configure your nvim to look at the resultant path . Another potential problem is your nvim installation is not what you think you have installed . Did you do manual unpacking before pip install Comment : My pythons are both located in usr local bin as the output of which says . I installed nvim through homebrew as they describe it in the neovim documentation for OS X . Comment : Having this exact issue any help appreciated Comment : Since this isn t mentioned so far : if you encounter problems with the Python support try github.com neovim neovim wiki https : github.com neovim neovim wiki Troubleshooting python-support-isnt-working to find out which Pythons are checked by Neovim . This is more reliable than using : which python or similar . .. . Answer : Please follow the instruction on http : neovim.io doc user nvim python.html to setup the python interpreter for neovim . First install neovim plugin .. . .. . pip install neovim .. . .. . Print g : loaded python provider .. . .. . echo g : loaded python provider .. . .. . If it returns 1 the python is not setup for neovim . In your .config nvim init.vim file set the python interpreter .. . .. . let g : python host prog path to python2.7", "Question : Currently I m using Vim in combination with Cmder ConEmu on Windows . My Cmder has tasks that I run to start a group of terminals where one starts with Vim in the correct folder one with Gulp and one with Vagrant . Now that you can start terminals in NeoVim I would like to make a simple script that starts the same terminals except inside NeoVim . How can I achieve this .. . Answer : I guess it s very simple . Just use a vim macro. . : .. . .. . http : vim.wikia.com wiki Macros", "Question : this is the project home https : github.com neovim neovim .. . .. . i m try to use cmake to build it but failed . Do you have any success tell me the detail way . thank you the screenshot of error message http : i.stack.imgur.com UgqPV.png .. . Answer : At the moment the master branch of Neovim does not build in Windows . There is an issue for Windows support 1749 https : github.com neovim neovim issues 1749 with an open pull request 810 https : github.com neovim neovim issues 810 . However the terminal support in that branch is currently broken . In that first link you can find some instructions on how to build and a list of issues that still need fixing for Windows support . Comment : thank you very much", "Question : I install YouCompleteMe and UltiSnips plugins in my neovim . Normally everything is ok . But I am using MiniConda http : conda.pydata.org docs intro.html in my python developing MiniConda is something like virtualenv I have a virtual python env called parser when I activate this virtualenv with source activate parser something is wrong : .. . .. . so the problem is neovim can not find python properly I am confused why virtualenv affect neovim Comment : I got the UltiSnips error message to go away by re installing the neovim package inside the current environment with pip install neovim . Comment : Thank you @Alex . That is indeed the answer . .. . Answer : First I thought this question doesn t have an answer . As @Alex mentioned in comments pip install neovim does indeed solve the problem . but I don t know why he didn t create an answer for it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
vim
UNK_RELATION
mime4j@java@54
mime4j -- mime4j http : james.apache.org mime4j is a @placeholder library for handling e-mail according to rfc822 and mime format is part of the apache james projectthe current 2014-07-18 stable version is 0.7.2 .
{ "confidence": [ 83.26591491699219, 82.338623046875, 80.67340087890625, 76.05293273925781, 76.05293273925781, 73.63243865966797, 68.6255874633789, 67.47513580322266, 65.55033111572266, 65.43390655517578, 64.98811340332031, 64.6048583984375, 62.5914306640625, 62.295265197753906, 62.295265197753906, 61.69894027709961, 61.2099494934082, 60.773101806640625, 60.773101806640625, 59.65089416503906, 59.18512725830078, 58.44599151611328, 57.862823486328125, 56.994930267333984, 56.994930267333984, 54.263267517089844, 53.879310607910156, 53.739112854003906, 52.14741516113281, 52.14741516113281, 51.87718963623047, 51.87718963623047, 51.87718963623047, 51.593624114990234, 51.02101135253906, 51.02101135253906, 50.6419792175293, 50.41038131713867, 47.58039855957031, 46.845542907714844, 44.98361587524414, 44.98361587524414, 44.98361587524414, 43.74840545654297, 43.20508575439453, 42.62653350830078, 42.62653350830078, 41.934104919433594, 40.76460647583008, 39.72818374633789, 34.80394744873047, 33.06751251220703, 30.507652282714844, 29.552108764648438, 28.86724090576172, 26.892892837524414, 24.713897705078125, 24.368040084838867, 23.67149543762207, 23.057682037353516, 22.01715660095215, 21.559303283691406, 20.62978744506836, 20.520980834960938, 20.477724075317383, 19.936731338500977, 19.6627197265625, 19.6627197265625, 19.534481048583984, 19.46525764465332, 19.394577026367188, 19.070693969726562, 18.943878173828125, 18.943878173828125, 18.407974243164062, 18.263940811157227, 18.182287216186523, 18.155132293701172, 18.090221405029297, 17.992692947387695, 17.992692947387695, 17.86947250366211, 17.776018142700195, 17.686115264892578, 17.686115264892578, 17.59567642211914, 17.590259552001953, 17.33353042602539, 17.23245620727539, 17.100034713745117, 16.894861221313477, 16.716367721557617, 16.674699783325195, 16.634260177612305, 16.445640563964844, 16.137218475341797, 16.098318099975586, 15.783920288085938, 15.752023696899414, 15.732772827148438 ], "content": [ "What about james.apache.org mime4j samples.html https : james.apache.org mime4j samples.html", "I downloaded the binaries of the latest stable version of apache-mime4j 0.7.2 .", "The jars included in my build path : apache-mime4j-core-0.7.2.jar apache-mime4j-dom-0.7.2.jar .", "But Message https : james.apache.org mime4j apidocs org apache james mime4j dom class-use Message.html does not provide a method setText or something like that .", "Ok there is getBody but then I don t know how to manipulate the Body https : james.apache.org mime4j apidocs org apache james mime4j dom Body.html .", "You need this jar in your classpath : .. . .. . http : central.maven.org maven2 org apache james apache-mime4j 0.6.1 apache-mime4j-0.6.1.jar .. . .. . Dependency For maven :", "I recommand you to use Token streams http : james.apache.org mime4j usage.html .", "I already implemented this using Apache James Mime4j http : james.apache.org mime4j apidocs index.html and Apache Commons Net http : commons.apache.org proper commons-net javadocs api-3.3 index.html but now I also have to append a footer signature to the content of each e-mail .", "I am using Mime4J to mime-encode a message .", "I ve been looking at mime4j http : james.apache.org mime4j and this scala code https : github.com mattanja messenger blob c2c8cc009f3fa65868633a929aecb078a10ea624 app models Email.scala in particular .", "You can clone the current snaphshot of the mime4j project from .. . .. . http : svn.apache.org repos asf james mime4j trunk .. . .. . to your personal github account .. . .. . or use my clone : .. . .. . https : github.com WolfgangFahl james-mime4j .. . .. . and your MBoxIterator is here : .. . .. . https : github.com WolfgangFahl james-mime4j tree trunk mbox src main java org apache james mime4j mboxiterator", "I couldn t find any I need it for Mime4j 0.7.2 latest .", "The source code is available from the website at james.apache.org mime4j start build.html http : james.apache.org mime4j start build.html You can download the trunk from svn which does have this functionality and build it yourself .", "Thanks to the devs they got them uploaded in the following link : MBoxIterator needed classes http : svn.apache.org repos asf james mime4j trunk mbox src main java org apache james mime4j mboxiterator .", "I use this sample code http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java .", "I read post apache mime4j maven-dependency for 0.7.2 https : stackoverflow.com questions 15070543 apache-mime4j-maven-dependency-for-0-7-2 15070696 15070696 and it helped me to get right maven-dependency .", "Here is a paste of my code mostly from james mime4j .", "Can I achieve this with Mime4j too", "Did you check the mime4j documentation", "I m using mime4j version 0.6.1 and wanna to update to version 0.7.2 but cannot find any good sample .", "So how can I connect to mail servers to use mime4j", "Dowloaded apache-mime4j-core-0.8.0-20150617.024907-738-sources .. . 2 .", "Using mime4j it s easy to get this far : .. . .. . So using mime4j or using java javax etc .", "I encountered a problem when parsing email with mime4j .", "Can I use Javamail in conjunction with mime4j", "Does anyone have good example how to parse SMTP eml email with mime4j 0.7.2", "This blog http : ieugen.blogspot.com 2012 06 java-mbox-parsing-with-apache-james.html shows how to do it with Apache Mime4j", "I ve implemented a solution to parse Email Files .eml into objects using Mime4J .", "I am working with MIME4J to read MIME events from an email stack dump .", "Can anybody help in pointing me to some code to extract attachments from Multipart Mime using Mime4j", "As far as I can tell mime4j does not offer anything equivalent .", "I m going to stick with the Mime4j solution you ve given me for now .", "I am sure there is some mismatch between spooler and mime4j .", "I built the code and ran the sample svn.apache.org repos asf james mime4j trunk examples src main http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java on several mbox files from enron dataset and my own mbox downloaded from gmail and always all of the fields of all Messages are null", "I am trying to move from Javamail to mime4j in the hope of having less trouble parsing mail .", "However I haven t managed to find out how to connect to a mail-server to then use mime4j to parse messages .", "I ve downloaded mime4j 0.8.0 snapshot from subversion and built it with maven .", "Created a jar called apache-mime4j-0.8.0-fix.jar and pushed into the lib folder .. . 6 .", "I found this example for parsing an email : http : www.mozgoweb.com posts how-to-parse-mime-message-using-mime4j-library .. . .. . But the example is not working because import org.apache.james.mime4j.message.Message is not working .", "I was wondering if is possible to send the MimeMessage of Mime4J through Transport.send mimeMessage instead to create a new file .", "I m trying to use mime4j to parse emails all is working fine however I m not able to get the file name of the attachment .", "For the event-based parsing in mime4j a ContentHandler interface is required and methods are called from it by the parser which requires the handler be set to it .", "I use run.sh so replaced the mime4j core jar name with the above one .", "The classes you mention at least by what I found are not included into Mime4J so you have to code them yourself .", "utilities it should be possible to extract the a@b.com part of the address from there but I haven t found a class within javax or mime4j that is responsible for this yet .", "The simplest approach would be to use the Mime4J Message.writeTo method to write the message to a ByteArrayOutputStream then wrap the byte array with a ByteArrayInputStream and use that to construct a JavaMail MimeMessage object .", "A more complex but more efficient approach would be to create a class that subclasses MimeMessage and delegates most of the methods to the corresponding methods on the Mime4J Message object .", "Based on @zvisofer answer I found the guilty piece of code http : grepcode.com file repo1.maven.org maven2 org.apache.james apache-mime4j-core 0.7 org apache james mime4j io BufferedLineReaderInputStream.java v source in BufferedLineReaderInputStream : .. . .. . The best thing to do would be to report the bug but here is a fix a little dirty but it s working fine .. . .. . Create the class org.apache.james.mime4j.io.BufferedLineReaderInputStream in your project .. . .. . Replace the method public int readLine final ByteArrayBuffer dst by this one : .. . .. . Enjoy both unix and dos files :", "I have experimented with a sample Handler from another SO answer that extends the mime4j packaged SimpleContentHandler but that one really only parses headers .", "Use the following library based on mime4j : email-mime-parser https : github.com ram-sharma-6453 email-mime-parser .. . .. . The provided sample code takes care of email parsing and the resulting email object provides convenience method for the solution of your problem :", "Now I try to parse a toy mbox file https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug from mime4j test .", ": apache-mime4j-core-0.8.0-SNAPSHOT.jar : apache-mime4j-dom-0.8.0-SNAPSHOT.jar : apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT.jar IterateOverMbox mbox.rlug.txt .. . .. . Message Din windows ma pot din LINUX NU ma pot conecta la ZAPP Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Re : RH 8.0 boot floppy Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Qmail mysql virtualusers +ssl + smtp auth +pop3 Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Re : Din windows ma pot din LINUX NU ma pot conecta la ZAPP Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message LSTP problem - solved Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Found 5 messages Done in : 108 milis", "the latest version 0.7.2 doesn t have this functionality .", "It s not my code i just created users and sent mail per the Quickstart guide james.apache.org server 3 quick-start.html https : james.apache.org server 3 quick-start.html", "Personally I do not use James methods for sending mail by SMTP .", "You might want to post a change request for the apache james project .", "Here is a chunk of one of the mails the mail that my code most recently threw this exception on .. . .. . And here is i think the relevant chunk of that mail : .. . .. . Is there a Scala library out there for easily handling this type of input", "Even when I run mime4j test mbox file github.com ieugen mbox-iterator blob master src test resources https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug DefaultMessageBuilder fails and all fields are null even that MboxIterator finds 5 messages as it should .", "I just downloaded and setup the Apache James 3 latest beta release on Windows and so far i haven t been able to send a simple message .", "If you really want to use another MIME message parser you ll need to use the Message.writeTo method to get the entire MIME content of a message which you can pass to some other library to parse .", "But is there a standard MIME way to work it out please .", "I am trying to process attachments from James Hook Mailets .", "stackoverflow.com questions 13358453 http : stackoverflow.com questions 13358453 sending-an-mail-in-java-using-smtp for how to use it .", "I m trying to parse raw email messages over HTTP one at a time that come in MIME multipart .", "It can be mail headers or multipart section header... .", "You ll need to adapt from the james message to java s standard way on how to do things if you try this route .", "MIME parsing is not easy because the grammar is not very well defined .", "However you may want to look at other libraires for MIME parsing .", "I could get the mail successfully delivered locally by doing to following .", "Remove the first headers FROM MAILER and then make sure all lines following after Content-Type are indented eg charset and boundary by at least one whitespace character as required by the spec RFC822 or later or remove the linefeed .", "It seemed this may be possible using javax.mail.internet.MimeMessage http : docs.oracle.com javaee 1.4 api javax mail internet MimeMessage.html .", "As a semester project I started to implement a MIME parser to show how you can interleave multiple parsers with a MIME parser when you have a multipart message .", "Here is a helper class that we use successfully to parse e-mails with their attachments .", "In one of my Java applications I have to forward e-mails .", "I am new to both Android and Apache .", "Javamail provides session and connections to a mail-server via IMAP or POP3 from which you then read Messages .", "I need to send SOAP message with mime-attachment into my web-service .", "I read the RFCs multiple times and writing a compliant MIME parser is not an easy task because of this problem .", "on the interleaved part .", "Usually a footer is just part of the text of the message .", "I need xml xml part to be parsed .", "I do not know the root of this problem the email format or my program", "So I get e-mails plain text or multipart with any content maybe also attachments .", "The end goal is to adapt this behavior into MapReduce so coping with the chance that one part of the email will be on one filesplit and another part in a different filesplit is necessary .", "However the result is not what I expect : for a multipart message containing a plain text part and an html part only one TextBody is created .", "Nevertheless you can maybe tweak complete the current implementation I started very incomplete github.com alexcrt interleaved-parsers blob master src main https : github.com alexcrt interleaved-parsers blob master src main scala mime MIMEParser.scala .", "If I send sopa request with this attach I have this : .. . .. . in the soap request found reference to non-existent mime-attachment .. . .. . .. . If it false way please tell me how to correct create this mime-attachment for soap in java .", "Here is my test program : .. . .. . Here is a part of my email file :", "If you re not limited to Scala you may try Flanker github.com mailgun flanker https : github.com mailgun flanker which can parse MIME messages .", "I think you need InternetAddress class from javax.mail : http : docs.oracle.com javaee 6 api javax mail internet InternetAddress.html getAddress .. . .. . Minimum working example :", "this is in version 0.8 that wasn t released", "Yes my fix can be improve I guess handling the case-when r is alone", "If I have this MIME structure : .. . .. . and in the end : .. . .. . .. . How can I do this structure with Java SOAP", "Thus you the informations are very sparse and there is not a one-standard format .", "I need xml content xml part from the following response string in java", "Am I using the wrong jars or version", "I have a text part and attachments which I add to a MultipartImpl object .", "Nonetheless if I parse this way I do get access to the getFrom method which returns an array of Address http : docs.oracle.com javaee 1.4 api javax mail Address.html which itself doesn t offer methods of use to me .", "Before I asked about how to create MIME-atachment text xml in Java and now I have one simple question .", "pastebin.com w3YvBydp http : pastebin.com w3YvBydp" ] }
{ "confidence": [ 120.94425964355469, 118.15496826171875, 114.2309341430664, 108.57891082763672, 106.91218566894531, 91.92384338378906, 86.75624084472656, 85.72273254394531, 84.70451354980469, 82.24833679199219, 82.13932037353516, 79.3664779663086, 78.54954528808594, 76.77550506591797, 75.03337860107422, 72.6893539428711, 71.28559112548828, 66.19364166259766, 65.626708984375, 62.014892578125 ], "content": [ "Question : I downloaded the binaries of the latest stable version of apache-mime4j 0.7.2 . Yet I fail to compile the next code since MboxIterator CharBufferWrapper classes are not found . The jars included in my build path : apache-mime4j-core-0.7.2.jar apache-mime4j-dom-0.7.2.jar . Am I using the wrong jars or version .. . Answer : You can clone the current snaphshot of the mime4j project from .. . .. . http : svn.apache.org repos asf james mime4j trunk .. . .. . to your personal github account .. . .. . or use my clone : .. . .. . https : github.com WolfgangFahl james-mime4j .. . .. . and your MBoxIterator is here : .. . .. . https : github.com WolfgangFahl james-mime4j tree trunk mbox src main java org apache james mime4j mboxiterator", "Question : null .. . Answer : In one of my Java applications I have to forward e-mails . So I get e-mails plain text or multipart with any content maybe also attachments . I edit their subject from- and to-header and send them via SMTP . I already implemented this using Apache James Mime4j http : james.apache.org mime4j apidocs index.html and Apache Commons Net http : commons.apache.org proper commons-net javadocs api-3.3 index.html but now I also have to append a footer signature to the content of each e-mail . Can I achieve this with Mime4j too Would be great How If not : is there another way .. . .. . EDIT : Details after Wolfgang Fahl s comment : .. . .. . Maybe I m using the library the wrong way but I am parsing the message as follows : .. . .. . Now I have an instance of Message and I can set it s subject sender etc . But Message https : james.apache.org mime4j apidocs org apache james mime4j dom class-use Message.html does not provide a method setText or something like that . Ok there is getBody but then I don t know how to manipulate the Body https : james.apache.org mime4j apidocs org apache james mime4j dom Body.html . Comment : Usually a footer is just part of the text of the message . So setText would be your function . I assume you d like to do something different - please explain what you are up to - may be with a code example . Comment : Thanks for trying to help me . I edited my question and added some details about my code . Basically I don t know what setText method you mean . Comment : I see what s going on . Personally I do not use James methods for sending mail by SMTP . I use javax.mail.Message . See e.g . stackoverflow.com questions 13358453 http : stackoverflow.com questions 13358453 sending-an-mail-in-java-using-smtp for how to use it . You ll need to adapt from the james message to java s standard way on how to do things if you try this route .", "Question : I downloaded the binaries of the latest stable version of apache-mime4j 0.7.2 . Yet I fail to compile the next code since MboxIterator CharBufferWrapper classes are not found . The jars included in my build path : apache-mime4j-core-0.7.2.jar apache-mime4j-dom-0.7.2.jar . Am I using the wrong jars or version .. . Answer : I had the same problem but I ended getting it to work by doing a little research . The classes you mention at least by what I found are not included into Mime4J so you have to code them yourself . Thanks to the devs they got them uploaded in the following link : MBoxIterator needed classes http : svn.apache.org repos asf james mime4j trunk mbox src main java org apache james mime4j mboxiterator . Hope those solve the problem .", "Question : null .. . Answer : I ve a lot of .eml files and need to parse them . I m using mime4j version 0.6.1 and wanna to update to version 0.7.2 but cannot find any good sample . I read post apache mime4j maven-dependency for 0.7.2 https : stackoverflow.com questions 15070543 apache-mime4j-maven-dependency-for-0-7-2 15070696 15070696 and it helped me to get right maven-dependency . But it s still a lot of problems with new methods . For example in version 6 class Multipart got method getBodyParts and return List BodyPart and now it returs List Entity . Does anyone have good example how to parse SMTP eml email with mime4j 0.7.2 Comment : What about james.apache.org mime4j samples.html https : james.apache.org mime4j samples.html It should have fresh samples in distribution pack . Comment : Of cause I saw this . If you so smart please give me example . How you convert Entity to BodyPart because I got java.lang.UnsupportedOperationException", "Question : I downloaded a mailing list archive from SourceForge . Mailing lists are each automatically archived to a mbox file . So now I need to extract the body from mbox file using Java . Is there a mailbox parser in Java Thanks .. . Answer : This blog http : ieugen.blogspot.com 2012 06 java-mbox-parsing-with-apache-james.html shows how to do it with Apache Mime4j Comment : this is in version 0.8 that wasn t released the latest version 0.7.2 doesn t have this functionality . How can this solution be used Comment : The source code is available from the website at james.apache.org mime4j start build.html http : james.apache.org mime4j start build.html You can download the trunk from svn which does have this functionality and build it yourself . Comment : thanks . I built the code and ran the sample svn.apache.org repos asf james mime4j trunk examples src main http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java on several mbox files from enron dataset and my own mbox downloaded from gmail and always all of the fields of all Messages are null the DefaultMessageBuilder seem to fail while MboxIterator seem to work . Do you have any sample mbox that works with this code I can t get anything other than null Comment : Sorry no . Haven t used this ln quite a while and no longer have whatever mbox I was converting . Comment : Even when I run mime4j test mbox file github.com ieugen mbox-iterator blob master src test resources https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug DefaultMessageBuilder fails and all fields are null even that MboxIterator finds 5 messages as it should . I am starting to lose hope. . will open an SO question", "Question : Can anybody help in pointing me to some code to extract attachments from Multipart Mime using Mime4j I couldn t find any I need it for Mime4j 0.7.2 latest . I am trying to process attachments from James Hook Mailets . Comment : Did you check the mime4j documentation Are you saying a simple web search did not turn up anything What code do you have so far What exactly is not working Comment : Yes I searched but couldn t anything fruitful . Here is a paste of my code mostly from james mime4j . I want to extract the body and attachments I don t want to write my own parser as there are all sorts of emails that can mess up my parser . pastebin.com w3YvBydp http : pastebin.com w3YvBydp Comment : Anybody can help here I don t know how to extract the attachment precisely from this : List MIMEPart parts mm.getAttachments .. . Answer : Ok found the answer just have to loop parts.get i .readOnce or read .", "Question : I found this example for parsing an email : http : www.mozgoweb.com posts how-to-parse-mime-message-using-mime4j-library .. . .. . But the example is not working because import org.apache.james.mime4j.message.Message is not working . How can I create a Message from a file Comment : What specifically isn t working Did you setup the dependency properly Comment : The problem is that the import import org.apache.james.mime4j.message.Message is not working . Message is not known . Others imports like import org.apache.james.mime4j.message.BodyPart is ok .. . Answer : You need this jar in your classpath : .. . .. . http : central.maven.org maven2 org apache james apache-mime4j 0.6.1 apache-mime4j-0.6.1.jar .. . .. . Dependency For maven : Comment : Added this jar file works now thanks Comment : Now I have another problem : I am getting this error : NoSuchMethodError on new Message fis . fis is a file input stream Comment : @Peter . . I downloaded the jar extracted and can see the constructor public Message InputStream is . Are you doing the right import org.apache.james.mime4j.message Comment : Yes import org.apache.james.mime4j.message.Message even tried new org.apache.james.mime4j.message.Message fis Comment : @Peter Are you getting on run-time or its not letting you compile it", "Question : I just downloaded and setup the Apache James 3 latest beta release on Windows and so far i haven t been able to send a simple message . It looks like there is an issue with the build . The error is - .. . .. . The relevant class in the JAR shows the supposedly missing constructor so i am at a complete loss . Can anyone guide me in the right direction please Thanks in advance Edit : Decompiled code snippet from the MimeConfig class shows the constructor Comment : Posting your code will help people understand it more clearly . Comment : The relevant class in the JAR shows the supposedly missing constructor -- how specifically did you verify this Comment : It s not my code i just created users and sent mail per the Quickstart guide james.apache.org server 3 quick-start.html https : james.apache.org server 3 quick-start.html Comment : @DavidP.Caldwell I looked at the source code. . Comment : The source code may not be a valid guide here unless you built the source code yourself and did not use some kind of binary distribution . See if you can examine the relevant classes with the javap command . .. . Answer : I got the same error and was searching for an answer . The error is because MimeConfig doesn t have a default constructor . I could get the mail successfully delivered locally by doing to following . 1 . Dowloaded apache-mime4j-core-0.8.0-20150617.024907-738-sources .. . 2 . Created a default public constructor for MimeConfig .. . 3 . Initialized all the variables with values shown in the static-class Builder constructor .. . 4 . Added setters for all the variables Because I was getting NoSuchMethodError for setMaxLineLen .. . 5 . Created a jar called apache-mime4j-0.8.0-fix.jar and pushed into the lib folder .. . 6 . I use run.sh so replaced the mime4j core jar name with the above one . I am sure there is some mismatch between spooler and mime4j . I think the calling code should use the Builder instead of directly trying to instantiate the MimeConfig . Try these and let me know if it works . It worked for me . I am not sure if this is a permanent fix but I can go ahead with exploring the V3 features till we get a permanent solution .", "Question : I ve downloaded mime4j 0.8.0 snapshot from subversion and built it with maven . The relevant jars I generated can be found here https : www.dropbox.com sh se5jhtix4h7cvo3 AAAGlUEbTv6Acp8lWHEnMtR5a dl 0 . Now I try to parse a toy mbox file https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug from mime4j test . I use this sample code http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java . Briefly : .. . .. . + .. . .. . The output is : .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Found 5 messages .. . .. . There are indeed 5 messages but why are all fields null Comment : Could you just print the raw message in the loop in order to see if it s correctly constructed System.out.println message .. . Answer : Based on @zvisofer answer I found the guilty piece of code http : grepcode.com file repo1.maven.org maven2 org.apache.james apache-mime4j-core 0.7 org apache james mime4j io BufferedLineReaderInputStream.java v source in BufferedLineReaderInputStream : .. . .. . The best thing to do would be to report the bug but here is a fix a little dirty but it s working fine .. . .. . Create the class org.apache.james.mime4j.io.BufferedLineReaderInputStream in your project .. . .. . Replace the method public int readLine final ByteArrayBuffer dst by this one : .. . .. . Enjoy both unix and dos files : Comment : This code causes 5 build tests to fail one of them is error . I guess that it will fail if you have r not followed by n Comment : Yes my fix can be improve I guess handling the case-when r is alone Comment : using : byte microsoftSucks byte r byte n int i indexOf microsoftSucks Fixes 3 tests but two are still failing", "Question : I am trying to move from Javamail to mime4j in the hope of having less trouble parsing mail . However I haven t managed to find out how to connect to a mail-server to then use mime4j to parse messages . Javamail provides session and connections to a mail-server via IMAP or POP3 from which you then read Messages . As far as I can tell mime4j does not offer anything equivalent . So how can I connect to mail servers to use mime4j Can I use Javamail in conjunction with mime4j I have tried using the javamail Message.getInputStream method to get an input stream that I pass to mime4j s DefaultMessageBuilder.parseMessage . However the result is not what I expect : for a multipart message containing a plain text part and an html part only one TextBody is created . I suspect this is because the DefaultMessageBuilder.parseMessage is expecting a stream for the whole message not just the body but that javamail Message.getInputStream only provides the body . In fact I m only interested in the body since this is what was causing problems with Javamail but parsing the whole message if I could get it as an input stream form Javamail would do just as well . Any help greatly appreciated .. . Answer : If you re using POP3 all the message parsing happens on the client-side in JavaMail . Have you looked at the many properties you can set in JavaMail to configure how parsing errors are handled If you re using IMAP most of the parsing is done by the server . What sort of parsing errors are you still having with JavaMail Are they problems parsing the content of the email messages or problems parsing the IMAP protocol messages With more details of the problems you re running into I might be able to help you configure JavaMail to work for you . If you really want to use another MIME message parser you ll need to use the Message.writeTo method to get the entire MIME content of a message which you can pass to some other library to parse . Comment : I ve been using IMAP but experiencing hanging when using methods on the Body using Javamail rather than errors . I tried various suggested methods to force parsing on the client-side like making a copy of the Message but none worked . Perhaps just using POP3 would work better . Just tried the Message.writeTo and it works . I tried it before but must have misinterpreted the results . Thanks Comment : Hangs usually mean your server is broken . Again I m glad to help you make JavaMail work but I need a lot more details of the problems you re having . Feel free to send me the details at javamail ww@oracle.com if you don t want to deal with it here . Comment : Thanks for your offer of help Bill . I m going to stick with the Mime4j solution you ve given me for now . Cheers", "Question : null .. . Answer : I m trying to parse raw email messages over HTTP one at a time that come in MIME multipart . Here is a chunk of one of the mails the mail that my code most recently threw this exception on .. . .. . And here is i think the relevant chunk of that mail : .. . .. . Is there a Scala library out there for easily handling this type of input Otherwise is there an easy way to write some code that handles it I ve been looking at mime4j http : james.apache.org mime4j and this scala code https : github.com mattanja messenger blob c2c8cc009f3fa65868633a929aecb078a10ea624 app models Email.scala in particular . As of now my code just uses scala.io.Source.fromURL to scrape the raw mail as follows : .. . .. . which turns the BufferedSource into a String and splits it : .. . .. . I ve also tried using an implicit codec since scala.io.Source.fromURL http : www.scala-lang.org api 2.11.5 index.html scala.io.Source 24 can take a codec : .. . .. . but I think I d need one of these for each charset Any help is greatly appreciated . Comment : MIME parsing is not easy because the grammar is not very well defined . The problem is that I m under the impression that it has been built block by block . Thus you the informations are very sparse and there is not a one-standard format . I read the RFCs multiple times and writing a compliant MIME parser is not an easy task because of this problem . As a semester project I started to implement a MIME parser to show how you can interleave multiple parsers with a MIME parser when you have a multipart message . It s really an early implementation and does not follow the RFCs because I only focused. . Comment : on the interleaved part . Nevertheless you can maybe tweak complete the current implementation I started very incomplete github.com alexcrt interleaved-parsers blob master src main https : github.com alexcrt interleaved-parsers blob master src main scala mime MIMEParser.scala . I used the parser-combinators API . If you have a clear well defined grammar for your input then it shouldn t be very hard to complete this code to parse the email messages . However you may want to look at other libraires for MIME parsing . If you re not limited to Scala you may try Flanker github.com mailgun flanker https : github.com mailgun flanker which can parse MIME messages . Hope it helps a bit :", "Question : I m trying to use mime4j to parse emails all is working fine however I m not able to get the file name of the attachment . Unfortunately the BodyDescriptor doesn t include this information in the content-disposition or content-type fields . I have read that the MaximalBodyDescriptor will include the filename however I don t know how to tell the parser to return a MaximalBodyDescriptor object . My handler is implementing the ContentHandler interface . I can t see an alternate interface which would work . Any advice appreciated . Comment : I have the same issue . I wonder if @Joe Cheng could shed any light on it .. . Answer : I recommand you to use Token streams http : james.apache.org mime4j usage.html . It is quite straight forward with it . You can locate attachment by using headers of your multipart section : .. . .. . You must be carefull when parsing a header with it .. . It can be mail headers or multipart section header... .", "Question : I encountered a problem when parsing email with mime4j . The email has an attachment and I use MimeStreamParser to parse it . The parser does not call startMultipart method at all . Instead it only calls body method once and the BodyDescriptor is text plain . I do not know the root of this problem the email format or my program Here is my test program : .. . .. . Here is a part of my email file : .. . Answer : Use the following library based on mime4j : email-mime-parser https : github.com ram-sharma-6453 email-mime-parser .. . .. . The provided sample code takes care of email parsing and the resulting email object provides convenience method for the solution of your problem : Comment : Whilst this may theoretically answer the question it would be preferable meta.stackoverflow.com q 8259 to include the essential parts of the answer here and provide the link for reference .", "Question : I ve downloaded mime4j 0.8.0 snapshot from subversion and built it with maven . The relevant jars I generated can be found here https : www.dropbox.com sh se5jhtix4h7cvo3 AAAGlUEbTv6Acp8lWHEnMtR5a dl 0 . Now I try to parse a toy mbox file https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug from mime4j test . I use this sample code http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java . Briefly : .. . .. . + .. . .. . The output is : .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Found 5 messages .. . .. . There are indeed 5 messages but why are all fields null Comment : Could you just print the raw message in the loop in order to see if it s correctly constructed System.out.println message .. . Answer : I downloaded your jar files the sample code that you pointed to and the sample mbox file that you pointed to compiled the sample with no changes and ran it against the sample mbox file . It worked as expected fields contained the expected data not nulls . This was on a Mac with Java 1.6 0 65 and also with 1.8.0 11 .. . .. . Output was as follows : .. . .. . java -cp . : apache-mime4j-core-0.8.0-SNAPSHOT.jar : apache-mime4j-dom-0.8.0-SNAPSHOT.jar : apache-mime4j-mbox-iterator-0.8.0-SNAPSHOT.jar IterateOverMbox mbox.rlug.txt .. . .. . Message Din windows ma pot din LINUX NU ma pot conecta la ZAPP Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Re : RH 8.0 boot floppy Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Qmail mysql virtualusers +ssl + smtp auth +pop3 Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message Re : Din windows ma pot din LINUX NU ma pot conecta la ZAPP Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Message LSTP problem - solved Sent by : rlug-bounce@lug.ro To : rlug@lug.ro .. . .. . Found 5 messages Done in : 108 milis Comment : It fails for me on two windows machines . I will try other OS Comment : also tried with java 1.6.0 to no avail. .", "Question : I ve downloaded mime4j 0.8.0 snapshot from subversion and built it with maven . The relevant jars I generated can be found here https : www.dropbox.com sh se5jhtix4h7cvo3 AAAGlUEbTv6Acp8lWHEnMtR5a dl 0 . Now I try to parse a toy mbox file https : github.com ieugen mbox-iterator blob master src test resources test-1 mbox.rlug from mime4j test . I use this sample code http : svn.apache.org repos asf james mime4j trunk examples src main java org apache james mime4j samples mbox IterateOverMbox.java . Briefly : .. . .. . + .. . .. . The output is : .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Message null Sent by : null To : null .. . .. . Found 5 messages .. . .. . There are indeed 5 messages but why are all fields null Comment : Could you just print the raw message in the loop in order to see if it s correctly constructed System.out.println message .. . Answer : I found the problem . DefaultMessageBuilder fails to parse mbox files that have windows line separator r n . When replacing them with UNIX line separator n the parsing works . This is a critical issue since the mbox files downloaded from Gmail use r n . Comment : You might want to post a change request for the apache james project . My experience with the community there is good .", "Question : I ve implemented a solution to parse Email Files .eml into objects using Mime4J . The process parses an email file create an object and write a new file to disk . I was wondering if is possible to send the MimeMessage of Mime4J through Transport.send mimeMessage instead to create a new file . .. . Answer : The simplest approach would be to use the Mime4J Message.writeTo method to write the message to a ByteArrayOutputStream then wrap the byte array with a ByteArrayInputStream and use that to construct a JavaMail MimeMessage object . A more complex but more efficient approach would be to create a class that subclasses MimeMessage and delegates most of the methods to the corresponding methods on the Mime4J Message object . Comment : you re the man . Thank you", "Question : MIME message senders appear in formats such as : .. . .. . I m trying to figure out how to extract the string johndoe@gmail.com in the above examples although I will also need the johndoe and gmail.com parts per RFC I m pretty sure splitting on @ is all that s needed from here . Obviously regex-ing up my own parser is one not great option . It seemed this may be possible using javax.mail.internet.MimeMessage http : docs.oracle.com javaee 1.4 api javax mail internet MimeMessage.html . All of the constructors require a Folder which I do not have well I sort of do it exists in the IMAP layer e.g . Which makes me feel I m using this class wrong . Nonetheless if I parse this way I do get access to the getFrom method which returns an array of Address http : docs.oracle.com javaee 1.4 api javax mail Address.html which itself doesn t offer methods of use to me . Using mime4j it s easy to get this far : .. . .. . So using mime4j or using java javax etc . utilities it should be possible to extract the a@b.com part of the address from there but I haven t found a class within javax or mime4j that is responsible for this yet . .. . Answer : I think you need InternetAddress class from javax.mail : http : docs.oracle.com javaee 6 api javax mail internet InternetAddress.html getAddress .. . .. . Minimum working example : Comment : Yes thanks got it from here . To make this a good answer though you should include how to use it - I upvoted because this helped me but it s close to a link only answer .", "Question : I encountered a problem when parsing email with mime4j . The email has an attachment and I use MimeStreamParser to parse it . The parser does not call startMultipart method at all . Instead it only calls body method once and the BodyDescriptor is text plain . I do not know the root of this problem the email format or my program Here is my test program : .. . .. . Here is a part of my email file : .. . Answer : The problem is with the sample email which not multipart . It contains as inline text a multipart email . Remove the first headers FROM MAILER and then make sure all lines following after Content-Type are indented eg charset and boundary by at least one whitespace character as required by the spec RFC822 or later or remove the linefeed . See example : .. . .. . Change from : .. . .. . to either : .. . .. . or : .. . .. . Alternatively try a different message .", "Question : I am working with MIME4J to read MIME events from an email stack dump . I am attempting to read a given message event as defined by the START MESSAGE and END MESSAGE headers as an entire event as I will be moving the process to a distributed filesystem eventually and need to plan for file-split boundary traversing . For the event-based parsing in mime4j a ContentHandler interface is required and methods are called from it by the parser which requires the handler be set to it . I have experimented with a sample Handler from another SO answer that extends the mime4j packaged SimpleContentHandler but that one really only parses headers . I am trying to build my custom ContentHandler class to gather the complete message as one event . I would then need to have the event in a temporary object so I could parse headers their fields and the contents of the fields out of it . The end goal is to adapt this behavior into MapReduce so coping with the chance that one part of the email will be on one filesplit and another part in a different filesplit is necessary . For my custom ContentHandler I ve gotten as far as : .. . .. . And for a main I am using : .. . .. . So any help on how to build the information in the handler would be really helpful . I ve tried setting a new MessageImpl then using a builder to copy a parsed stream into it and I have also tried to build a newMessage from a parse of the stream and then print the Message when the END MESSAGE header is read but it printed nulls . I may be experiencing a conceptual blind spot too . If that s the case I am ok with it being pointed out . Thanks Comment : Using the dom parser might be much easier . .. . Answer : Here is a code excerpt that works for me . As soon as I find an interesting message with the statebased parser i switch to the dom parser to create a message object .", "Question : null .. . Answer : I am using Mime4J to mime-encode a message . I have a text part and attachments which I add to a MultipartImpl object . My problem is this : all of the examples I can find involve attaching the MultipartImpl object to a MessageImpl object ready for sending via email . But I do not want to do this . I simply want to encrypt the multipart text itself . I tried using the following : .. . .. . but this gives me the following error : .. . .. . as the MessageWriter expects the Multipart to have a parent . Is there a way to get the multipart to output to text without having to attach it to a message" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
lfe@erlang@38
lfe -- lfe stands for lisp flavoured @placeholder a lisp syntax front-end to the erlang compiler .
{ "confidence": [ 74.09627532958984, 71.62333679199219, 58.196712493896484, 56.14133071899414, 55.6461067199707, 54.57942199707031, 53.90653610229492, 52.55436706542969, 51.16011047363281, 49.97487258911133, 49.818092346191406, 48.92493438720703, 48.22608947753906, 48.22608947753906, 48.10614013671875, 45.51348114013672, 44.87895965576172, 44.87895965576172, 44.83089828491211, 43.753849029541016, 43.753849029541016, 43.753849029541016, 43.61518096923828, 42.61119842529297, 42.61119842529297, 42.517887115478516, 42.34123992919922, 42.34123992919922, 42.34123992919922, 42.34123992919922, 42.34123992919922, 41.7464485168457, 40.772491455078125, 40.74246597290039, 40.74246597290039, 40.74246597290039, 39.28219985961914, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.90375900268555, 38.562442779541016, 37.87733459472656, 37.359046936035156, 36.83293151855469, 36.14222717285156, 36.14222717285156, 36.14222717285156, 36.14222717285156, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 34.273494720458984, 33.698116302490234, 33.698116302490234, 33.698116302490234, 31.767654418945312, 31.43967056274414, 31.43967056274414, 31.43967056274414, 31.43967056274414, 31.163578033447266, 30.950450897216797, 30.03671646118164, 28.26568603515625, 28.26568603515625, 28.26568603515625, 28.26568603515625, 27.756393432617188, 26.6661376953125, 23.346302032470703, 22.96416473388672, 22.735553741455078, 22.735553741455078, 22.484378814697266, 22.484378814697266, 21.61294174194336, 21.31685447692871, 21.31685447692871, 21.31685447692871, 19.74420738220215, 19.74420738220215, 19.74420738220215, 17.703685760498047, 16.634855270385742, 16.53327178955078, 14.13998794555664, 14.13998794555664 ], "content": [ "Does Lisp Flavored Erlang LFE work on Windows", "Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE .", "My common-lisp example looks as follows : .. . .. . What is the LFE equivalent", "I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem .", "@Inaimathi OK there is a Google group groups.google.com group lisp-flavoured-erlang http : groups.google.com group lisp-flavoured-erlang with some traffic not much .", "LFE is great as Lisp environment that targets Erlang VM but I think that exposing itself using CaaS compiler as as service pattern is a very cool thing .", "It is an LFE shell script which parses it arguments and run the LFE compiler .", "As with erlang any text-editor will work to edit LFE .", "LFE equivalent", "Also while it is nice to use it you don t need to use the LFE shell to run LFE you can use the normal Erlang shell and just call the LFE functions in the normal way .", "The problem here is that Erlang can t find the LFE ebin directory .", "Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter .", "LFE is not supported by OTP so erlc does not know about .lfe files .", "A simple way is use to the lfe command to run LFE scripts .", "To compile an LFE file from the normal erlang-shell do .. . .. . while from the LFE shell do : .. . .. . There is a bunch of documentation in lfe docs which is quite accurate but the user guide.txt needs to be extended .", "Put the whole LFE directory there .. . .. . When you start erlang you will then see Users rv erlang lib lfe ebin or wherever you have it in the code path code : get path .", "Then just drop the whole LFE directory there .", "Fixed - I meant the lfe package", "@gsscoder Yes it is a stand-alone LFE compiler which compiles a .lfe file into a .beam file in the same way that erlc compiles .erl file into .beam files .", "I m not an LFE user but there is a user guide http : github.com rvirding lfe blob master doc user 5Fguide.txt in the source tree .", "You will then also be able to start the LFE shell directly with .. . .. . There will be an lfe and an lfe.bat which does this included as well in the future .", "Is there a similar solution in the lfe package for panel objects so that I can take advantage of the speediness that lfe provides", "I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit .", "Two ways to solve this problem are : .. . .. . Use an explicit -pa lfe ebin dir argument when starting LFE either in the lfe.bat script or when you call it .", "Very simple really : just use MSYS2 and Mingw-w64 to build LFE then run it from the build directory via . bin lfe .", "If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want .", "You cannot yet run LFE in a window .", "Just as a matter of interest what are using LFE for", "I m mostly using LFE for fun at the moment .", "The current version of lfe 2.3 handles this i.e .", "Following image shows that LFE truncates displayed results .", "When erlang starts the code server will automatically add the lfe ebin directories into the path and the .beam files there will automagically be found and loaded .", "This is also described in How do I install LFE on Ubuntu Karmic", "There is also a Google group for LFE at .. . .. . which contains some interesting discussions and people have written quite a lot in the github LFE wiki .", "In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter", "To see it printed in LFE format you can use .. . .. . or much easier in the LFE repl : .. . .. . There is also a p .. . call which writes it out without prettyprinting .", "Something I do in this case is often to use io : format : .. . .. . I guess it s the same with LFE but with slightly different syntax .", "I ve read through all the documentation and most of the source of LFE .", "Does anyone know how LFE handles messaging primitives", "There is a serious lack of examples in the LFE release all contributions are welcome .", "The LFE let is a real let in which the variable bindings are visible first in the body .", "For emacs there is an LFE mode which is still rather basic but works .", "As the author of the lfe-package I can shed some light on this .", "The lfe-package is intended for very large datasets in the gigabyte-class .", "I d invoke it from a Makefile with . lfec -o ebin src lfe .", "It would be great to have this explained in LFE docs or also in a blog post .", "The lfe behaves in similar fashion to bash in that you can use it to run scripts .", "Try starting Erlang in the normal way with werl.exe -pa ebin to get the right load path and manually starting the LFE shell with lfe shell : server . .. . .. . Try starting Erlang with werl.exe -pa ebin -noshell -s lfe shell start .", "All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros .", "I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application .", "If you create an extra Erlang library directory say c : projects erlang drop Erlang apps which follow the Erlang application directory structure as LFE does and point ERL LIBS at it then the code server will automatically add ebin directories it finds there to its code path .", "I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this :", "http : stackoverflow.com questions 2835942 how-do-i-install-lfe-on-ubuntu-karmic but in a UNIX context .", "There s one tweak needed it seems : the last line of bin lfe seems to require a tweak to call werl instead of erl .", "I don t seem to be able to find how I can make push or reverse work in LFE .", "One suggestion is to automatically map - in LFE symbols to in the resultant atoms and back again going the other way of course .", "The Makefile in LFE is less than perfect and should be ignored it will be improved upon in the next release .", "The best way to include this is to put the following in your .emacs file : .. . .. . There are some example files in lfe examples all should work .", "In lfe test visual there is a bunch of my test files which have been included as example files .", "Is there a standard way of compiling .lfe source files from a make rule in an OTP project", "Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc .", "Now I just need to work out which options are useful in an LFE context .", "The next release of lfe in a month or so will support this directly with pseries provided plm is loaded .", "The cool thing I want to point out is that this can be done in LFE itself or from Elixir", "enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE", "I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code .", "I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation .", "Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration", "Erlang was already installed : .. . .. . Erlang seems to work : .. . .. . I downloaded lfe from github and checked out 0.5.2 : .. . .. . Must be something stupid i missed : o .. . .. . Is there an example how I would create a hello world source file and compile and run it", "When I run a cluster standard-error panel specification with plm and lfe I get results that differ at the second significant figure .", "From reading it I would guess it is something like this : .. . .. . But I m very likely to have made a mistake since I haven t even evaluated it in LFE .", "An early version of lfe actually had lm as an inherited class for felm but since this creates the impression that it actually is an lm-object I removed it .", "Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching .", "My small experience is that the syntactic mapping between lisp and erlang disappears very quickly from view which means that a coder will read erlang source and mentally translate it by substituting parentheses for commas etc .", "I did as suggested and got this : C : temp lfe erl -pa ebin -noshell -noinput -s lfe boot start ERROR REPORT 18-Jan-2011 : : 00 : 22 : 52 Error in process 0.28.0 with exit value : badarg erlang register user 0.29.0 user start port 1", "I ve also documented this with slightly more detail on my personal blog : http : www.vultaire.net blog 2016 05 02 installing-lisp-flavored-erlang-on-windows .. . .. . Hope this helps someone out", "I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm .", "This might not be the answer that you are looking for but it seems that the author did not add any functionality to the lfe package in order to make predictions on external data by using the fitted felm model .", "The lfe package is intended to be run on very large datasets and effort was made to conserve memory : As a direct result-of this the felm object does not use contain a qr decomposition as opposed to the lm object .", "Before getting this reply I was reasoning about the two scripting patterns you quoted ending that probably the best solution could be return a data structure from LFE like a tuple .", "Y b0 + b1 X1 + b2 X2 + b3 Q + b4 W + C1 factor id + C2 factor firm .. . .. . W d0 + d1 X3 .. . .. . Q e0 + e1 X4 .. . .. . Here is the part where I use generated data for Y X Q W .. . .. . I can estimate the coefficients using the old lfe syntax .. . .. . But the package strongly discourages the use of old syntax and I do not know how to specify different first stage equations in the new syntax .", "It just looks interesting and I m partial to Lisp so I m playing with writing some simple components in it to get comfortable .", "Erlang ecosystem is truly mature and powerful .", "No I have so far kept all the Erlang core function names just as they are in vanilla erlang .", "Imagine all the time that has been spent informing users of Common Lisp that atom names are not case insensitive but that the reader is just uppercasing atoms before interning them .", "If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp .", "Make an libs directory say erlang lib .. . 2 .", "Certainly nothing I couldn t do with vanilla Erlang .", "Honestly I don t know why this is I m too green behind the ears with Erlang to say why .", "Set the environment variable ERL LIBS export ERL LIBS erlang lib .. . 3 .", "I understand that I can set a seq trace in erlang to the current process that is executing .", "Let s use our Erlang shell to set this all up .", "The easiest way to handle this to create a private erlang library directory and point the environment variable ERL LIBS to it .", "Erlang tools work for elixir as well so anyone using them in elixir could answer this question .", "Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps .", "To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 .", "I think another step of rewriting identifiers would trip me up almost every time as I would only be looking to rewrite syntax .", "For more information see the seq trace http : www.erlang.org doc man seq trace.html and dbg http : www.erlang.org doc man dbg.html man pages and also read the match specification chapter of the Erlang Run-Time System Application ERTS User s Guide http : www.erlang.org doc apps erts match spec.html .", "Simple but hard wired .", "Use the ERL LIBS environment variable ." ] }
{ "confidence": [ 102.8219223022461, 91.87940979003906, 90.8295669555664, 84.86298370361328, 84.50798034667969, 84.41149139404297, 78.90155792236328, 74.18812561035156, 68.85617065429688, 57.49336242675781, 54.75859451293945, 50.648277282714844, 50.648277282714844, 47.502044677734375, 46.20224380493164, 44.4785270690918, 38.585933685302734, 35.495338439941406, 31.366365432739258, 31.366365432739258 ], "content": [ "Question : I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application . If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp . I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code . I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation . Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter . The latter is the one I m trying to use . If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want . I d like rather to bind a variable and read its value that s my issue : .. . .. . Why set is recognized as an unbound function In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter If this is explained somewhere please provide the reference . Comment : The reason is that set is a shell command it doesn t exist outside the shell . Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching . Can you give a better example of how you would like to use it Comment : +1 Thanks for clarification . I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem . Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps . Suppose my app is a server and I want the connection timeout to be handled externally in my config.lfe what s the best way to follow Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration Comment : Since this question is quoted in a LFE google group post I think it could be useful for those who are interested in these arguments link back to the group thread from here . Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE . .. . Answer : A simple way is use to the lfe command to run LFE scripts . The lfe behaves in similar fashion to bash in that you can use it to run scripts . The lfec script defined in bin lfec is a good example of this . It is an LFE shell script which parses it arguments and run the LFE compiler . Comment : 1+ Yes bin lfec is an interesting example of using lfe comp : file 2 that if I m not wrong compiles the script behind scenes . LFE is great as Lisp environment that targets Erlang VM but I think that exposing itself using CaaS compiler as as service pattern is a very cool thing . Comment : @gsscoder almost lfe comp : file 2 compiles the file which is the argument to lfec the script itself is interpreted . Comment : @rivirding You mean compiled as it s turned into bytecode for BEAM Comment : @gsscoder Yes it is a stand-alone LFE compiler which compiles a .lfe file into a .beam file in the same way that erlc compiles .erl file into .beam files .", "Question : Is there a standard way of compiling .lfe source files from a make rule in an OTP project According to the docs I m supposed to use lfe comp : file 1 which doesn t help much if I want to compile multiple such files in an OTP application where I m supposed to keep the source files in src but the binaries in ebin . Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc . The best solution I can think of off the top of my head is .. . .. . but that seems inelegant . Any better ideas .. . Answer : Not really . LFE is not supported by OTP so erlc does not know about .lfe files . And as far as I know there is no way to open up erlc and dynamically add information how to process files . An alternative would be to write an lfec script for this . I will think about it . Just as a matter of interest what are using LFE for Comment : I ve posted a first stab at it . I m mostly using LFE for fun at the moment . Certainly nothing I couldn t do with vanilla Erlang . It just looks interesting and I m partial to Lisp so I m playing with writing some simple components in it to get comfortable . Comment : @Inaimathi OK there is a Google group groups.google.com group lisp-flavoured-erlang http : groups.google.com group lisp-flavoured-erlang with some traffic not much . The develop branch on github has some new stuff which hasn t made it to the master branch yet .", "Question : I d like to use Lisp Flavored Erlang as a scripting extension language for an Erlang application . If you want in a similar way GNU Emacs http : www.gnu.org software emacs is configured and extended via Emacs Lisp http : www.gnu.org software emacs manual html node elisp . I know that the argument is wide and structured but in the specific case of this question I d like being able to read a binding name or variable if you prefer defined in LFE from Erlang code . I m not an expert of LFE http : lfe.io internal architecture which is an excellent example of software-engineering and Erlang programming but I was not able to find an answer neither in the sources nor in the documentation . Looking at sources https : github.com rvirding lfe I can see that LFE contains both a compiler that target Erlang VM http : stackoverflow.com questions 16779162 what-kind-of-virtual-machine-is-beam-the-erlang-vm and an interpreter . The latter is the one I m trying to use . If I start Erlang shell REPL in LFE installation path on my system HOME opt lfe : .. . .. . I m able to calculate a value : .. . .. . This is a first step but not exactly what I want . I d like rather to bind a variable and read its value that s my issue : .. . .. . Why set is recognized as an unbound function In LFE REPL this expression is valid : .. . .. . I m obviously using the API in the wrong way . How can I read the content of a and or properly initialize the LFE interpreter If this is explained somewhere please provide the reference . Comment : The reason is that set is a shell command it doesn t exist outside the shell . Normally in LFE code you bind variables using let case lambda match-lambda or other places where you have pattern-matching . Can you give a better example of how you would like to use it Comment : +1 Thanks for clarification . I m learning various Lisp s and found LFE the most interesting cause lives in Erlang ecosystem . Now I m trying to experimenting various ideas but basically I want to be able to use the system as a configuration DSL for Erlang apps . Suppose my app is a server and I want the connection timeout to be handled externally in my config.lfe what s the best way to follow Should I define a get-conn-timeout function and read its result or better create a set conn timeout from Erlang and attach it to the LFE session created for reading the configuration Comment : Since this question is quoted in a LFE google group post I think it could be useful for those who are interested in these arguments link back to the group thread from here . Lisp Flavored Erlang https : groups.google.com forum forum lisp-flavoured-erlang LFE configuration script LCFG and the likes https : groups.google.com forum topic lisp-flavoured-erlang S5s6c5DovEE . .. . Answer : I won t attempt to answer completely your broader question about the best practices of adding scripting . It seems to me that choosing between hook-based solution in which you define hook implementations by name convention and they are automatically recognized and explicit api solution in which you use functions predefinied in the scripting enviroment to register your hooks or otherwise call configuration functions is largely a matter of taste . Explicit calls like set-connection-timeout-handler .. . may be more readable easier to debug no misspelling problems no surprises on api changes easier to document and a bit more flexible but more well explicit . Building from your simple variable definition example here are a few ways you could get started going further the interpreted path : Comment : +1 This answers my question and puts me in the right path . Before getting this reply I was reasoning about the two scripting patterns you quoted ending that probably the best solution could be return a data structure from LFE like a tuple . You explain this and a lot more.. . The reply really helped me . It would be great to have this explained in LFE docs or also in a blog post . The cool thing I want to point out is that this can be done in LFE itself or from Elixir Erlang ecosystem is truly mature and powerful . Comment : Your reply the others and discussions on google group gave born to this : github.com gsscoder cup https : github.com gsscoder cup", "Question : I ve read through all the documentation and most of the source of LFE . All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros . Does anyone know how LFE handles messaging primitives To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 . .. . Answer : I m not an LFE user but there is a user guide http : github.com rvirding lfe blob master doc user 5Fguide.txt in the source tree . From reading it I would guess it is something like this : .. . .. . But I m very likely to have made a mistake since I haven t even evaluated it in LFE . Some questions of mine : .. . .. . Is there a LET form or is it behaving like one already Are guards called the more lispy is-integer and not is integer as I wrote", "Question : Does Lisp Flavored Erlang LFE work on Windows I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit . I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this : .. . Answer : My apologies I know this post is basically dead but I don t find other posts on the topic thus replying here seems appropriate . I believe I ve found a methodology that works . Very simple really : just use MSYS2 and Mingw-w64 to build LFE then run it from the build directory via . bin lfe . There s one tweak needed it seems : the last line of bin lfe seems to require a tweak to call werl instead of erl . Honestly I don t know why this is I m too green behind the ears with Erlang to say why . I ve also documented this with slightly more detail on my personal blog : http : www.vultaire.net blog 2016 05 02 installing-lisp-flavored-erlang-on-windows .. . .. . Hope this helps someone out", "Question : I ve read through all the documentation and most of the source of LFE . All the presentations emphasize basic lisp in traditional lisp roles - General Problem Solving Hello world and syntax emulating macros . Does anyone know how LFE handles messaging primitives To specify a more precise question how would you express this erlang : .. . .. . And then you know it mumbles something about having added up some numbers and the answer being 7 . .. . Answer : There is a serious lack of examples in the LFE release all contributions are welcome . Christian s suggestion is correct . My only comment is that there is no need to have capitalized variable names it is not wrong but not necessary . The LFE let is a real let in which the variable bindings are visible first in the body . You can use patterns in let . There is also a let form macro actually which binds sequentially . No I have so far kept all the Erlang core function names just as they are in vanilla erlang . It is definitely more lispy to use - instead of in names but what do you do with all the other function names and atoms in OTP One suggestion is to automatically map - in LFE symbols to in the resultant atoms and back again going the other way of course . This would probably work but would it lead to confusion I could then have a behaviour module looking like : .. . .. . But I am very ambivalent about it . Comment : It would probably lead to confusion . Imagine all the time that has been spent informing users of Common Lisp that atom names are not case insensitive but that the reader is just uppercasing atoms before interning them . Comment : My small experience is that the syntactic mapping between lisp and erlang disappears very quickly from view which means that a coder will read erlang source and mentally translate it by substituting parentheses for commas etc . I think another step of rewriting identifiers would trip me up almost every time as I would only be looking to rewrite syntax . I vote against the substitution .", "Question : Does Lisp Flavored Erlang LFE work on Windows I am using LFE 0.6 Erlang 5.8.2 Windows 7 32-bit . I copied the lfe shell script as a batch-file replacing @ with 1 2 3 4 and it gives me this : .. . Answer : The problem here is that Erlang can t find the LFE ebin directory . Two ways to solve this problem are : .. . .. . Use an explicit -pa lfe ebin dir argument when starting LFE either in the lfe.bat script or when you call it . Simple but hard wired . Use the ERL LIBS environment variable . This is described in the code module documentation http : erlang.org doc man code.html . If you create an extra Erlang library directory say c : projects erlang drop Erlang apps which follow the Erlang application directory structure as LFE does and point ERL LIBS at it then the code server will automatically add ebin directories it finds there to its code path . This is also described in How do I install LFE on Ubuntu Karmic http : stackoverflow.com questions 2835942 how-do-i-install-lfe-on-ubuntu-karmic but in a UNIX context . The ERL LIBS feature should definitely be better advertised . EDIT : Replying to @Shantanu Kumar s comment . I don t have access to a Windows machine so I can t test it properly . The problem seems to be that using lfe boot tries to start the port program ttysl which doesn t seem to work on Windows at least not when running erl.exe . Some solutions to try : .. . .. . Use werl.exe instead . This may work but I would do it anyway . Try starting Erlang in the normal way with werl.exe -pa ebin to get the right load path and manually starting the LFE shell with lfe shell : server . .. . .. . Try starting Erlang with werl.exe -pa ebin -noshell -s lfe shell start . This will run lfe shell as the shell but the G won t be available . Also while it is nice to use it you don t need to use the LFE shell to run LFE you can use the normal Erlang shell and just call the LFE functions in the normal way . You might become a little schizophrenic with two io formats but there are no problems . : - .. . .. . Hope this helps . Comment : I did as suggested and got this : C : temp lfe erl -pa ebin -noshell -noinput -s lfe boot start ERROR REPORT 18-Jan-2011 : : 00 : 22 : 52 Error in process 0.28.0 with exit value : badarg erlang register user 0.29.0 user start port 1 Comment : The second option werl.exe -pa bin followed by lfe shell : server . works . It also works with plain erl.exe however when I specify -noinput or -noshell or -s lfe shell start with werl.exe or erl.exe it starts causing error .", "Question : null .. . Answer : I m trying to write simple loop collecting values function . My common-lisp example looks as follows : .. . .. . What is the LFE equivalent I don t seem to be able to find how I can make push or reverse work in LFE . LFE equivalent", "Question : Erlang was already installed : .. . .. . Erlang seems to work : .. . .. . I downloaded lfe from github and checked out 0.5.2 : .. . .. . Must be something stupid i missed : o .. . .. . Is there an example how I would create a hello world source file and compile and run it .. . Answer : No there is nothing you missed . The Makefile in LFE is less than perfect and should be ignored it will be improved upon in the next release . To compensate all the needed files have already compiled and the .beam files are in the ebin directory . As it is not part of OTP I don t think it should ever install there . The easiest way to handle this to create a private erlang library directory and point the environment variable ERL LIBS to it . Then just drop the whole LFE directory there . When erlang starts the code server will automatically add the lfe ebin directories into the path and the .beam files there will automagically be found and loaded . This will work with any package that contains an ebin directory . This also works on Windows . So : .. . .. . 1 . Make an libs directory say erlang lib .. . 2 . Set the environment variable ERL LIBS export ERL LIBS erlang lib .. . 3 . Put the whole LFE directory there .. . .. . When you start erlang you will then see Users rv erlang lib lfe ebin or wherever you have it in the code path code : get path . You will then also be able to start the LFE shell directly with .. . .. . There will be an lfe and an lfe.bat which does this included as well in the future . As with erlang any text-editor will work to edit LFE . For emacs there is an LFE mode which is still rather basic but works . You cannot yet run LFE in a window . Soon . The best way to include this is to put the following in your .emacs file : .. . .. . There are some example files in lfe examples all should work . In lfe test visual there is a bunch of my test files which have been included as example files . To compile an LFE file from the normal erlang-shell do .. . .. . while from the LFE shell do : .. . .. . There is a bunch of documentation in lfe docs which is quite accurate but the user guide.txt needs to be extended . There is also a Google group for LFE at .. . .. . which contains some interesting discussions and people have written quite a lot in the github LFE wiki . That s about it I think . contact me if when you have more questions . Comment : Thanks a lot for guiding me . - karlthorwald - aka", "Question : Following image shows that LFE truncates displayed results . Compared to SBCL REPL I can see less than half of result data . enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE .. . Answer : Something I do in this case is often to use io : format : .. . .. . I guess it s the same with LFE but with slightly different syntax .", "Question : Following image shows that LFE truncates displayed results . Compared to SBCL REPL I can see less than half of result data . enter image description here http : i.stack.imgur.com 4kR7t.png .. . .. . How do I show all results in LFE .. . Answer : To see it printed in LFE format you can use .. . .. . or much easier in the LFE repl : .. . .. . There is also a p .. . call which writes it out without prettyprinting . Comment : thank you very much", "Question : Is there a standard way of compiling .lfe source files from a make rule in an OTP project According to the docs I m supposed to use lfe comp : file 1 which doesn t help much if I want to compile multiple such files in an OTP application where I m supposed to keep the source files in src but the binaries in ebin . Ideally I d be able to do something like .. . .. . But there doesn t seem to be lfe support in erlc . The best solution I can think of off the top of my head is .. . .. . but that seems inelegant . Any better ideas .. . Answer : On suggestion from rvirding here s a first stab at lfec that does what I want above and pretty much nothing else . I d invoke it from a Makefile with . lfec -o ebin src lfe . Comment : I may borrow this . : - Comment : @rvirding - feel free to that s what it s here for . Comment : I HAVE borrowed it and added a simple lfec to the development branch . As Joe once Robert is incapable of making small changes to anything which is true so I rewrote it . Now I just need to work out which options are useful in an LFE context .", "Question : I am trying to estimate a large dynamic fixed effects panel-data model with lags and multiple group effects . I know about the pseries object from the plm package which can handle panel regression with lags . Is there a similar solution in the lfe package for panel objects so that I can take advantage of the speediness that lfe provides .. . Answer : There is no direct way to do lags in felm as of now but it is possible to do it as follows : .. . .. . The reason the lag does not work straight away with felm is that it will use the default lag function not the pseries lag . When specifying it as above the pseries lag is used . Another way to make it work is : .. . .. . I.e . include an explicit as.data.frame this will convert Em to a data.frame with appropriate attributes . This will incur a copy of the entire dataset but is no different from what plm does behind the scene . Comment : The next release of lfe in a month or so will support this directly with pseries provided plm is loaded . It turned out to be a very simple fix . At a single point when I create the model frame I have replaced an as.formula with an as.Formula . The class of wage is then preserved and the right lag will be used . Comment : The current version of lfe 2.3 handles this i.e . felm emp output+capital + lag wage 1 firm data Em will use the pseries lag .", "Question : I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm . I get the output with no problems but now I d like to use it in a LaTeX table . However none of the packages I tried like xtable apsrtable the latex command in Hmisc and so on have methods for objects of class felm . So my question is what do I do Is there a way to access the lm.method and twist it so it can read felm objects Is there a way to coerce felm objects into lm form Any ideas .. . Answer : As the author of the lfe-package I can shed some light on this . It is true that the felm-object mimics the lm-object but with some differences . It does not contain a copy of the data-matrix . The lfe-package is intended for very large datasets in the gigabyte-class . Thus some effort has been made to conserve memory . Another difference is that the felm-object does not contain information about the rank of the system in the same manner as lm nor the qr-decomposition used by lm . felm does not use a qr-decomposition and the rank can be a somewhat complicated matter . The upshot of this is that some standard methods will work on felm-objects whereas others will not . An early version of lfe actually had lm as an inherited class for felm but since this creates the impression that it actually is an lm-object I removed it .", "Question : null .. . Answer : I want to estimate a regression with two exogenous variables two endogenous variable and a pair of fixed effects . Each endogenous variable has its own instrument . Y b0 + b1 X1 + b2 X2 + b3 Q + b4 W + C1 factor id + C2 factor firm .. . .. . W d0 + d1 X3 .. . .. . Q e0 + e1 X4 .. . .. . Here is the part where I use generated data for Y X Q W .. . .. . I can estimate the coefficients using the old lfe syntax .. . .. . But the package strongly discourages the use of old syntax and I do not know how to specify different first stage equations in the new syntax . If I try this line both x3 and x4 would be used for both Q and W first stage equations .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : This might not be the answer that you are looking for but it seems that the author did not add any functionality to the lfe package in order to make predictions on external data by using the fitted felm model . The primary focus seems to be on the analysis of the group fixed effects . However it s interesting to note that in the documentation of the package the following is mentioned : .. . .. . The object has some resemblance to an lm object and some postprocessing methods designed for lm may happen to work . It may however be necessary to coerce the object to succeed with this . Hence it might be possible to coerce the felm object to an lm object in order to obtain some additional lm functionality if all the required info is present in the object to perform the necessary computations . The lfe package is intended to be run on very large datasets and effort was made to conserve memory : As a direct result-of this the felm object does not use contain a qr decomposition as opposed to the lm object . Unfortunately the lm predict procedure relies on this information in order to compute the predictions . Hence coercing the felm object and executing the predict method will fail : .. . .. . If you really must use this package to perform the predictions then you could maybe write your own simplified version of this functionality by using the information that you have available in the felm object . For example the OLS regression co fficients are available via model2 coefficients . Comment : Helpful comments . Thank you .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : This should work for cases where you wish to ignore the group effects in the prediction are predicting for new X s and and only want confidence intervals . It first looks for a clustervcv attribute then robustvcv then vcv .", "Question : Does anyone have a nice clean way to get predict behavior for felm models Comment : pkg : felm not on CRAN or BioC . Comment : Fixed - I meant the lfe package Comment : predict doesnt work because it creates felm class object and predict wont work for it Comment : Just a note you don t have to say data iris iris data is lazyloaded already . Comment : as for adding predict to include to felm create a request to r-proj-c methods predict 1 predict.ar predict.Arima predict.arima0 4 predict.glm predict.HoltWinters predict.lm 7 predict.loess predict.mlm predict.nls 10 predict.poly predict.ppr predict.prcomp 13 predict.princomp predict.smooth.spline predict.smooth.spline.fit 16 predict.StructTS .. . Answer : As a workaround you could combine felm getfe and demeanlist as follows : .. . .. . The idea is that you use demeanlist to center the variables then lm to estimate the coefficient on Sepal.Width using the centered variables giving you an lm object over which you can run predict . Then run felm + getfe to get the conditional mean for the fixed effect and add that to the output of predict .", "Question : When I run a cluster standard-error panel specification with plm and lfe I get results that differ at the second significant figure . Does anyone know why they differ in their calculation of the SE s .. . Answer : The difference is in the degrees-of-freedom adjustment . This is the usual first guess when looking for differences in supposedly similar standard errors see e.g . Different Robust Standard Errors of Logit Regression in Stata and R http : stackoverflow.com questions 27367974 . Here the problem can be illustrated when comparing the results from 1 plm + vcovHC 2 felm 3 lm + cluster.vcov from package multiwayvcov . First I refit all models : .. . .. . All lead to the same coefficient estimates . For m3 the fixed effects are explicitly reported while they are not for m1 and m2 . Hence for m3 only the last coefficient is extracted with tail .. . 1 . The non-robust standard errors also agree . And when comparing the clustered standard errors we can now show that felm uses the degrees-of-freedom correction while plm does not : Comment : Examining multiwayvcov : : cluster.vcov it is easy to see the algebra used to obtain the Stata small-sample degrees-of-freedom correction namely : df M df M - 1 df N - 1 df N - df K . But what would be the equivalent df correction as used is sandwich .. . adjust TRUE In this answer http : stackoverflow.com questions 27367974 you explain that the difference between the two is that for Stata the division is by 1 n - 1 and for sandwich it is by 1 n - k . Yet I m unsure how this translates into appropriate algebra.. . Do I replace df N - 1 by df N - df K above Comment : I think so but haven t checked the code in detail . Also note that currently sandwich itself does not offer clustered standard errors at the moment . All theoretical details behind the sandwich package are also documented in the two vignettes .", "Question : I am using the lfe package in R to do some regression with lots of fixed effects so direct lm is out of the question and since the fixed effects are not individual-level so is plm . I get the output with no problems but now I d like to use it in a LaTeX table . However none of the packages I tried like xtable apsrtable the latex command in Hmisc and so on have methods for objects of class felm . So my question is what do I do Is there a way to access the lm.method and twist it so it can read felm objects Is there a way to coerce felm objects into lm form Any ideas .. . Answer : It is possible that doing some transplant surgery on the felm-object will succeed . Determining whether creation of such a chimera is not doing violence to important underlying assumptions is your responsibility : .. . .. . Before doing that class engraftment I did look at the felm-object to see if it resembled an lm-object and it did . It also appears that summary est returns the output that would be expected by a user of lm . This does not actually do what you asked . The only thing it does is allow lm-targetted functions to attempt to do their work . I m not a particularly successful user of S4 methods but following a couple of links in the help page and making mods this is what I got after ignoring the warning : Comment : This is great Any clues as to why it doesn t work with any of the other packages Comment : I m asking this because I really need to use the apsrtable package or something like it that will allow many regressions on the same table" ] }
[ "yes-answer-long", "yes-answer-short" ]
erlang
UNK_RELATION
page-editor@wysiwyg@138
page-editor -- the page-editor is a feature of web content-management systems wcms that allows authors to create and edit content with a @placeholder interface .
{ "confidence": [ 45.87959289550781, 45.51021194458008, 44.718475341796875, 43.31367492675781, 43.23521423339844, 42.723777770996094, 41.696563720703125, 41.65541076660156, 41.53960037231445, 41.49799346923828, 41.45170593261719, 41.34873962402344, 41.30805969238281, 40.73369216918945, 40.73369216918945, 40.251312255859375, 40.038692474365234, 40.038692474365234, 39.748504638671875, 39.52477264404297, 39.52477264404297, 38.8635139465332, 38.63349914550781, 38.407615661621094, 38.383697509765625, 38.25193405151367, 38.13153839111328, 38.09571838378906, 37.958621978759766, 37.4669189453125, 37.438873291015625, 36.875518798828125, 36.875518798828125, 36.851985931396484, 36.732208251953125, 36.715240478515625, 36.610374450683594, 36.58295822143555, 36.58295822143555, 36.58295822143555, 36.58295822143555, 36.58295822143555, 36.58295822143555, 36.58295822143555, 36.110931396484375, 35.88711929321289, 35.88711929321289, 35.88711929321289, 35.7633056640625, 35.71183776855469, 35.41444396972656, 35.34455108642578, 35.32200622558594, 35.03265380859375, 35.0268440246582, 34.40385437011719, 34.37580871582031, 34.22923278808594, 33.88939666748047, 33.88356399536133, 33.8701057434082, 33.8701057434082, 33.8701057434082, 33.8701057434082, 33.762630462646484, 33.762630462646484, 33.65217590332031, 33.65217590332031, 33.60927200317383, 33.55771255493164, 33.53594970703125, 33.5198974609375, 33.5198974609375, 33.5198974609375, 33.5198974609375, 33.38306427001953, 33.31992721557617, 33.17204666137695, 33.103363037109375, 32.693355560302734, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 32.6203498840332, 31.926692962646484, 31.69818115234375 ], "content": [ "Everything working fine if change some content or image and saving it in page-editor .", "Sitecore Page Editor Publishing items related to content http : stackoverflow.com questions 18348988 sitecore-page-editor-publishing-items-related-to-content .. . .. . Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com questions 18350587 sitecore-page-editor-how-to-extend-page-editor-item-editing-panel 18351584 18351584 .. . .. . The solution suggested in that post is to create a custom button to publish .", "Then they added a custom experience button which navigates to that non-page content item within the page-editor .", "Image of command in page-editor : .. . .. .", "Basically I want to have dropdown in page-editor and content editor which are responsible for a same thing .", "Need to add publish feature to the page-editor item editing section .", "If so check the Page Editor ribbon .", "Using Page Editor configure your page component datasource to pull from one of your new component content items .", "I need to edit the target after i click the link in page-editor .", "No Page Editor Experience Editor works with JavaScript to change anything on page .", "Suppose my editor creates another new page and he wants to re-use a section from the content store .", "I want to add buttons to the editor in page-editor mode .", "In the Page Editor one can create combination tests .", "In PROD environment when I log into Page editor page-editor ribbon keeps loading for 4 mins .", "Is it possible to add more buttons or a dropdownlist to the webedit editor when you are viewing the page in the page-editor in sitecore", "For this in content editor : .. . .. . 1 .", "The weird part is in page-editor it does not get clicked I have to right-click and then open then it goes to web DB page .", "it should come as the page-editor link the link type itself becomes https : ... . web DB link for the target page .", "It doesn t matter if I add the script through the Show Editor or Edit HTML features of the content editor .", "Can the image representing the rendering in Page Editor be customized", "It s like I opened it up in Page Editor .", "page --- Modules folder --- module 1 --- module 2 --- module 3 .. . .. . When a module is added to a page via the Page Editor and the Datasource Location is a normal path rather than a . in it the Select Associated Content box should appear .", "In Page editor mode the Spaces or not replaced with - .", "I have already customize the Page Editor Language Selector by overriding the webedit command but I can t figure out how to customize the Content Editor Language Selector : .. . .. .", "Most of the fields I need are set in Sitecore in the Content Editor so I can access them via .. . .. . However one thing I need is the URL of the logo image on each page which is inserted with the Page Editor .", "In Page Editor when you select that sublayout it s context ribbon will contain an extra button that allows you to edit those fields .", "This is only happening in the combination of button + page-editor .", "What happens in the Sitecore content editor under Presentation Layout Details for the item", "You can use the approach suggested in article that you have found - Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com questions 18350587 sitecore-page-editor-how-to-extend-page-editor-item-editing-panel 18351584 18351584 .", "On that sublayout definition item for that assign the field editor to that UI component via the Page Editor Buttons treelist field .", "Now in page-editor when i am trying to change position using Change Position button in toolbar and move content to another location content is getting moved to my new location as desired .", "enter image description here http : i.stack.imgur.com fA2Pr.jpg .. . .. . Maybe try to remove this button log in to core database and look for sitecore content Applications WebEdit Ribbons WebEdit Page Editor Edit My Items and see if this helps .", "I have a center column placeholder where users can select from a list of components using the Page Editor set data source and edit the content of the data source .", "The option would be to add another button to Page Editor next to Edit Related Item button and create a command that will Publish Related Item .", "Is it possible for me to get Page Editor objects on the page in the codebehind", "I want to edit on Sitecore Page Editor some hidden fields like meta fields from head html section .", "This happens by default when I m in edit mode in the page-editor .. . .. . This works fine however I also need to be able to Insert an external link from the Page editor .", "I m struggling to think of any that are solely Page Editor only .", "I want to use the page-editor for editting my pages .", "A fairly common issue with Page Editor not loading is a conflict between jQuery and Prototype .", "I don t think the page-editor is made for editing sites on mobile .", "How can a custom dropdown list be added to the page-editor in Sitecore", "I know that Page Editor will occasionally provide full admins more access .", "How can I hide Page Editor options from this scenario", "Sitecore.. . CommonText Product Example Text .. . .. . In my ascx file mark up is pretty straigh forwad .. . .. . Codebehind .. . .. . When I open the page in Page Editor as a system admin it allows me to change the Product Example Text and when I save using the Save button on the Page Editor it get saved to the master database .", "In page-editor when I make an update to the personalization of a component the update only shows on the page when I press save .", "Editors are working in Page Editor : .. . .. . Suppose you make a new page and add an article .", "@jammykam from what I understood author wants to add a sibling to current page in Experience Editor not a child page .", "Under item : .. . .. . sitecore content Applications WebEdit Ribbons WebEdit Page Editor .. . .. . .. . you need to create an item of type : .. . .. . sitecore templates System Ribbon Chunk .. . .. . .. . Under new item you have to create new item of type : .. . .. . sitecore templates System Ribbon Small Button .. . .. . .. . On the field Click you will have something like .. . .. . command : executefieldeditor path sitecore content Applications WebEdit Edit Frame Buttons Page Properties Page Properties .. . .. . .. . where path will point to item created at step one .", "Basicaly I can add a variation using Page Editor and everything is fine until I click save in Page Editor .", "Your content authors will be able to select chosen language version and edit it .. . .. . 3 .", "I would kindly ask for your help : From couple of days I am trying to achieve linked custom field in content editor and dropdown in page-editor .", "This solution should solve the problem instead i cannot edit button text from page-editor now as it is just text .", "This way the tags are added at render time rather than appearing in the content editor .", "The complete description how to add such a command can be found in the answer Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com a 18351584 157833", "Sitecore Experience Editor : .. . .. . How will user author in Mandarin or Japanese languages using Sitecore page-editor", "In the Sitecore Page Editor when I highlight a content item and click the red boxes icon to bring up the Test the Component dialog the Test Content Item : just says Not set .", "The main difference being that the Page Editor gives your content authors an easier and more directed user-experience because if you configure it nicely you can ensure that content can only be added sourced from a particular location in your content tree and that the content added sourced from that location is only of one specific template type as one example .", "I am having an issue with sitecore using MVC where I have this is my page layout file : .. . .. . Page editor is loading into the first body for ie8 and thus all I see is code and not page-editor .", "As it suggests in the Marketing Operations Cookbook http : sdn.sitecore.net upload sitecore6 65 marketing operations cookbook sc65-usletter.pdf : .. . .. . When you use the Page Editor to set up an MV test you can use existing content clone content or create new content items to use as test variable variations .", "You can look after personalisation and multivariate testing from within the Content Editor as well .", "what is the order of the components when you check the presentation details of the item from the content editor", "Also if you browse to the item in the Content Editor do your changes show up there as you d expect", "This will allow you to reuse the code and turn on- off much easier through the content editor .", "Hi am trying this code .. . .. . and then from cshtml .. . .. . When I click on the link this will always point to CD database and I am not able to edit in page-editor .", "I have an image component for which I need to disable its editing ribbon on Sitecore Page Editor so that the author is unable to edit change the image .", "However when I try to edit them in the page-editor the EditFrame is not rendered nothing gets rendered actually .", "@MyriamDeScheemaecker : While I still recommend using Glass it is not required to edit fields in page-editor .", "Content Editor Language Selector http : i.stack.imgur.com ywhAy.png .. . .. . I am trying to replicate the functionality I added for the Page Editor Language Selector which sorts the languages by region and then language name and also adjusts the name to not display the : language region part .", "When I change language in the s Page Editor s Experience Editor however using Experience Language menu item I get a 404 error .", "I have a text area in that page with page-editor which loads text from Product Example Text Sitecore item s Description text from Web database .", "Yes if.. . will cause that setup will not be fired but only while adding the component in page-editor .", "The error occurs when I am in the Sitecore Page Editor mode .", "I can t imagine an instance in which this would play well with Page Editor .", "I m assuming by Page Editor you mean the Design view .", "In Experience Editor authors can switch between languages in the Experience tab of the ribbon :", "In sitecore 7.2 which is an upgraded site from sitecore 6.5 when I create a new item which will be in the draft workflow state and click publish-- Page Editor the user will be redirected to home item but when the item is on the final workflow the page-editor will work fine .", "While saving an item in Page Editor Sitecore saves all the field renderers which are displayed on the page so if you set the Item property of a FieldRenderer1 to Product Example Test Sitecore Item Page Editor know which item should be saved .", "We recommend that if possible you create all MV tests using the Page Editor .", "More over also remember that you can also create MV Test in Content Editor but note the below as suggested by Sitecore .. . .. . If you create an MV test using the Content Editor you do not have access to the same statistics on Engagement Values generated when you test these controls .", "Can I know how to detect user is in page-editor mode using code", "This is because I have a component when user browses from page-editor it will search in master index folder instead of web index folder .", "Sitecore version 6.6 .. . .. . Logs says .. . .. . This error repeats for several minutes until page-editor gets loaded .", "From my experience I know that sometimes there are issues with My Items ribbon button in Page Editor .", "I remember from my Sitecore 7 training that there are a few of the newer features which are designed to be used through the page-editor .", "Can anyone tell me what the full range of features that hang off the page-editor are", "Also to improve yours google searchs this kind of sublayout with datasources editable in Page Editor is called Components .. . .. . .", "Hi can you confirm what you mean by page-editor not supporting for mobile", "Thanks for your reply and yes it is requirement to support page-editor in mobile mode thats why I have asked this question .", "Apple Safari 6 for Mac OS .. . .. . I believe page-editor is NOT supported on mobile currently .", "Page Editor has two modes for what happens when you click stuff .", "I have a saveUI processor and I only want to run my code if the user clicked the save button in Page Editor .", "From what I know you cannot add sibling item to current item in page-editor out of the box .", "Only issue is that it shows the Page Editor ribbon control on top Home Advanced Expereience.. . which I do not need to be displayed .", "it looks like the question is about the buttons in page-editor window not in the RTE which is opened as a modal window .", "And Full profile doesn t provide any additional button for page-editor rich text .", "Open Page Editor and test the new command it should open the standard publishing popup with the related item ID as a parameter in URL .", "Open Page Editor and test the new command it should open the standard publishing popup with the related item ID as a parameter in URL .", "Using Sitecore 8.1 - I used these instructions https : jammykam.wordpress.com 2015 03 17 prompt-user-to-selectcreate-datasource-item-when-inserting-rendering-via-page-editor to be open the datasource item create select when adding a rendering via the page-editor but only the Control Properties comes up .", "Under folder you have to create a new Field Editor Button ." ] }
{ "confidence": [ 52.72755432128906, 52.490234375, 50.98480987548828, 48.704193115234375, 48.19001007080078, 46.14000701904297, 45.894874572753906, 45.1190185546875, 44.680816650390625, 43.904624938964844, 43.876495361328125, 43.71866226196289, 43.436607360839844, 43.255157470703125, 43.118011474609375, 42.89971160888672, 42.883853912353516, 42.44355010986328, 41.775543212890625, 41.622337341308594 ], "content": [ "Question : I remember from my Sitecore 7 training that there are a few of the newer features which are designed to be used through the page-editor . I can remember some of the personalisation stuff and multivariate testing for example . Can anyone tell me what the full range of features that hang off the page-editor are .. . Answer : I m struggling to think of any that are solely Page Editor only . You can look after personalisation and multivariate testing from within the Content Editor as well . The main difference being that the Page Editor gives your content authors an easier and more directed user-experience because if you configure it nicely you can ensure that content can only be added sourced from a particular location in your content tree and that the content added sourced from that location is only of one specific template type as one example . This assists the user when adding editing content and saves them an extra 3 or 4 clicks and pop-up windows typically", "Question : I created sitecore HTML Content control based on sitecore datasource which can be used for Multivariate Testing and Personalization . Everything working fine if change some content or image and saving it in page-editor . Things started not working when i publish the item in Page editor i don t have specific option to publish that control rather clicking on publish button with disabling un-checking publish sub items.Result in the publish information Items Skipped 2 Items updated 0 .. . .. . Similar topic was discussed in below link . Sitecore Page Editor Publishing items related to content http : stackoverflow.com questions 18348988 sitecore-page-editor-publishing-items-related-to-content .. . .. . Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com questions 18350587 sitecore-page-editor-how-to-extend-page-editor-item-editing-panel 18351584 18351584 .. . .. . The solution suggested in that post is to create a custom button to publish . Is there any any sitecore default feature for this to publish .. . Answer : I have raised a sitecore support ticket . Looks like this feature is not yet available in Sitecore . Hopefully we see this in near feature . Response from Sitecore Support : .. . .. . I have registered a feature request for the product so it can be considered for future implementation . We will inform you when there are any updates regarding your request . You can use the approach suggested in article that you have found - Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com questions 18350587 sitecore-page-editor-how-to-extend-page-editor-item-editing-panel 18351584 18351584 .", "Question : I have a Product Page Product page maps to ProductPage Sitecore item . Website Pages ProductPage . I have a text area in that page with page-editor which loads text from Product Example Text Sitecore item s Description text from Web database . Sitecore.. . CommonText Product Example Text .. . .. . In my ascx file mark up is pretty straigh forwad .. . .. . Codebehind .. . .. . When I open the page in Page Editor as a system admin it allows me to change the Product Example Text and when I save using the Save button on the Page Editor it get saved to the master database . Product Example Text item get saved . Now when I try to publish the item using the Publish item in the Page Editor ribbon these changes do not get reflected reason is Product Example Text item does not get published . When I save the page somehow Sitecore understands the Product Example Text item has to be saved . But why does not it get published Am I doing anything wrong... . How can I solve this issue Comment : Do you have workflow attached Is it possible it s not approved yet Also if you browse to the item in the Content Editor do your changes show up there as you d expect .. . Answer : Another approach would be to create the Product Example Test content item under the ProductPage as a sub item . In publish options you can use publish sub items which will publish all content you want . But the problem is if you want a particular content to be shared in several places this won t work . Maras s answer is a better solution .", "Question : I have a Product Page Product page maps to ProductPage Sitecore item . Website Pages ProductPage . I have a text area in that page with page-editor which loads text from Product Example Text Sitecore item s Description text from Web database . Sitecore.. . CommonText Product Example Text .. . .. . In my ascx file mark up is pretty straigh forwad .. . .. . Codebehind .. . .. . When I open the page in Page Editor as a system admin it allows me to change the Product Example Text and when I save using the Save button on the Page Editor it get saved to the master database . Product Example Text item get saved . Now when I try to publish the item using the Publish item in the Page Editor ribbon these changes do not get reflected reason is Product Example Text item does not get published . When I save the page somehow Sitecore understands the Product Example Text item has to be saved . But why does not it get published Am I doing anything wrong... . How can I solve this issue Comment : Do you have workflow attached Is it possible it s not approved yet Also if you browse to the item in the Content Editor do your changes show up there as you d expect .. . Answer : While saving an item in Page Editor Sitecore saves all the field renderers which are displayed on the page so if you set the Item property of a FieldRenderer1 to Product Example Test Sitecore Item Page Editor know which item should be saved . The problem with publishing is that you enqueue the current item in the publishing queue but this item has no link-to the Product Example Test Sitecore Item in any of its properties cause you re setting the Item property of the field renderer dynamically in the code . The option would be to add another button to Page Editor next to Edit Related Item button and create a command that will Publish Related Item . The complete description how to add such a command can be found in the answer Sitecore page-editor - how to extend page-editor item editing panel http : stackoverflow.com a 18351584 157833 Comment : Spot on this is exactly what I wanted to know .", "Question : Need to add publish feature to the page-editor item editing section . Under the More section would be ideal . How can I do this enter image description here http : i.stack.imgur.com boTY2.jpg .. . Answer : First you need to create a command class . The simplest version would be : .. . .. . Register new command in Sitecore.config or Commands.config : .. . .. . Then : .. . .. . 1 . Login to Sitecore Desktop .. . 2 . Switch database to core .. . 3 . Duplicate sitecore content Applications WebEdit Common Field Buttons Edit related item .. . 4 . Rename new item to Publish related item .. . 5 . Set Click property of this item to my : publish .. . 6 . Change other properties of the item Header Icon Tooltip .. . 7 . Switch database back to master .. . 8 . Open Page Editor and test the new command it should open the standard publishing popup with the related item ID as a parameter in URL .", "Question : Need to add publish feature to the page-editor item editing section . Under the More section would be ideal . How can I do this enter image description here http : i.stack.imgur.com boTY2.jpg .. . Answer : We can achieve it without any code change . Add the above entry in Commands.config file . This file is available in include folder . 1 . Login to Sitecore Desktop .. . 2 . Switch database to core .. . 3 . Duplicate sitecore content Applications WebEdit Common Field Buttons Edit related item .. . 4 . Rename new item to Publish related item .. . 5 . Set Click property of this item to chrome : common : edititem command : webedit : publish .. . 6 . Switch database back to master .. . 7 . Open Page Editor and test the new command it should open the standard publishing popup with the related item ID as a parameter in URL . Thanks .. . .. . Fenil", "Question : I could not find a single official document on setting up and using multilingual on Sitecore SDN . Basically we have a requirement to enable couple of our multi-site Sitecore website to support multi-lingual i.e . Chinese Mandarin and Japanese . Based on geoip of the visitor or some questions we need to display either English or Mandarin or Japanese for couple of pages on site . Given that I m quiet new to multi-lingual set up could someone please help me below : .. . .. . Sitecore setup : .. . .. . 1 . What exactly do I need to do in terms of Sitecore IA setup Create separate page for each languages 2 . How will content author author the english japanese and mandarin for the same content pages 3 . Do we need to install any language translator such that content author will type in English and it will get translated to Mandarin and Japanese during run time 4 . Is it possible that user can type in Mandarin or Japanese in Sitecore CMS Sitecore Experience Editor : .. . .. . How will user author in Mandarin or Japanese languages using Sitecore page-editor Coding Changes : .. . .. . We are using ASP.NET MVC do we need to make our content repository smart such that it will get content from Sitecore in specific language e.g . pass language or similar I googled on above topic as well but could not find any legitimate result . Thanks . .. . Answer : Your post is really broad . Below you can find high level answers to your questions . If you need any more specific answers try to be more precise and post separate questions . Sitecore setup : .. . .. . 1 . You need to add selected languages under sitecore system Languages node enter image description here http : i.stack.imgur.com vpsiX.png .. . .. . Then you need to select chosen language and click Add a new version : .. . .. . enter image description here http : i.stack.imgur.com yKU5M.png .. . .. . 2 . Your content authors will be able to select chosen language version and edit it .. . .. . 3 . Sitecore doesn t have any automated translation out of the box . There are some code samples and modules which can help you with that . Ask google for it e.g . https : www.google.com search q sitecore+translate .. . .. . 4 . Yes user can type Mandarin or Japanese or any other language . Experience Editor : .. . .. . 1 . In Experience Editor authors can switch between languages in the Experience tab of the ribbon : enter image description here http : i.stack.imgur.com ccvET.png .. . .. . Coding Changes : .. . .. . 1 . For automated language selection based on user IP you need to use some GEO IP provider e.g . : https : www.google.pl search q sitecore+geo+ip for switching the languages manually create language selector e.g . : https : www.google.pl search q sitecore+language+selector .. . .. . .. . .. . Remember that Sitecore 8 related documentation can be found on https : doc.sitecore.net or https : kb.sitecore.net Comment : Thanks heaps Marek . For point 4 if we can type Mandarin or Japanese any reason why we need automated translator Comment : Also regrading translator did you say they use the Google translator API Comment : If your content authors type Mandarin and Japanese content manually you don t need any automated translator . In terms of automated translators there is a module called Sitecore Language Translator which uses Google API to translate the content but it will never be a proper translation . There are also paid solutions like Clay Tablet - your content is translated by proper human translators .", "Question : We use Sitecore CMS for our website at the moment and are considering adding the Sitecore DMS in the near future . A colleague of mine insists that it is absolutely necessary to have our page-editor along with the cloning functionality enabled and working for us to be able to use the DMS . I m familiar with their CMS but not the DMS so I wanted to know -- is it absolutely necessary .. . Answer : Cloning functionality is mostly used for Multivariant MV Tests . As it suggests in the Marketing Operations Cookbook http : sdn.sitecore.net upload sitecore6 65 marketing operations cookbook sc65-usletter.pdf : .. . .. . When you use the Page Editor to set up an MV test you can use existing content clone content or create new content items to use as test variable variations . This means that you do not need to ask a developer to help you to create special content to use in your MV tests . In the Page Editor one can create combination tests . These tests allow you to test more than one control on the same page . This is multivariant testing . More information on MV Tests like cloning items to use as test variables or creating combination tests is also given in the Marketing Operations Cookbook http : sdn.sitecore.net upload sitecore6 65 marketing operations cookbook sc65-usletter.pdf . More over also remember that you can also create MV Test in Content Editor but note the below as suggested by Sitecore .. . .. . If you create an MV test using the Content Editor you do not have access to the same statistics on Engagement Values generated when you test these controls . We recommend that if possible you create all MV tests using the Page Editor . So if one your goals for using Sitecore DMS is MV tests I would suggest you do use cloning . Hope this helps in deciding the way forward . Comment : That s great thanks man Comment : Please can you mark this as the answer if it has answered your question Thanks .", "Question : I want to edit on Sitecore Page Editor some hidden fields like meta fields from head html section . How can I do it I try with .. . .. . but this is not working for head html section . .. . Answer : I agree the Field Editor button is the right solution but you can do this all without custom code as well : .. . .. . 1 . In the Core DB create a Field Editor button item as Sitecore Climber explained .. . 2 . In the Multi-Line Text Field enter your fields with pipes separating them as Sitecore Climber explained .. . 3 . Find a sublayout that appears on all pages e.g . Header.ascx or something like that . 4 . On that sublayout definition item for that assign the field editor to that UI component via the Page Editor Buttons treelist field . See this image : enter image description here http : i.stack.imgur.com lNzTf.jpg .. . 5 . In Page Editor when you select that sublayout it s context ribbon will contain an extra button that allows you to edit those fields . See this image : enter image description here http : i.stack.imgur.com W6gvZ.jpg .. . 6 . When you click it you get a pop-up to edit those pipe-delimited fields . See this image : enter image description here http : i.stack.imgur.com 8KnLn.jpg", "Question : I am working on integrating an iframe to a Sitecore template . I have created the ASPX page and added that to the iframe in Sitecore template . e.g . sitecore content Custom Editors SampleIFrameEditor .. . .. . It works fine I can see my ASPX page gets rendered in the iframe control . Only issue is that it shows the Page Editor ribbon control on top Home Advanced Expereience.. . which I do not need to be displayed . It s like I opened it up in Page Editor . How can I hide Page Editor options from this scenario .. . Answer : You could add sc mode normal as a query-string to your iframe src URL .", "Question : Currently working in SC7 where I have implemented a kind of scaffolding so that editors can add an article to a page and add sections and paragraphs under it . You get the idea html5 stuff.. . .. . .. . Now the problem.. . Editors are working in Page Editor : .. . .. . Suppose you make a new page and add an article . It has a title hero image on top and an introduction . You choose to create new content and I save it in an ItemBucket called ContenStore where I store all my articles sections paragraphs.. . The SC7 way to use the search if they want to re-use any of that content . Suppose my editor creates another new page and he wants to re-use a section from the content store . He will find the section but when he has placed it on the page non of the paragraphs that were on the original section show up.. . Of course not since I guess the layout details are saved on the context item level and not on that section level.. . .. . .. . Has anyone tackled this problem before A sublayout or rendering should be able to remeber what layout details it has so that if you re-use it all the items it had originally are put in its placeholders again as well and this recursively of course.. . .. . .. . Any thoughts welcome.. . .. . .. . Erwin .. . Answer : The problem you describe is not new to Sitecore 7 . You would have the same problem in Sitecore 6 you would just have to go through the additional effort of keeping your content organized . This is a fundamental limitation of Sitecore s presentation framework . I have worked around similar problems before by using Presentation Inversion of Control http : www.awareweb.com awareblog inversioncontrol1 category e697cc2030034ea39ef65be033a5c530 topic bcab6d57624347eda723110cd70bb48d . I should probably write an update for that since the rules engine approach no longer works .. . .. . I believe that Cognifide is doing something similar with the Composites in their Zen Garden http : www.sitecore.net Community Best-Practice-Blogs Przemyslaw-Taront Posts 2012 08 The-Zen-of-Sitecore-Part-1.aspx but instead of using a dummy layout they use an empty layout so any item can be opened as a page . Then they added a custom experience button which navigates to that non-page content item within the page-editor . Note that this is speculation based on a brief demo that I saw . Thomas Eldblom also blogged years ago about what he called Composite Layouts http : pentialized.dk tag composite-layout . It s similar to PIoC but puts the presentation settings on a special rendering type . In short there are ways to achieve what you want but they all involve custom development and will require extra attention to maintain a smooth page-editor experience .", "Question : I m in the page-editor and I m seeing JSON where editor controls should be .. . .. . commands : click : chrome : field : editcontrol command : webedit : chooseimage header : Choose Image icon : icon SoftwareV2 16x16 photo landscape.png.aspx isDivider : false tooltip : Choose an image type : null click : chrome : field : editcontrol command : webedit : editimage header : Properties icon : icon SoftwareV2 16x16 palette preferences.png.aspx isDivider : false tooltip : Modify image appearance type : null click : chrome : common : edititem command : webedit : open header : Edit the related item icon : temp IconCache SoftwareV2 16x16 cubes blue.png isDivider : false tooltip : Edit this item in the Content Editor . type : common contextItemUri : sitecore : master 2D90E98C-1360-4EBA-855E-3B321B053376 lang en ver 1 custom : displayName : Logo expandedDisplayName : null .. . .. . This is happening in the page-editor but not when I view the site . .. . Answer : I had the same issue . It was because I removed the form method post runat server id mainform from the page . Add it back in . Best if you make it first child under body", "Question : I m trying to set up a basic Sitecore Multivariate test in Sitecore 6.5 rev . 120796 but have run into the same error repeatedly . The error occurs when I am in the Sitecore Page Editor mode . First of all I m not able to select each of the content items on the page and I m not really sure why that is the case . But I may not be 100 clear on what the requirements are for configuring a content item for an A B test in Sitecore . In the Sitecore Page Editor when I highlight a content item and click the red boxes icon to bring up the Test the Component dialog the Test Content Item : just says Not set . When I then click the 3 dots to attempt to browse to a content item I get a pop-up error message that simply says an error occurred . What are the requirements for a content item to be defined as a test variation in this version of Sitecore Or is there something else that needs to be done before attempting to configure the test variations in the Sitecore Page Editor Comment : Just to check is the component you are testing driven by a datasource Comment : Currently no and that is one of the things that I wasn t sure about whether or not it was a requirement for this to work . In addition to having a datasource it seems like the content item that you are defining the test variations for needs to be a sublayout that is attached to a placeholder . Is that correct .. . Answer : In order to use A B Multivariate testing your Sitecore website solution needs to support the idea of page components . Each component is a sublayout that pulls its content from a datasource item . The test is essentially just swapping the datasource for the sublayout so you can test different content much like you would setup DMS personalization . If your content is not structured into page components you cannot execute the tests . There are several companies out there that will audit your build to determine your solution s DMS-readiness and you can probably get them to fix up your build to support DMS as well . If you will be doing it yourself here are the basic steps : .. . .. . 1 . Split up your page layout into sublayouts . At the very least the portion that you want to test should be in its own sublayout . 2 . Create new component templates for your content that will be displayed in these sublayouts . This will be the data for your datasource . 3 . Create new content items from your new component templates to represent the data variations you want to try . 4 . Update the code for your sublayouts to access the Datasource property of the sublayout to find the content Item instead of using Sitecore.Context.Item .. . 5 . Using Page Editor configure your page component datasource to pull from one of your new component content items . Comment : That makes sense . I didn t realize that the components that you re creating test variations for had to be sublayouts with data sources - before you go in and configure the test variants .", "Question : Hi am trying this code .. . .. . and then from cshtml .. . .. . When I click on the link this will always point to CD database and I am not able to edit in page-editor . I need to edit the target after i click the link in page-editor . Can some one suggest me Comment : By CD database do you mean web Comment : Yes it is web database Comment : To rule out the basics have you checked the connection strings for the Master database Comment : View the Sitecore config using http : yoursite sitecore admin showconfig.aspx verify if hostName or targetHostName is set on your site node . Also check the Link Provider in linkManager node and ensure alwaysIncludeServerUrl false Comment : I did . The weird part is in page-editor it does not get clicked I have to right-click and then open then it goes to web DB page . There I cannot edit . it should come as the page-editor link the link type itself becomes https : ... . web DB link for the target page . .. . Answer : You use SiteResolving Are you running CMS and CD on one server so the have the same web.config and the hostnames in the sites web.config section point always to CD . SiteResolving explained https : briancaos.wordpress.com 2012 03 28 sitecore-links-in-multisite-solutions-siteresolving .. . .. . There ara multiple options . 1 Make a condition and set SiteResolving off in page edit mode . something like this : .. . .. . 2 Creat your own Sitecore LinkProvider to change the behavior see this example Create a Sitecore LinkProvider to use different LinkManager configurations http : sitecore.stockpick.nl english change-linkmanager-config.aspx Comment : You can simplify slightly to urlOptions.SiteResolving Sitecore.Context.PageMode.IsPageEditor but same difference : Comment : Add IsPreview PageMode to the code", "Question : I could not find a single official document on setting up and using multilingual on Sitecore SDN . Basically we have a requirement to enable couple of our multi-site Sitecore website to support multi-lingual i.e . Chinese Mandarin and Japanese . Based on geoip of the visitor or some questions we need to display either English or Mandarin or Japanese for couple of pages on site . Given that I m quiet new to multi-lingual set up could someone please help me below : .. . .. . Sitecore setup : .. . .. . 1 . What exactly do I need to do in terms of Sitecore IA setup Create separate page for each languages 2 . How will content author author the english japanese and mandarin for the same content pages 3 . Do we need to install any language translator such that content author will type in English and it will get translated to Mandarin and Japanese during run time 4 . Is it possible that user can type in Mandarin or Japanese in Sitecore CMS Sitecore Experience Editor : .. . .. . How will user author in Mandarin or Japanese languages using Sitecore page-editor Coding Changes : .. . .. . We are using ASP.NET MVC do we need to make our content repository smart such that it will get content from Sitecore in specific language e.g . pass language or similar I googled on above topic as well but could not find any legitimate result . Thanks . .. . Answer : To make language resolution work based on user IP you may replace processor type Sitecore.Pipelines.HttpRequest.LanguageResolver Sitecore.Kernel with your implementation where you do resolve languages based on IP lookup . With miltilinguality In Sitecore you will still have the same items but some of the fields will be versioned having their own version for each specific language . When authors create content - they are able to switch between languages from your ribbon . enter image description here http : i.stack.imgur.com GL0zA.png .. . .. . From UI point of view the language will be take out from exact user settings that also includes Page Editor in sample below user has German languguage set : .. . .. . enter image description here http : i.stack.imgur.com 7sPzY.png .. . .. . Few more links to read : .. . .. . http : www.newguid.net sitecore 2012 adding-ip-lookup-to-language-resolving .. . .. . http : www.sitecore.net learn blogs technical-blogs john-west-sitecore-blog posts 2011 05 spoof-an-ip-address-to-test-geoip-with-the-sitecore-customer-engagement-platform.aspx Comment : Thansk again Martin", "Question : I want to edit on Sitecore Page Editor some hidden fields like meta fields from head html section . How can I do it I try with .. . .. . but this is not working for head html section . .. . Answer : Sitecore doesn t have out of the box this kind of functionality but you need to follow few steps to do it : .. . .. . 1 . Create under item .. . .. . sitecore content Applications WebEdit Edit Frame Buttons .. . .. . .. . a folder you can name it : PageProperties . Under folder you have to create a new Field Editor Button . On field Fields you need to enter name of the fields you want to edit separate by pipeline . Will be something like : .. . .. . Meta data Meta title .. . .. . .. . 2 . Under item : .. . .. . sitecore content Applications WebEdit Ribbons WebEdit Page Editor .. . .. . .. . you need to create an item of type : .. . .. . sitecore templates System Ribbon Chunk .. . .. . .. . Under new item you have to create new item of type : .. . .. . sitecore templates System Ribbon Small Button .. . .. . .. . On the field Click you will have something like .. . .. . command : executefieldeditor path sitecore content Applications WebEdit Edit Frame Buttons Page Properties Page Properties .. . .. . .. . where path will point to item created at step one . 3 . On this step you need to create a command . Please create on include folder a new file name it : CustomCommands.config or how do you want with extension config . It will contains : .. . .. . xml version 1.0 .. . configuration xmlns : patch http : www.sitecore.net xmlconfig .. . sitecore .. . commands .. . command name command : executefieldeditor type yournamespace.ExecuteFieldEditor yourAssembly .. . commands .. . sitecore .. . .. . .. . 4 . Create your class : .. . .. . .. . using Sitecore .. . using Sitecore.Data .. . using Sitecore.Data.Items .. . using Sitecore.Diagnostics .. . using Sitecore.Shell.Applications.WebEdit .. . using Sitecore.Shell.Applications.WebEdit.Commands .. . using Sitecore.Text .. . using Sitecore.Web.UI.Sheer .. . using System .. . using System.Collections.Generic .. . using System.Collections.Specialized .. . using System.Linq .. . using System.Text .. . using System.Threading.Tasks .. . .. . namespace YOURNAMESPACENAME .. . .. . public class ExecuteFieldEditor : FieldEditorCommand .. . .. . summary .. . The fieldname .. . summary .. . private const string Fieldname Fields .. . .. . summary .. . The header .. . summary .. . private const string Header Header .. . .. . summary .. . The icon .. . summary .. . private const string Icon Icon .. . summary .. . The uriparameter .. . summary .. . private const string Uriparameter uri .. . .. . summary .. . The pathparameter .. . summary .. . private const string Pathparameter path .. . .. . summary .. . The currentitemisnull .. . summary .. . private const string Currentitemisnull Current item is null .. . .. . summary .. . The settingsitemisnull .. . summary .. . private const string Settingsitemisnull Settings item is null .. . .. . summary .. . Gets or sets the current item . summary .. . value .. . The current item . value .. . private Item CurrentItem get set .. . .. . summary .. . Gets or sets the settings item . summary .. . value .. . The settings item . value .. . private Item SettingsItem get set .. . .. . summary .. . Gets the options . summary .. . param name args The arguments . param .. . param name form The form . param .. . returns returns .. . protected override PageEditFieldEditorOptions GetOptions ClientPipelineArgs args NameValueCollection form .. . .. . EnsureContext args .. . return new PageEditFieldEditorOptions form BuildListWithFieldsToShow Title SettingsItem Header Icon SettingsItem Icon .. . .. . .. . summary .. . Ensures the context . summary .. . param name args The arguments . param .. . private void EnsureContext ClientPipelineArgs args .. . .. . CurrentItem Database.GetItem ItemUri.Parse args.Parameters Uriparameter .. . Assert.IsNotNull CurrentItem Currentitemisnull .. . SettingsItem Client.CoreDatabase.GetItem args.Parameters Pathparameter .. . Assert.IsNotNull SettingsItem Settingsitemisnull .. . .. . .. . summary .. . Builds the list with fields to show . summary .. . returns returns .. . private IEnumerable FieldDescriptor BuildListWithFieldsToShow .. . .. . ListString fieldString new ListString SettingsItem Fieldname .. . .. . return from field in new ListString fieldString where CurrentItem.Fields field null select new FieldDescriptor CurrentItem field .ToList .. . .. . .. . .. . .. . .. . Also you can check this post http : blog.istern.dk 2012 05 21 running-sitecore-field-editor-from-a-command .", "Question : I m in the page-editor and I m seeing JSON where editor controls should be .. . .. . commands : click : chrome : field : editcontrol command : webedit : chooseimage header : Choose Image icon : icon SoftwareV2 16x16 photo landscape.png.aspx isDivider : false tooltip : Choose an image type : null click : chrome : field : editcontrol command : webedit : editimage header : Properties icon : icon SoftwareV2 16x16 palette preferences.png.aspx isDivider : false tooltip : Modify image appearance type : null click : chrome : common : edititem command : webedit : open header : Edit the related item icon : temp IconCache SoftwareV2 16x16 cubes blue.png isDivider : false tooltip : Edit this item in the Content Editor . type : common contextItemUri : sitecore : master 2D90E98C-1360-4EBA-855E-3B321B053376 lang en ver 1 custom : displayName : Logo expandedDisplayName : null .. . .. . This is happening in the page-editor but not when I view the site . .. . Answer : I also recently encountered this issue and the resolution for me was to make sure the webedit.css file existed at the location specified by the WebEdit.ContentEditorStylesheet setting . By default the webedit.css file is located at the root of your site but in my instance the file had been moved . Comment : thanks for sharing . We need more info on SiteCore . Their forums are not that great .", "Question : In my content tree I have Folder items that have no presentation but have all the insert options on them . How would you be able to use the Insert Page button in the ribbon to insert a new content item in the right part of the tree For Example : .. . .. . I have my home page Content Folder Home.item All of my insert options are on Content Folder how do I add a new Home.item type without nesting it under Home.item Comment : From what I know you cannot add sibling item to current item in page-editor out of the box . Comment : @MarekMusielak You can use the Insert Page option from the Ribbon : doc.sitecore.net sitecore 20experience 20platform https : doc.sitecore.net sitecore 20experience 20platform creating 20and 20editing 20items create 20an 20item 20in 20the 20experience 20editor Comment : @jammykam from what I understood author wants to add a sibling to current page in Experience Editor not a child page . I don t think there is an option to do that but I might be wrong Comment : @MarekMusielak Yes sorry misunderstood you . But you are right you have to go up the tree and add it as a child . .. . Answer : In order to be able to use the Insert Page button the item you are inserting under must have Presentation defined . It doesn t need to have components added and I ve worked round this before by simply define a blank layout and setting it on those items . Maybe create yourself a new template inheriting from Folder and then set Layout on that . But this is a workaround at best . You can only Insert Page below the current page you are on so you would essentially have to navigate to a blank page in order to create the sibling . From what you have stated it sounds like you may want to re-think where your Insert Options have been set and your content structure i.e . why would you want create another Home item Creating so will require set-up of another site and related config . You probably also want to separate those sites out with other settings there is some good example of multi-site structure in this blog post http : learnsitecore.cmsuniverse.net en Developers Articles 2009 10 how-to-multisite-in-sitecore.aspx . If you go down this route look into using Branch Templates http : www.geekhive.com buzz post 2015 2 how-to-create-branch-templates-in-sitecore-cms . But difficult to know what you are doing without context.. .", "Question : I would kindly ask for your help : From couple of days I am trying to achieve linked custom field in content editor and dropdown in page-editor . Basically I want to have dropdown in page-editor and content editor which are responsible for a same thing . In my c code i have enums which represent directions . I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor . So far so good but i have no idea how to create dropdown which will represent the same functionality inside page-editor . So please give me any ideas.. . Comment : Correct me if I m wrong but you are trying 2 things : 1 adding a custom field type to sitecore and 2 having that custom field show up as a dropdown in page-editor mode . If I understand correctly you succeeded in part 1 but are struggling with part 2 right Comment : Yes . I successfully created the custom field . As you said in part 2 I am trying to do the same thing in page-editor . I think that a possible solution might be creating page-editor component which i hove no clue how to do : Comment : I think this question deals with far too big a topic to be answered here . I suggest reading the Presentation Component Reference before you attempt to continue sdn.sitecore.net upload sitecore6 64 http : sdn.sitecore.net upload sitecore6 64 presentation component reference-a4.pdf .. . Answer : Judging from your reply to my comment you need to think of the following : How is my field value being rendered onto a page .. . .. . If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode .. . .. . But as I understand it you want this dropdown to also appear when someone renders your custom field using a sc : FieldRenderer . In this case you ll need to look into the RenderField pipeline of Sitecore . There you find a processor called RenderWebEditing . Possibly through some manipulation here you can get your dropdown appear as you wish .", "Question : I have a layout with two place holders leftColumn and rightColum . For an item i am adding multiple sublaouts for leftcolumn and multiple sublaouts for rightcolum . Now in page-editor when i am trying to change position using Change Position button in toolbar and move content to another location content is getting moved to my new location as desired . But when i click Save button on Ribbon it is actully deleting moved content from presentation itself . I am not sure why it is behaving like this . we are using Sitecore 6.4 Comment : Looks like a bug you should probably contact Sitecore support . Comment : What happens in the Sitecore content editor under Presentation Layout Details for the item .. . Answer : Can you see anything through Sitecore Logs It may have any errors or exceptions that are being generated ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wysiwyg
UNK_RELATION
fabric8@apache@292
fabric8 -- fabric8 is an open-source set of microservices that run on top of kubernetes and openshift v3 to provide management with centralized logging and metrics continuous-delivery based on jenkins nexus and sonarqube with integrated chat ipaas integration platform as a service based on @placeholder activemq camel and cxf and tools for developers and devops .
{ "confidence": [ 61.774898529052734, 56.06078338623047, 56.00945281982422, 51.27630615234375, 51.18601608276367, 49.64311218261719, 48.822940826416016, 47.97040939331055, 47.1611213684082, 47.1611213684082, 47.11566162109375, 46.691043853759766, 46.02850341796875, 45.9830436706543, 45.704986572265625, 45.674015045166016, 44.99478530883789, 44.31880187988281, 43.17403793334961, 43.12173843383789, 42.78498840332031, 42.64909362792969, 42.234275817871094, 41.76652526855469, 41.3636474609375, 41.361236572265625, 41.3215217590332, 41.125572204589844, 41.02098846435547, 40.91092300415039, 40.28184509277344, 40.28184509277344, 40.05924987792969, 40.05924987792969, 40.05924987792969, 40.05924987792969, 40.05924987792969, 39.77830505371094, 39.502281188964844, 39.27656555175781, 39.2455940246582, 38.926631927490234, 38.926631927490234, 38.544395446777344, 38.52543640136719, 38.51845932006836, 38.46871566772461, 38.465301513671875, 38.427406311035156, 37.56916046142578, 37.392818450927734, 37.392818450927734, 37.30112838745117, 37.12700653076172, 36.959869384765625, 36.761436462402344, 36.72774887084961, 36.72429275512695, 36.50532150268555, 36.33784103393555, 35.996925354003906, 35.95304870605469, 35.62881851196289, 35.62881851196289, 35.539222717285156, 35.112640380859375, 35.01701354980469, 34.79207992553711, 34.70882034301758, 34.6584358215332, 34.27134704589844, 34.026580810546875, 34.026580810546875, 34.026580810546875, 34.026580810546875, 34.026580810546875, 33.884395599365234, 33.36192321777344, 33.35062789916992, 33.112213134765625, 32.93207550048828, 32.801239013671875, 32.54365539550781, 32.32905578613281, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.31930160522461, 32.229305267333984, 31.248607635498047, 31.186683654785156, 31.186683654785156, 30.81515121459961, 29.829212188720703, 29.829212188720703, 29.829212188720703 ], "content": [ "Is it even possible to deploy fabric8 into a native kubernetes cluster or is OpenShift required", "I use fabric8 on kubernetes quite a lot .", "I get the following on a native openshift fabric8 installation .", "I have installed fabric8 console in openshift v3 and have set up CD pipeline too .", "In the upstream community fabric8 is now on version 2 which is a different architecture based on Kubernetes and Docker .", "You can do this through Java via fabric8 http : fabric8.io s Kubernetes Java client https : github.com fabric8io kubernetes-client .", "Does version 2 of fabric8 come packaged within OpenShift", "Here s the latest instructions on installing it on kubernetes 1.2 : http : fabric8.io guide getStarted kubernetes.html .. . .. . There are various other options based on if you want to spin up kubernetes via vagrant or use GKE etc : http : fabric8.io guide getStarted index.html", "I am using fabric8.io to orchestrate application containers in Kubernetes .", "I am using fabric8 kubernetes plugin for elasticsearch 2.1 cluster discovery .", "Have you created a route to reach the fabric8 pod in openshift", "They are described in the configuration microservices documentation http : fabric8.io guide develop configuration.html .", "I am using Fabric8 on Google Container Engine with Kubernetes .", "Is there a way to install fabric8 in already installed openshift origin 3.1 server", "You can come talk to the fabric8 team on IRC at freenode.net fabric8", "but No applications are installed github.com fabric8io fabric8 issues 5718 https : github.com fabric8io fabric8 issues 5718", "http : fabric8.io guide getStarted gke.html .. . .. . FWIW to access the fabric8 console we use a service proxy from the Kubernetes API server the console inself then uses either ingress or external ips to access Jenkins Gogs Nexus etc", "this then results in not been able to access the fabric8 console .", "It seems specific to fabric8 .", "The fabric8 version 2 documentation is what you can find from the website at the documentation page : https : fabric8.io", "Full instructions are here http : fabric8.io guide getStarted openshift.html along with a troubleshooting guide http : fabric8.io guide getStarted troubleshooting.html .", "Easiest is surely to add another container based on this one github.com fabric8io fabric8 blob https : github.com fabric8io fabric8 blob cef2ec8424876332ac6e74625cdc23257d1ba8d8 fabric fabric8-karaf src main resources distro fabric import fabric profiles containers tomee.profile io.fabric8.container.process.properties", "How can we call a jboss fuse soap based webservice from another fuse soap service using kubernetes @endpoint @servicename annotations in fabric8 environment .", "I know that but Fabric8 will only download webprofile version .", "Im using fabric8 Kubernetes Java Client and Im accessing Kubernetes through HTTP I followed the example from fabric8 https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples ExecExample.java but I get the following error : .. . .. . What do I need to do to upgrade my connection to http 2", "Is there a way to use Fabric8 for PHP project", "The way we recommend integration and system-testing in maven with docker is via the fabric8 arquillian plugin http : fabric8.io guide testing.html .", "I am trying to run the pre-packaged ZooKeeper within Fabric8 .", "You should probably post to fabric8.io community or ping someone on IRC there .", "Fabric8 s Kubernetes Client is using a generated model and DSL that has the exact same structure as as the JSON and YAML configuration .", "Then I found Fabric8 http : fabric8.io but I cannot find any example of micro services made with Spring boot .", "I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io .", "Does the fabric8 console s logs show any errors", "What version of the fabric8 console are you using", "I m using Fabric8 v.1.2.0.redhat-133 .", "See http : fabric8.io gitbook urlHandlers.html", "Decided to go with fabric8 because of the extensive documentation .", "I m trying to automate deployment of test builds in CI with Gradle and the Fabric8 Java kubernetes-client .", "the way you go seems correct if you run the pre-integration-test phase the fabric8 plugin should do something .", "When I attempt to install fabric8 on the cluster into a namespace everything looks good and start up...but when taking a look at the fabric8 console I get a No namespaces available message or something to that affect .", "I also tried halting vagrant and then setting up fabric8 console in vagrant machine but not able to access it on fabric8.vagrant.f8 http : fabric8.vagrant.f8 any thoughts would be very helpful", "Is it possible to setup this TLS encryption using fabric8", "BTW I tried adding a fabric8 tag too .", "Here s a demo video showing how to create a Spring Boot microservice https : vimeo.com jbossdeveloper review 170830750 b3c8467593 in the Fabric8 Microservices Platform http : fabric8.io and having a complete Continuous Deployment pipeline http : fabric8.io guide cdelivery.html get created to do the following : .. . .. . package the code create the docker image and kubernetes manifest .. . perform system integration tests .. . deploy to the staging environment with rolling updates .. . wait for optional human approval .. . deploy to the production environment with rolling updates .. . .. . Any code or configuration change in the git repository kicks off rolling updates automatically - which is a form of hot deployment .", "I just completed the instructions given here http : fabric8.io guide getStarted gke.html on how to install fabric8 on Google Compute Engine .", "Parts of fabric8 v2 are productized in the Fuse Integration Service product FIS - docs.openshift.com enterprise 3.1 using images xpaas images https : docs.openshift.com enterprise 3.1 using images xpaas images fuse.html And JBoss Fuse will in the future also migrate to fabric8 v2 likely in version 7.0 onwards .", "Unfortunately you found an old documentation of the fabric8 v1 in that gitbook .", "I know that fabric8 https : github.com fabric8io fabric8 claims to support system-testing using kubernetes and arquillian http : fabric8.io guide testing.html however that seems to have the distinct disadvantage that all the applications need to be written in java which is very much a no-go for me .", "I couldnt find it in the examples .. . .. . https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L75 .. . .. . There dont seem to be javadocs available", "See http : fabric8.io gitbook developer.html", "I installed Fabric8 on a Google Container Engine cluster and I used gofabric8 deploy with a custom domain and cd-pipeline app to install fabric8.io on it .", "I thought that in order to inform Fabric8 of this new dependency I would need to add this reference to the fabric8.features so I did that .", "This is something that not only applies to Service but to every-single Kubernetes Openshift resource .", "Would need figure out what s the difference between jaxrs and webprofile version so as to make it work on Fabric8-1.2.0.Beta4 .. . .. . .. . .. . Web.xml after change : .. . .. . beans.xml after change : .. . .. . Also added 4 features to my profile in Fabric8 : spring-web spring cxf-jaxrs fabric-rest", "Generally speaking on kubernetes the use of service-discovery http : fabric8.io guide develop serviceDiscovery.html and kubernetes secrets avoids most of the use cases for environment specific configuration .", "I am using fabric8 to get the status of a kuberenetes pod by the following code .", "But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested .", "I m a newbie using Fabric8-1.2.0.Beta4 and trying to deploy REST example application taken from http : tomee.apache.org examples-trunk rest-example README.html to Tomee on Fabric8 .", "Until we have a upgrade command you should be able to just delete the fabric8 related replication controllers with kubectl delete all -l provider fabric8 and re run gofabric8 deploy", "I installed using kubectl create -f http : central.maven.org maven2 io fabric8 apps console-kubernetes 2.2.104 conso le-kubernetes-2.2.104-kubernetes.json After a while kubectl get pods NAME READY STATUS RESTARTS AGE fabric8-nzdqj 1 1 Running 0 7m templates-llple 1 1 Running 0 7m both pods are available .", "I am using fabric8 to develop a cluster management layer on top of Kubernetes and I am confused as to what the official API is to obtain notifications of errors when things go wrong when instantiating pods rep controllers services etc .", "Looking at the stack-trace indicates your using an older version of the fabric8 kubernetes client we migrated to okhttp from async-http-client a while back .", "This is all handled in the fabric8 vagrant box but is a separate step if you re doing it manually .", "If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea", "I have a JBoss Fuse running on OpenShift Online and I want to deploy there a Camel-CXF application .", "I am using https : github.com spotify docker-client in order to carry out Docker Image and Container handling activities and https : github.com fabric8io fabric8 tree master components kubernetes-api for Kubernetes related functionalities .", "Now I have a different problem chat.stackoverflow.com rooms 105350 fabric8 http : chat.stackoverflow.com rooms 105350 fabric8 please may I ask you a couple of questions here .", "See here http : fabric8.io guide getStarted openshift.html run-the-gofabric8-installer .", "Ideally we would use the same Continuous Delivery pipelines http : fabric8.io guide cdelivery.html to change code or configuration to ensure things are properly tested before they hit production .", "So my preference really is to use a Continuous Deployment pipeline http : fabric8.io guide cdelivery.html to roll out all changes whether code or configuration .", "FWIW you can use fabric8-arquillian to test stuff that are not written in java .", "I have created two fabric8-camedl-cdi services both need to interact to exchange data .", "Please have glance at The @Endpoint annotation section in this url http : fabric8.io guide cdi.html .", "enter image description here http : i.stack.imgur.com UIEIp.png .. . .. . Some features missing when I fabric8 : deploy 1st time .", "I am running Fabric8 inside JBoss Fuse 6.2.0.redhat-133 on my local machine .. . 4 .", "I have already tried running mvn -U fabric8 : deploy -DskipTests to update snapshots to no effect .. . 5 .", "We ve added a section to the docs that helps delete old static ips and forwarding rules fabric8.io guide getStarted http : fabric8.io guide getStarted gke.html google-container-engine-quotas", "Here https : github.com fabric8io kubernetes-client blob a47d2e288599559069481895c8b6fc7cf3fbab3d kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L147 s an example : .. . .. . You can change any configuration of the replication controller replicas environment-variables etc .", "In this case if you add a route with : .. . .. . cat EOF kubectl create -f - apiVersion : v1 kind : Route metadata : name : fabric8-console pec : host : EXTERNALLY RESOLVE DNS to : kind : Service name : fabric8 EOF .. . .. . As some extra info you cannot target ping at a port .", "I deployed my app into fabric8 and it s running .. . .. . But i did not found the service .. . .. . http : lenovo-pc : 8186 cxf .. . .. . and there is no window to see the route diagram .. . .. . How can i fix this problem", "You ll need a docker image for the database and to wrap that up in a kubernetes yaml json file so that it can be run up front as your app is deployed by fabric8-arquillian", "The key issue also mentioned in this bug report https : github.com fabric8io kubernetes-client issues 432 to fabric8 folks is that order of creation of object and watch on the object matters .", "Only changes made : 1 web.xml Added the following as suggested by http : tomee-openejb.979440.n4.nabble.com Problem-deploying-REST-Examples-on-Eclipse-td4582815.html : .. . .. . 2 Added fabric8-maven-plugin and distributionManagement to pom.xml to use fabric8 : deploy to deploy the war file and create rest-example profile .", "Thanks it downloaded the jaxrs version in fabric8 but however this REST application still does not run on fabric 8 same issue which it does run on my local standalone tomee jaxrs version .", "Do you mean that I should add another one for fabric8 to bootstrap correctly", "Just created a new namespace but that doesn t change anything from the fabric8 s pow .", "I recently started working on a code base that uses fabric8 to manage containers pods services etc .", "But since we are using fabric8 I would prefer to stick to that if there is any way to accomplish this with their API .", "The Fabric8 client has the following API call : .. . .. . client.endpoints .get .. . .. . This would give you the list of all end points .", "I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running .", "Do you have any ideas why I cannot reach my basic fabric8 console", "I m using fabric8 s java client but curl or something similar will be fine as well .", "There s an example of updating an image here : https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L136 .. . .. . Though as was pointed out in the comments this probably doesn t update the pods immediately unless the client is doing it .", "To get the external ip s from the CLI rather than the fabric8 console you can run kubectl get services and get the external ip-address for each service .", "I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile .", "I posted an issue : https : github.com fabric8io fabric8 issues 696 .. . .. . Let s see if there is a specific configuration to apply .", "Could you show the output of these commands : .. . .. . oc get route .. . .. . oc get pods .. . .. . oc describe rc fabric8 .. . .. . That might give us a clue as to what is going on .", "We wrote some docs on how to work with configuration http : fabric8.io guide develop configuration.html .", "I am just following through on their Getting Started example s here http : fabric8.io guide quickstarts index.html .", "I m struggling to synthesise how to correctly use the maven-failsafe and fabric8-maven plugins together ." ] }
{ "confidence": [ 88.6026840209961, 82.22460174560547, 78.18460083007812, 74.09352111816406, 73.42094421386719, 69.97084045410156, 68.36029815673828, 67.84114074707031, 67.78681945800781, 66.0360107421875, 65.32208251953125, 65.15632629394531, 64.79171752929688, 64.7393569946289, 64.04119873046875, 63.45330810546875, 61.32938766479492, 60.99938201904297, 60.56568908691406, 60.28825378417969 ], "content": [ "Question : I have a local kubernetes cluster setup from the RHEL7 binaries . When I attempt to install fabric8 on the cluster into a namespace everything looks good and start up...but when taking a look at the fabric8 console I get a No namespaces available message or something to that affect . We have port 8080 open locally and we are also setup for authentication on the secure port 6443 . I did notice that there were a bunch of OAUTH settings which I would guess are more specifically OpenShift or GCE . Is it even possible to deploy fabric8 into a native kubernetes cluster or is OpenShift required I can t find anything about it . Comment : I use github.com TheNewNormal kube-cluster-osx https : github.com TheNewNormal kube-cluster-osx to run it locally it seems to run - but I am just getting started . I installed using kubectl create -f http : central.maven.org maven2 io fabric8 apps console-kubernetes 2.2.104 conso le-kubernetes-2.2.104-kubernetes.json After a while kubectl get pods NAME READY STATUS RESTARTS AGE fabric8-nzdqj 1 1 Running 0 7m templates-llple 1 1 Running 0 7m both pods are available . but No applications are installed github.com fabric8io fabric8 issues 5718 https : github.com fabric8io fabric8 issues 5718 .. . Answer : I use fabric8 on kubernetes quite a lot . These days it works great Here s the latest instructions on installing it on kubernetes 1.2 : http : fabric8.io guide getStarted kubernetes.html .. . .. . There are various other options based on if you want to spin up kubernetes via vagrant or use GKE etc : http : fabric8.io guide getStarted index.html", "Question : I have previous experience in Apache Camel and JBoss Fuse and I am new to Openshift version 3.x I am trying to deploy a camel application which is developed using java dsl and spring DI . I am using an external properties file to load the consumer and producer endpoint in camel.In JBoss Fuse I used the configAdmin services with the update-stratergy reload as shown below in my blueprint.xml .. . .. . The above configuration will reload the camelContext automatically when there is a change in the properties file .. . .. . How can I achieve the same functionality using fis-java-openshift : 1.0 template image in openshift 3.x Comment : Haven t tried this myself but you probably need to connect your docker-container to an existing disk that has your property file on that . So that disk space always exists Then when you update the property file there I would expect to see the desired results . .. . Answer : We wrote some docs on how to work with configuration http : fabric8.io guide develop configuration.html . Generally speaking on kubernetes the use of service-discovery http : fabric8.io guide develop serviceDiscovery.html and kubernetes secrets avoids most of the use cases for environment specific configuration . Ideally we would use the same Continuous Delivery pipelines http : fabric8.io guide cdelivery.html to change code or configuration to ensure things are properly tested before they hit production . However if you really really want to reload configuration on the fly in Java containers you can store configuration in a ConfigMap and mount it as a file inside the pod then have the Java code watch the file eg with spring-boot or ConfigAdmin .", "Question : I am trying out a Fabric8 Spring Boot quickstart following the steps documented here https : fabric8.io gitbook springBootContainer.html I get the following error : .. . .. . I am running with Maven 3.3.9 and Java 1.8.0 91 on Ubuntu 14.04 .. . .. . Does this guide just not work or am I missing something from my configuration Points to consider : .. . .. . 1 . My .m2 settings.xml is untouched .. . 2 . The project archetype that I download as part of the first step is untouched aside from the mvn install .. . 3 . I am running Fabric8 inside JBoss Fuse 6.2.0.redhat-133 on my local machine .. . 4 . I have already tried running mvn -U fabric8 : deploy -DskipTests to update snapshots to no effect .. . 5 . This totally useless issue https : access.redhat.com solutions 1547723 is the only Redhat acknowledgement of this problem - and changing my Maven to the ancient 3.2.3 version necessitating a change to Java 6 runtime is not going to fix the problem going forward . .. . Answer : fabric8 v1 is part of JBoss Fuse and you can find documentation how to use it as part of the JBoss Fuse product documentation : http : developers.redhat.com products fuse overview .. . .. . The Maven Archetype goal to use is different version number than what you type you must use the version number of the JBoss Fuse product version you use . In the upstream community fabric8 is now on version 2 which is a different architecture based on Kubernetes and Docker . Unfortunately you found an old documentation of the fabric8 v1 in that gitbook . The fabric8 version 2 documentation is what you can find from the website at the documentation page : https : fabric8.io Comment : Thank you for your answer . Does version 2 of fabric8 come packaged within OpenShift Comment : Parts of fabric8 v2 are productized in the Fuse Integration Service product FIS - docs.openshift.com enterprise 3.1 using images xpaas images https : docs.openshift.com enterprise 3.1 using images xpaas images fuse.html And JBoss Fuse will in the future also migrate to fabric8 v2 likely in version 7.0 onwards . But its company decision so take my word as not official", "Question : I installed Fabric8 on a Google Container Engine cluster and I used gofabric8 deploy with a custom domain and cd-pipeline app to install fabric8.io on it . It seems to be running if I do kubectl get pods but how can I access it I tried the public IP from the loadbalancer no hail yet . I looked at the forwarding rules in GKE and I added 443 next to 80 which was already there no effect . Then I looked at the Ingress kubectl get ing and there is none . What am I missing and how can I fix it Am I doing something strange and unsupported .. . Answer : We had an issue with the Ingress controller pod which looks like it s been fixed but I ve not had a chance to try it out yet https : github.com nginxinc kubernetes-ingress issues 34 .. . .. . So for now we ve been using the Google Container loadbalancer as it automatically creates external IPs for our services . We ve just updated our GKE docs so hopefully things are a bit clearer . From the docs we ve also linked to a silent demo of running fabric8 with CD pipelines etc on GKE so that might help too . http : fabric8.io guide getStarted gke.html .. . .. . FWIW to access the fabric8 console we use a service proxy from the Kubernetes API server the console inself then uses either ingress or external ips to access Jenkins Gogs Nexus etc Comment : To get the external ip s from the CLI rather than the fabric8 console you can run kubectl get services and get the external ip-address for each service . They can take a minute to create and you also need to watch out incase you exceed your GKE quotas these can be checked in the GKE dashboard . We ve added a section to the docs that helps delete old static ips and forwarding rules fabric8.io guide getStarted http : fabric8.io guide getStarted gke.html google-container-engine-quotas", "Question : null .. . Answer : I have created two fabric8-camedl-cdi services both need to interact to exchange data . So i have made use of cxf endpoints by declaring setAddress with localhost init . Now i need to make use of headless- service functionality of kubernetes and make the two services interact without declaring address as local host . Please have glance at The @Endpoint annotation section in this url http : fabric8.io guide cdi.html . Hope you understood my requirement . Thanks in advance .", "Question : I try to get started with fabric 8 and open shift on docker . An open shift instance single docker-container is running as described here : https : docs.openshift.org latest getting started administrators.html running-in-a-docker-container . I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running . But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested . But I do not know how to enable them in the docker-container . Do you have any ideas why I cannot reach my basic fabric8 console Comment : try to ping curl port 80 .. . Answer : If you are trying to access a service on OpenShift remotely then you need to ensure you ve deployed a router added a Route . You can read more on routing in OpenShift at https : docs.openshift.com enterprise 3.0 architecture core concepts routes.html . In this case if you add a route with : .. . .. . cat EOF kubectl create -f - apiVersion : v1 kind : Route metadata : name : fabric8-console pec : host : EXTERNALLY RESOLVE DNS to : kind : Service name : fabric8 EOF .. . .. . As some extra info you cannot target ping at a port . Ping uses a different network protocol ICMP which doesn t have the notion of ports . Also both services pods don t respond to ping so you will not be able to ping them . If you re trying to check connectivity then you can use the nc utility : .. . .. . This will report connection success if the address port is reachable . Note that in OpenShift pod IPs service IPs are generally only routeable inside the cluster i.e . on nodes so trying this from outside the cluster will probably fail . Comment : Thank you very much . Now I have a different problem chat.stackoverflow.com rooms 105350 fabric8 http : chat.stackoverflow.com rooms 105350 fabric8 please may I ask you a couple of questions here . Comment : Sorry not enough karma - I feel this should be the accepted answer not the other one . You can come talk to the fabric8 team on IRC at freenode.net fabric8 Comment : Fixed changed to better solution", "Question : I m a newbie using Fabric8-1.2.0.Beta4 and trying to deploy REST example application taken from http : tomee.apache.org examples-trunk rest-example README.html to Tomee on Fabric8 . Including openejb-cxf-rs and tomee-jaxrs don t seem to help . Only changes made : 1 web.xml Added the following as suggested by http : tomee-openejb.979440.n4.nabble.com Problem-deploying-REST-Examples-on-Eclipse-td4582815.html : .. . .. . 2 Added fabric8-maven-plugin and distributionManagement to pom.xml to use fabric8 : deploy to deploy the war file and create rest-example profile . After which I created a container to start the REST application . Able to see the index.html but always getting 403 or 404 errors when trying to call the WS . Pls help . Thanks .. . .. . .. . .. . Had removed the changes in web.xml downloaded apache-tomee-jaxrs-1.7.1 and configured it to run on this version of tomee it is able to run without issue . Would need figure out what s the difference between jaxrs and webprofile version so as to make it work on Fabric8-1.2.0.Beta4 .. . .. . .. . .. . Web.xml after change : .. . .. . beans.xml after change : .. . .. . Also added 4 features to my profile in Fabric8 : spring-web spring cxf-jaxrs fabric-rest Comment : Hm you will need to provide a stacktrace or code sample if you want any directed help . 4xx codes probably show that your application is running but jaxrs or however you are mapping your URIs and HTTP verbs is not being registered correctly . .. . Answer : webprofile version doesn t support JAXRS no provider but jaxrs and plus versions have it built-in . Comment : Hi rmannibucau. . I know that but Fabric8 will only download webprofile version . I don t know how to get it to download the JAXRS version or what can be done to add JAXRS to webprofile . Pls advise if you know how . Thanks Comment : Easiest is surely to add another container based on this one github.com fabric8io fabric8 blob https : github.com fabric8io fabric8 blob cef2ec8424876332ac6e74625cdc23257d1ba8d8 fabric fabric8-karaf src main resources distro fabric import fabric profiles containers tomee.profile io.fabric8.container.process.properties Comment : Thanks it downloaded the jaxrs version in fabric8 but however this REST application still does not run on fabric 8 same issue which it does run on my local standalone tomee jaxrs version . Comment : Changed web.xml and beans.xml see above now able to call the WS however it s throwing org.apache.cxf.interceptor.Fault at org.apache.cxf.service.invoker.AbstractInvoker.createFault AbstractInvoker.java : 170 .. . Caused by : java.lang.NullPointerException at org.superbiz.rest.service.UserService.create UserService.java : 46 . . Look like some issue with OpenEJB or hsqldb not loaded", "Question : I m struggling to synthesise how to correctly use the maven-failsafe and fabric8-maven plugins together . I Want to run integration tests but in the pre-integration-tests phase start a docker-container running a DB and in the post-integration-phase stop the container . Looking at the fabric8 docker-maven-plugin documentation https : github.com fabric8io docker-maven-plugin blob master doc intro.md it states this is possible but none of the examples seem to illustrate this . Update 1 : .. . .. . This is the configuration that successfully worked for me : Comment : where-in the pom is this located and what goal do you execute and what isn t working the way you go seems correct if you run the pre-integration-test phase the fabric8 plugin should do something . .. . Answer : The way we recommend integration and system-testing in maven with docker is via the fabric8 arquillian plugin http : fabric8.io guide testing.html . That takes care of creating a new namespace for the test and provisioning all the kubernetes resources then running your JUnit test case to run the assertions etc . You ll need a docker image for the database and to wrap that up in a kubernetes yaml json file so that it can be run up front as your app is deployed by fabric8-arquillian Comment : I m not that clued up on the dev-ops side of things but I m not sure what Kubernetes has to do with this situation All I wanted to do was start a docker-container before running integration tests . Comment : ah - didn t grok you were just using docker on a single machine . Apologies see Roland s reply for working with a single machine with pure docker and no orchestration", "Question : I am using fabric8.io to orchestrate application containers in Kubernetes . I am looking to create a Service that manages a pod with a certain label on a certain port . Is there a specific example of the API that does this . I couldnt find it in the examples .. . .. . https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples FullExample.java L75 .. . .. . There dont seem to be javadocs available .. . Answer : Fabric8 s Kubernetes Client is using a generated model and DSL that has the exact same structure as as the JSON and YAML configuration . So in order to create a Service instance that looks like : .. . .. . .. . .. . You can use the following code : .. . .. . If don t need to hold a reference of the service object and you just want to create it you can inline it like : .. . .. . It s even more compact that the JSON equivalent because default-value can be committed and also some stuff like selector can be optionally inlined in a single line . This is something that not only applies to Service but to every-single Kubernetes Openshift resource . If you have the JSON or YAML in-place you can load them easily by providing an input stream to the client : .. . .. . There are more options here like directly creating the service : .. . .. . It s always help to remember that structure is always the same regardless of lang format . Pretty much anything can be inlined so tab completion in your IDE can be really really helpful .", "Question : I try to get started with fabric 8 and open shift on docker . An open shift instance single docker-container is running as described here : https : docs.openshift.org latest getting started administrators.html running-in-a-docker-container . I installed fabric 8 as http : fabric8.io guide getStarted openshift.html and now the basic pods are running . But I cannot reach the service .. . .. . In the troubleshooting section of : http : fabric8.io guide getStarted openshift.html some ideas like .. . .. . are suggested . But I do not know how to enable them in the docker-container . Do you have any ideas why I cannot reach my basic fabric8 console Comment : try to ping curl port 80 .. . Answer : Have you created a route to reach the fabric8 pod in openshift", "Question : I m confused about how I can use multiple micro services made with spring-boot . When I read about Karaf http : karaf.apache.org documentation.html they always use Blueprint instead of Spring and I don t get the impression that it s possible to use it with Spring boot . Then I found Fabric8 http : fabric8.io but I cannot find any example of micro services made with Spring boot . All I need is being able to do hot deployment and configuration at runtime like Karaf does but with multiple Spring boot services . Is it possible Could anybody give me documentation or a project sample Thank you Comment : should this question rather be on programmers.stackexchange.com Comment : Read this article from source : spring.io blog 2015 07 14 microservices-with-spring https : spring.io blog 2015 07 14 microservices-with-spring with battery included . Comment : @Alex if this question is about Spring then no . If this question is about microservices then maybe . But this question is about Spring so no . Comment : @Alex I wasn t sure . I will let a moderator move my question if needed Comment : @DoNhuVy Oh that looks perfect I will read asap .. . Answer : Here s a demo video showing how to create a Spring Boot microservice https : vimeo.com jbossdeveloper review 170830750 b3c8467593 in the Fabric8 Microservices Platform http : fabric8.io and having a complete Continuous Deployment pipeline http : fabric8.io guide cdelivery.html get created to do the following : .. . .. . package the code create the docker image and kubernetes manifest .. . perform system integration tests .. . deploy to the staging environment with rolling updates .. . wait for optional human approval .. . deploy to the production environment with rolling updates .. . .. . Any code or configuration change in the git repository kicks off rolling updates automatically - which is a form of hot deployment . e.g . if you are running 3 containers in production new containers are spun up with the new code and or config based on the rolling upgrade policy . Typically new containers start when they are ready old ones are taken down say 1 at a time or you can do them all at once if you prefer . The rolling upgrade is included in any service load-balancing so new containers only get invoked when they are ready . Given your use of OSGi you may want the containers to keep running and just mutate on the fly . Firstly the whole move to immutable infrastructure e.g . docker images means software gets simpler and easier to reason about . Rather than rolling new bundles code config in out on the fly you just make a new image and spin that up . Mutating on the fly leads to multi-threaded code having to stop and restart services on the fly which can cause all kinds of complex hard to reproduce bugs and resource leaks as you have large complex object dependency graphs of services starting stopping on the fly . On the Fuse team we ve wasted many man years fixing bugs in restart logic and I m sure there s still a zillion bugs hidden there in restarting OSGi services on the fly . So my preference really is to use a Continuous Deployment pipeline http : fabric8.io guide cdelivery.html to roll out all changes whether code or configuration . Sure there s some latency added between the time you make a change and the moment a process is processing a new request with the new code config - but you have more quality and reliability baked in . Plus its trivial to roll back . You can also easily do rolling upgrades of the change so you get fast feedback if the change breaks things for a small subset of your users traffic rather than a big bang . That being said if you still really really want production JVMs to reload code and or config on the fly without testing it first in a big bang approach with no easy rollback there are still some options available . They are described in the configuration microservices documentation http : fabric8.io guide develop configuration.html . Essentially it boils down to using a ConfigMap in Kubernetes http : kubernetes.io docs user-guide configmap or a git repository volume http : kubernetes.io docs user-guide volumes gitrepo in both cases the configuration is exposed as volumes files - the Java code can then watch the files and reload on the fly . You can do this via OSGi Config Admin or via Spring Boot http : docs.spring.io spring-boot docs current-SNAPSHOT reference htmlsingle howto-hotswapping - whichever development framework you pick really . Just remember the tradeoff of the benefits in latency from hot-reloading from the reduced quality increased bugs and operational issues of moving away from immutable infrastructure and Continuous Delivery Comment : Completely agreed especially in a Microservices world where turnaround times are supposed to be quick because of the smaller artefact footprints . It should to be affordable to restart whole micro apps in order to get to a well defined always reproducible state . And since it mirrors the way applications are operated in production its a more realistic workflow . But this only works really well if development roundtrip times can be kept short which is imho a key requirement . Comment : I agree that hot deployment is not necessary to have short dev cycles . I personally work with OSGi in the same way as James showed for spring-boot . I create fully packaged deployment units in an automated pipeline . The main difference is that I propose to not start with microservices but rather a modular application in one process . It is much simpler . Then if needed you split out the modules with different team or dev cycles as individual microservices .", "Question : I get the following on a native openshift fabric8 installation . this then results in not been able to access the fabric8 console . Thank you in advance error screen shot http : i.stack.imgur.com yZLbQ.png Comment : Screenshots are discouraged because they aren t searchable and tend to rot . Please copy and paste the error message into the post directly . meta.stackoverflow.com a 307500 733092 http : meta.stackoverflow.com a 307500 733092 Comment : You should probably post to fabric8.io community or ping someone on IRC there . .. . Answer : Could you show the output of these commands : .. . .. . oc get route .. . .. . oc get pods .. . .. . oc describe rc fabric8 .. . .. . That might give us a clue as to what is going on . Did you supply a domain parameter to gofabric8 Full instructions are here http : fabric8.io guide getStarted openshift.html along with a troubleshooting guide http : fabric8.io guide getStarted troubleshooting.html .", "Question : Is there a way to install fabric8 in already installed openshift origin 3.1 server I have my origin server running I did install using ansible one node one master . If yes how thanks .. . Answer : See here http : fabric8.io guide getStarted openshift.html run-the-gofabric8-installer . Essentially download the latest gofabric8 from here https : github.com fabric8io gofabric8 releases . Then run : Comment : @Jimmy- thanks a lot for response I tried installing fabric 8 using the method in your answer but as my environment is only for test and I don t have any domain-name available can not access it from browser . To test I tried using vagrant fabric8 installer from here blog.eisele.net 2015 09 http : blog.eisele.net 2015 09 running-openshift-origin-on-windows.html.But It gets stuck at this point forever : default : Downloading docker images.. . any idea why Comment : I also tried halting vagrant and then setting up fabric8 console in vagrant machine but not able to access it on fabric8.vagrant.f8 http : fabric8.vagrant.f8 any thoughts would be very helpful Comment : If you don t have a DNS zone you can update to add the entries in then you should be able to just edit your machine s etc hosts-file or equivalent on Windows - possibly c : WINDOWS system32 drivers etc hosts to add the hosts entries in something like : 172.17.28.4 fabric8.vagrant.f8 In production you ll want to of course have a valid DNS set up for your OpenShift router domain Comment : @Jimmy - yes that s already done by Vagrant . I have entry in hosts-file . still cant access : Comment : Have you deployed the openshift router See here https : docs.openshift.com enterprise 3.0 install config install deploy router.html . This is all handled in the fabric8 vagrant box but is a separate step if you re doing it manually .", "Question : I recently started working on a code base that uses fabric8 to manage containers pods services etc . in kubernetes . After creating a service for a given pod I need to inform our end users of the external IP via which they can access said service . From the command-line kubectl I would do a describe and get output like this .. . .. . I used wireshark to trace the REST API calls that were being made when the above command runs and it seems the raw Kubernetes REST API accesses the above info via a URL like this .. . .. . So I could theoretically get the info I want via the raw Kubernetes REST API . But since we are using fabric8 I would prefer to stick to that if there is any way to accomplish this with their API . I see that there is class that carries info about endpoints in fabric8 .. . io.fabric8.kubernetes.api.model.Endpoints but I searched and could find no documentation on how to query a service for its Endpoints information . Also when using the fabric8 API to watch for events we have tried looking at service.getStatus.getLoadBalancer.getIngress whenever we get a an event associated with our service but this is always empty .. . .. . would be most grateful for any tips or guidance... . -chris .. . Answer : The Fabric8 client has the following API call : .. . .. . client.endpoints .get .. . .. . This would give you the list of all end points . Now there are ways in which you can limit the list that you receive to a particular namespace labels using : .. . .. . client.endpoints .inNamespace 5683616f16426028459a535c .withLabel name spark-master .list Comment : Thanks Vijay btw : where can i find the javadocs for this stuff . cb Comment : github.com fabric8io kubernetes-client https : github.com fabric8io kubernetes-client", "Question : I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io . When I deploy a CXF SOAP service into the system it is available at http : HOSTNAME : 8181 cxf . Until now all our stack was deployed into a tomcat container secured using TLS encryption on the regular 8443 port using or not client authentication . We by the way use WSDL policies to enforce it . Is it possible to setup this TLS encryption using fabric8 karaf Jerome .. . .. . P.S : I wanted to add the new tag fabric8 but I do not have enough points to do that so I tagged using fusefabric . Edit 1 : .. . .. . Thanks @iocanel It seems to work... . well mostly : - .. . .. . In fact if I start from a fresh fabric8 installation and if I setup in etc org.ops4j.pax.web.cfg : .. . .. . Then I can browse the hawtio web interface on the 8443 port . However as soon as I initialise the container with fabric : create the port is not available anymore . If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea Jerome Comment : Could you test this with a vanilla Karaf don t know what this fabric stuff is doing on top . Comment : @AchimNierbeck I tested on a basic karaf configuration with the web-console and it works indeed . It seems specific to fabric8 . Comment : so stick to it : Comment : : . In fact I misunderstood the @iocanel answer . I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile . Comment : BTW I tried adding a fabric8 tag too . I hope that helps .. . Answer : I posted an issue : https : github.com fabric8io fabric8 issues 696 .. . .. . Let s see if there is a specific configuration to apply .", "Question : I would have a question about the wonderful tool that I just discovered named fabric8 http : fabric8.io . When I deploy a CXF SOAP service into the system it is available at http : HOSTNAME : 8181 cxf . Until now all our stack was deployed into a tomcat container secured using TLS encryption on the regular 8443 port using or not client authentication . We by the way use WSDL policies to enforce it . Is it possible to setup this TLS encryption using fabric8 karaf Jerome .. . .. . P.S : I wanted to add the new tag fabric8 but I do not have enough points to do that so I tagged using fusefabric . Edit 1 : .. . .. . Thanks @iocanel It seems to work... . well mostly : - .. . .. . In fact if I start from a fresh fabric8 installation and if I setup in etc org.ops4j.pax.web.cfg : .. . .. . Then I can browse the hawtio web interface on the 8443 port . However as soon as I initialise the container with fabric : create the port is not available anymore . If I restart fabric8 then the logs are full of : .. . .. . Do you have an idea Jerome Comment : Could you test this with a vanilla Karaf don t know what this fabric stuff is doing on top . Comment : @AchimNierbeck I tested on a basic karaf configuration with the web-console and it works indeed . It seems specific to fabric8 . Comment : so stick to it : Comment : : . In fact I misunderstood the @iocanel answer . I modified etc org.ops4j.pax.web.cfg whereas I now understand that I have to modify org.ops4j.pax.web.properties in the fabric8 default profile . Comment : BTW I tried adding a fabric8 tag too . I hope that helps .. . Answer : The default profiles contains the org.ops4j.pax.web.properties file . By editing this file you could configure ssl as described here : https : ops4j1.jira.com wiki display paxweb SSL+Configuration Comment : thanks a lot but I face another issue see my edit . Comment : Ok in fact I misunderstood your answer . I modified etc org.ops4j.pax.web.cfg instead of the org.ops4j.pax.web.properties file in the default profile", "Question : There is more than one example where I have seen this status from a pod running in openshift origin . In this case it was the quickstart for the cdi camel example . I was able to successfully build and run it locally non - openshift but when I try to deploy on my local openshift using mvn -Pf8-local-deploy I get this output for that particular example snipped for relevance : - .. . .. . vagrant@vagrant camel oc get pods NAME READY STATUS RESTARTS AGE cdi-camel-z4czs 0 1 CrashLoopBackOff 4 2m .. . .. . Tail of the logs are as under : - .. . .. . Can someone help me solve this .. . Answer : If the state of the pod goes in to CrashLoopBackOff it usually indicates that the application within the container is failing to start up properly and the container is exiting straight away as a result . If you use oc logs on the pod name you may not see anything useful though as it would capture what the latest attempt to start it up is doing and may miss messages . What you should do is instead provide the --previous or -p option to oc logs along with the pod name . That will show you the complete logs from the previous attempt to start up the container . If this is an arbitrary Docker image you are using a common problem that can occur and which would cause the container not to start is an application image which requires to be run as the root user . Because running an application inside of a container as root still has risks OpenShift doesn t allow you to do that by default and will instead run as an arbitrary assigned user ID . The application image may not be designed with this possibility in mind and so is failing . So try and get those logs messages and see what the problem is . Comment : Just to be sure we are on the same page I am trying to run a canned example from here https : github.com fabric8io ipaas-quickstarts tree master quickstart cdi camel which is expected to work out of the box on this canned vagrant openshift box . I am just following through on their Getting Started example s here http : fabric8.io guide quickstarts index.html . But they dont work . This is the first time I am trying this example so there isn t any previous running version .", "Question : Is there a way to use Fabric8 for PHP project All the sample I can find is for java and nodejs . I am using Fabric8 on Google Container Engine with Kubernetes . .. . Answer : There s not at the moment but we can look to add one in for the next release . There s Java nodejs golang swift and ruby already but we can add php and .net hopefully in the next few days . Comment : Thanks James . I ll wait for the sample then . Comment : Hi Ivan - I forgot to mention that we added a real simple PHP https : github.com fabric8-quickstarts php-example and .Net examples along with corresponding Pipelines in a recent release . Until we have a upgrade command you should be able to just delete the fabric8 related replication controllers with kubectl delete all -l provider fabric8 and re run gofabric8 deploy Comment : Thanks James will try it today", "Question : null .. . Answer : I have installed fabric8 console in openshift v3 and have set up CD pipeline too . Now I want to deploy my maven app which is available in github.com . Whenever I try to deploy it build doesnt start . any idea why it also doesnt ask me which base image to use . thanks in advance", "Question : Im using fabric8 Kubernetes Java Client and Im accessing Kubernetes through HTTP I followed the example from fabric8 https : github.com fabric8io kubernetes-client blob master kubernetes-examples src main java-io fabric8 kubernetes examples ExecExample.java but I get the following error : .. . .. . What do I need to do to upgrade my connection to http 2 Comment : That looks like the Kubernetes API server didn t like something about your request . Do you have any more details on the HTTP 400 error .. . Answer : I found out that this has to do with http2 because Kubernetes exec uses SPDY the problem went away when I upgraded to curl version 7.36 and installed nghttp2 on the server . After installing curl I was able to get the response by adding some headers .. . .. . curl -H Connection : upgrade -H Upgrade : SPDY 3.1 master url : port pod exec" ] }
[ "yes-answer-long", "yes-answer-short" ]
apache
UNK_RELATION
qt5.3@qt@29
qt5 .3 -- version 5.3 of the @placeholder library that is a cross-platform application development application and ui framework .
{ "confidence": [ 29.44501495361328, 24.36743927001953, 23.387229919433594, 23.106189727783203, 23.018434524536133, 21.99232292175293, 21.97347068786621, 21.536357879638672, 21.33782196044922, 21.335304260253906, 20.559337615966797, 20.437776565551758, 20.31749725341797, 20.23672103881836, 19.720083236694336, 19.720083236694336, 19.681846618652344, 19.567825317382812, 19.516550064086914, 19.218914031982422, 19.213077545166016, 18.922164916992188, 18.909393310546875, 18.909393310546875, 18.675697326660156, 18.675697326660156, 18.58326530456543, 18.58326530456543, 18.58326530456543, 18.58326530456543, 18.58326530456543, 18.58326530456543, 18.41796875, 18.403404235839844, 18.316604614257812, 18.20142364501953, 18.15056037902832, 18.15056037902832, 18.15056037902832, 17.80812644958496, 17.695316314697266, 17.57711410522461, 17.480754852294922, 17.470991134643555, 17.087745666503906, 17.051979064941406, 17.051979064941406, 17.051979064941406, 16.54545021057129, 16.497793197631836, 16.38241195678711, 16.16370391845703, 16.16370391845703, 16.114797592163086, 15.98817253112793, 15.814571380615234, 15.746430397033691, 15.735298156738281, 15.651214599609375, 15.467287063598633, 15.447919845581055, 15.431772232055664, 15.323572158813477, 15.322246551513672, 15.322246551513672, 15.12060546875, 15.065120697021484, 15.055728912353516, 15.024072647094727, 14.832839965820312, 14.798117637634277, 14.704549789428711, 14.659542083740234, 14.647848129272461, 14.639392852783203, 14.333189964294434, 14.154440879821777, 14.154440879821777, 13.845547676086426, 13.604766845703125, 13.570152282714844, 13.326756477355957, 13.326756477355957, 13.30478286743164, 13.055858612060547, 13.033055305480957, 13.016510009765625, 12.618302345275879, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426, 12.530117988586426 ], "content": [ "I am building a cross-platform application to record multimedia files for ongoing processing .", "while migrating my application from Qt4.7 to qt5.3 i made all the changes needed in the code according to qt5 .. . .. . my applications started but when i tried to login. . the application closed and it did not crashed rather .. . .. . it stoped with this error .. . .. . initially i thought that application is crashing so tried to use debugger but that is not the case .", "Note : The documentation-link is for QT4.8 as 5.3 is not available anymore but my code is from version 5.3 too .", "Maybe this is a QT 5.3 bug .", "I am using Qt framework and I would like to generate mouse events outside my application window .", "I am using Windows 7 64-bit to develop a Qt 5.3 application .", "I m a fan of Qt and update it frequently Qt5.1- 5.2- 5.3 .", "Do you want need to run it on QT 5.3", "This is source of qt ru : .. . .. . Therefore it is necessary to deploy application with all these translation files .", "I met the same problem on Fedora 20 with Qt5 from repo .", "I have a tablewidget in my application .", "Qt 5.4 has the same problem as Qt 5.3 .", "Yes strange I am testing on Win 7 Qt 5.3 .", "http : stackoverflow.com questions 26099139 how-to-fix-gstreamer-error-in-qt5", "QGuiApplication stops when locking the phone or switching application .", "I have a small application on OpenGL+GLEW .", "I m building a plugin-system for my QML+C++ application .", "Myself personally I generally adopt option 1 during development then when development is complete I switch to number 2 very rarely do I use number 3 in desktop based software .", "I ve seen some promising references to being able to run Qt5 on modern OpenGL .", "If I compile with Qt 5.2 instead of Qt 5.3 the problem disappears .", "You ll need to download and build either the 32-bit version http : download.qt-project.org official releases qt 5.3 5.3.2 qt-opensource-windows-x86-msvc2013 opengl-5.3.2.exe or the 64-bit version http : download.qt-project.org official releases qt 5.3 5.3.2 qt-opensource-windows-x86-msvc2013 64 opengl-5.3.2.exe .", "Option 3 for me is often used when the application in question is designed to do a single job such as converting a file for another process to work with or generating some output for a server to display in a web page etc .", "Here is some sample source code : .. . .. . C++ code for the BluetoothSocket QML type : http : code.woboq.org qt5 qtconnectivity src imports bluetooth qdeclarativebluetoothsocket p.h.html .. . C++ code that registers the BluetoothSocket type plus other types : http : code.woboq.org qt5 qtconnectivity src imports bluetooth plugin.cpp.html", "I need generate dll s for my project to use Qt Cryptographic Architecture https : github.com JPNaude dev notes wiki Using-the-Qt-Cryptographic-Architecture-with-Qt5 I try to go step by step as this https : forum.qt.io topic 25628 qca-build-on-qt5 short tutorial says .", "Go to say C : Qt 5.3 mingw482 32 qml -- all the subfolders here contain QML plugins mostly written in C++ .", "I can t test on Qt 5.3 since I don t have it installed sorry .", "I ve got a QML-application containing a TableView with two columns .", "I m developing a C++ application that dynamically link against Qt boost and Assimp .", "So everything including my application is built with a target 32-bit .", "Getting this error message when running my QML application on Android .", "When I switch back to my application the event-loop resumes .", "I would probably also verify that application state changed signal etc .", "I installed Qt creator Qt5 and its examples on Raspberry pi 2 B Model .", "I have created an application using Qt 5.3.2 .", "Use APIs specific for your target-platform .", "If your program works right under Qt 5.2 and the exact same program does not work right Qt 5.3 it s probably a Qt bug and your best option is to report it to Digia .", "I ve got a small application where users may create their own plugins as QML-files .", "This is based on an inherited application and I am not able to re-write using alternative libraries .", "Doing things this way ensures that the application adapts automatically to it s environment irrespective of the user .", "3 .", "Right now I can build 3 dll s : .. . .. . libqca-qt5 .. . libqca-logger .. . libqca-gnupg and when qt tries to build libqca-ossl.dll the error apears : .. . .. . C : Program Files OpenVPN bin ssleay32.dll : file not recognized : File .. . format not recognized collect2.exe : error : ld returned 1 exit status plugins qca-ossl CMakeFiles qca-ossl.dir build.make : 104 : recipe for target lib qca-qt5 crypto libqca-ossl.dll failed mingw32-make 2 https : forum.qt.io topic 25628 qca-build-on-qt5 : lib qca-qt5 crypto libqca-ossl.dll Error 1 CMakeFiles Makefile2 : 395 : recipe for target plugins qca-ossl CMakeFiles qca-ossl.dir all failed mingw32-make 1 https : github.com JPNaude dev notes wiki Using-the-Qt-Cryptographic-Architecture-with-Qt5 : plugins qca-ossl CMakeFiles qca-ossl.dir all Error 2 Makefile : 137 : recipe for target all failed mingw32-make : all Error 2 15 : 17 : 12 : The process C : Qt Qt5.3.1 Tools mingw482 32 bin mingw32-make.exe exited with code 2 .", "When I read Qt 5.3 documentation about TabView and Tab I did not find any signals exposed by them .", "The folder that I copy to the other machine includes : .. . .. . MyApp.exe .. . platform .. . accessible .. . assimp.dll .. . icudt52.dll .. . icuint52.dll .. . icuuc52.dll .. . kernel32.dll .. . opengl32.dll .. . libEGL.dll cannot be found in Qt 5.3 msvc2012 opengl .. . libGLESv2.dll same .. . msvcp1XX.dll .. . msvcr1XX.dll .. . The Qt libs that I need Core GUI Widgets OpenGL .. . .. . If I copy these .dll folders from Qt 5.3 msvc2012 opengl the app requires msvcp110.dll to start .", "If the file I m trying to read isn t manually opened before I begin my app I get the following driver error : .. . .. . Here s my setup.. . .. . .. . Qt Creator Build Version : .. . .. . I am working in Qt 5.3 which I did not build from source--I downloaded the installer .", "The Code for translations does NOT change through each version of Qt .", "However if I try to run it on another machine I get the 0xc000007b error The application was unable to start correctly .", "The reason why it is not good idea to this in an activity is simply that the application may be killed even instantly when it gets into the background .", "I have built up a QMenu MainMenu on top of my MainWindow in my application .", "I opened a bug about it : bugreports.qt-project.org browse QTBUG-42107 https : bugreports.qt-project.org browse QTBUG-42107 I am able to use the controls that crashed in 5.3 though .", "This code is using about 3 years .", "Use of QApplication indicated that you have normal QWidget container for your QML UI as you say UI is based on QML though .", "i think its somthing realted to Qkeyevent because the application stops when i pressed any key and i have overloaded eventfilter in my code and i am handing Qkeyevents .", "Using Qt5.3.1 that became pain.. . it still needs a few seconds to load the data but then it blocks an entire CPU core for multiple minutes making the application unresponsive before data finally appears in the view .", "When I lock the phone or if I switch to another application in my android phone the worker thread continues printing but the event-loop stops .", "Having looked at the Event Viewer I found : .. . .. . So I started installing VisualStudio Express and Qt5 on the second machine to compile my code on it .", "3 You can find out if your framework or the underlying OS has any calls for you to ask who the current user is and where their home-directory is you can then use the returned information to dynamically build a static patch similar to that in option 1 .", "A qml-file could look like this : .. . .. . Item title : Sexy Plugin version : 1.0 .. . .. . How can I read title and version within C++", "Why do not you simply run your test application from the console command-line", "@drescherjm : Yes not on the development-machine but on the second one .", "How to Solve The Problem .. . .. . There are 3 approaches you can take to mitigating this .", "I have tried forcing the resolution as suggested here http : stackoverflow.com questions 17650710 recording-video-from-usb-cam-with-qt5 rq 1 and have seen that others have had issues recording from windows but OSX was fine http : stackoverflow.com questions 25061102 qts-qmediarecorder-not-working-unable-to-record-from-webcam rq 1 .. . .. . Development environment OSX 10.10 with Qt5.4 the same issue is also happening on a Windows 8.1 machine using Qt5.3 .. . .. . This code on Github https : github.com nstoker shiny-lana is based on the camera example with additional debug code added when trying to identify and reproduce the issue .", "Even when its just a small component that just holds title and version .", "Used example from here http : qt-project.org wiki QtSerialPort on Ubuntu 14.04 with Qt 5.3 .. . .. . Output : .. . .. . As it seems from code QSerialPortInfo has detected ports correctly but even though serial.open is returning true errorString returns No such file or directory .Desperately need a solution .", "Of course I d like to not block my whole UI which shouldn t be a problem as the response is only a few nominal ms behind when I send the command .", "Since your using something like QT this should be very easy most of these UI tool kits have built-in functionality to easily present the user with such an experience .", "It is indeed a Qt bug as stated here : https : www.opengl.org wiki Core Language 28GLSL 29 Version the first preprocessor-directive should be version but Qt adds defines for lowp mediump and highp on its own breaking this requirement .", "The issue i have is on clicking Close button the application closes as intended but I want to handle a situation where if some services are running I want to override close button behaviour .", "Easiest way to install Qt 5.3.2 MSVC 2013 OpenGL : .. . .. . run QT FOLDER MaintenanceTool.exe or online installer if you have never installed Qt yet .. . choose Package manager press Next .. . Under Qt - 5.3 check msvc2013 32-bit OpenGL along with any other version you need .. . Press Next .. .", "1 You can hard code the paths that is you can explicitly say to the application always store your file at home neil videos blah.mov this has a disadvantage however that every user of the app will need a custom build as it s unlikely person2 will have write permissions on neil s home-directory .", "See https : qt-project.org doc qt-5-snapshot platform-notes-ios.html .. . .. . To copy the required file into the Andoid APK you need to write INSTALLS rules like that :", "When the application loads the Close and Minimize buttons appear in case of Mac and Windows But when i run the same code on Linux these buttons are no longer available .", "You must edit your etc apt sources.list to add new repository deb http : www.deb-multimedia.org jessie main non-free Then install the following packages .. . .. . Credits : http : www.deb-multimedia.org How to fix gstreamer error in Qt5", "When you recommend a library then you need to show a code example of how it can be applied in this case .", "Well it seemed the problem was with Qt version this problem is fixed in Qt 5.5 version and above and it s possible to get all supported resolutions of a camera .", "You should find a latest version of code in code repository for reduce to a minimum a likely presence of bugs .", "Qt 32-bit version was installed via the online installer .", "As stated in the link you pasted : If a version directive does not appear at the top then it assumes 1.10 which is almost certainly not what you want .", "It s a bug in the Intel drivers : When you want a 2.0 context the implicit fallback to version GLSL1.10 doesn t work with Intel drivers", "Windows also has a similar thing whereby you can make an OS call and say Hey mr operating-system where are my user folders stored which it will happily reply to with something like c : users .. . .. . Why The Problem Manifests The Way It Does .. . .. . Simply because when your in charge of creating the path strings yourself in your own application things are often not passed to these various OS calls for expansion and security clearance you pretty much have to make sure your the one that calls them .", "So I d try the rich text version first .", "I have a TabView which has 3 Tab s Say tab1 tab2 tab3 .", "Using Boost Unit Test framework to perform unit test on C++ Qt code .", "I m working on a similar issue but using gtest rather than the Boost Unit Test framework .", "Qt can do that for you all under the hood have a look at the QAbstractOpenGLFunctions http : doc.qt.io qt-5 qabstractopenglfunctions.html class-hierarchy .. . .. . You can get the context the widget has created via QOpenGLWidget : : context https : doc-snapshots.qt.io qt5-5.4 qopenglwidget.html context and the QAbstractOpenGLFunctions of the context via QOpenGLContext : : versionFunctions http : doc.qt.io qt-5 qopenglcontext.html versionFunctions-2 .", "Editmode http : i.stack.imgur.com fieSj.png .. . .. . .. . .. . As requested I can only show simplified version .. . .. . If I remove Qt : : ItemIsEditable then the checkbox is read only too .", "For example in Windows : .. . .. . Click : .. . .. . Wheel : .. . .. . More information : http : msdn.microsoft.com en-us library windows desktop ms646260 v vs.85 .aspx .. . .. . Use also qt macros : .. . .. . More about macros : http : qt-project.org doc qt-5 qtglobal.html .. . .. . QSysInfo : http : qt-project.org doc qt-5 qsysinfo.html", "Currently I am using the Express version of VS 2013 .", "I tried to Run a Video player example but I end up with an error which was as follows : .. . .. . Starting usr lib arm-linux-gnueabihf qt5 examples multimediawidgets build-player-Desktop-Debug player.. . libEGL warning : GLX DRI2 is not supported libEGL warning : DRI2 : failed to authenticate .. . .. . player : 841 : GStreamer-CRITICAL : gst object ref sink : assertion GST IS OBJECT object failed GStreamer Unable to play - file : home pi Desktop test video.mp4 GStreamer Unable to play - file : home pi Desktop test video.mp4 Warning : No decoder available for type video quicktime variant string iso .", "However the tranalations of Standard buttons like Ok Cancel Save do not work anymore in Qt5.3 .", "They are not translated but just plain English .", "like : .. . .. . any idea", "Update AFAIN it might be a bug .", "Go back to Qt5.1 is a slution if U dont have to use some improvements in new Qts .", "Be sure to include a small compileable example program that demonstrates the problem .", "Hmm that s odd I have the same problem what OS do you use", "@JeremyFriesner thanks ur right .", "i way back to Qt5.1 .", "@JulienLopez win7 8 xp it s a bug or some reason i havent figured out .", "suggest u to way back to Qt5.1 if possible ." ] }
{ "confidence": [ 29.800472259521484, 28.70764923095703, 28.419588088989258, 28.00572967529297, 27.92630386352539, 27.87615203857422, 25.794227600097656, 25.690067291259766, 24.64348793029785, 24.166988372802734, 23.997142791748047, 23.997142791748047, 23.845767974853516, 23.136587142944336, 23.129972457885742, 23.017240524291992, 22.591737747192383, 21.81772804260254, 20.82926368713379, 20.322589874267578 ], "content": [ "Question : while migrating my application from Qt4.7 to qt5.3 i made all the changes needed in the code according to qt5 .. . .. . my applications started but when i tried to login. . the application closed and it did not crashed rather .. . .. . it stoped with this error .. . .. . initially i thought that application is crashing so tried to use debugger but that is not the case . i think its somthing realted to Qkeyevent because the application stops when i pressed any key and i have overloaded eventfilter in my code and i am handing Qkeyevents . kindly guide me through this error .. . Answer : I met the same problem on Fedora 20 with Qt5 from repo . I updated libxkbcommon it solved this . Try to update libxkbcommon . Comment : thnq stackoverflow.com users 2808783 ivan-romanov http : stackoverflow.com users 2808783 ivan-romanov 5D . it worked", "Question : I ve got a small application where users may create their own plugins as QML-files . These plugins get notification upon certain events and their user-interfaces are displayed one-by-one in a TabView . Some plugins however need functionality which can t be provided via QML like writing to files . How would I enable my users to extend the functionality as they please .. . Answer : Your user must : .. . .. . 1 . Implement a QObject in C++ that provides the required functionality . 2 . Subclass QQmlExtensionPlugin to register that QObject as a QML type . 3 . Build a DLL or SO or DYLIB for 1 and 2 and write a qmldir file to tell the QML engine how to load the DLL . EDIT : Qt Creator automates a bit of this process for you . Go to File - New File or Project.. . - Projects - Libraries - Qt Quick 2 Extension Plugin .. . .. . You can find more details about this process in the documentation : .. . .. . How to write a C++ plugin : http : qt-project.org doc qt-5 qtqml-modules-cppplugins.html .. . Where to put the plugin files and how to load them : http : qt-project.org doc qt-5 qtqml-modules-identifiedmodules.html .. . .. . Note 1 : Your user won t be writing a .qml file . Note 2 : Each plugin must be in its own subfolder . This is because each C++ plugin needs one qmldir file but you can t have multiple qmldir files in the same folder . You can find some real examples in your Qt installation . Go to say C : Qt 5.3 mingw482 32 qml -- all the subfolders here contain QML plugins mostly written in C++ . Here is some sample source code : .. . .. . C++ code for the BluetoothSocket QML type : http : code.woboq.org qt5 qtconnectivity src imports bluetooth qdeclarativebluetoothsocket p.h.html .. . C++ code that registers the BluetoothSocket type plus other types : http : code.woboq.org qt5 qtconnectivity src imports bluetooth plugin.cpp.html Comment : Thanks for the precise answer . It helped me a lot . Just one more questions regarding the import path . All user-plugins have their own directory within a folder called plugins . How can I import them all at once Comment : See the QQmlEngine documentation : qt-project.org doc qt-5 qqmlengine.html http : qt-project.org doc qt-5 qqmlengine.html Look for functions like importPlugin and pluginPathList", "Question : null .. . Answer : I m developing a C++ application that dynamically link against Qt boost and Assimp . I compiled it in Release mode with MD and it works fine on my computer . However if I try to run it on another machine I get the 0xc000007b error The application was unable to start correctly . I use Windows 8.1 on both machines but Qt5.3 and VisualStudio2013 are only installed on the 1st machine . I built boost with .. . .. . I then used Cmake GUI to configure generate a solution for Assimp that I later built using Visual Studio 2013 . Qt 32-bit version was installed via the online installer . So everything including my application is built with a target 32-bit . The folder that I copy to the other machine includes : .. . .. . MyApp.exe .. . platform .. . accessible .. . assimp.dll .. . icudt52.dll .. . icuint52.dll .. . icuuc52.dll .. . kernel32.dll .. . opengl32.dll .. . libEGL.dll cannot be found in Qt 5.3 msvc2012 opengl .. . libGLESv2.dll same .. . msvcp1XX.dll .. . msvcr1XX.dll .. . The Qt libs that I need Core GUI Widgets OpenGL .. . .. . If I copy these .dll folders from Qt 5.3 msvc2012 opengl the app requires msvcp110.dll to start . If I add it and run it I get the 0xc000007b error . But why msvcp110.dll instead of msvcp120.dll And if I copy the files from Qt tools QtCreator the app actually needs msvcp120.dll to run . But when it runs it crashes at the beginning with : .. . .. . Which I guess is normal as you re not supposed to copy them from this location . Does anyone know what I am doing wrong PS : I also ran vcredist x86.exe on the machine without VS2013 before running my app . It installed successfully but nothing changed . Thanks for your time and your help", "Question : I m a fan of Qt and update it frequently Qt5.1- 5.2- 5.3 . However the tranalations of Standard buttons like Ok Cancel Save do not work anymore in Qt5.3 . They are not translated but just plain English . The Code for translations does NOT change through each version of Qt . like : .. . .. . any idea Update AFAIN it might be a bug . Go back to Qt5.1 is a slution if U dont have to use some improvements in new Qts . Comment : If your program works right under Qt 5.2 and the exact same program does not work right Qt 5.3 it s probably a Qt bug and your best option is to report it to Digia . Be sure to include a small compileable example program that demonstrates the problem . Comment : Hmm that s odd I have the same problem what OS do you use Comment : @JeremyFriesner thanks ur right . i way back to Qt5.1 . Comment : @JulienLopez win7 8 xp it s a bug or some reason i havent figured out . suggest u to way back to Qt5.1 if possible . .. . Answer : This is source of qt ru : .. . .. . Therefore it is necessary to deploy application with all these translation files . If at least one file is missing the translation qt ru will not load .", "Question : I am building a cross-platform application to record multimedia files for ongoing processing . This is based on an inherited application and I am not able to re-write using alternative libraries . My current issue is that the QMediaRecorder http : doc.qt.io qt-5 qmediarecorder.html does not apparently save the video file onto the local drive - I have temporarily hard-coded the file to be saved as banana.mov into the users root folder . When executed the output file is not being saved . I have tried forcing the resolution as suggested here http : stackoverflow.com questions 17650710 recording-video-from-usb-cam-with-qt5 rq 1 and have seen that others have had issues recording from windows but OSX was fine http : stackoverflow.com questions 25061102 qts-qmediarecorder-not-working-unable-to-record-from-webcam rq 1 .. . .. . Development environment OSX 10.10 with Qt5.4 the same issue is also happening on a Windows 8.1 machine using Qt5.3 .. . .. . This code on Github https : github.com nstoker shiny-lana is based on the camera example with additional debug code added when trying to identify and reproduce the issue . While investigating the QMediaRecorder : : supportedAudioCodecs http : doc.qt.io qt-5 qmediarecorder.html supportedAudioCodecs and QMediaRecorder : : supportedVideoCodecs http : doc.qt.io qt-5 qmediarecorder.html supportedVideoCodecs both return empty lists . This happens on both the OSX build and the Windows environments . The debug output is as follows : .. . .. . I have a feeling that I m missing something really obvious I just haven t spotted it quite yet edit 1 The obvious this is that the status is Recording is requested but not active yet and not Recording is active . I m currently trying to work out why the recording has not started . edit 2 The audio recorder example does record and save an audio file . It looks like QMediaRecorder does not return a list of available audio codecs but QAudioRecorder does return a list of audio codecs . I am getting the same results on both Windows 8.1 using Qt5.3 and OSX using Qt 5.4 Comment : Just a quick test right off the top of my head rather than using blah can you try specifying the full path and see what happens EG : home neil blah.mov or c : users neil blah.mov I don t know if it matters but there s just something not QT related pinging away in the back of my brain about this . Comment : That has done the trick in the example code : pint owed . If you propose as an answer I ll flag it as such . .. . Answer : To add to Shawty s great answer I found that Qt does not support Recording on Windows http : doc.qt.io qt-5 qtmultimedia-windows.html .. . .. . This might be helpful https : github.com kibsoft QtMEL Comment : When you recommend a library then you need to show a code example of how it can be applied in this case . Please edit http : stackoverflow.com posts 33278951 edit your answer to include one . Comment : Oddly enough we weren t having a problem recording on Windows it was OSX that was causing difficulties . The project has since been shelved so I don t know if any updates to the libraries have improved the issue . and a side query was that I ve only just had a notification that this thread has been updated -- edit to correct a spelling . One of these days I ll read carefully before hitting Save .", "Question : I am building a cross-platform application to record multimedia files for ongoing processing . This is based on an inherited application and I am not able to re-write using alternative libraries . My current issue is that the QMediaRecorder http : doc.qt.io qt-5 qmediarecorder.html does not apparently save the video file onto the local drive - I have temporarily hard-coded the file to be saved as banana.mov into the users root folder . When executed the output file is not being saved . I have tried forcing the resolution as suggested here http : stackoverflow.com questions 17650710 recording-video-from-usb-cam-with-qt5 rq 1 and have seen that others have had issues recording from windows but OSX was fine http : stackoverflow.com questions 25061102 qts-qmediarecorder-not-working-unable-to-record-from-webcam rq 1 .. . .. . Development environment OSX 10.10 with Qt5.4 the same issue is also happening on a Windows 8.1 machine using Qt5.3 .. . .. . This code on Github https : github.com nstoker shiny-lana is based on the camera example with additional debug code added when trying to identify and reproduce the issue . While investigating the QMediaRecorder : : supportedAudioCodecs http : doc.qt.io qt-5 qmediarecorder.html supportedAudioCodecs and QMediaRecorder : : supportedVideoCodecs http : doc.qt.io qt-5 qmediarecorder.html supportedVideoCodecs both return empty lists . This happens on both the OSX build and the Windows environments . The debug output is as follows : .. . .. . I have a feeling that I m missing something really obvious I just haven t spotted it quite yet edit 1 The obvious this is that the status is Recording is requested but not active yet and not Recording is active . I m currently trying to work out why the recording has not started . edit 2 The audio recorder example does record and save an audio file . It looks like QMediaRecorder does not return a list of available audio codecs but QAudioRecorder does return a list of audio codecs . I am getting the same results on both Windows 8.1 using Qt5.3 and OSX using Qt 5.4 Comment : Just a quick test right off the top of my head rather than using blah can you try specifying the full path and see what happens EG : home neil blah.mov or c : users neil blah.mov I don t know if it matters but there s just something not QT related pinging away in the back of my brain about this . Comment : That has done the trick in the example code : pint owed . If you propose as an answer I ll flag it as such . .. . Answer : It s highly likely your looking at an OS specific artifact rather than a core problem with QT . I ve seen this issue so many times in so many tool kits and frameworks that it scares me that no one has yet figured out an elegant solution . The Basis of the Problem .. . .. . Most operating systems implement some kind of protection for critical system files . Under nix this is in the form of the user group permissions system under windows it s similar but with the UAC User Access Control sub system . What this boils down to is that you often can t just pick an arbitrary location to write files to not without first seeking permission from the various security API s and mechanisms in the OS to do so . The second half of the problem then comes from variable expansion . In nix particularly the tilde char is expanded by the shell to mean the users home-directory . When we say shell we mean bash tch csh or what ever environment your running the app in . Within this mix we ll also put the desktop environment too as most things like Kde Gnome Unity or what ever else is being used have some kind of operating-system call that when a is passed to it knows to convert it to home neil or what ever it needs to be expanded too . Windows also has a similar thing whereby you can make an OS call and say Hey mr operating-system where are my user folders stored which it will happily reply to with something like c : users .. . .. . Why The Problem Manifests The Way It Does .. . .. . Simply because when your in charge of creating the path strings yourself in your own application things are often not passed to these various OS calls for expansion and security clearance you pretty much have to make sure your the one that calls them . The exception to this rule is if your using the nix philosophy of small tools combined to do one job . In this case you would often pass a result to a shell based program which because it s running via the shell then knows that if it sees it has to expand it . Beacuse your using direct file-access managing your own file paths when you thought you where writing to home neil file.mov you where-in actual fact trying to write a file called file.mov in the current folder where your app is running from in a folder called which I m willing to be doesn t exist . Add to this the fact that a lot of these frameworks QT is no exception are designed to hide and abstract away all the ugly details there s a good chance it consumed the OS exception that was generated when you actually tried to write the file if it had not then your app would most likely have crashed with some kind of exception dialog . How to Solve The Problem .. . .. . There are 3 approaches you can take to mitigating this . 1 You can hard code the paths that is you can explicitly say to the application always store your file at home neil videos blah.mov this has a disadvantage however that every user of the app will need a custom build as it s unlikely person2 will have write permissions on neil s home-directory . 2 You can build in functionality that gives the user a dialog box and asks them where they would like to save the file . Since your using something like QT this should be very easy most of these UI tool kits have built-in functionality to easily present the user with such an experience . 3 You can find out if your framework or the underlying OS has any calls for you to ask who the current user is and where their home-directory is you can then use the returned information to dynamically build a static patch similar to that in option 1 . Doing things this way ensures that the application adapts automatically to it s environment irrespective of the user . Myself personally I generally adopt option 1 during development then when development is complete I switch to number 2 very rarely do I use number 3 in desktop based software . Option 3 for me is often used when the application in question is designed to do a single job such as converting a file for another process to work with or generating some output for a server to display in a web page etc . For you right now as a solution to this question however Option 1 is your best bet .", "Question : I am using Qt framework and I would like to generate mouse events outside my application window . So far I managed to move the mouse pointer using : .. . .. . How can I also generate left mouse button click middle button click right button click and mouse wheel movement .. . Answer : There s no way to do that with Qt . Use APIs specific for your target-platform . Comment : Thank you Oleg .", "Question : I ve seen some promising references to being able to run Qt5 on modern OpenGL . I m using the following code to set my QQuickView to OpenGL 4.1 Core the latest supported on OSX 10.9 with my MacBook . Major issues . First the app crashes entirely when trying to render text . If I happen to only have images rectangles etc in my QML I get a ton of fragment shader errors . Is Qt5.3 not ready for modern OpenGL yet Or am I simply setting it up incorrectly I want to embed my own OpenGL graphics windows using OpenGL 4 so my assumption is that I need that app running under GL 4 as well . Is there another way Comment : This same code base compiles on Linux . Tested the same Surface Format code there . It bombs using the core profile but works using compatibility . I thought Qt 5.2 and higher was supposed to work with core . See Sean s comments in this video youtube.com watch v YqlaKY0a1hg https : www.youtube.com watch v YqlaKY0a1hg . What do I need to do Mac does not provide a compatibility profile with modern gl . Comment : this problem still exists in the 5.4 not on windows as on windows it return the compatibility profile . Comment : I m still having rendering problems with QGraphicalEffects on my Mac and Linux boxes . I opened a bug about it : bugreports.qt-project.org browse QTBUG-42107 https : bugreports.qt-project.org browse QTBUG-42107 I am able to use the controls that crashed in 5.3 though . I m on the beta published a few weeks ago . .. . Answer : I disagree with it being a bug in Qt . As stated in the link you pasted : If a version directive does not appear at the top then it assumes 1.10 which is almost certainly not what you want . That is what Qt wants and that is what a OpenGL4 context should provide allow as well . It s a bug in the Intel drivers : When you want a 2.0 context the implicit fallback to version GLSL1.10 doesn t work with Intel drivers", "Question : null .. . Answer : I need generate dll s for my project to use Qt Cryptographic Architecture https : github.com JPNaude dev notes wiki Using-the-Qt-Cryptographic-Architecture-with-Qt5 I try to go step by step as this https : forum.qt.io topic 25628 qca-build-on-qt5 short tutorial says . So I started with adding cmake to qt . Then downloaded qca from git : anongit.kde.org qca.git cause this svn in the post was outdated . After that I took extra-cmake-modules from git : anongit.kde.org extra-cmake-modules . Now is time for compile it I opened by qt cmakelist.txt from extra-cmake-modules the CmakeWizard appears and I choose the MinGw Generator without any parameters . The output looks like this : .. . .. . In next step i opened the qca in qt . The CMake wizard appeard one more time and as tutorial said I added this argument : .. . .. . The output looks as follows : .. . .. . And after that I m stuck . I try to build project qca but I get the errors .. . .. . I searched for it and I found that somebody already created ticket http : lists.freebsd.org pipermail freebsd-ports-bugs 2015-July 313053.html connected with this issue . When this path didn t give me needed result I went other way . I tried with cmake-gui as well . My parameters are source code this qca repo which I downloaded from git and my path to folder where binaries should be build . Configure and generate clicked and this is the output . After both metod I searched for any dll s but nothing appears this both method generated build folders with content but I don t know what to do to get dll s and add it to project . Tree of folder where build content appeared looks like this http : pastebin.com vLTcgr6J .. . .. . Updated : I commented some code in virtual method to avoid error during bulding . Right now I can build 3 dll s : .. . .. . libqca-qt5 .. . libqca-logger .. . libqca-gnupg and when qt tries to build libqca-ossl.dll the error apears : .. . .. . C : Program Files OpenVPN bin ssleay32.dll : file not recognized : File .. . format not recognized collect2.exe : error : ld returned 1 exit status plugins qca-ossl CMakeFiles qca-ossl.dir build.make : 104 : recipe for target lib qca-qt5 crypto libqca-ossl.dll failed mingw32-make 2 https : forum.qt.io topic 25628 qca-build-on-qt5 : lib qca-qt5 crypto libqca-ossl.dll Error 1 CMakeFiles Makefile2 : 395 : recipe for target plugins qca-ossl CMakeFiles qca-ossl.dir all failed mingw32-make 1 https : github.com JPNaude dev notes wiki Using-the-Qt-Cryptographic-Architecture-with-Qt5 : plugins qca-ossl CMakeFiles qca-ossl.dir all Error 2 Makefile : 137 : recipe for target all failed mingw32-make : all Error 2 15 : 17 : 12 : The process C : Qt Qt5.3.1 Tools mingw482 32 bin mingw32-make.exe exited with code 2 . I m curious why it goes to openVpn folder at all . but then it .. . .. . I would be grateful for any help with this problem .", "Question : null .. . Answer : I built a c++ win32 console app using VisualStudio 2013 on a windows-8 machine . It was running smoothly on my laptop . Yet when I tried the distribution version on another windows-8 laptop myproj.exe file crashed . Having looked at the Event Viewer I found : .. . .. . So I started installing VisualStudio Express and Qt5 on the second machine to compile my code on it . Before starting a new build I tried myproj.exe and surprisingly it worked just fine . Searching different forums has not helped so far . I really appreciate any hint for potential reasons before distributing my code . Comment : Are you using avast or some other antivirus that runs unknown programs in a sandbox the first time Comment : @drescherjm : Yes not on the development-machine but on the second one . how come", "Question : I m a fan of Qt and update it frequently Qt5.1- 5.2- 5.3 . However the tranalations of Standard buttons like Ok Cancel Save do not work anymore in Qt5.3 . They are not translated but just plain English . The Code for translations does NOT change through each version of Qt . like : .. . .. . any idea Update AFAIN it might be a bug . Go back to Qt5.1 is a slution if U dont have to use some improvements in new Qts . Comment : If your program works right under Qt 5.2 and the exact same program does not work right Qt 5.3 it s probably a Qt bug and your best option is to report it to Digia . Be sure to include a small compileable example program that demonstrates the problem . Comment : Hmm that s odd I have the same problem what OS do you use Comment : @JeremyFriesner thanks ur right . i way back to Qt5.1 . Comment : @JulienLopez win7 8 xp it s a bug or some reason i havent figured out . suggest u to way back to Qt5.1 if possible . .. . Answer : I had the same problem and got it to work with an updated translation file . I am not sure if this is the intended behaviour but my qt de.qm has a filesize of only 1kB . There is however a file called qtbase de.qm now 154kB which seems to do the trick .", "Question : I m a fan of Qt and update it frequently Qt5.1- 5.2- 5.3 . However the tranalations of Standard buttons like Ok Cancel Save do not work anymore in Qt5.3 . They are not translated but just plain English . The Code for translations does NOT change through each version of Qt . like : .. . .. . any idea Update AFAIN it might be a bug . Go back to Qt5.1 is a slution if U dont have to use some improvements in new Qts . Comment : If your program works right under Qt 5.2 and the exact same program does not work right Qt 5.3 it s probably a Qt bug and your best option is to report it to Digia . Be sure to include a small compileable example program that demonstrates the problem . Comment : Hmm that s odd I have the same problem what OS do you use Comment : @JeremyFriesner thanks ur right . i way back to Qt5.1 . Comment : @JulienLopez win7 8 xp it s a bug or some reason i havent figured out . suggest u to way back to Qt5.1 if possible . .. . Answer : Starting from Qt5.3 the qt .qm is divided into multiple-files qt .qm and now you have to copy qtbase .qm to translation directory and use together .", "Question : I ve seen some promising references to being able to run Qt5 on modern OpenGL . I m using the following code to set my QQuickView to OpenGL 4.1 Core the latest supported on OSX 10.9 with my MacBook . Major issues . First the app crashes entirely when trying to render text . If I happen to only have images rectangles etc in my QML I get a ton of fragment shader errors . Is Qt5.3 not ready for modern OpenGL yet Or am I simply setting it up incorrectly I want to embed my own OpenGL graphics windows using OpenGL 4 so my assumption is that I need that app running under GL 4 as well . Is there another way Comment : This same code base compiles on Linux . Tested the same Surface Format code there . It bombs using the core profile but works using compatibility . I thought Qt 5.2 and higher was supposed to work with core . See Sean s comments in this video youtube.com watch v YqlaKY0a1hg https : www.youtube.com watch v YqlaKY0a1hg . What do I need to do Mac does not provide a compatibility profile with modern gl . Comment : this problem still exists in the 5.4 not on windows as on windows it return the compatibility profile . Comment : I m still having rendering problems with QGraphicalEffects on my Mac and Linux boxes . I opened a bug about it : bugreports.qt-project.org browse QTBUG-42107 https : bugreports.qt-project.org browse QTBUG-42107 I am able to use the controls that crashed in 5.3 though . I m on the beta published a few weeks ago . .. . Answer : I Added some comments to your bug report and voted it up . It is indeed a Qt bug as stated here : https : www.opengl.org wiki Core Language 28GLSL 29 Version the first preprocessor-directive should be version but Qt adds defines for lowp mediump and highp on its own breaking this requirement . Nvidia drivers lets you get away with it but Intel s does not I do not know about ATI s so perhaps the developers in charge did not test on different enough hardware configurations . As it is there is no easy workaround you could change the Qt code not to add those defines which is a distribution nightmare or not use the QOpenGLShader class which means house keeping the raw OpenGL objects yourself . Comment : Thanks for the additional detail . Comment : No problem I am glad to help .", "Question : I installed Qt creator Qt5 and its examples on Raspberry pi 2 B Model . I m running Raspbian Jessie on it . I tried to Run a Video player example but I end up with an error which was as follows : .. . .. . Starting usr lib arm-linux-gnueabihf qt5 examples multimediawidgets build-player-Desktop-Debug player.. . libEGL warning : GLX DRI2 is not supported libEGL warning : DRI2 : failed to authenticate .. . .. . player : 841 : GStreamer-CRITICAL : gst object ref sink : assertion GST IS OBJECT object failed GStreamer Unable to play - file : home pi Desktop test video.mp4 GStreamer Unable to play - file : home pi Desktop test video.mp4 Warning : No decoder available for type video quicktime variant string iso . Please let me know how to fix these Gstreamer and No decoder things . .. . Answer : After lot of googling I can able to fix it and here is my answer . You must edit your etc apt sources.list to add new repository deb http : www.deb-multimedia.org jessie main non-free Then install the following packages .. . .. . Credits : http : www.deb-multimedia.org How to fix gstreamer error in Qt5 http : stackoverflow.com questions 26099139 how-to-fix-gstreamer-error-in-qt5", "Question : I have created a simple program that reproduces the problem . When I lock the phone or if I switch to another application in my android phone the worker thread continues printing but the event-loop stops . When I switch back to my application the event-loop resumes . If I replace QGuiApplication with QCoreApplication the problem disappears . If I compile with Qt 5.2 instead of Qt 5.3 the problem disappears . Qt 5.4 has the same problem as Qt 5.3 . How do I prevent QGuiApplication from stopping the event-loop when the app loses focus I need my app to process events even when not in the foreground . Comment : Can you show the output of logcat Comment : sashoalm I created a bugreport for you but please provide more details about the OS and phone for the developers : bugreports.qt-project.org browse QTBUG-43434 https : bugreports.qt-project.org browse QTBUG-43434 Comment : I would probably also verify that application state changed signal etc . Comment : @lpapp Here s the logcat output - pastebin.com 1WGPYFue http : pastebin.com 1WGPYFue . .. . Answer : As mentioned in my comments I created a bugreport for you with the risk of being rejected but at least we would get feedback from the official maintainers . QGuiApplication stops when locking the phone or switching application . https : bugreports.qt-project.org browse QTBUG-43434 .. . .. . It has now been withdrawn which is fair enough because as the maintainer claims you should focus on creating a service rather than activity . There is no dedicated Qt API for that just yet however . The reason why it is not good idea to this in an activity is simply that the application may be killed even instantly when it gets into the background . Also it may drain battery earlier than the user may expect it to . In short this is considered as a bug rather than a feature in 5.2 by the maintainer s which seems to have been fixed . Here you can find some help how to create a service as of today : .. . .. . Build background service with Qt on android https : bugreports.qt-project.org browse QTBUG-37221 Comment : I understand what you mean . I was going for an easy answer just to get a hat . : D +1 to you . Comment : @karlphillip : my hats off - If you mean winter hats all of mine is yours . I disabled that feature . Comment : As my mysteriously vanishing comment already stated it is not a bug but a new feature . You are trying too hard.. .", "Question : I am using Windows 7 64-bit to develop a Qt 5.3 application . The Visual Studio files are created by CMake . This works fine for 32-bit and 64-bit binaries for Windows 7 . CMake Generator for 32-bit is Visual Studio 12 2013 for 64-bit Visual Studio 12 2013 Win64 . I tried to create the binaries for Windows XP too . I added this line to the CMakeLists.txt for the 32-bit version .. . .. . and this line for the 64-bit version .. . .. . I am using windeployqt for the deployment for of the QT dependencies . After running CMake and starting the generated Visual Studio I chose the Release-Mode and changed the platform toolset to Visual Studio 2013 - Windows XP v120 xp . The created 32-bit binary works fine on Windows XP 64-bit the 64-bit binary crashes with hello-world.exe has encountered a problem and needs to close . .. . on Windows XP-64-bit .. . .. . EDIT : but works fine on Windows 7 64-bit . What am I doing wrong : Comment : can you try opening it in dependency-walker and see if you re missing some dll Comment : MSJAVA.DLL is missing but tha is okay . I installed Microsoft Visual Studio 2010 Express imported the executeable and started the debugger . A Unhandled exception at 0x00a8db11 in main.exe : 0xC000001D : Illegal Instruction . is thrown in msvcr120d.dll . The line 0000000000A8DB11 vmovsd qword ptr rsp+10h xmm0 is highlighted in the disassembly . Comment : and changed the platform toolset to you just need to add -Tv120 xp to cmake generation step . Also I think you don t need to modify CMAKE EXE LINKER FLAGS . Comment : Yes i added -Tv120 xp . : This works for the 32-bit binary on Windows XP the 64-bit binary still crashes . Comment : Try this tiny project : github.com forexample qt-cmake tree master TextFinder https : github.com forexample qt-cmake tree master TextFinder installer works fine on my WinXP-64 . .. . Answer : I had a similar problem and specifying subsystem to the linker didn t fix it . However the following solution worked fine for me :", "Question : I am using Qt framework and I would like to generate mouse events outside my application window . So far I managed to move the mouse pointer using : .. . .. . How can I also generate left mouse button click middle button click right button click and mouse wheel movement .. . Answer : A few years ago i wrote a drivers for GUI testing for mouse and keyboard . Drivers are developed for Windows Linux and MacOS X . You can look at here https : ugene.unipro.ru fisheye browse br trunk UGENE Repository trunk src plugins GUITestBase src api GTMouseDriverWindows.cpp r 3999 r 3999 . There is a OS depended MouseDriver implementation for Windows . Also you can see other implementations . This is a open-source project you can use it code for free . Comment : Thank you Kastaneda . My project is also open-source so I think I will use your code and I will mention you in the license . How well is your code tested Are there any known bugs in this code Comment : This code is using about 3 years . It is used to write a GUI tests . I think all obvious bugs are fixed already . You should find a latest version of code in code repository for reduce to a minimum a likely presence of bugs .", "Question : I am using Qt framework and I would like to generate mouse events outside my application window . So far I managed to move the mouse pointer using : .. . .. . How can I also generate left mouse button click middle button click right button click and mouse wheel movement .. . Answer : Addition to first answer . For example in Windows : .. . .. . Click : .. . .. . Wheel : .. . .. . More information : http : msdn.microsoft.com en-us library windows desktop ms646260 v vs.85 .aspx .. . .. . Use also qt macros : .. . .. . More about macros : http : qt-project.org doc qt-5 qtglobal.html .. . .. . QSysInfo : http : qt-project.org doc qt-5 qsysinfo.html Comment : Thank you Chernobyl", "Question : I m trying to import the cube http : qt-project.org doc qt-5 qtopengl-cube-example.html example in MS visual-studio-2013 via the QT add-in . Unfortunately when trying to open the .pro file I get the following error : .. . .. . Project ERROR : This example requires Qt to be configured with -opengl desktop .. . .. . Doing a little research in the web I realized that by default QT OpenGL support is build on ANGLE-library https : code.google.com p angleproject which as I realized is an OpenGL to DirectX9.0 kind of translator . Thus I have two options link http : qt-project.org forums viewthread 22821 107114 : .. . .. . 1 . Install ANGLE . 2 . Recompile QTv5.3 with option -opengl desktop . The problem is that I installed QTv5.3 via QT online installer for windows http : qt-project.org downloads . Q : .. . .. . Considering the above how am I supposed to recompile QTv5.3 with native OpenGL support i.e . with -opengl desktop option when I ve installed QTv5.3 via the windows online installer .. . Answer : You ll need to download and build either the 32-bit version http : download.qt-project.org official releases qt 5.3 5.3.2 qt-opensource-windows-x86-msvc2013 opengl-5.3.2.exe or the 64-bit version http : download.qt-project.org official releases qt 5.3 5.3.2 qt-opensource-windows-x86-msvc2013 64 opengl-5.3.2.exe . I built from scratch but for ANGLE not OpenGL . This page http : qt-project.org wiki Qt-5-on-Windows-ANGLE-and-OpenGL should be read before you decide on going either direction .", "Question : null .. . Answer : i want to create calendar widget use qtableview . i test successful on Qt5.4 but on Qt5.3 the qtableview minimum size not work . i wanto to set fixed size 300 300 .. . .. . Qt5.4 is perfect but in Qt5.3 tableview cant show completely : http : i.stack.imgur.com VzSjR.png .. . .. . same code same fixed size 300 300 but Qt5.3 cant display completely . you can download my Demo code at : here http : download.sbw.so untitled1.tar.gz .. . .. . main.cpp : .. . .. . mainwindow.cpp : .. . .. . mydelegate.cpp : .. . .. . mymodel.cpp : .. . .. . mytableview.cpp : .. . .. . thanks a lot Comment : Do you want need to run it on QT 5.3 Why not use 5.4 and later Maybe this is a QT 5.3 bug . Maybe the QT bug tracker has ticket for it bugreports.qt.io https : bugreports.qt.io . For me to check it out it love to have a complete example I can just copy-paste and run . Comment : yes i need run this app on Qt5.3 . i try to set fixed size to table cell but still not work . Comment : this example have many files yuo can download all files : download.sbw.so untitled1.tar.gz http : download.sbw.so untitled1.tar.gz Comment : I can t test on Qt 5.3 since I don t have it installed sorry . I d fiddle with the size policy fixedsize functions until it works on all widgets that could cause this table and parents . Good luck ." ] }
[ "yes-answer-long", "yes-answer-short" ]
qt
UNK_RELATION
verbatim-string@string-literals@44
verbatim-string -- c supports two forms of @placeholder : regular string-literals and verbatim-string literals.a verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character .
{ "confidence": [ 150.93251037597656, 110.87220001220703, 105.1500473022461, 102.7198715209961, 97.09465026855469, 97.09465026855469, 94.40471649169922, 91.22571563720703, 91.1890869140625, 91.03050994873047, 90.3022232055664, 90.10777282714844, 89.6510238647461, 85.864990234375, 85.864990234375, 85.864990234375, 84.19532775878906, 84.08937072753906, 83.31891632080078, 82.32199096679688, 79.75272369384766, 77.48736572265625, 77.00867462158203, 76.1630630493164, 74.99235534667969, 74.34266662597656, 72.62955474853516, 72.1517333984375, 71.90655517578125, 71.69515991210938, 71.33978271484375, 70.18158721923828, 69.45597076416016, 69.04749298095703, 67.65106201171875, 67.4367446899414, 67.38821411132812, 66.98880767822266, 66.92520141601562, 65.96897888183594, 65.87371826171875, 64.59082794189453, 64.59082794189453, 63.24004364013672, 63.01613235473633, 62.965538024902344, 62.751224517822266, 62.63201141357422, 62.58342361450195, 62.537078857421875, 62.537078857421875, 61.665348052978516, 61.166542053222656, 61.09552001953125, 60.96238708496094, 59.20820999145508, 59.08757019042969, 59.075077056884766, 56.07110595703125, 55.52775955200195, 55.282596588134766, 54.49641036987305, 54.36032485961914, 54.267181396484375, 52.924827575683594, 52.26921081542969, 51.66182327270508, 51.58710479736328, 51.58710479736328, 50.87562942504883, 50.76471710205078, 50.7150764465332, 50.59602737426758, 50.22813415527344, 49.97797393798828, 49.42557144165039, 49.34219741821289, 48.77400207519531, 48.57364273071289, 48.57364273071289, 47.79253005981445, 46.879024505615234, 46.094146728515625, 45.765296936035156, 45.35494613647461, 45.2840461730957, 45.016700744628906, 44.997047424316406, 44.94403076171875, 44.47771453857422, 44.47771453857422, 43.895896911621094, 43.650325775146484, 43.14723205566406, 43.06269073486328, 42.472923278808594 ], "content": [ ".. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character .", "See : 2.4.4.5 String literals - C http : msdn.microsoft.com en-us library aa691090 28VS.71 29.aspx .. . .. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character .", "In a verbatim-string literal you use for double quote characters .", "C supports two forms of string-literals : regular and verbatim .", "Is there any way to get a double quote in a verbatim-string literal", "Possible duplicate of Can I escape a double quote in a verbatim-string literal", "This is covered in 2.4.4.5 String literals http : msdn.microsoft.com en-us library aa691090 28v vs.71 29.aspx of the C specification : .. . .. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character .", "In a verbatim-string literal the characters between the delimiters are interpreted verbatim the only exception being a quote-escape-sequence .", "A double quote is the only character you need to escape in verbatim strings .", "It means the string is a verbatim-string literal .", "Verbatim String Literals .", "Is that now a single verbatim-string literal or a verbatim-string literal concatenated with a regular string literal in your hypothetical language", "In a verbatim-string literal the characters between the delimiters are interpreted verbatim the only exception being a quote-escape-sequence .", "In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work .", "possible duplicate of In C can I escape a double quote in a verbatim-string literal", "http : stackoverflow.com questions 1928909 in-c-can-i-escape-a-double-quote-in-a-verbatim-string-literal", "Within a verbatim-string literal double-quotes must be doubled not tripled to distinguish them from the double-quote just meaning the end of the string .", "If you want to write a verbatim-string containing a double-quote you must write two double-quotes .", "The reason you need to escape double quote is because it represents start and end of string whether verbatim or regular .", "http : stackoverflow.com questions 1928909 can-i-escape-a-double-quote-in-a-verbatim-string-literal", "A verbatim-string literal may span multiple lines .", "In a verbatim-string use for a in the result .", "Verbatim string-literals don t use as an escape character the only escape sequence is which is what s being used .", "In a verbatim-string literal apart from two double quotes all the escape characters are interpreted verbatim so if you want a two-line string you have to manually write it in two lines : .. . .. . From msdn http : blogs.msdn.com b csharpfaq archive 2004 03 12 what-does-an-before-the-start-of-a-string-literal-mean.aspx : .. . .. . A string literal such as @ c : Foo is called a verbatim-string literal .", "To get a double-quote within a verbatim literal you need to just double it e.g .", "If you re proposing that it should actually be a single verbatim-string literal with content 1 + with the parser relying on the quote directly before the next semi-colon being the end of the verbatim-string literal that strikes me as a really bad idea .", "And then within the string the double quotation sequence is to indicate you wish to have a quote character in your string .", "enter image description here http : i.stack.imgur.com qvtwC.png .. . .. . This is covered in section 2.4.4.5 of the C specification http : msdn.microsoft.com en-us library vstudio ms228593.aspx : .. . .. . 2.4.4.5 String literals .. . .. . C supports two forms of string-literals : regular string-literals and verbatim-string literals .", "The requirement to escape inside a string if it is not a verbatim-string one that starts with @ is a C feature .", "@cdhowie OP wants to put that literal into a verbatim-string literal though .", "In regular string you need to escape slashes in verbatim it s done automatically", "Let me change that very slightly : .. . .. . In C at the moment that means the concatenation of a verbatim-string literal with content 1 and an empty regular string literal .", "In a Verbatim string backslashes are treated as standard characters not escape characters .", "Normally to have a string containing C : Windows myfile.txt you would need to write C : Windows myfile.txt OR with verbatim-string literals @ C : Windows myfile.txt .", "Additionally the F verbatim-string literal documentation http : msdn.microsoft.com en-us library dd323829.aspx suggests it works exactly as per C : .. . .. . If preceded by the @ symbol the literal is a verbatim-string .", "@dasblinkenlight Not really a duplicate of that particular question since the code in this question is a regular string literal not a verbatim literal @ .", "If I store a verbatim-string string s @ Hello it should hypothetically parse the string and print Hello taking the character as a part of the string .. . .. . but in actual practice it fails and instead string s @ Hello displays the desired output Hello .", ".. . It s worth noting that it doesn t affect the string itself in any way : a string specified as a verbatim-string literal is exactly the same as a string specified as a normal string literal with appropriate escaping .", "OUTPUT - Hi I am programmer .. . .. . You can refer @ prefix before any string in C .NET http : programmers.bhoomijunction.com Article regular-string-literal-and-verbatim-string-literal-in-c-sharp-dot-net-29", ".. . A regular string literal consists of zero or more characters enclosed in double quotes as in hello and may include both simple escape sequences such as t for the tab character and hexadecimal and Unicode escape sequences .", "Basically it sounds like verbatim-string literals work in both C and F perfectly well with both of them requiring double-quotes to be doubled .", "A verbatim-string uses the line endings of the source code file it is in .", "Got a reference for verbatim-string uses the line endings of the source code file it is in", "In particular simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim-string literals .", "I tried with verbatim-string as follows : .. . .. . But I got this error .", "The debugger will sometimes choose to display a string as a verbatim-string literal - this is solely for ease of viewing the string s contents without worrying about escaping .", "A verbatim-string in C allows you to have a multi-line string value declared inline without concatenation .", "To address your title question.. . .. . .. . To escape the quote in a verbatim-string literal use the quote-escape-sequence that s two quote characters .. . .. . See MSDN http : msdn.microsoft.com en-us library aa691090.aspx for more details on escaping etc .", "When using a multi-line string literal in C with @ the correct escape sequence for a double-quote becomes instead of .", "I need the output as follwos .. . .. . How can I insert newline before char pad in this verbatim-string literal", "So a verbatim-string literal can contain backslashes without them being doubled-up and even line separators .", "In particular simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim-string literals .", "It s YOUR point ie There is no reason for an equivalent to C verbatim-string literals in VB.NET because it doesn t support inline control-characters .", "The problem is that the verbatim-string identifier @ is only being applied to the first string not the ones being appended with + .", "I have a path that is named defaultPath I want to add it into this verbatim-string literal but can quite get the quotes around it .", "I pass this as a string command : .. . .. . I use verbatim-string to make my life easier in other situations similar to this .", "You can preface the initial double-quote of a string with the @ character to handle escaping it : .. . .. . You can see a live example of this here https : dotnetfiddle.net 20uvQK .", "You d need to use a variable for the verbatim-string literal to avoid it messing things up .", "The verbatim-string is using r n as the line break so the result-of your replace is 1 r2 r3 .", "Agreed but your original answer implied that was incorrect in the general sense so it was likely to confuse someone who isn t too familiar with verbatim-string literals .", "Escaping it is done differently you need to double it instead of using the backslash : .. . .. . MSDN link http : msdn.microsoft.com en-us library ms228362.aspx : .. . .. . Use double quotation marks to embed a quotation mark inside a verbatim-string", "Note that in your posted code the only verbatim-string is the very first one with the @ before it .", "This question already has an answer here : .. . .. . Putting in verbatim-string with C questions 5996359 putting-in-verbatim-string-with-c-sharp 7 answers .. . .. . I am a bit new to c and i am stuck at this point I have a regular string where i made use of to escape escape here means that to escape the compilers interpretation of and get printed on the screen and i get the expected output-- .. . .. . o p-- This is a regular string .. . .. . Now i have a verbatim-string and i am trying to escape using in the same manner as above..-- .. . .. . Why the above isn t working", "Use a double double quote to produce a single double quote in the output .", "There are always a file or two that simply need tons of escaping where it would be nice to have all strings be considered Verbatim String Literals unless otherwise specified IE opposite of default .NET behavior .", "In an @ string embedded double quotes are escaped as not .", "C also has a feature called verbatim-string literals http : msdn.microsoft.com en-us library vstudio 362314fe.aspx strings that start with @ which allows you to write @ a b c d instead of a b c d .", "No Verbatim strings in VB.NET .", "To escape or to verbatim that is my question .", "Escaping correctly is more important : in verbatim not is the escaped version of .", "hmm say i want it like this c : users me desktop this is audio.mp3 how to implement it using verbatim literal", "However the + s require at least one non-quote character between the double quotes .", "Technically that s a double double quote :", "Verbatim string-literals which contain line separators will also contain the white-space at the start of the line so I tend not to use them in cases where the white-space matters .", "In literal strings with an @ in front you escape quotes with a double quote .", "An identifier with an @ prefix is called a verbatim identifier .", "VB.Net supports this strike abomination strike feature if you absolutely need to use a verbatim via an inline XML Literal .", "It basically means don t apply any interpretations to characters until the next quote character is reached .", "Use a duplicated double quote .", "Use a double quote :", "Verbatim strings don t allow double quotes as you ve described in your first example .", "In these files -chars in strings are escaped by doubling them analog to c verbatim strings .", "I m trying to use @Html.Raw and the quadruple quote breaks my string", "It is the double quote which requires escaping using double double quotes for rest of the characters you don t need to escape for example back slash .", "The debugger is showing you a non literal string .", "So with a line like yours : .. . .. . The first and the last quote characters is to indicate the start and the end of the string to the compiler .", "I specified output folder as a string with verbatim .. . .. . Also there is a StringBuilder that generates file name based on some ID and DateTime : .. . .. . And finally I do the following .. . .. . But my Application cathes an exception .", "VB doesn t treat as an escape character anyway so you can just write the string as a normal literal : .. . .. . As far as I m aware VB doesn t have any way of achieving the other major goal of verbatim-string literals that of allowing multiple lines - you have to use VbCrLf for that http : msdn.microsoft.com en-us library 5chcthbw.aspx I believe .", "They both produce a string containing : c : users me desktop this is audio.mp3 with the double quotes embedded .", "The subsequent strings are not verbatim so the proper escape sequence would be .", "EDIT : Updated to show correct syntax when using Verbatim .", "Double quotes escape a single quote within @ :", "At the very top of your code file you go to start up a string so you type a quote .", "What you are looking for is verbatim literal strings http : msdn.microsoft.com en-us library aa691090 28v vs.71 29.aspx -- see the examples .", "By default the debugger will display backslash characters as double backslashes since it s using the backslash as a control character .", "For adding some more information your example will work without the @ symbol it prevents escaping with this way : .. . .. . It will work both ways but I prefer the double-quote style for it to be easier working for example with filenames with lots of in the string ." ] }
{ "confidence": [ 177.72543334960938, 156.44427490234375, 134.47865295410156, 128.7133026123047, 124.3927001953125, 119.86235046386719, 119.71066284179688, 117.69123840332031, 113.58522033691406, 111.27854919433594, 109.10867309570312, 108.39602661132812, 108.16316223144531, 107.77871704101562, 106.5145263671875, 105.01640319824219, 103.53580474853516, 103.42507934570312, 102.82369995117188, 98.45126342773438 ], "content": [ "Question : This question already has an answer here : .. . .. . Putting in verbatim-string with C questions 5996359 putting-in-verbatim-string-with-c-sharp 7 answers .. . .. . I am a bit new to c and i am stuck at this point I have a regular string where i made use of to escape escape here means that to escape the compilers interpretation of and get printed on the screen and i get the expected output-- .. . .. . o p-- This is a regular string .. . .. . Now i have a verbatim-string and i am trying to escape using in the same manner as above..-- .. . .. . Why the above isn t working .. . Answer : If you want to write a verbatim-string containing a double-quote you must write two double-quotes . .. . .. . enter image description here http : i.stack.imgur.com qvtwC.png .. . .. . This is covered in section 2.4.4.5 of the C specification http : msdn.microsoft.com en-us library vstudio ms228593.aspx : .. . .. . 2.4.4.5 String literals .. . .. . C supports two forms of string-literals : regular string-literals and verbatim-string literals . .. . A regular string literal consists of zero or more characters enclosed in double quotes as in hello and may include both simple escape sequences such as t for the tab character and hexadecimal and Unicode escape sequences . .. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character . A simple example is @ hello . In a verbatim-string literal the characters between the delimiters are interpreted verbatim the only exception being a quote-escape-sequence . In particular simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim-string literals . A verbatim-string literal may span multiple lines .", "Question : I have this substring I want to strip out of a string : .. . .. . Realizing it was full of funkiness I thought verbatimizing it would solve all ills : .. . .. . ...but to paraphrase the robot on Lost In Space that does not compute compile I get expected on the first http . I can get it compilable by escaping the quotes : .. . .. . ...but what use is verbatim if it s not verbatimatic Comment : think about it how could compiler possibly know where your string-literals starts and ends if you don t escape Comment : I would think verbatimizing should just tell the compiler forget about trying to figure this out - just consider everything within the inner and outer quotes as a single string that you shouldn t mess with or try to parse . .. . Answer : It is the double quote which requires escaping using double double quotes for rest of the characters you don t need to escape for example back slash . See : 2.4.4.5 String literals - C http : msdn.microsoft.com en-us library aa691090 28VS.71 29.aspx .. . .. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character . A simple example is @ hello . In a verbatim-string literal the characters between the delimiters are interpreted verbatim the only exception being a quote-escape-sequence . In particular simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim-string literals . A verbatim-string literal may span multiple lines . The reason you need to escape double quote is because it represents start and end of string whether verbatim or regular . Comment : Ah good my old fiend I mean friend is back I was afraid he had croaked or something .", "Question : Possible Duplicate : .. . What s the @ in front of a string for .NET http : stackoverflow.com questions 556133 whats-the-in-front-of-a-string-for-net .. . .. . What is that @ in this SQL command doing Would its first and second occurrence serve the same purpose I m just familiar with the @ signs when declaring a stored procedure s parameters . Comment : This makes me want to cry . .NET has great support for placeholders . Please use it . What you are looking for is verbatim literal strings http : msdn.microsoft.com en-us library aa691090 28v vs.71 29.aspx -- see the examples . Comment : It s a quoted string literal it has nothing to do with sql or paramaters . msdn.microsoft.com en-us library 362314fe v vs.71 .aspx http : msdn.microsoft.com en-us library 362314fe v vs.71 .aspx Comment : @pst : If the OP is asking what its purpose is it stands to reason s he isn t the author of the code and is looking to understand what it s doing . Comment : @Yuck That is what the link is for naturally . Comment : Yes I am trying to understand someone else s codes . Why would I be asking if I am the one who coded it in the first place . Thank you for stopping by nonetheless . .. . Answer : It means the string is a verbatim-string literal . The won t be treated in a special way . n isn t new line it s slash and n . Very useful for paths . Normally to have a string containing C : Windows myfile.txt you would need to write C : Windows myfile.txt OR with verbatim-string literals @ C : Windows myfile.txt . This is covered in 2.4.4.5 String literals http : msdn.microsoft.com en-us library aa691090 28v vs.71 29.aspx of the C specification : .. . .. . A verbatim-string literal consists of an @ character followed by a double-quote character zero or more characters and a closing double-quote character . A simple example is @ hello . In a verbatim-string literal the characters between the delimiters are interpreted verbatim the only exception being a quote-escape-sequence . In particular simple escape sequences and hexadecimal and Unicode escape sequences are not processed in verbatim-string literals . A verbatim-string literal may span multiple lines . I ll add that in the block of SQL you quoted it is used to be able to write the script in multiple lines without closing every line the string . So insted of .. . .. . you can write .. . .. . Be aware that the two strings are very different The second one contains the end-of-lines and the alignment spaces but in SQL this isn t a problem empty space is ignored in many places in SQL . There is a chance that you wrote you SQL command in a single line . Then the @ was totally useless but many programmers adopt a better safe than sorry and sprinkle it quite liberally especially when they are pasting text from somewhere else that could contain escapes : - Comment : I want to thank the magical fairy of quotes that added the title of the page I linked and a quote of the text : - It s always good to know there are good fairies that help you while you are helping someone else : - : -", "Question : I have a string as follows : .. . .. . the output is .. . .. . in a single line . I need the output as follwos .. . .. . How can I insert newline before char pad in this verbatim-string literal Comment : n 15 chars Comment : I m kind of missing a in your source . Also how exactly are you outputting it On a webpage Comment : yes for example in a label .. . Answer : In a verbatim-string literal apart from two double quotes all the escape characters are interpreted verbatim so if you want a two-line string you have to manually write it in two lines : .. . .. . From msdn http : blogs.msdn.com b csharpfaq archive 2004 03 12 what-does-an-before-the-start-of-a-string-literal-mean.aspx : .. . .. . A string literal such as @ c : Foo is called a verbatim-string literal . It basically means don t apply any interpretations to characters until the next quote character is reached . So a verbatim-string literal can contain backslashes without them being doubled-up and even line separators . To get a double-quote within a verbatim literal you need to just double it e.g . @ My name is Jon represents the string My name is Jon . Verbatim string-literals which contain line separators will also contain the white-space at the start of the line so I tend not to use them in cases where the white-space matters . They re very handy for including XML or SQL in your source code though and another typical use which doesn t need line separators is for specifying a file system path . .. . It s worth noting that it doesn t affect the string itself in any way : a string specified as a verbatim-string literal is exactly the same as a string specified as a normal string literal with appropriate escaping . The debugger will sometimes choose to display a string as a verbatim-string literal - this is solely for ease of viewing the string s contents without worrying about escaping . .. . Author : Jon Skeet Comment : I gathered from the OP that they knew that but their complaint was that they got the output on one line instead . Comment : The output is on the same line .", "Question : If I store a verbatim-string string s @ Hello it should hypothetically parse the string and print Hello taking the character as a part of the string .. . .. . but in actual practice it fails and instead string s @ Hello displays the desired output Hello . Why the syntax demands an extra character What would be the disruptive outcomes if C starts functioning in the aforementioned hypothetical manner Comment : The first and last quotes are the delimiters . For example String s @ User ChaZ asks about quotes Comment : The compiler still needs to know where the string ends . Comment : Because your computer and no other for that matter doesn t know where you want your string to stop Not interpreting escape sequences is one thing but that one character is still special.. . Comment : Is this a question or a rant Also you seem to ask about a C language design decision while you don t really understand the basic syntax . Comment : @RowlandShaw @ed @kobi @rominox : It can know where the string ends by using predecessor of the inner quote . E.g . : @ 1 2 The quote preceding 1 can be used as start point and quote preceding can be the end point whatever in the between is the required string . Why an extra pair .. . Answer : So technically string s @ Hello should print Hello .. . .. . No that would just be invalid . The compiler should - and does - obey the rules of the language specification . Within a verbatim-string literal double-quotes must be doubled not tripled to distinguish them from the double-quote just meaning the end of the string . It s easiest to see this if you use a double-quote within the middle of a string not at the start or end : .. . .. . F works perfectly in the above case .. . .. . Not as far as I can see . In a sample F project in VS2015 Preview : .. . .. . .. . gives an error whereas @ Hello results in a string of Hello . Additionally the F verbatim-string literal documentation http : msdn.microsoft.com en-us library dd323829.aspx suggests it works exactly as per C : .. . .. . If preceded by the @ symbol the literal is a verbatim-string . This means that any escape sequences are ignored except that two quotation mark characters are interpreted as one quotation mark character . Basically it sounds like verbatim-string literals work in both C and F perfectly well with both of them requiring double-quotes to be doubled . F also has tripled-quoted strings within which they don t need to be doubled.. . but that s just a separate feature that C doesn t have . EDIT : To answer your comment about ambiguity you gave an example of @ 1 2 . Let me change that very slightly : .. . .. . In C at the moment that means the concatenation of a verbatim-string literal with content 1 and an empty regular string literal . If you re proposing that it should actually be a single verbatim-string literal with content 1 + with the parser relying on the quote directly before the next semi-colon being the end of the verbatim-string literal that strikes me as a really bad idea . For example suppose I want to use a verbatim-string literal as the first argument in a two-argument method call like this : .. . .. . By your rules that would be a call with a single argument - it would be impossible to represent the call we re trying to make as a single statement . You d need to use a variable for the verbatim-string literal to avoid it messing things up . In short I m happier with the way C already works . Comment : : Thanks for answering but the confusion still prevails . The parser can understand the start and end point of the string by utilizing the first occurring and last occurring before . For e.g . : @ 1 2 The quote preceding 1 can be used as start point and quote preceding can be the end point the content in between these two points should be parsed as string . Why an extra pair is needed by the compiler to parse it effectively Pardon for my queries but I m trying to learn C from basics as am a student . Comment : @Chaz : No that s not how the parser works - and it can t be as there could be x + y for example where the end of the first literal is not the last quote before a semicolon . The parser works by consuming tokens as it goes - it needs to know whether it s in a string literal or not . Take your example but change the 2 to a + . Is that now a single verbatim-string literal or a verbatim-string literal concatenated with a regular string literal in your hypothetical language Comment : jon : The parser works by consuming tokens as it goes - Oh How can I forget this from my Compiler Design classes Thanks a lot Sir Skeet as your counter question made it clear for me . And am really happy to get a reply from you as I always used to wonder about you got downvotes for the question though but that s the trade-off for something better . : Comment : @ChaZ : I ve edited my answer to go into more details about the disadvantages of your suggestion for how you thought the language should work .", "Question : So I have this piece of text that I need to be on a string so I can later add to a text file and should be like this string .. . .. . I ve tried to verbate it like .. . .. . and also tried to work with concatenatio but I can t see to figure out how to include every quote to be on that string . Comment : Possible duplicate of Can I escape a double quote in a verbatim-string literal http : stackoverflow.com questions 1928909 can-i-escape-a-double-quote-in-a-verbatim-string-literal Comment : Use the quote escape sequence . Comment : @ is the two characters .. . Answer : You can preface the initial double-quote of a string with the @ character to handle escaping it : .. . .. . You can see a live example of this here https : dotnetfiddle.net 20uvQK .", "Question : How can I stores something like the following string in C : Comment : possible duplicate of In C can I escape a double quote in a verbatim-string literal http : stackoverflow.com questions 1928909 in-c-can-i-escape-a-double-quote-in-a-verbatim-string-literal Comment : @dasblinkenlight Not really a duplicate of that particular question since the code in this question is a regular string literal not a verbatim literal @ . Comment : @cdhowie OP wants to put that literal into a verbatim-string literal though . .. . Answer : escape using the backslash : .. . CMD.AddParameters @Pkey SqlDbType.Int Pkey.ToString .. . use unicode literals : .. . CMD.AddParameters u0022@Pkey u0022 SqlDbType.Int Pkey.ToString .. . .. . fwiw here is a link-to msdn on C verbatim strings http : msdn.microsoft.com en-us library vstudio ms228362.aspx .", "Question : How can I stores something like the following string in C : Comment : possible duplicate of In C can I escape a double quote in a verbatim-string literal http : stackoverflow.com questions 1928909 in-c-can-i-escape-a-double-quote-in-a-verbatim-string-literal Comment : @dasblinkenlight Not really a duplicate of that particular question since the code in this question is a regular string literal not a verbatim literal @ . Comment : @cdhowie OP wants to put that literal into a verbatim-string literal though . .. . Answer : or", "Question : I have the following string which won t compile : .. . .. . The offending sections are : .. . .. . and .. . .. . The compiler is getting all mixed up on the escape sequence . Can anyone see what s wrong Comment : thanks for the speedy replies Comment : You might consider punting on this whole issue by using LINQtoSQL instead of piecing together your own query-string . .. . Answer : You want to use to escape quotes not . Like this : .. . .. . Edit : .. . .. . Further explanation : .. . .. . You only have an @ on the first of all the strings you re concatenating . In literal strings with an @ in front you escape quotes with a double quote . In normal strings it s slash-quote . Eg . Comment : Verbatim string-literals don t use as an escape character the only escape sequence is which is what s being used . The problem is that the verbatim-string identifier @ is only being applied to the first string not the ones being appended with + . Comment : The problem is that he is using the wrong escape sequence for his string type . He can either change the string to literal as you say or change the escape sequence as I said Comment : Agreed but your original answer implied that was incorrect in the general sense so it was likely to confuse someone who isn t too familiar with verbatim-string literals . Your revised answer is much clearer . Comment : Hmm good point .", "Question : In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work . Is there any way to get a double quote in a verbatim-string literal This understandably doesn t work : .. . Answer : This should help clear up any questions you may have : c literals http : csharpindepth.com Articles General Strings.aspx .. . .. . Here is a table from the linked content : .. . .. . enter image description here http : i.stack.imgur.com Ky1Vl.png", "Question : In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work . Is there any way to get a double quote in a verbatim-string literal This understandably doesn t work : .. . Answer : Use a duplicated double quote . outputs : Comment : I m trying to use @Html.Raw and the quadruple quote breaks my string Comment : Can you use it without the string literal It seems like Html.Raw would take care of ensuring it s a string for you.. .", "Question : In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work . Is there any way to get a double quote in a verbatim-string literal This understandably doesn t work : .. . Answer : OUTPUT - Hi I am programmer .. . .. . You can refer @ prefix before any string in C .NET http : programmers.bhoomijunction.com Article regular-string-literal-and-verbatim-string-literal-in-c-sharp-dot-net-29 Comment : This question is quite old and already has a high rated accepted answer : you should try to answer questions which really need an answer . Comment : Did you mean Hi I am a programmer", "Question : In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work . Is there any way to get a double quote in a verbatim-string literal This understandably doesn t work : .. . Answer : For adding some more information your example will work without the @ symbol it prevents escaping with this way : .. . .. . It will work both ways but I prefer the double-quote style for it to be easier working for example with filenames with lots of in the string .", "Question : In a verbatim-string literal @ foo in C backslashes aren t treated as escapes so doing to get a double quote doesn t work . Is there any way to get a double quote in a verbatim-string literal This understandably doesn t work : .. . Answer : Use double quotation marks .", "Question : So I have this piece of text that I need to be on a string so I can later add to a text file and should be like this string .. . .. . I ve tried to verbate it like .. . .. . and also tried to work with concatenatio but I can t see to figure out how to include every quote to be on that string . Comment : Possible duplicate of Can I escape a double quote in a verbatim-string literal http : stackoverflow.com questions 1928909 can-i-escape-a-double-quote-in-a-verbatim-string-literal Comment : Use the quote escape sequence . Comment : @ is the two characters .. . Answer : Double quotes escape a single quote within @ : Comment : I ve tried to do it as you mentioned but didnt worked for me . Instead I did as follows : startup useLegacyV2RuntimeActivationPolicy true r n supportedRuntime version v4.0 sku .NETFramework Version v4.0 r n requiredRuntime version v4.0.20506 r n startup", "Question : So I have this piece of text that I need to be on a string so I can later add to a text file and should be like this string .. . .. . I ve tried to verbate it like .. . .. . and also tried to work with concatenatio but I can t see to figure out how to include every quote to be on that string . Comment : Possible duplicate of Can I escape a double quote in a verbatim-string literal http : stackoverflow.com questions 1928909 can-i-escape-a-double-quote-in-a-verbatim-string-literal Comment : Use the quote escape sequence . Comment : @ is the two characters .. . Answer : Handy tool here http : www.freeformatter.com java-dotnet-escape.html .. . .. . Input the string and it will escape it for you . Comment : Thank s it works like a charm", "Question : I need to print .. . .. . with the vebatim string I posed another question about multiple line code template here http : stackoverflow.com questions 5996218 code-template-implementation-with-c . I tried with verbatim-string as follows : .. . .. . But I got this error . 1 doesn t work neither . What s wrong .. . Answer : In a verbatim-string literal you use for double quote characters .", "Question : This question already has an answer here : .. . .. . Putting in verbatim-string with C questions 5996359 putting-in-verbatim-string-with-c-sharp 7 answers .. . .. . I am a bit new to c and i am stuck at this point I have a regular string where i made use of to escape escape here means that to escape the compilers interpretation of and get printed on the screen and i get the expected output-- .. . .. . o p-- This is a regular string .. . .. . Now i have a verbatim-string and i am trying to escape using in the same manner as above..-- .. . .. . Why the above isn t working .. . Answer : Use a double quote : Comment : Technically that s a double double quote : Comment : @MatthewWatson and your comment is a double double double quoted Comment : yeah. . its working fine nw. . thnks for the info. .", "Question : I have this substring I want to strip out of a string : .. . .. . Realizing it was full of funkiness I thought verbatimizing it would solve all ills : .. . .. . ...but to paraphrase the robot on Lost In Space that does not compute compile I get expected on the first http . I can get it compilable by escaping the quotes : .. . .. . ...but what use is verbatim if it s not verbatimatic Comment : think about it how could compiler possibly know where your string-literals starts and ends if you don t escape Comment : I would think verbatimizing should just tell the compiler forget about trying to figure this out - just consider everything within the inner and outer quotes as a single string that you shouldn t mess with or try to parse . .. . Answer : A double quote is the only character you need to escape in verbatim strings . Escaping it is done differently you need to double it instead of using the backslash : .. . .. . MSDN link http : msdn.microsoft.com en-us library ms228362.aspx : .. . .. . Use double quotation marks to embed a quotation mark inside a verbatim-string", "Question : If I store a verbatim-string string s @ Hello it should hypothetically parse the string and print Hello taking the character as a part of the string .. . .. . but in actual practice it fails and instead string s @ Hello displays the desired output Hello . Why the syntax demands an extra character What would be the disruptive outcomes if C starts functioning in the aforementioned hypothetical manner Comment : The first and last quotes are the delimiters . For example String s @ User ChaZ asks about quotes Comment : The compiler still needs to know where the string ends . Comment : Because your computer and no other for that matter doesn t know where you want your string to stop Not interpreting escape sequences is one thing but that one character is still special.. . Comment : Is this a question or a rant Also you seem to ask about a C language design decision while you don t really understand the basic syntax . Comment : @RowlandShaw @ed @kobi @rominox : It can know where the string ends by using predecessor of the inner quote . E.g . : @ 1 2 The quote preceding 1 can be used as start point and quote preceding can be the end point whatever in the between is the required string . Why an extra pair .. . Answer : That s because you need to have an opening and a closing characters too . So with a line like yours : .. . .. . The first and the last quote characters is to indicate the start and the end of the string to the compiler . And then within the string the double quotation sequence is to indicate you wish to have a quote character in your string ." ] }
[ "yes-answer-long", "yes-answer-short" ]
string-literals
UNK_RELATION
boilerpipe@web@167
boilerpipe -- the boilerpipe library for java provides algorithms to detect and remove the surplus clutter boilerplate templates around the main textual content of a @placeholder page .
{ "confidence": [ 51.871055603027344, 50.52790069580078, 49.4328498840332, 48.92119598388672, 48.805023193359375, 48.42254638671875, 47.494590759277344, 47.4368782043457, 46.882083892822266, 46.21821594238281, 46.05976867675781, 45.564788818359375, 45.35447692871094, 45.008819580078125, 44.463836669921875, 44.0751953125, 44.0751953125, 44.03019714355469, 42.91923522949219, 42.91923522949219, 42.91923522949219, 42.682456970214844, 42.2877311706543, 42.2877311706543, 42.2877311706543, 41.62961959838867, 41.62961959838867, 41.62961959838867, 41.47774887084961, 41.223426818847656, 41.223426818847656, 41.223426818847656, 41.217445373535156, 41.13176727294922, 40.87019729614258, 40.20165252685547, 40.11724090576172, 40.02674865722656, 39.90858459472656, 39.88715362548828, 39.88715362548828, 39.88715362548828, 39.88715362548828, 38.7311897277832, 38.7311897277832, 38.682010650634766, 38.676029205322266, 38.46883010864258, 38.40387725830078, 38.37789535522461, 38.37477111816406, 37.82349395751953, 37.34573745727539, 37.31113815307617, 37.21881103515625, 37.00054168701172, 36.96937942504883, 36.671051025390625, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.63542938232422, 36.1797981262207, 35.83335876464844, 35.583927154541016, 35.47946548461914, 35.09986114501953, 34.9390754699707, 34.915382385253906, 34.88481140136719, 34.61500549316406, 34.59336853027344, 34.1849479675293, 34.09401321411133, 34.09401321411133, 33.997840881347656, 33.759422302246094, 33.759422302246094, 33.759422302246094, 33.56336975097656, 33.05989074707031, 32.872535705566406, 32.468814849853516, 32.468814849853516, 32.37397003173828, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266, 32.255374908447266 ], "content": [ "Boilerpipe extracts the content from the page filtering the boilerplate - things like header footer menus advertising etc .", "NBoilerPipe is a Mono port of the BoilerPipe Java library .", "Boilerpipe is a library that basically extracts the main content from a webpage .", "Have a look in the boilerpipe filters english directory of the library for more info on the algorithms .", "Here is the link-to his Github page for boilerpipe .. . .. . https : github.com misja python-boilerpipe blob master setup.py", "Boilerpipe removes all that information .", "i am trying to install python library boilerpipe : pip install boilerpipe .", "Are there any viable alternatives to boilerpipe or is there a way to configure boilerpipe in order to find the main article text better", "I had used mechanize to scrap but boilerpipe library works better to extract only article-content of the web page in python .", "I ve created boilerpipe which uses correct ones : boilerpipe-android https : github.com bldn boilerpipe-android", "Is there a way to do this with Boilerpipe or any other java library preferably open-source", "I am using boilerpipe library to analyzer news articles .", "Moved to Java a week back to make boilerpipe run .", "I am using the excellent open-source Boilerpipe http : code.google.com p boilerpipe library to do just that .", "I need to extract main news content from a web page.I searched on internet and found an api named Boilerpipe freely available for that purpose http : boilerpipe-web.appspot.com But I m not abled to find any implementations in java that make use of Boilerpipe.Can anyone tell me how can I use Boilerpipe in Java to extract the news content or give me some links to implementations in java which make use of Boilerpipe to extract content from a news web page", "However want to stick to Boilerpipe .", "http : boilerpipe-web.appspot.com", "The boilerpipe jar has further dependencies .", "I am new to boilerpipe .", "For python2 the boilerpipe is usually recommended .", "Boilerpipe for python 3", "The boilerpipe http : code.google.com p boilerpipe written in java to extract articles but it is too complex and the problem of the languages and characters .", "Boilerpipe does not come with a JSON serializer .", "So I m running boilerpipe in eclipse .", "boilerpipe wasn t properly compiling properly .", "Im using boilerpipe to extract Text form Websites .", "I m try to install boilerpipe through pip but it failed .", "I successfully installed JPype and Boilerpipe Python wrapper .", "Although boilerpipe was originally written for java it has been ported to python too .", "I am using boilerpipe http : code.google.com p boilerpipe and it seems great but I want to output JSON .", "I am trying to use boilerpipe https : code.google.com p boilerpipe to extract news articles from non-english text .", "First run pip uninstall boilerpipe to uninstall any previous installed packages and then pip install boilerpipe to install it .", "I added the boilerpipe library directly to my src folder .", "https : github.com misja python-boilerpipe", "Im writing a flask app using boilerpipe to extract content.Initially i wrote the boilerpipe extract as script to extract website content but when i try to integrate with my api JVM crashes when executing boilerpipe extractor .", "Also boilerpipe already includes protection when using threading https : github.com misja python-boilerpipe blob master src boilerpipe extract init .py L51 which suggests that it may need protection in multiprocessing also .", "I have successfully installed Boilerpipe and Jpype in python but getting error while Importing boilerpipe .. . .. . How can I solve this issue", "As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears .", "boilerpipe installed without error .", "I am trying to run boilerpipe with Python multiprocessing .", "If this works then it might be straightforward to patch boilerpipe for multiprocessing protection .", "I m trying to use boilerpipe in an Android application .", "It could be that you don t have that boilerpipe installed in the virtualenv .", "The one I come across most often is boilerpipe .", "I want to know whether there is a gem similar to boilerpipe .", "Try to look at their Wiki http : code.google.com p boilerpipe w list and their QuickStart http : code.google.com p boilerpipe wiki QuickStart .", "I am trying to install python library boilerpipe i.e .", "Even though boilerpipe gets all of the main text it also gets some of the unimportant text such as Chat with us on Facebook Messenger .", "I m using the following code to extract the textual contents from the web pages my app is hosted on Google App Engine and works exactly like BoilerPipe Web API http : boilerpipe-web.appspot.com .", "I am trying to install node js module for boilerpipe on windows-7 .", "Looking into it I found the source here https : github.com misja python-boilerpipe blob master src boilerpipe extract init .py .", "You are missing boiler pipe java packages install you can find it here - http : code.google.com p boilerpipe downloads list .. . .. . you have only install python boilerpipe wrapper .", "The bug comes from boilerpipe see below .", "I use BoilerPipe for Java to extract some articles from the internet .", "i m getting classnotfound exception ...on boilerpipe ...it fails to find boilerpipe class ...i m sure that i have added it in the dependeny and updated the .iml file", "The Below algorithms to filter articles from the other elements used by an article extraction script source boilerpipe http : code.google.com p boilerpipe are using If you examine the src files closely .", "I use Boilerpipe to extract the content from html .. . .. . Here is how I find the final redirected url .. . .. . This is how I fetch the url .. . .. . And to get the body using Boilerpipe .. . .. . How to reduce the amount of data downloaded", "The original BoilerPipe can return the content as HTML fragments or filtered further to give text .", "However with Boilerpipe I am getting only the raw text .", "Anyone know what might be causing a bad installation of Boilerpipe", "Do you have a file or a folder called boilerpipe in the directory as test.py", "If multiprocessing worked faster then it may be boilerpipe or the other parts of your code that are faster .", "I want to know if something is wrong with my code or boilerpipe is not able to fetch it .", "And once I do how can I get boilerpipe to work", "Based on my research boilerpipe seems to be the best way forward for this .", "I tried installing the python boilerpipe from pip but had no luck .", "I tried this page : An article http : www.businessweekly.com.tw KBlogArticle.aspx id 4155 both by the Web-API http : boilerpipe-web.appspot.com and APIs in local jar .", "What I am trying to have is to include a option like HTML extract mode as in the original BoilerPipe Web API here http : boilerpipe-web.appspot.com .", "I am looking for something as simple as boilerpipe http : code.google.com p boilerpipe giving only the article content from html or php and simple and small in regular expression .", "I want to use boilerpipe to extract meta data image Url text .", "I don t know Boilerpipe but are you sure you are trying to run the correct Java class", "So I ve tried to integrate the boilerpipe library - https : code.google.com p boilerpipe wiki QuickStart .. . .. . As per the installing guide I have added the following to my Java classpath - boilerpipe-VERSION.jar nekohtml-1.9.13.jar and xerces-2.9.1.jar .. . .. . What I m trying to do with boilerpipe and my application flow that involves it .. . .. . I have a list view where there are a list of articles .", "For example the BoilerpipeExtractor http : boilerpipe.googlecode.com svn-trunk boilerpipe-core javadoc 1.0 de l3s boilerpipe BoilerpipeExtractor.html interface has 4 getText methods and each of those methods returns the extracted text as a String .", "I have tried to use boilerpipe library on python aiming to extract text from pages for a college project .", "I m attempting to use the boilerpipe library in JRUBY but I can t seem to load a dependency even though it seems like I can in irb .", "The only change is from Pool . . to multiprocessing.pool.ThreadPool .. . The problem is that I m not sure the boilerpipe multithreading test will detect the thread pool as having activeCount 1 .", "anyhow I m trying to use boilerpipe to extract the main article from some raw html source I have collected .", "Can anyone tell me how to use boilerpipe on windows with Netbeans", "I would like to install boilerpipe package using pip .", "Currently I m attempting to use the boilerpipe APl in order to extract text from news articles .", "I just used the example syntax from the boilerpipe quickstart guide https : code.google.com p boilerpipe wiki QuickStart Usage : .. . .. . And here is the connection error : .. . .. . I tried with a lot of sites but it comes to the same error .", "I put boilerpipe-1.2.0-android.jar https : code.google.com p boilerpipe issues detail id 57 .. . .. . nekohtml-1.9.13.jar xerces-2.9.1.jar into libs folder of my Android Project .", "i m using intellij for developing my web application using boilerpipe jar to create an application like this https : boilerpipe-web.appspot.com but i m getting error in instantiating servlet class . . this is my servlet code", "If you can remove the other parts of the code and demonstrate that boilerpipe is significantly faster with multiprocessing that would be a great way to submit a feature request on github .", "Boilerpipe itself is a folder containing several other folders containing the .java files in the source folder and .class files in the bin folder after I ve tried to run .", "Everything seems to be compiling when I run but I get an error telling me that one of the classes in the boilerpipe library could not be resolved .", "I am trying work out python boilerpipe with google-app-engine .", "I have installed boilerpipe and its working fine in my local machine .", "First monkey patching : in the code you posted on stackoverflow you just have to add the following code before the creation of the extractor : .. . .. . About boilerpipe : the check if threading.activeCount 1 in boilerpipe extractor init .py line 50 is wrong .", "I should start by saying that I ve never used Boilerpipe .. . or even heard of it until now .", "So my assessment is that using Boilerpipe to extract text with styling is a complete non-starter .", "You can use IKVM https : www.ikvm.net to convert the Boilerpipe jar into a new DLL to use in your .NET aplications .", "I am using this approach and works fine when sending html thrown the different boilerpipe methods .", "First you need to get the result html after the javascript changes and then give it to boilerpipe .", "If you really need mp I will try to figure out how to patch boilerpipe .", "Though boilerpipe works best for english text but I also get good result for non-english text as well .", "I have included the libraries boilerpipe-1.2.0 nekohtml-1.9.13 xerces-2.9.1 in the libs folder .", "The BodyContentHandler class doesn t use the Boilerpipe code so you ll have to explicitly use the BoilerPipeContentHandler .", "I wanted to use boilerpipe so I added all .jars to the build path for my project ." ] }
{ "confidence": [ 67.36016082763672, 64.94659423828125, 64.91902160644531, 64.718994140625, 64.06714630126953, 63.8558349609375, 63.01799011230469, 60.66913604736328, 59.9665412902832, 59.34894943237305, 59.18781661987305, 59.058738708496094, 58.73521423339844, 57.46373748779297, 56.88853454589844, 56.151939392089844, 56.14650344848633, 55.66639709472656, 55.63591003417969, 55.18423843383789 ], "content": [ "Question : I am using boilerpipe library to analyzer news articles . There news articles contain a lot of boilerplate such as copyright information side pane of related articles etc . Boilerpipe removes all that information . Is it possible to return the boilerplate information I need to analyzer and extract some stuff from copyright statement etc . Also does it contains some sort of confidence for each text block as to whether it is boilerplate or not Thanks . .. . Answer : You can get the entire text or traverse the actual text blocks by using the Document classes boilerplate provides :", "Question : I need to extract main news content from a web page.I searched on internet and found an api named Boilerpipe freely available for that purpose http : boilerpipe-web.appspot.com But I m not abled to find any implementations in java that make use of Boilerpipe.Can anyone tell me how can I use Boilerpipe in Java to extract the news content or give me some links to implementations in java which make use of Boilerpipe to extract content from a news web page Comment : Have you considered using a library like Jsoup jsoup.org http : jsoup.org Do you have a specific website you are trying to scrape .. . Answer : may be my answer is too late . But it s pretty simple .", "Question : I m building an application using python which involves getting news articles from RSS feeds . As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears . Although boilerpipe was originally written for java it has been ported to python too . You can see its page on github here : https : github.com misja python-boilerpipe .. . .. . The problem is that I get an exception when trying to import it using : .. . .. . The error I get is : .. . .. . What might be causing this problem and how can I fix it Comment : you could parse the feed using pure Python feedparser module http : packages.python.org feedparser introduction.html Comment : @J.F.Sebastian Thanks . I m actually using feedparser already which I use to actually get the articles well the urls to them . Once I get an article I then want to extract just the article content from its page excluding sidebars menus and other random text . Based on my research boilerpipe seems to be the best way forward for this . Unfortunately I m having the problem which I mentioned above with importing it into python . .. . Answer : The following worked best for me : .. . .. . You may have to : .. . .. . install JPype sudo apt-get install python-jpype on Ubuntu .. . install charade sudo pip install charade .. . .. . But you won t have to install the boilerpipe JAVA jar s since setup loads this for you . I tried installing the python boilerpipe from pip but had no luck . I was successfully running boilerplate java code but kept getting this same error .", "Question : NBoilerPipe is a Mono port of the BoilerPipe Java library . I ve managed to get this working in .NET 4 without too much trouble a few library references needed fixing etc . However searching through the code I cannot find any hooks for HTML output . For example the GetText method only has one parameter for the input and I cannot see any additional methods . How can I get HTML output from NBoilerPipe Here is the sample NBoilerPipe code that is working in .NET4 : .. . .. . .. . String url http : etc .. . String page String.Empty .. . WebRequest request WebRequest.Create url .. . HttpWebResponse response HttpWebResponse request.GetResponse .. . Stream stream response.GetResponseStream .. . using StreamReader streamReader new StreamReader stream Encoding.UTF8 .. . page streamReader.ReadToEnd .. . .. . String text ArticleExtractor.INSTANCE.GetText page .. . Console.WriteLine Text : n + text .. . Comment : Isn t the purpose of NBoilerPipe to extract the text from html I m not sure I understand what you are trying to do . Comment : Boilerpipe extracts the content from the page filtering the boilerplate - things like header footer menus advertising etc . The original BoilerPipe can return the content as HTML fragments or filtered further to give text . THe HTML fragments are useful because they include things like p tags . .. . Answer : I had the same issue . I managed to solve it by using the following . http : boilerpipe-web.appspot.com Comment : Note that link-only answers http : meta.stackoverflow.com tags link-only-answers info are discouraged SO answers should be the end-point of a search for a solution vs . yet another stopover of references which tend to get stale over time . Please consider adding a stand-alone synopsis here keeping the link as a reference . Comment : Thanks for the reply . The above link is a free request-limited web service to the Java library . Only suitable for home experimentation imho .", "Question : I need to extract main news content from a web page.I searched on internet and found an api named Boilerpipe freely available for that purpose http : boilerpipe-web.appspot.com But I m not abled to find any implementations in java that make use of Boilerpipe.Can anyone tell me how can I use Boilerpipe in Java to extract the news content or give me some links to implementations in java which make use of Boilerpipe to extract content from a news web page Comment : Have you considered using a library like Jsoup jsoup.org http : jsoup.org Do you have a specific website you are trying to scrape .. . Answer : simple huh suppose you need to extract this URL http : www.thehindu.com news national katheria-remarks-rock-parliament article8301417.ece .. . .. . just use my BoilerPipe Alternative Web API HERE http : offlinebrowser-web.appspot.com my service is based on boilerpipe i have developed this because of getting overquota error in the original application..you have the option to get back the result in JSON just consume it in your application. . .. . .. . Best Regards", "Question : I m using the following code to extract the textual contents from the web pages my app is hosted on Google App Engine and works exactly like BoilerPipe Web API http : boilerpipe-web.appspot.com . The problem is that I can only get the result in plain text format . I played around the library to find a work around but I couldn t find a method to display the result in HTML . What I am trying to have is to include a option like HTML extract mode as in the original BoilerPipe Web API here http : boilerpipe-web.appspot.com . This is the code I m using for extracting the plain text . How can I include the feature for displaying the result in HTML form .. . Answer : i am using the source code of Boilerpipe and solve your question with the following code : .. . .. . Source http : www.programcreek.com java-api-examples index.php api de.l3s.boilerpipe.BoilerpipeExtractor", "Question : Boilerpipe is a library that basically extracts the main content from a webpage . For news websites it is especially hard to extract the content as the formatting differs from site to site . So I ve tried to integrate the boilerpipe library - https : code.google.com p boilerpipe wiki QuickStart .. . .. . As per the installing guide I have added the following to my Java classpath - boilerpipe-VERSION.jar nekohtml-1.9.13.jar and xerces-2.9.1.jar .. . .. . What I m trying to do with boilerpipe and my application flow that involves it .. . .. . I have a list view where there are a list of articles . I ve set up an onItemClickListener such that when you click on any of the items on the listview it takes the url specific to that article and uses boilerpipe to extract the text from that article and starts a new activity where it is printed in textview . The Problem .. . .. . My application crashes once I click on one of the items in the list . a . I m not sure if the code I ve written is correct as I m a beginner . Please excuse me for that . If it is incorrect how can I fix it I have a feeling it may be a problem with the url . b . If I haven t installed boilerplate correctly what is the correct way of doing it .. . .. . List Activity : .. . .. . Article Activity : .. . .. . article view.xml .. . .. . Stack Trace : .. . Answer : Looks like this doesn t have anything to do with BoilerPlate but rather the fact that you re making a network call on the main thread . I recommend you check out this thread regarding the problem http : stackoverflow.com questions 6343166 android-os-networkonmainthreadexception .", "Question : Boilerpipe is a library that basically extracts the main content from a webpage . For news websites it is especially hard to extract the content as the formatting differs from site to site . So I ve tried to integrate the boilerpipe library - https : code.google.com p boilerpipe wiki QuickStart .. . .. . As per the installing guide I have added the following to my Java classpath - boilerpipe-VERSION.jar nekohtml-1.9.13.jar and xerces-2.9.1.jar .. . .. . What I m trying to do with boilerpipe and my application flow that involves it .. . .. . I have a list view where there are a list of articles . I ve set up an onItemClickListener such that when you click on any of the items on the listview it takes the url specific to that article and uses boilerpipe to extract the text from that article and starts a new activity where it is printed in textview . The Problem .. . .. . My application crashes once I click on one of the items in the list . a . I m not sure if the code I ve written is correct as I m a beginner . Please excuse me for that . If it is incorrect how can I fix it I have a feeling it may be a problem with the url . b . If I haven t installed boilerplate correctly what is the correct way of doing it .. . .. . List Activity : .. . .. . Article Activity : .. . .. . article view.xml .. . .. . Stack Trace : .. . Answer : i thing its common problem.. . u just use AsyncTask . see that... . .. . .. . Exception on Android 4.0 android.os.StrictMode AndroidBlockGuardPolicy.onNetwork StrictMode http : stackoverflow.com questions 15921252 exception-on-android-4-0-android-os-strictmodeandroidblockguardpolicy-onnetwor .. . .. . don t block main ui use child thread.. .", "Question : null .. . Answer : I have successfully installed Boilerpipe and Jpype in python but getting error while Importing boilerpipe .. . .. . How can I solve this issue Thanks in advance Comment : Does your java work Because it looks like your java is broken . Comment : i just installed boilerplate on my computer and it all worked well . i m running on windows and python-2.7 Comment : Yes my Java works perfectly without any error.. . Comment : installing boilerplate didn t work the error still exists", "Question : I m building an application using python which involves getting news articles from RSS feeds . As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears . Although boilerpipe was originally written for java it has been ported to python too . You can see its page on github here : https : github.com misja python-boilerpipe .. . .. . The problem is that I get an exception when trying to import it using : .. . .. . The error I get is : .. . .. . What might be causing this problem and how can I fix it Comment : you could parse the feed using pure Python feedparser module http : packages.python.org feedparser introduction.html Comment : @J.F.Sebastian Thanks . I m actually using feedparser already which I use to actually get the articles well the urls to them . Once I get an article I then want to extract just the article content from its page excluding sidebars menus and other random text . Based on my research boilerpipe seems to be the best way forward for this . Unfortunately I m having the problem which I mentioned above with importing it into python . .. . Answer : This worked for me on Mac OS X 10.8.5 with Python 2.7.9 . : .. . .. . Then you should be able to do in the python console", "Question : I am trying to run boilerpipe with Python multiprocessing . Doing this to parse RSS feeds from multiple sources . The problem is it hangs in one of the threads after processing some links . The whole flow works if I remove the pool and run it in a loop . Here is my multiprocessing code : .. . .. . This is my boilerpipe code which is being called inside process link for feeds : .. . .. . I am clueless on why it is hanging . Is there something wrong in the proc pool code Comment : What store results to db does Comment : @freakish It adds the results to mongodb . Comment : Can you provide more details . What is ContentParser what is Extractor - I tried to mimic your problem but in my case it works . Comment : Looking into it I found the source here https : github.com misja python-boilerpipe blob master src boilerpipe extract init .py . All the code is just thrown into init .py edit - actually ContentParser doesn t seem to be in there .. . Answer : Can you try threading instead Multiprocessing is basically for when you are CPU bound http : stackoverflow.com questions 1226584 multiprocess-or-threading-in-python . Also boilerpipe already includes protection when using threading https : github.com misja python-boilerpipe blob master src boilerpipe extract init .py L51 which suggests that it may need protection in multiprocessing also . If you really need mp I will try to figure out how to patch boilerpipe . Here is what I guess will be a drop-in replacement using threading . It uses multiprocessing.pool.ThreadPool which is a fake multiprocessing pool http : stackoverflow.com questions 3033952 python-thread-pool-similar-to-the-multiprocessing-pool . The only change is from Pool . . to multiprocessing.pool.ThreadPool .. . The problem is that I m not sure the boilerpipe multithreading test will detect the thread pool as having activeCount 1 . Comment : @dpatro even if you actually need multiprocessing could you try this If this works then it might be straightforward to patch boilerpipe for multiprocessing protection . Comment : I also thought of same github code . Moved to Java a week back to make boilerpipe run . Will check it out today and update the thread . Comment : Checked and it is working for continuously over a day now . The processing is slowed down a bit though may be due to the library . Thanks @kobejohn for the insight to the solution . Comment : @dpatro that s great news . Thanks for letting me everyone know it works . If multiprocessing worked faster then it may be boilerpipe or the other parts of your code that are faster . If you can remove the other parts of the code and demonstrate that boilerpipe is significantly faster with multiprocessing that would be a great way to submit a feature request on github . Comment : I got a chance to check things properly . It turns out that ThreadPool is faster than ProcessPool . My previous remark on speed was a mistake as I forgot to check the internet speed that day .", "Question : I m building an application using python which involves getting news articles from RSS feeds . As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears . Although boilerpipe was originally written for java it has been ported to python too . You can see its page on github here : https : github.com misja python-boilerpipe .. . .. . The problem is that I get an exception when trying to import it using : .. . .. . The error I get is : .. . .. . What might be causing this problem and how can I fix it Comment : you could parse the feed using pure Python feedparser module http : packages.python.org feedparser introduction.html Comment : @J.F.Sebastian Thanks . I m actually using feedparser already which I use to actually get the articles well the urls to them . Once I get an article I then want to extract just the article content from its page excluding sidebars menus and other random text . Based on my research boilerpipe seems to be the best way forward for this . Unfortunately I m having the problem which I mentioned above with importing it into python . .. . Answer : You are missing boiler pipe java packages install you can find it here - http : code.google.com p boilerpipe downloads list .. . .. . you have only install python boilerpipe wrapper .", "Question : I m building an application using python which involves getting news articles from RSS feeds . As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears . Although boilerpipe was originally written for java it has been ported to python too . You can see its page on github here : https : github.com misja python-boilerpipe .. . .. . The problem is that I get an exception when trying to import it using : .. . .. . The error I get is : .. . .. . What might be causing this problem and how can I fix it Comment : you could parse the feed using pure Python feedparser module http : packages.python.org feedparser introduction.html Comment : @J.F.Sebastian Thanks . I m actually using feedparser already which I use to actually get the articles well the urls to them . Once I get an article I then want to extract just the article content from its page excluding sidebars menus and other random text . Based on my research boilerpipe seems to be the best way forward for this . Unfortunately I m having the problem which I mentioned above with importing it into python . .. . Answer : I had the same issue . I saw the set-up details provided by the author of Mining the web . Here is the link-to his Github page for boilerpipe .. . .. . https : github.com misja python-boilerpipe blob master setup.py", "Question : So I m running boilerpipe in eclipse . I m just trying to get it to work here is the code. . I m not sure if I set it up in Eclipse properly or not but my console just says things like.. . .. . Answer : I ve never heard of Boilerpipe before so please forgive me if this is not how it works but doesn t your code still need to be inside a class You have your main method and in fact all your code not within a class - or does Boilerplate make the java work very differently Comment : LOL my god . I haven t programmed in java in ages have been doing C and javascript lately and wow . I am an idiot for not noticing that . Although now Ecplise is spitting out the error Editor does not contain a main type . Comment : Nevermind I figured it out thanks Comment : ah haha . I do stuff like that all the time . - Glad to help .", "Question : am using Boilerpipe in my application and when am trying to extract the content using ArticleExtractor am getting plane text only all the html formating has been removed so am trying with HtmlHighlighter . but the process method of HtmlHighlighter fails for certain urls . is there any option to use html string to pass to this method can anybody explain Comment : I found some online Java samples that mentioned HtmlHighlighter but what is it and where did you find a .NET port Comment : sorry for the delay in reply its years back still .....There is NBoilerpipe available in GitHub .. . Answer : You can use IKVM https : www.ikvm.net to convert the Boilerpipe jar into a new DLL to use in your .NET aplications . I am using this approach and works fine when sending html thrown the different boilerpipe methods . If the page content that you are trying to access is loaded by javascript a simple http-request cant handle such information . First you need to get the result html after the javascript changes and then give it to boilerpipe .", "Question : null .. . Answer : Currently I m attempting to use the boilerpipe APl in order to extract text from news articles . However it doesn t fully work . For example see this link https : boilerpipe-web.appspot.com extract url http 3A 2F 2Fwww.cnn.com 2F2016 2F08 2F04 2Fpolitics 2Fdonald-trump-2016-election-gop-civil-war 2Findex.html extractor ArticleExtractor output htmlFragment extractImages token . Even though boilerpipe gets all of the main text it also gets some of the unimportant text such as Chat with us on Facebook Messenger . Are there any viable alternatives to boilerpipe or is there a way to configure boilerpipe in order to find the main article text better", "Question : null .. . Answer : There are many scripts extracts articles from html pages . If using regular expression to get the only main article from html or PHP page source what is the best regular expressions to get only the main article . Also what is the simplest and the best ways to get those without regular expressions in PHP or other programs only . Some scripts are using many filters to extract the main article from html or PHP source with problems of non-English languages characters and multi-byte characters . As the results they can not good portion of the main article from the source because the above problems . Normally the main article must be in div p or other tags in the html or PHP source . Then other html elements in the page with navigations links extracts and others . Using regular expressions can solve the prior problems easily by defining multi-byte character and language differences in the expressions . Most of the article extraction software uses filters to find comment first next nav button submit and others to check if the portions they are holding are the content or other elements . The tags ids classes and other tags are most likely only valid in English and ISO-west-European character only . They can not extract exact portion of the article because they do not understand the languages or the characters they are trying to filter . The Below algorithms to filter articles from the other elements used by an article extraction script source boilerpipe http : code.google.com p boilerpipe are using If you examine the src files closely . 1 . Check if the characters are long enough . character and word-count .. . 2 . Check if the tags are on suggest list comment first next nav and others . array searches with or without regular expressions .. . 3 . Other checks to verify the article from other html elements heuristic and others . There are theories of article extraction of webpages but not simple than using regular expressions . They can convert to simply regular expressions or other simple programs . The boilerpipe http : code.google.com p boilerpipe written in java to extract articles but it is too complex and the problem of the languages and characters . Preferably using both several regular expressions and some other regular program to filter the article is better . The exact things that I m looking for are below .. . .. . Regular expressions to extract only the articles from html and PHP pages . Using few regular expressions to extract only the article from html or PHP source without any other elements and other expressions to check non-article possibility . Non regular expressions to extract only the articles from html and PHP pages . Using PHP to extract only the article from html or PHP source without using regular expression in simple way . Also need check if the article or not . Both of them must not in language and character set limitations example of multi-bytes and simple sufficient to fit a single page . Comment : Forget using regular expressions for something as irregular as html markup - github.com FriendsOfPHP Goutte https : github.com FriendsOfPHP Goutte Comment : stackoverflow.com a 1732454 477127 http : stackoverflow.com a 1732454 477127 You ll find using something such as DOMDocument a lot better . Comment : I am looking for something as simple as boilerpipe http : code.google.com p boilerpipe giving only the article content from html or php and simple and small in regular expression . Comment : @GordonM : The answer seems containing unreadable characters so the display does not show proper characters well . Comment : That sounds like an incorrect charset issue then . Or do you mean that you might be having to parse invalid input", "Question : null .. . Answer : I successfully installed JPype and Boilerpipe Python wrapper . My JAVA HOME path is correct as far as I know . I created a python file with the following code : .. . .. . I am getting this error when I run python boilerpipe.py .. . .. . How can I solve this Thank you very much . EDIT .. . .. . Interestingly enough I changed the name of the file from boilerplate.py to test.py and now the error is different : .. . .. . What could be causing this Could it be in the first case the file was trying to import from itself Anyone know what might be causing a bad installation of Boilerpipe Comment : Do you have a file or a folder called boilerpipe in the directory as test.py Comment : @Blender Actually I called the file boilerpipe.py Comment : Never name your files with names already found in the library the same is true for the name of variables and built-ins . Anyway the last error shows that this boilerplate package is not installed or is not installed correctly . Comment : @Bakuriu I ran sudo python setup.py install and it looks like everything was fine Comment : Then import boilerplate shouldn t fail . Also : which boilerplate package is that", "Question : I am trying to use boilerpipe https : code.google.com p boilerpipe to extract news articles from non-english text . I have already seen this http : stackoverflow.com questions 9260010 using-boilerpipe-to-extract-non-english-articles and its not working for me . I made following changes 1 Modified HTMLfetcher.java . Appended following lines before end of method fetch .. . .. . Or And then 2 Changes code in class by using UTF-8 charset with Inuts .. . .. . Still it did not work Test URL : http : www.sandesh.com article.aspx newsid 2905443 Text : 30 .. . .. . . . Please help me . .. . Answer : You ve clearly been able to get ArticleExtractor to parse utf-8 text . The likely problem is that boilerplate s algorithms are specifically tailored to English and aren t working so well on a Gujarati article . The algorithms use verbosity of phrases eg : number of words per phrase as well as some specific phrases comments have your say etc to determine the barriers of the article as well as what pieces within the article are content or non content . Have a look in the boilerpipe filters english directory of the library for more info on the algorithms . Unfortunately to get the same level of accuracy in non-English languages you would need to repeat their study on each language or have a list of translated stop-words and an idea about verbosity for each language you use . Comment : I completely agree with you . But my question was with encoding where I get all instead of non-english text . Though boilerpipe works best for english text but I also get good result for non-english text as well . Comment : Where do you get the It s not shown in your original question . Comment : Frankly its my bad the intention is to get extraction done with same non-english language instead of question marks or garbage characters as output . Check my same question in a related thread link http : stackoverflow.com questions 9260010 using-boilerpipe-to-extract-non-english-articles", "Question : I m building an application using python which involves getting news articles from RSS feeds . As part of my project I have decided to use boilerpipe in order to extract just the article content from the html page on which the article appears . Although boilerpipe was originally written for java it has been ported to python too . You can see its page on github here : https : github.com misja python-boilerpipe .. . .. . The problem is that I get an exception when trying to import it using : .. . .. . The error I get is : .. . .. . What might be causing this problem and how can I fix it Comment : you could parse the feed using pure Python feedparser module http : packages.python.org feedparser introduction.html Comment : @J.F.Sebastian Thanks . I m actually using feedparser already which I use to actually get the articles well the urls to them . Once I get an article I then want to extract just the article content from its page excluding sidebars menus and other random text . Based on my research boilerpipe seems to be the best way forward for this . Unfortunately I m having the problem which I mentioned above with importing it into python . .. . Answer : The class HTMLHighlighter wasn t found . Did you set your JAVA HOME The documentation https : github.com misja python-boilerpipe states : .. . .. . Be sure to have set JAVA HOME properly since jpype depends on this setting . Comment : Thanks for the answer . I m sure I have done that correctly . I created a JAVA HOME system variable and set it s value to C : Program Files Java jdk1.7.0 which is what I m pretty sure it should be . Comment : Just to clarify I mean that I had already done the above but it still doesn t work despite that . Comment : I ve spent hours trying to get this to work now . Still no luck though . Comment : Hmm.. . I don t know much about windows environment-variables but are you sure your python context can see the JAVA HOME Try : print os.environ JAVA HOME Comment : Thanks tried that . It shows me C : Program Files Java jdk1.7.0 so I guess it can see it . I m not really sure what the problem is . If you wished to use this package what steps would you go through after downloading it Maybe there s something I haven t done.. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION